From 5ec056a994f6ba3a8413e9948b8ea0f574402f78 Mon Sep 17 00:00:00 2001 From: codat-sdk-codegen Date: Wed, 5 Aug 2026 19:30:26 +0000 Subject: [PATCH] lending: regenerate with the in-house pipeline @ 1b5626f, version 7.6.0 -> 7.6.1 --- lending/.speakeasy/gen.lock | 18190 ---------------- lending/.speakeasy/gen.yaml | 91 - lending/RELEASES.md | 12 +- lending/USAGE.md | 43 +- lending/docs/lib/utils/retryconfig.md | 46 +- .../docs/sdk/models/errors/errormessage.md | 42 +- .../models/operations/createaccountrequest.md | 42 +- .../createbankaccountmappingrequest.md | 38 +- .../operations/createbankaccountrequest.md | 44 +- .../createbanktransactionsrequest.md | 46 +- .../operations/createconnectionrequest.md | 34 +- .../operations/createconnectionrequestbody.md | 32 +- .../operations/createdirectcostrequest.md | 42 +- .../models/operations/createpaymentrequest.md | 44 +- .../operations/createsourceaccountrequest.md | 40 +- .../createsourceaccountrequestbody.md | 46 +- .../createsourceaccountresponsebody.md | 63 +- .../operations/createsupplierrequest.md | 44 +- .../operations/createtransferrequest.md | 44 +- .../models/operations/deletecompanyrequest.md | 32 +- .../operations/deleteconnectionrequest.md | 36 +- ...downloadaccountingbillattachmentrequest.md | 44 +- ...loadaccountingcustomerattachmentrequest.md | 44 +- ...adaccountingdirectcostattachmentrequest.md | 44 +- ...accountingdirectincomeattachmentrequest.md | 44 +- ...nloadaccountinginvoiceattachmentrequest.md | 44 +- .../downloadaccountinginvoicepdfrequest.md | 36 +- ...loadaccountingsupplierattachmentrequest.md | 44 +- .../operations/downloadexcelreportrequest.md | 35 +- .../models/operations/downloadfilesrequest.md | 36 +- .../endbankstatementuploadsessionrequest.md | 41 +- .../operations/generateexcelreportrequest.md | 35 +- ...generateloansummaryqueryparamsourcetype.md | 30 +- .../operations/generateloansummaryrequest.md | 35 +- .../generateloantransactionsrequest.md | 37 +- .../operations/generatereportrequest.md | 35 +- .../operations/getaccountingaccountrequest.md | 36 +- .../getaccountingaccounttransactionrequest.md | 39 +- ...getaccountingagedcreditorsreportrequest.md | 45 +- .../getaccountingageddebtorsreportrequest.md | 45 +- .../getaccountingbalancesheetrequest.md | 44 +- .../getaccountingbankaccountrequest.md | 40 +- .../getaccountingbillattachmentrequest.md | 44 +- .../getaccountingbillcreditnoterequest.md | 36 +- .../getaccountingbillpaymentrequest.md | 36 +- .../operations/getaccountingbillrequest.md | 36 +- .../getaccountingcashflowstatementrequest.md | 44 +- .../getaccountingcreditnoterequest.md | 35 +- .../getaccountingcustomerattachmentrequest.md | 44 +- .../getaccountingcustomerrequest.md | 36 +- ...etaccountingdirectcostattachmentrequest.md | 44 +- .../getaccountingdirectcostrequest.md | 40 +- ...accountingdirectincomeattachmentrequest.md | 46 +- .../getaccountingdirectincomerequest.md | 40 +- .../getaccountinginvoiceattachmentrequest.md | 44 +- .../operations/getaccountinginvoicerequest.md | 36 +- .../getaccountingjournalentryrequest.md | 36 +- .../operations/getaccountingjournalrequest.md | 35 +- .../operations/getaccountingpaymentrequest.md | 36 +- .../operations/getaccountingprofilerequest.md | 32 +- .../getaccountingprofitandlossrequest.md | 44 +- .../getaccountingsupplierattachmentrequest.md | 44 +- .../getaccountingsupplierrequest.md | 36 +- .../getaccountingtransferrequest.md | 40 +- .../getbankaccountmappingrequest.md | 36 +- .../operations/getbankingaccountrequest.md | 40 +- .../getbankingtransactioncategoryrequest.md | 39 +- .../getbankingtransactionrequest.md | 39 +- ...bankstatementuploadconfigurationrequest.md | 36 +- ...categorizedbalancesheetstatementrequest.md | 38 +- .../getcategorizedbankstatementrequest.md | 40 +- ...ategorizedprofitandlossstatementrequest.md | 38 +- .../operations/getcommercecustomerrequest.md | 40 +- ...commercecustomerretentionmetricsrequest.md | 51 +- .../operations/getcommercedisputerequest.md | 40 +- .../getcommercelifetimevaluemetricsrequest.md | 51 +- .../operations/getcommercelocationrequest.md | 40 +- .../operations/getcommerceorderrequest.md | 40 +- .../getcommerceordersreportrequest.md | 51 +- .../getcommercepaymentmethodrequest.md | 40 +- .../operations/getcommercepaymentrequest.md | 40 +- .../getcommerceproductcategoryrequest.md | 40 +- .../operations/getcommerceproductrequest.md | 40 +- .../operations/getcommerceprofilerequest.md | 36 +- .../getcommercerefundsreportrequest.md | 51 +- .../getcommercerevenuemetricsrequest.md | 51 +- .../getcommercetransactionrequest.md | 40 +- .../models/operations/getcompanyrequest.md | 32 +- .../models/operations/getconnectionrequest.md | 36 +- .../getcreatebanktransactionsmodelrequest.md | 40 +- .../getcreatechartofaccountsmodelrequest.md | 36 +- .../getcreatedirectcostsmodelrequest.md | 36 +- .../operations/getcreateoperationrequest.md | 35 +- .../getcreatepaymentmodelrequest.md | 36 +- .../getcreatetransfersmodelrequest.md | 36 +- ...getcreateupdatebankaccountsmodelrequest.md | 36 +- .../getcreateupdatesuppliersmodelrequest.md | 36 +- .../getdataintegritystatusrequest.md | 36 +- .../getdataintegritysummariesrequest.md | 40 +- .../operations/getdatastatusdatastatuses.md | 376 +- .../models/operations/getdatastatusrequest.md | 32 +- .../getexcelreportgenerationstatusrequest.md | 35 +- .../getloansummaryqueryparamsourcetype.md | 30 +- .../operations/getloansummaryrequest.md | 35 +- .../operations/getpulloperationrequest.md | 35 +- .../isagedcreditorsreportavailablerequest.md | 32 +- .../isageddebtorsreportavailablerequest.md | 32 +- .../listaccountingaccountsrequest.md | 44 +- ...istaccountingaccounttransactionsrequest.md | 48 +- .../listaccountingbankaccountsrequest.md | 48 +- ...ccountingbankaccounttransactionsrequest.md | 52 +- .../listaccountingbillattachmentsrequest.md | 40 +- .../listaccountingbillcreditnotesrequest.md | 44 +- .../listaccountingbillpaymentsrequest.md | 44 +- .../operations/listaccountingbillsrequest.md | 44 +- .../listaccountingcreditnotesrequest.md | 44 +- ...istaccountingcustomerattachmentsrequest.md | 40 +- .../listaccountingcustomersrequest.md | 44 +- ...taccountingdirectcostattachmentsrequest.md | 40 +- .../listaccountingdirectcostsrequest.md | 48 +- ...ccountingdirectincomeattachmentsrequest.md | 40 +- .../listaccountingdirectincomesrequest.md | 48 +- ...listaccountinginvoiceattachmentsrequest.md | 40 +- .../listaccountinginvoicesrequest.md | 44 +- .../listaccountingjournalentriesrequest.md | 44 +- .../listaccountingjournalsrequest.md | 44 +- .../listaccountingpaymentsrequest.md | 44 +- ...istaccountingsupplierattachmentsrequest.md | 40 +- .../listaccountingsuppliersrequest.md | 44 +- .../listaccountingtransfersrequest.md | 48 +- .../listbankingaccountbalancesrequest.md | 48 +- .../operations/listbankingaccountsrequest.md | 48 +- ...listbankingtransactioncategoriesrequest.md | 48 +- .../listbankingtransactionsrequest.md | 48 +- .../listcommercecustomersrequest.md | 48 +- .../operations/listcommercedisputesrequest.md | 48 +- .../listcommercelocationsrequest.md | 36 +- .../operations/listcommerceordersrequest.md | 48 +- .../listcommercepaymentmethodsrequest.md | 48 +- .../operations/listcommercepaymentsrequest.md | 48 +- .../listcommerceproductcategoriesrequest.md | 48 +- .../operations/listcommerceproductsrequest.md | 48 +- .../listcommercetransactionsrequest.md | 48 +- .../models/operations/listcompaniesrequest.md | 44 +- .../operations/listconnectionsrequest.md | 44 +- .../operations/listcreateoperationsrequest.md | 44 +- .../listdataintegritydetailsrequest.md | 48 +- .../sdk/models/operations/listfilesrequest.md | 32 +- .../operations/listloantransactionsrequest.md | 35 +- .../operations/listpulloperationsrequest.md | 44 +- .../listreconciledinvoicesrequest.md | 40 +- .../models/operations/listreportsrequest.md | 44 +- .../models/operations/queryparamsourcetype.md | 30 +- .../operations/refreshalldatatypesrequest.md | 32 +- .../operations/refreshdatatyperequest.md | 38 +- .../operations/replacecompanyrequest.md | 34 +- ...bankstatementuploadconfigurationrequest.md | 40 +- .../docs/sdk/models/operations/sourcetype.md | 30 +- .../startbankstatementuploadsessionrequest.md | 38 +- .../operations/unlinkconnectionrequest.md | 38 +- .../unlinkconnectionupdateconnection.md | 30 +- .../models/operations/updatecompanyrequest.md | 34 +- .../uploadbankstatementdatarequest.md | 77 +- .../uploadbankstatementdatarequestbody.md | 127 +- .../models/operations/uploadfilesrequest.md | 35 +- .../docs/sdk/models/shared/accountbalance.md | 38 +- .../models/shared/accountbalanceamounts.md | 38 +- .../shared/accountcategoriesupdatedwebhook.md | 63 +- .../accountcategoriesupdatedwebhookdata.md | 32 +- .../sdk/models/shared/accountcategorylevel.md | 36 +- .../sdk/models/shared/accountidentifiers.md | 48 +- .../models/shared/accountidentifiertype.md | 32 +- lending/docs/sdk/models/shared/accountinfo.md | 40 +- .../sdk/models/shared/accountingaccount.md | 140 +- .../sdk/models/shared/accountingaccounts.md | 54 +- .../shared/accountingaccounttransaction.md | 101 +- .../shared/accountingaccounttransactions.md | 54 +- .../accountingaccounttransactionstatus.md | 30 +- .../sdk/models/shared/accountingaddress.md | 44 +- .../models/shared/accountingaddresstype.md | 32 +- .../shared/accountingagedcreditorreport.md | 151 +- .../shared/accountingageddebtorreport.md | 153 +- .../sdk/models/shared/accountingattachment.md | 86 +- .../models/shared/accountingbalancesheet.md | 191 +- .../models/shared/accountingbankaccount.md | 100 +- .../models/shared/accountingbankaccounts.md | 54 +- .../shared/accountingbankaccounttype.md | 36 +- .../shared/accountingbanktransaction.md | 84 +- .../shared/accountingbanktransactions.md | 54 +- .../docs/sdk/models/shared/accountingbill.md | 139 +- .../models/shared/accountingbillcreditnote.md | 309 +- .../shared/accountingbillcreditnotes.md | 54 +- .../models/shared/accountingbillpayment.md | 386 +- .../models/shared/accountingbillpayments.md | 54 +- .../docs/sdk/models/shared/accountingbills.md | 54 +- .../shared/accountingcashflowstatement.md | 149 +- .../models/shared/accountingcompanyinfo.md | 158 +- .../shared/accountingcreateaccountresponse.md | 97 +- ...gcreateaccountresponseaccountingaccount.md | 104 +- ...createaccountresponsevaliddatatypelinks.md | 71 +- .../accountingcreatebankaccountresponse.md | 87 +- ...ankaccountresponseaccountingbankaccount.md | 84 +- ...accountingcreatebankaccounttransactions.md | 41 +- .../accountingcreatebanktransactions.md | 39 +- ...ccountingcreatebanktransactionsresponse.md | 89 +- .../accountingcreatedirectcostresponse.md | 109 +- ...edirectcostresponseaccountingdirectcost.md | 85 +- .../shared/accountingcreatepaymentresponse.md | 99 +- ...gcreatepaymentresponseaccountingpayment.md | 754 +- .../accountingcreatesupplierresponse.md | 158 +- ...reatesupplierresponseaccountingsupplier.md | 99 +- .../accountingcreatetransferresponse.md | 103 +- ...reatetransferresponseaccountingtransfer.md | 79 +- .../accountingcreatetransferresponsestatus.md | 30 +- .../sdk/models/shared/accountingcreditnote.md | 151 +- .../models/shared/accountingcreditnotes.md | 54 +- .../sdk/models/shared/accountingcustomer.md | 92 +- .../models/shared/accountingcustomerref.md | 32 +- .../sdk/models/shared/accountingcustomers.md | 54 +- .../sdk/models/shared/accountingdirectcost.md | 183 +- .../models/shared/accountingdirectcosts.md | 54 +- .../models/shared/accountingdirectincome.md | 177 +- .../models/shared/accountingdirectincomes.md | 54 +- .../sdk/models/shared/accountinginvoice.md | 185 +- .../shared/accountinginvoicedatatype.md | 30 +- .../sdk/models/shared/accountinginvoices.md | 54 +- .../sdk/models/shared/accountingjournal.md | 100 +- .../models/shared/accountingjournalentries.md | 54 +- .../models/shared/accountingjournalentry.md | 121 +- .../sdk/models/shared/accountingjournals.md | 54 +- .../sdk/models/shared/accountingpayment.md | 1436 +- .../shared/accountingpaymentallocation.md | 60 +- .../sdk/models/shared/accountingpayments.md | 54 +- .../shared/accountingprofitandlossreport.md | 277 +- .../sdk/models/shared/accountingrecordref.md | 42 +- .../sdk/models/shared/accountingsupplier.md | 137 +- .../sdk/models/shared/accountingsuppliers.md | 54 +- .../sdk/models/shared/accountingtransfer.md | 81 +- .../sdk/models/shared/accountingtransfers.md | 54 +- .../models/shared/accountingtransferstatus.md | 30 +- .../sdk/models/shared/accountinstitution.md | 34 +- .../sdk/models/shared/accountprototype.md | 72 +- .../accountprototypevaliddatatypelinks.md | 73 +- lending/docs/sdk/models/shared/accountref.md | 36 +- lending/docs/sdk/models/shared/accounts.md | 56 +- .../models/shared/accountspayabletracking.md | 57 +- .../shared/accountsreceivabletracking.md | 58 +- .../docs/sdk/models/shared/accountstatus.md | 32 +- .../models/shared/accounttransactionline.md | 38 +- .../shared/accounttransactionlinerecordref.md | 38 +- ...accounttransactionlinerecordrefdatatype.md | 30 +- lending/docs/sdk/models/shared/accounttype.md | 32 +- .../docs/sdk/models/shared/agedcreditor.md | 49 +- .../models/shared/agedcurrencyoutstanding.md | 40 +- lending/docs/sdk/models/shared/ageddebtor.md | 49 +- .../models/shared/agedoutstandingamount.md | 40 +- .../shared/agedoutstandingamountdetail.md | 32 +- lending/docs/sdk/models/shared/allocation.md | 39 +- lending/docs/sdk/models/shared/attachments.md | 36 +- .../docs/sdk/models/shared/balancesheet.md | 42 +- .../docs/sdk/models/shared/bankaccountref.md | 34 +- .../sdk/models/shared/bankaccountstatus.md | 32 +- .../shared/bankfeedbankaccountmapping.md | 38 +- .../bankfeedbankaccountmappingresponse.md | 44 +- .../docs/sdk/models/shared/bankfeedmapping.md | 71 +- .../docs/sdk/models/shared/bankingaccount.md | 66 +- .../models/shared/bankingaccountbalance.md | 60 +- .../models/shared/bankingaccountbalances.md | 54 +- .../docs/sdk/models/shared/bankingaccounts.md | 54 +- .../sdk/models/shared/bankingtransaction.md | 88 +- .../shared/bankingtransactioncategories.md | 54 +- .../shared/bankingtransactioncategory.md | 62 +- .../models/shared/bankingtransactionref.md | 44 +- .../sdk/models/shared/bankingtransactions.md | 54 +- .../bankstatementuploadconfiguration.md | 36 +- .../sdk/models/shared/banktransactiontype.md | 32 +- .../models/shared/billcreditnotelineitem.md | 63 +- .../sdk/models/shared/billcreditnotestatus.md | 32 +- .../docs/sdk/models/shared/billedtotype.md | 32 +- .../docs/sdk/models/shared/billedtotype1.md | 32 +- .../docs/sdk/models/shared/billlineitem.md | 64 +- .../sdk/models/shared/billlineitemdatatype.md | 30 +- .../docs/sdk/models/shared/billpaymentline.md | 38 +- .../sdk/models/shared/billpaymentlinelink.md | 38 +- .../models/shared/billpaymentlinelinktype.md | 32 +- lending/docs/sdk/models/shared/billstatus.md | 32 +- .../sdk/models/shared/cashflowstatement.md | 42 +- .../sdk/models/shared/cashflowtransaction.md | 103 +- .../models/shared/clientratelimitwebhook.md | 45 +- .../shared/clientratelimitwebhookpayload.md | 36 +- lending/docs/sdk/models/shared/codatfile.md | 32 +- .../docs/sdk/models/shared/commerceaddress.md | 40 +- .../sdk/models/shared/commerceaddresstype.md | 32 +- .../sdk/models/shared/commercecompanyinfo.md | 103 +- .../sdk/models/shared/commercecustomer.md | 54 +- .../sdk/models/shared/commercecustomerref.md | 38 +- .../sdk/models/shared/commercecustomers.md | 54 +- .../docs/sdk/models/shared/commercedispute.md | 94 +- .../sdk/models/shared/commercedisputes.md | 54 +- .../sdk/models/shared/commercelocation.md | 74 +- .../sdk/models/shared/commercelocations.md | 54 +- .../docs/sdk/models/shared/commerceorder.md | 242 +- .../docs/sdk/models/shared/commerceorders.md | 54 +- .../docs/sdk/models/shared/commercepayment.md | 89 +- .../models/shared/commercepaymentmethod.md | 50 +- .../models/shared/commercepaymentmethods.md | 54 +- .../shared/commercepaymentmethodstatus.md | 30 +- .../sdk/models/shared/commercepayments.md | 54 +- .../docs/sdk/models/shared/commerceproduct.md | 84 +- .../shared/commerceproductcategories.md | 54 +- .../models/shared/commerceproductcategory.md | 42 +- .../sdk/models/shared/commerceproducts.md | 54 +- .../sdk/models/shared/commercerecordref.md | 36 +- .../docs/sdk/models/shared/commercereport.md | 120 +- .../models/shared/commercereportcomponent.md | 38 +- .../models/shared/commercereportdimension.md | 34 +- .../shared/commercereportdimensionitems.md | 28 +- .../sdk/models/shared/commercereporterror.md | 32 +- .../models/shared/commercereportmeasure.md | 34 +- .../sdk/models/shared/commercetransaction.md | 91 +- .../sdk/models/shared/commercetransactions.md | 54 +- lending/docs/sdk/models/shared/companies.md | 54 +- lending/docs/sdk/models/shared/company.md | 122 +- .../sdk/models/shared/companyreference.md | 44 +- .../models/shared/companyreferencelinks.md | 32 +- .../sdk/models/shared/companyrequestbody.md | 38 +- .../sdk/models/shared/companyupdaterequest.md | 38 +- lending/docs/sdk/models/shared/connection.md | 95 +- lending/docs/sdk/models/shared/connections.md | 54 +- lending/docs/sdk/models/shared/contact.md | 49 +- lending/docs/sdk/models/shared/contactref.md | 32 +- .../sdk/models/shared/contactrefdatatype.md | 30 +- .../sdk/models/shared/contactreference.md | 34 +- .../shared/createbankaccounttransaction.md | 40 +- .../sdk/models/shared/creditnotelineitem.md | 69 +- .../sdk/models/shared/creditnotestatus.md | 32 +- .../docs/sdk/models/shared/customerstatus.md | 32 +- .../sdk/models/shared/dataconnectionerror.md | 44 +- .../sdk/models/shared/dataconnectionstatus.md | 32 +- .../sdk/models/shared/dataintegrityamounts.md | 40 +- .../models/shared/dataintegritybyamount.md | 40 +- .../sdk/models/shared/dataintegritybycount.md | 36 +- .../shared/dataintegrityconnectionid.md | 30 +- .../models/shared/dataintegritydatatype.md | 28 +- .../sdk/models/shared/dataintegritydates.md | 45 +- .../sdk/models/shared/dataintegritydetail.md | 52 +- .../sdk/models/shared/dataintegritydetails.md | 54 +- .../sdk/models/shared/dataintegritymatch.md | 44 +- .../sdk/models/shared/dataintegritystatus.md | 93 +- .../models/shared/dataintegritystatuses.md | 61 +- .../models/shared/dataintegritystatusinfo.md | 36 +- .../models/shared/dataintegritysummaries.md | 36 +- .../sdk/models/shared/dataintegritysummary.md | 36 +- .../docs/sdk/models/shared/datasetstatus.md | 32 +- lending/docs/sdk/models/shared/datasource.md | 35 +- lending/docs/sdk/models/shared/datastatus.md | 52 +- lending/docs/sdk/models/shared/datatype.md | 32 +- lending/docs/sdk/models/shared/datatypes.md | 32 +- .../sdk/models/shared/directcostlineitem.md | 69 +- .../sdk/models/shared/directcostprototype.md | 77 +- .../sdk/models/shared/directincomelineitem.md | 57 +- .../docs/sdk/models/shared/disputestatus.md | 32 +- .../models/shared/enduploadsessionrequest.md | 28 +- .../shared/enduploadsessionrequeststatus.md | 30 +- .../sdk/models/shared/enhancedcashflowitem.md | 39 +- .../shared/enhancedcashflowtransactions.md | 272 +- .../models/shared/enhancedfinancialreport.md | 171 +- .../shared/enhancedinvoicereportitem.md | 72 +- .../models/shared/enhancedinvoicesreport.md | 70 +- .../shared/enhancedreportaccountcategory.md | 30 +- .../sdk/models/shared/enhancedreportinfo.md | 39 +- lending/docs/sdk/models/shared/errorstatus.md | 32 +- .../docs/sdk/models/shared/errorvalidation.md | 34 +- .../sdk/models/shared/errorvalidationitem.md | 32 +- .../sdk/models/shared/excelreporttypes.md | 32 +- lending/docs/sdk/models/shared/excelstatus.md | 60 +- lending/docs/sdk/models/shared/filet.md | 38 +- lending/docs/sdk/models/shared/fileupload.md | 32 +- lending/docs/sdk/models/shared/halref.md | 28 +- .../docs/sdk/models/shared/integritystatus.md | 32 +- .../docs/sdk/models/shared/invoicelineitem.md | 69 +- .../docs/sdk/models/shared/invoicestatus.md | 44 +- lending/docs/sdk/models/shared/itemref.md | 32 +- .../docs/sdk/models/shared/itemreference.md | 38 +- lending/docs/sdk/models/shared/items.md | 39 +- .../models/shared/journalentryrecordref.md | 38 +- .../shared/journalentryrecordrefdatatype.md | 30 +- lending/docs/sdk/models/shared/journalline.md | 55 +- .../sdk/models/shared/journallinedatatype.md | 30 +- .../sdk/models/shared/journallinetracking.md | 38 +- lending/docs/sdk/models/shared/journalref.md | 36 +- .../docs/sdk/models/shared/journalstatus.md | 32 +- .../sdk/models/shared/lendingcustomerref.md | 30 +- lending/docs/sdk/models/shared/links.md | 41 +- lending/docs/sdk/models/shared/loanref.md | 32 +- lending/docs/sdk/models/shared/loansummary.md | 74 +- .../shared/loansummaryintegrationtype.md | 32 +- .../sdk/models/shared/loansummaryrecordref.md | 36 +- .../models/shared/loansummaryrecordreftype.md | 32 +- .../models/shared/loansummaryreportinfo.md | 36 +- .../models/shared/loansummaryreportitem.md | 44 +- .../sdk/models/shared/loantransactions.md | 84 +- .../shared/loantransactionsreportinfo.md | 42 +- .../sdk/models/shared/loantransactiontype.md | 30 +- lending/docs/sdk/models/shared/locationref.md | 38 +- lending/docs/sdk/models/shared/metadata.md | 28 +- .../models/shared/orderdiscountallocation.md | 36 +- .../docs/sdk/models/shared/orderlineitem.md | 72 +- lending/docs/sdk/models/shared/path.md | 28 +- lending/docs/sdk/models/shared/payment.md | 50 +- .../models/shared/paymentallocationpayment.md | 48 +- lending/docs/sdk/models/shared/paymentline.md | 39 +- .../docs/sdk/models/shared/paymentlinelink.md | 40 +- .../docs/sdk/models/shared/paymentlinktype.md | 52 +- .../sdk/models/shared/paymentmethodref.md | 40 +- lending/docs/sdk/models/shared/paymentref.md | 59 +- .../docs/sdk/models/shared/paymentstatus.md | 32 +- lending/docs/sdk/models/shared/paymenttype.md | 32 +- lending/docs/sdk/models/shared/periodunit.md | 28 +- lending/docs/sdk/models/shared/phonenumber.md | 36 +- .../sdk/models/shared/productinventory.md | 42 +- .../models/shared/productinventorylocation.md | 34 +- .../docs/sdk/models/shared/productprice.md | 34 +- lending/docs/sdk/models/shared/productref.md | 38 +- .../docs/sdk/models/shared/productvariant.md | 86 +- .../sdk/models/shared/productvariantref.md | 38 +- .../sdk/models/shared/productvariantstatus.md | 32 +- .../sdk/models/shared/profitandlossreport.md | 58 +- lending/docs/sdk/models/shared/projectref.md | 34 +- .../sdk/models/shared/propertieaccounttype.md | 30 +- .../sdk/models/shared/propertiedatatype.md | 30 +- .../sdk/models/shared/propertieitemref.md | 36 +- .../docs/sdk/models/shared/pulloperation.md | 78 +- .../docs/sdk/models/shared/pulloperations.md | 54 +- .../models/shared/purchaseorderreference.md | 30 +- .../docs/sdk/models/shared/pushchangetype.md | 32 +- .../sdk/models/shared/pushfieldvalidation.md | 36 +- .../docs/sdk/models/shared/pushoperation.md | 71 +- .../sdk/models/shared/pushoperationchange.md | 36 +- .../sdk/models/shared/pushoperationref.md | 34 +- .../docs/sdk/models/shared/pushoperations.md | 54 +- .../sdk/models/shared/pushoperationstatus.md | 32 +- lending/docs/sdk/models/shared/pushoption.md | 48 +- .../sdk/models/shared/pushoptionchoice.md | 36 +- .../sdk/models/shared/pushoptionproperty.md | 51 +- .../docs/sdk/models/shared/pushoptiontype.md | 32 +- .../sdk/models/shared/pushvalidationinfo.md | 30 +- .../sdk/models/shared/recordlinereference.md | 38 +- lending/docs/sdk/models/shared/reportbasis.md | 32 +- .../models/shared/reportcomponentmeasure.md | 34 +- .../models/shared/reportgenerationpayload.md | 39 +- lending/docs/sdk/models/shared/reportinfo.md | 42 +- lending/docs/sdk/models/shared/reportinput.md | 32 +- lending/docs/sdk/models/shared/reportitem.md | 40 +- lending/docs/sdk/models/shared/reportitems.md | 42 +- lending/docs/sdk/models/shared/reportline.md | 39 +- .../docs/sdk/models/shared/reportoperation.md | 50 +- .../models/shared/reportoperationstatus.md | 30 +- .../sdk/models/shared/reportoperationtype.md | 30 +- lending/docs/sdk/models/shared/reports.md | 50 +- .../models/shared/reportsourcereference.md | 32 +- lending/docs/sdk/models/shared/reporttype.md | 28 +- lending/docs/sdk/models/shared/routinginfo.md | 34 +- .../docs/sdk/models/shared/routinginfotype.md | 30 +- .../sdk/models/shared/salesorderreference.md | 30 +- lending/docs/sdk/models/shared/schema.md | 48 +- lending/docs/sdk/models/shared/security.md | 32 +- .../docs/sdk/models/shared/servicecharge.md | 58 +- .../sdk/models/shared/servicechargetype.md | 32 +- lending/docs/sdk/models/shared/source.md | 30 +- .../docs/sdk/models/shared/sourceaccount.md | 71 +- .../models/shared/sourceaccountprototype.md | 48 +- .../sdk/models/shared/sourceaccountstatus.md | 30 +- .../docs/sdk/models/shared/sourceaccountv2.md | 94 +- .../shared/sourceaccountv2accounttype.md | 30 +- .../models/shared/sourceaccountv2prototype.md | 58 +- .../models/shared/sourceaccountv2status.md | 30 +- lending/docs/sdk/models/shared/sourceref.md | 32 +- lending/docs/sdk/models/shared/sourcetype.md | 32 +- .../shared/startuploadsessionrequest.md | 28 +- .../startuploadsessionrequestdatatype.md | 30 +- lending/docs/sdk/models/shared/status.md | 32 +- .../sdk/models/shared/supplementaldata.md | 36 +- lending/docs/sdk/models/shared/supplierref.md | 36 +- .../docs/sdk/models/shared/supplierstatus.md | 32 +- .../sdk/models/shared/targetaccountoption.md | 36 +- .../models/shared/taxcomponentallocation.md | 37 +- .../docs/sdk/models/shared/taxcomponentref.md | 39 +- lending/docs/sdk/models/shared/taxrateref.md | 56 +- .../sdk/models/shared/taxratereference.md | 56 +- lending/docs/sdk/models/shared/tracking.md | 43 +- .../sdk/models/shared/trackingcategoryref.md | 38 +- .../sdk/models/shared/trackingrecordref.md | 38 +- .../shared/trackingrecordrefdatatype.md | 30 +- .../sdk/models/shared/transactioncategory.md | 32 +- .../models/shared/transactioncategoryref.md | 36 +- .../shared/transactioncategorystatus.md | 32 +- .../docs/sdk/models/shared/transactioncode.md | 32 +- .../sdk/models/shared/transactionsourceref.md | 35 +- .../models/shared/transactionsourcetype.md | 32 +- .../docs/sdk/models/shared/transactiontype.md | 48 +- .../docs/sdk/models/shared/transferaccount.md | 45 +- lending/docs/sdk/models/shared/type.md | 30 +- lending/docs/sdk/models/shared/validation.md | 34 +- .../docs/sdk/models/shared/validationitem.md | 32 +- .../sdk/models/shared/validdatatypelinks.md | 112 +- lending/docs/sdk/models/shared/weblink.md | 40 +- lending/docs/sdk/models/shared/weblinktype.md | 30 +- .../docs/sdk/models/shared/withholdingtax.md | 39 +- lending/docs/sdk/models/shared/zero.md | 38 +- .../docs/sdk/models/shared/zerodatatype.md | 30 +- ...neratesuccessfulreportgenerationwebhook.md | 48 +- lending/docs/sdks/accountbalances/README.md | 294 +- .../docs/sdks/accountingbankdata/README.md | 990 +- lending/docs/sdks/accounts/README.md | 3880 ++-- .../docs/sdks/accounttransactions/README.md | 1218 +- lending/docs/sdks/balancesheet/README.md | 1984 +- lending/docs/sdks/bankaccounts/README.md | 1188 +- lending/docs/sdks/bankstatements/README.md | 1158 +- lending/docs/sdks/banktransactions/README.md | 388 +- lending/docs/sdks/billcreditnotes/README.md | 3050 +-- lending/docs/sdks/billpayments/README.md | 3258 +-- lending/docs/sdks/bills/README.md | 4192 ++-- lending/docs/sdks/cashflow/README.md | 724 +- .../docs/sdks/categorizedstatement/README.md | 174 +- .../docs/sdks/codatlendingaccounts/README.md | 2730 +-- .../codatlendingbankingaccounts/README.md | 568 +- .../docs/sdks/codatlendingcustomers/README.md | 2298 +- .../sdks/codatlendingdirectcosts/README.md | 2564 +-- .../README.md | 1310 +- .../README.md | 2544 ++- .../docs/sdks/codatlendingpayments/README.md | 2082 +- .../docs/sdks/codatlendingreports/README.md | 3558 ++- .../codatlendingsalestransactions/README.md | 1434 +- .../docs/sdks/codatlendingsuppliers/README.md | 1854 +- .../sdks/codatlendingtransactions/README.md | 570 +- .../docs/sdks/codatlendingtransfers/README.md | 1586 +- lending/docs/sdks/companies/README.md | 2098 +- lending/docs/sdks/companyinfo/README.md | 330 +- lending/docs/sdks/connections/README.md | 934 +- lending/docs/sdks/createoperations/README.md | 324 +- lending/docs/sdks/creditnotes/README.md | 3050 +-- lending/docs/sdks/customers/README.md | 4384 ++-- lending/docs/sdks/dataintegrity/README.md | 520 +- lending/docs/sdks/directcosts/README.md | 2802 +-- lending/docs/sdks/directincomes/README.md | 2366 +- lending/docs/sdks/disputes/README.md | 570 +- lending/docs/sdks/excelreports/README.md | 524 +- lending/docs/sdks/fileupload/README.md | 490 +- lending/docs/sdks/financialsummary/README.md | 178 + lending/docs/sdks/invoices/README.md | 4728 ++-- lending/docs/sdks/journalentries/README.md | 2842 +-- lending/docs/sdks/journals/README.md | 1178 +- lending/docs/sdks/liabilities/README.md | 670 +- lending/docs/sdks/locations/README.md | 970 +- lending/docs/sdks/managedata/README.md | 162 +- lending/docs/sdks/managereports/README.md | 414 +- lending/docs/sdks/metrics/README.md | 646 +- lending/docs/sdks/orders/README.md | 2946 +-- lending/docs/sdks/paymentmethods/README.md | 1866 +- lending/docs/sdks/payments/README.md | 3674 ++-- lending/docs/sdks/productcategories/README.md | 354 +- lending/docs/sdks/products/README.md | 2298 +- lending/docs/sdks/profitandloss/README.md | 2094 +- lending/docs/sdks/pulloperations/README.md | 324 +- lending/docs/sdks/refresh/README.md | 330 +- lending/docs/sdks/reports/README.md | 428 +- lending/docs/sdks/sourceaccounts/README.md | 934 +- lending/docs/sdks/suppliers/README.md | 4388 ++-- .../docs/sdks/transactioncategories/README.md | 570 +- lending/docs/sdks/transfers/README.md | 2082 +- lending/docs/types/rfcdate.md | 20 +- lending/files.gen | 1144 - lending/jsr.json | 27 - lending/package.json | 64 +- lending/src/apis/AccountBalances.ts | 112 + lending/src/apis/AccountTransactions.ts | 176 + lending/src/apis/AccountingBankData.ts | 128 + lending/src/apis/Accounts.ts | 176 + lending/src/apis/BalanceSheet.ts | 172 + lending/src/apis/BankAccounts.ts | 162 + lending/src/apis/BankStatements.ts | 601 + lending/src/apis/BankTransactions.ts | 178 + lending/src/apis/BankingAccounts.ts | 176 + lending/src/apis/BillCreditNotes.ts | 160 + lending/src/apis/BillPayments.ts | 160 + lending/src/apis/Bills.ts | 366 + lending/src/apis/CashFlow.ts | 107 + lending/src/apis/CategorizedStatement.ts | 99 + lending/src/apis/Companies.ts | 338 + lending/src/apis/CompanyInfo.ts | 134 + lending/src/apis/Connections.ts | 324 + lending/src/apis/CreateOperations.ts | 160 + lending/src/apis/CreditNotes.ts | 160 + lending/src/apis/Customers.ts | 366 + lending/src/apis/DataIntegrity.ts | 263 + lending/src/apis/DirectCosts.ts | 162 + lending/src/apis/DirectIncomes.ts | 387 + lending/src/apis/Disputes.ts | 176 + lending/src/apis/ExcelReports.ts | 212 + lending/src/apis/FileUpload.ts | 229 + .../src/apis/FinancialStatementsAccounts.ts | 160 + lending/src/apis/FinancialSummary.ts | 159 + lending/src/apis/Invoices.ts | 489 + lending/src/apis/JournalEntries.ts | 160 + lending/src/apis/Journals.ts | 160 + lending/src/apis/Liabilities.ts | 300 + lending/src/apis/LoanWritebackAccounts.ts | 162 + lending/src/apis/LoanWritebackPayments.ts | 162 + lending/src/apis/LoanWritebackSuppliers.ts | 162 + lending/src/apis/Locations.ts | 150 + lending/src/apis/ManageData.ts | 93 + lending/src/apis/ManageReports.ts | 247 + lending/src/apis/Metrics.ts | 383 + lending/src/apis/Orders.ts | 176 + lending/src/apis/PaymentMethods.ts | 176 + lending/src/apis/Payments.ts | 160 + lending/src/apis/ProductCategories.ts | 176 + lending/src/apis/Products.ts | 176 + lending/src/apis/ProfitAndLoss.ts | 165 + lending/src/apis/PullOperations.ts | 160 + lending/src/apis/Refresh.ts | 204 + lending/src/apis/Reports.ts | 255 + lending/src/apis/SalesCustomers.ts | 176 + lending/src/apis/SalesPayments.ts | 176 + lending/src/apis/SalesReports.ts | 267 + lending/src/apis/SalesTransactions.ts | 176 + lending/src/apis/SourceAccounts.ts | 214 + lending/src/apis/Suppliers.ts | 366 + lending/src/apis/TransactionCategories.ts | 176 + lending/src/apis/Transactions.ts | 176 + lending/src/apis/TransactionsDirectCosts.ts | 382 + lending/src/apis/TransactionsTransfers.ts | 176 + lending/src/apis/Transfers.ts | 162 + lending/src/apis/index.ts | 61 + lending/src/core.ts | 15 +- lending/src/funcs/_adapter.ts | 13 + .../funcs/accountingBankDataAccountsGet.ts | 215 +- .../funcs/accountingBankDataAccountsList.ts | 219 +- .../accountingBankDataListTransactions.ts | 224 +- .../accountsPayableBillCreditNotesGet.ts | 212 +- .../accountsPayableBillCreditNotesList.ts | 217 +- .../funcs/accountsPayableBillPaymentsGet.ts | 211 +- .../funcs/accountsPayableBillPaymentsList.ts | 215 +- .../accountsPayableBillsDownloadAttachment.ts | 216 +- lending/src/funcs/accountsPayableBillsGet.ts | 214 +- .../accountsPayableBillsGetAttachment.ts | 214 +- lending/src/funcs/accountsPayableBillsList.ts | 217 +- .../accountsPayableBillsListAttachments.ts | 215 +- ...ountsPayableSuppliersDownloadAttachment.ts | 215 +- .../src/funcs/accountsPayableSuppliersGet.ts | 211 +- .../accountsPayableSuppliersGetAttachment.ts | 216 +- .../src/funcs/accountsPayableSuppliersList.ts | 213 +- ...accountsPayableSuppliersListAttachments.ts | 215 +- .../funcs/accountsReceivableCreditNotesGet.ts | 211 +- .../accountsReceivableCreditNotesList.ts | 215 +- ...tsReceivableCustomersDownloadAttachment.ts | 215 +- .../funcs/accountsReceivableCustomersGet.ts | 211 +- ...ccountsReceivableCustomersGetAttachment.ts | 216 +- .../funcs/accountsReceivableCustomersList.ts | 213 +- ...ountsReceivableCustomersListAttachments.ts | 215 +- ...ceivableDirectIncomesDownloadAttachment.ts | 215 +- .../accountsReceivableDirectIncomesGet.ts | 215 +- ...ntsReceivableDirectIncomesGetAttachment.ts | 220 +- .../accountsReceivableDirectIncomesList.ts | 219 +- ...sReceivableDirectIncomesListAttachments.ts | 214 +- ...ntsReceivableInvoicesDownloadAttachment.ts | 215 +- .../accountsReceivableInvoicesDownloadPdf.ts | 211 +- .../funcs/accountsReceivableInvoicesGet.ts | 215 +- ...accountsReceivableInvoicesGetAttachment.ts | 216 +- .../funcs/accountsReceivableInvoicesList.ts | 224 +- ...countsReceivableInvoicesListAttachments.ts | 215 +- ...ccountsReceivableInvoicesListReconciled.ts | 210 +- .../funcs/accountsReceivablePaymentsGet.ts | 211 +- .../funcs/accountsReceivablePaymentsList.ts | 213 +- ...countsReceivableReportsGetAgedCreditors.ts | 209 +- ...accountsReceivableReportsGetAgedDebtors.ts | 209 +- ...ceivableReportsIsAgedCreditorsAvailable.ts | 202 +- ...ReceivableReportsIsAgedDebtorsAvailable.ts | 202 +- ...tsDownloadCategorizedBankStatementExcel.ts | 17 + .../funcs/bankStatementsEndUploadSession.ts | 218 +- ...GetCategorizedBankStatementTransactions.ts | 17 + .../bankStatementsGetUploadConfiguration.ts | 212 +- ...ntsListCategorizedBankStatementAccounts.ts | 17 + .../bankStatementsSetUploadConfiguration.ts | 215 +- .../funcs/bankStatementsStartUploadSession.ts | 216 +- .../bankStatementsUploadBankStatementData.ts | 219 +- .../src/funcs/bankingAccountBalancesList.ts | 219 +- lending/src/funcs/bankingAccountsGet.ts | 214 +- lending/src/funcs/bankingAccountsList.ts | 219 +- .../funcs/bankingCategorizedStatementGet.ts | 214 +- .../funcs/bankingTransactionCategoriesGet.ts | 218 +- .../funcs/bankingTransactionCategoriesList.ts | 221 +- lending/src/funcs/bankingTransactionsGet.ts | 215 +- lending/src/funcs/bankingTransactionsList.ts | 219 +- lending/src/funcs/companiesCreate.ts | 198 +- lending/src/funcs/companiesDelete.ts | 200 +- lending/src/funcs/companiesGet.ts | 200 +- lending/src/funcs/companiesList.ts | 220 +- lending/src/funcs/companiesReplace.ts | 203 +- lending/src/funcs/companiesUpdate.ts | 204 +- .../funcs/companyInfoGetAccountingProfile.ts | 201 +- .../funcs/companyInfoGetCommerceProfile.ts | 210 +- lending/src/funcs/connectionsCreate.ts | 200 +- lending/src/funcs/connectionsDelete.ts | 204 +- lending/src/funcs/connectionsGet.ts | 203 +- lending/src/funcs/connectionsList.ts | 208 +- lending/src/funcs/connectionsUnlink.ts | 204 +- lending/src/funcs/dataIntegrityDetails.ts | 217 +- lending/src/funcs/dataIntegrityStatus.ts | 211 +- lending/src/funcs/dataIntegritySummaries.ts | 216 +- lending/src/funcs/excelReportsDownload.ts | 212 +- lending/src/funcs/excelReportsGenerate.ts | 221 +- lending/src/funcs/excelReportsGetStatus.ts | 214 +- lending/src/funcs/fileUploadDownload.ts | 205 +- lending/src/funcs/fileUploadListUploaded.ts | 198 +- lending/src/funcs/fileUploadUpload.ts | 250 +- .../funcs/financialStatementsAccountsGet.ts | 211 +- .../funcs/financialStatementsAccountsList.ts | 213 +- .../financialStatementsBalanceSheetGet.ts | 210 +- ...mentsBalanceSheetGetCategorizedAccounts.ts | 212 +- .../funcs/financialStatementsCashFlowGet.ts | 212 +- .../financialStatementsProfitAndLossGet.ts | 210 +- ...entsProfitAndLossGetCategorizedAccounts.ts | 212 +- ...inancialSummaryDownloadCreditModelExcel.ts | 17 + .../financialSummaryGetFinancialSummary.ts | 17 + .../funcs/liabilitiesGenerateLoanSummary.ts | 209 +- .../liabilitiesGenerateLoanTransactions.ts | 212 +- .../src/funcs/liabilitiesGetLoanSummary.ts | 208 +- .../funcs/liabilitiesListLoanTransactions.ts | 212 +- .../src/funcs/loanWritebackAccountsCreate.ts | 219 +- .../loanWritebackAccountsGetCreateModel.ts | 212 +- .../funcs/loanWritebackBankAccountsCreate.ts | 221 +- ...itebackBankAccountsGetCreateUpdateModel.ts | 212 +- .../loanWritebackBankTransactionsCreate.ts | 226 +- ...WritebackBankTransactionsGetCreateModel.ts | 216 +- .../funcs/loanWritebackCreateOperationsGet.ts | 204 +- .../loanWritebackCreateOperationsList.ts | 209 +- .../funcs/loanWritebackDirectCostsCreate.ts | 221 +- .../loanWritebackDirectCostsGetCreateModel.ts | 210 +- .../src/funcs/loanWritebackPaymentsCreate.ts | 219 +- .../loanWritebackPaymentsGetCreateModel.ts | 210 +- .../loanWritebackSourceAccountsCreate.ts | 210 +- ...oanWritebackSourceAccountsCreateMapping.ts | 239 +- ...loanWritebackSourceAccountsListMappings.ts | 211 +- .../src/funcs/loanWritebackSuppliersCreate.ts | 221 +- ...nWritebackSuppliersGetCreateUpdateModel.ts | 212 +- .../src/funcs/loanWritebackTransfersCreate.ts | 221 +- .../loanWritebackTransfersGetCreateModel.ts | 210 +- lending/src/funcs/manageDataGetStatus.ts | 196 +- .../src/funcs/manageDataPullOperationsGet.ts | 203 +- .../src/funcs/manageDataPullOperationsList.ts | 208 +- .../funcs/manageDataRefreshAllDataTypes.ts | 205 +- .../src/funcs/manageDataRefreshDataType.ts | 213 +- .../src/funcs/manageReportsGenerateReport.ts | 208 +- .../src/funcs/manageReportsGetReportStatus.ts | 17 + lending/src/funcs/manageReportsListReports.ts | 208 +- lending/src/funcs/salesCustomersGet.ts | 215 +- lending/src/funcs/salesCustomersList.ts | 219 +- lending/src/funcs/salesDisputesGet.ts | 214 +- lending/src/funcs/salesDisputesList.ts | 219 +- lending/src/funcs/salesLocationsGet.ts | 215 +- lending/src/funcs/salesLocationsList.ts | 211 +- .../funcs/salesMetricsGetCustomerRetention.ts | 245 +- .../src/funcs/salesMetricsGetLifetimeValue.ts | 237 +- lending/src/funcs/salesMetricsGetRevenue.ts | 236 +- lending/src/funcs/salesOrdersGet.ts | 214 +- lending/src/funcs/salesOrdersList.ts | 218 +- lending/src/funcs/salesPaymentMethodsGet.ts | 215 +- lending/src/funcs/salesPaymentMethodsList.ts | 219 +- lending/src/funcs/salesPaymentsGet.ts | 214 +- lending/src/funcs/salesPaymentsList.ts | 219 +- .../src/funcs/salesProductCategoriesGet.ts | 215 +- .../src/funcs/salesProductCategoriesList.ts | 221 +- lending/src/funcs/salesProductsGet.ts | 214 +- lending/src/funcs/salesProductsList.ts | 219 +- lending/src/funcs/salesReportsGetOrders.ts | 236 +- lending/src/funcs/salesReportsGetRefunds.ts | 237 +- lending/src/funcs/salesTransactionsGet.ts | 215 +- lending/src/funcs/salesTransactionsList.ts | 219 +- .../transactionsAccountTransactionsGet.ts | 218 +- .../transactionsAccountTransactionsList.ts | 221 +- ...ansactionsDirectCostsDownloadAttachment.ts | 215 +- .../src/funcs/transactionsDirectCostsGet.ts | 215 +- .../transactionsDirectCostsGetAttachment.ts | 216 +- .../src/funcs/transactionsDirectCostsList.ts | 219 +- .../transactionsDirectCostsListAttachments.ts | 214 +- .../funcs/transactionsJournalEntriesGet.ts | 211 +- .../funcs/transactionsJournalEntriesList.ts | 217 +- lending/src/funcs/transactionsJournalsGet.ts | 211 +- lending/src/funcs/transactionsJournalsList.ts | 213 +- lending/src/funcs/transactionsTransfersGet.ts | 215 +- .../src/funcs/transactionsTransfersList.ts | 219 +- lending/src/funcs/validateWebhook.ts | 130 +- lending/src/hooks/hooks.ts | 175 +- lending/src/hooks/index.ts | 9 +- lending/src/hooks/types.ts | 111 +- lending/src/index.ts | 16 +- lending/src/lib/base64.ts | 37 - lending/src/lib/config.ts | 70 +- lending/src/lib/dlv.ts | 53 - lending/src/lib/encodings.ts | 525 - lending/src/lib/files.ts | 109 +- lending/src/lib/http.ts | 323 - lending/src/lib/is-plain-object.ts | 43 - lending/src/lib/logger.ts | 9 - lending/src/lib/matchers.ts | 346 - lending/src/lib/primitives.ts | 150 - lending/src/lib/retries.ts | 218 - lending/src/lib/schemas.ts | 91 - lending/src/lib/sdkconfig.ts | 473 + lending/src/lib/sdks.ts | 402 - lending/src/lib/security.ts | 274 - lending/src/lib/url.ts | 35 - lending/src/runtime.ts | 518 + lending/src/sdk.ts | 531 + lending/src/sdk/accountbalances.ts | 33 +- lending/src/sdk/accountingbankdata.ts | 39 +- lending/src/sdk/accounts.ts | 55 +- lending/src/sdk/accountspayable.ts | 32 +- lending/src/sdk/accountsreceivable.ts | 44 +- lending/src/sdk/accounttransactions.ts | 55 +- lending/src/sdk/balancesheet.ts | 49 +- lending/src/sdk/bankaccounts.ts | 59 +- lending/src/sdk/banking.ts | 42 +- lending/src/sdk/bankstatements.ts | 117 +- lending/src/sdk/banktransactions.ts | 59 +- lending/src/sdk/billcreditnotes.ts | 55 +- lending/src/sdk/billpayments.ts | 55 +- lending/src/sdk/bills.ts | 123 +- lending/src/sdk/cashflow.ts | 29 +- lending/src/sdk/categorizedstatement.ts | 33 +- lending/src/sdk/codatlendingaccounts.ts | 55 +- .../src/sdk/codatlendingbankingaccounts.ts | 55 +- lending/src/sdk/codatlendingcustomers.ts | 55 +- lending/src/sdk/codatlendingdirectcosts.ts | 59 +- .../sdk/codatlendingloanwritebackaccounts.ts | 59 +- .../sdk/codatlendingloanwritebackpayments.ts | 59 +- lending/src/sdk/codatlendingpayments.ts | 55 +- lending/src/sdk/codatlendingreports.ts | 83 +- .../src/sdk/codatlendingsalestransactions.ts | 55 +- lending/src/sdk/codatlendingsuppliers.ts | 59 +- lending/src/sdk/codatlendingtransactions.ts | 55 +- lending/src/sdk/codatlendingtransfers.ts | 59 +- lending/src/sdk/companies.ts | 153 +- lending/src/sdk/companyinfo.ts | 51 +- lending/src/sdk/connections.ts | 104 +- lending/src/sdk/createoperations.ts | 47 +- lending/src/sdk/creditnotes.ts | 55 +- lending/src/sdk/customers.ts | 115 +- lending/src/sdk/dataintegrity.ts | 78 +- lending/src/sdk/directcosts.ts | 115 +- lending/src/sdk/directincomes.ts | 115 +- lending/src/sdk/disputes.ts | 55 +- lending/src/sdk/excelreports.ts | 86 +- lending/src/sdk/fileupload.ts | 71 +- lending/src/sdk/financialstatements.ts | 32 +- lending/src/sdk/index.ts | 6 +- lending/src/sdk/invoices.ts | 166 +- lending/src/sdk/journalentries.ts | 55 +- lending/src/sdk/journals.ts | 55 +- lending/src/sdk/liabilities.ts | 99 +- lending/src/sdk/loanwriteback.ts | 66 +- lending/src/sdk/locations.ts | 55 +- lending/src/sdk/managedata.ts | 40 +- lending/src/sdk/managereports.ts | 49 +- lending/src/sdk/metrics.ts | 132 +- lending/src/sdk/models/Account.ts | 340 + ...ountingBillPaymentAllOfPaymentMethodRef.ts | 74 + .../AccountingBillPaymentAllOfSupplierRef.ts | 74 + ...ccountingCreateAccountResponseAllOfData.ts | 243 + ...ntingCreateBankAccountResponseAllOfData.ts | 256 + ...CreateBankTransactionsResponseAllOfData.ts | 81 + ...untingCreateDirectCostResponseAllOfData.ts | 298 + ...ccountingCreatePaymentResponseAllOfData.ts | 291 + ...countingCreateSupplierResponseAllOfData.ts | 215 + ...countingCreateTransferResponseAllOfData.ts | 250 + .../AccountingPaymentAllocationAllocation.ts | 227 + .../src/sdk/models/AccountingPaymentMethod.ts | 153 + .../sdk/models/AccountingTrackingCategory.ts | 277 + .../src/sdk/models/BankAccountPrototype.ts | 1016 + .../BillLineItemPurchaseOrderLineRef.ts | 92 + .../CategorizedBankStatementAccounts.ts | 186 + .../CategorizedBankStatementTransactions.ts | 186 + .../src/sdk/models/CommerceTaxComponent.ts | 121 + lending/src/sdk/models/CompanyDetails.ts | 1452 ++ .../src/sdk/models/CreateCompanyRequest.ts | 12 + .../models/CreateSourceAccount200Response.ts | 73 + lending/src/sdk/models/CreatedDate.ts | 1082 + lending/src/sdk/models/DataIntegrityType.ts | 137 + lending/src/sdk/models/DataStatuses.ts | 1453 ++ ...oadCategorizedBankStatementExcelRequest.ts | 8 + .../models/DownloadCreditModelExcelRequest.ts | 8 + lending/src/sdk/models/ErrorMessage.ts | 166 + lending/src/sdk/models/FinancialSummary.ts | 178 + .../models/FinancialSummaryAccountingScore.ts | 89 + .../models/FinancialSummaryBooksClosedDate.ts | 88 + ...gorizedBankStatementTransactionsRequest.ts | 12 + .../sdk/models/GetFinancialSummaryRequest.ts | 7 + .../GetReportStatusReportIdParameter.ts | 46 + .../src/sdk/models/GetReportStatusRequest.ts | 11 + lending/src/sdk/models/JournalPrototype.ts | 533 + ...CategorizedBankStatementAccountsRequest.ts | 12 + lending/src/sdk/models/Model0.ts | 66 + lending/src/sdk/models/Model3.ts | 87 + lending/src/sdk/models/ModelFile.ts | 156 + lending/src/sdk/models/PagingInfo.ts | 6473 ++++++ lending/src/sdk/models/PaymentMethodType.ts | 58 + lending/src/sdk/models/UpdateConnection.ts | 108 + lending/src/sdk/models/_speakeasy_enums.ts | 11744 ++++++++++ lending/src/sdk/models/_speakeasy_hoisted.ts | 33 + .../src/sdk/models/_speakeasy_operations.ts | 6 + .../sdk/models/errors/codatlendingerror.ts | 47 +- lending/src/sdk/models/errors/errormessage.ts | 142 +- .../src/sdk/models/errors/httpclienterrors.ts | 69 +- lending/src/sdk/models/errors/index.ts | 17 +- .../models/errors/responsevalidationerror.ts | 61 +- lending/src/sdk/models/errors/sdkerror.ts | 41 +- .../sdk/models/errors/sdkvalidationerror.ts | 121 +- lending/src/sdk/models/index.ts | 499 + .../sdk/models/operations/createaccount.ts | 62 +- .../models/operations/createbankaccount.ts | 71 +- .../operations/createbankaccountmapping.ts | 58 +- .../operations/createbanktransactions.ts | 85 +- .../sdk/models/operations/createconnection.ts | 77 +- .../operations/createconnectionrequestbody.ts | 83 + .../sdk/models/operations/createdirectcost.ts | 62 +- .../sdk/models/operations/createpayment.ts | 68 +- .../models/operations/createsourceaccount.ts | 123 +- .../createsourceaccountrequestbody.ts | 73 + .../sdk/models/operations/createsupplier.ts | 68 +- .../sdk/models/operations/createtransfer.ts | 68 +- .../sdk/models/operations/deletecompany.ts | 36 +- .../sdk/models/operations/deleteconnection.ts | 43 +- .../downloadaccountingbillattachment.ts | 62 +- .../downloadaccountingcustomerattachment.ts | 63 +- .../downloadaccountingdirectcostattachment.ts | 63 +- ...ownloadaccountingdirectincomeattachment.ts | 63 +- .../downloadaccountinginvoiceattachment.ts | 63 +- .../downloadaccountinginvoicepdf.ts | 45 +- .../downloadaccountingsupplierattachment.ts | 63 +- .../models/operations/downloadexcelreport.ts | 44 +- .../sdk/models/operations/downloadfiles.ts | 43 +- .../endbankstatementuploadsession.ts | 63 +- .../models/operations/generateexcelreport.ts | 44 +- .../models/operations/generateloansummary.ts | 64 +- .../operations/generateloantransactions.ts | 63 +- .../sdk/models/operations/generatereport.ts | 44 +- .../models/operations/getaccountingaccount.ts | 45 +- .../getaccountingaccounttransaction.ts | 53 +- .../getaccountingagedcreditorsreport.ts | 61 +- .../getaccountingageddebtorsreport.ts | 60 +- .../operations/getaccountingbalancesheet.ts | 61 +- .../operations/getaccountingbankaccount.ts | 52 +- .../models/operations/getaccountingbill.ts | 43 +- .../operations/getaccountingbillattachment.ts | 61 +- .../operations/getaccountingbillcreditnote.ts | 45 +- .../operations/getaccountingbillpayment.ts | 45 +- .../getaccountingcashflowstatement.ts | 61 +- .../operations/getaccountingcreditnote.ts | 45 +- .../operations/getaccountingcustomer.ts | 45 +- .../getaccountingcustomerattachment.ts | 62 +- .../operations/getaccountingdirectcost.ts | 52 +- .../getaccountingdirectcostattachment.ts | 62 +- .../operations/getaccountingdirectincome.ts | 52 +- .../getaccountingdirectincomeattachment.ts | 70 +- .../models/operations/getaccountinginvoice.ts | 45 +- .../getaccountinginvoiceattachment.ts | 61 +- .../models/operations/getaccountingjournal.ts | 45 +- .../operations/getaccountingjournalentry.ts | 45 +- .../models/operations/getaccountingpayment.ts | 45 +- .../models/operations/getaccountingprofile.ts | 38 +- .../operations/getaccountingprofitandloss.ts | 61 +- .../operations/getaccountingsupplier.ts | 45 +- .../getaccountingsupplierattachment.ts | 62 +- .../operations/getaccountingtransfer.ts | 52 +- .../operations/getbankaccountmapping.ts | 45 +- .../models/operations/getbankingaccount.ts | 50 +- .../operations/getbankingtransaction.ts | 52 +- .../getbankingtransactioncategory.ts | 52 +- .../getbankstatementuploadconfiguration.ts | 47 +- .../getcategorizedbalancesheetstatement.ts | 54 +- .../operations/getcategorizedbankstatement.ts | 61 +- .../getcategorizedprofitandlossstatement.ts | 54 +- .../models/operations/getcommercecustomer.ts | 50 +- .../getcommercecustomerretentionmetrics.ts | 87 +- .../models/operations/getcommercedispute.ts | 50 +- .../getcommercelifetimevaluemetrics.ts | 86 +- .../models/operations/getcommercelocation.ts | 50 +- .../sdk/models/operations/getcommerceorder.ts | 50 +- .../operations/getcommerceordersreport.ts | 85 +- .../models/operations/getcommercepayment.ts | 50 +- .../operations/getcommercepaymentmethod.ts | 52 +- .../models/operations/getcommerceproduct.ts | 50 +- .../operations/getcommerceproductcategory.ts | 52 +- .../models/operations/getcommerceprofile.ts | 43 +- .../operations/getcommercerefundsreport.ts | 85 +- .../operations/getcommercerevenuemetrics.ts | 85 +- .../operations/getcommercetransaction.ts | 52 +- .../src/sdk/models/operations/getcompany.ts | 36 +- .../sdk/models/operations/getconnection.ts | 43 +- .../getcreatebanktransactionsmodel.ts | 52 +- .../getcreatechartofaccountsmodel.ts | 45 +- .../operations/getcreatedirectcostsmodel.ts | 45 +- .../models/operations/getcreateoperation.ts | 43 +- .../operations/getcreatepaymentmodel.ts | 45 +- .../operations/getcreatetransfersmodel.ts | 45 +- .../getcreateupdatebankaccountsmodel.ts | 46 +- .../getcreateupdatesuppliersmodel.ts | 45 +- .../operations/getdataintegritystatus.ts | 46 +- .../operations/getdataintegritysummaries.ts | 53 +- .../sdk/models/operations/getdatastatus.ts | 298 +- .../getexcelreportgenerationstatus.ts | 46 +- .../sdk/models/operations/getloansummary.ts | 64 +- .../sdk/models/operations/getpulloperation.ts | 43 +- lending/src/sdk/models/operations/index.ts | 313 +- .../isagedcreditorsreportavailable.ts | 38 +- .../isageddebtorsreportavailable.ts | 38 +- .../operations/listaccountingaccounts.ts | 68 +- .../listaccountingaccounttransactions.ts | 76 +- .../operations/listaccountingbankaccounts.ts | 75 +- .../listaccountingbankaccounttransactions.ts | 84 +- .../listaccountingbillattachments.ts | 52 +- .../listaccountingbillcreditnotes.ts | 68 +- .../operations/listaccountingbillpayments.ts | 68 +- .../models/operations/listaccountingbills.ts | 66 +- .../operations/listaccountingcreditnotes.ts | 68 +- .../listaccountingcustomerattachments.ts | 53 +- .../operations/listaccountingcustomers.ts | 68 +- .../listaccountingdirectcostattachments.ts | 54 +- .../operations/listaccountingdirectcosts.ts | 75 +- .../listaccountingdirectincomeattachments.ts | 54 +- .../operations/listaccountingdirectincomes.ts | 75 +- .../listaccountinginvoiceattachments.ts | 53 +- .../operations/listaccountinginvoices.ts | 68 +- .../listaccountingjournalentries.ts | 68 +- .../operations/listaccountingjournals.ts | 68 +- .../operations/listaccountingpayments.ts | 68 +- .../listaccountingsupplierattachments.ts | 53 +- .../operations/listaccountingsuppliers.ts | 68 +- .../operations/listaccountingtransfers.ts | 75 +- .../operations/listbankingaccountbalances.ts | 75 +- .../models/operations/listbankingaccounts.ts | 73 +- .../listbankingtransactioncategories.ts | 76 +- .../operations/listbankingtransactions.ts | 75 +- .../operations/listcommercecustomers.ts | 75 +- .../models/operations/listcommercedisputes.ts | 75 +- .../operations/listcommercelocations.ts | 45 +- .../models/operations/listcommerceorders.ts | 73 +- .../operations/listcommercepaymentmethods.ts | 75 +- .../models/operations/listcommercepayments.ts | 75 +- .../listcommerceproductcategories.ts | 75 +- .../models/operations/listcommerceproducts.ts | 75 +- .../operations/listcommercetransactions.ts | 75 +- .../sdk/models/operations/listcompanies.ts | 66 +- .../sdk/models/operations/listconnections.ts | 66 +- .../models/operations/listcreateoperations.ts | 68 +- .../operations/listdataintegritydetails.ts | 78 +- .../src/sdk/models/operations/listfiles.ts | 36 +- .../models/operations/listloantransactions.ts | 64 +- .../models/operations/listpulloperations.ts | 66 +- .../operations/listreconciledinvoices.ts | 61 +- .../src/sdk/models/operations/listreports.ts | 66 +- .../models/operations/refreshalldatatypes.ts | 36 +- .../sdk/models/operations/refreshdatatype.ts | 51 +- .../sdk/models/operations/replacecompany.ts | 46 +- .../setbankstatementuploadconfiguration.ts | 62 +- .../startbankstatementuploadsession.ts | 59 +- .../sdk/models/operations/unlinkconnection.ts | 85 +- .../sdk/models/operations/updatecompany.ts | 49 +- .../operations/uploadbankstatementdata.ts | 122 +- .../uploadbankstatementdatarequestbody.ts | 73 + .../src/sdk/models/operations/uploadfiles.ts | 61 +- .../src/sdk/models/shared/accountbalance.ts | 242 +- .../models/shared/accountbalanceamounts.ts | 351 +- .../shared/accountcategoriesupdatedwebhook.ts | 259 +- .../accountcategoriesupdatedwebhookdata.ts | 134 +- .../sdk/models/shared/accountcategorylevel.ts | 105 +- .../sdk/models/shared/accountidentifiers.ts | 633 +- .../models/shared/accountidentifiertype.ts | 76 +- lending/src/sdk/models/shared/accountinfo.ts | 279 +- .../sdk/models/shared/accountingaccount.ts | 1440 +- .../sdk/models/shared/accountingaccounts.ts | 232 +- .../shared/accountingaccounttransaction.ts | 1190 +- .../shared/accountingaccounttransactions.ts | 233 +- .../sdk/models/shared/accountingaddress.ts | 712 +- .../models/shared/accountingaddresstype.ts | 66 +- .../shared/accountingagedcreditorreport.ts | 559 +- .../shared/accountingageddebtorreport.ts | 561 +- .../sdk/models/shared/accountingattachment.ts | 2454 ++- .../models/shared/accountingbalancesheet.ts | 374 +- .../models/shared/accountingbankaccount.ts | 1974 +- .../models/shared/accountingbankaccounts.ts | 232 +- .../shared/accountingbankaccounttype.ts | 78 +- .../shared/accountingbanktransaction.ts | 1225 +- .../shared/accountingbanktransactions.ts | 365 +- .../src/sdk/models/shared/accountingbill.ts | 1459 +- .../models/shared/accountingbillcreditnote.ts | 1764 +- .../shared/accountingbillcreditnotes.ts | 233 +- .../models/shared/accountingbillpayment.ts | 1201 +- .../models/shared/accountingbillpayments.ts | 232 +- .../src/sdk/models/shared/accountingbills.ts | 232 +- .../shared/accountingcashflowstatement.ts | 442 +- .../models/shared/accountingcompanyinfo.ts | 1270 +- .../shared/accountingcreateaccountresponse.ts | 916 +- .../accountingcreatebankaccountresponse.ts | 856 +- .../accountingcreatebanktransactions.ts | 312 +- ...ccountingcreatebanktransactionsresponse.ts | 1228 +- .../accountingcreatedirectcostresponse.ts | 874 +- .../shared/accountingcreatepaymentresponse.ts | 1504 +- .../accountingcreatesupplierresponse.ts | 795 +- .../accountingcreatetransferresponse.ts | 820 +- .../sdk/models/shared/accountingcreditnote.ts | 1793 +- .../models/shared/accountingcreditnotes.ts | 232 +- .../sdk/models/shared/accountingcustomer.ts | 912 +- .../models/shared/accountingcustomerref.ts | 399 +- .../sdk/models/shared/accountingcustomers.ts | 232 +- .../sdk/models/shared/accountingdirectcost.ts | 1810 +- .../models/shared/accountingdirectcosts.ts | 232 +- .../models/shared/accountingdirectincome.ts | 1304 +- .../models/shared/accountingdirectincomes.ts | 232 +- .../sdk/models/shared/accountinginvoice.ts | 2072 +- .../sdk/models/shared/accountinginvoices.ts | 232 +- .../sdk/models/shared/accountingjournal.ts | 820 +- .../models/shared/accountingjournalentries.ts | 232 +- .../models/shared/accountingjournalentry.ts | 1126 +- .../sdk/models/shared/accountingjournals.ts | 232 +- .../sdk/models/shared/accountingpayment.ts | 2460 ++- .../shared/accountingpaymentallocation.ts | 575 +- .../sdk/models/shared/accountingpayments.ts | 232 +- .../shared/accountingprofitandlossreport.ts | 393 +- .../sdk/models/shared/accountingrecordref.ts | 536 +- .../sdk/models/shared/accountingsupplier.ts | 1575 +- .../sdk/models/shared/accountingsuppliers.ts | 364 +- .../sdk/models/shared/accountingtransfer.ts | 1677 +- .../sdk/models/shared/accountingtransfers.ts | 232 +- .../sdk/models/shared/accountinstitution.ts | 232 +- .../src/sdk/models/shared/accountprototype.ts | 1430 +- lending/src/sdk/models/shared/accountref.ts | 436 +- lending/src/sdk/models/shared/accounts.ts | 206 +- .../models/shared/accountspayabletracking.ts | 237 +- .../shared/accountsreceivabletracking.ts | 271 +- .../src/sdk/models/shared/accountstatus.ts | 68 +- .../models/shared/accounttransactionline.ts | 194 +- .../shared/accounttransactionlinerecordref.ts | 154 +- lending/src/sdk/models/shared/accounttype.ts | 29 - lending/src/sdk/models/shared/agedcreditor.ts | 214 +- .../models/shared/agedcurrencyoutstanding.ts | 173 +- lending/src/sdk/models/shared/ageddebtor.ts | 214 +- .../models/shared/agedoutstandingamount.ts | 336 +- .../shared/agedoutstandingamountdetail.ts | 108 +- lending/src/sdk/models/shared/attachments.ts | 210 +- lending/src/sdk/models/shared/balancesheet.ts | 331 +- .../src/sdk/models/shared/bankaccountref.ts | 163 +- .../sdk/models/shared/bankaccountstatus.ts | 68 +- .../shared/bankfeedbankaccountmapping.ts | 353 +- .../bankfeedbankaccountmappingresponse.ts | 304 +- .../src/sdk/models/shared/bankfeedmapping.ts | 443 +- .../src/sdk/models/shared/bankingaccount.ts | 1651 +- .../models/shared/bankingaccountbalance.ts | 396 +- .../models/shared/bankingaccountbalances.ts | 232 +- .../src/sdk/models/shared/bankingaccounts.ts | 364 +- .../sdk/models/shared/bankingtransaction.ts | 1136 +- .../shared/bankingtransactioncategories.ts | 233 +- .../shared/bankingtransactioncategory.ts | 487 +- .../models/shared/bankingtransactionref.ts | 203 +- .../sdk/models/shared/bankingtransactions.ts | 292 +- .../bankstatementuploadconfiguration.ts | 453 +- .../sdk/models/shared/banktransactiontype.ts | 92 +- .../models/shared/billcreditnotelineitem.ts | 683 +- .../sdk/models/shared/billcreditnotestatus.ts | 66 +- lending/src/sdk/models/shared/billedtotype.ts | 61 +- .../src/sdk/models/shared/billedtotype1.ts | 60 +- lending/src/sdk/models/shared/billlineitem.ts | 727 +- .../src/sdk/models/shared/billpaymentline.ts | 276 +- .../sdk/models/shared/billpaymentlinelink.ts | 213 +- .../models/shared/billpaymentlinelinktype.ts | 78 +- lending/src/sdk/models/shared/billstatus.ts | 65 +- .../sdk/models/shared/cashflowstatement.ts | 390 +- .../sdk/models/shared/cashflowtransaction.ts | 569 + .../models/shared/clientratelimitwebhook.ts | 193 +- .../shared/clientratelimitwebhookpayload.ts | 210 +- lending/src/sdk/models/shared/codatfile.ts | 38 +- .../src/sdk/models/shared/commerceaddress.ts | 678 +- .../sdk/models/shared/commerceaddresstype.ts | 64 +- .../sdk/models/shared/commercecompanyinfo.ts | 1052 +- .../src/sdk/models/shared/commercecustomer.ts | 740 +- .../sdk/models/shared/commercecustomerref.ts | 164 +- .../sdk/models/shared/commercecustomers.ts | 232 +- .../src/sdk/models/shared/commercedispute.ts | 929 +- .../src/sdk/models/shared/commercedisputes.ts | 232 +- .../src/sdk/models/shared/commercelocation.ts | 395 +- .../sdk/models/shared/commercelocations.ts | 232 +- .../src/sdk/models/shared/commerceorder.ts | 1312 +- .../src/sdk/models/shared/commerceorders.ts | 231 +- .../src/sdk/models/shared/commercepayment.ts | 979 +- .../models/shared/commercepaymentmethod.ts | 412 +- .../models/shared/commercepaymentmethods.ts | 232 +- .../src/sdk/models/shared/commercepayments.ts | 232 +- .../src/sdk/models/shared/commerceproduct.ts | 426 +- .../shared/commerceproductcategories.ts | 233 +- .../models/shared/commerceproductcategory.ts | 436 +- .../src/sdk/models/shared/commerceproducts.ts | 232 +- .../sdk/models/shared/commercerecordref.ts | 423 +- .../src/sdk/models/shared/commercereport.ts | 529 +- .../models/shared/commercereportcomponent.ts | 592 +- .../models/shared/commercereportdimension.ts | 461 +- .../shared/commercereportdimensionitems.ts | 65 + .../sdk/models/shared/commercereporterror.ts | 350 +- .../models/shared/commercereportmeasure.ts | 429 +- .../sdk/models/shared/commercetransaction.ts | 998 +- .../sdk/models/shared/commercetransactions.ts | 232 +- lending/src/sdk/models/shared/companies.ts | 231 +- lending/src/sdk/models/shared/company.ts | 1545 +- .../src/sdk/models/shared/companyreference.ts | 554 +- .../models/shared/companyreferencelinks.ts | 146 + .../sdk/models/shared/companyrequestbody.ts | 248 +- .../sdk/models/shared/companyupdaterequest.ts | 184 +- lending/src/sdk/models/shared/connection.ts | 2393 +- lending/src/sdk/models/shared/connections.ts | 231 +- lending/src/sdk/models/shared/contact.ts | 383 +- lending/src/sdk/models/shared/contactref.ts | 417 +- .../src/sdk/models/shared/contactreference.ts | 371 + .../shared/createbankaccounttransaction.ts | 411 +- .../sdk/models/shared/creditnotelineitem.ts | 583 +- .../src/sdk/models/shared/creditnotestatus.ts | 66 +- .../src/sdk/models/shared/customerstatus.ts | 60 +- .../sdk/models/shared/dataconnectionerror.ts | 772 +- .../sdk/models/shared/dataconnectionstatus.ts | 68 +- .../sdk/models/shared/dataintegrityamounts.ts | 186 +- .../models/shared/dataintegritybyamount.ts | 239 +- .../sdk/models/shared/dataintegritybycount.ts | 188 +- .../shared/dataintegrityconnectionid.ts | 136 +- .../models/shared/dataintegritydatatype.ts | 19 - .../sdk/models/shared/dataintegritydates.ts | 467 +- .../sdk/models/shared/dataintegritydetail.ts | 461 +- .../sdk/models/shared/dataintegritydetails.ts | 232 +- .../sdk/models/shared/dataintegritymatch.ts | 230 +- .../sdk/models/shared/dataintegritystatus.ts | 269 +- .../models/shared/dataintegritystatuses.ts | 118 +- .../models/shared/dataintegritystatusinfo.ts | 239 +- .../models/shared/dataintegritysummaries.ts | 118 +- .../sdk/models/shared/dataintegritysummary.ts | 195 +- lending/src/sdk/models/shared/datasource.ts | 129 +- lending/src/sdk/models/shared/datastatus.ts | 423 +- lending/src/sdk/models/shared/datatype.ts | 158 +- .../sdk/models/shared/directcostlineitem.ts | 729 +- .../sdk/models/shared/directcostprototype.ts | 1981 +- .../sdk/models/shared/directincomelineitem.ts | 536 +- .../src/sdk/models/shared/disputestatus.ts | 76 +- .../models/shared/enduploadsessionrequest.ts | 131 +- .../sdk/models/shared/enhancedcashflowitem.ts | 242 +- .../shared/enhancedcashflowtransactions.ts | 180 +- .../models/shared/enhancedfinancialreport.ts | 334 +- .../shared/enhancedinvoicereportitem.ts | 870 +- .../models/shared/enhancedinvoicesreport.ts | 147 +- .../shared/enhancedreportaccountcategory.ts | 143 +- .../sdk/models/shared/enhancedreportinfo.ts | 482 +- .../src/sdk/models/shared/errorvalidation.ts | 120 +- .../sdk/models/shared/errorvalidationitem.ts | 140 +- .../src/sdk/models/shared/excelreporttypes.ts | 68 +- lending/src/sdk/models/shared/excelstatus.ts | 502 +- lending/src/sdk/models/shared/file.ts | 64 - lending/src/sdk/models/shared/fileupload.ts | 38 +- lending/src/sdk/models/shared/halref.ts | 1177 +- lending/src/sdk/models/shared/index.ts | 637 +- .../src/sdk/models/shared/integritystatus.ts | 62 +- .../src/sdk/models/shared/invoicelineitem.ts | 581 +- .../src/sdk/models/shared/invoicestatus.ts | 78 +- lending/src/sdk/models/shared/itemref.ts | 137 +- .../src/sdk/models/shared/itemreference.ts | 194 + lending/src/sdk/models/shared/items.ts | 242 +- .../models/shared/journalentryrecordref.ts | 199 +- lending/src/sdk/models/shared/journalline.ts | 405 +- .../sdk/models/shared/journallinetracking.ts | 82 + lending/src/sdk/models/shared/journalref.ts | 171 +- .../src/sdk/models/shared/journalstatus.ts | 60 +- .../sdk/models/shared/lendingcustomerref.ts | 121 +- lending/src/sdk/models/shared/links.ts | 3366 ++- lending/src/sdk/models/shared/loanref.ts | 137 +- lending/src/sdk/models/shared/loansummary.ts | 152 +- .../shared/loansummaryintegrationtype.ts | 64 +- .../sdk/models/shared/loansummaryrecordref.ts | 180 +- .../models/shared/loansummaryrecordreftype.ts | 68 +- .../models/shared/loansummaryreportinfo.ts | 272 +- .../models/shared/loansummaryreportitem.ts | 399 +- .../src/sdk/models/shared/loantransactions.ts | 151 +- .../shared/loantransactionsreportinfo.ts | 359 +- lending/src/sdk/models/shared/locationref.ts | 164 +- lending/src/sdk/models/shared/metadata.ts | 874 +- .../models/shared/orderdiscountallocation.ts | 108 +- .../src/sdk/models/shared/orderlineitem.ts | 441 +- lending/src/sdk/models/shared/path.ts | 16 - lending/src/sdk/models/shared/payment.ts | 286 +- .../models/shared/paymentallocationpayment.ts | 1092 +- lending/src/sdk/models/shared/paymentline.ts | 335 +- .../src/sdk/models/shared/paymentlinelink.ts | 255 +- .../src/sdk/models/shared/paymentlinktype.ts | 116 +- .../src/sdk/models/shared/paymentmethodref.ts | 606 +- lending/src/sdk/models/shared/paymentref.ts | 677 +- .../src/sdk/models/shared/paymentstatus.ts | 66 +- lending/src/sdk/models/shared/paymenttype.ts | 77 +- lending/src/sdk/models/shared/periodunit.ts | 18 - lending/src/sdk/models/shared/phonenumber.ts | 401 +- .../src/sdk/models/shared/productinventory.ts | 126 +- .../models/shared/productinventorylocation.ts | 117 +- lending/src/sdk/models/shared/productprice.ts | 122 +- lending/src/sdk/models/shared/productref.ts | 119 +- .../src/sdk/models/shared/productvariant.ts | 689 +- .../sdk/models/shared/productvariantref.ts | 119 +- .../sdk/models/shared/productvariantstatus.ts | 60 +- .../sdk/models/shared/profitandlossreport.ts | 610 +- lending/src/sdk/models/shared/projectref.ts | 227 +- .../sdk/models/shared/propertieaccounttype.ts | 26 - .../sdk/models/shared/propertiedatatype.ts | 64 - .../src/sdk/models/shared/propertieitemref.ts | 64 - .../src/sdk/models/shared/pulloperation.ts | 1377 +- .../src/sdk/models/shared/pulloperations.ts | 231 +- .../models/shared/purchaseorderreference.ts | 124 + .../src/sdk/models/shared/pushchangetype.ts | 64 +- .../sdk/models/shared/pushfieldvalidation.ts | 145 +- .../src/sdk/models/shared/pushoperation.ts | 3616 ++- .../sdk/models/shared/pushoperationchange.ts | 662 +- .../src/sdk/models/shared/pushoperationref.ts | 328 +- .../src/sdk/models/shared/pushoperations.ts | 231 +- .../sdk/models/shared/pushoperationstatus.ts | 62 +- lending/src/sdk/models/shared/pushoption.ts | 834 +- .../src/sdk/models/shared/pushoptionchoice.ts | 652 +- .../sdk/models/shared/pushoptionproperty.ts | 192 +- .../src/sdk/models/shared/pushoptiontype.ts | 70 +- .../sdk/models/shared/pushvalidationinfo.ts | 354 +- .../sdk/models/shared/recordlinereference.ts | 158 + lending/src/sdk/models/shared/reportbasis.ts | 61 +- .../models/shared/reportcomponentmeasure.ts | 121 +- .../models/shared/reportgenerationpayload.ts | 65 +- lending/src/sdk/models/shared/reportinfo.ts | 389 +- lending/src/sdk/models/shared/reportinput.ts | 59 +- lending/src/sdk/models/shared/reportitem.ts | 430 + lending/src/sdk/models/shared/reportitems.ts | 392 +- lending/src/sdk/models/shared/reportline.ts | 378 +- .../src/sdk/models/shared/reportoperation.ts | 1322 +- lending/src/sdk/models/shared/reports.ts | 229 +- .../models/shared/reportsourcereference.ts | 92 + lending/src/sdk/models/shared/reporttype.ts | 16 - lending/src/sdk/models/shared/routinginfo.ts | 219 +- .../sdk/models/shared/salesorderreference.ts | 129 + lending/src/sdk/models/shared/schema.ts | 92 +- lending/src/sdk/models/shared/security.ts | 32 - .../src/sdk/models/shared/servicecharge.ts | 323 +- .../sdk/models/shared/servicechargetype.ts | 62 +- .../src/sdk/models/shared/sourceaccount.ts | 1069 +- .../models/shared/sourceaccountprototype.ts | 315 +- .../src/sdk/models/shared/sourceaccountv2.ts | 678 +- .../models/shared/sourceaccountv2prototype.ts | 381 +- lending/src/sdk/models/shared/sourceref.ts | 117 +- .../shared/startuploadsessionrequest.ts | 159 +- lending/src/sdk/models/shared/status.ts | 95 +- .../src/sdk/models/shared/supplementaldata.ts | 968 +- lending/src/sdk/models/shared/supplierref.ts | 284 +- .../src/sdk/models/shared/supplierstatus.ts | 66 +- .../sdk/models/shared/targetaccountoption.ts | 180 +- .../models/shared/taxcomponentallocation.ts | 118 +- .../src/sdk/models/shared/taxcomponentref.ts | 105 +- lending/src/sdk/models/shared/taxrateref.ts | 243 +- .../src/sdk/models/shared/taxratereference.ts | 217 + lending/src/sdk/models/shared/tracking.ts | 262 +- .../sdk/models/shared/trackingcategoryref.ts | 225 +- .../sdk/models/shared/trackingrecordref.ts | 160 +- .../sdk/models/shared/transactioncategory.ts | 163 +- .../models/shared/transactioncategoryref.ts | 193 +- .../shared/transactioncategorystatus.ts | 64 +- .../src/sdk/models/shared/transactioncode.ts | 92 +- .../sdk/models/shared/transactionsourceref.ts | 225 +- .../models/shared/transactionsourcetype.ts | 67 +- .../src/sdk/models/shared/transactiontype.ts | 102 +- .../src/sdk/models/shared/transferaccount.ts | 357 +- lending/src/sdk/models/shared/validation.ts | 495 +- .../src/sdk/models/shared/validationitem.ts | 320 +- .../sdk/models/shared/validdatatypelinks.ts | 172 + lending/src/sdk/models/shared/weblink.ts | 393 +- .../src/sdk/models/shared/withholdingtax.ts | 121 + lending/src/sdk/models/shared/zero.ts | 65 - ...nerateSuccessfulReportGenerationWebhook.ts | 11 + lending/src/sdk/models/webhooks/index.ts | 8 +- .../reportscreditmodelgeneratesuccessful.ts | 101 - lending/src/sdk/orders.ts | 55 +- lending/src/sdk/paymentmethods.ts | 55 +- lending/src/sdk/payments.ts | 55 +- lending/src/sdk/productcategories.ts | 55 +- lending/src/sdk/products.ts | 55 +- lending/src/sdk/profitandloss.ts | 49 +- lending/src/sdk/pulloperations.ts | 47 +- lending/src/sdk/refresh.ts | 53 +- lending/src/sdk/reports.ts | 88 +- lending/src/sdk/sales.ts | 76 +- lending/src/sdk/sdk.ts | 144 +- lending/src/sdk/sourceaccounts.ts | 103 +- lending/src/sdk/suppliers.ts | 115 +- lending/src/sdk/transactioncategories.ts | 55 +- lending/src/sdk/transactions.ts | 40 +- lending/src/sdk/transfers.ts | 55 +- lending/src/sdk/types/async.ts | 99 +- lending/src/sdk/types/blobs.ts | 32 - lending/src/sdk/types/constdatetime.ts | 15 - lending/src/sdk/types/decimal.ts | 6 +- lending/src/sdk/types/enums.ts | 45 - lending/src/sdk/types/fp.ts | 51 +- lending/src/sdk/types/index.ts | 19 +- lending/src/sdk/types/operations.ts | 7 +- lending/src/sdk/types/rfcdate.ts | 56 +- lending/src/sdk/types/streams.ts | 21 - lending/src/sdk/types/unrecognized.ts | 35 - lending/src/sdk/types/webhooks.ts | 7 - lending/tsconfig.esm.json | 8 + lending/tsconfig.json | 48 +- 1415 files changed, 221336 insertions(+), 153527 deletions(-) delete mode 100755 lending/.speakeasy/gen.lock delete mode 100644 lending/.speakeasy/gen.yaml create mode 100644 lending/docs/sdks/financialsummary/README.md delete mode 100755 lending/files.gen delete mode 100644 lending/jsr.json create mode 100644 lending/src/apis/AccountBalances.ts create mode 100644 lending/src/apis/AccountTransactions.ts create mode 100644 lending/src/apis/AccountingBankData.ts create mode 100644 lending/src/apis/Accounts.ts create mode 100644 lending/src/apis/BalanceSheet.ts create mode 100644 lending/src/apis/BankAccounts.ts create mode 100644 lending/src/apis/BankStatements.ts create mode 100644 lending/src/apis/BankTransactions.ts create mode 100644 lending/src/apis/BankingAccounts.ts create mode 100644 lending/src/apis/BillCreditNotes.ts create mode 100644 lending/src/apis/BillPayments.ts create mode 100644 lending/src/apis/Bills.ts create mode 100644 lending/src/apis/CashFlow.ts create mode 100644 lending/src/apis/CategorizedStatement.ts create mode 100644 lending/src/apis/Companies.ts create mode 100644 lending/src/apis/CompanyInfo.ts create mode 100644 lending/src/apis/Connections.ts create mode 100644 lending/src/apis/CreateOperations.ts create mode 100644 lending/src/apis/CreditNotes.ts create mode 100644 lending/src/apis/Customers.ts create mode 100644 lending/src/apis/DataIntegrity.ts create mode 100644 lending/src/apis/DirectCosts.ts create mode 100644 lending/src/apis/DirectIncomes.ts create mode 100644 lending/src/apis/Disputes.ts create mode 100644 lending/src/apis/ExcelReports.ts create mode 100644 lending/src/apis/FileUpload.ts create mode 100644 lending/src/apis/FinancialStatementsAccounts.ts create mode 100644 lending/src/apis/FinancialSummary.ts create mode 100644 lending/src/apis/Invoices.ts create mode 100644 lending/src/apis/JournalEntries.ts create mode 100644 lending/src/apis/Journals.ts create mode 100644 lending/src/apis/Liabilities.ts create mode 100644 lending/src/apis/LoanWritebackAccounts.ts create mode 100644 lending/src/apis/LoanWritebackPayments.ts create mode 100644 lending/src/apis/LoanWritebackSuppliers.ts create mode 100644 lending/src/apis/Locations.ts create mode 100644 lending/src/apis/ManageData.ts create mode 100644 lending/src/apis/ManageReports.ts create mode 100644 lending/src/apis/Metrics.ts create mode 100644 lending/src/apis/Orders.ts create mode 100644 lending/src/apis/PaymentMethods.ts create mode 100644 lending/src/apis/Payments.ts create mode 100644 lending/src/apis/ProductCategories.ts create mode 100644 lending/src/apis/Products.ts create mode 100644 lending/src/apis/ProfitAndLoss.ts create mode 100644 lending/src/apis/PullOperations.ts create mode 100644 lending/src/apis/Refresh.ts create mode 100644 lending/src/apis/Reports.ts create mode 100644 lending/src/apis/SalesCustomers.ts create mode 100644 lending/src/apis/SalesPayments.ts create mode 100644 lending/src/apis/SalesReports.ts create mode 100644 lending/src/apis/SalesTransactions.ts create mode 100644 lending/src/apis/SourceAccounts.ts create mode 100644 lending/src/apis/Suppliers.ts create mode 100644 lending/src/apis/TransactionCategories.ts create mode 100644 lending/src/apis/Transactions.ts create mode 100644 lending/src/apis/TransactionsDirectCosts.ts create mode 100644 lending/src/apis/TransactionsTransfers.ts create mode 100644 lending/src/apis/Transfers.ts create mode 100644 lending/src/apis/index.ts create mode 100644 lending/src/funcs/_adapter.ts create mode 100644 lending/src/funcs/bankStatementsDownloadCategorizedBankStatementExcel.ts create mode 100644 lending/src/funcs/bankStatementsGetCategorizedBankStatementTransactions.ts create mode 100644 lending/src/funcs/bankStatementsListCategorizedBankStatementAccounts.ts create mode 100644 lending/src/funcs/financialSummaryDownloadCreditModelExcel.ts create mode 100644 lending/src/funcs/financialSummaryGetFinancialSummary.ts create mode 100644 lending/src/funcs/manageReportsGetReportStatus.ts delete mode 100644 lending/src/lib/base64.ts delete mode 100644 lending/src/lib/dlv.ts delete mode 100644 lending/src/lib/encodings.ts delete mode 100644 lending/src/lib/http.ts delete mode 100644 lending/src/lib/is-plain-object.ts delete mode 100644 lending/src/lib/logger.ts delete mode 100644 lending/src/lib/matchers.ts delete mode 100644 lending/src/lib/primitives.ts delete mode 100644 lending/src/lib/retries.ts delete mode 100644 lending/src/lib/schemas.ts create mode 100644 lending/src/lib/sdkconfig.ts delete mode 100644 lending/src/lib/sdks.ts delete mode 100644 lending/src/lib/security.ts delete mode 100644 lending/src/lib/url.ts create mode 100644 lending/src/runtime.ts create mode 100644 lending/src/sdk.ts create mode 100644 lending/src/sdk/models/Account.ts create mode 100644 lending/src/sdk/models/AccountingBillPaymentAllOfPaymentMethodRef.ts create mode 100644 lending/src/sdk/models/AccountingBillPaymentAllOfSupplierRef.ts create mode 100644 lending/src/sdk/models/AccountingCreateAccountResponseAllOfData.ts create mode 100644 lending/src/sdk/models/AccountingCreateBankAccountResponseAllOfData.ts create mode 100644 lending/src/sdk/models/AccountingCreateBankTransactionsResponseAllOfData.ts create mode 100644 lending/src/sdk/models/AccountingCreateDirectCostResponseAllOfData.ts create mode 100644 lending/src/sdk/models/AccountingCreatePaymentResponseAllOfData.ts create mode 100644 lending/src/sdk/models/AccountingCreateSupplierResponseAllOfData.ts create mode 100644 lending/src/sdk/models/AccountingCreateTransferResponseAllOfData.ts create mode 100644 lending/src/sdk/models/AccountingPaymentAllocationAllocation.ts create mode 100644 lending/src/sdk/models/AccountingPaymentMethod.ts create mode 100644 lending/src/sdk/models/AccountingTrackingCategory.ts create mode 100644 lending/src/sdk/models/BankAccountPrototype.ts create mode 100644 lending/src/sdk/models/BillLineItemPurchaseOrderLineRef.ts create mode 100644 lending/src/sdk/models/CategorizedBankStatementAccounts.ts create mode 100644 lending/src/sdk/models/CategorizedBankStatementTransactions.ts create mode 100644 lending/src/sdk/models/CommerceTaxComponent.ts create mode 100644 lending/src/sdk/models/CompanyDetails.ts create mode 100644 lending/src/sdk/models/CreateCompanyRequest.ts create mode 100644 lending/src/sdk/models/CreateSourceAccount200Response.ts create mode 100644 lending/src/sdk/models/CreatedDate.ts create mode 100644 lending/src/sdk/models/DataIntegrityType.ts create mode 100644 lending/src/sdk/models/DataStatuses.ts create mode 100644 lending/src/sdk/models/DownloadCategorizedBankStatementExcelRequest.ts create mode 100644 lending/src/sdk/models/DownloadCreditModelExcelRequest.ts create mode 100644 lending/src/sdk/models/ErrorMessage.ts create mode 100644 lending/src/sdk/models/FinancialSummary.ts create mode 100644 lending/src/sdk/models/FinancialSummaryAccountingScore.ts create mode 100644 lending/src/sdk/models/FinancialSummaryBooksClosedDate.ts create mode 100644 lending/src/sdk/models/GetCategorizedBankStatementTransactionsRequest.ts create mode 100644 lending/src/sdk/models/GetFinancialSummaryRequest.ts create mode 100644 lending/src/sdk/models/GetReportStatusReportIdParameter.ts create mode 100644 lending/src/sdk/models/GetReportStatusRequest.ts create mode 100644 lending/src/sdk/models/JournalPrototype.ts create mode 100644 lending/src/sdk/models/ListCategorizedBankStatementAccountsRequest.ts create mode 100644 lending/src/sdk/models/Model0.ts create mode 100644 lending/src/sdk/models/Model3.ts create mode 100644 lending/src/sdk/models/ModelFile.ts create mode 100644 lending/src/sdk/models/PagingInfo.ts create mode 100644 lending/src/sdk/models/PaymentMethodType.ts create mode 100644 lending/src/sdk/models/UpdateConnection.ts create mode 100644 lending/src/sdk/models/_speakeasy_enums.ts create mode 100644 lending/src/sdk/models/_speakeasy_hoisted.ts create mode 100644 lending/src/sdk/models/_speakeasy_operations.ts create mode 100644 lending/src/sdk/models/index.ts create mode 100644 lending/src/sdk/models/operations/createconnectionrequestbody.ts create mode 100644 lending/src/sdk/models/operations/createsourceaccountrequestbody.ts create mode 100644 lending/src/sdk/models/operations/uploadbankstatementdatarequestbody.ts delete mode 100644 lending/src/sdk/models/shared/accounttype.ts create mode 100644 lending/src/sdk/models/shared/cashflowtransaction.ts create mode 100644 lending/src/sdk/models/shared/commercereportdimensionitems.ts create mode 100644 lending/src/sdk/models/shared/companyreferencelinks.ts create mode 100644 lending/src/sdk/models/shared/contactreference.ts delete mode 100644 lending/src/sdk/models/shared/dataintegritydatatype.ts delete mode 100644 lending/src/sdk/models/shared/file.ts create mode 100644 lending/src/sdk/models/shared/itemreference.ts create mode 100644 lending/src/sdk/models/shared/journallinetracking.ts delete mode 100644 lending/src/sdk/models/shared/path.ts delete mode 100644 lending/src/sdk/models/shared/periodunit.ts delete mode 100644 lending/src/sdk/models/shared/propertieaccounttype.ts delete mode 100644 lending/src/sdk/models/shared/propertiedatatype.ts delete mode 100644 lending/src/sdk/models/shared/propertieitemref.ts create mode 100644 lending/src/sdk/models/shared/purchaseorderreference.ts create mode 100644 lending/src/sdk/models/shared/recordlinereference.ts create mode 100644 lending/src/sdk/models/shared/reportitem.ts create mode 100644 lending/src/sdk/models/shared/reportsourcereference.ts delete mode 100644 lending/src/sdk/models/shared/reporttype.ts create mode 100644 lending/src/sdk/models/shared/salesorderreference.ts delete mode 100644 lending/src/sdk/models/shared/security.ts create mode 100644 lending/src/sdk/models/shared/taxratereference.ts create mode 100644 lending/src/sdk/models/shared/validdatatypelinks.ts create mode 100644 lending/src/sdk/models/shared/withholdingtax.ts delete mode 100644 lending/src/sdk/models/shared/zero.ts create mode 100644 lending/src/sdk/models/webhooks/ReportsCreditModelGenerateSuccessfulReportGenerationWebhook.ts delete mode 100644 lending/src/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.ts delete mode 100644 lending/src/sdk/types/blobs.ts delete mode 100644 lending/src/sdk/types/constdatetime.ts delete mode 100644 lending/src/sdk/types/enums.ts delete mode 100644 lending/src/sdk/types/streams.ts delete mode 100644 lending/src/sdk/types/unrecognized.ts delete mode 100644 lending/src/sdk/types/webhooks.ts create mode 100644 lending/tsconfig.esm.json diff --git a/lending/.speakeasy/gen.lock b/lending/.speakeasy/gen.lock deleted file mode 100755 index c1cbfc058..000000000 --- a/lending/.speakeasy/gen.lock +++ /dev/null @@ -1,18190 +0,0 @@ -lockVersion: 2.0.0 -id: e806a216-cfe8-4f1d-ae7a-37acb6f96c98 -management: - docChecksum: e847b688674aebeca362f82e6bf8bf3a - docVersion: 3.0.0 - speakeasyVersion: 1.761.9 - generationVersion: 2.881.4 - releaseVersion: 7.6.0 - configChecksum: 3e03809ae6e24a0bc5adceaf7c143cf9 - repoURL: https://github.com/codatio/client-sdk-typescript.git - repoSubDirectory: lending - installationURL: https://github.com/codatio/client-sdk-typescript - published: true -persistentEdits: - generation_id: 56db00ad-f4cb-413a-8b91-bcedaa05297e - pristine_commit_hash: 81b6fd601b407712b1e5e4eb88d2fbbec107e042 - pristine_tree_hash: 3a17b73de8a118cf077bee4963dd7db3871a69cb -features: - typescript: - additionalDependencies: 0.1.0 - constsAndDefaults: 0.1.14 - core: 3.26.49 - decimal: 0.1.2 - defaultEnabledRetries: 0.1.0 - deprecations: 2.81.1 - downloadStreams: 0.1.1 - enumUnions: 0.1.0 - envVarSecurityUsage: 0.1.2 - examples: 2.82.5 - globalSecurity: 2.82.16 - globalSecurityCallbacks: 0.1.0 - globalSecurityFlattening: 0.1.1 - globalServerURLs: 2.83.1 - groups: 2.81.3 - methodArguments: 0.1.2 - nameOverrides: 2.81.4 - nullables: 0.1.1 - responseFormat: 0.3.0 - retries: 2.83.0 - sdkHooks: 0.4.0 - serverEventsSentinels: 0.1.0 - typeOverrides: 2.81.1 - unions: 2.86.4 - uploadStreams: 0.1.1 - webhooks: 1.5.1 -trackedFiles: - .gitattributes: - id: 24139dae6567 - last_write_checksum: sha1:26d16d8297b104945139da8c25bd38feeaad3e25 - pristine_git_object: 113eead5093c17d43a46159132885318f281a68a - .npmignore: - id: aa70c1f807c3 - last_write_checksum: sha1:6572da81f2e7a978ec29c22c2210bf461c5897b2 - pristine_git_object: 670ac0a62d7e568c9d44a14f5deafb8442a255d8 - FUNCTIONS.md: - id: 21b9df02aaeb - last_write_checksum: sha1:cfae93add37aa1889f1f474c136eaf88a6168b90 - pristine_git_object: e8d7dec49a46105ccad450d81dcfbc472f16a2d1 - RUNTIMES.md: - id: 620c490847b6 - last_write_checksum: sha1:e45b854f02c357cbcfdb8c3663000e8339e16505 - pristine_git_object: 27731c3b5ace66bedc454ed5acbe15075aacd3dc - USAGE.md: - id: 3aed33ce6e6f - last_write_checksum: sha1:7cb706ea1ccff7b9f070555ed6f0c018984d0538 - pristine_git_object: 46c7913ff46ac412e4f21dff988565745d7d63e0 - docs/lib/utils/retryconfig.md: - id: 0ce9707cb848 - last_write_checksum: sha1:bc4454e196fcd219f5a78da690375a884f5ed07b - pristine_git_object: 08f95f4552349360b2c0b01802aa71ec3a55d2c2 - docs/sdk/models/errors/errormessage.md: - id: 9affd825e395 - last_write_checksum: sha1:84177ebb52fcf6a820e49e3e7f90f7e10afc9b09 - pristine_git_object: 3a90ff58c6339fe1f14824b9b6297b1088fdcdf2 - docs/sdk/models/operations/createaccountrequest.md: - id: db311ac2227e - last_write_checksum: sha1:d9c9f35ab2b2f09e259e5e021a47854b5d920bf2 - pristine_git_object: 8c145ebd67b05a3684bbd43bce97fee1b075bdaa - docs/sdk/models/operations/createbankaccountmappingrequest.md: - id: bd558221aea4 - last_write_checksum: sha1:3e3f7f5f21a2b4d54b753c349cbc5d7c8112d13b - pristine_git_object: 15b6747892c76d624ffbeb8aa496cb3e8cfb4205 - docs/sdk/models/operations/createbankaccountrequest.md: - id: 37b65b9ee948 - last_write_checksum: sha1:73f7c98457c8ec4b0f6cc20518ada4b37f2be304 - pristine_git_object: 491c0ab76c41dcac3843a0d7f2a5da7691db3acf - docs/sdk/models/operations/createbanktransactionsrequest.md: - id: 61ac537983b7 - last_write_checksum: sha1:ab92ad967c362b158d7f1c65d755a478d7d5ad93 - pristine_git_object: 636f11b1325a1d418bbe4ef03ac64d393f565647 - docs/sdk/models/operations/createconnectionrequest.md: - id: 43b13768fa3c - last_write_checksum: sha1:b0490168e513fd119f03b08c35ca258a544ee5a9 - pristine_git_object: 5a6f09064b96719dcf87d1d928a06039bf1ac85f - docs/sdk/models/operations/createconnectionrequestbody.md: - id: cd2a86f8a996 - last_write_checksum: sha1:903670171f36236639f5e0418636c58d3a3df797 - pristine_git_object: 4547edc80c106b93e77fa70ec94e4397672b4e4d - docs/sdk/models/operations/createdirectcostrequest.md: - id: 5d1c02940970 - last_write_checksum: sha1:240a5715d6cda799d1c5c8018b3eab3d38d489f9 - pristine_git_object: 6ebe7f1d064f967b0131350fdf8ef5422cf0b242 - docs/sdk/models/operations/createpaymentrequest.md: - id: bab16054233d - last_write_checksum: sha1:b284cefd96c9a069459330a6f931daba9f27af0f - pristine_git_object: 2780b870f6aa99daa7048fb8ac227f8417af4c0b - docs/sdk/models/operations/createsourceaccountrequest.md: - id: 05c91791448e - last_write_checksum: sha1:b2198043b0f1a9696380362e22521003eb5af6b3 - pristine_git_object: 382b760ed2d934b0cc4059d569b722c882a751c3 - docs/sdk/models/operations/createsourceaccountrequestbody.md: - id: eaaca08e524f - last_write_checksum: sha1:d00ef4387b7b412af2c863766faf7d03a3c64293 - pristine_git_object: 1d60d9d63c18c7c7cca5c23c6194fbbd45ee196a - docs/sdk/models/operations/createsourceaccountresponsebody.md: - id: 7d71509a944d - last_write_checksum: sha1:ca1a85edc2c0f8744d78c76cfeb2a4b672987538 - pristine_git_object: 7fac96dbe67fc8d9bb889c20a646f17c61580655 - docs/sdk/models/operations/createsupplierrequest.md: - id: ae6f827978a1 - last_write_checksum: sha1:65b68de2f77573a3ef88050bb776c7d1e20aa13f - pristine_git_object: dd116aa26c482fb0dcfe723d9122dd4c590f3749 - docs/sdk/models/operations/createtransferrequest.md: - id: ca82653d8ace - last_write_checksum: sha1:c3676a5038d835a2c5a7e2b3c84eec357c8ac366 - pristine_git_object: d556700118febd8661bce5ad928fb6a20c09d42b - docs/sdk/models/operations/deletecompanyrequest.md: - id: 01348357e18f - last_write_checksum: sha1:e1d375838d1ae6efe7a254d63f32b1ed5c427859 - pristine_git_object: 2c6a74747d5587704b5dd7582f269123b21584c0 - docs/sdk/models/operations/deleteconnectionrequest.md: - id: 70fe5fee5d10 - last_write_checksum: sha1:387c8ec21916d8ecb073980e5223e8643d042e32 - pristine_git_object: 12d87e313625e8056c836d7265df2818b7abdfe7 - docs/sdk/models/operations/downloadaccountingbillattachmentrequest.md: - id: 8a070df8af53 - last_write_checksum: sha1:21294cec65c7b215dfc2bc3f91bca0b16c55cdf2 - pristine_git_object: 87554ac8c95068bb4dc312f7f496b5105cc95b1f - docs/sdk/models/operations/downloadaccountingcustomerattachmentrequest.md: - id: e9d74be01310 - last_write_checksum: sha1:47224c963cc11aded78cf6edb380ea9d25fdcdd5 - pristine_git_object: 272f510f00e2526ec29f973e8cc4cfc011829d34 - docs/sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md: - id: d77797387dbb - last_write_checksum: sha1:5b6f7b72933ffafd15d9a68ddca1575a90b8616a - pristine_git_object: 1d7d5519b9eda84e0dc0e607022410f819692a43 - docs/sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md: - id: 470a1b4aca18 - last_write_checksum: sha1:07f89cf2b3ed43d4474460bc6bb60b19ef7abe9c - pristine_git_object: b3743dc1ff03b10df5132acb527d1bc192811585 - docs/sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md: - id: 17982684b3a1 - last_write_checksum: sha1:5aaa5e9152989d4a09f4a55628ab436efe034a5c - pristine_git_object: a25bda2728b2c9f00446a3b776b40f771f030360 - docs/sdk/models/operations/downloadaccountinginvoicepdfrequest.md: - id: 0e6bbd56c4b3 - last_write_checksum: sha1:d9c12c19fd73b61b3f487f0855c1ac4b8b4c5961 - pristine_git_object: 3865d7dd67a66ef2529ab7d0cc6f8c22923b987a - docs/sdk/models/operations/downloadaccountingsupplierattachmentrequest.md: - id: 7683b51b2269 - last_write_checksum: sha1:d3a2d7dd662870c4f85a87984477d46b4312d5a6 - pristine_git_object: 7234762603100ddf00fa900a7a9d02bc96a24e3f - docs/sdk/models/operations/downloadexcelreportrequest.md: - id: 4ab377ae2d36 - last_write_checksum: sha1:f782bbfe76bc7609b546c7c619621df5fa0d3475 - pristine_git_object: 22ec7a520b2a605815a252f6505c2edb98d67724 - docs/sdk/models/operations/downloadfilesrequest.md: - id: 6cec926dbdc0 - last_write_checksum: sha1:8710b1ebf02e43203b1781f6439c1e152f2679fb - pristine_git_object: 6191d3a422838f49af1e1378d94d3b389ad1b350 - docs/sdk/models/operations/endbankstatementuploadsessionrequest.md: - id: a2c795f67c39 - last_write_checksum: sha1:55b7a30f535298f170674b962fbc1b77e08c2a98 - pristine_git_object: 9cb1ffa174bdac5a095864634c2ed0c4a6ebd4c8 - docs/sdk/models/operations/generateexcelreportrequest.md: - id: 4a49afbc94f1 - last_write_checksum: sha1:2a38c7ef67d2a27bc971f57beaaae8eaea8f8166 - pristine_git_object: 5296e9a955a767867e64647bcba952a3f8603e02 - docs/sdk/models/operations/generateloansummaryqueryparamsourcetype.md: - id: 31d1d1b9a720 - last_write_checksum: sha1:50e4c2cf2af180e0e714bf9f29043607303f60ae - pristine_git_object: aa819bd7c81a553632457ee471944a28df32a640 - docs/sdk/models/operations/generateloansummaryrequest.md: - id: fb02e6b5c0d5 - last_write_checksum: sha1:246a442a481011b015a9daee17180e6a71ee30cf - pristine_git_object: 694b3410f7a5e0944bc7277f9b1e9ef4b987c345 - docs/sdk/models/operations/generateloantransactionsrequest.md: - id: 8a7194cafff6 - last_write_checksum: sha1:6de3d0decf920c893beffd9f501b221479cda8db - pristine_git_object: ea1c8d5b07f4da3e739b662f75cb44f5e14abb6e - docs/sdk/models/operations/generatereportrequest.md: - id: f4d62a195c4a - last_write_checksum: sha1:62602cd4bf636edc7d115816a0c554c701cf28c3 - pristine_git_object: bb4015bf2cbe77b3268ef366cbf3d2e67f340d18 - docs/sdk/models/operations/getaccountingaccountrequest.md: - id: 1098bce57051 - last_write_checksum: sha1:9d4f6d5f559ccdc91b1d522f6d244aa96a183893 - pristine_git_object: 882f861d766d97237bfae14c618eafaeb7a7cc80 - docs/sdk/models/operations/getaccountingaccounttransactionrequest.md: - id: 3d8c8837ecaf - last_write_checksum: sha1:11a11e5976f092f1d7764e2034011fad0693bdad - pristine_git_object: c1e96ee8c3301f1deacd7816e2ce5aa1d66b65bf - docs/sdk/models/operations/getaccountingagedcreditorsreportrequest.md: - id: f77cee3e49a2 - last_write_checksum: sha1:c46e0fa54fe096601b4f3be4d76c1051ac473845 - pristine_git_object: 73b8e0929d065eb90805573c5fe8b28caee22cb9 - docs/sdk/models/operations/getaccountingageddebtorsreportrequest.md: - id: 9e66f25acd9e - last_write_checksum: sha1:8f7534bdeb124d157a66c66a25871261a28134bc - pristine_git_object: cd11045b468460fc922c0ae99cbdfd38728b1e81 - docs/sdk/models/operations/getaccountingbalancesheetrequest.md: - id: d601e5aba363 - last_write_checksum: sha1:9c84cb303c6f921ee74856a5b337bd918c25d3ae - pristine_git_object: 1243f6dca698b0683aea428d04fe4bf642388e94 - docs/sdk/models/operations/getaccountingbankaccountrequest.md: - id: 198bc20196b8 - last_write_checksum: sha1:b85bf4ae4399eaf981faa070c5852eacdb352c94 - pristine_git_object: 8d100bcb186b5190786b6eeed0abbd0dcad44002 - docs/sdk/models/operations/getaccountingbillattachmentrequest.md: - id: 58a7d53cd8d0 - last_write_checksum: sha1:4389b97478806d779c6a8d3a59e2a15526974e13 - pristine_git_object: 22e5e7cca0ffc506c965178591ac8ffd55531f5e - docs/sdk/models/operations/getaccountingbillcreditnoterequest.md: - id: ceff8b3aa153 - last_write_checksum: sha1:8ae47fed13c1c032664fe3d0cd66803468c82376 - pristine_git_object: c9d0d4ad6ea7b34a5027a5332d90aa35a639c034 - docs/sdk/models/operations/getaccountingbillpaymentrequest.md: - id: 16eeef12bc56 - last_write_checksum: sha1:d78539106e38bc2895adbb35b3fe761b8d08dff8 - pristine_git_object: a76b6e54ea4b929ac4a2a06e4b4ae6b6600fa2a8 - docs/sdk/models/operations/getaccountingbillrequest.md: - id: 0396e9e8c68c - last_write_checksum: sha1:fc1eb538e943b4daa702316ca43b3cd83c9450a3 - pristine_git_object: 4c977eb9f732d725adc7f7f05473ae08129e8e8b - docs/sdk/models/operations/getaccountingcashflowstatementrequest.md: - id: 1f8accde157e - last_write_checksum: sha1:584569b6ac29f660e2229d5486d919cf869a5f10 - pristine_git_object: 8124e239326b645fc49fd5f4ec71f61b10ce9236 - docs/sdk/models/operations/getaccountingcreditnoterequest.md: - id: f3ac91f9ef45 - last_write_checksum: sha1:4e9f9a76672dff7f6cb912699a15b00fbfe13839 - pristine_git_object: 999a0df17c6b0ce753a858c4d5be2fbe96e7ce7a - docs/sdk/models/operations/getaccountingcustomerattachmentrequest.md: - id: e547080bbce4 - last_write_checksum: sha1:05aa3e2528d889a1f969bca6d0b8aece34c489ed - pristine_git_object: d74aff60c2368cac1322ead116abd9d68510e8a7 - docs/sdk/models/operations/getaccountingcustomerrequest.md: - id: ab93febd2da5 - last_write_checksum: sha1:e745fe0ee80bf223c13c5a70f6a54bd265afce93 - pristine_git_object: 12fdf6e8d1fbda020be3f6cbe65c2389f2db624a - docs/sdk/models/operations/getaccountingdirectcostattachmentrequest.md: - id: 0cc439b095f5 - last_write_checksum: sha1:f4b167b6f0136f129a7b3e01c3a47eac128303f6 - pristine_git_object: 62a34179b63810a4e67555cfe93498b6ec11d19b - docs/sdk/models/operations/getaccountingdirectcostrequest.md: - id: a2917c286bfa - last_write_checksum: sha1:66ed64313d5ee4757436d4483fecc3dee3f033e9 - pristine_git_object: 9b5dbd19069d0e442a2e85e824dfdd7d3f0febf2 - docs/sdk/models/operations/getaccountingdirectincomeattachmentrequest.md: - id: 760dc8f00f4a - last_write_checksum: sha1:ab7a0edbaf441cf55b8760a2c71a951e7cb5f450 - pristine_git_object: b855324a213839d8811c59e7390e53c49048cead - docs/sdk/models/operations/getaccountingdirectincomerequest.md: - id: ed9866195ffd - last_write_checksum: sha1:980ddab4d890941b9b757accb6a26c013a01cf7a - pristine_git_object: 2c12b071606ce52222da6f4cf20062ece74772b5 - docs/sdk/models/operations/getaccountinginvoiceattachmentrequest.md: - id: 00e42891bed3 - last_write_checksum: sha1:0dbd31f9b5c13e0441ec78702ef916c2f2c43ad9 - pristine_git_object: e04daf63c981659b38185721994642daa04ee6f4 - docs/sdk/models/operations/getaccountinginvoicerequest.md: - id: 5fd69f8d08fa - last_write_checksum: sha1:edcee350ac53183c652b7067590bf94a3b21d4a7 - pristine_git_object: c03945413ccfe43462bd102241c4d9c00d33fea3 - docs/sdk/models/operations/getaccountingjournalentryrequest.md: - id: d58a5d9e42bd - last_write_checksum: sha1:10dbe76fa6a58a52b358613a821ef6c978a88626 - pristine_git_object: 849d8c627ea3049d154b05bedb94ef2aadf2b552 - docs/sdk/models/operations/getaccountingjournalrequest.md: - id: ebb5da603997 - last_write_checksum: sha1:fc318bc700c102f27e2496058df9d06b9be0dee0 - pristine_git_object: 55bc69de9082f52e93a7e1c2b8acea9b91c8546e - docs/sdk/models/operations/getaccountingpaymentrequest.md: - id: cb0ed0a8e45f - last_write_checksum: sha1:2f49144042ed42452a147792f7402c6b414581cf - pristine_git_object: 9881baa1c6b86eec7a189d66c4bf2e2b638492aa - docs/sdk/models/operations/getaccountingprofilerequest.md: - id: 5132c031c751 - last_write_checksum: sha1:dfd0c0df9b765d9b949e37297d68bc478a421db7 - pristine_git_object: 1fbbdb6120ef4aab16491733272893ec35c5df6d - docs/sdk/models/operations/getaccountingprofitandlossrequest.md: - id: eeeb0bfc7310 - last_write_checksum: sha1:6236f7289a221e3d1b97fa359a22cc74d849b970 - pristine_git_object: 3b3e330d772f51e0eaae71918eba978d5a0f3fe6 - docs/sdk/models/operations/getaccountingsupplierattachmentrequest.md: - id: 7ee79c08ed19 - last_write_checksum: sha1:578aabb8cfea0a05a8c643af749fe052fab9cbac - pristine_git_object: 2073c81a03de8f123e4016688d3f14a3475c6bcf - docs/sdk/models/operations/getaccountingsupplierrequest.md: - id: 76a9e6a801e9 - last_write_checksum: sha1:8a1665ec3180842da3c715170e0fa189f7edbb92 - pristine_git_object: b9cbdadb360431c518dc2115e51e5e22d6e827d3 - docs/sdk/models/operations/getaccountingtransferrequest.md: - id: 18ca4c7a007c - last_write_checksum: sha1:c72d39b60b2f85caf7f154f18fb3c06f001bc9e6 - pristine_git_object: e69bd9194bc754485f1e53ba82ee6eb75711baf4 - docs/sdk/models/operations/getbankaccountmappingrequest.md: - id: 729ad31a3bd8 - last_write_checksum: sha1:0ecb61d1c3ca4f21f34236a9d3ec5d7698a3f8ac - pristine_git_object: f16ece6599bbdceb5184ee957604eb337efef013 - docs/sdk/models/operations/getbankingaccountrequest.md: - id: 7e44d261fc0d - last_write_checksum: sha1:55859f77b0da523e8d178952901dd31ede2b4898 - pristine_git_object: 08739d0489238c0e919efe9455b9ab89a0d4dd98 - docs/sdk/models/operations/getbankingtransactioncategoryrequest.md: - id: 042ac7b59be5 - last_write_checksum: sha1:339e5812ed191447cee053bff4c7e04e614a9c28 - pristine_git_object: eccbc27c2089dc9e28b6c66b88347c8a926e8c86 - docs/sdk/models/operations/getbankingtransactionrequest.md: - id: 2fd28d881eee - last_write_checksum: sha1:5b632690bad40f9f661f296ac773806c8cc1c8ec - pristine_git_object: 5698812bedbb5cd992022a325e63eddead692683 - docs/sdk/models/operations/getbankstatementuploadconfigurationrequest.md: - id: 8b73c900e331 - last_write_checksum: sha1:cc3b952ad7978ed58a17f5f727de1e7eed8f57f9 - pristine_git_object: 63bbc37bd1a2758eee84044e6d444d4f2d40dd96 - docs/sdk/models/operations/getcategorizedbalancesheetstatementrequest.md: - id: a0650535a3d3 - last_write_checksum: sha1:1b999e5d55c3f265b27084730d7c91939ca41a79 - pristine_git_object: 07e78ad41cb79584322b1da7a099cd0d9164002b - docs/sdk/models/operations/getcategorizedbankstatementrequest.md: - id: 8e30c80d770a - last_write_checksum: sha1:e19291bb46fa4e9794c1b48d530b44d7222988a7 - pristine_git_object: 93cffaf769adc0ef3b046cd84bf62fad16a649ae - docs/sdk/models/operations/getcategorizedprofitandlossstatementrequest.md: - id: e56ae5c4e8a3 - last_write_checksum: sha1:40413b96141cd0a1f3c3febd0639001b9d579219 - pristine_git_object: b834b191b679dbf8158308dc8ee2aaf4f337e95d - docs/sdk/models/operations/getcommercecustomerrequest.md: - id: 22bbc3f868f9 - last_write_checksum: sha1:9adb57e9f06ca1e8c9a5cc9883918505e0f8a462 - pristine_git_object: 3293769abeccf04bbd62058c55b2278789f161db - docs/sdk/models/operations/getcommercecustomerretentionmetricsrequest.md: - id: 7efe61cccdce - last_write_checksum: sha1:f871b6ec22d052dfa13a73a33776546cb401f5b2 - pristine_git_object: cce57933390b64b9ebea0f3b757a4aefee6a9dbb - docs/sdk/models/operations/getcommercedisputerequest.md: - id: a52667bbd997 - last_write_checksum: sha1:3cd079fdec2e29c50c113571c37f9db0bf711e76 - pristine_git_object: 1237ad52ffaa4b3e349804ac5821c1f3a6dbef8b - docs/sdk/models/operations/getcommercelifetimevaluemetricsrequest.md: - id: 81bcf5821cab - last_write_checksum: sha1:d3485f17750d986c12eab76627d69ae16181472c - pristine_git_object: d13c6a68819b202f5289a5cbe63109d80d4b0a9e - docs/sdk/models/operations/getcommercelocationrequest.md: - id: 5950eb7aef6c - last_write_checksum: sha1:20adced1b2b17f89aa6280500d933a62b5f9f844 - pristine_git_object: 5a3cc0bf82975ecfb226923aec05219508eaf776 - docs/sdk/models/operations/getcommerceorderrequest.md: - id: 3fd8494bc116 - last_write_checksum: sha1:e602ecd678b1745eb42cd8cdfa73705d1988a8b0 - pristine_git_object: d6953f870f80349f20aafab61a25794d994960a4 - docs/sdk/models/operations/getcommerceordersreportrequest.md: - id: a6335663d8c6 - last_write_checksum: sha1:85bb21e77e9ff9e622c42e7fca0c06ab04d27e4e - pristine_git_object: 1a333034894d08fccb0d0675553b5df12db8ef32 - docs/sdk/models/operations/getcommercepaymentmethodrequest.md: - id: 291c82b53ff6 - last_write_checksum: sha1:6ea4442aeb748e9e96cc571ca6804b9af919fb51 - pristine_git_object: 34e8a93b06556796d232d4091f0eadd85257a2ed - docs/sdk/models/operations/getcommercepaymentrequest.md: - id: cba0507e1bac - last_write_checksum: sha1:3dc9a234b9d923525669f57fcfb7561b14edcd67 - pristine_git_object: 32e309be5390fd3a1f672c0b48a96c7a97745a63 - docs/sdk/models/operations/getcommerceproductcategoryrequest.md: - id: 16dc893db6e7 - last_write_checksum: sha1:cc2a792348309e1483ff9c475bd00a113922079c - pristine_git_object: ae372abfe1f3a8202290cececc0435a9cc194003 - docs/sdk/models/operations/getcommerceproductrequest.md: - id: 9af692d064cc - last_write_checksum: sha1:e664f74a72195b4309cf436130516bfcfcc5ba64 - pristine_git_object: 7227e0a3c34f202caf437c3625ddad4d709e9718 - docs/sdk/models/operations/getcommerceprofilerequest.md: - id: 1af925806d4b - last_write_checksum: sha1:3746e6703e3a45362229fab3beb530e4c747ae94 - pristine_git_object: 5988d56dd5c2a39664939180cd38024a580005cc - docs/sdk/models/operations/getcommercerefundsreportrequest.md: - id: 1f5fc9514298 - last_write_checksum: sha1:60b836da55f13b78c8c0bbc1701be37b65cad563 - pristine_git_object: c4f3dd5182d8de566c6aa4426d81c9175084c347 - docs/sdk/models/operations/getcommercerevenuemetricsrequest.md: - id: f9f067d3835f - last_write_checksum: sha1:9308ac9ecaf7e07c17f3299ae81d48905ba03cae - pristine_git_object: 0e18f3e85fa489c6be2985f5c6d97d8837dc3faf - docs/sdk/models/operations/getcommercetransactionrequest.md: - id: d897b2329ba3 - last_write_checksum: sha1:82a6c16bf62d518deeb670b77320b9398b137486 - pristine_git_object: 9257a4dc07f07b54d9b677c75b123fa3bf43d13f - docs/sdk/models/operations/getcompanyrequest.md: - id: cb14d531f942 - last_write_checksum: sha1:2338127b5554e7b565b82c8191aa3208dde83853 - pristine_git_object: 5ce1610fdc377f1dcc38ff0787258b11b9ccd943 - docs/sdk/models/operations/getconnectionrequest.md: - id: 6545321b6497 - last_write_checksum: sha1:a623ffd3caf4571518095a191136d916067a0251 - pristine_git_object: 6055cbd51a246a83faed551008af998230c84fc1 - docs/sdk/models/operations/getcreatebanktransactionsmodelrequest.md: - id: 2106984ee727 - last_write_checksum: sha1:44f215b1217805f4da946c8e956be2e6cf361160 - pristine_git_object: 781dde183cd366517e0716b1e1abe124f466dccc - docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md: - id: 66e8596350bf - last_write_checksum: sha1:7b4455ed37feb5f1f94211088528713f88394159 - pristine_git_object: 2fe6d256f10083560ad9d506e67e04c1927daf54 - docs/sdk/models/operations/getcreatedirectcostsmodelrequest.md: - id: f15813b17163 - last_write_checksum: sha1:889c1afc5fa2f2d62b478d1f5958fe7348e598d2 - pristine_git_object: 19f424e3fc061aeafcf7dddfbcdd3428c9cd1db7 - docs/sdk/models/operations/getcreateoperationrequest.md: - id: f4dd0f994904 - last_write_checksum: sha1:c23f617f399a79905830466c6c93586af037e1b5 - pristine_git_object: a5c527f60054a16df09269773c81fef6f284255b - docs/sdk/models/operations/getcreatepaymentmodelrequest.md: - id: 351d0e5d26a1 - last_write_checksum: sha1:b2670ef4992abd94e12fdeaf4db88343b1a3cfd2 - pristine_git_object: 2d6488444be105b2722f63132254b6f28ecc1761 - docs/sdk/models/operations/getcreatetransfersmodelrequest.md: - id: 37dbe9e4062d - last_write_checksum: sha1:91ef38df36057e9b2cbb4f42782de0a5792d0e4b - pristine_git_object: 335fb543ee8ae417bf900dcd78461b818baa01ab - docs/sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md: - id: f77500013879 - last_write_checksum: sha1:f6aaa329c7c17dcc30015624a3e09097296935a7 - pristine_git_object: b38d533c0a83626cc9df17a5e2ad3fcf27e4cfb7 - docs/sdk/models/operations/getcreateupdatesuppliersmodelrequest.md: - id: e5f6d06e7ab8 - last_write_checksum: sha1:d36b7aa2a40f25afa6aaca2c1edae08dd5b6b51d - pristine_git_object: bf646650ae6446147f62596e98d2c9ad39f63374 - docs/sdk/models/operations/getdataintegritystatusrequest.md: - id: d49b996090da - last_write_checksum: sha1:7b54c2340a87f7bda390ca10bd1e0ffeb3b36281 - pristine_git_object: eb02611c4d5a5766ba66233bb8ba94fd177bedae - docs/sdk/models/operations/getdataintegritysummariesrequest.md: - id: 7b0014159e63 - last_write_checksum: sha1:acfc65f33ad304b1507837d2bc8b88767ded3b96 - pristine_git_object: 16ab17564f92c887618c73cd2dee0589bec4b8e9 - docs/sdk/models/operations/getdatastatusdatastatuses.md: - id: 4f0c9aaee44b - last_write_checksum: sha1:14a2acef78f51ee8f454e4668a40507ef2689ada - pristine_git_object: b6de8bfb5983db189496e7643f04302a70bd74ff - docs/sdk/models/operations/getdatastatusrequest.md: - id: 5734357a58fc - last_write_checksum: sha1:05be89a27ed3597897fbf3758985d085302286bb - pristine_git_object: 061fb51f6dc2e11730b613edb4b2fa66cd24ca65 - docs/sdk/models/operations/getexcelreportgenerationstatusrequest.md: - id: ec2b77ae970f - last_write_checksum: sha1:6ed9fd50d675318f87d816c56dfb8fa43beb3e94 - pristine_git_object: cbff356f155838fe85894971c672c054055e14b9 - docs/sdk/models/operations/getloansummaryqueryparamsourcetype.md: - id: 202de7aaeeef - last_write_checksum: sha1:c681ed6818f0b3ccd1d66312e57b00fb9c05b57d - pristine_git_object: 2df85f6b73a040e492f264bb2348b8cb2fe3daf2 - docs/sdk/models/operations/getloansummaryrequest.md: - id: 09d572bf3f1a - last_write_checksum: sha1:441f37e17c7116c0aa12c29786db5df8c8d9d184 - pristine_git_object: 0ccf0ab15054022754e27b78e77a9ede454d6a8a - docs/sdk/models/operations/getpulloperationrequest.md: - id: 6d02e8f040db - last_write_checksum: sha1:ad25ef84620355d7f32a13fff4f1d1d868da592e - pristine_git_object: 49e793358d3f966a36d1754ee43fd461feba78fa - docs/sdk/models/operations/isagedcreditorsreportavailablerequest.md: - id: 94dd330755a3 - last_write_checksum: sha1:ac29f559bcd08841abefec617394483fc63d8e7b - pristine_git_object: 01261053d2775a5c32fb0ce85fee0dc93580027c - docs/sdk/models/operations/isageddebtorsreportavailablerequest.md: - id: 3f806ef44fc9 - last_write_checksum: sha1:94014cee787d2374bfd765b6e10c6389ee9b5856 - pristine_git_object: a1f553b244b9b8c0698a55a9128fa8b2de722a9d - docs/sdk/models/operations/listaccountingaccountsrequest.md: - id: 17e6596664cf - last_write_checksum: sha1:df7af65af7dc851b386da4e45c936da4a7bd6429 - pristine_git_object: 27300c189b341b4ecc922697ff304fa4f6c0c33f - docs/sdk/models/operations/listaccountingaccounttransactionsrequest.md: - id: 389c985a9f9b - last_write_checksum: sha1:ba3c6ced670fed17fe4ab0474a247a191febd0e9 - pristine_git_object: e729ef32ccceb0efc6ec6b19858975e4e377f7ee - docs/sdk/models/operations/listaccountingbankaccountsrequest.md: - id: e8c0e00f4119 - last_write_checksum: sha1:017cf22c11d67d05f34d809171a8201a2f8a2cdc - pristine_git_object: 8088dd04b7c645a6ce106465c3b5c79e6e4a9080 - docs/sdk/models/operations/listaccountingbankaccounttransactionsrequest.md: - id: 5c6ce995ace0 - last_write_checksum: sha1:681247da8e017b08920c3d8aec71cd0114f538f3 - pristine_git_object: f9958d98109ed38b6ab4f39a1949bda5e6477413 - docs/sdk/models/operations/listaccountingbillattachmentsrequest.md: - id: 21e2626a1f6e - last_write_checksum: sha1:40d756f3a52b1410fcfead02f01820317d0c8b4a - pristine_git_object: 5dad398ac815b2d3d9cb56e2ae7d3ac283c61ae1 - docs/sdk/models/operations/listaccountingbillcreditnotesrequest.md: - id: 358c073f0d23 - last_write_checksum: sha1:0f1c0b73c1ad0696ee7b8996ffb7770e234726d4 - pristine_git_object: 68094e79317fda0dcaeb93bf193bef8613273bd4 - docs/sdk/models/operations/listaccountingbillpaymentsrequest.md: - id: 5c216c18a6f6 - last_write_checksum: sha1:798633b41eb02837cb1a20f60a45373be7b0e826 - pristine_git_object: eecc5437ea63ea9eb89c4550c7ddef5fe7000a79 - docs/sdk/models/operations/listaccountingbillsrequest.md: - id: c3c08c0dd551 - last_write_checksum: sha1:7d042d4f1d8eb9bb6cdd1ae255a036b19ddc7227 - pristine_git_object: 6dcbec543767f0542b5cc37ebd242b7b59c7afdf - docs/sdk/models/operations/listaccountingcreditnotesrequest.md: - id: 59a7aaf53b64 - last_write_checksum: sha1:f9eb2628c42494d703668519bcd48e7a358bf622 - pristine_git_object: 9986332598e919b17b20959f4a973541dc119d4d - docs/sdk/models/operations/listaccountingcustomerattachmentsrequest.md: - id: c4e79720a1ca - last_write_checksum: sha1:c76dce21db1da83d0929121801ad45f628028225 - pristine_git_object: 91f56851a40a3fa63708688700d2b12e32033ff9 - docs/sdk/models/operations/listaccountingcustomersrequest.md: - id: dc94d5c94e67 - last_write_checksum: sha1:7d1c60958e942101514e21d0f0fdd960927c9336 - pristine_git_object: c5a1b97912306ea7bd75bfbbb5a364206460fa38 - docs/sdk/models/operations/listaccountingdirectcostattachmentsrequest.md: - id: b3e3fc667708 - last_write_checksum: sha1:8b9b1681f3e780cb1fc2a799f5245b130d21d139 - pristine_git_object: 1f1e978d8b69d54f63146c5f1071fc7bbdf89e18 - docs/sdk/models/operations/listaccountingdirectcostsrequest.md: - id: a6f33986f47a - last_write_checksum: sha1:484f292fd34ad80bae1dcc5115d5d1ee525424d7 - pristine_git_object: db9882750e00759b4ae6f275ff7297faee6c9350 - docs/sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md: - id: 5fe03e331170 - last_write_checksum: sha1:c6bd9ff399d202213a904080e15e2a6671978a3d - pristine_git_object: 184ae47c8bd9c0116aa435e20493b529b2b74767 - docs/sdk/models/operations/listaccountingdirectincomesrequest.md: - id: c33d79460005 - last_write_checksum: sha1:fba4ed1a0e438a2b7f5a41e77ac4352fd7d5ad46 - pristine_git_object: 3a25b3395cbbd898b4fe37fcd4f1bc7ae258efe1 - docs/sdk/models/operations/listaccountinginvoiceattachmentsrequest.md: - id: 31b1264a4db0 - last_write_checksum: sha1:a7967661e4d850e2e197cbb7b0e7b739b6f5fec2 - pristine_git_object: 749f0aac723567ebefe39ff929e6aa70ebefeeb7 - docs/sdk/models/operations/listaccountinginvoicesrequest.md: - id: 129f514cc3bc - last_write_checksum: sha1:10a4c7a4b6a5f519490150fba474eab51e2d2aad - pristine_git_object: 1c672ebf623692a16c971bb58af645b3d37152c2 - docs/sdk/models/operations/listaccountingjournalentriesrequest.md: - id: a45a9cc94b8a - last_write_checksum: sha1:456268f274b02d6974d68ba31406cefab22d93e4 - pristine_git_object: 6496d300b7751224b00f71ae063909c7bd9a7ee5 - docs/sdk/models/operations/listaccountingjournalsrequest.md: - id: e75f90edfcf3 - last_write_checksum: sha1:f95682a9a2e3a4f31f1205a519b3e898e8790ec3 - pristine_git_object: 97857e8b985f11cb3c833cb5085a08cdb8c8955f - docs/sdk/models/operations/listaccountingpaymentsrequest.md: - id: 89966fea8895 - last_write_checksum: sha1:0158076131338a18b50864af33f01fe6de0cf2fe - pristine_git_object: 2db33d46dfc0c5186fafab56df7da269bc773354 - docs/sdk/models/operations/listaccountingsupplierattachmentsrequest.md: - id: bc8df15ff70b - last_write_checksum: sha1:25f363f7a3d826586b3127ab2706dd55545767a5 - pristine_git_object: 53ea28e96dd3af387243473fcfc9a20ff403e155 - docs/sdk/models/operations/listaccountingsuppliersrequest.md: - id: 1e1633beca2a - last_write_checksum: sha1:a16f87e5059e405ebb61954bb07e12c907014813 - pristine_git_object: d3b3ecf7af98b20b00f18c41ab8249b27ca71642 - docs/sdk/models/operations/listaccountingtransfersrequest.md: - id: d5086f6fa2ba - last_write_checksum: sha1:4e4d03d78e0b7635ed2560032829892504f78da7 - pristine_git_object: 9b2d8874a4dc77b54518185ea680d2ca97d047e1 - docs/sdk/models/operations/listbankingaccountbalancesrequest.md: - id: 1a8dcdaa5d7b - last_write_checksum: sha1:402f4fcc030d618ca9d6c4961c06a935ead8be5f - pristine_git_object: 79bc4d4d72525b21c43bf886d09ad74813d591d2 - docs/sdk/models/operations/listbankingaccountsrequest.md: - id: b9c3c1b80c4a - last_write_checksum: sha1:5d72e26a9b122a577d30ab5bc6246f8fb9ec79a2 - pristine_git_object: 2fa4c9b4e6e3203b5c76981627dbd73c08e2574e - docs/sdk/models/operations/listbankingtransactioncategoriesrequest.md: - id: 0f1b5903e5a1 - last_write_checksum: sha1:804ebef3c96af6a044bab632da533b02f98d136a - pristine_git_object: 6e2fc2640d65c05d788da1800aceaafceef000bb - docs/sdk/models/operations/listbankingtransactionsrequest.md: - id: c3475d433f71 - last_write_checksum: sha1:a0b28c9d38d7820f418cecc9cad7144710c7aaa8 - pristine_git_object: 4051b7c35d74334a1d75f3d0820c2eb3d1ad714b - docs/sdk/models/operations/listcommercecustomersrequest.md: - id: 74f9aa89afb7 - last_write_checksum: sha1:5976d005de473a6e9736ec95d9e82b6b0b0251f6 - pristine_git_object: 8542b7a1c57216de5fb4fcd1fad15948a168ba4a - docs/sdk/models/operations/listcommercedisputesrequest.md: - id: 1e5a0894befe - last_write_checksum: sha1:0728a3a9fef402fcc72450b4e7719f7acb2dd196 - pristine_git_object: 051346c9bd0fe76e59aad27441df2a3114d374f2 - docs/sdk/models/operations/listcommercelocationsrequest.md: - id: c01503c0a06b - last_write_checksum: sha1:8ffaa544ff41943f4129e0382d27c08536186e51 - pristine_git_object: 641ee0c731a53864a18110d2a21429be3a1d26eb - docs/sdk/models/operations/listcommerceordersrequest.md: - id: 14e0c789737f - last_write_checksum: sha1:d96fce348b4236ead2bed78ddc57c5694857e345 - pristine_git_object: 8525384b455b694fe41564a396da167766a384a5 - docs/sdk/models/operations/listcommercepaymentmethodsrequest.md: - id: 65e189503a5c - last_write_checksum: sha1:faeef4de139b45d08a8f899ce1761fc0fd315b53 - pristine_git_object: 0ee3bc86c967684c1caf26c22d6811432c3ed79c - docs/sdk/models/operations/listcommercepaymentsrequest.md: - id: cc517fa58f0e - last_write_checksum: sha1:cbd5dea2e83b76386cd7abd62e17efd5201254a0 - pristine_git_object: 4c234fa0d7dd59a435bc6804e124041bd0c1508b - docs/sdk/models/operations/listcommerceproductcategoriesrequest.md: - id: a91473c83a0c - last_write_checksum: sha1:b13941701369d191a388d9216457b78e1223a1b0 - pristine_git_object: cae453da0b3821b5fdfaf671aa110f2aaa5e8df7 - docs/sdk/models/operations/listcommerceproductsrequest.md: - id: 368687410e0f - last_write_checksum: sha1:774f9b058d06c3a301ac8c1a75a15f878bb3310c - pristine_git_object: fece82c5b7e8b782c1cbadf3fc5ed693c6e8e0f3 - docs/sdk/models/operations/listcommercetransactionsrequest.md: - id: b395c25f82fb - last_write_checksum: sha1:b41d7b8f2b2173297a2efa2c85ca69ed005f206c - pristine_git_object: a693f8c9addc05983c893e081c504f6ee426f864 - docs/sdk/models/operations/listcompaniesrequest.md: - id: 605dcf27a33d - last_write_checksum: sha1:8c7fa753523042974ce01988bad9adc2ef8936d8 - pristine_git_object: dd50057f19a51d1db7a43c98b35f387844d8f1d3 - docs/sdk/models/operations/listconnectionsrequest.md: - id: 6b2aa79356a9 - last_write_checksum: sha1:4c6ec2bb4332640fb11986bfde11bf7d4e1892a6 - pristine_git_object: e15cc02942b1acdbc967176fc72df1bc594bb232 - docs/sdk/models/operations/listcreateoperationsrequest.md: - id: 9217ae3156dd - last_write_checksum: sha1:32dee6b5a8e8bfd340f9dce9071a3bfb24433ee2 - pristine_git_object: 0a36a2135df0b8f8b46c4937811323f53749de88 - docs/sdk/models/operations/listdataintegritydetailsrequest.md: - id: 206a071051fe - last_write_checksum: sha1:b31a7425d0048e98796fb5686708d14dc84af9b0 - pristine_git_object: 682326b057431c9d95de8f2d8826a51df8a22174 - docs/sdk/models/operations/listfilesrequest.md: - id: 0fa5f4f6af75 - last_write_checksum: sha1:a06635fddee3ed488e33ef472b772256b4aa1775 - pristine_git_object: a7c20b2bed8ddbbabe029e493aeaa305935b9df9 - docs/sdk/models/operations/listloantransactionsrequest.md: - id: 98bbfb0ea8dc - last_write_checksum: sha1:7feedbc33aa350f47aa9a0a5f461261af34dc104 - pristine_git_object: 937f8c39f2e0d900f0ade1eb3a4252d1087ae6a7 - docs/sdk/models/operations/listpulloperationsrequest.md: - id: d91fce013be3 - last_write_checksum: sha1:80fb877dfd567cc4f2984ccc0fad28dbc97ed002 - pristine_git_object: 2b0441a769c855077ba82a46cdf5bb3cdaaf45c6 - docs/sdk/models/operations/listreconciledinvoicesrequest.md: - id: 5987bb422586 - last_write_checksum: sha1:3172a7487d66282ad975348b59053e50bfdd0115 - pristine_git_object: 88c39c550e42a9602e83360bf7e486d1390d6c02 - docs/sdk/models/operations/listreportsrequest.md: - id: e516286f8658 - last_write_checksum: sha1:c4260bdd333d8babf4ae23bd05ea381781b14422 - pristine_git_object: 2d0167ac1764c428c95149f1201a4066b5f03c53 - docs/sdk/models/operations/queryparamsourcetype.md: - id: b297854457be - last_write_checksum: sha1:fb7a8d7fcd09205bbbfdc405fe1b2fe0cb97a8f5 - pristine_git_object: 9607242311720d7206ec316e9dc5055708cc5627 - docs/sdk/models/operations/refreshalldatatypesrequest.md: - id: c4d9aab31ee7 - last_write_checksum: sha1:f1257f961db680c1af166d781c9d4d0de242e63c - pristine_git_object: d483d40dd37aac68eaf42e571aedf6363ebbd23d - docs/sdk/models/operations/refreshdatatyperequest.md: - id: e47fb457a374 - last_write_checksum: sha1:2a9f16f6a03a8decefbf64b5fda8c224d6a11b7c - pristine_git_object: 3fb7f519bd8c2cea972f5c11a7f3d10d939491ee - docs/sdk/models/operations/replacecompanyrequest.md: - id: 2f79da54c18c - last_write_checksum: sha1:c323a7ad88755a7fe5fb56fe5a268ad2c2a4f83b - pristine_git_object: 98723a7b479103b60852f56ed5aeaf7a344e6468 - docs/sdk/models/operations/setbankstatementuploadconfigurationrequest.md: - id: 877b4c809090 - last_write_checksum: sha1:487251ba6469b344ede05218e9424bf89da1bb26 - pristine_git_object: 1e0d7e0e813e9f5a7e38567cf2b28cf317d92001 - docs/sdk/models/operations/sourcetype.md: - id: 3f64f25f57fc - last_write_checksum: sha1:9eab1215ac168caf331fd56c2fc8f060562040f2 - pristine_git_object: 02d682dbf44aa3e675ff8fc99ee8ada5f21490be - docs/sdk/models/operations/startbankstatementuploadsessionrequest.md: - id: 98568ee7a67b - last_write_checksum: sha1:4799159ae9e73d6befb5e37ba372fb4ecf5780a1 - pristine_git_object: e06cd60b834b63f636c7e500f8d481010f712281 - docs/sdk/models/operations/unlinkconnectionrequest.md: - id: 9f3addbe3925 - last_write_checksum: sha1:ba8e14ae70e3a100991b1ee5e247953c386b1150 - pristine_git_object: cd70ca8512846d9d6bdaab5ecea35740d2c3fd3a - docs/sdk/models/operations/unlinkconnectionupdateconnection.md: - id: 454c96f5ba2d - last_write_checksum: sha1:197d06011af810f6c5e247fed5c7105c49fef64c - pristine_git_object: 9b9ddc89e22db19252652d48491201310718e4b0 - docs/sdk/models/operations/updatecompanyrequest.md: - id: 6501e66b32d2 - last_write_checksum: sha1:6ecc7abb5a2e9a0839a10c1385b003ae2efe7ee4 - pristine_git_object: 030b15482d05c374f595b17d8939bce9ddddd0d8 - docs/sdk/models/operations/uploadbankstatementdatarequest.md: - id: cf79d0eeeebc - last_write_checksum: sha1:54b8343271be48156230bc03cb2fb232186387e0 - pristine_git_object: f0777c268b713848ddd7f17d1569aea5e027bb11 - docs/sdk/models/operations/uploadbankstatementdatarequestbody.md: - id: 09deee3d9a39 - last_write_checksum: sha1:2e256a28a75cf5ee86117c0513fbc34f6d8066c0 - pristine_git_object: e104e493211bbacfddb9a960a8f1f8cfb1b2008c - docs/sdk/models/operations/uploadfilesrequest.md: - id: 15a73d3378c6 - last_write_checksum: sha1:01d444ba81701c70b6f203063573be312475c71b - pristine_git_object: 67f5e9f03f6d9c770a533579543ec1a6f531cd9e - docs/sdk/models/shared/accountbalance.md: - id: 919574f10edd - last_write_checksum: sha1:514c2b5808fcd9e787107580aebb39b799347547 - pristine_git_object: d4c3a0e95346fd7a90896535530934a213f8a6b6 - docs/sdk/models/shared/accountbalanceamounts.md: - id: 8f5341eef47d - last_write_checksum: sha1:24f043f3f0947c80ffc72e8fb67b1343e413a6c5 - pristine_git_object: 9130501600d9bce30da2947b8dfc3766402bb9b5 - docs/sdk/models/shared/accountcategoriesupdatedwebhook.md: - id: e0adbcf186c9 - last_write_checksum: sha1:613287c727d43928a41c1453cd7d8a9d75282d05 - pristine_git_object: bb7281aeaf5de81ed3900290dbef43b6d8d56009 - docs/sdk/models/shared/accountcategoriesupdatedwebhookdata.md: - id: 6ad19154cc5a - last_write_checksum: sha1:81786c81b0d77269d07020e0e759b3dec5b0312a - pristine_git_object: bd0ed2995ba578c9ae56f73f5753d5e23b5227f4 - docs/sdk/models/shared/accountcategorylevel.md: - id: 7e77536e18ed - last_write_checksum: sha1:3344395d6f4908058575e40f993afead00674830 - pristine_git_object: 7d60b22f650c494d5a2fbc9b6a6bd2eb779a7239 - docs/sdk/models/shared/accountidentifiers.md: - id: f71c7d14f4e3 - last_write_checksum: sha1:baf8a6cce42083435a4815223a4e397c13703929 - pristine_git_object: abb0b1041f21d9d19d558b10ec0bf0296064db1b - docs/sdk/models/shared/accountidentifiertype.md: - id: 97303aedc073 - last_write_checksum: sha1:888e12b8b505cc78d6e7cc2ee7cdb92a5998ea93 - pristine_git_object: 8b742f21d7e09480b72cf7edf0ce3b1d6e73b087 - docs/sdk/models/shared/accountinfo.md: - id: 80be3d0b1178 - last_write_checksum: sha1:e0da7f4ed6da3d689dd13b2ead197cf2044e90f2 - pristine_git_object: 3c1f177b81d7417ff7fb4af699c2575ee09b389f - docs/sdk/models/shared/accountingaccount.md: - id: bb60e4c3dd9d - last_write_checksum: sha1:9431c3a842106555a74374b18fa7018b5baf2452 - pristine_git_object: 08759445c1549fc94f7dd2542ead40be22754981 - docs/sdk/models/shared/accountingaccounts.md: - id: b392eb30b8c8 - last_write_checksum: sha1:8573bc78b3f212dc882810330e14e9cdae31cd6d - pristine_git_object: 73f33d0907a256ffe615c808ac0bedc00325f691 - docs/sdk/models/shared/accountingaccounttransaction.md: - id: 0d5787538a48 - last_write_checksum: sha1:e68c4732cb1332184d1a7bd24c4e0c7dac4791d2 - pristine_git_object: f009718da68ab63656abc85e6380460f0a231bf2 - docs/sdk/models/shared/accountingaccounttransactions.md: - id: d46e37f1df11 - last_write_checksum: sha1:c748e177ea807c9754e630af0da86e91551b1999 - pristine_git_object: f5579ed87155b1dd415e91695073f575431a5430 - docs/sdk/models/shared/accountingaccounttransactionstatus.md: - id: b08fa09b9ebf - last_write_checksum: sha1:1657d398dbe89f56f8bdc58e1d3a70a116b42518 - pristine_git_object: 61c2ee4199dc5684034f271a41d93f86fd943131 - docs/sdk/models/shared/accountingaddress.md: - id: 3964ba07ab0f - last_write_checksum: sha1:4a9e412b1ac4def778762a59193cedb629713edc - pristine_git_object: 276b6e8488b08fda1ffecffe4c55979a689af629 - docs/sdk/models/shared/accountingaddresstype.md: - id: 9a69f5fe6f07 - last_write_checksum: sha1:b00307f3fcc6eac4ec2f1cecb10b5ac17ea986de - pristine_git_object: d0182fbb4d492b476526ab21c0f5d10b44179d22 - docs/sdk/models/shared/accountingagedcreditorreport.md: - id: f7f0cc6f30da - last_write_checksum: sha1:cdcb264bba3b744c86f7e2f826404d76953ca4b8 - pristine_git_object: fa633e03f7609d01d110e5b1fb21531fc3efb568 - docs/sdk/models/shared/accountingageddebtorreport.md: - id: c6f7b9584d87 - last_write_checksum: sha1:02c4264cea43d634cf8044effe0185f0ae0731b8 - pristine_git_object: c5a75750631158243b1f5229fbe6157eb3c441d8 - docs/sdk/models/shared/accountingattachment.md: - id: 4a79638d3b88 - last_write_checksum: sha1:a836c7fa86427b3782957857404003f47f10f616 - pristine_git_object: 09977874afb7707f67d1719e1c4af77b7618ebe8 - docs/sdk/models/shared/accountingbalancesheet.md: - id: 67ba462c2a66 - last_write_checksum: sha1:a17807d50dcdf250c3c23501d1177316befd685b - pristine_git_object: a4b3234eaf0cd322fb8e8e379fa428bfda22ecf0 - docs/sdk/models/shared/accountingbankaccount.md: - id: 35bbd90bb6b9 - last_write_checksum: sha1:3d7d6d315817295cf31f6b5a2c3970d7652075df - pristine_git_object: edb8baddb55dee241fc4649e02fbb6fe928100eb - docs/sdk/models/shared/accountingbankaccounts.md: - id: 5c583cf1ecc1 - last_write_checksum: sha1:6b4f756ae18f691cea76fec8327b6154ec76920f - pristine_git_object: 424d485c75bed2b25771eb87fed23e5e1d062548 - docs/sdk/models/shared/accountingbankaccounttype.md: - id: 47b8e79faf2f - last_write_checksum: sha1:e7caaa63fb1182a753314e9aafc0fcaadf697e18 - pristine_git_object: 6218a5522f60f6d3e1f25b0c4823276ada64db62 - docs/sdk/models/shared/accountingbanktransaction.md: - id: 4ce4444a917e - last_write_checksum: sha1:32362a30f08ca12cfd3b5b3a368b153595be1dca - pristine_git_object: 405d5fefac187370dfc4156dd16c4539286c9977 - docs/sdk/models/shared/accountingbanktransactions.md: - id: 6d59253805f5 - last_write_checksum: sha1:09e5e5ae40f4f13a91cab2c23d723cde8c74ae88 - pristine_git_object: a12e4e45835350cfa629a1630e41e52ade4a5b49 - docs/sdk/models/shared/accountingbill.md: - id: 05b30f2d6fa8 - last_write_checksum: sha1:1bb62444d54fb4dbe940ff2f410ed5f64de156c8 - pristine_git_object: c70454a3c585e2fa71bf5ba778401e1b922b646b - docs/sdk/models/shared/accountingbillcreditnote.md: - id: a1017af4782b - last_write_checksum: sha1:4a8f679892f1ac5f9519b71b9db21e3060395a86 - pristine_git_object: 469e4bfcc3a206de4a8286c5dff7487f178b5c50 - docs/sdk/models/shared/accountingbillcreditnotes.md: - id: 22e03a111f8d - last_write_checksum: sha1:8445e4c837bdfeef631687a3f27660d034e7579c - pristine_git_object: 776052a96ce5ac7149c97ce942d3ec5df3c431d3 - docs/sdk/models/shared/accountingbillpayment.md: - id: cd413eabc748 - last_write_checksum: sha1:afc9ed27e5ecbcad4c00162b84fac45395b613ff - pristine_git_object: 25f3f434a17cd44c83fd1e1dc1ff058a40cc353d - docs/sdk/models/shared/accountingbillpayments.md: - id: a4ef86dae06a - last_write_checksum: sha1:e8d825250713530ee5d9b000004696fcbdc2f1a1 - pristine_git_object: fb0f9bb2ae27d206c0432f14a42fdb975543a838 - docs/sdk/models/shared/accountingbills.md: - id: 0409641b0ea9 - last_write_checksum: sha1:576a5689d17763bf6becfa45360a88d1403f295a - pristine_git_object: 00ac15f82fcaffdb4416f69346c61ba81c367abf - docs/sdk/models/shared/accountingcashflowstatement.md: - id: 90ebeb1c1394 - last_write_checksum: sha1:95ae1207d9197d6cb6b219ab33811113b6cb1c02 - pristine_git_object: 43d19a5c1b609abaa2d68242f226cf648c463ff2 - docs/sdk/models/shared/accountingcompanyinfo.md: - id: fb0ed02a9f97 - last_write_checksum: sha1:7d3f0af2edade46c894aa973e06cdff18114f1ff - pristine_git_object: 7934e6fa199477b1227ff33745ff9d9778859c68 - docs/sdk/models/shared/accountingcreateaccountresponse.md: - id: 275916e52d17 - last_write_checksum: sha1:11345c7762fbb69ab7326f9f7e66d5a0ef4a0e89 - pristine_git_object: 01dfa82b4a28d98a06f4c864dee823df4aa12911 - docs/sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md: - id: 48af9582304f - last_write_checksum: sha1:90639130581939457294875ab67b03cb29543a27 - pristine_git_object: 1a91816cc6d13f7d5340e07995124301f8d4fbb7 - docs/sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.md: - id: 050a5336900c - last_write_checksum: sha1:4126b83e53632bb27637526605df3de8aa97fa4c - pristine_git_object: ab3bca74ba9297b8d4597c0083f322dd13006ea1 - docs/sdk/models/shared/accountingcreatebankaccountresponse.md: - id: bc08ddff460c - last_write_checksum: sha1:7e1af51fdd465ab4aefa66dc9c87bd032a150972 - pristine_git_object: 9d3d2cdaf08d34e16c82f8b83d94026609def601 - docs/sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md: - id: aa05c5d510a2 - last_write_checksum: sha1:699000dd2934da3b95e2a6a3b55bfdcf18970f8c - pristine_git_object: 950e04f79ab55baf89b0ef1d58714a770721f8a4 - docs/sdk/models/shared/accountingcreatebankaccounttransactions.md: - id: b1424c3f7a6b - last_write_checksum: sha1:08affccb22e4010b387724b449181eb8f5f37358 - pristine_git_object: ab64c011fd2299551437e926fa82ccf5e7bb4ac8 - docs/sdk/models/shared/accountingcreatebanktransactions.md: - id: 0c328f6262e5 - last_write_checksum: sha1:1d1675941b835991116c4a5aa51dd4c28b6166d1 - pristine_git_object: 36c96c08c6ba1829f158b631a2f09f8175f53b4f - docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md: - id: 8f74cb210627 - last_write_checksum: sha1:62dc8c7c77d1cc24b9f58351ca1fb73144120028 - pristine_git_object: 2ae7af644526e7418c9d535d641ebb3f58b1d259 - docs/sdk/models/shared/accountingcreatedirectcostresponse.md: - id: 2ee005fcf0a1 - last_write_checksum: sha1:6de495fbafcb4d7288237b37bfa333bf54e7331d - pristine_git_object: 61cdc8f272963769a73c5784006090515a34f2f3 - docs/sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md: - id: 0d563aaa3cc7 - last_write_checksum: sha1:571e3de39902407bbc466d8a80334943155859af - pristine_git_object: 28b534f7212ed9f70a25778db9a76624f8b17254 - docs/sdk/models/shared/accountingcreatepaymentresponse.md: - id: 47692daf22ce - last_write_checksum: sha1:7cd65145e9e714c5b1ea10bce4b8abcab1423d35 - pristine_git_object: c149effba8ce520b835c04efb7972777773b4412 - docs/sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md: - id: a00255c08761 - last_write_checksum: sha1:27777357cb283953f455a51de97bb54965b05614 - pristine_git_object: 25092dc16b35709a96377dab55b8bf47128f62a8 - docs/sdk/models/shared/accountingcreatesupplierresponse.md: - id: f5facd4633ad - last_write_checksum: sha1:79cd1705f82f266083e794bd0059ca0f18aee31a - pristine_git_object: a67ded7c6561232799bb9c79b1c53779fd9f735a - docs/sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md: - id: 95cbb04a34c3 - last_write_checksum: sha1:a5ce20ad74af5bb133aa8da2e95da8d91a4530cb - pristine_git_object: 05254bee401d266c8db2fc1e94c0a6fbdf794fc3 - docs/sdk/models/shared/accountingcreatetransferresponse.md: - id: 6e9174ee8e95 - last_write_checksum: sha1:cd44d22da65ba9f34c11db2987320a037c83452b - pristine_git_object: 8965f85bf5f23394cf5d143e022dbad4e1ed864a - docs/sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md: - id: c444b94d1158 - last_write_checksum: sha1:a828e58264dfee68dcfb340fbf9c2dc299bda5b4 - pristine_git_object: 72baf9e8244ddd01f9c6e9bbd1854fc51cc70af5 - docs/sdk/models/shared/accountingcreatetransferresponsestatus.md: - id: e1acfacf8ccf - last_write_checksum: sha1:fb4d385f37fee596d1b552b5c71b24190c08a6f0 - pristine_git_object: 8caf8eca7d08d999f8ac240d88d3e123b01fcb80 - docs/sdk/models/shared/accountingcreditnote.md: - id: 66eb70009651 - last_write_checksum: sha1:b54ac4f4ac96191f366b135667edad288f31a213 - pristine_git_object: a22f76a9250956925af65054d9a6673c56533cde - docs/sdk/models/shared/accountingcreditnotes.md: - id: 15123118d97e - last_write_checksum: sha1:ac8d62e2dfc97b60121ec5a5d443019b89c25d86 - pristine_git_object: 37ff4a134163fa908a916efd1fbdd4473d6e8519 - docs/sdk/models/shared/accountingcustomer.md: - id: cc9bd80c804b - last_write_checksum: sha1:580d70a4aca174ea6772d9a707b62843dec2b812 - pristine_git_object: 3763b94f831b698fd1ccba1c2f49473e304c7746 - docs/sdk/models/shared/accountingcustomerref.md: - id: 44f17d5c40f8 - last_write_checksum: sha1:33e9e651a5ab36d327b8c015f761869c632dcd5f - pristine_git_object: 7fc96841e8ee41b477cdcc563df81d15f19e9582 - docs/sdk/models/shared/accountingcustomers.md: - id: 90e51c2135df - last_write_checksum: sha1:c84bf0ee265c82f8fa50a3a6656aa152008b3d20 - pristine_git_object: 9f49aa4c0a217d4571d9f0c93bc206a11a89ff01 - docs/sdk/models/shared/accountingdirectcost.md: - id: 77a8359f3995 - last_write_checksum: sha1:8a1d801949b78bf813c2dd9393fb821433c87536 - pristine_git_object: 9bd1aa57bb27825c36480ae6809ada48a9f9f7ba - docs/sdk/models/shared/accountingdirectcosts.md: - id: 46c04ce6eec5 - last_write_checksum: sha1:f02815e0a1d85ce7807775b51571b03376736120 - pristine_git_object: 77553119f5e85648cd81ec2518a60b888f91cd8d - docs/sdk/models/shared/accountingdirectincome.md: - id: d9366e1734dc - last_write_checksum: sha1:395cb66d26c43a720b197647d33b7765b0969cc2 - pristine_git_object: 87decb0a2138568f1dbbea30a23291b049c5d4c4 - docs/sdk/models/shared/accountingdirectincomes.md: - id: fdc70cf43ceb - last_write_checksum: sha1:18a48b4d06813e9a2b6ec60afc4bb4834dce9f94 - pristine_git_object: 0afcbdad3359193dce9540b6748070ab4cee8a99 - docs/sdk/models/shared/accountinginvoice.md: - id: 75439f2ba4af - last_write_checksum: sha1:2775f3a1635a2dfbef9a002bf84dc6589ee3eb58 - pristine_git_object: 3773b4e92ea817896029492d872ac2b5580021cf - docs/sdk/models/shared/accountinginvoicedatatype.md: - id: fae4288b6ba6 - last_write_checksum: sha1:384aef8eb1703318e1d405531454bf64d8ca17b2 - pristine_git_object: 850f773c865dd0bd392a2c13a3c565cf13f4da13 - docs/sdk/models/shared/accountinginvoices.md: - id: 6736584bfc94 - last_write_checksum: sha1:b86c97ad3c6858212c5b91a083ca859d5df4c401 - pristine_git_object: a286ee08ebe9def051adc4746c9f9064420b58be - docs/sdk/models/shared/accountingjournal.md: - id: 6e20519212c0 - last_write_checksum: sha1:4843a2319efa4997eac9246aea9a5ed234b52154 - pristine_git_object: 9d4ff461eb643506b6da42f4afa00f597043eadc - docs/sdk/models/shared/accountingjournalentries.md: - id: 93a73ff7fd9d - last_write_checksum: sha1:24f978d1df1da4013a08d891ef50c030153b21a7 - pristine_git_object: 0eca2a6d7ad6561f54d5c966af340349fdb0e326 - docs/sdk/models/shared/accountingjournalentry.md: - id: 891a3bcade19 - last_write_checksum: sha1:dcc845a1238ad9c93efc7acf6028fd467f516bdf - pristine_git_object: 3e9a0a23bd191c5870562b9d9aff6ea3ad384537 - docs/sdk/models/shared/accountingjournals.md: - id: 3bbd31f5a664 - last_write_checksum: sha1:17e7e7a72bf6dd7302c637320b8bf22a5691a401 - pristine_git_object: 2e247e8ec6cf8155f7d5f405651d06eec50cd1e5 - docs/sdk/models/shared/accountingpayment.md: - id: 9f620493e84d - last_write_checksum: sha1:e822107634f5f7d2d8ecbe61497a8936a442299e - pristine_git_object: bb4ee32a672ea383179d4263d175f70793ad2088 - docs/sdk/models/shared/accountingpaymentallocation.md: - id: 6efbc30435c7 - last_write_checksum: sha1:e0ec9db7aeaf47b8ccdcf1050f88c46c694d26a2 - pristine_git_object: 24f0cf9d9e04e8c5a413e842fd8cb2e336c4fcc3 - docs/sdk/models/shared/accountingpayments.md: - id: e5121d03c929 - last_write_checksum: sha1:312c02675634951ce505ee1f705411854a989b4f - pristine_git_object: f84d459fbd053cbb0928f612f16fb9e9414441b9 - docs/sdk/models/shared/accountingprofitandlossreport.md: - id: 1256482ddf49 - last_write_checksum: sha1:8cfc721aa04c305b8e2e1573758e37e49266d3bc - pristine_git_object: 8361235b84c63c9743b10b0d71bb26d6a5bce184 - docs/sdk/models/shared/accountingrecordref.md: - id: e777173d1bd4 - last_write_checksum: sha1:200117a0613e710a8a21a56028e54336e809fef3 - pristine_git_object: d6695813bf6c0eeb7518007dff8ce9ac8932e275 - docs/sdk/models/shared/accountingsupplier.md: - id: 641d9aede215 - last_write_checksum: sha1:679713d2ab61739d2fd0cbb2d0c9a5057e027e13 - pristine_git_object: 78b21ff36126e7b7e4521a4aefced3909f772feb - docs/sdk/models/shared/accountingsuppliers.md: - id: 2a3fa2e419cd - last_write_checksum: sha1:64a0c054743018591cc73c0a340087b093351805 - pristine_git_object: 20456b87916eabecde57a8c2756a895099e44847 - docs/sdk/models/shared/accountingtransfer.md: - id: a10824c4220c - last_write_checksum: sha1:2204b4d68e83ad8e04ef0a55df95c60348f0c08e - pristine_git_object: 8e651d8b8d9c0b06bcda58a684729bdb83aa9f3a - docs/sdk/models/shared/accountingtransfers.md: - id: 6b62e5548696 - last_write_checksum: sha1:aaad0f076794ec0bf796d96fe1fc130faed7b887 - pristine_git_object: 2ff0695fc9343265ff924af196e491742e3a4053 - docs/sdk/models/shared/accountingtransferstatus.md: - id: 8ec8ffd58575 - last_write_checksum: sha1:3535e6b8dea5ae60a5d50b5c4df3b0e763eae1b4 - pristine_git_object: 1e0d62d15ef8a401eecbc474d72fb35c4e7ad519 - docs/sdk/models/shared/accountinstitution.md: - id: 997136e6b74f - last_write_checksum: sha1:ce4fd99182b1b491b94b151c7cb3312d0ab23cba - pristine_git_object: 51995f6e93db11260e49fc722b19adaa7571ee75 - docs/sdk/models/shared/accountprototype.md: - id: 8552719629cb - last_write_checksum: sha1:23794755598e0d77fd1a78804c5185f38f753ff3 - pristine_git_object: d8bdb08a4aea2e0a45a245d135ea519d0a66d64b - docs/sdk/models/shared/accountprototypevaliddatatypelinks.md: - id: 89dde469abcf - last_write_checksum: sha1:387a54b7bc8a4fd4e5e4ecc2e11040b28f9aa032 - pristine_git_object: 77fb9e705330e01094a46ff9742b4af80eb08def - docs/sdk/models/shared/accountref.md: - id: 2f64105c8134 - last_write_checksum: sha1:706e9e9fd720736d0d0178598bc97223d2e918b4 - pristine_git_object: 29dbaa11c77bec9d75c4d9984385513baaef2410 - docs/sdk/models/shared/accounts.md: - id: 5d94eee89742 - last_write_checksum: sha1:318435c1307af1b098198796fef66c57a0f1f44e - pristine_git_object: 0cc12bb61fee7d8f62ed659454b066668fd5618b - docs/sdk/models/shared/accountspayabletracking.md: - id: 5fcc8015cd2b - last_write_checksum: sha1:9eaf5c818ec947de33bae7d3799b6bc9e4fd2cee - pristine_git_object: 06ba2963bf29a4edb5966bda4c69211f25afbe04 - docs/sdk/models/shared/accountsreceivabletracking.md: - id: f162c3d03186 - last_write_checksum: sha1:8284dbcae0957e6e9e5573cfedc3a326c2731f1b - pristine_git_object: 77c1bcff40e3367c03f4bd12137e3abd636ae0b0 - docs/sdk/models/shared/accountstatus.md: - id: a8da19baff08 - last_write_checksum: sha1:906dd245f4d5f07444def3352531880c685d1548 - pristine_git_object: 8ef5a6e287c24c239478cb979e483de5e00b81e9 - docs/sdk/models/shared/accounttransactionline.md: - id: 8c72cb3995aa - last_write_checksum: sha1:4ea13b85ab8e259077d665edc8b715cc58f43c89 - pristine_git_object: 528bca44ae22bf3683edb4b46d555f525992d98b - docs/sdk/models/shared/accounttransactionlinerecordref.md: - id: 83e25d7e969e - last_write_checksum: sha1:510dcf914c097ca7920fdcb37de3af83ab06b251 - pristine_git_object: 7a5055879b71ba8dc76ba287611100e71d39f18c - docs/sdk/models/shared/accounttransactionlinerecordrefdatatype.md: - id: a702ceb34e40 - last_write_checksum: sha1:f770db46ede1ae4861e43ec4b62da7f9fdafae4c - pristine_git_object: d4d785f35e656044a7c42850dbe8864ecf70d6ae - docs/sdk/models/shared/accounttype.md: - id: 1c016d1deade - last_write_checksum: sha1:9ea2c4ee790ce1a326a059f2a12861596ecc28f9 - pristine_git_object: 3eac52c24307cc27e0a9610f14c35683f0e7c7e0 - docs/sdk/models/shared/agedcreditor.md: - id: 9b20d2cc756c - last_write_checksum: sha1:045cc9659eb5aaec1bd03946bd913aae2feeb381 - pristine_git_object: df881a5abda5ec673a233ff46bdd4b045e496ea0 - docs/sdk/models/shared/agedcurrencyoutstanding.md: - id: fb6e8759b8bf - last_write_checksum: sha1:3d64941233ffdf7c49b5adfa49605af9399bb11d - pristine_git_object: ac06a142290b3d2a0b7e8207d4570b73517a980e - docs/sdk/models/shared/ageddebtor.md: - id: c98d7847a4b1 - last_write_checksum: sha1:95234cc0f500ee6140ee1e0109b3eb4c4fdaaf5c - pristine_git_object: 5a77ab2b057825be1f7c598ec6a5acd3b4b1811e - docs/sdk/models/shared/agedoutstandingamount.md: - id: a9d3aa2bd8cc - last_write_checksum: sha1:fb61a5e4f4cd818c524e9d4c13aaf1a30df49cd8 - pristine_git_object: 21e9c955f45d845bd2c2fe16f78dd26b6bc84fae - docs/sdk/models/shared/agedoutstandingamountdetail.md: - id: c9a882ee7bc4 - last_write_checksum: sha1:adf6c2f45c1cb2e6cf7f6636c7d69514161d76b4 - pristine_git_object: dd95426063ccf5c6b7ce6001081c4fcdb9f42af7 - docs/sdk/models/shared/allocation.md: - id: 54d810d7fa78 - last_write_checksum: sha1:d3a6d488690b4085f8e9c72da03c79446e4ae273 - pristine_git_object: 141cb9a5fb73834abfc3e8f2654d9e121247dcb0 - docs/sdk/models/shared/attachments.md: - id: 4d2225fae571 - last_write_checksum: sha1:c1950db65ae1e6364c3ece3b3fcd6d79126e132f - pristine_git_object: edd9312ea22f5b27a3a190275a16a0d8d5f5f8bb - docs/sdk/models/shared/balancesheet.md: - id: 5f9035b9de93 - last_write_checksum: sha1:0369c3fd74c751c6af4ad34f7a30bb03b1e5bd06 - pristine_git_object: b5c95605122064d117118919177fc8c21cb5a4b2 - docs/sdk/models/shared/bankaccountref.md: - id: efe9186abe36 - last_write_checksum: sha1:6c1c08191decaee16298ee08da1ad8a323ddfe9b - pristine_git_object: ceff227b280e5145eeb3108763a850b7490ff0df - docs/sdk/models/shared/bankaccountstatus.md: - id: bb5d0730c110 - last_write_checksum: sha1:360bebfa97fd7fa25654e98ef416b43b8edde7b6 - pristine_git_object: 0efa709b19772205077cc16722178d0c14f06614 - docs/sdk/models/shared/bankfeedbankaccountmapping.md: - id: 324ad4ef2c92 - last_write_checksum: sha1:960231a3a720a797fbfe1fe6db6d81a54f8ac261 - pristine_git_object: 5dac2e88f0d58e441a1e8e4a5ed3da25e1978cc5 - docs/sdk/models/shared/bankfeedbankaccountmappingresponse.md: - id: 0a60893ad63f - last_write_checksum: sha1:93733cdb9c538e41b40e117c4225a5e0931819b6 - pristine_git_object: aba8176434c42edd46d0118c01e8e66ab0d18703 - docs/sdk/models/shared/bankfeedmapping.md: - id: 4556956cceea - last_write_checksum: sha1:9b71d354b0c16fa074024a021ac9e67bcd8f09fc - pristine_git_object: e23513990968e9317142d1fabfc7a34f7276935f - docs/sdk/models/shared/bankingaccount.md: - id: f232f17b84f1 - last_write_checksum: sha1:5e0979e86891492ba536236fec57a33ada0c0f0c - pristine_git_object: 336971f80b172adc948c9b0773984c203bb5006c - docs/sdk/models/shared/bankingaccountbalance.md: - id: 8c20ad29eae1 - last_write_checksum: sha1:b077237fcf16bdf5d4f6f89d2a213f12e6fb7863 - pristine_git_object: 32fd75f3981d7c44e8924310f2cff8b7aa69b422 - docs/sdk/models/shared/bankingaccountbalances.md: - id: 4a82b4c26c33 - last_write_checksum: sha1:ecd14d5c7006f0fd0e5191de4ad157c013174065 - pristine_git_object: e524d1e70d913d99d74ea7e4aed735b9cb972817 - docs/sdk/models/shared/bankingaccounts.md: - id: 137379fba74d - last_write_checksum: sha1:2bde460f3d14165f3e4bd175919fcf5fc95a8ad6 - pristine_git_object: b287b1c8c495e6cea5c7e9d1edb06d309d20fc07 - docs/sdk/models/shared/bankingtransaction.md: - id: 71b73a006cbd - last_write_checksum: sha1:0a79dead78afc3391a8172d7140896102f5f8fc4 - pristine_git_object: 8a462ed79babd7d1de5222ff663a6849f506dde9 - docs/sdk/models/shared/bankingtransactioncategories.md: - id: 6044a6c4a101 - last_write_checksum: sha1:16271481e966dff66d7d41bf6a84c2be6d4cab2d - pristine_git_object: 396f358a7c799a812968b288cf367fc821875ba8 - docs/sdk/models/shared/bankingtransactioncategory.md: - id: 30ae16825964 - last_write_checksum: sha1:d5f63c3ab36386a29c93e7bb244a7ce6a7fa18c8 - pristine_git_object: 76b0649d9f15c09801598a23c22dac40574b8558 - docs/sdk/models/shared/bankingtransactionref.md: - id: ab9c6b3b1ddf - last_write_checksum: sha1:24b02d91b293eca31a15115ab51368e1a2f63685 - pristine_git_object: 2f743705a8306f71a67b16fb9ac168af96c21edc - docs/sdk/models/shared/bankingtransactions.md: - id: 8fbd07ef5108 - last_write_checksum: sha1:a13fd318a40cd434be1b12a50cfd37e960c119a0 - pristine_git_object: 6297ed384629a4ee1e4d10703c3f844b5e3059f6 - docs/sdk/models/shared/bankstatementuploadconfiguration.md: - id: ac507d21cb81 - last_write_checksum: sha1:74bfbb888fdbfa86adc0e7ae4e15bfc4cdc1aaca - pristine_git_object: 1d19b3da8b1dbabb01f9b27e5153662398832a72 - docs/sdk/models/shared/banktransactiontype.md: - id: 59f43c489d59 - last_write_checksum: sha1:8b4149a33d78efdfdc7c835bc30c8ed4f19f37f1 - pristine_git_object: 7e2191dd20bc3426eae843375f179420d2edc149 - docs/sdk/models/shared/billcreditnotelineitem.md: - id: a599c964b752 - last_write_checksum: sha1:955d1cbe07e06c9fa4ec8408d76233c9a8b2f5dd - pristine_git_object: 85365d3f7cefb7acf98b06105f2503b9b6f5ec40 - docs/sdk/models/shared/billcreditnotestatus.md: - id: 63e9cf6a73be - last_write_checksum: sha1:fd143a9f6d3d18a561b46d3c46e2bd71a03d50bb - pristine_git_object: 0eba074eab90e8197db996f6c37cc20cc9de17b1 - docs/sdk/models/shared/billedtotype.md: - id: bd8cd3328401 - last_write_checksum: sha1:38fbdc653b7897775a559d660b140d773be8dce9 - pristine_git_object: 38915c43103acc79a9d4e0181423f2545f5fc7ca - docs/sdk/models/shared/billedtotype1.md: - id: ca4de6c496a3 - last_write_checksum: sha1:67e2d2c100110ff2fc432cc90658992442185bb5 - pristine_git_object: 72f136eae73282ad781d2cbaf4dcfa637739275a - docs/sdk/models/shared/billlineitem.md: - id: 94d76eb3ef39 - last_write_checksum: sha1:0d3fa982ec7f5af835a3f1e7a79e5ad9e05f77a7 - pristine_git_object: 7445f79319385e0c1380ce3587f779b5a1acd543 - docs/sdk/models/shared/billlineitemdatatype.md: - id: 31e0378151e0 - last_write_checksum: sha1:cfa9feb338f55c9f59eaad3e750455732ff5c43b - pristine_git_object: 804e0926d3a7c78a2ee474afb03e111979aa3227 - docs/sdk/models/shared/billpaymentline.md: - id: 1b8c9b4e8bf5 - last_write_checksum: sha1:3f241e293fd78cc7364681554d78b32e49d5ea7e - pristine_git_object: d4eb171a6f05776178b3966426f8f52f9f3aaa0d - docs/sdk/models/shared/billpaymentlinelink.md: - id: 1f44a343c8a2 - last_write_checksum: sha1:1e7574ad8ee06c6a7d5ee48a26d835647ef90177 - pristine_git_object: 9505e7ca2c99862515b7025d0cf9e52acc808457 - docs/sdk/models/shared/billpaymentlinelinktype.md: - id: e9b828f95b8a - last_write_checksum: sha1:6c276740bccb64a60a84575e4fac71dcd1c7147a - pristine_git_object: c8d7b6dad7f80545077eda96d737036619dad2ea - docs/sdk/models/shared/billstatus.md: - id: b9f63ac7e29b - last_write_checksum: sha1:11ac74963e93087325981146156420fae3cfe557 - pristine_git_object: 772a8e672d2b7a367c5f4588e247c1f7952f9334 - docs/sdk/models/shared/cashflowstatement.md: - id: 8ebd09ce3f4f - last_write_checksum: sha1:f49ed5eb10288bcb9964c14a6019051b47bef34a - pristine_git_object: 8c74f63b1a9544ee1e3f21e991d902168a8bc7bc - docs/sdk/models/shared/cashflowtransaction.md: - id: 41011ee3872c - last_write_checksum: sha1:b084abdc34a0f98e647fda6430dc442ca3b5ee4d - pristine_git_object: 8badee45183109276a2c55f01d7df47824b3ac3f - docs/sdk/models/shared/clientratelimitwebhook.md: - id: 2ad187176bc8 - last_write_checksum: sha1:63392a9afcd0195b8a76e2ae786a31cc15cf604e - pristine_git_object: 48c4614e8345d98281f0749f8892fce5836cdd5c - docs/sdk/models/shared/clientratelimitwebhookpayload.md: - id: 455bfe8fe625 - last_write_checksum: sha1:ef7df221b6f7b8cefe58886c26d8cd323c1173ff - pristine_git_object: 4b75cc8d57a58d19fe11348dfd0e1cfe5e1072c3 - docs/sdk/models/shared/codatfile.md: - id: b32544e3a5a3 - last_write_checksum: sha1:a01d03daa46cd45ea51db99ddd30c9be9221bcf9 - pristine_git_object: ba864c136bc754b0e75e3565d65087ee908a5260 - docs/sdk/models/shared/commerceaddress.md: - id: 3a1bc8d687e5 - last_write_checksum: sha1:fa7005ad293c609ac1e0fa291593ee9c35eb3977 - pristine_git_object: cd13b42b05114cc3a2fde3428de4c65f48714cc9 - docs/sdk/models/shared/commerceaddresstype.md: - id: 537a22daa3eb - last_write_checksum: sha1:dee32905205cdd5c4faddc8c863902b56ee61a22 - pristine_git_object: 17b4fde5d0cdd66ab4285f810ae3651942b3cf4f - docs/sdk/models/shared/commercecompanyinfo.md: - id: d3f20f13184b - last_write_checksum: sha1:81c076aa7db424396226e0bc321bd8200b13e1c4 - pristine_git_object: 0dec229aae31e3590bcd3aed48c8631f88554f93 - docs/sdk/models/shared/commercecustomer.md: - id: 5a725b7e4179 - last_write_checksum: sha1:b61a76d4844418e806205af4da4e153ff5681fc6 - pristine_git_object: 9387b4c06d75763622b493167588b1ca3ce3ceeb - docs/sdk/models/shared/commercecustomerref.md: - id: 9c1c65eb3787 - last_write_checksum: sha1:c46585f9c93d9f818122eb477faa6e7717b57757 - pristine_git_object: 966a195d33497ef8e781ff38e83041c0006015aa - docs/sdk/models/shared/commercecustomers.md: - id: 9e4ac7e76bec - last_write_checksum: sha1:0dca02fd4b252cbd6ba46c32e841c6ac2158d429 - pristine_git_object: 4d5e5d572a7213698f26f94b86edc046e4c33cff - docs/sdk/models/shared/commercedispute.md: - id: a4f1ff87af8b - last_write_checksum: sha1:f8b2037c9355cceafbadcf3c4690e6d95f40efab - pristine_git_object: 695aba75c8cf0b228c83d363118fec37f73233f4 - docs/sdk/models/shared/commercedisputes.md: - id: 6eb410032e74 - last_write_checksum: sha1:298e37c3f1c18e392bf100b2807c9c9aa520b470 - pristine_git_object: 310623dd83c7d464d40e88d9c4dc69401d1ceeab - docs/sdk/models/shared/commercelocation.md: - id: 7c80f3bbd44f - last_write_checksum: sha1:502ea54f250e7f9fdac30f11ddc39f127589a19d - pristine_git_object: 9af5e871461009e35a7c901c01dfbfe3e2975f67 - docs/sdk/models/shared/commercelocations.md: - id: da4c4f6eef7a - last_write_checksum: sha1:35cc9b71a348452145b4ac10f745f5299c4e2f1d - pristine_git_object: daf41b284ee88c2ab2e30f4af1584162161c6a08 - docs/sdk/models/shared/commerceorder.md: - id: a337039b4938 - last_write_checksum: sha1:800b40f987d15ca137665881c9c83101bd757f6d - pristine_git_object: b2ce60c9af3eceea55efbc3ead5f9ef6fcb0ca53 - docs/sdk/models/shared/commerceorders.md: - id: b806ce53a4a9 - last_write_checksum: sha1:9edc093493b6c1bce4ed070cc3d9fd77d941213e - pristine_git_object: 8257e6f1f5137f72d55742e473f9552c4dc1ab4f - docs/sdk/models/shared/commercepayment.md: - id: 977d146d669d - last_write_checksum: sha1:e2ec7b5e13cdb800ee2827b3036fdff955d99ef6 - pristine_git_object: d3f17a6aafa43aff7e1145d07ae4384f0f90fc9e - docs/sdk/models/shared/commercepaymentmethod.md: - id: 1d9bd6545e31 - last_write_checksum: sha1:4ab8ea24ceabef11087b845907b2f1a8d9f663a1 - pristine_git_object: e1bde87da69405c4bdf8ff26f4ef10c98f7ae58d - docs/sdk/models/shared/commercepaymentmethods.md: - id: 733c37f871c8 - last_write_checksum: sha1:65b41c1656742e2f320b17db0b1f459161ca2d4e - pristine_git_object: 405f48b78038e1a3a83bf493f7cc14e28fc8ad53 - docs/sdk/models/shared/commercepaymentmethodstatus.md: - id: 9e4e21ac0d89 - last_write_checksum: sha1:01848397eb2671ff92be8c80342f6dd905aee8e4 - pristine_git_object: 92e18c75b89c3b2dd320c44a07b6b87dc6eef466 - docs/sdk/models/shared/commercepayments.md: - id: a950e23daf7a - last_write_checksum: sha1:63dda440ddbdd04a4cd574f7f574388fd907fa9d - pristine_git_object: 0fdd3b6733fbf1c1c73285fde1e7e7faf5c0eb28 - docs/sdk/models/shared/commerceproduct.md: - id: 6d458b150af8 - last_write_checksum: sha1:c80255edf754873bba65dfee9507c0f4c3317e15 - pristine_git_object: 2b3884b2f189a33d9a79dbc3202383c8dfc84da3 - docs/sdk/models/shared/commerceproductcategories.md: - id: de5b2d6ac8a5 - last_write_checksum: sha1:45c4486b960c81cf07ca349c923c66a7fe999c88 - pristine_git_object: cb4ea309d2cb5714721b350c9e0d9194405f7ac3 - docs/sdk/models/shared/commerceproductcategory.md: - id: 1f2b79060e03 - last_write_checksum: sha1:1aa3dce9a5e957d714cd74a34897d8f430f6c77d - pristine_git_object: 531d8f3fcd12a2c9ada68a04fad762a3491b78a9 - docs/sdk/models/shared/commerceproducts.md: - id: 171c998924c3 - last_write_checksum: sha1:ffddfebb1cbd97c5538cdab8dbdc192c1ea0e3ae - pristine_git_object: da1e90620d4cfcaf75c8056566d8001f89f1bc12 - docs/sdk/models/shared/commercerecordref.md: - id: 661ac44b74b0 - last_write_checksum: sha1:0a795179a3605a628e28b2b075857af171b8382e - pristine_git_object: 0f7ae3f1b01959b51eb831c45bda4c3302f70725 - docs/sdk/models/shared/commercereport.md: - id: dc4a6755e453 - last_write_checksum: sha1:9ccc4f72f58abb1027607d93267a07563d1a73c8 - pristine_git_object: 564acdb6416389b9dfdf3df8f39273baa9bed8b0 - docs/sdk/models/shared/commercereportcomponent.md: - id: 5becc5e51d77 - last_write_checksum: sha1:b000ec6a545842a7435c899e903247f38545fc81 - pristine_git_object: 740e28fef5ed18c297f696e983d74f2d15a0cee0 - docs/sdk/models/shared/commercereportdimension.md: - id: 25e59f6f9021 - last_write_checksum: sha1:9623aa6f2420cbbfcf30794d82715e77832a6088 - pristine_git_object: cfc6088e8d60c7b9079b6506d7d19bd151223285 - docs/sdk/models/shared/commercereportdimensionitems.md: - id: c6f796e165a4 - last_write_checksum: sha1:a2446a87102d888cb78c266649b6c987662b4800 - pristine_git_object: 18c3a52cb4dac1ad9208db8f7ae663660cb4e671 - docs/sdk/models/shared/commercereporterror.md: - id: 50f27f83df21 - last_write_checksum: sha1:2db87960d3391b34b31d1cc6e2739ae24c6488a2 - pristine_git_object: d89fadaf8a7b843d2e725a56c4da3157fab10397 - docs/sdk/models/shared/commercereportmeasure.md: - id: 8ac633ccfaeb - last_write_checksum: sha1:f82d95bfc10fdc1e9c06a6c579af7b3d698d1a8d - pristine_git_object: 8dac4174d16cccdf45734223aaebff9d7272fb7e - docs/sdk/models/shared/commercetransaction.md: - id: e2a8e7f8c07c - last_write_checksum: sha1:a643586ee31fdbf8d577c320cd383b16ffd1d2c1 - pristine_git_object: c62547c696cb9e35ba326cec85007eccd39cf24a - docs/sdk/models/shared/commercetransactions.md: - id: 279f71ddd296 - last_write_checksum: sha1:f5e57ae271a5b7c136e4a03c11a7cbace03edb1e - pristine_git_object: 08637b950b3914bb72cbe93a0c37112681c7e473 - docs/sdk/models/shared/companies.md: - id: d934c193ecb6 - last_write_checksum: sha1:a2fe2e9898b7732d92e09af62cf15b6aab7cc577 - pristine_git_object: 13f3c02f3e844182190e95f64ce3665c121c7945 - docs/sdk/models/shared/company.md: - id: fb5206b144df - last_write_checksum: sha1:ec749d3762ad3bdbe1ca63df58aaeb5df6fd1c4f - pristine_git_object: 15671506c97d7820d4642dcecea764d55b41fb95 - docs/sdk/models/shared/companyreference.md: - id: eb83cae3df56 - last_write_checksum: sha1:f1691eedca47d4b9608c9a26fbe58a75e1c2708e - pristine_git_object: 3672f8693397a0c27dd51235971debc53cb893c8 - docs/sdk/models/shared/companyreferencelinks.md: - id: bdd0ee48a65d - last_write_checksum: sha1:5570cccfa3b26cce6404bd0c0bfc653d191b48e3 - pristine_git_object: 9572994e582b80f8db18f72b03deeb24dff2f7e9 - docs/sdk/models/shared/companyrequestbody.md: - id: 3f3dfd0aa865 - last_write_checksum: sha1:321f85d28a07aff30aa8375dd91eee5f13131386 - pristine_git_object: 47d671965bef87231365883b3eb54048a640fe7f - docs/sdk/models/shared/companyupdaterequest.md: - id: cef525a660f4 - last_write_checksum: sha1:1e9e704b3662f08497f9b224f98e980b66664030 - pristine_git_object: 73b259b4443101bc6799ba66cee5f66d6f1e7359 - docs/sdk/models/shared/connection.md: - id: 1c171381dd82 - last_write_checksum: sha1:8b7924b00acd9214920f55884e2f7508f437d5bd - pristine_git_object: 08ef3ab94383bb44b4d54427f5dc7ddcd7d8852b - docs/sdk/models/shared/connections.md: - id: c39072f6f8dc - last_write_checksum: sha1:a136a841606db75cec1c587b64a222c475dbe475 - pristine_git_object: ec305971df9cb1efe2c727a7e04cfc09e1f8b7d4 - docs/sdk/models/shared/contact.md: - id: e5934fdccf44 - last_write_checksum: sha1:851863b5d392b11a6309c50b3018dacc30a92f82 - pristine_git_object: 877a7fdb4871a580ad02837fce4469417ef4ff03 - docs/sdk/models/shared/contactref.md: - id: 3e95a2cbce8f - last_write_checksum: sha1:3aec668bd150bd4ff96bd95c0d6d9e8e11a938a4 - pristine_git_object: 54b847e33ce9d83f2509f4e5284908f2934bde93 - docs/sdk/models/shared/contactrefdatatype.md: - id: 4abd06157ebd - last_write_checksum: sha1:8f04d26fae1d328c0b1ac75370a96e759ac49408 - pristine_git_object: 23bbd1caa5c0d6f15ff2856526f1911771b04c66 - docs/sdk/models/shared/contactreference.md: - id: a393d2298fa7 - last_write_checksum: sha1:a0744f613321d8aba1126b15d471ed41d01b80ce - pristine_git_object: 011c2b9a38a3b7bad8faa146d96edebe434c5f8c - docs/sdk/models/shared/createbankaccounttransaction.md: - id: a7c5a1543c3f - last_write_checksum: sha1:761b8baf56442562c20f616f18eef785b0e93ddf - pristine_git_object: 8dd3ef0ef20d33ac8f70cddf0318f079d86f5d1c - docs/sdk/models/shared/creditnotelineitem.md: - id: e346bd463d1e - last_write_checksum: sha1:30bae995c77a2f88b204bc6b81c4a6c47e78bda4 - pristine_git_object: b3d622bc96924d18a788bf7678663992b4831d0e - docs/sdk/models/shared/creditnotestatus.md: - id: d2df4dcacac8 - last_write_checksum: sha1:4038df17f1d35740ba19de8b01f8391f3acad25c - pristine_git_object: cf728eedddc188dda2e4cdea20f1b22ff7c64826 - docs/sdk/models/shared/customerstatus.md: - id: cee6ce30ff25 - last_write_checksum: sha1:c5c10d0d58def284b013aaaa30ab244ead19de1d - pristine_git_object: 5488c0cbb253d07480f669eeffcd808bb3af1cd2 - docs/sdk/models/shared/dataconnectionerror.md: - id: 993cf6eb3364 - last_write_checksum: sha1:d34c5b4e22d9b3874be9e4475db6959b34e11789 - pristine_git_object: 8c85db0d6cc7f16a7f8216be3d765fa24c0b3542 - docs/sdk/models/shared/dataconnectionstatus.md: - id: fd14e3dc6ca5 - last_write_checksum: sha1:35d61403b24c05a1bcca47bf3e0c86b0265e5f2d - pristine_git_object: 9afc43bf78b9e6673386e84d19f7cbbc005bfcb2 - docs/sdk/models/shared/dataintegrityamounts.md: - id: bbd1e24d7ddd - last_write_checksum: sha1:41931ab14fdf51bebfd9549f274c593b872f112c - pristine_git_object: 818a1fb6c3548c01896fea2d97e81beb0193322c - docs/sdk/models/shared/dataintegritybyamount.md: - id: 6e43b2857d50 - last_write_checksum: sha1:fc701d6f30cca551f173b38d99bc46206c886878 - pristine_git_object: 81786bc89d062ead5fdcef9438fdbdbbbbad3447 - docs/sdk/models/shared/dataintegritybycount.md: - id: e74262c13557 - last_write_checksum: sha1:0f52c9cd76e200105bd77854cd50561bc9fd858e - pristine_git_object: 8ce8e58fc0738ceb530eb202154b89e66859250a - docs/sdk/models/shared/dataintegrityconnectionid.md: - id: 0d254757c08e - last_write_checksum: sha1:d85951c1b7112eb9321e919bfb1d14fc5765e89d - pristine_git_object: d7007bee850337c9df308136e7931fd56b3e68d3 - docs/sdk/models/shared/dataintegritydatatype.md: - id: 72171025f704 - last_write_checksum: sha1:e682834513c57d55177702d369bdde4ecde4541d - pristine_git_object: 0baabb3bba09682ce4545f26515c43716db4f9c1 - docs/sdk/models/shared/dataintegritydates.md: - id: 2de048414d8f - last_write_checksum: sha1:defdd24b96cffe49edc1696fdc248706e807cfbf - pristine_git_object: ac88ae6b3c4033f2f0624f49628323684834048a - docs/sdk/models/shared/dataintegritydetail.md: - id: c599dd79e8d1 - last_write_checksum: sha1:89eeeb20142ec61b696d4465fec9de0e3b3d9041 - pristine_git_object: 214ac023fe276b8a36eda33eaa520975e1f15e0a - docs/sdk/models/shared/dataintegritydetails.md: - id: 2aef70c763f6 - last_write_checksum: sha1:a4a5cf16cb2310df3064608f38ca747dbea0a028 - pristine_git_object: e23970a63cf49e5a6b552f4b8719fb4d18663239 - docs/sdk/models/shared/dataintegritymatch.md: - id: 6120a3b20312 - last_write_checksum: sha1:8346dc4418d8213e72114ba3ce854b85e90a3875 - pristine_git_object: e9ef227d76a6e44f1dfbc3a06bd32d0f94d91627 - docs/sdk/models/shared/dataintegritystatus.md: - id: 506df60505b3 - last_write_checksum: sha1:41df590a5b2a0c39c32a78da35a375e57f7ed5fd - pristine_git_object: 66651ac33bbd9abdf2186de026718de6875f5c60 - docs/sdk/models/shared/dataintegritystatuses.md: - id: 0d92f37ac38b - last_write_checksum: sha1:e080aa4bc2647b0005e673bc9f74dfed2053fbd6 - pristine_git_object: b13e7573acc1b4357330762f40be763546943559 - docs/sdk/models/shared/dataintegritystatusinfo.md: - id: d48710b44e46 - last_write_checksum: sha1:bbba12a1073d1f0078200fef4f0c734b69707089 - pristine_git_object: af4d91c71aab089af2ed59259ed43c28bc1ec0b4 - docs/sdk/models/shared/dataintegritysummaries.md: - id: 987cf001532e - last_write_checksum: sha1:624a622de6167a9bb73ef39fbe76a36c6f3f58da - pristine_git_object: fe47022e3276b94cf91e06c25033ef5e2735e26c - docs/sdk/models/shared/dataintegritysummary.md: - id: dbfeeab1d510 - last_write_checksum: sha1:c7f3d4060f0d43b82dad784e6afff8b8c47628b7 - pristine_git_object: 1f0d17edd52d4781ee13fa48896285f5b476c7bc - docs/sdk/models/shared/datasetstatus.md: - id: 13ee7a38a328 - last_write_checksum: sha1:9c1cd2ae32adf13e760accdf6dffc113fa2cb772 - pristine_git_object: 74a540f7df1ef00880aab733bbaac71599b08b03 - docs/sdk/models/shared/datasource.md: - id: 1f8b943dadc8 - last_write_checksum: sha1:0bbba6ad44cf1403049c03383f535c9f4c764ca8 - pristine_git_object: 6d9a151b828b1d72e36f6690b103f34585d86f7b - docs/sdk/models/shared/datastatus.md: - id: cb4795d3f294 - last_write_checksum: sha1:5adc50ebc0bae63a3a0cc927c4f067c6017a3070 - pristine_git_object: 17799437eb525133ff29051bf06d9be302f98428 - docs/sdk/models/shared/datatype.md: - id: 0338d85c906d - last_write_checksum: sha1:0a040cb8b03d79d7340d55ef6a49fe8834ddacc2 - pristine_git_object: 657734b9068468119e63d302be69dd47d4b735ad - docs/sdk/models/shared/datatypes.md: - id: 673024637a09 - last_write_checksum: sha1:bcc4e4df4e88ef6d3f8addb9ce477307517922b5 - pristine_git_object: 2e9880028573c45eb80f8f625564231cc61d7511 - docs/sdk/models/shared/directcostlineitem.md: - id: 6bfa1b5fa55a - last_write_checksum: sha1:903b8862e59bfe9462712765ea7ce0e30e2a4388 - pristine_git_object: 555bf63d8309706e0e0efa27a787ab6c29d7796d - docs/sdk/models/shared/directcostprototype.md: - id: 3c68db049631 - last_write_checksum: sha1:a2fd216ccde13c8b218101261905676e71c5f08b - pristine_git_object: 2193a3acbb3a84a1f159ce1fde4c7bbd943d8488 - docs/sdk/models/shared/directincomelineitem.md: - id: 6b4faa62c643 - last_write_checksum: sha1:23633b2daf8e4c5b16be18dc24ffe22a0c191a1b - pristine_git_object: 1ac70e37b20327c1a07bf5ac85ceb997412fb5ee - docs/sdk/models/shared/disputestatus.md: - id: b0e23feb6564 - last_write_checksum: sha1:88637ca064732587995e8e8e2bd9a1dd52ab4b86 - pristine_git_object: 11f271c8914cad9007c1132b6f3ff4e19f144f88 - docs/sdk/models/shared/enduploadsessionrequest.md: - id: 5b8b928a0516 - last_write_checksum: sha1:a9427681bb6496b8baefcf709faed97b9260614d - pristine_git_object: 413e65a3721672a31e81e0fd80f119245a4a0c58 - docs/sdk/models/shared/enduploadsessionrequeststatus.md: - id: b76c9f1eb8ef - last_write_checksum: sha1:4779ffc30006791ebd58403371afe7e0a988898c - pristine_git_object: 7d4f730cb616e5f9be40d7a3c4ff3bf6e7b6fe7e - docs/sdk/models/shared/enhancedcashflowitem.md: - id: 17d2be12be3b - last_write_checksum: sha1:bec98cbd7d1cb45ef3baca4ab8b124e2d2e3a953 - pristine_git_object: 89ddc7c45435d376464dc5152d1b497dfe175ed1 - docs/sdk/models/shared/enhancedcashflowtransactions.md: - id: 7596b5621e94 - last_write_checksum: sha1:eb16dc9079f3ca1d9f52d753edd1b6ac5901a17e - pristine_git_object: a8eb0abe119c58f5354ec77cf8111b8e593cb54b - docs/sdk/models/shared/enhancedfinancialreport.md: - id: f81023689b33 - last_write_checksum: sha1:f834fd5313c1f134c44225614be185a0a10c026c - pristine_git_object: 2cbbe77e6ca74771e33ba79a312fd9240b0bf151 - docs/sdk/models/shared/enhancedinvoicereportitem.md: - id: bc1fb9469803 - last_write_checksum: sha1:ae6961419de5414196d922a9e154551e048b4072 - pristine_git_object: 060759bfa7bf2b1604b784d7a0f86616fec7bd17 - docs/sdk/models/shared/enhancedinvoicesreport.md: - id: 08e2b09621f9 - last_write_checksum: sha1:db4d8895519ace92108a2d6754de85a615f9734e - pristine_git_object: 3b78e6c376106eca289aa0fa1b770d1f91a6db42 - docs/sdk/models/shared/enhancedreportaccountcategory.md: - id: a46058e08e31 - last_write_checksum: sha1:35f84a001e6ea18e1bbb22f46dbdd287b9ce2cf6 - pristine_git_object: 485291024f8bcd4ef9a440f2c4bc7920a2d3567a - docs/sdk/models/shared/enhancedreportinfo.md: - id: 6fcc7312c3e9 - last_write_checksum: sha1:422cbd6d5aa3a82071edf86e26de94117284f9da - pristine_git_object: 4d6035f9e5fd76d2fe5cae962682c53207a5eda7 - docs/sdk/models/shared/errorstatus.md: - id: d836c01e48c6 - last_write_checksum: sha1:e372ab01bc684084331cb6c5bc115e2f6009a506 - pristine_git_object: 46e4b0c789394c4da2d7a0cc16532f29c0549de8 - docs/sdk/models/shared/errorvalidation.md: - id: a1197fba13d0 - last_write_checksum: sha1:aa012d2bcae54d5b2fe4505c6599099e052cde75 - pristine_git_object: 4068080a1d7577c0d20540f3eb19b37077ed8ce8 - docs/sdk/models/shared/errorvalidationitem.md: - id: dbec2a990008 - last_write_checksum: sha1:dce90df1ddc3d14eb44fb2d3e0b7edfa4a1b454c - pristine_git_object: bd2167efecf1d8d3908a710c0accc56fc35f28da - docs/sdk/models/shared/excelreporttypes.md: - id: 7ac7a3154e5a - last_write_checksum: sha1:a729dc2efb6f660f449c5c89e7bc2393bc057561 - pristine_git_object: 6ed859f8956ed6f0990ceddcf96e74866cbd58e5 - docs/sdk/models/shared/excelstatus.md: - id: bcc6f2d36738 - last_write_checksum: sha1:61489819f284447f4009fd4a11f18005ae2551fa - pristine_git_object: ccbb1aac279eff82747a73fb2d3551d538596d4e - docs/sdk/models/shared/filet.md: - id: fba4c1f10eeb - last_write_checksum: sha1:39b8ee7988caf1ea857941775923c20b4c8ba6ef - pristine_git_object: 023063b3a0cfec8b40749745c047a41846621645 - docs/sdk/models/shared/fileupload.md: - id: a2e9be15e3c6 - last_write_checksum: sha1:70b253d06a1791397e272c92b07b0451ef9f67b8 - pristine_git_object: e91529c0876ca2ff962fb1712f0df6543fca2dab - docs/sdk/models/shared/halref.md: - id: 140248af964e - last_write_checksum: sha1:0b729236743f8deda9322dc88af3e35e9ef7b955 - pristine_git_object: 861ce2336724df9c3b85f74a578d23d36da78484 - docs/sdk/models/shared/integritystatus.md: - id: a1427fc9f57a - last_write_checksum: sha1:700ee43cc9ef4fa3b6c9b2781b8decac4f6f2a49 - pristine_git_object: 2dbad568745963241237a364a22ed8666ec5b12b - docs/sdk/models/shared/invoicelineitem.md: - id: 6e3722a7c8be - last_write_checksum: sha1:6e847f81f2ad0a8acf1bb15484c2644bd1581f6a - pristine_git_object: 374c92b0ffad3a398b8f88b8e9d074f3b33fc26f - docs/sdk/models/shared/invoicestatus.md: - id: c672429fba88 - last_write_checksum: sha1:95529693a7cc818b1d0bf2356b7b1e50be33b165 - pristine_git_object: 8c9b49a540fdadd6d1e696610ef23af7af6f2b9c - docs/sdk/models/shared/itemref.md: - id: 23c7408988fc - last_write_checksum: sha1:6c661cdcf45117a6d2f2e2d2559bf8e6064c7145 - pristine_git_object: 95485bcd6c30e55fe33dd6d9a112a60564de232c - docs/sdk/models/shared/itemreference.md: - id: fb393dc063ee - last_write_checksum: sha1:6cc7e17cbe5f0913854d730bb97be0251c771031 - pristine_git_object: ed73c916b489074db2a9c2dc2a3adba8ee684c53 - docs/sdk/models/shared/items.md: - id: d1b7d7f548ee - last_write_checksum: sha1:5225149f239bd0583f35eaa075147243d11be406 - pristine_git_object: 9f605bcf298d0f10e73900111cf48a8fc9e3e27c - docs/sdk/models/shared/journalentryrecordref.md: - id: c800cccd21aa - last_write_checksum: sha1:1f8783fbc7a1b2de1f4a976b6c7e8624ac5c78e2 - pristine_git_object: ca0209b24350115cbbb9e937d4685a12aadf5ecf - docs/sdk/models/shared/journalentryrecordrefdatatype.md: - id: 4a9687c56488 - last_write_checksum: sha1:709c0ddb46bbc4abb4f7271203cb12396a62948d - pristine_git_object: 9403f888b9b46d8fa3bc3218644b0dd5f98a8731 - docs/sdk/models/shared/journalline.md: - id: adcae1802bdc - last_write_checksum: sha1:4cfae87dedc845f80a0afb727419b54612da7bf1 - pristine_git_object: 0be7fe960ec86b7fea776599043688ec9a3c2c01 - docs/sdk/models/shared/journallinedatatype.md: - id: 4ccd40511bcc - last_write_checksum: sha1:868275b20430bffb32c91c17ec5c0f7014bc2e5b - pristine_git_object: af9b7f56271c09a454bd6132f95603f3726c80ba - docs/sdk/models/shared/journallinetracking.md: - id: 59d19eee2778 - last_write_checksum: sha1:ac181229cceacb5f9d65acd15e0a32a8021a6b3b - pristine_git_object: cd40d31a57b98dfbb9b23d4fd18b34bafab2c752 - docs/sdk/models/shared/journalref.md: - id: 99340fc4ad2f - last_write_checksum: sha1:fd422cec85fdcbb36e0a17c1440b933451cff0ca - pristine_git_object: 7d4e581e3e09335def63590ee7f2561918afa2f0 - docs/sdk/models/shared/journalstatus.md: - id: 687f76af5c0d - last_write_checksum: sha1:a9746408a4e391b5e403300367b6b9bcf06f20aa - pristine_git_object: c86b9eb5d40c471700c195e3d85d72639145079b - docs/sdk/models/shared/lendingcustomerref.md: - id: 4438632e5838 - last_write_checksum: sha1:dfaaf69bbf98f377cf75d6003774b211a89ddcdd - pristine_git_object: 2d4a00fffee6cd1239e4333fce56aaaa7afb56de - docs/sdk/models/shared/links.md: - id: fa66a5b5f260 - last_write_checksum: sha1:222a0e7fab874fef5b01a27efb8d6b8cd38573c5 - pristine_git_object: 064627848fac50a40f1b3030141d1ff21254ccda - docs/sdk/models/shared/loanref.md: - id: bfd54cb07bf1 - last_write_checksum: sha1:f091c47c48d787d32e618e1b0abd88fe23dd19f4 - pristine_git_object: 1af7b95e21616fdaac6347e91889325cea5ad913 - docs/sdk/models/shared/loansummary.md: - id: fd7011474239 - last_write_checksum: sha1:56d75f584e3270c507583068d2d84a549874215e - pristine_git_object: 13af96cc138a548fc24852600c2e9e8ba83209eb - docs/sdk/models/shared/loansummaryintegrationtype.md: - id: 67a839125a97 - last_write_checksum: sha1:a8512aab7f5384ae5fe11506a853e4a1b11d2dc9 - pristine_git_object: 6f9be07230220c1793b57093f63e7e32b5797587 - docs/sdk/models/shared/loansummaryrecordref.md: - id: d14cde2c1991 - last_write_checksum: sha1:47a709df796e34ed84954ae407bb402aac86f0e6 - pristine_git_object: 496f0dc965b6cf8bd23bba8541bf2d66eb05e033 - docs/sdk/models/shared/loansummaryrecordreftype.md: - id: 1c53586f9824 - last_write_checksum: sha1:850c8f7362ca2bb6075a57b608abe85dcde245b2 - pristine_git_object: b06198b22f2f93c6221b7a53603e6b3f837477b6 - docs/sdk/models/shared/loansummaryreportinfo.md: - id: 005745485c17 - last_write_checksum: sha1:be644ccc0200b6464961fa9fe26924afeb22dd09 - pristine_git_object: af750a2ae543e39a8af64c924dd1c49e73f8acbc - docs/sdk/models/shared/loansummaryreportitem.md: - id: cc0215a9a1fa - last_write_checksum: sha1:79b6b7ed1e7dc35ee94eedea10eec98ba446e015 - pristine_git_object: d93e129cac28be6f4cb76335b62e97359f0fdf38 - docs/sdk/models/shared/loantransactions.md: - id: 0125b72e34f9 - last_write_checksum: sha1:5bdf592b1f1eacfac2d237a9919d22e64b2c7c34 - pristine_git_object: 7ac995e00e0dd52cdbbcdecaeadc72a69e8c9af9 - docs/sdk/models/shared/loantransactionsreportinfo.md: - id: 36467925e04c - last_write_checksum: sha1:aed04f2497da1b40c1ea6aab446723e09cae0f49 - pristine_git_object: ea83d13134c99e1fd608e872885e2a0d417e002b - docs/sdk/models/shared/loantransactiontype.md: - id: 05b0093de1c5 - last_write_checksum: sha1:be07ec6af3a39c874b88ee58df6a44b303e50528 - pristine_git_object: b6e765fb88069d5bee2b88eaeb1b63fbe7d5aff6 - docs/sdk/models/shared/locationref.md: - id: 6a76a6fcda3f - last_write_checksum: sha1:6cce1398232fa154f33730755467794bb46c4273 - pristine_git_object: 26e24ad7cd2f8feee47b3ddc28572f9b1b1df525 - docs/sdk/models/shared/metadata.md: - id: d5813bbccd6a - last_write_checksum: sha1:692737a8d839d8f2e661a6fe7ca72c9cb2bfb5d3 - pristine_git_object: 53c0fab7b28b850f915f1020d0d4709803a4924b - docs/sdk/models/shared/orderdiscountallocation.md: - id: 74b2d8c75cd1 - last_write_checksum: sha1:bf68954fab7e53f2dc80dcfdc217e0b891ea30d5 - pristine_git_object: 7c88b8fe4b4e39b0aa9968c4d73f3d9d209b95d1 - docs/sdk/models/shared/orderlineitem.md: - id: 7bbba967ca54 - last_write_checksum: sha1:d51a5b8f5e916d5b821a9d8d7f0254b9c71e2c45 - pristine_git_object: d3eec3000d4049ab001d54a22410629480519cc9 - docs/sdk/models/shared/path.md: - id: 095dfcc7780c - last_write_checksum: sha1:6cc655a7278e07f255ba1d19d20756d06c734e4f - pristine_git_object: 51c23afe6b767a7ce72a01ea38da0823a128fd37 - docs/sdk/models/shared/payment.md: - id: ab67f649d30c - last_write_checksum: sha1:16dc6126ef65b75964514213d7d1c7a193b76348 - pristine_git_object: cc461c5f17b0ecc78b65800e8efe98167d73590a - docs/sdk/models/shared/paymentallocationpayment.md: - id: 7c8d8cb596c1 - last_write_checksum: sha1:876c18aefc533bc23ae26bdd4ff64e1d4446dbbf - pristine_git_object: 962c0b526cad247f8b459708c74e32c23818899c - docs/sdk/models/shared/paymentline.md: - id: fc2c5b79aaac - last_write_checksum: sha1:ce298e5f2f886e4aa1b3dace93ef3b8df9f9980d - pristine_git_object: 490ee529ab2f0ea2cfb673a1494ec8a91894af75 - docs/sdk/models/shared/paymentlinelink.md: - id: 5b9c62a5f532 - last_write_checksum: sha1:aa65aaf5686fb3f5ddb9f985dcfe159ad578e1c6 - pristine_git_object: 58f9428d38829694cdee22bb5447e102ad8b831e - docs/sdk/models/shared/paymentlinktype.md: - id: 2e09f6da870e - last_write_checksum: sha1:ff76f5be665c2cb29812d29411785b23bbd2fb7a - pristine_git_object: 34230b497b992266c108cd2c5c13b20cb3159a53 - docs/sdk/models/shared/paymentmethodref.md: - id: e6360e9589be - last_write_checksum: sha1:e975640100515880e784d19c441edccaeb1625ef - pristine_git_object: f3215064bf0b55af997b6286210366557ca2d099 - docs/sdk/models/shared/paymentref.md: - id: 5226763847a1 - last_write_checksum: sha1:144a97d50ccf6b8cda79e9dca591b786586b6e9f - pristine_git_object: a5d9aa5467f76fcf3d1daebc50c348067bf39670 - docs/sdk/models/shared/paymentstatus.md: - id: 27590ba86cb4 - last_write_checksum: sha1:59623c5eac011c654439e1f997f7e40d33f5e486 - pristine_git_object: 1edfc15ef5b9107590926589b921654df329a7c8 - docs/sdk/models/shared/paymenttype.md: - id: ff95e2250f2e - last_write_checksum: sha1:08ff1f12b9aedcddbbf604bdb4d4d5d62d751f29 - pristine_git_object: 1d1196dd1a4065c496aef0833482da4e1dca91cf - docs/sdk/models/shared/periodunit.md: - id: 35196ffa834f - last_write_checksum: sha1:5a0126e35df3c3b7268bd659cd0f23c96eb9b718 - pristine_git_object: 49a6a721e770c3e852d93ce9aae79c2563a87f43 - docs/sdk/models/shared/phonenumber.md: - id: c5805e0246cb - last_write_checksum: sha1:3694e55566f357c33630b8a33810a425bea147b6 - pristine_git_object: a4bc66c25209f68e4cb52b005e80a84a98b06709 - docs/sdk/models/shared/productinventory.md: - id: 0ef459691ed5 - last_write_checksum: sha1:8b876f2e69e27721109e68b393c915059d756272 - pristine_git_object: 1b8e64ad17b9ee40fda239dcfb3ab2aa44723062 - docs/sdk/models/shared/productinventorylocation.md: - id: 89610f219c5e - last_write_checksum: sha1:757fa46a20587abf9e0c20c5caf2fac1d3800652 - pristine_git_object: ff235666d20453c1535cdbc0f3ede8bd45027838 - docs/sdk/models/shared/productprice.md: - id: 9b04e6260747 - last_write_checksum: sha1:7b20ba39c883566b8233038c53d31a6367d34a16 - pristine_git_object: 493d0a43f0017652a340b91dc3ad28efa10b1c51 - docs/sdk/models/shared/productref.md: - id: 0ebd42ce4463 - last_write_checksum: sha1:6e038729fdc7efbbd047f1d6bb712f9bb1e5fb21 - pristine_git_object: c2d3d09ead33d03fa8f3a048c21f179f3d2d30a4 - docs/sdk/models/shared/productvariant.md: - id: ddc2c1a916a3 - last_write_checksum: sha1:d58a6cf5e741b5d20966b0482426e72d4f22f41b - pristine_git_object: 2a331748e3af85f25ecb1a3cd89f767fc1d67b2f - docs/sdk/models/shared/productvariantref.md: - id: 21b7953d9647 - last_write_checksum: sha1:3dc87e88a963500713acf72eccea5d3b111e5c59 - pristine_git_object: 40e3d1673750f1499f0efb3a03997556551ea2d6 - docs/sdk/models/shared/productvariantstatus.md: - id: e8c625d68015 - last_write_checksum: sha1:7b5d072628ea69ce631adb1034018534b704454e - pristine_git_object: 0f1412a513cab9a8cf3138d0b6cd679486884f8e - docs/sdk/models/shared/profitandlossreport.md: - id: ba58336604e5 - last_write_checksum: sha1:00f1abb8a05f785b8a036d8302530573fa2e163d - pristine_git_object: 9cfd4968656270ca493f8455eb84e850408e0cc3 - docs/sdk/models/shared/projectref.md: - id: 83d4a948ce08 - last_write_checksum: sha1:b33060965e7e9530177f545b22cd00c7e9d477bd - pristine_git_object: c7e3be4b180b8b5ee1234a10dc138da2eec6e373 - docs/sdk/models/shared/propertieaccounttype.md: - id: ab2132b7e645 - last_write_checksum: sha1:76b8db868ff1ef7dc496a037ae8142a122ffcad0 - pristine_git_object: 7ebe4fda3109951422fb6936a9863ad4588232e0 - docs/sdk/models/shared/propertiedatatype.md: - id: d607368df9f0 - last_write_checksum: sha1:a80efca823df3e62d451f4025484f3abe2fb7821 - pristine_git_object: f699ea9a22f23cca430257e7352676237bf61f2a - docs/sdk/models/shared/propertieitemref.md: - id: 28b75149ed6e - last_write_checksum: sha1:a1db6d88527d64d02f9958b61f088808ef8ca437 - pristine_git_object: 9c73211fcf341dc8031ac54bf87974c09a6e72cb - docs/sdk/models/shared/pulloperation.md: - id: dcbd4e59dc15 - last_write_checksum: sha1:828b43123e0be9a9eda2a79c4cf4c13df529f1b2 - pristine_git_object: 729f7da816e564b0b58db701badc4ef4e11a2eaa - docs/sdk/models/shared/pulloperations.md: - id: d7ead2cdeffc - last_write_checksum: sha1:72f8133aae7b949a70bf35c4e8dc4d5ba2681a28 - pristine_git_object: c9347207088f20ce06e00b3e1863907e424bdea5 - docs/sdk/models/shared/purchaseorderreference.md: - id: deaecc268f28 - last_write_checksum: sha1:f67cb584672f4c246cb5b624cf000310e3b3289e - pristine_git_object: 288a9eb7bc92f0ca18531794fd4f98b0c3f5c2ba - docs/sdk/models/shared/pushchangetype.md: - id: 53824528b4ac - last_write_checksum: sha1:cc5580e4b8f5bbb90e54ed6a48f29d94756d3e31 - pristine_git_object: ac21ca3ce91288d0219d17facc8150e31671d43c - docs/sdk/models/shared/pushfieldvalidation.md: - id: be50fc267930 - last_write_checksum: sha1:a3621b3e1dd68cca8f07959a8540a9c996bae88c - pristine_git_object: ed234963098637be6ae1827d2ccfc5540d75e760 - docs/sdk/models/shared/pushoperation.md: - id: 862ef21ffa69 - last_write_checksum: sha1:5efb493d6bc71522da6d02f82198798c2e88e71d - pristine_git_object: dbe5dc5cee37dbbbc45ad8cac1e45dc5fdca0565 - docs/sdk/models/shared/pushoperationchange.md: - id: be046171d3af - last_write_checksum: sha1:15dbadb03e8c5a00e2a3b30ebe7ee5a6b2209bf8 - pristine_git_object: ebdfc13f95ffc6d4cc7fd516d6c70e919689404e - docs/sdk/models/shared/pushoperationref.md: - id: 41359c8937dc - last_write_checksum: sha1:8a0cb4b69a7e1cb2383c2c847a02d39153f16b77 - pristine_git_object: 2d78c7e12a12947ea7462850130057cffcba76a1 - docs/sdk/models/shared/pushoperations.md: - id: 7efd8c6374e2 - last_write_checksum: sha1:a92c6487d8cbdc37be15497b84e993071644c8ad - pristine_git_object: f2e0fdb77ff8d843517a119e654f4ecb77f5babe - docs/sdk/models/shared/pushoperationstatus.md: - id: c01cab5bc311 - last_write_checksum: sha1:053c8e47b359a1604cb45570845cc272d225e6a6 - pristine_git_object: 1d66b4c515114ff5fe569b9b8645b17aa71ac5c5 - docs/sdk/models/shared/pushoption.md: - id: 28a9b11a0d39 - last_write_checksum: sha1:d70ec4226ee05dd7d674b75a294c047bd22c7b8f - pristine_git_object: f15b51b8f6cb4d88ee433edb19b0f2d999f489d7 - docs/sdk/models/shared/pushoptionchoice.md: - id: 3dc25ab7bea6 - last_write_checksum: sha1:365ce41919114aade11a8f2f1153d351a4034a6c - pristine_git_object: 5c77d3bec71113e8235cb1d900d385ca6a65675d - docs/sdk/models/shared/pushoptionproperty.md: - id: 06f73d448642 - last_write_checksum: sha1:2aa275968f8bdcce30568e5520cc3dade4d2ac6f - pristine_git_object: 34f23ec21de57a273caf46772dc900940754b243 - docs/sdk/models/shared/pushoptiontype.md: - id: cc1fc9e23267 - last_write_checksum: sha1:d9d84907458fc994db8f8a8c2203acdc88028ede - pristine_git_object: 36de137459d7b5d7747dfa852ba80c6c91caf28e - docs/sdk/models/shared/pushvalidationinfo.md: - id: 10ddca1b4793 - last_write_checksum: sha1:67e6191471523eb676c36ef9c961bb7caed87f37 - pristine_git_object: 3901ee39443ad7382c631dab7941e48898b25911 - docs/sdk/models/shared/recordlinereference.md: - id: b0d879eb4f08 - last_write_checksum: sha1:6201dcd59b0979eef018113f3bc300c5b165bdf2 - pristine_git_object: 4d470eaa6bf6aeb0ad895be56bb89c370774a923 - docs/sdk/models/shared/reportbasis.md: - id: f88d55835de3 - last_write_checksum: sha1:aff2478ed3fd4e1e8f6b244bec109772b8c604a8 - pristine_git_object: dbb866584304003921d1b3b2923ad850498aed18 - docs/sdk/models/shared/reportcomponentmeasure.md: - id: e285b5339cc4 - last_write_checksum: sha1:f0200d85873f9fad1676c1902037604bbbd28750 - pristine_git_object: 192c4551be84eee0f29f62e9a861c756ab7ee41a - docs/sdk/models/shared/reportgenerationpayload.md: - id: 56be38c48e9a - last_write_checksum: sha1:79d037be1b75e30efde1efe5ef11f89708b91acf - pristine_git_object: 451f9f6cf566d077f39ae53e4427d6180a67a70a - docs/sdk/models/shared/reportinfo.md: - id: 086c9b1da66e - last_write_checksum: sha1:1d7d606d505b9b25645dac152cd4c54738b6075c - pristine_git_object: 6ce2d7a223f86006bb5b735f5e1b1569155f8795 - docs/sdk/models/shared/reportinput.md: - id: 6a2c175a704e - last_write_checksum: sha1:455bac73c421d054e6a0d1e6eef366c68f46ec21 - pristine_git_object: d2252b2cccbb87cc0a25b552f98ceffc2921f5ae - docs/sdk/models/shared/reportitem.md: - id: 8afa607008cc - last_write_checksum: sha1:c28c7d93acfc19116af9ef5dcca63d0160dab848 - pristine_git_object: 4d594bfd50a2927f5a4e29d51571dc794e5c6bb5 - docs/sdk/models/shared/reportitems.md: - id: efe9ace76f91 - last_write_checksum: sha1:5dcc745b1dd14e74cb3068d5e5fc1d6c949d3cc2 - pristine_git_object: 0c2d69d8e708e4e028b4d42bedf9014fea78452c - docs/sdk/models/shared/reportline.md: - id: cebf4c9de883 - last_write_checksum: sha1:7893468235e8079c99caa2d103048b8cef29332e - pristine_git_object: 82332cb17849d3a3bdd5c5fa7d26c3f26887e749 - docs/sdk/models/shared/reportoperation.md: - id: 053ee865ca9d - last_write_checksum: sha1:4784e0c91167f97f901d2ff4d81e01a53a54f34f - pristine_git_object: 1a39130d169fe5351d6c5863f9a05d9e39b5a3a6 - docs/sdk/models/shared/reportoperationstatus.md: - id: fca638212749 - last_write_checksum: sha1:2cb0ff5f8c8e16f62ef4fb5a041b1dee8d485063 - pristine_git_object: 175ea401be46d1d8ad039b2c3a10f72972c7971b - docs/sdk/models/shared/reportoperationtype.md: - id: 3edfa5194a1e - last_write_checksum: sha1:d8e82d8cbae4cec1038c38c36a929406c6f6b00f - pristine_git_object: 43a427cf2e6231af4c7be11c29b8959b93fd0d92 - docs/sdk/models/shared/reports.md: - id: 60230e402129 - last_write_checksum: sha1:9339a5af63cdbbd995bf7a19af5c9787279d5486 - pristine_git_object: da564d172da28ae426411fab122e29eb67c82bfc - docs/sdk/models/shared/reportsourcereference.md: - id: 1ca564b26794 - last_write_checksum: sha1:517d091a6a0659cd55df9b4c83dc9bda2ba4f48a - pristine_git_object: 8e730427b476c3a7f89fd34bcc43686a3f0898a9 - docs/sdk/models/shared/reporttype.md: - id: 5709f7a23a7f - last_write_checksum: sha1:831635f8a0a0b7030f59331a3ff8e7d7b4cac41b - pristine_git_object: ebcf017f5853ddaf2167b565857b2be72526f20c - docs/sdk/models/shared/routinginfo.md: - id: 0df4ff9bfd7a - last_write_checksum: sha1:b481c96b97dea4194032dbf31bd4af925d3de5c5 - pristine_git_object: c2e306b2773d99ec51a2446e9a88d872dc1b7cf0 - docs/sdk/models/shared/routinginfotype.md: - id: 89ece993c058 - last_write_checksum: sha1:2c6e96b0e4097c3e355b50bbda4d66ccc8efd119 - pristine_git_object: 1756a871bf1920514bdbbacba83e4e1658c2ee18 - docs/sdk/models/shared/salesorderreference.md: - id: 3a4e4c1b6e15 - last_write_checksum: sha1:da8161d64c9da4ebad4d1006ab4f0a8c50e9a495 - pristine_git_object: e499d82b74d8511bcc3ab1273f788b87960e2589 - docs/sdk/models/shared/schema.md: - id: cb5f22dc4fd2 - last_write_checksum: sha1:b881b8d39105f45a06ee7721c22f4a1bacfa50dc - pristine_git_object: cbb919ddffa34644612d0af33ef4d883d665c8c7 - docs/sdk/models/shared/security.md: - id: 972729c50a07 - last_write_checksum: sha1:73f8eb4eecb615d91b4cb0b95618e82339e25768 - pristine_git_object: ca7d23c39d3ec65827f341bf565b8ae9fa55aaea - docs/sdk/models/shared/servicecharge.md: - id: 72bb623b6c08 - last_write_checksum: sha1:97c8eeabf17b1adce754bf20ec2eb4730a32baea - pristine_git_object: 9b0ea2515e33a8ee6c3bf43f5fedd69b4dc4608f - docs/sdk/models/shared/servicechargetype.md: - id: b99405999906 - last_write_checksum: sha1:20e806e25690c5b9466cbee8c7e932a5f0244d71 - pristine_git_object: 559028686ca2338c529daae346ae43f08031c517 - docs/sdk/models/shared/source.md: - id: fffc69ad7304 - last_write_checksum: sha1:9736f506a530d64bb932fc59ad316ab19c284567 - pristine_git_object: c6f1ad991e5271073202db8a5e5754532abfeeba - docs/sdk/models/shared/sourceaccount.md: - id: 5d0b671865a7 - last_write_checksum: sha1:abb9cc241af27f9197ad955847053cac3d39ff3d - pristine_git_object: 6d1dc566e60db583a52dfcf2d72f1e4db1f22826 - docs/sdk/models/shared/sourceaccountprototype.md: - id: 92a052035349 - last_write_checksum: sha1:daf4cce68b34efa215e6959052c7c8818530f7d6 - pristine_git_object: 7b2cf557c585594ef463cb7aff982bbcf8f43d9a - docs/sdk/models/shared/sourceaccountstatus.md: - id: 880cb0adee76 - last_write_checksum: sha1:ea78e86bb7046ba470a766ea85694eb278fc3546 - pristine_git_object: 40739c05282db9e84eb91a509a7e17122f24eb92 - docs/sdk/models/shared/sourceaccountv2.md: - id: 7753759638f1 - last_write_checksum: sha1:eb6185659cb65dea92a5377d00ff1e152df66710 - pristine_git_object: 97a80867ee25deab5f197040fb2cb1eaee423e73 - docs/sdk/models/shared/sourceaccountv2accounttype.md: - id: 56fee97c1823 - last_write_checksum: sha1:696828fb603d56a5d41bcf2edcbf1c7d196fd43f - pristine_git_object: 15b961e3055b543be78d86ca3b34f13d05314a0d - docs/sdk/models/shared/sourceaccountv2prototype.md: - id: 6b82ee044a9e - last_write_checksum: sha1:9711027521f39ed1c5e3c28e46014d08166b476c - pristine_git_object: ad83962e9257015b43ce4b5fbdce1770570ea6a4 - docs/sdk/models/shared/sourceaccountv2status.md: - id: aa6be0dd93e1 - last_write_checksum: sha1:86775756d6e2d46097612417e1f280dc5c41849d - pristine_git_object: 71b89fadd0d3df626f460116b1a405890f21090f - docs/sdk/models/shared/sourceref.md: - id: bbd6f85282a2 - last_write_checksum: sha1:d80dd6ba912363bd54bf56163b7fa7dbbd9c416d - pristine_git_object: 0c46958e9fc7e27d19551c12556859908b57db2f - docs/sdk/models/shared/sourcetype.md: - id: 3ec91bdaf5e7 - last_write_checksum: sha1:1ea7431894febf38ff4732399d384834797be81e - pristine_git_object: 7d824bf2ea78001443b58823e8e40e575ed248a8 - docs/sdk/models/shared/startuploadsessionrequest.md: - id: e53dc764f635 - last_write_checksum: sha1:c0406015ad94adda6da03767656bcabb86a55d8c - pristine_git_object: 7e3e595e879e0815c3b8d17dbb907a7340875d4e - docs/sdk/models/shared/startuploadsessionrequestdatatype.md: - id: 0b4a3e7b27a0 - last_write_checksum: sha1:b941d5d58bcac8d03997be7e37d889db413438df - pristine_git_object: ecad385ee4ded1cd398d96b5650d206662c0d5e9 - docs/sdk/models/shared/status.md: - id: d40dc096aca1 - last_write_checksum: sha1:fa0180836d1a47a92acb7c08c65ac824753ba71b - pristine_git_object: f327fb2bcfa2acd75179c84fc446d452f7235571 - docs/sdk/models/shared/supplementaldata.md: - id: 0cbf04657884 - last_write_checksum: sha1:eca00f6da6e6ff544b72b9c60408b7310685a335 - pristine_git_object: 7c00ee8073ebe3501ab9f86e461a7ac73bc7b7e4 - docs/sdk/models/shared/supplierref.md: - id: 8bf8e8bdeb32 - last_write_checksum: sha1:6aace0825ea2d13c41186f1e53ec676f52e88313 - pristine_git_object: 37baefe578056ae9e1932f31fe7a35798ed8cad6 - docs/sdk/models/shared/supplierstatus.md: - id: 51c838d3b574 - last_write_checksum: sha1:252dc8bea13575d07068f9c66f7318c0cf59f06a - pristine_git_object: 28233fe0e77fc83698cb53f6401d5e3802002a55 - docs/sdk/models/shared/targetaccountoption.md: - id: cb24a65c1618 - last_write_checksum: sha1:c7b708af3b33120972915bd37bf7bb6314e09253 - pristine_git_object: 6b378f391a46d4d0203a23ef9f0efd2b36048a90 - docs/sdk/models/shared/taxcomponentallocation.md: - id: ac81b60bcd15 - last_write_checksum: sha1:4da498c821f054b82fa37e362e3bafbb8fc52cbd - pristine_git_object: adecd20f30daea299c2671b016a8dad1c72dca2b - docs/sdk/models/shared/taxcomponentref.md: - id: 93a1fedcf86f - last_write_checksum: sha1:a0e250244c29d48af95b98f435db1f404878b4b7 - pristine_git_object: 76ccdd2b211cd53df1e3967281e57d6eec7863d1 - docs/sdk/models/shared/taxrateref.md: - id: 1843523bea03 - last_write_checksum: sha1:0b55e65bc433608f9d63fdbe3bf8886be518b75d - pristine_git_object: 29ad7c5f372df53402837a780fd64ebc1bd3092f - docs/sdk/models/shared/taxratereference.md: - id: 62bc29d8e3e8 - last_write_checksum: sha1:ba3f8c6326ac08baf442595f980fcee79d197580 - pristine_git_object: 3c01025859ce88f238c1574e3cac024184c0a2b4 - docs/sdk/models/shared/tracking.md: - id: f9e5da5d6403 - last_write_checksum: sha1:263634985842384d17e6a1bc6ed8f11eebf4b77e - pristine_git_object: 78c888a51b90e29627a9ceb0e6b93b62134ebfe5 - docs/sdk/models/shared/trackingcategoryref.md: - id: 4886c0122e7a - last_write_checksum: sha1:50fe76e9a344fa3fc53e7c33ffe5c66d44bb2a8f - pristine_git_object: 091c946b0d715c48f3323b1c45773f5597db3700 - docs/sdk/models/shared/trackingrecordref.md: - id: 6af19878dd3c - last_write_checksum: sha1:52f5afb3072c36acd4ad69b26ddd6373730375bf - pristine_git_object: d45b297a2b3bf585736494a76c760db8caf9c69b - docs/sdk/models/shared/trackingrecordrefdatatype.md: - id: f72bf3cb1774 - last_write_checksum: sha1:3fc5f41581412c274a1d5c197de6e639ce42bc66 - pristine_git_object: edf78e33710c7d0b497c8c4f3ca17754fd915923 - docs/sdk/models/shared/transactioncategory.md: - id: 9c98eb0d67e4 - last_write_checksum: sha1:fdc4211c40cc20f84575d0cb77ad8730d1fd7953 - pristine_git_object: 73f979af3ed0f519ef37d987e4c08c501c4e04e1 - docs/sdk/models/shared/transactioncategoryref.md: - id: 86997f884813 - last_write_checksum: sha1:c51160a30d20fea507f23f928f92e9231afc6948 - pristine_git_object: 95b5090ff17bd84e6f00392f10bdb8216c5c7230 - docs/sdk/models/shared/transactioncategorystatus.md: - id: 21bd849f8c58 - last_write_checksum: sha1:8f2aeada2d4b859923675e54c5b43c7bbc38f00f - pristine_git_object: 1811e9096d87941720a1c26c19fc9048ab9cb8bb - docs/sdk/models/shared/transactioncode.md: - id: 66a9c446d240 - last_write_checksum: sha1:eb42d09f31984c455531c14142a1f4c9fd9c2541 - pristine_git_object: 7a0dc65c5c9487cbfab98b1d01245ae01a90a8c2 - docs/sdk/models/shared/transactionsourceref.md: - id: b53cb6efd95b - last_write_checksum: sha1:7e3c86f552789391bc40cc3bb66de759904e831a - pristine_git_object: d78744b49a9cd923cf9f35f5f97dca5237c18fc2 - docs/sdk/models/shared/transactionsourcetype.md: - id: 93c619a1bbc7 - last_write_checksum: sha1:4362f882d6b672f443e76296eb46386bf6192f9a - pristine_git_object: f821130b8ba05c8b96425fc216c696428109475c - docs/sdk/models/shared/transactiontype.md: - id: 4d9adf9591bb - last_write_checksum: sha1:7184d2b15b5289137d69ccb3cc5ccc6fd34d774e - pristine_git_object: 2aac41db802d4222e9fd1899d00f981dca97b462 - docs/sdk/models/shared/transferaccount.md: - id: e541f58e29c9 - last_write_checksum: sha1:3c59c3ed61d7593f10cce6f644506e540ba31511 - pristine_git_object: c46fd17d214e6ef2f0ddeb16d09e48837c1ef018 - docs/sdk/models/shared/type.md: - id: 04645f7284d8 - last_write_checksum: sha1:250b1c1641ed07d148a9268c31a938649a2d310d - pristine_git_object: 2c71c2c0c00f6cc347bb525d4eb85de00f60cdb9 - docs/sdk/models/shared/validation.md: - id: b9ffd70ca98d - last_write_checksum: sha1:7853548b5c88a6bec857b3604e0ace4a65378544 - pristine_git_object: 7ce9347aa386221a4517f57f71b24cbff8503627 - docs/sdk/models/shared/validationitem.md: - id: 4e3848a26890 - last_write_checksum: sha1:4e64ec9d791efdc8f8865cfb25074d2fa5c3a411 - pristine_git_object: ff48a239e0288aff99b26ea0cc8fbf63e1ce2e60 - docs/sdk/models/shared/validdatatypelinks.md: - id: 914dfac5a982 - last_write_checksum: sha1:51368ec072ac5aa279facba9c663b1123910fd54 - pristine_git_object: b008d0d276f1a6cc3ec89650b4400e2e09f685a3 - docs/sdk/models/shared/weblink.md: - id: f69de72356af - last_write_checksum: sha1:e92886096c0870605afbb20b992ba3606689908a - pristine_git_object: 7e60d511dff1dcd9d6d1e293f106e1a5cbe55b14 - docs/sdk/models/shared/weblinktype.md: - id: 0d9ffa2c9165 - last_write_checksum: sha1:1211202e01b6d6bd9ba5f88ccef958e1090e6bea - pristine_git_object: 454b29bc0f13ce6e22197d909c26a64860fa4eb6 - docs/sdk/models/shared/withholdingtax.md: - id: 7c1b2cb50f83 - last_write_checksum: sha1:4fb38c720909470bca7708877e8693ebbf043bc9 - pristine_git_object: edbbd1dc746db2d6dd88b5a5942ba4d14fd5496a - docs/sdk/models/shared/zero.md: - id: 81a576cc924a - last_write_checksum: sha1:b1d5cdc86821901089d8a1fc5fa103bcfd9c9e61 - pristine_git_object: aecb7dcb669cf8dcb11d975a2f8d8a5480ad2405 - docs/sdk/models/shared/zerodatatype.md: - id: 44c6e83bc212 - last_write_checksum: sha1:e40deed0b8f78e8bf1caf090e0099ff67051dcb7 - pristine_git_object: 1ec41221b82e1091e1e2f61057a8a3aedd92de1f - docs/sdk/models/webhooks/reportscreditmodelgeneratesuccessfulreportgenerationwebhook.md: - id: 96c28ff649b6 - last_write_checksum: sha1:2680b3c937a478b2287c15920c9a2bc9712d3190 - pristine_git_object: 35423ca5c6d56f77040220aec55a5b86e14df4fc - docs/sdks/accountbalances/README.md: - id: fc17ae4b2cc5 - last_write_checksum: sha1:838051ac854f4c6bdc1b37f800d9c5ab88502486 - pristine_git_object: 8f98ca8da25297e0925d19e744be59a47b004671 - docs/sdks/accountingbankdata/README.md: - id: 085b34b19801 - last_write_checksum: sha1:04275db3b4845b2e2a93f60a4252c19df5e853c0 - pristine_git_object: 59aa4b0c33664b44ef654e7cae3c4c3fbef54404 - docs/sdks/accounts/README.md: - id: d6c754b1ca96 - last_write_checksum: sha1:7a358929e1c7a076df59efca906cdf8ac54eb85a - pristine_git_object: eaa9c6e9645af670b1fdf7e0e59023d2c61ef4c9 - docs/sdks/accounttransactions/README.md: - id: 2bc776ad1ad6 - last_write_checksum: sha1:4be24e7548cf2995f5600c9bca3025337a2a7f6f - pristine_git_object: 4e928fff11443872998adfef206c31b4631b2fa7 - docs/sdks/balancesheet/README.md: - id: b360644f6413 - last_write_checksum: sha1:e30aaad6b78bfb1551d3f9c1d2ed0f7d42712695 - pristine_git_object: 9d11e701e07ee6760e8578f28674df038280b4d7 - docs/sdks/bankaccounts/README.md: - id: 510ffee224ea - last_write_checksum: sha1:68ab24a66273ff9957e76f53f9c0e03432f2e9b2 - pristine_git_object: c928b4af4621c4951bb3108cb040c00818283ba9 - docs/sdks/bankstatements/README.md: - id: 367be2ea83cc - last_write_checksum: sha1:6107b4d2b7df4e275a78496e5aa39037f4eb66c0 - pristine_git_object: e160fd67a369e75d398184a4bc05029b5f871891 - docs/sdks/banktransactions/README.md: - id: 4d2b2b0db893 - last_write_checksum: sha1:ca1adb373d75e16ecf3346264d1e1f00ab4fac97 - pristine_git_object: 21995b2e66eb1627d60ddb0ca23834d81d342316 - docs/sdks/billcreditnotes/README.md: - id: 9f712b3a2216 - last_write_checksum: sha1:8e87a24552765e1b207285c248bf4274ce1d8cf1 - pristine_git_object: faef766bba23dbcce7492c1990f9ad215eec5c31 - docs/sdks/billpayments/README.md: - id: 9436cf9c44bd - last_write_checksum: sha1:f24b225c49dc01b024cf89c02610a820cd848d85 - pristine_git_object: 8ddcc69309317dcafdb0bc576afa70ac4457c28d - docs/sdks/bills/README.md: - id: 2a9c97966ab7 - last_write_checksum: sha1:2f37c302594533e3a6c4e1558e3e265c4ea2bb8e - pristine_git_object: 228f284234546ad043369f455d204ff30e5d3cdf - docs/sdks/cashflow/README.md: - id: 811ea28e72fa - last_write_checksum: sha1:e0b36fa23a056802acc8a8ab23f2e4f0c321656c - pristine_git_object: 961c8d738d1521df922313790f9d99a0b2396cea - docs/sdks/categorizedstatement/README.md: - id: 1976d2dc6b6b - last_write_checksum: sha1:c2a84cba9ba26e4cdfae4fdede37b87ee5c29fae - pristine_git_object: 61ae87dc8d2ea00c0c4c43e80a3e74b92bc18ee6 - docs/sdks/codatlendingaccounts/README.md: - id: 0863fc22c6d0 - last_write_checksum: sha1:2246d8c12be812dc29d0173b3ef6be4f7b00fbea - pristine_git_object: c857c5d1bc6cd9f5c7e12825f95a790f1489f7db - docs/sdks/codatlendingbankingaccounts/README.md: - id: ba36c0f2ad4b - last_write_checksum: sha1:1a1f7cd69740b93376f323186754c4b43e16ff5d - pristine_git_object: d7bbb4f7e25e8653ac2d58597060a78f5748b841 - docs/sdks/codatlendingcustomers/README.md: - id: 215de0060dff - last_write_checksum: sha1:ccd976ef64e6f8f6d495b0ea419d4b27d673f674 - pristine_git_object: 7b34c6318193da26c0ea55efa8439c8a19bbb5ff - docs/sdks/codatlendingdirectcosts/README.md: - id: 5ce0ac8aa3b3 - last_write_checksum: sha1:45f6918535c0a7bf8bc7c03d48195ab2ba32462d - pristine_git_object: d108c8ae573d9538cd1530cecc24f79b9c9f3864 - docs/sdks/codatlendingloanwritebackaccounts/README.md: - id: fd66aa26e517 - last_write_checksum: sha1:7b58f73bcbed2cc21f4a8bc3d4ca51a3e3c40417 - pristine_git_object: fb6cbd6990edf41b1dce366b2cfaa13a9d8d5b0b - docs/sdks/codatlendingloanwritebackpayments/README.md: - id: 9cc1197f1729 - last_write_checksum: sha1:64b71ab6e7a3c9e31035f19c2e0aa66b215a5f55 - pristine_git_object: b8b86b9ea18bf6cea177783e26e600cfd4e1a817 - docs/sdks/codatlendingpayments/README.md: - id: 3f8c449427a2 - last_write_checksum: sha1:62dba91a537d6762462021dc868f9016b7ef34d2 - pristine_git_object: 24afae3968ea068e2b178b981b474a64f94569b6 - docs/sdks/codatlendingreports/README.md: - id: cb899625316c - last_write_checksum: sha1:4b235cc666756db615410ec755b6801da619a7f5 - pristine_git_object: 1074843e3b09d8dbbb82d240926e5ee5e346e848 - docs/sdks/codatlendingsalestransactions/README.md: - id: ab0da5c0acd4 - last_write_checksum: sha1:0b8d232ff40d6d24bdbc0fa09dad9305bfacb62d - pristine_git_object: 642cd66e2d85085ee4ba9847a0dcc693ee61b133 - docs/sdks/codatlendingsuppliers/README.md: - id: 01d513a71eae - last_write_checksum: sha1:96666e063547d658cb7b9d842d37ecd9bd5014f1 - pristine_git_object: f89334473dbe625b3fb8e97a108cde3fd3df8d26 - docs/sdks/codatlendingtransactions/README.md: - id: 3d7bd081ed2a - last_write_checksum: sha1:5b7def4be2c79603e2d419c8e69c185d6e65e227 - pristine_git_object: 6c87d64760bbc103f521d9cd0054d0a64e45ae25 - docs/sdks/codatlendingtransfers/README.md: - id: 7eb84908e77f - last_write_checksum: sha1:24b735bd788367333a12b87bfa6e49f495e1230f - pristine_git_object: 25ded01b15db8a94212e835d16a06f8e8cafb757 - docs/sdks/companies/README.md: - id: 67e8a49afa67 - last_write_checksum: sha1:692ed457019b6e385f0c0c06be2919840c530b05 - pristine_git_object: b7917418aa5be42bb6ae071557a74a0bb21cf48d - docs/sdks/companyinfo/README.md: - id: 198b84d5c0c5 - last_write_checksum: sha1:841536695b300a7c60373b585be3e8ec922245be - pristine_git_object: 18892a45b01fde91e4b6eed3294d42a1ed0f3312 - docs/sdks/connections/README.md: - id: 3ef8931411ea - last_write_checksum: sha1:814a486dc0f38fc214dd97a38d0b0ac7d9d4cfd5 - pristine_git_object: 60c2b19f325d25291947fa8287f937e464a2ba57 - docs/sdks/createoperations/README.md: - id: 885340aa3721 - last_write_checksum: sha1:667a92832e6ae4f4ed0063e7ea3e369481963181 - pristine_git_object: b6193e645990d6e4daaf13ed4ff8b9842c3309db - docs/sdks/creditnotes/README.md: - id: 2d6d27cce955 - last_write_checksum: sha1:a3b7f41b1137b970b053ef6e44c58053666387b8 - pristine_git_object: 706aac595094b38cf0476188a4fdb0f33c59164e - docs/sdks/customers/README.md: - id: 9332759cffc2 - last_write_checksum: sha1:5ce24b984c01e1e619010d6524fccccac25b7df2 - pristine_git_object: 3df545302f53cf8cecced85a88bddbf5c33609c3 - docs/sdks/dataintegrity/README.md: - id: 8d747fc58581 - last_write_checksum: sha1:5003cb0256d8df19734712d7e67c9db34826e892 - pristine_git_object: 0b5a8be766b67594cf22bcda601d9a86d21ce1f3 - docs/sdks/directcosts/README.md: - id: 81abe301abd2 - last_write_checksum: sha1:77cb721259126a79760539e1057513d22775d8a7 - pristine_git_object: e89fecf2851a1412cfce198596a8e4db835ea76b - docs/sdks/directincomes/README.md: - id: 697e9d8b3057 - last_write_checksum: sha1:d908acd24185c2c4946b2c886889826a12952e11 - pristine_git_object: 67c8e001c4fa6180b106be4e0b3965f3b7506612 - docs/sdks/disputes/README.md: - id: 5b14d189cefd - last_write_checksum: sha1:ba8bd548845bb0b67312106fc0f38717328f95f5 - pristine_git_object: 287006823f175b2b2b557a0dd315598342989661 - docs/sdks/excelreports/README.md: - id: a93037f0199b - last_write_checksum: sha1:01c05a77c2e6f52c3f814e06bff467c665855e4f - pristine_git_object: b08ec509612c640275c496a459f8b21ec53ddcd9 - docs/sdks/fileupload/README.md: - id: 9f03a16f224e - last_write_checksum: sha1:bbcaf76b0b34206a8703f26469d0b0b3eb03dc78 - pristine_git_object: 500e9790b0dc8eae8fae0dbdd0b97336ad70d735 - docs/sdks/invoices/README.md: - id: a3f76a06eded - last_write_checksum: sha1:205d9a97075f3796be373e69318ceaddda02e82d - pristine_git_object: 5b3d9e5219469303402fbd42e0cda09b1d16936c - docs/sdks/journalentries/README.md: - id: 7723a6f499f0 - last_write_checksum: sha1:cf73f19a5ea5d6a76973d3b31632b1fc59816e7b - pristine_git_object: aa303b50c62fb76e109f11ed39775f2c87ce0d7c - docs/sdks/journals/README.md: - id: 255f988e78fc - last_write_checksum: sha1:3946d11e0013b453648f59cbb5c4d6e996a10b8e - pristine_git_object: 6ff11df54f7c7593f3d95d6121274103fd2a5a58 - docs/sdks/liabilities/README.md: - id: c5e7f6b0e7bf - last_write_checksum: sha1:81113ad212e14cc598a4fb2612839f06896391c3 - pristine_git_object: e8035cc82ba5509b6ec1ac5628916aef0db30373 - docs/sdks/locations/README.md: - id: 18f4bc68d8e9 - last_write_checksum: sha1:1d7c863e04d22ed0f025159930d663be294ee326 - pristine_git_object: a5fe0930d5d9674d24a476a073fcd5d7c0fe2f56 - docs/sdks/managedata/README.md: - id: 5fccd800fae5 - last_write_checksum: sha1:875a2427df686e8d6ed4e69c92ae0e7415549578 - pristine_git_object: d8a02c3b3833b6af56fc8c63cd3ccfde4bf541f8 - docs/sdks/managereports/README.md: - id: 4e77e498ae11 - last_write_checksum: sha1:9a0a410c7b76b44cabb5d352356d56680748d686 - pristine_git_object: 7eb1fea09ae4e7855f9b1a55edc2dababdd60d6d - docs/sdks/metrics/README.md: - id: a8545d964e21 - last_write_checksum: sha1:e107ac48a32ba4d5e34daf14bcb2cd7c029efd6e - pristine_git_object: 10eb5c98f3234353fb006d1e5786c49b8186fca1 - docs/sdks/orders/README.md: - id: fc5b2caf3cb2 - last_write_checksum: sha1:c68f436cfbff7a77a497c3f2bd30df0dac3391e7 - pristine_git_object: e98d3deb273db927b0bb13c8565f4e3f85d874c0 - docs/sdks/paymentmethods/README.md: - id: 98b2df26035c - last_write_checksum: sha1:735fd00e9a5ba115d41c0b25d85e3c5bc4bb5b30 - pristine_git_object: de245176f0642ff641d019bb4729473f5e5e64fa - docs/sdks/payments/README.md: - id: 0ddb15ec8c20 - last_write_checksum: sha1:b859f49a1e3fc2cd5200bb847aebacb0896494dd - pristine_git_object: d4032928cb621bda0a846ccf5c5682b222ec527a - docs/sdks/productcategories/README.md: - id: 12bcba957d63 - last_write_checksum: sha1:23d35c69e5141b0be9f884060abe58f1b8cfca50 - pristine_git_object: 718072328917e1fc84ce3bc276aff2cc13fddff1 - docs/sdks/products/README.md: - id: af06255e12ab - last_write_checksum: sha1:23fcb377ac6412c94f3a04ca395958c82bdc41d7 - pristine_git_object: 2b52abfc308bed819d9a389b9dc94946b5a24044 - docs/sdks/profitandloss/README.md: - id: d782c67c7753 - last_write_checksum: sha1:a14f8e90c89155aadc852cfdd4ebaf11542bc37d - pristine_git_object: a62e90273d36e108bba36012ba6f34e69f06403f - docs/sdks/pulloperations/README.md: - id: 472049941a82 - last_write_checksum: sha1:a86432eeae6f22def0cf8646378524cff9aad167 - pristine_git_object: e0e2211caae4e188d8bfe938ed80193573fd04d0 - docs/sdks/refresh/README.md: - id: 7cd2d2e66f4d - last_write_checksum: sha1:5a083165bc5bfdfba00b0534d82827021596e401 - pristine_git_object: 8f5b8cf5cea63121043b02db85947672cd872d3a - docs/sdks/reports/README.md: - id: 66bfd66f1efc - last_write_checksum: sha1:a9a04cdcd3ad03a63a17839e9d16eeaffc4948e1 - pristine_git_object: 8cdc6dd535e4b9c41d9ae4bf1ab43654d527c88d - docs/sdks/sourceaccounts/README.md: - id: 19ba068a7927 - last_write_checksum: sha1:6bf613e1a9bed154e9c42bf4ec27f995d240db57 - pristine_git_object: dd7236ba54d4f4c0b70257b5a5642ea9e982404e - docs/sdks/suppliers/README.md: - id: 85867190cd79 - last_write_checksum: sha1:3b5e5336d8c73715798bc8ea9d1912be40645ca1 - pristine_git_object: 1b3fcfee7f79ca13acd12b1d87036f3b267732a2 - docs/sdks/transactioncategories/README.md: - id: cefdcd16b0bb - last_write_checksum: sha1:286856ae232927b8fc59bf7720e9df44ebd3843a - pristine_git_object: 64d15b9310371dfe6564b62659b816a3f54b1c3e - docs/sdks/transfers/README.md: - id: f56918861798 - last_write_checksum: sha1:f987f9cb3721decac7f909250e9e2c8bf445e86e - pristine_git_object: 1d86fc6e2b0021e2f02ce56c804efc9ecd3003e8 - docs/types/rfcdate.md: - id: 5f9756408fae - last_write_checksum: sha1:57b4b3cec635cbd12767ed8672f96e257ef88845 - pristine_git_object: 5d8591eb5a5a2603d0b385aeb88e6325fd503eb8 - eslint.config.mjs: - id: 461c8d07f6da - last_write_checksum: sha1:9398f326377fe47f67af2df6eb6370750c0790b4 - pristine_git_object: 67bccfec985be20a00970d90155752832dd47135 - examples/.env.template: - id: 52cbe5afed92 - last_write_checksum: sha1:103eb2aac91458d1c2d84b9d319f29b126523653 - pristine_git_object: 5aadc3950c561cea934a95dcb854cc6f746e653b - examples/README.md: - id: 9d0f69d6e677 - last_write_checksum: sha1:ba6c16454a08bf37103dd589184880c722f8d1b3 - pristine_git_object: 323c78483502746e2a4c6174b6ff7c8113c5a0a7 - examples/companiesList.example.ts: - id: 21346a1a073c - last_write_checksum: sha1:7cd8e90a8d1cbf17326a5e520b84eb9043678744 - pristine_git_object: 2e4cc515a3ca5cd2070cfa421f94ca63e94caf72 - examples/package.json: - id: c1d7b0ec8e7e - last_write_checksum: sha1:0d85c31e4e42e8fbfdfc80f77c8a6928f67424d0 - pristine_git_object: 82ff3fb9a4b41e9a0740c407dd7beb18447832a0 - jsr.json: - id: 7f6ab7767282 - last_write_checksum: sha1:4bf59a037fb18cd5191c96dd86df715e7dcc2455 - pristine_git_object: 4c4fb917e0c31e4ca447b24fa8277aa48f634896 - package.json: - id: 7030d0b2f71b - last_write_checksum: sha1:e4410091172ac11c3a98c7330182902864f1a857 - pristine_git_object: ca2baf1a900002f0bb09951fe595191090133e05 - src/core.ts: - id: f431fdbcd144 - last_write_checksum: sha1:49525d0dec70f391c6df8f42bfff384389507790 - pristine_git_object: 818188522d4c698dcb1e5ac017d9820fb9930ad5 - src/funcs/accountingBankDataAccountsGet.ts: - id: 2d753f6b4114 - last_write_checksum: sha1:8c4ce61c1456ecdb8d9418a2f52a1b992e600b7e - pristine_git_object: c61bd490d6d0871020e4bf8b333da53508a3d2a1 - src/funcs/accountingBankDataAccountsList.ts: - id: 18a02236d7cb - last_write_checksum: sha1:05e14e79137dc566bc8b1540ad2d925df628d63c - pristine_git_object: a36205a0be4a3ec04a04c33b64690ec189412675 - src/funcs/accountingBankDataListTransactions.ts: - id: 880c4d3c469d - last_write_checksum: sha1:1bf364865a1638e7cc4edf15cec4f0576c7c02e1 - pristine_git_object: 636bd2627356ea86ac6a028dbefa65668123b8d0 - src/funcs/accountsPayableBillCreditNotesGet.ts: - id: 7af86a1c5b45 - last_write_checksum: sha1:0c4cc4f55cc417f0a3f2b17133f8ac948ff917fe - pristine_git_object: dc72f1de3f74f5e589b77b9cdc28dfd49b87f451 - src/funcs/accountsPayableBillCreditNotesList.ts: - id: 1c6c74a4600c - last_write_checksum: sha1:865473179c18250462946f2e62a83516d6deda1d - pristine_git_object: db750f42c4e9709e7610416a573073c71077f0e8 - src/funcs/accountsPayableBillPaymentsGet.ts: - id: 7e0cfaa8ba09 - last_write_checksum: sha1:1b46f74dd839df027a1dafaea9f2133656442832 - pristine_git_object: d4695833059cbf1080e41e3a6cb15862738b3a73 - src/funcs/accountsPayableBillPaymentsList.ts: - id: 242210cb9c3f - last_write_checksum: sha1:ab76c3b78526d5696ed9fc5b37325f6831605115 - pristine_git_object: 37a380b478b7eef6f239fa4b5017f681b2acba1f - src/funcs/accountsPayableBillsDownloadAttachment.ts: - id: 4c65d97d2bed - last_write_checksum: sha1:d8c106c0332a2c378fa06f42ebe19691b018dc68 - pristine_git_object: 35197cdf37b58e3ab2ec53bb3de903e0470c1ad6 - src/funcs/accountsPayableBillsGet.ts: - id: 2cd774b6b82d - last_write_checksum: sha1:27175672b21c3b4eb9af2a6434b4b0a9e42234c6 - pristine_git_object: c9057ba052b1698af99604ff9d5c53467517f142 - src/funcs/accountsPayableBillsGetAttachment.ts: - id: b4edb1c98280 - last_write_checksum: sha1:b42bb29cd25304bcb03f1feb70aa0b50032f9994 - pristine_git_object: d223fec44270952d7559708d4df92b9072fddfa4 - src/funcs/accountsPayableBillsList.ts: - id: b525a2be31b0 - last_write_checksum: sha1:cc87b062695ab727a68034d5cee49012315bd7d3 - pristine_git_object: 3c2acba9db435e3d9ca748d9ec3c10a616114686 - src/funcs/accountsPayableBillsListAttachments.ts: - id: 765492a5cc74 - last_write_checksum: sha1:ab497e2d03f13f9543e7a43dfa116c5e276aa97f - pristine_git_object: 463992944e0c8e9a9275102b9d157715094cbb79 - src/funcs/accountsPayableSuppliersDownloadAttachment.ts: - id: f4552aca4eee - last_write_checksum: sha1:34edf4de65f00cc0c979e3f4dec4d7d317fadf1e - pristine_git_object: 8fb90c5c092a453f1d581925621eb9f4f0f4f5a0 - src/funcs/accountsPayableSuppliersGet.ts: - id: fb8da3d6bbb2 - last_write_checksum: sha1:24c0ef0485d51658beb6a29617dc2962d47ad534 - pristine_git_object: 6172234db62b0a4a2197146715546845d346e30a - src/funcs/accountsPayableSuppliersGetAttachment.ts: - id: a4e4ffbf375b - last_write_checksum: sha1:378b0342037ec14c4389e2b5d51a14816cef6ac0 - pristine_git_object: c5141c10f646e71071b4b50f733ef825a952fc93 - src/funcs/accountsPayableSuppliersList.ts: - id: b221f30a8318 - last_write_checksum: sha1:b7aa79bd0fb09343cccb56e045151582d60e0e9a - pristine_git_object: c2f9a6a724f0527372c851c43f30ea0de5bab2ed - src/funcs/accountsPayableSuppliersListAttachments.ts: - id: e8f1bd6debbd - last_write_checksum: sha1:8c6d7616f8a54b546f1dc09619d31922c3f72f9f - pristine_git_object: 1608f0dca9f06ee30ba480a69bb513c596f1c759 - src/funcs/accountsReceivableCreditNotesGet.ts: - id: 88687f3b442c - last_write_checksum: sha1:ee05c8ef2bd08745e18e65e0e0f1bc4d87371614 - pristine_git_object: b3402e546c09ddf8979507257e72d8ff3bb4fcd8 - src/funcs/accountsReceivableCreditNotesList.ts: - id: 15f11105f526 - last_write_checksum: sha1:9f1bdd470311d0e6fbb3b78a403e7953c4eeab0f - pristine_git_object: fad520c7e5cb8f605f34a71fb688cb38abc4b08f - src/funcs/accountsReceivableCustomersDownloadAttachment.ts: - id: dcc116b07635 - last_write_checksum: sha1:de81a497f9d3fdd166fbeba955bc392080323c62 - pristine_git_object: 0d93b67b3e3af0ef7b1ecd4474959c2f8fdfbfc3 - src/funcs/accountsReceivableCustomersGet.ts: - id: d4ab367d98bd - last_write_checksum: sha1:ac9546e5c2ceb33d552085da2f075eb17b8dd92a - pristine_git_object: dbdfbcb1f916a63ae9afb394cbe7f329c7c0f305 - src/funcs/accountsReceivableCustomersGetAttachment.ts: - id: 59e744688fb8 - last_write_checksum: sha1:69bbb9e09081d6d179df91ab9b1bce7f150f9327 - pristine_git_object: b5e619add923b5d840ed92cd02fcc8aacaf75163 - src/funcs/accountsReceivableCustomersList.ts: - id: f4a06727853a - last_write_checksum: sha1:9654efeeda48cc2e978078153cf43f7e6e9b8c6d - pristine_git_object: 7d0046d37beb3f19705e653042ef489bb6d4579d - src/funcs/accountsReceivableCustomersListAttachments.ts: - id: dae1d487b826 - last_write_checksum: sha1:97589c48c02fac6527d388d90a1180d28d123ba1 - pristine_git_object: bf11578ee6ffb2e1839ba96799f198ab8186ea07 - src/funcs/accountsReceivableDirectIncomesDownloadAttachment.ts: - id: 90aca3e3b25e - last_write_checksum: sha1:71fe7dd81044b103e89cdf1f2ef6da7c2ecc6848 - pristine_git_object: f3cc96fa098c75b18cdc2ac3a02f868b9bf00362 - src/funcs/accountsReceivableDirectIncomesGet.ts: - id: 4cd8f2c35673 - last_write_checksum: sha1:728d75f37881c35d45117f508cd4ee72f3643105 - pristine_git_object: ec1c2358ab8c41fb3206d3c46085996d57f7a6c2 - src/funcs/accountsReceivableDirectIncomesGetAttachment.ts: - id: a0eea5bbe73e - last_write_checksum: sha1:cf7be1d745d30b15f04ba77f388c92f38f54d802 - pristine_git_object: 9516cf38fa386dadfafda5a9a09a960e4d23f761 - src/funcs/accountsReceivableDirectIncomesList.ts: - id: 959f2361a388 - last_write_checksum: sha1:552e2caf6bc5c9869b40a9aa3e4c76021182af53 - pristine_git_object: cdfc1ee6d85c465c4ab3e6f0ceb1d7405630d000 - src/funcs/accountsReceivableDirectIncomesListAttachments.ts: - id: 4c80a89fabf7 - last_write_checksum: sha1:5f4daea2f56a56a93269dd4c709d57d4be63ca2d - pristine_git_object: 3447460b69858e73ae8955244e15598aa43eaf80 - src/funcs/accountsReceivableInvoicesDownloadAttachment.ts: - id: 834363d34796 - last_write_checksum: sha1:1c0482e5659e6281309c15ec960d4a441e79040f - pristine_git_object: 2e1ec215a8436e1020771e283ba14c1094224cfa - src/funcs/accountsReceivableInvoicesDownloadPdf.ts: - id: 2e0bb401f2bf - last_write_checksum: sha1:67e902477dacd07435a868069708e98ad73d60fc - pristine_git_object: e509c752c1549ed1d00678039444229a08c7f881 - src/funcs/accountsReceivableInvoicesGet.ts: - id: 81e52427750b - last_write_checksum: sha1:d7122438cffc9d211f8ca8a0ad76cbcd451c6cf2 - pristine_git_object: 887c90e9afea741f8bdf6f797c1757d400bf721f - src/funcs/accountsReceivableInvoicesGetAttachment.ts: - id: e9addebe070e - last_write_checksum: sha1:852076da21171cdfb71728ba4f6a17dca2a7c559 - pristine_git_object: 4ca33ed77d81d26710853df354a71998e8857d23 - src/funcs/accountsReceivableInvoicesList.ts: - id: 70ac5b7ec276 - last_write_checksum: sha1:95b9101d3da5f139835d715dcf89479b4a28ec23 - pristine_git_object: 9f04482f3019a39651ad25b18c04fbcb27c147f8 - src/funcs/accountsReceivableInvoicesListAttachments.ts: - id: fc7b73008eb8 - last_write_checksum: sha1:92473498023f386b39888f156fd0388ffb8849bb - pristine_git_object: c1c822db8a3319bd5d91e8914b710a012be08690 - src/funcs/accountsReceivableInvoicesListReconciled.ts: - id: 8c3a4b3cf129 - last_write_checksum: sha1:36558cf7666e81656436d3e0b2b6ea6a4784644f - pristine_git_object: 6b2b1675d1588f3aa70de8b862283f1b1873c78f - src/funcs/accountsReceivablePaymentsGet.ts: - id: 0aec04828899 - last_write_checksum: sha1:ec3c7df2f5eb863004a293bdb63732a25849bbce - pristine_git_object: c9a5a135aa388b571c0067312f59bd5be8465f17 - src/funcs/accountsReceivablePaymentsList.ts: - id: 0503eed6191b - last_write_checksum: sha1:104473497cce52712ed4a84743690db82c9e727c - pristine_git_object: 19eac5e37d4559d94f040bf9d40586be888a5c55 - src/funcs/accountsReceivableReportsGetAgedCreditors.ts: - id: 75430461f5da - last_write_checksum: sha1:e32e3a9f7a6a7a3dfc5a0f2a970c155ebb22237f - pristine_git_object: ccb5b0dc1de794dcdc2824b62a0cdb6b4f100bf1 - src/funcs/accountsReceivableReportsGetAgedDebtors.ts: - id: a33af9818403 - last_write_checksum: sha1:ce0c1ff20ae276b41a26bbd54dd81e37a2deb975 - pristine_git_object: 6ba9225ad649809c9cd3869d02aaa392a9998f49 - src/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.ts: - id: 920d3b935314 - last_write_checksum: sha1:ab202a674fa6a3cf6e74fe1a04ceffc16490da79 - pristine_git_object: f02a95db3fcff267daac3482097deaee89775ca3 - src/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.ts: - id: 5304eeb86ff8 - last_write_checksum: sha1:e3e28ee39933f8055a95f3f971897055522a4480 - pristine_git_object: 800dbd215e95f89549cfa4af31f30129efdc6f22 - src/funcs/bankStatementsEndUploadSession.ts: - id: f8bec197a076 - last_write_checksum: sha1:bed67e5ed9a711321066978f6d5e5dec6c6d0162 - pristine_git_object: 3d1719bcc866df1ccd5bc3078be2876cea3ff07d - src/funcs/bankStatementsGetUploadConfiguration.ts: - id: bb90ea104546 - last_write_checksum: sha1:5bb7200aa7405306e15374e13aa8e603818f4bd4 - pristine_git_object: cbbc5840ac1289093200975535a8b3022c02a260 - src/funcs/bankStatementsSetUploadConfiguration.ts: - id: 71aa191af103 - last_write_checksum: sha1:9799fa7aa928743a49277c7c510d834bfee802b0 - pristine_git_object: 4e9d046b7aa5e2b0d52325bc2ec46ee85b9e6826 - src/funcs/bankStatementsStartUploadSession.ts: - id: 040b1d2d32bb - last_write_checksum: sha1:3fe9130ba61eef246b53f2a225836a4f71d14255 - pristine_git_object: 55d0802de572d58a70345f5ce643773ab5c51207 - src/funcs/bankStatementsUploadBankStatementData.ts: - id: df01b50d7791 - last_write_checksum: sha1:75ac4a0d012c8e5f152f24ed31e26b3303d6d92a - pristine_git_object: 28de47b780260bc647487386a3e89974a095d467 - src/funcs/bankingAccountBalancesList.ts: - id: 4174cfeceb61 - last_write_checksum: sha1:ba0e99c1cec6cd949a762ba10b7ea2acf7f544b3 - pristine_git_object: 69711de437de3b1a5f5b0b9f671183d49f243ed5 - src/funcs/bankingAccountsGet.ts: - id: 2dfce6ee0be9 - last_write_checksum: sha1:35a47a1914b4b0bfaef1c0504c0757efb69a4f09 - pristine_git_object: 77a1e1b716c310113c46d10e29cb8398ecf0d110 - src/funcs/bankingAccountsList.ts: - id: a6a27acb9c72 - last_write_checksum: sha1:d53ef32e6e71346233830fee18e87df43f93a545 - pristine_git_object: efa9d141f902c3a893244eb9f81391634dc1d0f3 - src/funcs/bankingCategorizedStatementGet.ts: - id: 83b77ccfbd6f - last_write_checksum: sha1:0a175397f0938d78d3f9b876694407ecd56415df - pristine_git_object: 1672aa8deed501b6aa178709685efd0eceaa0809 - src/funcs/bankingTransactionCategoriesGet.ts: - id: 009bdda731c4 - last_write_checksum: sha1:018f95936bc832b6ab434acab24fe1db307abf46 - pristine_git_object: 3ed15b78bb85caf49e93c52ac1f06515fafd30dc - src/funcs/bankingTransactionCategoriesList.ts: - id: 97e7bc6eb8a9 - last_write_checksum: sha1:d8d29ec6b165a87af089c1a6998f01db6e1f179e - pristine_git_object: 98d66062bbef4249d0e9c725cc2fdb55327f8201 - src/funcs/bankingTransactionsGet.ts: - id: 07575bd124fa - last_write_checksum: sha1:65a3fd5f6a5aa3ac0b8c3eaa6fed9b620a667e1e - pristine_git_object: 8c114eaa5551cce7717f11229a2a31150ac7383e - src/funcs/bankingTransactionsList.ts: - id: 61f5af6081fa - last_write_checksum: sha1:39e7f221db9b285854cbe2e21f633a4638618d67 - pristine_git_object: 0e90cd21bd45c356afe0c97aa6afdf0aee2ab36d - src/funcs/companiesCreate.ts: - id: becfb79b6222 - last_write_checksum: sha1:5192c8304f4b62fa3dd88ec06248c436228c0229 - pristine_git_object: fad79b59e66b02cb2cc294bb9a5daa0a49acda6c - src/funcs/companiesDelete.ts: - id: d4b8d3c15935 - last_write_checksum: sha1:f69576214fb953b2bd4473ee337d7c336b5cab55 - pristine_git_object: e79e4d006c8fd0c52ab2a6b985a7453bbc1d8c1b - src/funcs/companiesGet.ts: - id: 497c5e9320c2 - last_write_checksum: sha1:90e2a26a36adbca6384b2ef3aae46a8ed0f4f802 - pristine_git_object: c1ae1a50963bb720233452053df194a4f58ca71a - src/funcs/companiesList.ts: - id: c57fb769a99c - last_write_checksum: sha1:75d0878bc4df5dc57e47b2ddac15c72e448b718d - pristine_git_object: 78226f3c2ce3cb9452bd6ba8d10e86bf87c5f452 - src/funcs/companiesReplace.ts: - id: c141cb91cc73 - last_write_checksum: sha1:8a1c43a4fff9a3a4f585292a25ea4a3f4855d241 - pristine_git_object: eafef5f7554b9100df88efd92d505333fd24d8ff - src/funcs/companiesUpdate.ts: - id: e3d7bd676c21 - last_write_checksum: sha1:3475ed7c2db47d70fe15b4ffed8c53b843674577 - pristine_git_object: debcec5da0e282a7140a06a4803caeb5a677d33e - src/funcs/companyInfoGetAccountingProfile.ts: - id: fecec79ee2aa - last_write_checksum: sha1:fea830cc2154da1b5895f6a3db8b83c96a42627d - pristine_git_object: b84bdb0876ed93b25e76d86134c3c2c018b8c414 - src/funcs/companyInfoGetCommerceProfile.ts: - id: 799633beee35 - last_write_checksum: sha1:d1b5d4ff71cff2a3954bc0c625626394e0bba265 - pristine_git_object: ed1740ffdb5cb5124e3a061601268b94d7dffc25 - src/funcs/connectionsCreate.ts: - id: 0423cc2d060b - last_write_checksum: sha1:a0fba743bdce0ec55cf2ab6701ad174bf43e11cc - pristine_git_object: 5bc742a10b4d9e7a42873aecd93372778e214495 - src/funcs/connectionsDelete.ts: - id: f33b14b4a39d - last_write_checksum: sha1:cc39b9930997b83e0712793afeecce2619d9fe82 - pristine_git_object: d50c05d0e074736df63152e5ae59fcebdfe5b276 - src/funcs/connectionsGet.ts: - id: 6a1b6227b285 - last_write_checksum: sha1:621f364838801a576ecbc61b79b0ad0bbd2228f6 - pristine_git_object: ae9348c6ee3b8ed1ce1f476219359466fa401202 - src/funcs/connectionsList.ts: - id: ca36cb8b50d3 - last_write_checksum: sha1:52baacb04ea685da49515845c6e48454f44cf7c7 - pristine_git_object: ead90932f660c40b6fbd57d8a15fadb52195dbef - src/funcs/connectionsUnlink.ts: - id: 0ff9d29a8016 - last_write_checksum: sha1:c0ec6a3e05fd5fc99697fa4d2c6706309aa65933 - pristine_git_object: 87fdd8a3d6357246dcaa096773b06c8c7dc84407 - src/funcs/dataIntegrityDetails.ts: - id: 5b2c99e9976f - last_write_checksum: sha1:c33ea12bed828757c5f3ea3fadc7c9bc85623df0 - pristine_git_object: 6e13457dc4fc89958283d71ecc1248feff4d0514 - src/funcs/dataIntegrityStatus.ts: - id: 80a949fb7e94 - last_write_checksum: sha1:f4ec5a90bea6d859e6ec8c3fbcecf4c8f9cb1a9a - pristine_git_object: 35c0ccc576b2159e0f004f60625577a444e44888 - src/funcs/dataIntegritySummaries.ts: - id: 031d33a0d9fb - last_write_checksum: sha1:f3f566ded9069526ba8d51c2145a155a68732b55 - pristine_git_object: 9e1fa65485a3b2974a3e5d15d9761b4782313010 - src/funcs/excelReportsDownload.ts: - id: 9b27297b0699 - last_write_checksum: sha1:d9e961ab4c81d1e6b4c6c376a84e21062c98face - pristine_git_object: 1f51fdab650c3db361f7d4de586a153be4161988 - src/funcs/excelReportsGenerate.ts: - id: 93592709ff47 - last_write_checksum: sha1:9ebfc81e79e642b0e7989a5d86147f763c9e7cc6 - pristine_git_object: eacfdb74e581950a9bb38f19553ff8a8c708d2b9 - src/funcs/excelReportsGetStatus.ts: - id: 48b7eeabc1ad - last_write_checksum: sha1:e4187c98e5d3e1243e504268b128fb224e8923c0 - pristine_git_object: 63e2c2bab80cf8bf90de99c936ae10294467358e - src/funcs/fileUploadDownload.ts: - id: e770b763eed7 - last_write_checksum: sha1:60445f45a2e3aa98f7742262dc3a586ca55c27a1 - pristine_git_object: ecbb1caba0876b6dea9635b248403fa25705c87a - src/funcs/fileUploadListUploaded.ts: - id: 1bdf3387f7b9 - last_write_checksum: sha1:0cb6483aa0872024c81031d4d1c862af2dc54f5d - pristine_git_object: d2141ccaee1ba1ce862296afd56639aa345a8b50 - src/funcs/fileUploadUpload.ts: - id: bcc3494e1865 - last_write_checksum: sha1:39419089773a7afe8aee24f44838dfbd1f40179d - pristine_git_object: d4b497290c7c80273a56ae2e542798eab36c25b9 - src/funcs/financialStatementsAccountsGet.ts: - id: 2ea376063f74 - last_write_checksum: sha1:648818281d9f4df40900521c31857823803f8ef3 - pristine_git_object: 224ed68d7727be6cf440e96380329dcc5c527cc7 - src/funcs/financialStatementsAccountsList.ts: - id: 664b7fbbcb71 - last_write_checksum: sha1:3c89ea08f707da91dbb9321eeae91207a95064b4 - pristine_git_object: fc510ba4d7458071d41e4fd42ea1f03c935ebf37 - src/funcs/financialStatementsBalanceSheetGet.ts: - id: ece5d09385b7 - last_write_checksum: sha1:80c4cca9d5c4ee42f834e727238c826aac205c48 - pristine_git_object: 23be0c4f4e2841a7863bb05c6a5452709c07b50e - src/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.ts: - id: dd2126397af7 - last_write_checksum: sha1:05dd87c0f448b5cc1f7da5fc3d23e24846651878 - pristine_git_object: 24d64108c1ad6ba598d3f22ffbebf9ccb72857cc - src/funcs/financialStatementsCashFlowGet.ts: - id: 60b1d22fd4bd - last_write_checksum: sha1:03ace268a6bccee2d4ae34e92e4b63495dba430b - pristine_git_object: f136c8ebf1fa587d0af9e98715988701e4fd9ef0 - src/funcs/financialStatementsProfitAndLossGet.ts: - id: 70165bbb822f - last_write_checksum: sha1:527be183e3f06cb343c7516a07cd40824da0c981 - pristine_git_object: f780054871fbe061bc241e68f3acc78a8c370d0b - src/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.ts: - id: 8ca34aa2bf28 - last_write_checksum: sha1:58a7f88202fe720d6fa1f73f3f1008e2fdc36921 - pristine_git_object: 99a3dfe3fa59b12df4d6839eb7e1c4e302b6e394 - src/funcs/liabilitiesGenerateLoanSummary.ts: - id: 68857964afe4 - last_write_checksum: sha1:27c7b0f9469c7b64a2ea4d1a363f27f9e10e4303 - pristine_git_object: d2419d285a75fc5102b4ea85ec68e84b5d6e7fed - src/funcs/liabilitiesGenerateLoanTransactions.ts: - id: 1fde8ccea908 - last_write_checksum: sha1:7f32af140157d1453cfaf4107a73660de49fd557 - pristine_git_object: 24b0845fb8a50b036f6fd97605c27163d1a0cb2e - src/funcs/liabilitiesGetLoanSummary.ts: - id: 31f19236615b - last_write_checksum: sha1:4c13c217fc03a4b6a5c7115391954f7c094a6603 - pristine_git_object: ffca782844956a7e5d77226cc3d2c8b69f4fa1a2 - src/funcs/liabilitiesListLoanTransactions.ts: - id: 0e3e9b19b215 - last_write_checksum: sha1:ea9cca8e7d838f261ba346bffddc342fc0274667 - pristine_git_object: d13c0fae5fe3b22ce3c4a95ee078cf17a9167b2f - src/funcs/loanWritebackAccountsCreate.ts: - id: e89b48df6eeb - last_write_checksum: sha1:d339c66dc7b31c93d1d2e3cf44bb203f50dee23b - pristine_git_object: 398da0f02395765ac7406342cd55c890f91cf986 - src/funcs/loanWritebackAccountsGetCreateModel.ts: - id: b36fe9a0d95f - last_write_checksum: sha1:c425be76d0d5e1e04629ed5da68b66df66a60135 - pristine_git_object: fbca30c5321bedfac48b251510af35918ebc542a - src/funcs/loanWritebackBankAccountsCreate.ts: - id: 1c597a7a90c1 - last_write_checksum: sha1:f929732e20145e851b5112a2af75e1abfad7acae - pristine_git_object: 7d12d958866f196ce449fbcf4cc163993b0e7d16 - src/funcs/loanWritebackBankAccountsGetCreateUpdateModel.ts: - id: 3585b259567b - last_write_checksum: sha1:f8d6723928b85e95ad7c254a1f87b3621b75c339 - pristine_git_object: a46717857c859f1529e99731689121924b0723c5 - src/funcs/loanWritebackBankTransactionsCreate.ts: - id: cff02379f76a - last_write_checksum: sha1:e5d8cb5836b8b20352d6bc9904044b370554df89 - pristine_git_object: 64def563715398e147f8f5c5cdd23484667cd93e - src/funcs/loanWritebackBankTransactionsGetCreateModel.ts: - id: a93e94b994f0 - last_write_checksum: sha1:fa6ff9dff49804bbcc2cf7bb2683ad4bf3abb5c8 - pristine_git_object: 7c366ae6674bccd004435c0a57317e7c21dfb1da - src/funcs/loanWritebackCreateOperationsGet.ts: - id: dce185055a93 - last_write_checksum: sha1:074dfc21ce6e463156e6cefde2357ce153ea7f3b - pristine_git_object: df18e4946927d7d48b4badbe3a9d993517927c9a - src/funcs/loanWritebackCreateOperationsList.ts: - id: 53eda783e620 - last_write_checksum: sha1:181d7c405a17e81f47d371ce3924722ce91f0c40 - pristine_git_object: bc9d094d3a6d7831ce94bea770a65678abc5ae6a - src/funcs/loanWritebackDirectCostsCreate.ts: - id: 9b322d42dc87 - last_write_checksum: sha1:51f9dd922c6c283e50095a531284d69ffbf02a6a - pristine_git_object: 3aae238254f6c3a1e0fbb734eb0db54521be9e72 - src/funcs/loanWritebackDirectCostsGetCreateModel.ts: - id: 3b58a7565d0a - last_write_checksum: sha1:70688eb6dbb8ab5f951cc138d3b83566d6ab54be - pristine_git_object: d787c34d72fc0463de70d4c0fb0e54d78e25990d - src/funcs/loanWritebackPaymentsCreate.ts: - id: c2b1f7f4a682 - last_write_checksum: sha1:7215985447de482cc7b47313ae678b81c5e7f247 - pristine_git_object: 02eb10382ed78dc20700d733f0f61d07cbfa4cdb - src/funcs/loanWritebackPaymentsGetCreateModel.ts: - id: 62d1f0a77929 - last_write_checksum: sha1:c5883ff64257010f56037fc42790ed8264888c2c - pristine_git_object: e2aabba850ebe395d1136d91565b4843600f8a5b - src/funcs/loanWritebackSourceAccountsCreate.ts: - id: b89367be0ddc - last_write_checksum: sha1:3a9af26dbdcc1abe04690884d3f29550611a8286 - pristine_git_object: a1f234615333aa6feca2f66eb63ebac84c09d450 - src/funcs/loanWritebackSourceAccountsCreateMapping.ts: - id: 3695d4e197af - last_write_checksum: sha1:90fa17597378cb89a7223f20b6806f82d4667f18 - pristine_git_object: 529e7bc53bd726c97921b4be60861a5be83386fa - src/funcs/loanWritebackSourceAccountsListMappings.ts: - id: abf7f156d66b - last_write_checksum: sha1:3da87d84981727da9499ac6b5ba1d16372b6f922 - pristine_git_object: 8518391b6d97865117263c40739ce153a15f3558 - src/funcs/loanWritebackSuppliersCreate.ts: - id: 8ed3b7980059 - last_write_checksum: sha1:c131aefe9cdc5ce91f3bad1a2a10c598c1642748 - pristine_git_object: 32662a6eb9af7e1df9a794c9b8008095e24bd14f - src/funcs/loanWritebackSuppliersGetCreateUpdateModel.ts: - id: b8ca5eddbfd9 - last_write_checksum: sha1:0dd7390f35fa6fc7644c0a7963008aac8d5e5148 - pristine_git_object: ac8a11047b55ce88caa2b638c74dec6c470adec4 - src/funcs/loanWritebackTransfersCreate.ts: - id: 80d8636c1c8d - last_write_checksum: sha1:50b8ce4f0b8673007c18f0be778bede8e4e899bf - pristine_git_object: 82c06b165e338d65d3624dd456e21402f10b745a - src/funcs/loanWritebackTransfersGetCreateModel.ts: - id: 996f96bf8a1d - last_write_checksum: sha1:b096e321d58cd2b9c654a3c980897fff467a6748 - pristine_git_object: 45fe3a9321b2a48da6d529cc0613625792e1b3bd - src/funcs/manageDataGetStatus.ts: - id: 063dd885e84a - last_write_checksum: sha1:6c12382fa737a02494de7162478f14f709ca64eb - pristine_git_object: 04b3ed22ce869b33a18ee1e0574f6d8254782145 - src/funcs/manageDataPullOperationsGet.ts: - id: 56240b03e9d5 - last_write_checksum: sha1:bd3ced30aa370e8bd7b8cd9b3bbc4bbd83c34b19 - pristine_git_object: 435c409840a5fd6f4ee84c9001f9f04b52618118 - src/funcs/manageDataPullOperationsList.ts: - id: e6bec5ccffb4 - last_write_checksum: sha1:8dfe4fd3d942c7f84a1bea5cc4091d265d8dd756 - pristine_git_object: 3754666de694e0bb87697267cd9e26c752e09ee1 - src/funcs/manageDataRefreshAllDataTypes.ts: - id: 401b7123b879 - last_write_checksum: sha1:cb630846fca7d648f9307b805af99fb3a7b139f8 - pristine_git_object: 4bc5d41fea91a8e6125ecebce098545a77418f21 - src/funcs/manageDataRefreshDataType.ts: - id: cbeed115504a - last_write_checksum: sha1:5e8be51802440c90d11afdf696a1d5a582073cd0 - pristine_git_object: b2c5605569fdf7578914a2ec3603122562a29f91 - src/funcs/manageReportsGenerateReport.ts: - id: 9785b1225926 - last_write_checksum: sha1:56438a3dd6b9013a6433e8d136b33a72911c5d41 - pristine_git_object: 0e5c8e1b1b908ca09940d6941ca0b4cb377185a2 - src/funcs/manageReportsListReports.ts: - id: 85e553eceabc - last_write_checksum: sha1:603d7475644fe6fafa9c5ca3c06d68ea9ef17973 - pristine_git_object: 4ed8b23d873b0fa005f5241c447291b217723af9 - src/funcs/salesCustomersGet.ts: - id: 71badd8a888a - last_write_checksum: sha1:ce5c4a301976eb240838f56cf12e55fe9097b95f - pristine_git_object: 54bd3d131106f5695238076170fa1f850baa9f5f - src/funcs/salesCustomersList.ts: - id: 78a305acb83d - last_write_checksum: sha1:ec4b0650fd18ee8896e0ade914f5fca30f141b7e - pristine_git_object: 36c10c2128e347a466ba19019e2ca5f6c2bd31f8 - src/funcs/salesDisputesGet.ts: - id: 6786955267a6 - last_write_checksum: sha1:8d2c11a1d16d38bb5a4891ccadf9656419dbc564 - pristine_git_object: 823d7764b285a6b9b96b5173b7aa06bfd83a16fe - src/funcs/salesDisputesList.ts: - id: 91ea23cd1acd - last_write_checksum: sha1:746818b72f809cbbf61b36071a3e27b9f8b5e636 - pristine_git_object: 56a362daeb3a1d83468fcf641e4d00c46fed228a - src/funcs/salesLocationsGet.ts: - id: 66a1ba64ddd5 - last_write_checksum: sha1:bd58b58c77b2b7eec2f6546d722abd2f2c610f82 - pristine_git_object: 6b3414bf0189e49d1cebe0abed3493f45fbbca6a - src/funcs/salesLocationsList.ts: - id: b64cf4e7814a - last_write_checksum: sha1:0f0b6be9166fb6a3ee2fd3bd117ad7dea524bd41 - pristine_git_object: bf255dfe68ae6df5a34bdac139aad31528a4467b - src/funcs/salesMetricsGetCustomerRetention.ts: - id: b0e8ff6eabf7 - last_write_checksum: sha1:a2b77a97902781d90c4a576e2883ebe3cc3d82fb - pristine_git_object: 9a16d51e096e97be3be34c15caeaa88ce4079a09 - src/funcs/salesMetricsGetLifetimeValue.ts: - id: 3db6212a0071 - last_write_checksum: sha1:b65aaab5cde5540e55b00ebe8915008aa59f39d7 - pristine_git_object: e00d7906ffdd01ee79fa777538b45a014e5053ee - src/funcs/salesMetricsGetRevenue.ts: - id: 13ec3aa775a0 - last_write_checksum: sha1:4c1a3b61f601c9b15fd3041a5e7cf7ba7565e1fb - pristine_git_object: 2154fb80be3d7b402189efcb9ee29efc3ed9964f - src/funcs/salesOrdersGet.ts: - id: 1cf10473cc1d - last_write_checksum: sha1:f0f6cb7b04f297a36dc37c49054db8ec059f5883 - pristine_git_object: f63b7c4a85f940c6ad8d681609bfe74efd4c659d - src/funcs/salesOrdersList.ts: - id: 2b0b03c970e0 - last_write_checksum: sha1:f76714a35d8b5850cf1b1ae3ff8ecedef63005ab - pristine_git_object: 5d649ecf53449856a5d7a4d1e484c0c964a0c51b - src/funcs/salesPaymentMethodsGet.ts: - id: c046c49126c7 - last_write_checksum: sha1:d508d8da594ab3a8bd59964fc0bd61e20a67c6f7 - pristine_git_object: 9bfbbf438bd20d9138fb5d3fc0d7cc04612df52d - src/funcs/salesPaymentMethodsList.ts: - id: 9ea161ff1382 - last_write_checksum: sha1:96abca197a64c38d7ca9de4159e532564558e990 - pristine_git_object: c791da80fd4da28dd565990f2480a1aec06be6c3 - src/funcs/salesPaymentsGet.ts: - id: 1139d7f85422 - last_write_checksum: sha1:4d611a347b935bbd821597f920ae707f2db64177 - pristine_git_object: c34eb3c5c7d22bb196f3f5c5956eb26e0b041bf5 - src/funcs/salesPaymentsList.ts: - id: 0cab30ffc133 - last_write_checksum: sha1:5d74de43107eaf40936680cb4d0bdda9ac365178 - pristine_git_object: e98222d1df3c0004b1f6e75aa1860fed21ff2eba - src/funcs/salesProductCategoriesGet.ts: - id: 9644aa8f5c94 - last_write_checksum: sha1:18428c47bf206f6b4c8a093f1dfdfe799814dcca - pristine_git_object: f3ba30762358c0b8ed808bdd6a8613d4f93942f9 - src/funcs/salesProductCategoriesList.ts: - id: b6557713b290 - last_write_checksum: sha1:48d0b4125d53de4ac497f6d9b6eb3d92dacacb0d - pristine_git_object: 4f7fb8376c7cc761e5c4193a28123aba10ec6e79 - src/funcs/salesProductsGet.ts: - id: da13db137696 - last_write_checksum: sha1:4e825dc7c888e206b01e42c4ef7ef3b90b9d0703 - pristine_git_object: c669fe5d08e02aca0c016d23ae55b516d5bd0925 - src/funcs/salesProductsList.ts: - id: 79313bd13f3b - last_write_checksum: sha1:24b2fa94bd25a8ab326284f07875cd49f5f1fb3b - pristine_git_object: 52798aec37d294e97a8a1328055da5c93766c44d - src/funcs/salesReportsGetOrders.ts: - id: c9f14729bbae - last_write_checksum: sha1:d2812de6991f7c3ef6c6115ce4034d8dd545179c - pristine_git_object: 237fe4268596b930fff4ff8e4831fd88022d2b64 - src/funcs/salesReportsGetRefunds.ts: - id: 84dc97052733 - last_write_checksum: sha1:82139faa79bdbd0423f20daf3378a56178e48f94 - pristine_git_object: 64d43a39ba28501e37ce66b1cca22960db879593 - src/funcs/salesTransactionsGet.ts: - id: a3567bb6d28e - last_write_checksum: sha1:a24e21db0235ea718d85aab3ea55ef5ffb8fdda6 - pristine_git_object: 78bb7ba66def87cb0075ee01f0445adb09249bfc - src/funcs/salesTransactionsList.ts: - id: 00a9854a1687 - last_write_checksum: sha1:19858582e524dc08e713441d5fb6589a80f6cc13 - pristine_git_object: c3a4237ca6a6b500a45f3e5ad1dd53db5147c217 - src/funcs/transactionsAccountTransactionsGet.ts: - id: 8c7d2027a486 - last_write_checksum: sha1:02a68f779b87cde13a62d2d12f36b4b8bdba9640 - pristine_git_object: 3acef78c97b06040e787797608939690a0555f62 - src/funcs/transactionsAccountTransactionsList.ts: - id: ed34243c1fa5 - last_write_checksum: sha1:3cd28f6226a5810d5705796e2df0276106912296 - pristine_git_object: 21bea7d4bc7c92b9c838c013b39df8159ae5fff7 - src/funcs/transactionsDirectCostsDownloadAttachment.ts: - id: 6228c1957465 - last_write_checksum: sha1:975f3e788d6adb495bc3ca18010c2b18f7911822 - pristine_git_object: ebcc201a761bf195d683fe9de83ccf5c044e7086 - src/funcs/transactionsDirectCostsGet.ts: - id: 053195bd51a1 - last_write_checksum: sha1:c1b85eb339c3c474ca75398a34dc8b3428ee1d6f - pristine_git_object: 938d8a3d0d06f5439737cf198f4a8b66da11ca72 - src/funcs/transactionsDirectCostsGetAttachment.ts: - id: b40d860a4bd4 - last_write_checksum: sha1:c8f0a934e9b99a3bb2f9ad017dcd65e3a028a1d5 - pristine_git_object: 2a708ee16bfece6c2294d9dadbe9688edc288a8c - src/funcs/transactionsDirectCostsList.ts: - id: ad2dd864086f - last_write_checksum: sha1:cea07bf3e7782122c5fe6be742db06e81f065fc9 - pristine_git_object: 865127b21e58eebe96588414e5ae7bc60039bf49 - src/funcs/transactionsDirectCostsListAttachments.ts: - id: 1d4ba11aa146 - last_write_checksum: sha1:f00406da5b0872c20a53d54b0213e36c496a4aaa - pristine_git_object: 6478e3e18dc7d504e578de745457991edd0ebd75 - src/funcs/transactionsJournalEntriesGet.ts: - id: 4acb0f78e095 - last_write_checksum: sha1:d73465529c7cd301a3d41f81380a6dd65fcdcd88 - pristine_git_object: 72ce6b1157f5bdcbac4b11c13d244ce1b6af0495 - src/funcs/transactionsJournalEntriesList.ts: - id: 77ef91ac0a47 - last_write_checksum: sha1:16006b87353b00af4231cea16c2e6a9978191f24 - pristine_git_object: a0d7360d55b1b971d896152da4606ad36cedde2d - src/funcs/transactionsJournalsGet.ts: - id: 78dd04e78543 - last_write_checksum: sha1:fe2206f15d23bae6247265ad4b5d3206d4fe29db - pristine_git_object: cad1e63ed9a137ff742e632ec46a8ad4c3d68585 - src/funcs/transactionsJournalsList.ts: - id: 78ab357c8c38 - last_write_checksum: sha1:a64947f984097fbb92bf91c88f732f1c78da0e2f - pristine_git_object: d9dc8284ec2912a30e4d9d8b3a16b7acb372c8f0 - src/funcs/transactionsTransfersGet.ts: - id: 5ca738d71d19 - last_write_checksum: sha1:8e79335cc90b224a7103593b762168fd5d571b1e - pristine_git_object: 146445e35c444954bcde3246ae164125e15b996f - src/funcs/transactionsTransfersList.ts: - id: 94d777f53de3 - last_write_checksum: sha1:37854bfb9cb58325b1e6bd1109e696e0aa2dc3d7 - pristine_git_object: 8547cfd043ff4b838a7fecb5b068b85ffa9fca46 - src/funcs/validateWebhook.ts: - id: f3ebc1bebb84 - last_write_checksum: sha1:3ae06eb556a9ee8abb3998fc4085eacbd77294f7 - pristine_git_object: f666764da2e2473a03b851c7f51f20e1c91639a5 - src/hooks/hooks.ts: - id: a2463fc6f69b - last_write_checksum: sha1:9a569ea8f3177ddcdfe6cd903feaf5c2d2c36a9a - pristine_git_object: d34c88497fb1cfb22a725e52b4c218f36d0b5c8e - src/hooks/index.ts: - id: 5f2dab62b520 - last_write_checksum: sha1:1a11c073a6cd792932218e1d4ed36b8567bad8ef - pristine_git_object: f60ec7acd76141a71d78008c5a362eb0236d8335 - src/hooks/types.ts: - id: 2a02d86ec24f - last_write_checksum: sha1:a2145ca7943102b61791b4b067fb593f221349b3 - pristine_git_object: 494395f66d0a6de6f6cd8b1dc918557843158c1d - src/index.ts: - id: c5fb850250c7 - last_write_checksum: sha1:35c9cde3ae14b18b3f893a1afe8b6c44f8760f24 - pristine_git_object: dbcba164a0082e3bb8c43cf21fa7f8ffb9d35dfc - src/lib/base64.ts: - id: "598522066688" - last_write_checksum: sha1:b0b12ddbd8625efb47c0e955a18641aeb10c6532 - pristine_git_object: 0aebd8b0a4867e35cb3348fc52921c3c0b4725b7 - src/lib/config.ts: - id: 320761608fb3 - last_write_checksum: sha1:8979ccff723906b1216dbdfc9d90f22771c3b402 - pristine_git_object: 9d3fbc4b2ee8265f220b018fa1469f8c9bf43b39 - src/lib/dlv.ts: - id: b1988214835a - last_write_checksum: sha1:1dd3e3fbb4550c4bf31f5ef997faff355d6f3250 - pristine_git_object: e81091f5e536f82739f71379b1fddc2d147c49e2 - src/lib/encodings.ts: - id: 3bd8ead98afd - last_write_checksum: sha1:d47614c415b37e092965c34cb668562195701004 - pristine_git_object: 2791d25bc4f7cf6eec17a65f899851e225fa3deb - src/lib/files.ts: - id: e5efa54fcb95 - last_write_checksum: sha1:795c14026405d547bfc47012f7ad9666e530fa7f - pristine_git_object: 6ca6b37d35a12448da176ee2517cc036db12c81c - src/lib/http.ts: - id: 63a80782d37e - last_write_checksum: sha1:797cbf16d3c7c4d62d3ba0eedb08617524938457 - pristine_git_object: 13cf1fd7894a89f727b8d2db2ad24313a94f68c7 - src/lib/is-plain-object.ts: - id: b9862591096a - last_write_checksum: sha1:df687f25a9590b6fd95d39df41a652ae3fd4e517 - pristine_git_object: 61070d3d7c7e5e95b1ed7e7ea21869eb0767db77 - src/lib/logger.ts: - id: 7ee7741a02bf - last_write_checksum: sha1:0ec9d3a2a34c362746b767e4f9a746c055d57a7b - pristine_git_object: d181f2937d4128afbe9b0327e0f81d1fa9c877b7 - src/lib/matchers.ts: - id: d54b2253b719 - last_write_checksum: sha1:4775ae173392e86f356bb1ffd0d16f3c2d7b0d54 - pristine_git_object: b096d6f201a8f1b24dea405dc0cb1c75efdf4c97 - src/lib/primitives.ts: - id: 74859f750b28 - last_write_checksum: sha1:987869fc54790b9c22e9182099103d6aa7c67016 - pristine_git_object: d21f1dc49affa4e6d324bdd60811b470fdfa7eb6 - src/lib/retries.ts: - id: b24a69d15639 - last_write_checksum: sha1:f3da74dffcbe2756c69393f8600205aa1dc06e68 - pristine_git_object: e3ce9aba72150fc3c18f3105d39b21aba809377b - src/lib/schemas.ts: - id: deb4b531fae1 - last_write_checksum: sha1:b8517a14d3043f488f44e3b10ddd6cabdd22242f - pristine_git_object: dc2510e330727b01894e4d3954ea92a62c962e5d - src/lib/sdks.ts: - id: 8a6d91f1218d - last_write_checksum: sha1:fe94d4c4f88fbe0d549e5d0411b2aa9cfdf740eb - pristine_git_object: cef4177db76f7c16ed5e1907f58d9cc861e0fd12 - src/lib/security.ts: - id: 0502afa7922e - last_write_checksum: sha1:808e939964cd1393080c8b6428dabf33f746bae5 - pristine_git_object: 3da8e733b499dfb3c174dab84751a95ebc42324a - src/lib/url.ts: - id: b0057e24ed76 - last_write_checksum: sha1:3bceadd74bf0b31adf13eb06b7531077c3e07d65 - pristine_git_object: 79e7ce660b3732053e3adcbb5a4cdeb51496e8aa - src/sdk/accountbalances.ts: - id: 3cf5274e389b - last_write_checksum: sha1:a9f70dd857e3fe7f559488fac755cabf35347e4d - pristine_git_object: 222ab465ccd9b08590b1168a37d818ecc056c2a5 - src/sdk/accountingbankdata.ts: - id: cb00eda44ccd - last_write_checksum: sha1:db553043813d33dc02199a47c11e19688aff3a8f - pristine_git_object: 80790417a9a24ce9614b28c997fdac5ff465a7f4 - src/sdk/accounts.ts: - id: a4031260e046 - last_write_checksum: sha1:eceb24e692458b4a0a47f8d2db9e4451224e363f - pristine_git_object: e9be20e98d3b5febba8c8bcfdfde2aa23e2eec85 - src/sdk/accountspayable.ts: - id: 83161549fd87 - last_write_checksum: sha1:ba2621011054ade9fbbf8c9f2a28e52ed9c4a365 - pristine_git_object: d926869344461e12c07a41a2084cd320507e93b6 - src/sdk/accountsreceivable.ts: - id: ed2ccea7c8af - last_write_checksum: sha1:e076d00e801632949e34d0fad3a370290c447b3f - pristine_git_object: d39973d7c925b94e6fb998634108f957b1f345f6 - src/sdk/accounttransactions.ts: - id: 639d0283e348 - last_write_checksum: sha1:1faff7511699d1409b293bcacc2e37fdad9ae3fa - pristine_git_object: eb6ceec05ea7790adf318934e540ec0cd4569dc1 - src/sdk/balancesheet.ts: - id: a246b32a5283 - last_write_checksum: sha1:f3a432df817544d189ec466cf87e786dea302746 - pristine_git_object: 0a33779e732d4bcc541feefac3fb08d781514cb0 - src/sdk/bankaccounts.ts: - id: 0f1139473f13 - last_write_checksum: sha1:0b44b7f9c0ab014d1dc9b31ce624982b1ba3c095 - pristine_git_object: a595f9cb2e281832301979d9234fa5fe74eff0e9 - src/sdk/banking.ts: - id: b0d6ed14d799 - last_write_checksum: sha1:105d0123b7e1973c286174c22d90a27cfe0fce30 - pristine_git_object: 3c1c57ed2a8b93308572e3b6e1c85b9a73b49e03 - src/sdk/bankstatements.ts: - id: 16e664214f89 - last_write_checksum: sha1:03f4f1ff0a682f6ddfd32753ab5dc1d3c4376634 - pristine_git_object: ea85572c4912e5cc486a0efbec355cddc4bdcde4 - src/sdk/banktransactions.ts: - id: 4e05836b938e - last_write_checksum: sha1:be65cac7da42b69590d081e2638c584b325953fa - pristine_git_object: 0ae279dd6fe07433279086d7b4157cb5898e9dd5 - src/sdk/billcreditnotes.ts: - id: 5fe2245a4b06 - last_write_checksum: sha1:c87c75b0647bc4939af01f07b0e26e17508aed36 - pristine_git_object: 7d4de6ea1523281b982f6ac2485a1265ba024182 - src/sdk/billpayments.ts: - id: fbe6fff8f39d - last_write_checksum: sha1:7e09465f83477307aa01f73202f1ee247b8e3a0a - pristine_git_object: 5f607a32293c7382f6a7c69aed833f24170b21c5 - src/sdk/bills.ts: - id: bfb7cb6dd91e - last_write_checksum: sha1:3c61f70f137e7dcdb509b209d530b5c8458fad27 - pristine_git_object: 8f5040c25c5399028fc55096c59d0d8cc96990cd - src/sdk/cashflow.ts: - id: 3f66608c8b6f - last_write_checksum: sha1:dfacc6746f4ff90d5fd1b94a42dcfc57622b6d1f - pristine_git_object: 0840292a5324a65d43b2dce28ec3b888739046f5 - src/sdk/categorizedstatement.ts: - id: dd9de024a04f - last_write_checksum: sha1:e0e5ae0c5392d9491fd4f631b7230fb98dd6084c - pristine_git_object: 3b93f35f1f432ad63f579839534d2ac2f3cea426 - src/sdk/codatlendingaccounts.ts: - id: 09cd6b6df161 - last_write_checksum: sha1:af66bb7461f6faa476fff302cd263a5d73a74244 - pristine_git_object: dc2b3baf5cc07cf79999650ddc5930c23127fc04 - src/sdk/codatlendingbankingaccounts.ts: - id: 342666a10333 - last_write_checksum: sha1:487715e123c7624bc2cd613a942df9dbccf430f5 - pristine_git_object: 2f5ae84d96a2bd70674735b0b40765b8de03d31d - src/sdk/codatlendingcustomers.ts: - id: c0deecdea31d - last_write_checksum: sha1:17700af486b7c030b6d6da2ad141537b7c495424 - pristine_git_object: 734c40cb9da8358f5ece90f6f8affd37ae7d2bb0 - src/sdk/codatlendingdirectcosts.ts: - id: 59be061f8d78 - last_write_checksum: sha1:93b0276acece39eac308d6642053c9c727da637f - pristine_git_object: 6d2f6b104a89d478b285a65a4176b25c071696aa - src/sdk/codatlendingloanwritebackaccounts.ts: - id: 8da4a410ca0f - last_write_checksum: sha1:f987fd865b7858f3671b675b08d378a3b6b85037 - pristine_git_object: 0f08e4f3d84e4b14d8d12bed2a2d7e824d0aa4f3 - src/sdk/codatlendingloanwritebackpayments.ts: - id: c388f4793a7c - last_write_checksum: sha1:f09f8cfc490e5206bcb09db11fad84a252c4bf63 - pristine_git_object: ba76915fb6a1affabc7d594464db684228dac063 - src/sdk/codatlendingpayments.ts: - id: e3638dbec7fd - last_write_checksum: sha1:9278f7548285e67559dacecef10bc953ffe2293e - pristine_git_object: 3f4f0f6327231f3d650c5adc7bc738cc71b6d5b1 - src/sdk/codatlendingreports.ts: - id: 1034f354fe20 - last_write_checksum: sha1:209822e4ccd29d88ef05d892f9b6367056d05b0d - pristine_git_object: 27235f7e9306785a1229511065759c60b0939b30 - src/sdk/codatlendingsalestransactions.ts: - id: cd8490d268e5 - last_write_checksum: sha1:bc6428f4460803f6342433fff4c80b55ca7a9bda - pristine_git_object: 1b37f5f559a6956864892c56c8d451e1f1b57775 - src/sdk/codatlendingsuppliers.ts: - id: 8620fd886c60 - last_write_checksum: sha1:9fdd97adaefd7ef05f1283a41047e1e2a6159911 - pristine_git_object: b8f3ee22e1c617b6112c2db1879470acc5117abf - src/sdk/codatlendingtransactions.ts: - id: 37951cfbd0bc - last_write_checksum: sha1:60bcd758265fb450584a499703efe118a4292e03 - pristine_git_object: df91136ac55322f410a8d374433a821f14460da4 - src/sdk/codatlendingtransfers.ts: - id: a32b7e9b0804 - last_write_checksum: sha1:b84540036b30bcc19f401835abc4c09b4bd5394b - pristine_git_object: fee65ee509f43c269ccf9824c4240efcd50a03ab - src/sdk/companies.ts: - id: 7d7df3fca5ca - last_write_checksum: sha1:baed226458850f1a6157348662c0773713fba953 - pristine_git_object: 27513d668d02656ad8b011115ff9de4963609216 - src/sdk/companyinfo.ts: - id: 26e7094129e5 - last_write_checksum: sha1:dc0ef1e522b37c23a69c433907a36ebe1cc40a87 - pristine_git_object: e7c7fd4265f499d191e8619509cce16ee046591d - src/sdk/connections.ts: - id: 5992fff3b5cd - last_write_checksum: sha1:7fbe7d6d1f9aa1ad7059a7d602c7d7704bf4faa5 - pristine_git_object: 9253cd633f20b78f1b3044025146fdeb3409ae97 - src/sdk/createoperations.ts: - id: 657bf9505064 - last_write_checksum: sha1:418dfacb0e1f9f88a9952677f023326758ddd785 - pristine_git_object: 04bf032c476e14b685d476651779bfd53ab6e739 - src/sdk/creditnotes.ts: - id: 704c302abdba - last_write_checksum: sha1:3a75716467b0341f809fc9af5a6218ab640eaafa - pristine_git_object: 63702d948ed6436ff4a35aefb54b60bb3f3e1f94 - src/sdk/customers.ts: - id: d33e193e0c00 - last_write_checksum: sha1:493dc240542b797098148aa63f90349cfbcf20e7 - pristine_git_object: c6ab91ab9da6fd088b8d42c805874cc5dd48fbca - src/sdk/dataintegrity.ts: - id: c45e416c91d8 - last_write_checksum: sha1:dd13e57ba78139c886e024ce4d3bfbbf38bc8cf9 - pristine_git_object: 01603aabd763525a366982d286ac965f46005837 - src/sdk/directcosts.ts: - id: 18956becfd74 - last_write_checksum: sha1:bb3ca52d032cb4ee528d2f109304431f05158830 - pristine_git_object: b454ad37323f9c9087330a609d4f290b3a99c6fd - src/sdk/directincomes.ts: - id: 02615a340930 - last_write_checksum: sha1:16c6bca248f403ac7e633d56620295d550129db3 - pristine_git_object: fec1600e21c790bdc179a8cf6cca9ade89aa0d76 - src/sdk/disputes.ts: - id: 5fdcedd30409 - last_write_checksum: sha1:6b1c4af416b3a6a8dfc92f8afd5539f5e8f13638 - pristine_git_object: e55c14928ef236cc29252928927a559c78716ab4 - src/sdk/excelreports.ts: - id: 2e21b69cbcf3 - last_write_checksum: sha1:56b18aa44f0547d460b44042b5aa7b6e548e59a7 - pristine_git_object: a68fd87ae2d4785a26f73ed59f46274ff72ec0b0 - src/sdk/fileupload.ts: - id: f6a73725093c - last_write_checksum: sha1:2b957c1109121674bd5697c7b76110474384d62d - pristine_git_object: dd7fb5f1921da34a6fd06c77fe6e8ae47ef180c1 - src/sdk/financialstatements.ts: - id: d35aa60c6079 - last_write_checksum: sha1:6e33066e1bce8f1784d080635ed120fbad78afad - pristine_git_object: 9b3240792dc0916af87da308cd94cfdc96c64361 - src/sdk/index.ts: - id: a857902a703f - last_write_checksum: sha1:ed6d64f2a6135349aa8498b8d8cff9ba85c7fb8f - pristine_git_object: ecac2264817bb369ff2dbf0f0e9029807e67ff77 - src/sdk/invoices.ts: - id: b0baec52de2f - last_write_checksum: sha1:25a13edd30b6d8278ca67be70ea3527b3f6496ef - pristine_git_object: ec3465adc12a63284938aa64185e850219a017df - src/sdk/journalentries.ts: - id: 16e0d583fb1e - last_write_checksum: sha1:16e3328d2787839d2c17ddfe2ce45696a7a6b0d4 - pristine_git_object: f4bbfc7086bd63743519e73baf10703513a24dab - src/sdk/journals.ts: - id: 3c1cea100dd4 - last_write_checksum: sha1:bcd50c648abb973f0f876067762ffba85c4d2634 - pristine_git_object: d9f3ce7a9185022913eb44d2fca0a225a155980d - src/sdk/liabilities.ts: - id: b475d3a92d4a - last_write_checksum: sha1:56f150fc800ddeaa80c1d693094db0028e478760 - pristine_git_object: aef4e3ff604e42e54e06858f4071dcb5178ae5cc - src/sdk/loanwriteback.ts: - id: 1406d8264809 - last_write_checksum: sha1:b6cfebdb00c8dbf893951e4b4a9604fb363a2c88 - pristine_git_object: 87636abf1ddc01b30fa1dd147d27dd036987028c - src/sdk/locations.ts: - id: 7041545c416b - last_write_checksum: sha1:5ccf7c63690f55f406e3c8d47d1b1bce5618fb29 - pristine_git_object: 7fa5bb7d82c4e6a430fda54866789ec4cce4b1fa - src/sdk/managedata.ts: - id: c8cbe5c105ff - last_write_checksum: sha1:b2e53fbda165f6e32e1c145c2588e0bb10f980fb - pristine_git_object: fda8373b85f94318f4d41a308d1c97723cdbf798 - src/sdk/managereports.ts: - id: 5da6b6f0d1f5 - last_write_checksum: sha1:38ba17495257a4833443b4e6bf1ee1123e9b97cb - pristine_git_object: b6b7cd48c1ea5090c3dcf811e02c55967d451727 - src/sdk/metrics.ts: - id: f82082e1b05c - last_write_checksum: sha1:9716f3d09673e0f32245624ef1b8c5bf5654843e - pristine_git_object: 43233a645e711ebbe36ef40a7e50c126c70a1fd7 - src/sdk/models/errors/codatlendingerror.ts: - id: 89d5323a11a5 - last_write_checksum: sha1:800e8173b48ce3d4394fa08e8cfcc19947a6fb5f - pristine_git_object: bf612ad8a15336ae3e6d113f5c6226621c028a57 - src/sdk/models/errors/errormessage.ts: - id: 2bc5b9b70870 - last_write_checksum: sha1:da8f00ec077e6d38feb5175b260bde929cf1310f - pristine_git_object: 9693761f6c89685f9090f333af8aa00686e9aa37 - src/sdk/models/errors/httpclienterrors.ts: - id: 7be0894f205a - last_write_checksum: sha1:994ced121c54fecd0af038ccfb7855fbfd3868ec - pristine_git_object: b34f612124c797c2a1106b9735708f679a90b74f - src/sdk/models/errors/index.ts: - id: 017ae2dc215b - last_write_checksum: sha1:aefe203739edbdd7748bbc64ae76a923c0bbffd9 - pristine_git_object: 9d5107ffefe409ad115f13d4618b9f8bc8a6720b - src/sdk/models/errors/responsevalidationerror.ts: - id: 0b76670204e7 - last_write_checksum: sha1:cee04c6806a2da6efac726622d5dc0dfb20ab60f - pristine_git_object: 4e8894caf14d819bbfab8134b29a009ba6d8c9f0 - src/sdk/models/errors/sdkerror.ts: - id: c231fdf3b914 - last_write_checksum: sha1:112547355072e6c35e39bcc373a12b2078855f07 - pristine_git_object: 2104392272967eab3d328ab86b6833271f5e7f8e - src/sdk/models/errors/sdkvalidationerror.ts: - id: 7c8a11e099b9 - last_write_checksum: sha1:a69da17627bcc32b820544608f3400423ea53f26 - pristine_git_object: 6826e1208a5d7b7d310535d18909646522bf0fbd - src/sdk/models/operations/createaccount.ts: - id: 905f20b16869 - last_write_checksum: sha1:81621d593d75d516704aaf12faaa6ec994e600f6 - pristine_git_object: d8d3f68e1ee4e022893cdd8de794877b326cb1cc - src/sdk/models/operations/createbankaccount.ts: - id: 384f1f4b636d - last_write_checksum: sha1:a88902443678410d2a35ca2a8185442e3b5fd8af - pristine_git_object: c2108cc2ba75a39cb47a22eb90c4106c2edbeea3 - src/sdk/models/operations/createbankaccountmapping.ts: - id: e98e4574d111 - last_write_checksum: sha1:7a2938b3b24e3139bd30f03dba6fdd0c761e35bb - pristine_git_object: a6b45b09fd15eba632b99a91f9f455012b18aa2e - src/sdk/models/operations/createbanktransactions.ts: - id: 17b77e6287bc - last_write_checksum: sha1:250089a26f69e6a830742819d0bc156b6cedc55b - pristine_git_object: 23214e2fa8d77a50a51fe3194999593940d7ebcd - src/sdk/models/operations/createconnection.ts: - id: fd864cebfe91 - last_write_checksum: sha1:67abdd42c0f4b8669b59225b4cf97763bd0cca4c - pristine_git_object: dc5bcac12be709864c1f9a57ab0591899995abeb - src/sdk/models/operations/createdirectcost.ts: - id: 5930e7087bdc - last_write_checksum: sha1:2ef99b9760cbd96f9d35abb1f7e83e6a4f9cc804 - pristine_git_object: 54373b6fbd9919a2cd91689f7b5ec454a9655877 - src/sdk/models/operations/createpayment.ts: - id: e6d63344d7d8 - last_write_checksum: sha1:61326d69f0f19bdb33585a27cab26ec15b75e2d7 - pristine_git_object: ffcfbc68a09504913fc5d261421f36f2da7e2dbe - src/sdk/models/operations/createsourceaccount.ts: - id: 3889d4709ad0 - last_write_checksum: sha1:49982516a6ba8b92be4247bd2d00b74488995939 - pristine_git_object: d0b3bc729fb05fce2e13250eecab083f1aadf388 - src/sdk/models/operations/createsupplier.ts: - id: 3ac2b8655cd3 - last_write_checksum: sha1:0cf212f422177a69073a9cfe0b40419b7f6ff10d - pristine_git_object: 5d77bc50607cffd3acb2d327ed8561625eb9fa60 - src/sdk/models/operations/createtransfer.ts: - id: 887b7f17f4a7 - last_write_checksum: sha1:213dfaa04c1bb5cc31ab78d14c2777bd3b94bdfd - pristine_git_object: 97c85bf4fb9bd1221a0f7ec71ee11d8f7019bfd8 - src/sdk/models/operations/deletecompany.ts: - id: feff26e831a7 - last_write_checksum: sha1:3c6c30970b77ef97770f4a9fed7866b08bfd1ad0 - pristine_git_object: dbe555534894ed6e7f64cf4f034fff5fb58ddedb - src/sdk/models/operations/deleteconnection.ts: - id: 918aad3d3a4a - last_write_checksum: sha1:47fa476012d016921380a863c5457ef7babdd186 - pristine_git_object: 83f75997084050b7c35824dc9e065e81e3677b69 - src/sdk/models/operations/downloadaccountingbillattachment.ts: - id: 41bffdc10e61 - last_write_checksum: sha1:64b04e6e9252acbf049ba6c2f89d25c0283df6e9 - pristine_git_object: 786017ecb779e9e7d346c536d090bfaf30ee5f29 - src/sdk/models/operations/downloadaccountingcustomerattachment.ts: - id: 3ef5a28f3e3b - last_write_checksum: sha1:e6d599ed13d5ddde7036839e07fbb76a2e922ee0 - pristine_git_object: dc8d44adfc9beae9acce49866f4965c98e447db4 - src/sdk/models/operations/downloadaccountingdirectcostattachment.ts: - id: f2988648c091 - last_write_checksum: sha1:0b0ce2a88ed5788b398613824e76fee7760a4eff - pristine_git_object: 4db314736804fd40ed88b4a5e2ce3af105d879bf - src/sdk/models/operations/downloadaccountingdirectincomeattachment.ts: - id: 8b7fd0135b27 - last_write_checksum: sha1:3af5593e443001d2ebb72ba2ebae3a00c51a2abc - pristine_git_object: b236a903f74ea6fa5d0b55e0a1be588d5b35d826 - src/sdk/models/operations/downloadaccountinginvoiceattachment.ts: - id: 3f1c0208027e - last_write_checksum: sha1:c76a09448c2cc92a61910a02b6775acb23c63d6a - pristine_git_object: 0d0dcb06acc3c201678b28e24ff2876d84c5da1c - src/sdk/models/operations/downloadaccountinginvoicepdf.ts: - id: 778683d4ae36 - last_write_checksum: sha1:f8506d2374b86cb0fe3f2911524afd81a66b3bd1 - pristine_git_object: e1296f3fd6e653abf4ac850b3d47b34f5a5cc116 - src/sdk/models/operations/downloadaccountingsupplierattachment.ts: - id: 7ec877e3e609 - last_write_checksum: sha1:c01edbfe7a3e1c6dadac282d27386dbfec8e2f7e - pristine_git_object: bac3e786358c51c9e46a0c7aa51d1e3811873b5a - src/sdk/models/operations/downloadexcelreport.ts: - id: 1f1ad488dd3d - last_write_checksum: sha1:e54da30d89efece8a9034379e4207246a72413f9 - pristine_git_object: 468a62dc184b5afa8c71794c671201b163b05456 - src/sdk/models/operations/downloadfiles.ts: - id: 752898e0b199 - last_write_checksum: sha1:da749f0c1937d44d0cdcc1b61b9b5273071ad775 - pristine_git_object: 1489d1eb251d9effb6879e410ec8b74c5bbc927e - src/sdk/models/operations/endbankstatementuploadsession.ts: - id: 5086cce1a90f - last_write_checksum: sha1:a11a300d1b90d4ca79f8f810a62c80ba31886091 - pristine_git_object: 6d16bb4a327790e690152c9e1dba339d1e6ea8e8 - src/sdk/models/operations/generateexcelreport.ts: - id: 40116e59e904 - last_write_checksum: sha1:5e9ab6dae005082012100ea6af1ebec9cea5a9e4 - pristine_git_object: 39e9e707619960d429dc46f57d3169326fdd5228 - src/sdk/models/operations/generateloansummary.ts: - id: abfa68c993cd - last_write_checksum: sha1:3b8ea36f45454ee8fbfb1bfd6372b99f02a45ac2 - pristine_git_object: 5b579f7da5ff5da262eefd2f62602ff69511942c - src/sdk/models/operations/generateloantransactions.ts: - id: 2f19646ba52e - last_write_checksum: sha1:6f35b41fc07559283f64cf4880c09b0325b9da6c - pristine_git_object: f0dff67d6bcece08d4af3d559c8872095863483e - src/sdk/models/operations/generatereport.ts: - id: 1a9dcd78030a - last_write_checksum: sha1:8dd53bd1c8254ca59cabedf857d916d64ca21322 - pristine_git_object: 656d4d3bb81d379cf9143b10b498222d07525863 - src/sdk/models/operations/getaccountingaccount.ts: - id: d72f560e9c27 - last_write_checksum: sha1:cc0104355d7cd32bb361c202d8138d970b7f4eb7 - pristine_git_object: cfb35881478e1055014447d66b66575c43d11cf5 - src/sdk/models/operations/getaccountingaccounttransaction.ts: - id: 397e5084dc12 - last_write_checksum: sha1:ee0996d45ea5fa4058d0c992d24259d8c071c38f - pristine_git_object: c588a7b43fba1e150e57fec2944b6a16216f9573 - src/sdk/models/operations/getaccountingagedcreditorsreport.ts: - id: 7b3217d13859 - last_write_checksum: sha1:345d0d5f3f0c4e7a1b2be3be9856b9b36ad989e5 - pristine_git_object: b99e6928b2f3bd509872ffd3ce66a6fd69b5ef24 - src/sdk/models/operations/getaccountingageddebtorsreport.ts: - id: 7c82e85bbaf6 - last_write_checksum: sha1:d6ea1946815ea147a2f2cc8a8fafb0b75c2942c8 - pristine_git_object: 875c77915568163cd872b6a58d8b96eaef919551 - src/sdk/models/operations/getaccountingbalancesheet.ts: - id: eae4130fe3b2 - last_write_checksum: sha1:65ce1c1031febede973288365c29fccda9c7b21a - pristine_git_object: 7be6b8418a32e684e6e0a879084a18643e772c99 - src/sdk/models/operations/getaccountingbankaccount.ts: - id: ce7836f34e2c - last_write_checksum: sha1:dc5707b3e5d357ec54fa6717055254a2721a19e9 - pristine_git_object: c38e603b57aa9120f47d76cfa5275d9146da5a3e - src/sdk/models/operations/getaccountingbill.ts: - id: 434c932a29c1 - last_write_checksum: sha1:209a1c8429eb9803a29f9e8c86c514eca04280f2 - pristine_git_object: 51c4f85ef28581a41531d779b21b8f6b80749196 - src/sdk/models/operations/getaccountingbillattachment.ts: - id: 858da31476c1 - last_write_checksum: sha1:e4e404af0f2b3f8693cd0b1558db70953975deae - pristine_git_object: c0fdb526a89dcb933609f413f3ff0bf6a7ec86d6 - src/sdk/models/operations/getaccountingbillcreditnote.ts: - id: 47006b180aed - last_write_checksum: sha1:62920abd506a1870d29217ba318df015e7a5801b - pristine_git_object: 1ccc26e60c0ac895030d5cfb5230d40d78a2a9b8 - src/sdk/models/operations/getaccountingbillpayment.ts: - id: e680758de298 - last_write_checksum: sha1:6196d3cc7d479619b8a32c266518287f5e8588cd - pristine_git_object: 7beb14cafd9d40f50d1b9dfaf8e9fcac5d305ff1 - src/sdk/models/operations/getaccountingcashflowstatement.ts: - id: 1d8f544ffda8 - last_write_checksum: sha1:1db62307596746b83d770b0d82b5f4932e1d9ac9 - pristine_git_object: 0b61b138f43237b9e5373fc7f45b86ef841376c9 - src/sdk/models/operations/getaccountingcreditnote.ts: - id: f5ea0152e2a9 - last_write_checksum: sha1:15e6a6fe1a07dff7565b8e9805ef231fa1e4ce46 - pristine_git_object: 728bd2e273ba51a9826cc486d8a6f6cb1ca42130 - src/sdk/models/operations/getaccountingcustomer.ts: - id: 62774b64b08b - last_write_checksum: sha1:f4bea45121fefccd6214a764883272acb420945b - pristine_git_object: 293937ee229dae63cd28913530cb185092b99a08 - src/sdk/models/operations/getaccountingcustomerattachment.ts: - id: 8d7437f870ee - last_write_checksum: sha1:b6b63a0040ea3610ceacdc05a0c910666c3127c1 - pristine_git_object: 1d8897a621921154be27ff57d07eabc83bef8af5 - src/sdk/models/operations/getaccountingdirectcost.ts: - id: 39f780394c16 - last_write_checksum: sha1:3ed2d4c0246bfefa78dcfb03ce4901e21d4ace9e - pristine_git_object: 4f0752c97b4ebc3216a1d40749e67e15b542dad1 - src/sdk/models/operations/getaccountingdirectcostattachment.ts: - id: 8b1f73feb638 - last_write_checksum: sha1:b2c4b21cb8160b60822dbf2845433ec7e5aa050f - pristine_git_object: 6a38f548f7a90e781f3876a6ad1f0e927ecb0adc - src/sdk/models/operations/getaccountingdirectincome.ts: - id: 99fc08420a3a - last_write_checksum: sha1:76c298c85e8e4ba4a6372181910a3317c97db578 - pristine_git_object: 8ccb64b13ec30c1c813be353320f38feb7fa4cbf - src/sdk/models/operations/getaccountingdirectincomeattachment.ts: - id: a7145488f6a6 - last_write_checksum: sha1:3e5da471ad62aa2c49a6204ad988d18e952f72f8 - pristine_git_object: 25b6ec0a66fee7f5c64e998022daaa74c234bb6d - src/sdk/models/operations/getaccountinginvoice.ts: - id: 5b395fc50e6a - last_write_checksum: sha1:a428d13174f33a0c7c5a3d3502fde38c72252a7a - pristine_git_object: 09b8ea9c089ae6fd7a0fd26242aec4ece85cd1ea - src/sdk/models/operations/getaccountinginvoiceattachment.ts: - id: e8a72f5d7b3f - last_write_checksum: sha1:8f147cc004266a9b5e07d7f4716a30d3bba8958f - pristine_git_object: 1ec2b17a5fe5f80259504e90947a9af458ef5e35 - src/sdk/models/operations/getaccountingjournal.ts: - id: 8f3ac34d6409 - last_write_checksum: sha1:7b3df2f806cb8b965823e8d8bab23cb23d5e36b1 - pristine_git_object: 48e2012f62b33624e01a1f1673dccc950abbd45f - src/sdk/models/operations/getaccountingjournalentry.ts: - id: 08d2d8cedd50 - last_write_checksum: sha1:9c6ebd06ff65e480670333c9f1f3edeb0cd5c801 - pristine_git_object: bfccd02958211b6119d7bc89db5edcd054a36fa7 - src/sdk/models/operations/getaccountingpayment.ts: - id: 2081292e7a29 - last_write_checksum: sha1:0879747792b4a51f5b68a54b2638f0dbce8549e3 - pristine_git_object: 88b0fb3868eb527acaf4693f75b871ea006c82e7 - src/sdk/models/operations/getaccountingprofile.ts: - id: e446635541bf - last_write_checksum: sha1:ceb2e8642cef663e8d5cb8c22ca766d61b1a3f5b - pristine_git_object: 9547b4347aa4f2987ba35b2fed1bcc5efd976fc3 - src/sdk/models/operations/getaccountingprofitandloss.ts: - id: 365cc36857cb - last_write_checksum: sha1:1795afe8f9a0b89142375ec4d4152d7838334eca - pristine_git_object: fc0a7a42634aad4037375d0c3781573410d4b12d - src/sdk/models/operations/getaccountingsupplier.ts: - id: d17375e4bbc9 - last_write_checksum: sha1:5ff28631c6626b187f243290ffcf1765057836dd - pristine_git_object: 0023ea59c85b31338c20db7cbb9a09e4291f84d8 - src/sdk/models/operations/getaccountingsupplierattachment.ts: - id: 3d5ce42812fb - last_write_checksum: sha1:34f412a4c685b8a3e7a7ade40df5f00f252e623c - pristine_git_object: dc125e4e338813455a827104048c9df54f1fdc26 - src/sdk/models/operations/getaccountingtransfer.ts: - id: 6c8cdd2e8fdd - last_write_checksum: sha1:14289a0900c1ace11411d41d31427aa62326a054 - pristine_git_object: bbcbab86be2866079f8ed149d0de6e7896bec610 - src/sdk/models/operations/getbankaccountmapping.ts: - id: a25417b7b0d0 - last_write_checksum: sha1:e6a249654fcfec6934fe7ee27b9520ad1344b161 - pristine_git_object: acfa54967558ba0b68864a3bc1573008ad238b51 - src/sdk/models/operations/getbankingaccount.ts: - id: 5f114412cbc5 - last_write_checksum: sha1:9306ec19413188c435dabf8bf18386a148fbf510 - pristine_git_object: 0e30d1a13ae261c8c8650d861622af5c8b64d344 - src/sdk/models/operations/getbankingtransaction.ts: - id: f43952ed568d - last_write_checksum: sha1:ccdd2731b17d1d875434c0a744a2f28df1da16df - pristine_git_object: 784a9afbe992b3136d17b445dff0b1c608e7c5d3 - src/sdk/models/operations/getbankingtransactioncategory.ts: - id: 4e5373b850f2 - last_write_checksum: sha1:2ab58d7dbabedf70fe82e12a09c247a7b896c19b - pristine_git_object: e501dbce2fbd9c86a939ef08470edda5f443860a - src/sdk/models/operations/getbankstatementuploadconfiguration.ts: - id: ba79e970bac8 - last_write_checksum: sha1:7391aa1855a7904036baf0b338fa06d06765973e - pristine_git_object: a109b894c3b1ab5831f3540a4929c066c21011c5 - src/sdk/models/operations/getcategorizedbalancesheetstatement.ts: - id: 04b3fcc5c483 - last_write_checksum: sha1:a596a4bd23909de96d35fb46034e41fd153aeaef - pristine_git_object: b98e34a3e1fea8f99100547669b48e10a0b7829b - src/sdk/models/operations/getcategorizedbankstatement.ts: - id: 410261e821b6 - last_write_checksum: sha1:f109ba5297d21fed1dd159cb2791651459b7e893 - pristine_git_object: c8060bd0e9172b73c7f0876dccc36d032a0b7171 - src/sdk/models/operations/getcategorizedprofitandlossstatement.ts: - id: 6b8bf4e0d5b0 - last_write_checksum: sha1:31988b1e9c7024267c3423cf7ed5958b6bbc5507 - pristine_git_object: a49705b366facf5a129e3fc116cd119a03745532 - src/sdk/models/operations/getcommercecustomer.ts: - id: 7ccee613732e - last_write_checksum: sha1:fbbad07c10c1a422b9b16e6d2fe4edd97974dbd5 - pristine_git_object: b69da18a599585a8a9429e20195bc22bc94abd97 - src/sdk/models/operations/getcommercecustomerretentionmetrics.ts: - id: e38e2a00e3a8 - last_write_checksum: sha1:22d4316009a86032cd89ca7b50fdaa4789a4430b - pristine_git_object: d6cdae51f16a011ffe6e23b807fceb5f09429d4a - src/sdk/models/operations/getcommercedispute.ts: - id: 72d00fcee702 - last_write_checksum: sha1:cfff4c95d1b7f80ae05d863b1d78aa9a47f4b645 - pristine_git_object: fa377c6adfdd1835f9dc446cb306fab71ca99573 - src/sdk/models/operations/getcommercelifetimevaluemetrics.ts: - id: 40c8b51eedc5 - last_write_checksum: sha1:95af63ce61e312d037482b460ebc234f6b9777f7 - pristine_git_object: 0bcbfb659bb577db988ada43846971b229966d93 - src/sdk/models/operations/getcommercelocation.ts: - id: 820121617a92 - last_write_checksum: sha1:21251882f6f53f1b6064e7b949cecaf68fe5ffb1 - pristine_git_object: 849d55cb65c7793212d58d509b0718c78b4038d3 - src/sdk/models/operations/getcommerceorder.ts: - id: fa5731b5e75b - last_write_checksum: sha1:a42392ccca5085757c84275cbef1f8005a375cf0 - pristine_git_object: 97c4335133c4c2ca8c1a7840cb06f860000a975f - src/sdk/models/operations/getcommerceordersreport.ts: - id: dcc6aaa48afb - last_write_checksum: sha1:da420f0e1e24d70c340f4ba3a088094107c9f2b3 - pristine_git_object: 5cd6c23d724d42bf9f2aefdd9a9f8711f2074097 - src/sdk/models/operations/getcommercepayment.ts: - id: bcfc94156dc8 - last_write_checksum: sha1:5a4606600005355d62fb67d2a750b2083c5a2fe3 - pristine_git_object: 5f471e24ea7da6c74984d92cdc651905030c5e4e - src/sdk/models/operations/getcommercepaymentmethod.ts: - id: 2da66779c9b8 - last_write_checksum: sha1:2d54ada93ab926d032eee00acefb941134d35952 - pristine_git_object: 69df6ba54d444312057c12202bf4ddd324639d21 - src/sdk/models/operations/getcommerceproduct.ts: - id: 0a3c7016a8cc - last_write_checksum: sha1:9f011d6a79fb2ace58f8102204504a5d8c32445c - pristine_git_object: 783fd28099bf6a2178758a651aaebdd626a5cb41 - src/sdk/models/operations/getcommerceproductcategory.ts: - id: ade10701e8d1 - last_write_checksum: sha1:25aba71814a278fb49ce9c13602fdb51ff15100d - pristine_git_object: e7dc0c14a96f7f458ea94b5f33c7984e8d9e1018 - src/sdk/models/operations/getcommerceprofile.ts: - id: 491a985b4cf7 - last_write_checksum: sha1:1b9d670c841ff2ae2a5b191753d4cb8103ad5cb1 - pristine_git_object: b4a156de6d87d15b4f050e87320e2afa63be6a1d - src/sdk/models/operations/getcommercerefundsreport.ts: - id: ae1c4945eb82 - last_write_checksum: sha1:831bd530134257914f9d028b885698c040276480 - pristine_git_object: 462333938fbb6fc592648cc566a7e89df83a5a20 - src/sdk/models/operations/getcommercerevenuemetrics.ts: - id: d4ef522f7a01 - last_write_checksum: sha1:d434576b223a51acf489fcf39d4ae195916ba135 - pristine_git_object: 00131d7ee796f13e5cb27090c1d2971c9b11239d - src/sdk/models/operations/getcommercetransaction.ts: - id: c594f5ff320c - last_write_checksum: sha1:31e6fd88fd1e57ef9e84cb97ef58a556a1f18b3c - pristine_git_object: 35969102f5befea375e10ca2a646216878c51f7d - src/sdk/models/operations/getcompany.ts: - id: 4bef19281ada - last_write_checksum: sha1:3c30540e6bcdad8e8a51c616dc9e9b21934890ca - pristine_git_object: 77734decc381321230c2bfb8f340633b2064f315 - src/sdk/models/operations/getconnection.ts: - id: e6be8d1eab2c - last_write_checksum: sha1:94309b857129d317a91f50bae1e58ab670779062 - pristine_git_object: 126d23b8515e33d0e3c796e642e68ee0f74a6e00 - src/sdk/models/operations/getcreatebanktransactionsmodel.ts: - id: df7a52491e0a - last_write_checksum: sha1:bbc0534c9742b97c566731e75c8c7e237c4ede3b - pristine_git_object: fa76cc44ff82ac4a41927fd8fd84a744f0099ef7 - src/sdk/models/operations/getcreatechartofaccountsmodel.ts: - id: 9f0a3d0670c8 - last_write_checksum: sha1:33c89501771920391bb5916d24232bf7b3810b83 - pristine_git_object: d3b2a28a66da9dda64e2806620138bc1beaa4286 - src/sdk/models/operations/getcreatedirectcostsmodel.ts: - id: d3a959ebbbc6 - last_write_checksum: sha1:3e69f172b0c743f74c689594d7e995d0da7a541f - pristine_git_object: b9bc850115f2e35de5df862b145f0cd31fe08745 - src/sdk/models/operations/getcreateoperation.ts: - id: 5c83f50e472b - last_write_checksum: sha1:d1e199775f14534241188d4fef8dcc50c54aa781 - pristine_git_object: 626bbc6a8465cf1972c70d326653da0106d1215b - src/sdk/models/operations/getcreatepaymentmodel.ts: - id: 136f0b50b8b1 - last_write_checksum: sha1:777726f11e80b490942658decfbae60989bce136 - pristine_git_object: f1c1ed9f535bb4a793c89afc35907c565bc7735a - src/sdk/models/operations/getcreatetransfersmodel.ts: - id: 75b88b2cdcd2 - last_write_checksum: sha1:ce497e47fbe0eaa086baeb6cec1bc7d4fdcd1b5d - pristine_git_object: 14d366b9b8cdc40e9223bcca1501fd690b7bde04 - src/sdk/models/operations/getcreateupdatebankaccountsmodel.ts: - id: ae16e7e5e3c1 - last_write_checksum: sha1:cccbbf9e564efc998029a6eedc7eac5c5896f8f0 - pristine_git_object: 69711691d3ac66858fa77bad1ac174d4f7a203a4 - src/sdk/models/operations/getcreateupdatesuppliersmodel.ts: - id: 9909c5f0468c - last_write_checksum: sha1:60ddb55ffb673e028b8de9d5fbdbfd34392cdac9 - pristine_git_object: 08ed2ce07911ab41e3eaaaf6258fda17028e65b5 - src/sdk/models/operations/getdataintegritystatus.ts: - id: 7b5ff7a1a0a4 - last_write_checksum: sha1:9ab1c76aa405e6cba07d0c8e0cdccf7ba91e260b - pristine_git_object: cdfe4b08c08af72f2c5362f837584038d7553ade - src/sdk/models/operations/getdataintegritysummaries.ts: - id: b8a926170e7f - last_write_checksum: sha1:d244307a9ed3495bfd710504c5376c5d4d2abe09 - pristine_git_object: 9a6226e4ef303c80dd169c66d32ca147efc272b5 - src/sdk/models/operations/getdatastatus.ts: - id: ebdcbcbe4aef - last_write_checksum: sha1:df819cbd9de3b0b3f98ed53309f6f92f68e1b4b9 - pristine_git_object: e53d4c2a1a1c3beef9498b8cdd2ca659a0cf9979 - src/sdk/models/operations/getexcelreportgenerationstatus.ts: - id: 7f6f2f902a0b - last_write_checksum: sha1:ae442a5a22ab357f36312e2a1cd15c34e5e986fe - pristine_git_object: 48964d56e833ca1a6962b49a810d254dadc23974 - src/sdk/models/operations/getloansummary.ts: - id: d225e472a60b - last_write_checksum: sha1:35d900e8551453f0a5d3f0b51d9133bac45576fe - pristine_git_object: 19343ac076f07c33922f0c296e3fb116b9486b1a - src/sdk/models/operations/getpulloperation.ts: - id: 72377e8b61d4 - last_write_checksum: sha1:0a0b81f1f3c3e124585a2be4e7325117c1d059cc - pristine_git_object: 2df9079da61727da96e0e5e57f9ba0f006c66aaf - src/sdk/models/operations/index.ts: - id: b2864d0519d7 - last_write_checksum: sha1:d7a93ee21c7997e33649ccf0a93ca02eb058131c - pristine_git_object: 5eed5c486e7533e2dbf3b0d8f509ca8023d6b1c3 - src/sdk/models/operations/isagedcreditorsreportavailable.ts: - id: c6fafedc6ee4 - last_write_checksum: sha1:8742418a3d650b6d66788739c16cbaef9975f482 - pristine_git_object: cc414eed16c358db086dc6660656bab5c092652b - src/sdk/models/operations/isageddebtorsreportavailable.ts: - id: 310c6d6cc1c6 - last_write_checksum: sha1:274aa2827d0dd7b2df799f7e49a01e7814109cf1 - pristine_git_object: cbf20bbdb653415980fa7336fee0d20428d5b653 - src/sdk/models/operations/listaccountingaccounts.ts: - id: 9c22ea1649e0 - last_write_checksum: sha1:e1178cb5ae6fda303597861d962a4d423f09f96b - pristine_git_object: 4c338218e4f773b0dbfc404cf1e08f2cc1d546f7 - src/sdk/models/operations/listaccountingaccounttransactions.ts: - id: eb5722503791 - last_write_checksum: sha1:0fd459ced23ad8a35fa9a18c9dd116c22ea36473 - pristine_git_object: 8f5faed7d762706cf2a7bee41e8baaa3c606c564 - src/sdk/models/operations/listaccountingbankaccounts.ts: - id: 5e83cc6e031b - last_write_checksum: sha1:9725b30b1b1c08ab324bf189fac4859047dbb334 - pristine_git_object: 735c6ef70787dcc38154926a4743e580b872594c - src/sdk/models/operations/listaccountingbankaccounttransactions.ts: - id: 9113f7b6e613 - last_write_checksum: sha1:cc72006c41b332939dc8239ec1ea64f00ac47461 - pristine_git_object: b60d202067537659ba6df368e9ff1256dc87c941 - src/sdk/models/operations/listaccountingbillattachments.ts: - id: daabf6ade436 - last_write_checksum: sha1:4fc0b855d711904f195fc6ddd1a45a9e3c1a9084 - pristine_git_object: 39bb3dba81f3331d1f442bf18b107a952bddd8b0 - src/sdk/models/operations/listaccountingbillcreditnotes.ts: - id: 30e8cc7f91cd - last_write_checksum: sha1:f6e478d4603882c46d948b123500a624aa8649fc - pristine_git_object: 31cc8a2e64178867b31760bd6f8a920b7fa30297 - src/sdk/models/operations/listaccountingbillpayments.ts: - id: 9735abbacd0b - last_write_checksum: sha1:c246724cda8f7edff0ab086143187bccfec22107 - pristine_git_object: 2f5b0875ce861c361f7192299d2c254ce15d3ecd - src/sdk/models/operations/listaccountingbills.ts: - id: 0f2d7e6c7024 - last_write_checksum: sha1:e5a4e25a1cda3135a74c15cf7a89e33b9f588d51 - pristine_git_object: ffb9926881715a723471b6c7ea4f422e3a56b55f - src/sdk/models/operations/listaccountingcreditnotes.ts: - id: bcb190284813 - last_write_checksum: sha1:a379da37c6e9dababdec5bdf901c60a31b3254ee - pristine_git_object: 6a74aa73b33a13a3cc7a0a113076c53580f3200a - src/sdk/models/operations/listaccountingcustomerattachments.ts: - id: de6228a50aff - last_write_checksum: sha1:c6599ff196fb51f28843ecc95d2978b08affb0b5 - pristine_git_object: 35be945b2459e9f348f748b5d8dcf43a0df9668d - src/sdk/models/operations/listaccountingcustomers.ts: - id: 695f26c9c3ad - last_write_checksum: sha1:6692883c10485f388c8e4d0e35c7d63ae6920a2c - pristine_git_object: c778fc46d78eccd0ce74ce0487cf22bf63d1c233 - src/sdk/models/operations/listaccountingdirectcostattachments.ts: - id: f084d6d974c3 - last_write_checksum: sha1:99d168cf456e720d84d0aa1cd4f2c0050ec17dab - pristine_git_object: 7e846a759099de0f7c743e028ff405178017426d - src/sdk/models/operations/listaccountingdirectcosts.ts: - id: c5edba107e96 - last_write_checksum: sha1:6a038fe79b84c3e986554c13e66b25080e61355b - pristine_git_object: 419f50f225a3fc87d03d10acbae4c7c83877e9de - src/sdk/models/operations/listaccountingdirectincomeattachments.ts: - id: 6e575bfdfbfa - last_write_checksum: sha1:c0b1ca5afd059639f6f3a26271fad7e382cfe970 - pristine_git_object: 4b58617021b4ee2ceb841ae95848bc52af5848ba - src/sdk/models/operations/listaccountingdirectincomes.ts: - id: 5264c3a19458 - last_write_checksum: sha1:3c6441226dc9e57a7cce4f118a9932622fa4b9c8 - pristine_git_object: 846d038f7ab75c06876dd7d4261323bf30387388 - src/sdk/models/operations/listaccountinginvoiceattachments.ts: - id: 12491a11c2ab - last_write_checksum: sha1:49cefcb35bf259be701cd5fd1c2221701f3da22e - pristine_git_object: b9a92cae9d19a8788ce518eb9082505cd9f0c721 - src/sdk/models/operations/listaccountinginvoices.ts: - id: a990d54dbf7a - last_write_checksum: sha1:9bda87438a592587d2ea52e707d2d5213699a748 - pristine_git_object: e3fbd0c940cd153254fce39fe02a350b20e7782b - src/sdk/models/operations/listaccountingjournalentries.ts: - id: c4405cde4615 - last_write_checksum: sha1:bba6f809a8dc2917fe37794e0b938aa4d138e38d - pristine_git_object: cb77fb24848cf3400a9af19c74c5e8efcb371bca - src/sdk/models/operations/listaccountingjournals.ts: - id: 358876d89c67 - last_write_checksum: sha1:eb07a6ba344f37fd2f8a566edad865fe453199f0 - pristine_git_object: 42203a991e3db48bab3da95636041bddc805b29d - src/sdk/models/operations/listaccountingpayments.ts: - id: d0a93406d4f2 - last_write_checksum: sha1:8f595a2b674706cb2a94aa81cfac90c5e44a88fa - pristine_git_object: 65f20036a4152738cd27c2446e6bb6243ff1786f - src/sdk/models/operations/listaccountingsupplierattachments.ts: - id: 72e09be05332 - last_write_checksum: sha1:1f6d32bd6cab0d187d160ce6596e3f4f5e1598c4 - pristine_git_object: ad07dae22bd175cfc15f777fcdc7773cdea96895 - src/sdk/models/operations/listaccountingsuppliers.ts: - id: bfc568e95af2 - last_write_checksum: sha1:db1a860a5de2acaec610ab6b6a774653f77ba442 - pristine_git_object: 1e5866b9341239dcae67624bbab57da1a4b4c2d2 - src/sdk/models/operations/listaccountingtransfers.ts: - id: 86519647ade6 - last_write_checksum: sha1:2d15b4c7104391674bd58c649af2b38041daa31c - pristine_git_object: 55c501d28ced578ded9111d1ec9782412a4782ae - src/sdk/models/operations/listbankingaccountbalances.ts: - id: 98f17eec14e5 - last_write_checksum: sha1:11ac3e96582193c1f7081b616831b544fc597219 - pristine_git_object: 13b45ba07645be3cb1ffd973e61ee22c247a51cb - src/sdk/models/operations/listbankingaccounts.ts: - id: "166687631508" - last_write_checksum: sha1:bb851893687412a36acb3ea2e79b0f44f7936228 - pristine_git_object: 5738abcf7c8be4516cc01d33caf127996f5f9775 - src/sdk/models/operations/listbankingtransactioncategories.ts: - id: 6256729df8e5 - last_write_checksum: sha1:544550604c8e768ccb8b40569e8e57583f87cac6 - pristine_git_object: fd0858fc1b9adf5a89be4c253b2d3868f689a7f7 - src/sdk/models/operations/listbankingtransactions.ts: - id: d505b264dd04 - last_write_checksum: sha1:567a90430a426934561cbdcbdf4aaf901f91fa18 - pristine_git_object: 8500b0a82e36c9f467c5b3571fbc009ea0d34f6c - src/sdk/models/operations/listcommercecustomers.ts: - id: fbcc7edd001f - last_write_checksum: sha1:917dc528e28afbba1464cc6f33ecb90e880dfec9 - pristine_git_object: 6676428770201541d2309d24b0d715fd9866d56d - src/sdk/models/operations/listcommercedisputes.ts: - id: 7e96480458dd - last_write_checksum: sha1:d1d5129e3931138f9ae8b636dd8f28ccac5cd529 - pristine_git_object: 889e402fbafa119be146fb5d92e59b287d0801fb - src/sdk/models/operations/listcommercelocations.ts: - id: 69aa88f7084e - last_write_checksum: sha1:14c28efb86693674b4d1621957bdcb6481dcfada - pristine_git_object: bf88920ff44d305f1780ddd9178ba6fd7c868519 - src/sdk/models/operations/listcommerceorders.ts: - id: bbaa445e3648 - last_write_checksum: sha1:da67b92f203fe65219787ed02286b88e370c9881 - pristine_git_object: 7804323af6358af5ae499df4d9cdbb1369296119 - src/sdk/models/operations/listcommercepaymentmethods.ts: - id: 5649cf1163c7 - last_write_checksum: sha1:4c0c94c2b2b7da668e6d3f5b8faf195fa89c32bf - pristine_git_object: 31c21f23467ced3fcbb7a6b38fc82905ac9d40de - src/sdk/models/operations/listcommercepayments.ts: - id: 14df34f6a574 - last_write_checksum: sha1:006529f8b29ebdf7eeb2e1e109ada09767570c28 - pristine_git_object: 08dccdffa7fbbd52a4a03009f1173d1d928fea33 - src/sdk/models/operations/listcommerceproductcategories.ts: - id: 731a83bc55b4 - last_write_checksum: sha1:24eb7303a24906a6a486c1dc03ad01197f550f1e - pristine_git_object: 189f7a1f09331d3e90d47725ab36c2ac8d5c8468 - src/sdk/models/operations/listcommerceproducts.ts: - id: 69599a2ca80b - last_write_checksum: sha1:bc97efda6017f583f0eca0d03dabe9b065606628 - pristine_git_object: 5ac1ba9726cc0c03431851efa22e6b5431be3254 - src/sdk/models/operations/listcommercetransactions.ts: - id: 8d958b1d731d - last_write_checksum: sha1:af71c716f12125fbd1511087047206a147d17ff3 - pristine_git_object: d97e0fac7075d13319ec260b0749b8b334dae996 - src/sdk/models/operations/listcompanies.ts: - id: bd514f2d5c1c - last_write_checksum: sha1:1487d8f67d5a1c439e6581e854213aa1a386b9f3 - pristine_git_object: 837a6aae587e8a038402fbcedcd4fcc1873136ba - src/sdk/models/operations/listconnections.ts: - id: 5797f5b9be29 - last_write_checksum: sha1:0e709e410d2b500143f63d78e8eaa9ce4c810a6d - pristine_git_object: d1be0d9421b3b0d768650208abc91adcf7a9b721 - src/sdk/models/operations/listcreateoperations.ts: - id: e24a3a175772 - last_write_checksum: sha1:89b278398f4b381ed74a93ff0528577c575a1004 - pristine_git_object: 069bc8d41c79246d0ed8e6bb7085c95f2ec45656 - src/sdk/models/operations/listdataintegritydetails.ts: - id: 0f5cc919796c - last_write_checksum: sha1:120e7cb3d2d32be3fd839e47eaf7d6624726d872 - pristine_git_object: c98543f76f7c8d4ac907ba9922f9a64a1252ddbe - src/sdk/models/operations/listfiles.ts: - id: cfc010123bfe - last_write_checksum: sha1:069db70781756e3b48013f85ddd39da37f050f5f - pristine_git_object: ebf517796b33ebdde34787d05c365dc4bdea3a19 - src/sdk/models/operations/listloantransactions.ts: - id: 192fdf63940b - last_write_checksum: sha1:0e61c993ce4f0def7cb3dbb64f66419eb6c83cb2 - pristine_git_object: 3e6262e3478b0c32f5c543bb336d07ecb5e0a11a - src/sdk/models/operations/listpulloperations.ts: - id: 2f2dc545b414 - last_write_checksum: sha1:07db30cc5a51f31a8b19823b0248e852b13949d4 - pristine_git_object: d12f7bd86d6d9180c2042db5b65d5858f3d0c770 - src/sdk/models/operations/listreconciledinvoices.ts: - id: 494a549c5cff - last_write_checksum: sha1:5d1093009725097052839693ec715a6b49a36d8b - pristine_git_object: e757008e7544f5650ff8ea74ff9956bd4bca5de1 - src/sdk/models/operations/listreports.ts: - id: 6fa33dac8e82 - last_write_checksum: sha1:f1aa7adcc3a67b9ffe4e1212743bed38b9a74bb5 - pristine_git_object: 68c7f6c306dbab7966f88b5c5419fd2f7892d3f4 - src/sdk/models/operations/refreshalldatatypes.ts: - id: 01573fc6fa44 - last_write_checksum: sha1:af36165b1abc045e74af458d280d0da10fa266f4 - pristine_git_object: de184ca9a7a63e876e5ffb070ec2eadc355d51bf - src/sdk/models/operations/refreshdatatype.ts: - id: 3b0dec3e2d72 - last_write_checksum: sha1:9c07ef3f6ed7d1108662ca846835316119d1720f - pristine_git_object: 8c4dce88a1d5b79fa9992e2820d3903e0094a2f0 - src/sdk/models/operations/replacecompany.ts: - id: 15f9deaaf7eb - last_write_checksum: sha1:dd56621b0a190db2faed25c4f3f8ccc58c20210e - pristine_git_object: 5ee35551d47caea122b4f502f81b95691cc291ef - src/sdk/models/operations/setbankstatementuploadconfiguration.ts: - id: e2f6d645923f - last_write_checksum: sha1:f99a86809aa184cd0cea2c4928083052711b06e9 - pristine_git_object: 0d82052b1e31aef27ee1e18e141da43ff51d0f73 - src/sdk/models/operations/startbankstatementuploadsession.ts: - id: ac3bed1f6cef - last_write_checksum: sha1:7eb2320751bb01fc7624d79336c494bc58d0bae0 - pristine_git_object: 92e53ef2a3ea6175675fe224ffadb9dc47caf4c4 - src/sdk/models/operations/unlinkconnection.ts: - id: 91e6d25ecd14 - last_write_checksum: sha1:5f4e32b0424df5658a94c777839f8a75adbe40ed - pristine_git_object: dbdba4a38ab397554e0d92300812dda648e941fd - src/sdk/models/operations/updatecompany.ts: - id: dbafb9e0f8d9 - last_write_checksum: sha1:937aaa5e965aae942c6550456dbe3c37b5d2b280 - pristine_git_object: 37ead4428659b0b2409ad7f6cf54515e544e23ec - src/sdk/models/operations/uploadbankstatementdata.ts: - id: 07a428fb7dcd - last_write_checksum: sha1:bce9fa9990840e7b367982ef307444f57f3da8b4 - pristine_git_object: 3afe1c91289168cc0f598dadf5da6fceebcd25c7 - src/sdk/models/operations/uploadfiles.ts: - id: 20a437c1b4f8 - last_write_checksum: sha1:ffd5a43e21e20cbd9cd4150ca696f13a6f15f589 - pristine_git_object: 41b6a66defad3567ca1d17742091045dbf549774 - src/sdk/models/shared/accountbalance.ts: - id: 36bf36172174 - last_write_checksum: sha1:462920c8f74d321d41dfde8a6514decfd799800a - pristine_git_object: b010094c1596c260df015513e5945bc3f3921e30 - src/sdk/models/shared/accountbalanceamounts.ts: - id: 47edfe1f9e33 - last_write_checksum: sha1:c9f8eb959fd58c0f3f6f573005e6dcdaba18bfe7 - pristine_git_object: 2b2685f21fb43cb6e45e234955c4faad912d7e41 - src/sdk/models/shared/accountcategoriesupdatedwebhook.ts: - id: 5971666bdbd1 - last_write_checksum: sha1:507f53775478f325175b4b746248dc9ac41a528a - pristine_git_object: c4b05931df1330775e5d7805d70d3908f3dea781 - src/sdk/models/shared/accountcategoriesupdatedwebhookdata.ts: - id: 6fb2989186c4 - last_write_checksum: sha1:1aa706b7a9dfcb282e46c8499e7430efd5acc3a5 - pristine_git_object: 8acb84cf6e4839fc6e592d5a9e35e27338db6660 - src/sdk/models/shared/accountcategorylevel.ts: - id: 10acca03dc49 - last_write_checksum: sha1:8f60d2e25e7ea31a403b81f6d18a0c892d27e76e - pristine_git_object: fe643b87816fb9e312c2ad41b27a59518a4a4f09 - src/sdk/models/shared/accountidentifiers.ts: - id: 84e839bba8b6 - last_write_checksum: sha1:cbac6ae447e9e8b998e7fe23410b836b25f5eac4 - pristine_git_object: 290db19dabc2fa50fd04b64c791f3d2e423478da - src/sdk/models/shared/accountidentifiertype.ts: - id: a8e7f7761a4b - last_write_checksum: sha1:08f8ced8874b55d20db2e3a42a0ddb6bd31dafc9 - pristine_git_object: 373207e4033847a0c6d2971bee8d65eabd76a596 - src/sdk/models/shared/accountinfo.ts: - id: c2e9a79aa7b2 - last_write_checksum: sha1:7fc6b8d19078261ca15cf132c210a41a6466d6ed - pristine_git_object: 3bc9590208c5b1ec4cc3c942ffa27611af33f885 - src/sdk/models/shared/accountingaccount.ts: - id: 989d74e29e53 - last_write_checksum: sha1:370967c18f697d19ff867304472a74e7159e2310 - pristine_git_object: b9db5fc8df36a90d10cfbae603c9988ad8ddb87e - src/sdk/models/shared/accountingaccounts.ts: - id: b57b5f9198e7 - last_write_checksum: sha1:7a70164e1f603977518bbfd78cb2d2367aba5afe - pristine_git_object: 0589ab1e97befc9a125fdcda8cc1f42bd09a6bf1 - src/sdk/models/shared/accountingaccounttransaction.ts: - id: 75315d7626bf - last_write_checksum: sha1:7ee274205ae709967e04519d9ef360280d384309 - pristine_git_object: cc6938150769f80622de834fdce48c92c590545a - src/sdk/models/shared/accountingaccounttransactions.ts: - id: ac481aefa48c - last_write_checksum: sha1:b9146e80d42be65e88e17a8ff86e95fe8f9e53cc - pristine_git_object: 82dae8952567a275d445741356507d874d80b0ee - src/sdk/models/shared/accountingaddress.ts: - id: e4e63bed60e5 - last_write_checksum: sha1:b91d8fe5d460fa45c7ef3f8e566d99a166fd041e - pristine_git_object: eb9e7e67fda5f27796422485fbe9eaaa7d712994 - src/sdk/models/shared/accountingaddresstype.ts: - id: e3226e442011 - last_write_checksum: sha1:cff7184a3e368ccf099122029411f7f9c890bdda - pristine_git_object: 2f4e3b7a6eb1e4a17b9bbd9caa214c113784dca7 - src/sdk/models/shared/accountingagedcreditorreport.ts: - id: 4f4c259fb558 - last_write_checksum: sha1:c82f2ccd0e2388fbdcbd259b0a59ce9efb297276 - pristine_git_object: 4e600e8adeeed3b85ceac2adf61f4ff270370f76 - src/sdk/models/shared/accountingageddebtorreport.ts: - id: cd9ce7beab2d - last_write_checksum: sha1:e9b496f3dbc157e71cf109039251fb1c10638c30 - pristine_git_object: d958af8ee90425284a22aa261e15fa518b796f94 - src/sdk/models/shared/accountingattachment.ts: - id: d9d8f9481573 - last_write_checksum: sha1:358b39388fc9bfa43c936790be02101d8632d992 - pristine_git_object: def0f1784015a80185673538599129d4c4047ef1 - src/sdk/models/shared/accountingbalancesheet.ts: - id: f07d16bfb58d - last_write_checksum: sha1:bf8b915b2e38394e9daff530d9f00d9bf71c5cc6 - pristine_git_object: 168a629d33e33508716012ecc629726356e8b10b - src/sdk/models/shared/accountingbankaccount.ts: - id: ce478859765a - last_write_checksum: sha1:26607b79b9aae2f5906daaca2b5ea75bac76e434 - pristine_git_object: 45c17698f86b15c09b7eb60c4df647f9b60be074 - src/sdk/models/shared/accountingbankaccounts.ts: - id: 3b20cb71e8da - last_write_checksum: sha1:682c1a82d6067e58f6700fa4416ddc8b33c7fedd - pristine_git_object: 125278c6012a1f0cf2ef967b1bd0eba6ae759f99 - src/sdk/models/shared/accountingbankaccounttype.ts: - id: eca8118b73d9 - last_write_checksum: sha1:69cc80b8dde5741dc717cfe1f4578a1c8d2bc309 - pristine_git_object: d14de7cbb5316c19bcd19a71c415ef386c50158a - src/sdk/models/shared/accountingbanktransaction.ts: - id: 6447395b1120 - last_write_checksum: sha1:baa3bd426cb9cd804af659ad21a835e9d522203f - pristine_git_object: a62f9b7d71401478356716ee39a0ea367f332c71 - src/sdk/models/shared/accountingbanktransactions.ts: - id: 9fdddb40f671 - last_write_checksum: sha1:d00a0be8ea59fcee56b379d361f00d70d57e9bc7 - pristine_git_object: d13889db79d7fc160e23f4e0a05fb6e31c8005b4 - src/sdk/models/shared/accountingbill.ts: - id: dc5992ea2b8b - last_write_checksum: sha1:ba6d3d4c4377dfa26bb3be3df8e455712c98f0c5 - pristine_git_object: 41a504c6398146c1e0bea640cccf480728af3d63 - src/sdk/models/shared/accountingbillcreditnote.ts: - id: b2a67b58c4ce - last_write_checksum: sha1:016d904433a2a4598c20c6097e19f02fc94124fb - pristine_git_object: 4aa919291640a7f569f8883cdeeb3ffb258eb7c4 - src/sdk/models/shared/accountingbillcreditnotes.ts: - id: 6c3655c4b0f4 - last_write_checksum: sha1:aa408f00995e0bc629f3113e7cfa44fd8d0af751 - pristine_git_object: 582ad7ed2b9dcedc10fa2073a3d415a6779885de - src/sdk/models/shared/accountingbillpayment.ts: - id: 612936701a32 - last_write_checksum: sha1:3a24fbc991e314156d4dba06f0e6b193db7e74b8 - pristine_git_object: 0118707dac7ac604c1d4c3b575e55c609e5d6b7f - src/sdk/models/shared/accountingbillpayments.ts: - id: 5b74ea7dbed4 - last_write_checksum: sha1:efa03f9ee6449b645a8e95a8e8d4534ea9a956a6 - pristine_git_object: 2df3e4d3c25369f9be743f964b988263d1fac20b - src/sdk/models/shared/accountingbills.ts: - id: 34c17c722602 - last_write_checksum: sha1:90b365916cb5de920e38e87440440e9b4edf9ce4 - pristine_git_object: 619f08dd1d856cc14082587ae3e87bb4a2d30395 - src/sdk/models/shared/accountingcashflowstatement.ts: - id: 7614df660736 - last_write_checksum: sha1:eff512ecd42e8f745048e388094b547f6593f1d2 - pristine_git_object: 93ebd9db88422705854f8368c0cf45631b39a11d - src/sdk/models/shared/accountingcompanyinfo.ts: - id: 57bcec228a9f - last_write_checksum: sha1:395403da3821484529df9121f1aafd9f1e1467d7 - pristine_git_object: c56d2bdffa12700cb464aefdb7876f55f6c3bbf1 - src/sdk/models/shared/accountingcreateaccountresponse.ts: - id: 408492f26d46 - last_write_checksum: sha1:6f0ad5860324b3d066e7fb6cb03cbcb11f6a36c2 - pristine_git_object: 7b894649867ff0f719745bd5fffd73319732852d - src/sdk/models/shared/accountingcreatebankaccountresponse.ts: - id: 7a9db97f0501 - last_write_checksum: sha1:3a73883cf0061d019c0fe6c9ee44d5daff92e59a - pristine_git_object: 596cab96226a009ed91a21fe6472cd92992724e8 - src/sdk/models/shared/accountingcreatebanktransactions.ts: - id: aa03953a046c - last_write_checksum: sha1:36c7c83738596828fb02d8290f328b7f11816ac2 - pristine_git_object: cc8203af20a2c0c8eca8466f2750ec5776664ddf - src/sdk/models/shared/accountingcreatebanktransactionsresponse.ts: - id: 0544762bdc39 - last_write_checksum: sha1:e233533dd952481235d3c7f076baab6202bbe3cc - pristine_git_object: cc1e8806ff4a0e830c23bbe40bd5d775b712030c - src/sdk/models/shared/accountingcreatedirectcostresponse.ts: - id: 637effd6a447 - last_write_checksum: sha1:6ba2dbaea9ce1a9073da83739d37ebdd09f149fc - pristine_git_object: de68d685e76a0d671c7ada728d74c8dc1126ae10 - src/sdk/models/shared/accountingcreatepaymentresponse.ts: - id: a71f7ac6ab98 - last_write_checksum: sha1:885ec6189cdce9fa37585906ede2d4de4ccb87ce - pristine_git_object: f27943bd6f2f439c45684c43d66e29c923019519 - src/sdk/models/shared/accountingcreatesupplierresponse.ts: - id: 6b115d650b35 - last_write_checksum: sha1:3224276a72210df13be4227c01856aa6e60b6a79 - pristine_git_object: db9752e87f9bb50331f36d70e4e06d76e49cd57b - src/sdk/models/shared/accountingcreatetransferresponse.ts: - id: c4cf7d8933ea - last_write_checksum: sha1:49fca4b7eaa8a6f703b4dce83a73f0f7e9b72342 - pristine_git_object: d8ea02e5ded57708f87b7939df0a620962ab37e3 - src/sdk/models/shared/accountingcreditnote.ts: - id: b2fcb35b6e10 - last_write_checksum: sha1:18a12b85497bcea90b73b7a62b61da80b285b5e6 - pristine_git_object: 5a876675cc30eb49d7a371145fff7261625e757a - src/sdk/models/shared/accountingcreditnotes.ts: - id: 3e10503c5446 - last_write_checksum: sha1:ab801bbb3a3066adb38bbb03ed5304f11b4df685 - pristine_git_object: 55b4d63d426b4db0d8b93074ba920cca22ff1423 - src/sdk/models/shared/accountingcustomer.ts: - id: 20635bd570aa - last_write_checksum: sha1:f46560994345cc075b6ff0e5a63889940ed5f9e3 - pristine_git_object: 978d3031d0b8c69f844e9544329925fa9dbf0de8 - src/sdk/models/shared/accountingcustomerref.ts: - id: ea4517258518 - last_write_checksum: sha1:d36b360515a0b3b0bbfad30899adf496d5e1e8fb - pristine_git_object: 53b96ffc134612ca7ba47b97d8e429883302df84 - src/sdk/models/shared/accountingcustomers.ts: - id: 9c5e69378ba8 - last_write_checksum: sha1:e200d9b28ca23f73446a4c755d999bec33f5af33 - pristine_git_object: 45cee2b53bcd0745b6b570d03f45857cc1cef594 - src/sdk/models/shared/accountingdirectcost.ts: - id: 516d6ad28e41 - last_write_checksum: sha1:87022641b752d85d6a5059c98f4b6939269dda53 - pristine_git_object: 4e8be13a1c88fb2922cda57c1d7b45b281a65fe3 - src/sdk/models/shared/accountingdirectcosts.ts: - id: 5b2edf3f8d06 - last_write_checksum: sha1:241b7873063dee38a9570815c8501a51c7e8aa58 - pristine_git_object: e7d019a7c7eb22b34253dc6a925ded03ee6647fd - src/sdk/models/shared/accountingdirectincome.ts: - id: e3716a781235 - last_write_checksum: sha1:cbcc6088732845420a61711397359585283f3821 - pristine_git_object: dea9ac483ffcc47a2d50c6653d68deb41319b083 - src/sdk/models/shared/accountingdirectincomes.ts: - id: 6b196f8d7d62 - last_write_checksum: sha1:8bbd6231e064648754594acbd8aa48196679f896 - pristine_git_object: 35b115731575d128f173d6fc8e9b98de87589469 - src/sdk/models/shared/accountinginvoice.ts: - id: 8fe3bd102d75 - last_write_checksum: sha1:fac08c7a9a5db766bf9b508d96eca0976e49203f - pristine_git_object: 482e9524f65a259aa5311432f19f5b2e31d16dd4 - src/sdk/models/shared/accountinginvoices.ts: - id: 535958473d4d - last_write_checksum: sha1:f9d587426b5168e6a0098069aee96f91d88a4973 - pristine_git_object: e94220c24f6f687e26daa7c1954bfda1a3936b24 - src/sdk/models/shared/accountingjournal.ts: - id: 3abb84bdb597 - last_write_checksum: sha1:6776a1e2d322a0a12c999a8ce4d99de7a9227e60 - pristine_git_object: 2e8af2dc94fb4a30269e137c55ac71db1faa9546 - src/sdk/models/shared/accountingjournalentries.ts: - id: 0b3a3c25b062 - last_write_checksum: sha1:c6de4868b61a6eba6269e8d755ee21ff3310db33 - pristine_git_object: 39cb50cb45d32ab944c3f286b45a359c92cd15d2 - src/sdk/models/shared/accountingjournalentry.ts: - id: 8d995dddca5f - last_write_checksum: sha1:447739006c9094c2c51664d57adeace2248b79d2 - pristine_git_object: ce2fb52eb7fb1ec9197704227504fb0bcb1fb36a - src/sdk/models/shared/accountingjournals.ts: - id: 4040773b21b9 - last_write_checksum: sha1:2bfeb26a9d099728848d38be3baf95b28584a5a5 - pristine_git_object: b1f8d559e9b7320341e35c983cd85c9d17c45182 - src/sdk/models/shared/accountingpayment.ts: - id: 5b70ce80d8e5 - last_write_checksum: sha1:df7a68e1903d741be2452c823e4d747a61a91976 - pristine_git_object: 4544509682cc710a94d2d7321305307706009e29 - src/sdk/models/shared/accountingpaymentallocation.ts: - id: e7f46871bb84 - last_write_checksum: sha1:feba1f81b4c8d92912054b2f9df5b10566e34129 - pristine_git_object: 2c3ecf1ddeb70df7bfcffdcb2de6e8a5e5dfee1e - src/sdk/models/shared/accountingpayments.ts: - id: d60940ca1802 - last_write_checksum: sha1:576388c8fcbbf5db9e4e3dbbbdf887260f56d657 - pristine_git_object: 53d70a4818aa4655eedcfbdecfa9bde997b15c5a - src/sdk/models/shared/accountingprofitandlossreport.ts: - id: 0e7cd4a7b226 - last_write_checksum: sha1:a33501e1c987d7ef81aff6a9d97c7bcd45914439 - pristine_git_object: 736a8ddbff90cf8c29d002658d7efa9a807a7a64 - src/sdk/models/shared/accountingrecordref.ts: - id: 05b090434dda - last_write_checksum: sha1:70e74718da45c3bfb8a0cde900204b38567549da - pristine_git_object: 02c3d0e16bb0e25d7fda1b96c72c43c4ef1fadeb - src/sdk/models/shared/accountingsupplier.ts: - id: f4c0d660f7e8 - last_write_checksum: sha1:767840b054871fbd9eaf0f4dd168b3c9857ef77d - pristine_git_object: aea56ec3b4be812f5b781e300a22a76cfd16ba1d - src/sdk/models/shared/accountingsuppliers.ts: - id: 223fce2a3b22 - last_write_checksum: sha1:cff8599c08b7db20215add940f0340e2be6a653a - pristine_git_object: a4372617b950ff6d0ad6bf4f366b8a78eb9ce54f - src/sdk/models/shared/accountingtransfer.ts: - id: ff0430c239b5 - last_write_checksum: sha1:1b9a941fc1647d1bc65c69cc0d8fb6523d378246 - pristine_git_object: ddda5e82d1d3bb902a230bbca21aee597eae9898 - src/sdk/models/shared/accountingtransfers.ts: - id: ea3edf4fae57 - last_write_checksum: sha1:ca868f1834e82868373c4dc4f44dd9fc7e33c71e - pristine_git_object: b802bb8b26327681de51b28c8262459f1b211732 - src/sdk/models/shared/accountinstitution.ts: - id: 9cdef06a73af - last_write_checksum: sha1:57965bc2e8a650f78c7046214dfffaa4887cc072 - pristine_git_object: 0e615f5ae5d098c12952570ac007fe0333a6ac40 - src/sdk/models/shared/accountprototype.ts: - id: ffd99325161b - last_write_checksum: sha1:5323b846aa3b6cdda89356312812a1e98a30e4cf - pristine_git_object: 989ae21861c4a94cd868ef2bba778cc4b2957005 - src/sdk/models/shared/accountref.ts: - id: 4c986eb1d282 - last_write_checksum: sha1:d919d574f123d0bbfdad214a45bf698012fd00dc - pristine_git_object: 4031698dfa428e26c7fd37c98e93e260761d7780 - src/sdk/models/shared/accounts.ts: - id: 69e438a7ec48 - last_write_checksum: sha1:f1d24a3768f57c927ec67eda1b5b058e2da6d6ef - pristine_git_object: 19657b3ebecb05047d65ccd6b030bac2c8681f18 - src/sdk/models/shared/accountspayabletracking.ts: - id: 3a0b1f5a3fa4 - last_write_checksum: sha1:1bec956258fd58ae10927c03e18c0c48b6848af4 - pristine_git_object: dffff4860a9cb841301b728ca786fe9cd77f4ef6 - src/sdk/models/shared/accountsreceivabletracking.ts: - id: 5b0fdcd4e024 - last_write_checksum: sha1:d325c2697b4065617731d79d39a8b8fe0d3602eb - pristine_git_object: ec86c272ecf0dc0c35569d6cb3e7401809fa772a - src/sdk/models/shared/accountstatus.ts: - id: d3b6d9d9dc1b - last_write_checksum: sha1:3d8da8c7cf6f158b91daab66c4783ddd1c9b7cd6 - pristine_git_object: 12278d094d4d7cb42873c74360d4f673ddd9e8f7 - src/sdk/models/shared/accounttransactionline.ts: - id: e6ff6e2136d8 - last_write_checksum: sha1:e913b894c89585e0ae64d24a96e072334b0612cb - pristine_git_object: 76a99d53e9c935452b730f8b48c19ab478eb150e - src/sdk/models/shared/accounttransactionlinerecordref.ts: - id: 7bcc7a513d0a - last_write_checksum: sha1:a89fee0160817a3c25dc9dd87149aa735a0ba2bb - pristine_git_object: 949842da33cc28d73401ac7cf0942ba9200221cd - src/sdk/models/shared/accounttype.ts: - id: d660396c78b5 - last_write_checksum: sha1:ec24c5608bc06b63cdede8ec919bf951dcdb14f8 - pristine_git_object: c71262dc67fea5fde0ee8745924e6c5472c7924e - src/sdk/models/shared/agedcreditor.ts: - id: 10d9fa38f7bc - last_write_checksum: sha1:a003277b3c4c7ad0cf66a8eca847034b3f08fc52 - pristine_git_object: 94a5aa5f0e3de99e134c7ffc6827e5f7b11254ac - src/sdk/models/shared/agedcurrencyoutstanding.ts: - id: 96a011e621d9 - last_write_checksum: sha1:20601778c4165e7680107d2f83dd9910ebb4adff - pristine_git_object: c00df1f99948686b413f206e65b257f6b76948af - src/sdk/models/shared/ageddebtor.ts: - id: 29b4ff04bc12 - last_write_checksum: sha1:864feeb62f279606e17db4785908639c93caf597 - pristine_git_object: 562340c8e8de14e9ff47dba513ddf9fc74f64d2a - src/sdk/models/shared/agedoutstandingamount.ts: - id: d46820ef72f7 - last_write_checksum: sha1:14a323b00e5ce89bac1f9259e5f2debdfbee5cfd - pristine_git_object: 7ed34036a71bf7fb3281254822f5a6984225214d - src/sdk/models/shared/agedoutstandingamountdetail.ts: - id: 6d4a35bba6bc - last_write_checksum: sha1:1113b073e2f6742c97569b700107d5a86b5cb1f0 - pristine_git_object: 80bde1a9c4d96be9666baae1d15962e943802091 - src/sdk/models/shared/attachments.ts: - id: e03ade5aa7a6 - last_write_checksum: sha1:b57eeede22573009eb6ea13462928bb9007f904a - pristine_git_object: 49f7074563a72501fad1cfa1e4b712c4f6d144e5 - src/sdk/models/shared/balancesheet.ts: - id: d2cd2e138726 - last_write_checksum: sha1:a339ccc05e8c4f3ba0576eefe32ca2cac075fc91 - pristine_git_object: 9f11b3df529a88c4839bf781bf449efa5699bcfa - src/sdk/models/shared/bankaccountref.ts: - id: e1d54782a279 - last_write_checksum: sha1:3417f27b08b1ea784123da8cc0d2dfa6eda0a765 - pristine_git_object: 217f7b15d4c5727dab0232e88f74ebc8ec52f838 - src/sdk/models/shared/bankaccountstatus.ts: - id: 01e2b1dd61c8 - last_write_checksum: sha1:f52ba944c93769df04b70451d9e993db5e89571f - pristine_git_object: bca71b03045f81a36808773116eaa37664a1e10b - src/sdk/models/shared/bankfeedbankaccountmapping.ts: - id: ddafae4a7e9a - last_write_checksum: sha1:ddd58ffcc0a8fca7d618d122093a18bb52432ab8 - pristine_git_object: f723da91790764efe8ecd43472da7747d3ca0920 - src/sdk/models/shared/bankfeedbankaccountmappingresponse.ts: - id: 8b0797554290 - last_write_checksum: sha1:e198b280025558d2b3e9c8d4e75ce09b4b337587 - pristine_git_object: 990391403eb8497feb116b8891eb3e12ee9a954d - src/sdk/models/shared/bankfeedmapping.ts: - id: c66f7d81a7c7 - last_write_checksum: sha1:94f6753cd3c23e547429c17e20b1bee0c48c94f0 - pristine_git_object: 07be2dcfff64c57b46b53a5690f1a329deceaead - src/sdk/models/shared/bankingaccount.ts: - id: 9b2e6430eebc - last_write_checksum: sha1:009ec07e219f7a228280c1992822e71221a41c6b - pristine_git_object: 778135f6e39b9baac3c767656da54a0a54b59a88 - src/sdk/models/shared/bankingaccountbalance.ts: - id: eef5279c3c8a - last_write_checksum: sha1:64f1967e8c290e79d8edd05185d257e25557fcdc - pristine_git_object: 592fcf2eaec3fb627cc01bb68ddb72340806a419 - src/sdk/models/shared/bankingaccountbalances.ts: - id: c72d1bab1e19 - last_write_checksum: sha1:5f00a41b1caf4cd58bd31c2a84c255435da28b85 - pristine_git_object: 5bbd9b66f909d29b09cf02009f9a6d9ba152de36 - src/sdk/models/shared/bankingaccounts.ts: - id: 01e3f38e88ef - last_write_checksum: sha1:02dc1cea5ad1900aacac38ad0ded959ae7eafed6 - pristine_git_object: ffcb308f83468d295b2ef962af37096a09ce3753 - src/sdk/models/shared/bankingtransaction.ts: - id: ecf2f48e9a5d - last_write_checksum: sha1:f04c0713e9f302d060b9aa4251e9ed6891bb52a3 - pristine_git_object: c0f895ea2acb49cd59e8db51a2d9b10f6575f3d6 - src/sdk/models/shared/bankingtransactioncategories.ts: - id: 06b152554f26 - last_write_checksum: sha1:b0d3322d9524c5f5196d1d31da58919b0edba284 - pristine_git_object: 9ffcd1e5c755d5b9b2c0beabeb509f6374915c9d - src/sdk/models/shared/bankingtransactioncategory.ts: - id: e3cdfd0fc7c6 - last_write_checksum: sha1:63f9382749cc383a9df13d7db082e1ad921d4679 - pristine_git_object: c32857aa339e0d57ce93ac394ec482aceda5bd10 - src/sdk/models/shared/bankingtransactionref.ts: - id: 0f7626a00ec8 - last_write_checksum: sha1:12e3274fa103c4546b190542d27834cabfbb4385 - pristine_git_object: df1a08bc47ddf23092b05ae3bd7a9b2bb48cc657 - src/sdk/models/shared/bankingtransactions.ts: - id: 22012529f19b - last_write_checksum: sha1:286c4a7a6593ccaaac7eafa43075bad88e355178 - pristine_git_object: 04e8f804a3626e570847c6f479ecd1830590446b - src/sdk/models/shared/bankstatementuploadconfiguration.ts: - id: 651de366d775 - last_write_checksum: sha1:54815e4ba3873dc31bf66babd2f877aabdba8e9d - pristine_git_object: 1123d6ad35884c1682ac38ebd5259f6f331a339d - src/sdk/models/shared/banktransactiontype.ts: - id: b50babcb8d5e - last_write_checksum: sha1:9c80c5b1c134ad84de853d9569c741abed35dd68 - pristine_git_object: fb414cf5ac9ccdda82b5a587bc5852d99ea10617 - src/sdk/models/shared/billcreditnotelineitem.ts: - id: a301e691a88f - last_write_checksum: sha1:4d46ce2707fe9eb3d3a48188024efbcf433cf584 - pristine_git_object: 254902ca3a7e93d65ffd15fed6d72f2169213956 - src/sdk/models/shared/billcreditnotestatus.ts: - id: 6cf2549f04de - last_write_checksum: sha1:57ceeb85424b54f7f8137ec4f9d6db1041d35be9 - pristine_git_object: 3ae19ab765bf7dcdd7a5c2b4af0d6328b38e9b12 - src/sdk/models/shared/billedtotype.ts: - id: 7856730985d7 - last_write_checksum: sha1:3e775206f4780d39e22156eab6c6975ca31eef4f - pristine_git_object: d7b4ff6be1150892d580be7558f7f60931395aed - src/sdk/models/shared/billedtotype1.ts: - id: eaf66e55997b - last_write_checksum: sha1:23e64ea125e6012c0c03671406c6d9ea965cc850 - pristine_git_object: ce8fa2ae2bbd69b74e7e9dac6dd5fa4de8cb087b - src/sdk/models/shared/billlineitem.ts: - id: b895a9163af6 - last_write_checksum: sha1:0a03a26841b100073f9c6e7987f5d7dc2719d86f - pristine_git_object: 0f09c59541769b225c30467df8274d921fd921eb - src/sdk/models/shared/billpaymentline.ts: - id: 1ae0cfc069f0 - last_write_checksum: sha1:0fdf86ee315c0457cb0b3fe76e9ce26741f78f77 - pristine_git_object: 61fe543e765a63ec81ef02a9e2d8af7d7f484146 - src/sdk/models/shared/billpaymentlinelink.ts: - id: 536d538e8b73 - last_write_checksum: sha1:6586180b6cdef83ab3be8795625d89c62f5096a2 - pristine_git_object: 704ccfb6c0d22a254e565e164e3b88aa5d261be3 - src/sdk/models/shared/billpaymentlinelinktype.ts: - id: 76956e1f2278 - last_write_checksum: sha1:3f80e54b0c2383b0d6f656efb62597b4bc3939f7 - pristine_git_object: d7389d4ae9b65bff0f51f90d2d90f12a7cab6538 - src/sdk/models/shared/billstatus.ts: - id: 3eb2db191719 - last_write_checksum: sha1:f477c79d7cc7f022bb82951756f6533dc374324c - pristine_git_object: c26739f38f64a8442009b5176be1c34aeb3a7caa - src/sdk/models/shared/cashflowstatement.ts: - id: 36da79b5ac8b - last_write_checksum: sha1:dc24db18cfcd757051ad4b505605463fc35f5ad0 - pristine_git_object: 0733414eaaf17fa1d5662579228a05a5fef3446b - src/sdk/models/shared/clientratelimitwebhook.ts: - id: c691f6d7f890 - last_write_checksum: sha1:873cdc12f8278470e382ae879c4bb2eb17f7f029 - pristine_git_object: cdc40c0b87eb15c3725596b713a38dec90aa9083 - src/sdk/models/shared/clientratelimitwebhookpayload.ts: - id: d068d62c8d39 - last_write_checksum: sha1:e9a21951c06c14ff5a39fd7379cd1c3bafc314d1 - pristine_git_object: 72605d6242434c3e2be999f0006634d5a193e129 - src/sdk/models/shared/codatfile.ts: - id: c7308ff582f1 - last_write_checksum: sha1:46a60236564ab061fff7b8496ad94922d8284ade - pristine_git_object: 0bc3490e3175f93bfcdf04ef1d88f4f56f9771c2 - src/sdk/models/shared/commerceaddress.ts: - id: eacced2bf27c - last_write_checksum: sha1:9848fae476410454712418655ed551a1c5f85989 - pristine_git_object: 682d0953e69196ebcc9816a7f180f04ba652a4f6 - src/sdk/models/shared/commerceaddresstype.ts: - id: 87b44b323ce6 - last_write_checksum: sha1:c557c9333bae4fc5136a0971f1f0435628c02d82 - pristine_git_object: 9bcce91e1e2190d49147dfe4055367940147ea4e - src/sdk/models/shared/commercecompanyinfo.ts: - id: 177788f9d2d8 - last_write_checksum: sha1:d20619ee084a9c328c2ee4cdd38ca8ff9c18798f - pristine_git_object: 2ddc165d434eea8725c8b67c1dd0630a8421c569 - src/sdk/models/shared/commercecustomer.ts: - id: 476168b64af8 - last_write_checksum: sha1:3fc2d3e0a078035734f7e917891b2932b8558742 - pristine_git_object: f4dbc76a697caae6966c3d1070e98d3edf13c104 - src/sdk/models/shared/commercecustomerref.ts: - id: 463a995f2e3e - last_write_checksum: sha1:c30a59fdcad5e76021f4a47d65f53ca9e727bc37 - pristine_git_object: 92fb556b2891bfbb1a1a1794dd294f48c52abaa8 - src/sdk/models/shared/commercecustomers.ts: - id: f418c0503394 - last_write_checksum: sha1:7f6c9cbafca5594a0e2f353b1569fdf61bb11a15 - pristine_git_object: fe380a65585615af5331475200bfd4b7c1dfcce1 - src/sdk/models/shared/commercedispute.ts: - id: e67f752ceeec - last_write_checksum: sha1:5e4e04a7f767c3ff2cc9363db92f3021fb19ae72 - pristine_git_object: eee44159d5256fc1c8ea80895f86a0e6eb767516 - src/sdk/models/shared/commercedisputes.ts: - id: bc657e968cac - last_write_checksum: sha1:00078ccf0b9ef4ec80f5a5860415e49c41643d99 - pristine_git_object: b6387e215e8979ad5eeb70f7809b936b0403505e - src/sdk/models/shared/commercelocation.ts: - id: ae6c00968212 - last_write_checksum: sha1:4b19bdcfd1ec0215a912a57e68a7bf61e1b34a88 - pristine_git_object: 3b0efc685c5262c0b214ec348300410fbda50801 - src/sdk/models/shared/commercelocations.ts: - id: 31a03bd30ad1 - last_write_checksum: sha1:65fe45fa6ff43b9a806dc47f5aae31c66b983cc3 - pristine_git_object: b906bf676fa3350fca14753fe8f6e504369db149 - src/sdk/models/shared/commerceorder.ts: - id: 39a02cad271b - last_write_checksum: sha1:abf2133c574a53ca85ca274519c4cb5310d74eea - pristine_git_object: 61158014e250e22c3bf7ce2adfd1a1ce5246256e - src/sdk/models/shared/commerceorders.ts: - id: ec9acfe98913 - last_write_checksum: sha1:03dfb417350aa2c50c818eec293baf8e011b4a60 - pristine_git_object: e5f0a59298c9f71f9d2ca18c441cfe5735a8f20f - src/sdk/models/shared/commercepayment.ts: - id: 0a39620240f6 - last_write_checksum: sha1:cc61a70d808943f578927a1083836c82537a8d05 - pristine_git_object: b039b8c4e847287b6c12759e5ac5bcf2610cd16c - src/sdk/models/shared/commercepaymentmethod.ts: - id: d104557761a3 - last_write_checksum: sha1:26e62e069573f567604c9c649c7a236748271411 - pristine_git_object: 5a5c76009466372a9f2efda65649dfb4a4b2102c - src/sdk/models/shared/commercepaymentmethods.ts: - id: d2646731d3dc - last_write_checksum: sha1:d915e014a410979cb9c09e77ae2d1a8104e8441e - pristine_git_object: 381df211d5434ea7f47f9a5022c5d9fbd6c9da59 - src/sdk/models/shared/commercepayments.ts: - id: c7ef327c714a - last_write_checksum: sha1:5f8c9defe88a74d2a4fc36d490eb99d8c62c6b60 - pristine_git_object: b20e588e47ffa6c5577e281785ebf72629eda15e - src/sdk/models/shared/commerceproduct.ts: - id: 8128e3bd7f98 - last_write_checksum: sha1:13baf47e26b0e2e64bde2184d06e942e80e1c83b - pristine_git_object: c2ef64f48e2a4dc1f98e9e42ec84af64f4536d7a - src/sdk/models/shared/commerceproductcategories.ts: - id: 142976365dea - last_write_checksum: sha1:6c67008f8d4e477acf1f14753fea704f3158124d - pristine_git_object: 7d83f6e688b320b3593d92daa18c62c87f0e12db - src/sdk/models/shared/commerceproductcategory.ts: - id: 94aeeeeb4580 - last_write_checksum: sha1:070793a079c1d9f739e65f2274d300a945b4cfac - pristine_git_object: 42dba0852a9459a4265773477f77cbd9c1746022 - src/sdk/models/shared/commerceproducts.ts: - id: 4d1dc9cc0199 - last_write_checksum: sha1:e3dee5332db3bc7ba1aa14f9cdedd87bdc24d052 - pristine_git_object: a6251cd1b72aa1b6f4c4cc5735531700d8d818f4 - src/sdk/models/shared/commercerecordref.ts: - id: 10b6cf0851ce - last_write_checksum: sha1:af8817c2bca579d123d90939166219c1f9329449 - pristine_git_object: 43bbee5510aefde6a40df6fcef5a926d8601831b - src/sdk/models/shared/commercereport.ts: - id: cd3e17cf25ae - last_write_checksum: sha1:d63436bf1a13adb052ab3f5d8a91f1bccce644bb - pristine_git_object: 9346a554b2bbb36d336bd2ecea59b71e442b743b - src/sdk/models/shared/commercereportcomponent.ts: - id: 4422cae78b93 - last_write_checksum: sha1:8fde1f910f4f463dd7dc844cce827b65595f1dd6 - pristine_git_object: 10054fe450db1ed57b9d11a7c0e811162231536b - src/sdk/models/shared/commercereportdimension.ts: - id: 625a96534603 - last_write_checksum: sha1:7a167b414f651f1e30a67bf707464aeff6f5882e - pristine_git_object: 4434cc05766218c64bfc404cdfab1f8ab38a17e5 - src/sdk/models/shared/commercereporterror.ts: - id: 1fef2cc5cc07 - last_write_checksum: sha1:7383be9fc0e277348d8d2be46c17a83a135f6723 - pristine_git_object: 42085a7604de854add63de4dfb64569589757a94 - src/sdk/models/shared/commercereportmeasure.ts: - id: 672daff9eaa8 - last_write_checksum: sha1:732fabb5bff2a926aff38e63df06b9ddf43fa2f6 - pristine_git_object: e103b2b34584533da179924aa3942b3619cad34d - src/sdk/models/shared/commercetransaction.ts: - id: 12e9e423ff90 - last_write_checksum: sha1:06ce3b33d6a91994c09c3a0196449fc5e66c945f - pristine_git_object: 3dd6caea76fe6d90b45f02bd5972aec1a908c541 - src/sdk/models/shared/commercetransactions.ts: - id: b26474003f14 - last_write_checksum: sha1:e8c00f1850b86dafff2dc8bcb418314ba44914c0 - pristine_git_object: ec8abec493699c2dd44f1bf3ae9a343fe71bbc86 - src/sdk/models/shared/companies.ts: - id: a4b81f9ba7c8 - last_write_checksum: sha1:81432b885d166aad72ebfcdf5b25eb9c822545b4 - pristine_git_object: 0f308542ebb67c7b1d3262721bbe236d1176ef3c - src/sdk/models/shared/company.ts: - id: 8f41ac6a5b4f - last_write_checksum: sha1:e5b79917ba6f3de462c750c27d5bab9366e8159f - pristine_git_object: c3f2e934b486af82660fd42440e218a3d83eb132 - src/sdk/models/shared/companyreference.ts: - id: f80ee466bdc7 - last_write_checksum: sha1:a13593197e2c55252dac28abfd5493a76a400e5b - pristine_git_object: e40af5e267211b26d0d3b0296484b7450c485126 - src/sdk/models/shared/companyrequestbody.ts: - id: 9e2dd8b2247d - last_write_checksum: sha1:a3027f00426e9affb8b7f8d930db63b89c197607 - pristine_git_object: 5e438635a0842512ed8dd3a9ee464187ed7ff3fe - src/sdk/models/shared/companyupdaterequest.ts: - id: 9a4400207ec8 - last_write_checksum: sha1:371f7f83676f4130f9885c506c8184c53e202390 - pristine_git_object: 442b7a78cb3fde01477e7bb5cec5626c06a9a58b - src/sdk/models/shared/connection.ts: - id: 18ea99cdadfb - last_write_checksum: sha1:c1598133f1d5bc618065da7bfbc872e8365f332b - pristine_git_object: 6f994aba741029e16d1241b91e9155d9ac032e19 - src/sdk/models/shared/connections.ts: - id: 221acd1ae99a - last_write_checksum: sha1:ef2d949a3163430d3095303bf231c18b7dc93c9c - pristine_git_object: 1278d54c36183c06f6113dd14c25f115be7a6465 - src/sdk/models/shared/contact.ts: - id: 0500236ba8d4 - last_write_checksum: sha1:741f3c4d0632cad31783fe8ca4a7e2232c14e054 - pristine_git_object: c1a33d458d8493bad15d0afccbdd06858ba32071 - src/sdk/models/shared/contactref.ts: - id: 52b2378781cd - last_write_checksum: sha1:40527004a4282c3a94350f98a2b7da8ca78738ec - pristine_git_object: 79872d84046552ac425cca221f0265186476151b - src/sdk/models/shared/createbankaccounttransaction.ts: - id: a16c9099a6c4 - last_write_checksum: sha1:5f893edcf66277665978a68919ad4ed3a439c86b - pristine_git_object: 79eed4297fce21d4e1dfe89c54e3f38e8f674402 - src/sdk/models/shared/creditnotelineitem.ts: - id: 798df70127bf - last_write_checksum: sha1:aeffb4302436c8b0c1bac456fbfc2e112daaf4fe - pristine_git_object: b5a5be9cc48fa76e54e8fbf5b7c06ca24fa52c21 - src/sdk/models/shared/creditnotestatus.ts: - id: ae63a45addfe - last_write_checksum: sha1:d8c74d99cfee0eabe92b327586c9e73d2bd27d94 - pristine_git_object: e1e3db6ba8476d4c6b28e1d5227ba1822077a04b - src/sdk/models/shared/customerstatus.ts: - id: a715f684b8e2 - last_write_checksum: sha1:2ad16fd3a5a815aa350bf0bad3dd2e13a2040a34 - pristine_git_object: f6d3945d575b0b3279989b62696d068e7517c420 - src/sdk/models/shared/dataconnectionerror.ts: - id: c94cddffcec9 - last_write_checksum: sha1:e968b9983e395410ddd93aa9967671e46066eae2 - pristine_git_object: 1cb816d0f2b87e31e36ad1ece98b6f25bcdb148b - src/sdk/models/shared/dataconnectionstatus.ts: - id: 506ff77d012f - last_write_checksum: sha1:6ab2241aa8830aafaeb937d48e97918a68b9dac7 - pristine_git_object: 88889c800a39f393c9445929bbd2150fc6daf7ca - src/sdk/models/shared/dataintegrityamounts.ts: - id: c0494bb7b39a - last_write_checksum: sha1:89eeef9ff3864faf78060f9415bcbf6ab572be90 - pristine_git_object: fcd03df1a3d140310f67780a52cc9b3b091568fb - src/sdk/models/shared/dataintegritybyamount.ts: - id: 1cc6cbf86862 - last_write_checksum: sha1:2d7930de1a5a04c61963292d63bf5ea3bfc2ffec - pristine_git_object: 14927e6c943723f56ce4e676f32c9c7bf03133d7 - src/sdk/models/shared/dataintegritybycount.ts: - id: 1c611f381d68 - last_write_checksum: sha1:559f98f3b277e8b632d791ad6fe5f2d0bd3edd00 - pristine_git_object: 0d20da6e1a5ecf3947660974cccf8b64c22eb8d7 - src/sdk/models/shared/dataintegrityconnectionid.ts: - id: b4d12b8570ca - last_write_checksum: sha1:2b6ee484741598583c0eadbdfd6361577ecbc78c - pristine_git_object: 5ca0036822d8200b7cadf7627d88a242ea120338 - src/sdk/models/shared/dataintegritydatatype.ts: - id: 1b70358a9b55 - last_write_checksum: sha1:423823816f5c4addeafe81839eb301aaaccff60e - pristine_git_object: d27cb50a25fe47eebdee583012db8a27e0491cf5 - src/sdk/models/shared/dataintegritydates.ts: - id: 466f0c6389d1 - last_write_checksum: sha1:a018d9adf5065780bb0c30ec5444c921422b628a - pristine_git_object: e2c5b47b34864eb66f1c4eec148a4d0977a71652 - src/sdk/models/shared/dataintegritydetail.ts: - id: 02e297c2ad51 - last_write_checksum: sha1:a77fa1f695f5662348d09b9d0c10d6398fef9368 - pristine_git_object: ebf768d63311dffc35ae54bb394923d61a97e768 - src/sdk/models/shared/dataintegritydetails.ts: - id: 0c3e2f38be37 - last_write_checksum: sha1:b83b434df5149adde47c873a4506a0bd56618d95 - pristine_git_object: d4c42ae570aa97147138e2411e566470fe515f8c - src/sdk/models/shared/dataintegritymatch.ts: - id: 063154218e8e - last_write_checksum: sha1:7cf88575a8ea986def816acc2c0779a88bd16058 - pristine_git_object: 26738ee8753f40e830694bc6beff54ad96036c87 - src/sdk/models/shared/dataintegritystatus.ts: - id: 7f9fffc321ed - last_write_checksum: sha1:5b9c5b6dfcd9ae7d5eb46823524a40ec951d98b1 - pristine_git_object: 5d844fd39f0f82b0da293ae6cdc76699c9cb9948 - src/sdk/models/shared/dataintegritystatuses.ts: - id: b35ab8e847ac - last_write_checksum: sha1:479eb162daedbe65c4767cfd571015cd78ca3250 - pristine_git_object: f5f9dd0989cd278b993c84ca11ec2848b865bdb9 - src/sdk/models/shared/dataintegritystatusinfo.ts: - id: c2dc77ad570f - last_write_checksum: sha1:3fd5e751a36586bb0af69d4bf4062226c7cebee7 - pristine_git_object: 50296407c3034872f1430b56d67e70f19ce2b8f7 - src/sdk/models/shared/dataintegritysummaries.ts: - id: 0e3d02c68d9c - last_write_checksum: sha1:2e37f9476592d4f50c68415f882036ae73b79296 - pristine_git_object: e97bf82b04ff2cb6c3b3ccf72bcea6b65f7b0536 - src/sdk/models/shared/dataintegritysummary.ts: - id: 9c220551f121 - last_write_checksum: sha1:feb3b58fcd432e5db7b577071f956774806b9457 - pristine_git_object: e7df54442e6f831396bae76f8b7e394ca0d4fb2c - src/sdk/models/shared/datasource.ts: - id: d4f7cfe3c1ed - last_write_checksum: sha1:b1cd57ac59a660f59e1d18a5e421ed080f737782 - pristine_git_object: d71ace0d48e69a9ae3c97704abfe85eab95c476c - src/sdk/models/shared/datastatus.ts: - id: 4f56e78a99e5 - last_write_checksum: sha1:eba6dba549c86bfcde0d6bcc81c5d74a1d19fd00 - pristine_git_object: 431478c2d5b04d59350c804a78382def3f19baed - src/sdk/models/shared/datatype.ts: - id: 24637063ef68 - last_write_checksum: sha1:f0315c100cd3ecd8937418bc588d9be930a0d440 - pristine_git_object: e1060cb84379a05c7d444157842b05ca51b4019c - src/sdk/models/shared/directcostlineitem.ts: - id: e6ab9b139bec - last_write_checksum: sha1:13a2ef903fa85cf97d5000bb0906d9ffd1308f46 - pristine_git_object: fe9992a6113603cb1aa0f9e81e69850f0ff64e62 - src/sdk/models/shared/directcostprototype.ts: - id: 4978f1a92bc6 - last_write_checksum: sha1:e7a82f5f2b1ef5ebac287d2a73d84de2ed9b378f - pristine_git_object: b7951c106eb34641550fed1ccbd28e4f6ab01e4b - src/sdk/models/shared/directincomelineitem.ts: - id: 9295b852fff6 - last_write_checksum: sha1:c3efc1aaa07dcaffb49ea136f501e7d701273705 - pristine_git_object: 1d06bb152a125351e53c4ac71b622a0ca03201b8 - src/sdk/models/shared/disputestatus.ts: - id: 3bb66ea6a996 - last_write_checksum: sha1:83500904492673e46c048d6e550e32a335758927 - pristine_git_object: d1d3e700f6ee5470addd70555e5a507b2f3fb3f9 - src/sdk/models/shared/enduploadsessionrequest.ts: - id: 6a65f90e61b5 - last_write_checksum: sha1:8f953127559612f4d8caf147be8c1b586cf5e42e - pristine_git_object: 5e774db58403fe7b53d095d5cf247bb30f1b1d88 - src/sdk/models/shared/enhancedcashflowitem.ts: - id: 7330c504a05a - last_write_checksum: sha1:39c2070521acb3e1b8f254db675191d208013c6e - pristine_git_object: 43e702407dfbb14cdc2fcea3a260c7bd4d1c2cd0 - src/sdk/models/shared/enhancedcashflowtransactions.ts: - id: 2312de45bcfa - last_write_checksum: sha1:e2bf44b0bceeab534490aa21124aef98b9a2d341 - pristine_git_object: 6b1246f0b9bc64c60f0336f0d0c8894c26e7e7f1 - src/sdk/models/shared/enhancedfinancialreport.ts: - id: 420516a349a0 - last_write_checksum: sha1:659cca253c2f188e8bf781c04db625347d0966a0 - pristine_git_object: 7cbb767bf27a8173aaecc524359eacccd0a8ad0e - src/sdk/models/shared/enhancedinvoicereportitem.ts: - id: 2b66e7d76bfe - last_write_checksum: sha1:865ca9103b898cff08d320b2693e3d6c2e3f3303 - pristine_git_object: 7b4df7fb87d7f8ce92a9e31cff8ddf5eedee04f0 - src/sdk/models/shared/enhancedinvoicesreport.ts: - id: a8e3f4b78bd1 - last_write_checksum: sha1:0a49969d6113a64b035469bc26852489fdb34692 - pristine_git_object: aceff1eb0763ba2c1214936461de79a1674e6408 - src/sdk/models/shared/enhancedreportaccountcategory.ts: - id: d95cc698afb7 - last_write_checksum: sha1:4cac713471d50c25ded8024837678e75feb060f6 - pristine_git_object: caaa2691925158ea2acb1291965b9ee5ccf204a3 - src/sdk/models/shared/enhancedreportinfo.ts: - id: f034c510e9b4 - last_write_checksum: sha1:93e6765368f32acde8a8e8bf05ea4229268f9526 - pristine_git_object: e58f7c6fe7f59cf40e8ca869cafffc09961225ec - src/sdk/models/shared/errorvalidation.ts: - id: 7595eed057da - last_write_checksum: sha1:b7f44c1f99c9de84a9177a6fba2f76704a894a48 - pristine_git_object: dc97b86b1b0a47cc49cc6ce168bbf2dc7362a7d4 - src/sdk/models/shared/errorvalidationitem.ts: - id: 0fbe584c7194 - last_write_checksum: sha1:ea42d03e55f11719c38dc24ffdd5d982be3b1ce3 - pristine_git_object: cd21ec230bfad899a805264c87467c3a1762e9bc - src/sdk/models/shared/excelreporttypes.ts: - id: 94bde508e79f - last_write_checksum: sha1:50cc21057533340ba6d4a42ff985a53023f89843 - pristine_git_object: 539c8ad07016a6a451b41f7b5d5e37f9ae78e9d3 - src/sdk/models/shared/excelstatus.ts: - id: 7e48932a1c92 - last_write_checksum: sha1:6f56aa43d172665bce890b5a6ce2a743200a115b - pristine_git_object: 141f4e99cb2bd6e1cd2f3f047ab49eb8c0a987e1 - src/sdk/models/shared/file.ts: - id: fcef1b48424c - last_write_checksum: sha1:55656a1593c6c4b7f67f0d2b0ffae22329237830 - pristine_git_object: 1b2ec7e477951dda788ad200d637ce507481b5d9 - src/sdk/models/shared/fileupload.ts: - id: 06fb671293e3 - last_write_checksum: sha1:8b344008b783d7c216330b2544f21a8cc2f59eba - pristine_git_object: 9228a1f06935594638f74e847987a6c2b0eaea17 - src/sdk/models/shared/halref.ts: - id: 1c4609be4603 - last_write_checksum: sha1:726a4c18840841a94f441dfaf7dd009deb1d01a6 - pristine_git_object: b9e7e4c579cc8582671664110642ed1fd3fc403f - src/sdk/models/shared/index.ts: - id: e97e906e3c14 - last_write_checksum: sha1:b5e462a096953b1726cca22130a18a29799eba77 - pristine_git_object: bb8e8807b8577e56ee857f2afcde6e3c51764465 - src/sdk/models/shared/integritystatus.ts: - id: 892fa01b1438 - last_write_checksum: sha1:32d5c3598c6734de2932b88e5e229220922657c8 - pristine_git_object: ead4d1246f26427f3802b4b55dd50bba3350bc07 - src/sdk/models/shared/invoicelineitem.ts: - id: be44615b59d3 - last_write_checksum: sha1:f5f8f0f81d42e3c6f1b6f83012dca32dc90428fb - pristine_git_object: fce631fc8d51de725ae10160aaa4fd15b463ea96 - src/sdk/models/shared/invoicestatus.ts: - id: 6d94c6935128 - last_write_checksum: sha1:5932dba89d236758c22fc4ac0b3b318442d1c201 - pristine_git_object: ad4b5dbeb20e15b364836326c9b03b854ef1e41d - src/sdk/models/shared/itemref.ts: - id: 7c811d63335d - last_write_checksum: sha1:881bb396b9d4020718277f051974c3ae2d6394b5 - pristine_git_object: 7d726a6a271eec3bf6a15e613ef8023749fd35d9 - src/sdk/models/shared/items.ts: - id: 9bf34b20cc56 - last_write_checksum: sha1:449bb128b93f0bc946e9d2fa385586b97838274c - pristine_git_object: a136df32b9890657904609b5b54eb15dc0c35367 - src/sdk/models/shared/journalentryrecordref.ts: - id: e6053daec04f - last_write_checksum: sha1:4ef31c9ee3bdee8d31ca4c390f94082548015a38 - pristine_git_object: 6a2cd079ae681a87ce50f9a148ad5df65d100002 - src/sdk/models/shared/journalline.ts: - id: f779b2167fc3 - last_write_checksum: sha1:b82b8afaa20b2fc45322054d0f99f9da8b0d8386 - pristine_git_object: d3e7a818364a803b369c671be84e81e5906ed14e - src/sdk/models/shared/journalref.ts: - id: df7c7b2b02ca - last_write_checksum: sha1:f27f975407179014c1fcbad835c7dee92c852773 - pristine_git_object: 8f72fb0c97568a53c7f8efa56e200c2beec70fe1 - src/sdk/models/shared/journalstatus.ts: - id: 4160ed0fba04 - last_write_checksum: sha1:75da019085d5f6db9d5a9f51d03800cfbff74e2f - pristine_git_object: 4d78bb92d195b6ba62e1a4fba7b4f8dfe534af5d - src/sdk/models/shared/lendingcustomerref.ts: - id: 4116c4b0ef5d - last_write_checksum: sha1:5320920b6efbc677d5f43be8ad9853057939f057 - pristine_git_object: eba63ac6a01d3c474f66586f6e11305485a3c6a9 - src/sdk/models/shared/links.ts: - id: 5c9b3efadf74 - last_write_checksum: sha1:8b7a51bccdc54cef3382bb73deeeb8d11f20ee85 - pristine_git_object: f5f43ba0e9fc6958595d62991019d322ff0eccc9 - src/sdk/models/shared/loanref.ts: - id: ba6fee3486f0 - last_write_checksum: sha1:e8fc7c2a4b07860ea67de2b8968ba5fca117d086 - pristine_git_object: 369b1f488adeb658e8b728f24540053d68c6e781 - src/sdk/models/shared/loansummary.ts: - id: f8b0476d5e76 - last_write_checksum: sha1:1905960be9185340ee341a363ebaefa67912e2a8 - pristine_git_object: 20408d769698b76d397494f950a74027cbec73f0 - src/sdk/models/shared/loansummaryintegrationtype.ts: - id: b31a3164062a - last_write_checksum: sha1:11964c6fe1cc8f35fdc5f3669b8f62c0c25bd4eb - pristine_git_object: fb6c199ab394d6a383bd7fcca7580a9ee85e92d4 - src/sdk/models/shared/loansummaryrecordref.ts: - id: b49604268eae - last_write_checksum: sha1:8b9b7951f1b0bb034af0874e62b054b712684c96 - pristine_git_object: 76a432102224aa86a9e04a24f088d9a1effa6f0c - src/sdk/models/shared/loansummaryrecordreftype.ts: - id: ea199f235b16 - last_write_checksum: sha1:3e5ba63f49292721c5518b60a8f12cd0ab93bd86 - pristine_git_object: 16646c41b7e10621d6029c775d63a32f868eddd4 - src/sdk/models/shared/loansummaryreportinfo.ts: - id: 3ecb4d4c675d - last_write_checksum: sha1:6bff7e57e6dbdb9c4bb30987a202a74becd523a5 - pristine_git_object: 4d11f01ba340a2a7ba4b4bb4f66ef3a1299d9b38 - src/sdk/models/shared/loansummaryreportitem.ts: - id: 3c6e8677413e - last_write_checksum: sha1:8a58b44d32ecbb3e30a5f37a335a163daef44e69 - pristine_git_object: dc7f1c51d8ca334b1cee66faf6cc1e3334bd9937 - src/sdk/models/shared/loantransactions.ts: - id: c873d1dc5be0 - last_write_checksum: sha1:e88713ccb38ba288d888145b51ff9e01cd1182f6 - pristine_git_object: b8c02733df89e2dfbc8b9f37fb47ec5edd99d6d9 - src/sdk/models/shared/loantransactionsreportinfo.ts: - id: 0242755f3fb2 - last_write_checksum: sha1:6dfb19516bcafcd61382c80761ad4f2ddaba6399 - pristine_git_object: 4ffd03afc8df0994e3dc62d16b8d0f76db42bae7 - src/sdk/models/shared/locationref.ts: - id: 9d8e2b136f0c - last_write_checksum: sha1:b9a4453e1419f3c82004481cab5d3cf1012781a2 - pristine_git_object: ce20bef9d59cdf65fa0f36df01c8bc02c72d2e48 - src/sdk/models/shared/metadata.ts: - id: ee8aa545e342 - last_write_checksum: sha1:9639bb68412a237bd695de4fb124c3d4093117e6 - pristine_git_object: 4a678ba939b63cd6d8e9074658de2375891ff222 - src/sdk/models/shared/orderdiscountallocation.ts: - id: 0dd28857c2bd - last_write_checksum: sha1:fd8af827f46a385bc55876cba919503cf69995e7 - pristine_git_object: 56c5d7d0b61754203279539316da19cedc4e7a07 - src/sdk/models/shared/orderlineitem.ts: - id: 1f0da894b662 - last_write_checksum: sha1:65398073a055275615a10c5ba70cf6fc831247e0 - pristine_git_object: e31a9859b50d3f302d82aa91542ac7a8d7f770b2 - src/sdk/models/shared/path.ts: - id: 04e630a6ef73 - last_write_checksum: sha1:872aa9f63bb45023fdb1b448f7837b8709e3b9ec - pristine_git_object: 21e09ab00d9f57913e92d7d71f86f8916fd6193a - src/sdk/models/shared/payment.ts: - id: 2e0c969095b0 - last_write_checksum: sha1:6689da17e808c141893750091b1d4fb79e26280e - pristine_git_object: 87cface2dfd8c0552aa1a4384845cc7b4d4aaeaf - src/sdk/models/shared/paymentallocationpayment.ts: - id: c5f558843b0e - last_write_checksum: sha1:803b18a4b3b743d2ae12cbcd19dba9884615ddb2 - pristine_git_object: e1192aeb5dfb6c84e40dd858d0095dbda8eeef30 - src/sdk/models/shared/paymentline.ts: - id: dff2a5b77718 - last_write_checksum: sha1:9967e7048196eafb014c6f5d37280e9ac165da50 - pristine_git_object: 3ac3eaec4a10e93584a270e2fa169c22880ec878 - src/sdk/models/shared/paymentlinelink.ts: - id: a7b1d9fe85e8 - last_write_checksum: sha1:d938a79fffbde40bd021311b13a8dfb9dd3435e8 - pristine_git_object: 73b08b3599478cd48637b4fc8662a3c36d18a5e8 - src/sdk/models/shared/paymentlinktype.ts: - id: 2c63598b60b6 - last_write_checksum: sha1:0830f851e8f21d5ef9a550b9b0e72b7dc5732aca - pristine_git_object: 9c02c1b47d2934accc81e15bb8064c94807fcdac - src/sdk/models/shared/paymentmethodref.ts: - id: 9306702c0163 - last_write_checksum: sha1:93d7ad808f9ee4a89be7c904ad77dce7493fc2d8 - pristine_git_object: 33149fdffb4c91ea5724f5dd62dc5bdc5e650eb2 - src/sdk/models/shared/paymentref.ts: - id: 5d64b61098d8 - last_write_checksum: sha1:a83b82dceeef39eca80491920eb48b6281c6f308 - pristine_git_object: 67a3f157edbfe89b793a9f2c30e51639b7e2d9b0 - src/sdk/models/shared/paymentstatus.ts: - id: 04c9157f67aa - last_write_checksum: sha1:77b72b87db6ec0e0afb4371f8727708d5760bde4 - pristine_git_object: 67a28dea0bf7160d504cb57061624f5524fcab91 - src/sdk/models/shared/paymenttype.ts: - id: 8a5a8d606309 - last_write_checksum: sha1:28008920108ff1742029292b257d48a3c9c17ee9 - pristine_git_object: 5ee47819062b25d430a69eb8134c92f0e0ce09d5 - src/sdk/models/shared/periodunit.ts: - id: 15455802b26f - last_write_checksum: sha1:ab773bce50652721285450ff42669141e794f9a9 - pristine_git_object: 754bdf539cf80ed41faf317f02f4e2adc5f9053e - src/sdk/models/shared/phonenumber.ts: - id: 8d3e3b17bfc0 - last_write_checksum: sha1:933b68158d7d05ae6263b799df8a39753f3f79da - pristine_git_object: 29cf640559e845f0f4fd91aafae4c503ab3999fd - src/sdk/models/shared/productinventory.ts: - id: f1170ce786b8 - last_write_checksum: sha1:b8283e58ecbe1f2e7eff7fa23cc6e4a15cd43338 - pristine_git_object: d3f8e9b7303d56371692aa062eba5cbbaac83801 - src/sdk/models/shared/productinventorylocation.ts: - id: 7209f62ce612 - last_write_checksum: sha1:52df06416a75504e92fc0a8a4e33ed60091a5b6c - pristine_git_object: 18ed91b2cfaa83487bfa95881179850099c5d0b8 - src/sdk/models/shared/productprice.ts: - id: 37f04412723d - last_write_checksum: sha1:3a57baf843cbf4555673baf264e660e7a238ab8f - pristine_git_object: 9c9ef4b94157eb1b8281e20a27f79a18f633343d - src/sdk/models/shared/productref.ts: - id: 8c6c835c1d65 - last_write_checksum: sha1:731959371a8b0977efdb9f3b295e2a55ed7568a2 - pristine_git_object: 7cf9435d04cdd54aac2d72e0bd1a1ff858994558 - src/sdk/models/shared/productvariant.ts: - id: 4e221bd9e1ff - last_write_checksum: sha1:a8ceefc527605843d3791519ad72fcc2343678b9 - pristine_git_object: 47d24c27793753542f3375d154f9470ee915c9cb - src/sdk/models/shared/productvariantref.ts: - id: 88344a1c0f28 - last_write_checksum: sha1:d94cfc7bf35cfe120f71f6813fb0100847bcf6a8 - pristine_git_object: 0cb2dc04b484e44555cc802a3d158ca06d361757 - src/sdk/models/shared/productvariantstatus.ts: - id: ce383d6dea7f - last_write_checksum: sha1:9d078fcc279d151b375d7d9f0dbd98fb117467cd - pristine_git_object: 4dbcdb41011bc7a13de1f5c6766c3fd5b6e3374a - src/sdk/models/shared/profitandlossreport.ts: - id: 1ebe10799e65 - last_write_checksum: sha1:4c01ebdd0e0605a3606aa182b5d46a85f080ec4a - pristine_git_object: 721df379883b8f1faebf5d1ca67dc156c13322c5 - src/sdk/models/shared/projectref.ts: - id: d73e187870ba - last_write_checksum: sha1:399dd4a917936883061614a82bb6ca59dc49dd2a - pristine_git_object: b49d68fb5e2276d2e5335103f599b406c7bd0702 - src/sdk/models/shared/propertieaccounttype.ts: - id: 9a250a89b80d - last_write_checksum: sha1:e397f9cce45a67959500764f85ff59ca1260567c - pristine_git_object: f0b6e5f3f58b7b4a6341556cd84b62fba61902b8 - src/sdk/models/shared/propertiedatatype.ts: - id: 4ea125ec9d70 - last_write_checksum: sha1:b926d63fd60306b126cbb858d25a22313d3d9311 - pristine_git_object: a71dac4dd4afa1f66c22f575f8659083a3678657 - src/sdk/models/shared/propertieitemref.ts: - id: ff691a0fa760 - last_write_checksum: sha1:f9d4b4046f99583feefe42df0b80392c5b70f6f2 - pristine_git_object: 1925bcfd920cc2098d64c1e26eb12fdd39c3e238 - src/sdk/models/shared/pulloperation.ts: - id: 1c7a111bf82e - last_write_checksum: sha1:e82d9cd137c0d78465d050b4d8b1a368b31eb6e2 - pristine_git_object: 39375036856ebf027357ff9e00321f4a91f2f806 - src/sdk/models/shared/pulloperations.ts: - id: b51faf4dfd99 - last_write_checksum: sha1:869f7219c72b210af77791cdf5d866c6e39788a8 - pristine_git_object: 475158a0012b764dc1b95440b859651810d0bc07 - src/sdk/models/shared/pushchangetype.ts: - id: cf67386a1d21 - last_write_checksum: sha1:455bd6b2ebf2a0aeee8a914030cc903e9fb12b47 - pristine_git_object: 42040ea23eda83d8cb202d9f3239f5a7c62f4bd2 - src/sdk/models/shared/pushfieldvalidation.ts: - id: 8d8e835e5634 - last_write_checksum: sha1:c377b5bd6ef9fd9ab4e480b3e7e9e2a974a741a8 - pristine_git_object: 15fc3a0f565d8c493fb5461a56309ecadbdd69b2 - src/sdk/models/shared/pushoperation.ts: - id: b6592db339e9 - last_write_checksum: sha1:a6277535acc2f3717de7a769db831f60a2fea704 - pristine_git_object: b9563094c73aa4a8e8e7bba349dae1801873eee2 - src/sdk/models/shared/pushoperationchange.ts: - id: 137f5337781d - last_write_checksum: sha1:c4fcd4f27955e10750e151667bb4ed7b1ecf29f9 - pristine_git_object: 5d771700a367ef509098146f474f10136fe3a577 - src/sdk/models/shared/pushoperationref.ts: - id: 61a311ce2153 - last_write_checksum: sha1:f123aa4fd1f944977c603f63c7e001d7086121aa - pristine_git_object: 59aa761013ab6d2792f63d7d1226311c1aabc405 - src/sdk/models/shared/pushoperations.ts: - id: b0489702427e - last_write_checksum: sha1:df0ddbf54bebf12f184c59ce0b7f9cdf5df010c9 - pristine_git_object: 35c08c7262eaf602936441cf831b2d63aafe9faf - src/sdk/models/shared/pushoperationstatus.ts: - id: 4d9d57d9f800 - last_write_checksum: sha1:7de289ab7d0d5365eae9fe17aed4caddaed26622 - pristine_git_object: 133e3b65f122ffae8912b5ca2a3e91c190c97ddf - src/sdk/models/shared/pushoption.ts: - id: 7b36845bb057 - last_write_checksum: sha1:e6da3557367628a63dd0789986bda82a2ac1c8a9 - pristine_git_object: af6a0a0a363f287ee7bc1e6a19bd87942579dfa7 - src/sdk/models/shared/pushoptionchoice.ts: - id: 4f9141171f1d - last_write_checksum: sha1:a254424966daf3d5185d1b272d0f2214424dce0f - pristine_git_object: 315b39f913390a0e7a4785a7d1c7f21693c7ca9d - src/sdk/models/shared/pushoptionproperty.ts: - id: 27745de0e67f - last_write_checksum: sha1:dd3f7838ac5ff9f5edc531b7bddc809dac397111 - pristine_git_object: 0100bc7b68eb80d19a298dc7276202c9faf85575 - src/sdk/models/shared/pushoptiontype.ts: - id: 4f2314173517 - last_write_checksum: sha1:795906b3ad06204f1dcc551385d5bb849607f61a - pristine_git_object: 298c02e2ea74d44d765eebcb7cc7b1054226aed7 - src/sdk/models/shared/pushvalidationinfo.ts: - id: c3bac2e0d020 - last_write_checksum: sha1:233611708647ac824c46a354d05fc0f3b87cdbe3 - pristine_git_object: 3479adce121324a58a8bb938a974762be7f3cae0 - src/sdk/models/shared/reportbasis.ts: - id: ab32bb87dc97 - last_write_checksum: sha1:99ec30f449e4f3ac85cab3179e5c327bfebc454a - pristine_git_object: 36c371964c293ff08d38b527ba8ddbd5f05a6660 - src/sdk/models/shared/reportcomponentmeasure.ts: - id: 20cc1162c6e3 - last_write_checksum: sha1:f07889ddbe73f063570574bfab66919b3f42a174 - pristine_git_object: 92f996584d614b8167552d1e7863a5f67fe6da41 - src/sdk/models/shared/reportgenerationpayload.ts: - id: aa006461ed7a - last_write_checksum: sha1:4db5130a46aca30a81e12cabd27b34de2fcc522c - pristine_git_object: ee953048deaab07e6e3c024d65958d3a928a1cd3 - src/sdk/models/shared/reportinfo.ts: - id: ce927c0b6e5b - last_write_checksum: sha1:d311aac9d65876fd90e6cecfd5100d26deb9319a - pristine_git_object: cc119b80705fa27a751bb6d43184e731899d4243 - src/sdk/models/shared/reportinput.ts: - id: 79a5e1ba8521 - last_write_checksum: sha1:15ae6187f5b0970cde492486f47dac5304b8083c - pristine_git_object: 3c383715dd574c96c648069008a28335444e2a91 - src/sdk/models/shared/reportitems.ts: - id: d979e409c398 - last_write_checksum: sha1:0ad4575e0ae8e391025cedd1107193c63d18cfc0 - pristine_git_object: df7ba842441d4c4fec76d6f2be231f7638557255 - src/sdk/models/shared/reportline.ts: - id: 247f9ea34e21 - last_write_checksum: sha1:3376bf5916cf32a1e7b749fcc26190c84c0c2435 - pristine_git_object: 870117a0d601f5c841d6d05738f893c5225001bc - src/sdk/models/shared/reportoperation.ts: - id: 5b95c706ac26 - last_write_checksum: sha1:29b3f9e973126cabe361aa29c560f7dbd49615ac - pristine_git_object: 4fb71a09149650be1695c13a09261126b43c0640 - src/sdk/models/shared/reports.ts: - id: b0d54a5c50c8 - last_write_checksum: sha1:277cd63886b8306779787df9e2245f02c1f6733d - pristine_git_object: 256c4019340c9d5b90c1fc6854cf5e71ac4ad5db - src/sdk/models/shared/reporttype.ts: - id: 4d6b83368b9c - last_write_checksum: sha1:6243a4a875af5c7caa0026e65dfaf9ac3c02665d - pristine_git_object: f5c7e4adb424209e0d367bff2ee06e4270c87cff - src/sdk/models/shared/routinginfo.ts: - id: 77067a94535c - last_write_checksum: sha1:02fcaa8bc99d4ef2e50df31aa52fe8f28201a1b9 - pristine_git_object: a3875893f9b9c5404eef8654bc718e714154f7e6 - src/sdk/models/shared/schema.ts: - id: 4b1c86fe8dbb - last_write_checksum: sha1:b2fb805e95784b4ffd08467b783354c4eca48755 - pristine_git_object: 9103ba73bfef3d3618eac5d0b5a457bf81dfe674 - src/sdk/models/shared/security.ts: - id: 4a9790ed1c2f - last_write_checksum: sha1:1b51b365245ab2a0f5f5a06b90093bceb61fc084 - pristine_git_object: 675eaa5827f48cff71e28d1627f8d65a74e10623 - src/sdk/models/shared/servicecharge.ts: - id: 10d8109d4421 - last_write_checksum: sha1:eb4356b9e9df6284fbb89d7ba5c6286095633c15 - pristine_git_object: 959d82bb5a79ff1d9814edf19c8cd0941356d0e3 - src/sdk/models/shared/servicechargetype.ts: - id: 7235d3cb6084 - last_write_checksum: sha1:94d94efd16c6256b67a273ac4e15a01cfd7e08c9 - pristine_git_object: 1fb280c5ca4fc5a6163fdaefdee0ba62e470b56f - src/sdk/models/shared/sourceaccount.ts: - id: 9af960cebf29 - last_write_checksum: sha1:8c3fcedac088a3aceae9bd4c41540b1527dad8dc - pristine_git_object: 48fc133e7dbbd30c884c5d33dfe2650fe27ccccb - src/sdk/models/shared/sourceaccountprototype.ts: - id: 12840a2fe33d - last_write_checksum: sha1:daa110e549c4f8fbdce15434372380b3ffe9b626 - pristine_git_object: 02e7f40425e9acb0ca9d858d003007dca16a69eb - src/sdk/models/shared/sourceaccountv2.ts: - id: 9c5e6622649d - last_write_checksum: sha1:00ce220b596dc09abad53d456cff5b00f3320cb4 - pristine_git_object: db44341adc321bef498a39051d4e7c83e7205d16 - src/sdk/models/shared/sourceaccountv2prototype.ts: - id: ada80a3d0663 - last_write_checksum: sha1:2573718634cec61ad8b5dc93aabd7a91cb54c4ee - pristine_git_object: 29b0efdc28ec3edf137e1817c886a76b45c37498 - src/sdk/models/shared/sourceref.ts: - id: ee14d68dc2ed - last_write_checksum: sha1:0a298aac87ebfa2bc6a3467ab43c72d49726eee3 - pristine_git_object: 304ee9233991562db7547a06c8bdd42199e030ac - src/sdk/models/shared/startuploadsessionrequest.ts: - id: cbd9933d5b04 - last_write_checksum: sha1:59b2da2a0c12ce59c993de8381d886e9cef5cb57 - pristine_git_object: 75d80b9922f6b96babd229143f5a8edd6aad3722 - src/sdk/models/shared/status.ts: - id: 1ab31ee187e8 - last_write_checksum: sha1:32b3b6aa4030d2fc4688dd986f9872a86a1abe46 - pristine_git_object: 7b458b0a812628f48c33f789fe66d2fedf4c2e18 - src/sdk/models/shared/supplementaldata.ts: - id: c6dd9a2794e4 - last_write_checksum: sha1:af016589e19361a69323899755b0cd3080109e3e - pristine_git_object: bdea4887c8e5644d591b12f8097e75855b309620 - src/sdk/models/shared/supplierref.ts: - id: 6c062678b570 - last_write_checksum: sha1:a3ce4dce694cd9dea16e2d402e034e8eb5f3d247 - pristine_git_object: 009a61f656d57c9a463c0a36b715980386f42f03 - src/sdk/models/shared/supplierstatus.ts: - id: 507c6db656fa - last_write_checksum: sha1:9d4da55011629bd22151f5c1443c7004811a4d8c - pristine_git_object: 21b6220e1fcb3d01f5cbecc67b1213167b6b158d - src/sdk/models/shared/targetaccountoption.ts: - id: 8300966e9d5a - last_write_checksum: sha1:4dad1be6402bc92d79e974e68534022cb07d113f - pristine_git_object: 4a5824cc9656fd587b8802c76bc93216d1d47b1a - src/sdk/models/shared/taxcomponentallocation.ts: - id: bb26af815656 - last_write_checksum: sha1:b10354ff0decd970ee103bf75d2a195f5686a52f - pristine_git_object: b789d8dc66e1ce0e8d7b9253172ead006bc36d14 - src/sdk/models/shared/taxcomponentref.ts: - id: 67fbc3c7128a - last_write_checksum: sha1:d0fc8c873209793664c3638fdaa054274ca89789 - pristine_git_object: cb11028f831354303348ba3e3e0bf172d95f36a0 - src/sdk/models/shared/taxrateref.ts: - id: 38b621d9f51e - last_write_checksum: sha1:6299bf60694f2edfcd1f3b054b029a5850cee18d - pristine_git_object: c9d0857543b84e64667d574b1323dfc6497642bc - src/sdk/models/shared/tracking.ts: - id: 5be189f34f10 - last_write_checksum: sha1:c6ca8b0fdee321b4cde8c82051eda52620220a95 - pristine_git_object: 0e65a045e91ceeccccc38d1c63f938c604384881 - src/sdk/models/shared/trackingcategoryref.ts: - id: 374f0346152f - last_write_checksum: sha1:f38a2e54963b9d83308d2ecfaf8ef268efbdd013 - pristine_git_object: 380e7c1738f14ce9e9db00675414a0b89b9a64d4 - src/sdk/models/shared/trackingrecordref.ts: - id: 7a4b6629dff1 - last_write_checksum: sha1:83c3b25c5951b11f1a54e60bd2a7ea87a502fab2 - pristine_git_object: c7fc421ae31c35bbdf21c22b501a660476c14676 - src/sdk/models/shared/transactioncategory.ts: - id: b8d79647a8a1 - last_write_checksum: sha1:85838f27e94f5c2c14c3ce6e75c5dd39fb71d962 - pristine_git_object: 448e00508ae01147a88312cbe3c606ead03b3479 - src/sdk/models/shared/transactioncategoryref.ts: - id: 1cdfe6973d42 - last_write_checksum: sha1:deade9090356c02b5f396fdd0de4aace68431a4b - pristine_git_object: 05ad88bb7c69ed61e033ac12f473ccefd6eb74bf - src/sdk/models/shared/transactioncategorystatus.ts: - id: 08ba470b8675 - last_write_checksum: sha1:be15674a03ed731b818480cf3d8c567ae59ce3f3 - pristine_git_object: 4f0a68107aa123da283e9d8bad758eb80ce2c963 - src/sdk/models/shared/transactioncode.ts: - id: b61a51669718 - last_write_checksum: sha1:970491c7f32d14dcfba6d93fdc73d3a737c70b0d - pristine_git_object: a07c47376549b0ec96e755e151261ad2b90212a5 - src/sdk/models/shared/transactionsourceref.ts: - id: c278084ac7ee - last_write_checksum: sha1:a6e615b8736335bacca6206ea2501726d5b52066 - pristine_git_object: a9677befbd1ff31abe972bb6fca4582a1f8d921f - src/sdk/models/shared/transactionsourcetype.ts: - id: c2a0a56753c5 - last_write_checksum: sha1:65309ec8e86c8631b9442029c39c205d9ea26e17 - pristine_git_object: 8956b4a99ee1a8cc9a5b8621d74247953cfda3ea - src/sdk/models/shared/transactiontype.ts: - id: 65b56e0a0076 - last_write_checksum: sha1:6c018aa6f5ce14db3aadf303081d0b9a011e9eb2 - pristine_git_object: 8e30c8e5d09fecd4bf2176311759b1366fbf8a82 - src/sdk/models/shared/transferaccount.ts: - id: 73d93401ab61 - last_write_checksum: sha1:a5757d16ac7e3ea3d7f277b4508e90a9303fbba0 - pristine_git_object: 5f288efe939952a82f506500049b6501d98de2bc - src/sdk/models/shared/validation.ts: - id: e4418d9ed08e - last_write_checksum: sha1:ecb74ca87689c6554c1520c793ce71f4d889f15c - pristine_git_object: 3a6a92030507280977e021e0012fd0064b5debff - src/sdk/models/shared/validationitem.ts: - id: 0e34cb6ff62f - last_write_checksum: sha1:7f82caee4bbad4d6d8ddf69c64bf3ebdfdf492cd - pristine_git_object: ca354aa0beffed45e429ad92c2b3e14df222ec00 - src/sdk/models/shared/weblink.ts: - id: 9c246f100a4b - last_write_checksum: sha1:c97c282f6307f1ae99b4ad1a35af65ef930883b8 - pristine_git_object: 67004ecfc4ee39e00a1851afc1c850dc0ce31d47 - src/sdk/models/shared/zero.ts: - id: 5905caee7f92 - last_write_checksum: sha1:e765d3df9345489eb6bb4a667fa29d24744d29cb - pristine_git_object: 5df0ced223bdaab44fe0bba0cd7df044a9ebf49b - src/sdk/models/webhooks/index.ts: - id: d1f95b6a4d0b - last_write_checksum: sha1:41cd2a289cc254bc13a24fd08ddf4cb6a1db9ba5 - pristine_git_object: 984c859cff7f12223108ee5153b30c8f9780eb4d - src/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.ts: - id: 5a43fecaf1f4 - last_write_checksum: sha1:5c7d69234919b33e141634157a7773c3cd90b599 - pristine_git_object: a743e1be81348ad62eebba08df2156d75cc54d80 - src/sdk/orders.ts: - id: b318c92b1ee9 - last_write_checksum: sha1:3efcc97c66b20e740fc6490ba61a58a2f6da520d - pristine_git_object: ad0a21a174efd95a7211f216020de9410d8695c1 - src/sdk/paymentmethods.ts: - id: cace056515f3 - last_write_checksum: sha1:b5204269b5db66a951be6e4c51cf941606e2d5c8 - pristine_git_object: 56e47f8d2e9dce18f6fd4fa58de0a4336019a2cb - src/sdk/payments.ts: - id: f059d3c1d898 - last_write_checksum: sha1:c8c5886805f4bb5b9f4f31d883b6d1843064c1c8 - pristine_git_object: 45db996759fc8a9be31cf264afe0df9ab41d335a - src/sdk/productcategories.ts: - id: db3c05d95ea6 - last_write_checksum: sha1:d09f8b1ba9f99ad54d06fb240bfcfb8af773c514 - pristine_git_object: e46094b81d44262e31cb5a6a3b2b0cd171f8699c - src/sdk/products.ts: - id: b199702e5352 - last_write_checksum: sha1:3d92dac398ade57fdeef6aa552aaf7e4fa741e28 - pristine_git_object: 52a3ef5eef016278d6c1802345c88c77f5dd5a9d - src/sdk/profitandloss.ts: - id: b420ee352653 - last_write_checksum: sha1:b29c62eb2dfdf97e2e015401fbf6785c84cfaa98 - pristine_git_object: c53b8b551792fc6a376ba8555b3e05e75b199744 - src/sdk/pulloperations.ts: - id: 1a3930169852 - last_write_checksum: sha1:7390c9c6d28700b7796fdb264087fbf729f94b9a - pristine_git_object: cb2345f863e3c4c2f15d770c7f86a33784fc717f - src/sdk/refresh.ts: - id: 768ccec0bfa8 - last_write_checksum: sha1:08582c877d0c29f23cef5f164bdb71416300449b - pristine_git_object: b8a946a766ce61c90dc3a38deba436714df5afb2 - src/sdk/reports.ts: - id: d7a2b074c686 - last_write_checksum: sha1:9fd9e1dd0cce103414744514e4e5a201dec26be6 - pristine_git_object: 5dc08cba658723cd8f7735c6eaed4a0bfdb25d26 - src/sdk/sales.ts: - id: 2286c0657f68 - last_write_checksum: sha1:c08b3a2ee6686724a02862466b795dea28f30713 - pristine_git_object: 580294c1ed8e81cfea7e4593d8a4b0fbe145ceb9 - src/sdk/sdk.ts: - id: 784571af2f69 - last_write_checksum: sha1:171a5a5e8bf7cd4905c045e6d07fe4c663e2ef2f - pristine_git_object: 7e0025f00efe3365d61c92070d050978816986ea - src/sdk/sourceaccounts.ts: - id: 8aeb3d8248a0 - last_write_checksum: sha1:16c17be1024aaff2c9bcabd662b469de2004b346 - pristine_git_object: 15cc09811f09001a24317230010f7151a201c23b - src/sdk/suppliers.ts: - id: 68b234e74022 - last_write_checksum: sha1:3ebb00a81f9d41bccc00d7be7208e448f5a6366a - pristine_git_object: e0793a14ec203a3b0f25b4fdf3db887c9b29f101 - src/sdk/transactioncategories.ts: - id: 35d9d70648b3 - last_write_checksum: sha1:653703111b4e822b0272f97cfa90f21cd0bd962d - pristine_git_object: fcc1a7f1d74d06bba84b1d16e341db30f4e27801 - src/sdk/transactions.ts: - id: bcd7a9b32ed7 - last_write_checksum: sha1:8a32dad754b9dc60f1c0166f3ec144b73e256f92 - pristine_git_object: 13166956cd83df08d81a31afc70d26586bb2fe50 - src/sdk/transfers.ts: - id: 1e842c518280 - last_write_checksum: sha1:3371d1f1d86b4e1b17d720fdc03860e6e6b27f19 - pristine_git_object: 2382ff02bfed90b151057685293895c6c40f66f6 - src/sdk/types/async.ts: - id: 966026768b05 - last_write_checksum: sha1:3ff07b3feaf390ec1aeb18ff938e139c6c4a9585 - pristine_git_object: 689dba5de50e8769e5f3bb913e3f42a146d15bc1 - src/sdk/types/blobs.ts: - id: 1def31341768 - last_write_checksum: sha1:cf45d78916671cb6345a11c97c633c64402bc27c - pristine_git_object: cce2892d4f573a120ef3907db90ab15f5979cfda - src/sdk/types/constdatetime.ts: - id: 7e64cb450e63 - last_write_checksum: sha1:dfaaf9adfaf49808bd4c9dea0039f21b7088d9c0 - pristine_git_object: fe62144eaf6a2054fc8ca9a98466e70f41b5434d - src/sdk/types/decimal.ts: - id: 4c47ee438ee8 - last_write_checksum: sha1:9e679d0ebb0a5b1efcbae4926d24893181f3fe8f - pristine_git_object: a7895d555b147e9bf9e3cd79f0b0e9f340d5ecd1 - src/sdk/types/enums.ts: - id: 2ac17fb928cd - last_write_checksum: sha1:ee590453d2c87e33e89c633d37ee46907eca0e58 - pristine_git_object: aba0ffd2a3308a31e516d83b52823d80aa65a8f9 - src/sdk/types/fp.ts: - id: d9ec77b9460c - last_write_checksum: sha1:d24994d58f37a1ca106847fcc6d2e976c6f1c093 - pristine_git_object: ccbe51eac69dfb0da5131f14fd753c4b47c1d527 - src/sdk/types/index.ts: - id: 8c869d66c5f3 - last_write_checksum: sha1:0e06df309f1646981212f4103ea27cbd65e1f50e - pristine_git_object: 19a7bd013477d20d80a670e6833a0f0c9b1c8aa7 - src/sdk/types/operations.ts: - id: c5e9c75d4266 - last_write_checksum: sha1:c49e724cfb1259296381cb57bc0fcdd2eae45865 - pristine_git_object: beb81e10f0b9eee2ed398a853fe6f737b743f818 - src/sdk/types/rfcdate.ts: - id: fc969c92a7c1 - last_write_checksum: sha1:8e5f382e02fe21c2f2e24deb1b7bbf8cddd3dd16 - pristine_git_object: c79b3f53a3dd922aa2ace5a4191c8652cf9a8e89 - src/sdk/types/streams.ts: - id: e556b428e8dc - last_write_checksum: sha1:cc9ced2dd34a76c3a1bd7784ccda1cc3b37ab9a9 - pristine_git_object: a0163e7a99cea88f21d0ad4ce3af1c720180ee20 - src/sdk/types/unrecognized.ts: - id: 690d294a1973 - last_write_checksum: sha1:d33ac686528492f4cdc0dbf81ed343b4afe020fe - pristine_git_object: b7a2a13f3dff50663429df24ae2f55b647ff1084 - src/sdk/types/webhooks.ts: - id: 0f676e5e22a7 - last_write_checksum: sha1:dbce0cb417bcdcfcae0827fa045ee93ccab1c2c8 - pristine_git_object: 9510d20c09d8dd689f6e37254030de22e997f3cc - tsconfig.json: - id: 61ebb9fd6e8c - last_write_checksum: sha1:79dc1550d921fefec69f8632ed3b24dad41ca2f6 - pristine_git_object: 76110f883cac40bb04fb2f376cd69ea8c8d6d215 -examples: - list-companies: - speakeasy-default-list-companies: - parameters: - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - tags: "region=uk && team=invoice-finance" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - One company: - parameters: - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - tags: "region=uk && team=invoice-finance" - responses: - "200": - application/json: {"results": [{"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "My Test Company", "description": "My Test Company make testing software", "redirect": "https://link.codat.io/company/3fa85f64-5717-4562-b3fc-2c963f66afa6", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z", "createdByUserName": "Mike Smith", "products": ["spend-insights", "lending", "expenses-v1", "commerce"], "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "51baa045-4836-4317-a42e-3542e991e581", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "platformName": "Pandle", "linkUrl": "https://link-api.codat.io/companies/3fa85f64-5717-4562-b3fc-2c963f66afa6/connections/51baa045-4836-4317-a42e-3542e991e581/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}], "pageNumber": 1, "pageSize": 100, "totalResults": 1, "_links": {"self": {"href": "/companies"}, "current": {"href": "/companies?page=1&pageSize=100"}}} - List of Companies: - parameters: - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - tags: "region=uk && team=invoice-finance" - responses: - "200": - application/json: {"results": [{"id": "d1568dde-adf6-11ed-afa1-0242ac120002", "name": "Technicalium", "description": "Technology services, including web and app design and development", "redirect": "https://link.codat.io/company/d1568dde-adf6-11ed-afa1-0242ac120002", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z", "createdByUserName": "Joe Bloggs", "products": ["spend-insights", "lending", "payables-v2"], "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "51baa045-4836-4317-a42e-3542e991e581", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "platformName": "Pandle", "linkUrl": "https://link-api.codat.io/companies/d1568dde-adf6-11ed-afa1-0242ac120002/connections/51baa045-4836-4317-a42e-3542e991e581/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}, {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "referenceSubsidiaryCompanies": [{"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "links": {"portal": "https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary"}}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "links": {"portal": "https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary"}}], "dataConnections": []}, {"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "redirect": "https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["lending", "spend-insights", "payables"], "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "d5ab61b7-1ad0-46fd-9f9f-b6761047941e", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "redirect": "https://link.codat.io/company/db94eddc-9212-4568-9b5c-3eab0e325913", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "1e5c8c9e-27fd-4ba9-9a2a-d02ba65bc2fb", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/connections/1e5c8c9e-27fd-4ba9-9a2a-d02ba65bc2fb/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}], "pageNumber": 1, "pageSize": 100, "totalResults": 3, "_links": {"self": {"href": "/companies"}, "current": {"href": "/companies?page=1&pageSize=100"}}} - Malformed query: - parameters: - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - tags: "region=uk && team=invoice-finance" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - tags: "region=uk && team=invoice-finance" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-company: - With no description: - requestBody: - application/json: {"name": "Technicalium"} - responses: - "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "referenceSubsidiaryCompanies": [], "dataConnections": []} - With a description: - requestBody: - application/json: {"name": "Technicalium", "description": "Technology services, including web and app design and development"} - responses: - "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "Technology services, including web and app design and development", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "referenceSubsidiaryCompanies": [], "dataConnections": []} - With a tag: - requestBody: - application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} - responses: - "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "tags": {"region": "us"}, "referenceSubsidiaryCompanies": [], "dataConnections": []} - Malformed query: - requestBody: - application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - replace-company: - Update name: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"name": "New Name"} - responses: - "200": - application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} - "401": - application/json: {} - "500": - application/json: {} - Update description: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"name": "Same name", "description": "Additional documents required"} - responses: - "200": - application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} - "401": - application/json: {} - "500": - application/json: {} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-replace-company: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} - responses: - "200": - application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} - "401": - application/json: {} - "500": - application/json: {} - update-company: - Update tags: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"tags": {"refrence": "new reference"}} - responses: - "200": - application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} - "401": - application/json: {} - "500": - application/json: {} - Update name: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"name": "New Name"} - responses: - "200": - application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} - "401": - application/json: {} - "500": - application/json: {} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-update-company: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} - responses: - "200": - application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} - "401": - application/json: {} - "500": - application/json: {} - delete-company: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-delete-company: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {} - "500": - application/json: {} - get-company: - Simple company: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores holdings", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights", "lending", "expenses-v1", "commerce"], "referenceSubsidiaryCompanies": [], "dataConnections": []} - Parent multi-entity company: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights", "lending", "expenses-v1", "commerce"], "referenceSubsidiaryCompanies": [{"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "links": {"portal": "https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary"}}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "links": {"portal": "https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary"}}], "dataConnections": []} - Subsidiary multi-entity company: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "description": "", "redirect": "https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights", "lending", "expenses-v1", "commerce"], "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "d5ab61b7-1ad0-46fd-9f9f-b6761047941e", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-connections: - speakeasy-default-list-connections: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Connections: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}], "pageNumber": 0, "pageSize": 0, "totalResults": 0, "_links": {"self": {"href": "string"}, "current": {"href": "string"}, "next": {"href": "string"}, "previous": {"href": "string"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-connection: - Connection: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"platformKey": "gbol"} - responses: - "200": - application/json: {"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"platformKey": "gbol"} - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-connection: - Connection: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - delete-connection: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-delete-connection: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {} - "500": - application/json: {} - unlink-connection: - Example: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"status": "Unlinked"} - responses: - "200": - application/json: {"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"} - "401": - application/json: {} - "500": - application/json: {} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-unlink-connection: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"} - "401": - application/json: {} - "500": - application/json: {} - get-data-status: - Example: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"accountTransactions": {"dataType": "accountTransactions", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "balanceSheet": {"dataType": "balanceSheet", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "bankAccounts": {"dataType": "bankAccounts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "bankTransactions": {"dataType": "bankTransactions", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "billCreditNotes": {"dataType": "billCreditNotes", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "billPayments": {"dataType": "billPayments", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "bills": {"dataType": "bills", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "cashFlowStatement": {"dataType": "cashFlowStatement", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "chartOfAccounts": {"dataType": "chartOfAccounts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "company": {"dataType": "company", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "creditNotes": {"dataType": "creditNotes", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "customers": {"dataType": "customers", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "directCosts": {"dataType": "directCosts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "directIncomes": {"dataType": "directIncomes", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "invoices": {"dataType": "invoices", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "itemReceipts": {"dataType": "itemReceipts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "items": {"dataType": "items", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "journalEntries": {"dataType": "journalEntries", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "journals": {"dataType": "journals", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "paymentMethods": {"dataType": "paymentMethods", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "payments": {"dataType": "payments", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "profitAndLoss": {"dataType": "profitAndLoss", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "purchaseOrders": {"dataType": "purchaseOrders", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "salesOrders": {"dataType": "salesOrders", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "suppliers": {"dataType": "suppliers", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "taxRates": {"dataType": "taxRates", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "trackingCategories": {"dataType": "trackingCategories", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "transfers": {"dataType": "transfers", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "banking-accountBalances": {"dataType": "banking-accountBalances", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "banking-accounts": {"dataType": "banking-accounts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "banking-transactionCategories": {"dataType": "banking-transactionCategories", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "banking-transactions": {"dataType": "banking-transactions", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-companyInfo": {"dataType": "commerce-companyInfo", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-customers": {"dataType": "commerce-customers", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-disputes": {"dataType": "commerce-disputes", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-locations": {"dataType": "commerce-locations", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-orders": {"dataType": "commerce-orders", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-paymentMethods": {"dataType": "commerce-paymentMethods", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-payments": {"dataType": "commerce-payments", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-productCategories": {"dataType": "commerce-productCategories", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-products": {"dataType": "commerce-products", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-taxComponents": {"dataType": "commerce-taxComponents", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-transactions": {"dataType": "commerce-transactions", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - refresh-all-data-types: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-refresh-all-data-types: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "400": - application/json: {} - "500": - application/json: {} - refresh-data-type: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "invoices" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "invoices" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-refresh-data-type: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "invoices" - responses: - "200": - application/json: {"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b", "companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5", "connectionId": "51baa045-4836-4317-a42e-3542e991e581", "dataType": "invoices", "status": "Initial", "statusDescription": "Paused until 2022-10-23T00:00:00.000Z", "requested": "2022-11-14T11:18:37.2798351Z", "progress": 10, "isCompleted": false, "isErrored": false} - "400": - application/json: {} - "500": - application/json: {} - list-pull-operations: - speakeasy-default-list-pull-operations: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Example: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b", "companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5", "connectionId": "51baa045-4836-4317-a42e-3542e991e581", "dataType": "invoices", "status": "Initial", "requested": "2022-11-14T11:18:37.2798351Z", "progress": 10, "isCompleted": false, "isErrored": false}], "pageNumber": 0, "pageSize": 0, "totalResults": 0, "_links": {"self": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history"}, "current": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=1&pageSize=2"}, "next": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-pull-operation: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - datasetId: "fa5f3e86-bd80-49b8-853c-5fbba4b201f5" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-pull-operation: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - datasetId: "567094de-cafa-4f13-96d3-59e21b47ebe2" - responses: - "200": - application/json: {"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b", "companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5", "connectionId": "51baa045-4836-4317-a42e-3542e991e581", "dataType": "invoices", "status": "Initial", "statusDescription": "Paused until 2022-10-23T00:00:00.000Z", "requested": "2022-11-14T11:18:37.2798351Z", "progress": 10, "isCompleted": false, "isErrored": false} - "401": - application/json: {} - "500": - application/json: {} - get-data-integrity-status: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "banking-accounts" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-data-integrity-status: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "banking-accounts" - responses: - "200": - application/json: {"metadata": [{"type": "string", "statusInfo": {"lastMatched": "2021-10-24T14:15:22Z", "currentStatus": "Unknown", "statusMessage": "string"}, "connectionIds": {"source": ["d5a8d1b2-b38a-4e44-8641-548ad43be6bb", "da8c9f39-8af9-4a98-964b-f1e207942837"], "target": ["3d7ce25a-c107-44bc-8e0c-36c10bdd14e0", "a5300eac-01fa-4a77-b5b0-ea0b86a3be69"]}, "amounts": {"min": 130, "max": 2450, "currency": "GBP"}, "dates": {"minDate": "2021-09-17T12:09:33.441Z", "maxDate": "2021-12-16T12:12:53.441Z", "minOverlappingDate": "2021-09-30T12:09:13.441Z", "maxOverlappingDate": "2021-11-27T12:19:33.441Z"}}]} - "401": - application/json: {} - "500": - application/json: {} - get-data-integrity-summaries: - speakeasy-default-get-data-integrity-summaries: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "banking-accounts" - query: - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "200": - application/json: {"summaries": [{"byAmount": {"currency": "GBP"}}]} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "banking-accounts" - query: - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "banking-accounts" - query: - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-data-integrity-details: - speakeasy-default-list-data-integrity-details: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "banking-accounts" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "banking-accounts" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - dataType: "banking-accounts" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-categorized-profit-and-loss-statement: - speakeasy-default-get-categorized-profit-and-loss-statement: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "29-09-2020" - responses: - "200": - application/json: {"reportInfo": {"reportName": "EnhancedProfitAndLossAccounts", "companyName": "ABC LTD", "generatedDate": "2022-01-01"}, "reportItems": [{"date": "2022-01-01", "balance": 70, "accountName": "Sales UK", "accountId": "13931cbf-ea06-4d6e-9538-a8457fa66011", "accountCategory": {"status": "Suggested", "levels": [{"levelName": "Income", "confidence": 0.95}, {"levelName": "Revenue", "confidence": 0.9}]}}, {"date": "2022-01-01", "balance": 30, "accountName": "Sales US", "accountId": "13931cbf-ea06-4d6e-9538-a8457fa66011", "accountCategory": {"status": "Suggested", "levels": [{"levelName": "Income", "confidence": 0.95}, {"levelName": "Revenue", "confidence": 0.9}]}}, {"date": "2022-01-01", "balance": 70, "accountName": "Amazon", "accountId": "13931cbf-ea06-4d6e-9538-a8457fa66011", "accountCategory": {"status": "Suggested", "levels": [{"levelName": "Income", "confidence": 0.95}, {"levelName": "Revenue", "confidence": 0.95}, {"levelName": "Online", "confidence": 0.8}]}}]} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "29-09-2020" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-profit-and-loss: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "income": {"accountId": "", "name": "Income", "value": 146840.42, "items": [{"accountId": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales", "value": 146840.42, "items": []}]}, "costOfSales": {"accountId": "", "name": "Cost of Sales", "value": 29955.45, "items": [{"accountId": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Purchases", "value": 29955.45, "items": []}]}, "grossProfit": 116884.97, "expenses": {"accountId": "", "name": "Expenses", "value": 62407.18, "items": [{"accountId": "868591ad-f9c2-4956-a5ec-c32c1d48c6f3", "name": "Advertising & Marketing", "value": 24962.87, "items": []}, {"accountId": "940c8a59-3348-4a0b-a1b1-781d9f29cc8b", "name": "Depreciation Expense", "value": 1550.12, "items": []}, {"accountId": "e7ac3baa-cfbe-40c1-a172-83d22e84435b", "name": "Entertainment-100% business", "value": 1410.61, "items": []}, {"accountId": "b5e801e8-8dbc-4390-ac99-3b0fff54a89f", "name": "General Expenses", "value": 1283.66, "items": []}, {"accountId": "5360066d-1474-49f6-a7a5-c66d5f6032ba", "name": "Light, Power, Heating", "value": 1168.13, "items": []}, {"accountId": "138a8eb3-5c08-4e59-a3bc-892119694447", "name": "Motor Vehicle Expenses", "value": 944.89, "items": []}, {"accountId": "1734ff00-2a17-45b4-8db6-2dc2e832c460", "name": "Postage, Freight & Courier", "value": 977.96, "items": []}, {"accountId": "7aa7988a-ff61-4cb8-bef3-15395355d108", "name": "Printing & Stationery", "value": 889.94, "items": []}, {"accountId": "9cbe5fe4-ca60-4792-8bf1-de01fb7010aa", "name": "Rent", "value": 8000, "items": []}, {"accountId": "04f7111b-55d4-4efc-b329-1bd5c791933a", "name": "Repairs & Maintenance", "value": 719.86, "items": []}, {"accountId": "7d8d0322-f452-47de-a8e8-54b0130e6f38", "name": "Subscriptions", "value": 40, "items": []}, {"accountId": "043b6bcb-dfe6-4c97-9b4c-f9b300fe3f03", "name": "Telephone & Internet", "value": 45, "items": []}, {"accountId": "df62060b-41cc-4bf2-9de7-c7e537b5663a", "name": "Travel - National", "value": 6000.46, "items": []}, {"accountId": "eef78ed1-dfed-447c-bdba-3a49fb2c044b", "name": "Audit & Accountancy fees", "value": 0, "items": []}, {"accountId": "f3aa84fe-5c31-4107-b207-7e0419f636d7", "name": "Bank Fees", "value": 609.29, "items": []}, {"accountId": "c16f5c35-8283-47da-9d09-5fecb183b0cb", "name": "Cleaning", "value": 130, "items": []}, {"accountId": "fb3210ef-edeb-48af-bb49-b85d40c1e6bb", "name": "Corporation Tax", "value": 630.62, "items": []}, {"accountId": "7f6a0e92-65be-4333-9a0a-d981b03bedd1", "name": "Wages", "value": 12000, "items": []}, {"accountId": "e8a0a24e-2dab-46b1-bfe1-6e92551c04e8", "name": "Purchase Discounts", "value": 510.1, "items": []}, {"accountId": "4378ddba-36b4-4b35-9970-bd972b20d137", "name": "Amortization", "value": 5.72, "items": []}, {"accountId": "78785fd7-f197-4c34-aa17-6e76b9255d34", "name": "Interest Paid (operating)", "value": 527.95, "items": []}]}, "netOperatingProfit": 54477.79, "otherExpenses": {"accountId": "", "name": "Other Expenses", "value": 350.44, "items": [{"accountId": "cbf82e0d-87a7-464d-b567-9274ea94a1c0", "name": "Charitable and Political Donations", "value": 350.44, "items": []}]}, "otherIncome": {"accountId": "", "name": "Other Income", "value": 850.22, "items": [{"accountId": "68794a8f-b22d-4520-b97b-025b7cb10f94", "name": "Other Revenue", "value": 850.22, "items": []}]}, "netOtherIncome": 499.78, "netProfit": 54977.57}, {"fromDate": "2023-02-01T00:00:00", "toDate": "2023-02-28T00:00:00", "income": {"accountId": "", "name": "Income", "value": 108461.81, "items": [{"accountId": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales", "value": 108461.81, "items": []}]}, "costOfSales": {"accountId": "", "name": "Cost of Sales", "value": 18438.51, "items": [{"accountId": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Purchases", "value": 18438.51, "items": []}]}, "grossProfit": 90023.3, "expenses": {"accountId": "", "name": "Expenses", "value": 46096.28, "items": [{"accountId": "868591ad-f9c2-4956-a5ec-c32c1d48c6f3", "name": "Advertising & Marketing", "value": 18438.51, "items": []}, {"accountId": "940c8a59-3348-4a0b-a1b1-781d9f29cc8b", "name": "Depreciation Expense", "value": 669.33, "items": []}, {"accountId": "e7ac3baa-cfbe-40c1-a172-83d22e84435b", "name": "Entertainment-100% business", "value": 609.09, "items": []}, {"accountId": "b5e801e8-8dbc-4390-ac99-3b0fff54a89f", "name": "General Expenses", "value": 554.28, "items": []}, {"accountId": "5360066d-1474-49f6-a7a5-c66d5f6032ba", "name": "Light, Power, Heating", "value": 448.35, "items": []}, {"accountId": "138a8eb3-5c08-4e59-a3bc-892119694447", "name": "Motor Vehicle Expenses", "value": 412.48, "items": []}, {"accountId": "1734ff00-2a17-45b4-8db6-2dc2e832c460", "name": "Postage, Freight & Courier", "value": 426.92, "items": []}, {"accountId": "7aa7988a-ff61-4cb8-bef3-15395355d108", "name": "Printing & Stationery", "value": 388.49, "items": []}, {"accountId": "9cbe5fe4-ca60-4792-8bf1-de01fb7010aa", "name": "Rent", "value": 8000, "items": []}, {"accountId": "04f7111b-55d4-4efc-b329-1bd5c791933a", "name": "Repairs & Maintenance", "value": 314.25, "items": []}, {"accountId": "7d8d0322-f452-47de-a8e8-54b0130e6f38", "name": "Subscriptions", "value": 40, "items": []}, {"accountId": "043b6bcb-dfe6-4c97-9b4c-f9b300fe3f03", "name": "Telephone & Internet", "value": 45, "items": []}, {"accountId": "df62060b-41cc-4bf2-9de7-c7e537b5663a", "name": "Travel - National", "value": 325.25, "items": []}, {"accountId": "eef78ed1-dfed-447c-bdba-3a49fb2c044b", "name": "Audit & Accountancy fees", "value": 0, "items": []}, {"accountId": "f3aa84fe-5c31-4107-b207-7e0419f636d7", "name": "Bank Fees", "value": 2600.97, "items": []}, {"accountId": "c16f5c35-8283-47da-9d09-5fecb183b0cb", "name": "Cleaning", "value": 130, "items": []}, {"accountId": "fb3210ef-edeb-48af-bb49-b85d40c1e6bb", "name": "Corporation Tax", "value": 239.41, "items": []}, {"accountId": "7f6a0e92-65be-4333-9a0a-d981b03bedd1", "name": "Wages", "value": 12000, "items": []}, {"accountId": "e8a0a24e-2dab-46b1-bfe1-6e92551c04e8", "name": "Purchase Discounts", "value": 220.26, "items": []}, {"accountId": "4378ddba-36b4-4b35-9970-bd972b20d137", "name": "Amortization", "value": 5.72, "items": []}, {"accountId": "78785fd7-f197-4c34-aa17-6e76b9255d34", "name": "Interest Paid (operating)", "value": 227.97, "items": []}]}, "netOperatingProfit": 43927.02, "otherExpenses": {"accountId": "", "name": "Other Expenses", "value": 350.44, "items": [{"accountId": "cbf82e0d-87a7-464d-b567-9274ea94a1c0", "name": "Charitable and Political Donations", "value": 350.44, "items": []}]}, "otherIncome": {"accountId": "", "name": "Other Income", "value": 850.22, "items": [{"accountId": "68794a8f-b22d-4520-b97b-025b7cb10f94", "name": "Other Revenue", "value": 850.22, "items": []}]}, "netOtherIncome": 499.78, "netProfit": 44426.8}], "reportBasis": "Unknown", "currency": "GBP", "mostRecentAvailableMonth": "2023-03-01T00:00:00", "earliestAvailableMonth": "2018-04-01T00:00:00"} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "income": {"name": "Income", "value": 658.5, "items": [{"name": "Sales Returns & Allowances", "value": 0, "items": [{"accountId": "8aba49ae-461a-ed11-90eb-000d3a873324", "name": "0121 - ", "value": 0, "items": []}, {"accountId": "1e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10400 - Sales Returns & Allowances", "value": 0, "items": []}]}, {"name": "Income, Services", "value": 0, "items": [{"accountId": "ac6a3a74-c69f-ec11-80f1-0022481b4546", "name": "10005-1 - Child", "value": 0, "items": []}, {"accountId": "161217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10100 - Income, Services", "value": 0, "items": []}]}, {"name": "Income, Jobs", "value": 0, "items": [{"accountId": "1f2618f9-c79f-ec11-80f1-0022481b4546", "name": "10005-2 - Child Child", "value": 0, "items": []}, {"accountId": "1a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10250 - Job Sales", "value": 0, "items": []}]}, {"name": "", "value": 0, "items": [{"accountId": "de1cabee-4a33-ed11-97e8-0022481aa72d", "name": "1005002 - Test account no cat 2", "value": 0, "items": []}, {"accountId": "b74b0c08-aa59-eb11-89f9-00224800a7ae", "name": "1006 - Account without category Income ", "value": 0, "items": []}, {"accountId": "023a8eba-c12e-ed11-97e8-000d3a8753f5", "name": "3213 - vdfgdf", "value": 0, "items": []}, {"accountId": "aa666f5a-c22e-ed11-97e8-0022480052b7", "name": "TEST INCOME A/C - ", "value": 0, "items": []}]}, {"name": "Income, Product Sales", "value": 658.5, "items": [{"accountId": "181217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10200 - Income, Product Sales", "value": 658.5, "items": []}]}, {"name": "Sales Discounts", "value": 0, "items": [{"accountId": "1c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10300 - Sales Discounts", "value": 0, "items": []}]}, {"name": "Job Sales Contra", "value": 0, "items": [{"accountId": "201217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10450 - Job Sales Applied", "value": 0, "items": []}]}, {"name": "Income", "value": 0, "items": [{"accountId": "221217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10500 - Interest Income", "value": 0, "items": []}]}]}, "costOfSales": {"name": "Cost of Goods Sold", "value": 2735.64, "items": [{"name": "Materials", "value": 2735.64, "items": [{"accountId": "281217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "20100 - Cost of Materials", "value": 2735.64, "items": []}]}, {"name": "Labour", "value": 0, "items": [{"accountId": "2a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "20200 - Cost of Labour", "value": 0, "items": []}]}, {"name": "Jobs Cost", "value": 0, "items": [{"accountId": "2c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "20300 - Job Costs", "value": 0, "items": []}]}]}, "grossProfit": -2077.14, "expenses": {"name": "Expense", "value": 41.77, "items": [{"name": "", "value": 0, "items": [{"accountId": "e9b4e2c2-4b33-ed11-97e8-0022481aa72d", "name": "1005003 - Expense Test account no cat", "value": 0, "items": []}, {"accountId": "1d60f4a2-6d19-ed11-90eb-002248009024", "name": "1234512345 - Invalid VAT Posting Setup", "value": 0, "items": []}]}, {"name": "Interest Expense", "value": 0, "items": [{"accountId": "bd407350-340b-ec11-86bc-0022481a4971", "name": "1093 - export with misc type", "value": 0, "items": []}, {"accountId": "381217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30300 - Interest Expense", "value": 0, "items": []}]}, {"name": "Other Income & Expenses", "value": 0, "items": [{"accountId": "2e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "20399 - Job Costs Applied", "value": 0, "items": []}, {"accountId": "4e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31400 - Office Supplies Expense", "value": 0, "items": []}, {"accountId": "501217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31500 - Miscellaneous Expense", "value": 0, "items": []}, {"accountId": "521217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31600 - Depreciation, Equipment", "value": 0, "items": []}, {"accountId": "541217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31900 - Rounding", "value": 0, "items": []}]}, {"name": "Benefits Expense", "value": 0, "items": [{"accountId": "57a95f12-9ecf-ec11-8e7e-00224800faf5", "name": "23 - test account", "value": 0, "items": []}]}, {"name": "Fees Expense", "value": 0, "items": [{"accountId": "3f6818aa-a4cf-ec11-8e7e-00224800faf5", "name": "30 - test expenses 2", "value": 0, "items": []}, {"accountId": "3a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30400 - Bank Charges and Fees", "value": 0, "items": []}, {"accountId": "3c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30500 - Processing Fees", "value": 0, "items": []}]}, {"name": "Rent Expense", "value": 0, "items": [{"accountId": "341217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30100 - Rent Expense", "value": 0, "items": []}]}, {"name": "Advertising Expense", "value": 0, "items": [{"accountId": "361217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30200 - Advertising Expense", "value": 0, "items": []}]}, {"name": "Bad Debt Expense", "value": 0, "items": [{"accountId": "3e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30600 - Bad Debt Expense", "value": 0, "items": []}]}, {"name": "Salaries Expense", "value": 0, "items": [{"accountId": "401217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30700 - Salaries Expense", "value": 0, "items": []}]}, {"name": "Payroll Expense", "value": 0, "items": [{"accountId": "421217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30800 - Payroll Tax Expense", "value": 0, "items": []}, {"accountId": "441217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30900 - Workers Compensation ", "value": 0, "items": []}]}, {"name": "Insurance Expense", "value": 41.77, "items": [{"accountId": "461217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31000 - Health & Dental Insurance Expense", "value": 41.77, "items": []}, {"accountId": "481217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31100 - Life Insurance Expense", "value": 0, "items": []}]}, {"name": "Repairs and Maintenance Expense", "value": 0, "items": [{"accountId": "4a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31200 - Repairs and Maintenance Expense", "value": 0, "items": []}]}, {"name": "Utilities Expense", "value": 0, "items": [{"accountId": "4c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31300 - Utilities Expense", "value": 0, "items": []}]}, {"name": "Travel Expense", "value": 0, "items": [{"accountId": "61d17174-61db-ec11-82f9-002248008de8", "name": "999992 - Payhawk General", "value": 0, "items": []}, {"accountId": "3a37ed38-a6cf-ec11-8e7e-00224800faf5", "name": "999998 - Payhawk General", "value": 0, "items": []}, {"accountId": "64ee049b-a1cf-ec11-8e7e-00224800faf5", "name": "999999 - Payhawk General", "value": 0, "items": []}]}]}, "netOperatingProfit": -2118.91, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": -2118.91}, {"fromDate": "2023-02-01T00:00:00", "toDate": "2023-02-28T00:00:00", "income": {"name": "Income", "value": 414.51, "items": [{"name": "Sales Returns & Allowances", "value": -125.17, "items": [{"accountId": "8aba49ae-461a-ed11-90eb-000d3a873324", "name": "0121 - ", "value": -125.17, "items": []}, {"accountId": "1e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10400 - Sales Returns & Allowances", "value": 0, "items": []}]}, {"name": "Income, Services", "value": -10, "items": [{"accountId": "ac6a3a74-c69f-ec11-80f1-0022481b4546", "name": "10005-1 - Child", "value": -10, "items": []}, {"accountId": "161217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10100 - Income, Services", "value": 0, "items": []}]}, {"name": "Income, Jobs", "value": -12.91, "items": [{"accountId": "1f2618f9-c79f-ec11-80f1-0022481b4546", "name": "10005-2 - Child Child", "value": -12.91, "items": []}, {"accountId": "1a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10250 - Job Sales", "value": 0, "items": []}]}, {"name": "", "value": 0, "items": [{"accountId": "de1cabee-4a33-ed11-97e8-0022481aa72d", "name": "1005002 - Test account no cat 2", "value": 0, "items": []}, {"accountId": "b74b0c08-aa59-eb11-89f9-00224800a7ae", "name": "1006 - Account without category Income ", "value": 0, "items": []}, {"accountId": "023a8eba-c12e-ed11-97e8-000d3a8753f5", "name": "3213 - vdfgdf", "value": 0, "items": []}, {"accountId": "aa666f5a-c22e-ed11-97e8-0022480052b7", "name": "TEST INCOME A/C - ", "value": 0, "items": []}]}, {"name": "Income, Product Sales", "value": 430.4, "items": [{"accountId": "181217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10200 - Income, Product Sales", "value": 430.4, "items": []}]}, {"name": "Sales Discounts", "value": 0, "items": [{"accountId": "1c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10300 - Sales Discounts", "value": 0, "items": []}]}, {"name": "Job Sales Contra", "value": 0, "items": [{"accountId": "201217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10450 - Job Sales Applied", "value": 0, "items": []}]}, {"name": "Income", "value": 132.19, "items": [{"accountId": "221217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "10500 - Interest Income", "value": 132.19, "items": []}]}]}, "costOfSales": {"name": "Cost of Goods Sold", "value": 328, "items": [{"name": "Materials", "value": 328, "items": [{"accountId": "281217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "20100 - Cost of Materials", "value": 328, "items": []}]}, {"name": "Labour", "value": 0, "items": [{"accountId": "2a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "20200 - Cost of Labour", "value": 0, "items": []}]}, {"name": "Jobs Cost", "value": 0, "items": [{"accountId": "2c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "20300 - Job Costs", "value": 0, "items": []}]}]}, "grossProfit": 86.51, "expenses": {"name": "Expense", "value": 1482.02, "items": [{"name": "", "value": 9.52, "items": [{"accountId": "e9b4e2c2-4b33-ed11-97e8-0022481aa72d", "name": "1005003 - Expense Test account no cat", "value": 0, "items": []}, {"accountId": "1d60f4a2-6d19-ed11-90eb-002248009024", "name": "1234512345 - Invalid VAT Posting Setup", "value": 9.52, "items": []}]}, {"name": "Interest Expense", "value": 0, "items": [{"accountId": "bd407350-340b-ec11-86bc-0022481a4971", "name": "1093 - export with misc type", "value": 0, "items": []}, {"accountId": "381217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30300 - Interest Expense", "value": 0, "items": []}]}, {"name": "Other Income & Expenses", "value": 0, "items": [{"accountId": "2e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "20399 - Job Costs Applied", "value": 0, "items": []}, {"accountId": "4e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31400 - Office Supplies Expense", "value": 0, "items": []}, {"accountId": "501217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31500 - Miscellaneous Expense", "value": 0, "items": []}, {"accountId": "521217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31600 - Depreciation, Equipment", "value": 0, "items": []}, {"accountId": "541217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31900 - Rounding", "value": 0, "items": []}]}, {"name": "Benefits Expense", "value": 0, "items": [{"accountId": "57a95f12-9ecf-ec11-8e7e-00224800faf5", "name": "23 - test account", "value": 0, "items": []}]}, {"name": "Fees Expense", "value": 0, "items": [{"accountId": "3f6818aa-a4cf-ec11-8e7e-00224800faf5", "name": "30 - test expenses 2", "value": 0, "items": []}, {"accountId": "3a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30400 - Bank Charges and Fees", "value": 0, "items": []}, {"accountId": "3c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30500 - Processing Fees", "value": 0, "items": []}]}, {"name": "Rent Expense", "value": 0, "items": [{"accountId": "341217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30100 - Rent Expense", "value": 0, "items": []}]}, {"name": "Advertising Expense", "value": 0, "items": [{"accountId": "361217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30200 - Advertising Expense", "value": 0, "items": []}]}, {"name": "Bad Debt Expense", "value": -1.82, "items": [{"accountId": "3e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30600 - Bad Debt Expense", "value": -1.82, "items": []}]}, {"name": "Salaries Expense", "value": 0, "items": [{"accountId": "401217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30700 - Salaries Expense", "value": 0, "items": []}]}, {"name": "Payroll Expense", "value": 0, "items": [{"accountId": "421217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30800 - Payroll Tax Expense", "value": 0, "items": []}, {"accountId": "441217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "30900 - Workers Compensation ", "value": 0, "items": []}]}, {"name": "Insurance Expense", "value": 1474.32, "items": [{"accountId": "461217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31000 - Health & Dental Insurance Expense", "value": 1474.32, "items": []}, {"accountId": "481217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31100 - Life Insurance Expense", "value": 0, "items": []}]}, {"name": "Repairs and Maintenance Expense", "value": 0, "items": [{"accountId": "4a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31200 - Repairs and Maintenance Expense", "value": 0, "items": []}]}, {"name": "Utilities Expense", "value": 0, "items": [{"accountId": "4c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "31300 - Utilities Expense", "value": 0, "items": []}]}, {"name": "Travel Expense", "value": 0, "items": [{"accountId": "61d17174-61db-ec11-82f9-002248008de8", "name": "999992 - Payhawk General", "value": 0, "items": []}, {"accountId": "3a37ed38-a6cf-ec11-8e7e-00224800faf5", "name": "999998 - Payhawk General", "value": 0, "items": []}, {"accountId": "64ee049b-a1cf-ec11-8e7e-00224800faf5", "name": "999999 - Payhawk General", "value": 0, "items": []}]}]}, "netOperatingProfit": -1395.51, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": -1395.51}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2023-03-01T00:00:00", "earliestAvailableMonth": "2021-04-01T00:00:00"} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2022-09-01T00:00:00Z", "toDate": "2022-09-30T00:00:00Z", "income": {"name": "Income", "value": -286, "items": [{"accountId": "2421e8a0-5355-4ec0-af11-021fe4f39fcd", "name": "8000 - Omzet binnenland hoog tarief", "value": -286, "items": []}, {"accountId": "0b5b5d8b-1c0c-4767-88d8-c99206da6ace", "name": "555777 - Sales", "value": 0, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": -286, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": -286, "otherExpenses": {"name": "Other Expenses", "value": 5.25, "items": [{"accountId": "e405eff6-5c15-43b9-a5f0-ba592b26fbbe", "name": "9410 - Inkoopkortingen", "value": 5.25, "items": []}]}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": -5.25, "netProfit": -291.25}, {"fromDate": "2022-08-01T00:00:00Z", "toDate": "2022-08-31T00:00:00Z", "income": {"name": "Income", "value": 664.73, "items": [{"accountId": "2421e8a0-5355-4ec0-af11-021fe4f39fcd", "name": "8000 - Omzet binnenland hoog tarief", "value": 643.33, "items": []}, {"accountId": "62981769-c358-4ee5-aa8a-c9d5c559dd5c", "name": "9275 - Activa realisatie verlies", "value": -13.6, "items": []}, {"accountId": "f93008c5-f45b-4200-82a8-d0d5e1584ee7", "name": "1234567 - james_test2", "value": 35, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 664.73, "expenses": {"name": "Expenses", "value": 13.6, "items": [{"accountId": "62981769-c358-4ee5-aa8a-c9d5c559dd5c", "name": "9275 - Activa realisatie verlies", "value": 13.6, "items": []}]}, "netOperatingProfit": 651.13, "otherExpenses": {"name": "Other Expenses", "value": 45, "items": [{"accountId": "e405eff6-5c15-43b9-a5f0-ba592b26fbbe", "name": "9410 - Inkoopkortingen", "value": 45, "items": []}]}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": -45, "netProfit": 606.13}], "reportBasis": "Unknown", "currency": "EUR", "mostRecentAvailableMonth": "2022-09-01T00:00:00", "earliestAvailableMonth": "2020-11-01T00:00:00"} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2022-10-01T00:00:00Z", "toDate": "2022-10-31T00:00:00Z", "income": {"name": "Income", "value": -2, "items": [{"accountId": "43acd218-6a95-445f-994c-660273e0ced9", "name": "41000 - Sales", "value": -2, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": -2, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": -2, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": -2}, {"fromDate": "2022-09-01T00:00:00Z", "toDate": "2022-09-30T00:00:00Z", "income": {"name": "Income", "value": 208, "items": [{"accountId": "43acd218-6a95-445f-994c-660273e0ced9", "name": "41000 - Sales", "value": 208, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 208, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 208, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 208}], "reportBasis": "Unknown", "currency": "GBP", "mostRecentAvailableMonth": "2022-10-01T00:00:00", "earliestAvailableMonth": "2020-11-01T00:00:00"} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-04-01T00:00:00", "toDate": "2023-04-30T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}, {"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 24.05, "items": [{"accountId": "3384197", "name": "Advertising", "value": 0.21, "items": []}, {"accountId": "3380421", "name": "Car & Truck Expenses", "value": 11, "items": []}, {"accountId": "3361426", "name": "Meals & Entertainment", "value": 12.82, "items": []}, {"accountId": "3379249", "name": "Supplies", "value": 0.02, "items": []}]}, "netOperatingProfit": -24.05, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": -24.04}], "reportBasis": "Cash", "currency": "GBP", "mostRecentAvailableMonth": "2023-04-01T00:00:00", "earliestAvailableMonth": "2021-05-01T00:00:00"} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2022-09-01T00:00:00", "toDate": "2022-09-30T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost Of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}, {"fromDate": "2022-08-01T00:00:00", "toDate": "2022-08-31T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost Of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}], "reportBasis": "Unknown", "currency": "GBP", "mostRecentAvailableMonth": "2022-09-01T00:00:00", "earliestAvailableMonth": "2020-10-01T00:00:00"} - MYOB AccountRight and Essentials: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2022-11-01T00:00:00", "toDate": "2022-11-30T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}, {"fromDate": "2022-10-01T00:00:00", "toDate": "2022-10-31T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2022-11-01T00:00:00", "earliestAvailableMonth": "2020-12-01T00:00:00"} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": -123.45, "items": [{"accountId": "58", "name": "Expenses", "value": -123.45, "items": []}]}, "netOperatingProfit": 123.45, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 123.45}, {"fromDate": "2023-01-01T00:00:00", "toDate": "2023-01-31T00:00:00", "income": {"name": "Income", "value": 11, "items": [{"accountId": "108", "name": "Shipping and Handling", "value": 11, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 11, "expenses": {"name": "Expenses", "value": 11, "items": [{"accountId": "58", "name": "Expenses", "value": 11, "items": []}]}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2023-03-01T00:00:00", "earliestAvailableMonth": "2022-11-01T00:00:00"} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-04-01T00:00:00", "toDate": "2023-04-30T00:00:00", "income": {"name": "Income", "value": 7673.5, "items": [{"accountId": "170000-933270541", "name": "40100 � Construction Income", "value": 7673.5, "items": [{"accountId": "190000-933270541", "name": "40130 � Labor Income", "value": 840, "items": []}, {"accountId": "1A0000-933270542", "name": "40140 � Materials Income", "value": 4103.5, "items": []}, {"accountId": "1C0000-933270542", "name": "40150 � Subcontracted Labor Income", "value": 2730, "items": []}]}]}, "costOfSales": {"name": "Cost of Goods Sold", "value": 1729.85, "items": [{"accountId": "1E0000-933270542", "name": "50100 � Cost of Goods Sold", "value": 329.85, "items": []}, {"accountId": "300000-933270542", "name": "54000 � Job Expenses", "value": 1400, "items": [{"accountId": "340000-933270542", "name": "54500 � Subcontractors", "value": 1400, "items": []}]}]}, "grossProfit": 5943.65, "expenses": {"name": "Expense", "value": 2417.29, "items": [{"accountId": "1F0000-933270542", "name": "60100 � Automobile", "value": 1066.56, "items": [{"accountId": "200000-933270542", "name": "60110 � Fuel", "value": 162, "items": []}, {"accountId": "580000-1071498064", "name": "60120 � Insurance", "value": 712.56, "items": []}, {"accountId": "210000-933270542", "name": "60130 � Repairs and Maintenance", "value": 192, "items": []}]}, {"accountId": "230000-933270542", "name": "60600 � Bank Service Charges", "value": 12.5, "items": []}, {"accountId": "290000-933270542", "name": "62100 � Insurance", "value": 675, "items": [{"accountId": "2A0000-933270542", "name": "62110 � Disability Insurance", "value": 50, "items": []}, {"accountId": "2B0000-933270542", "name": "62120 � Liability Insurance", "value": 350, "items": []}, {"accountId": "2C0000-933270542", "name": "62130 � Work Comp", "value": 275, "items": []}]}, {"accountId": "2D0000-933270542", "name": "62400 � Interest Expense", "value": 438.3, "items": [{"accountId": "2F0000-933270542", "name": "62420 � Loan Interest", "value": 438.3, "items": []}]}, {"accountId": "480000-933270542", "name": "65100 � Utilities", "value": 224.93, "items": [{"accountId": "490000-933270542", "name": "65110 � Gas and Electric", "value": 120.93, "items": []}, {"accountId": "4A0000-933270542", "name": "65120 � Telephone", "value": 80, "items": []}, {"accountId": "4B0000-933270542", "name": "65130 � Water", "value": 24, "items": []}]}]}, "netOperatingProfit": 3526.36, "otherExpenses": {"name": "Other Expense", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 3526.36}, {"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "income": {"name": "Income", "value": 16500, "items": [{"accountId": "170000-933270541", "name": "40100 � Construction Income", "value": 16500, "items": [{"accountId": "1C0000-933270542", "name": "40150 � Subcontracted Labor Income", "value": 16500, "items": []}]}]}, "costOfSales": {"name": "Cost of Goods Sold", "value": 7500, "items": [{"accountId": "300000-933270542", "name": "54000 � Job Expenses", "value": 7500, "items": [{"accountId": "340000-933270542", "name": "54500 � Subcontractors", "value": 7500, "items": []}]}]}, "grossProfit": 9000, "expenses": {"name": "Expense", "value": 3159.99, "items": [{"accountId": "1F0000-933270542", "name": "60100 � Automobile", "value": 359, "items": [{"accountId": "200000-933270542", "name": "60110 � Fuel", "value": 127, "items": []}, {"accountId": "210000-933270542", "name": "60130 � Repairs and Maintenance", "value": 232, "items": []}]}, {"accountId": "230000-933270542", "name": "60600 � Bank Service Charges", "value": 12.5, "items": []}, {"accountId": "290000-933270542", "name": "62100 � Insurance", "value": 675, "items": [{"accountId": "2A0000-933270542", "name": "62110 � Disability Insurance", "value": 50, "items": []}, {"accountId": "2B0000-933270542", "name": "62120 � Liability Insurance", "value": 350, "items": []}, {"accountId": "2C0000-933270542", "name": "62130 � Work Comp", "value": 275, "items": []}]}, {"accountId": "2D0000-933270542", "name": "62400 � Interest Expense", "value": 456.29, "items": [{"accountId": "2F0000-933270542", "name": "62420 � Loan Interest", "value": 456.29, "items": []}]}, {"accountId": "3D0000-933270542", "name": "64200 � Repairs", "value": 1164, "items": [{"accountId": "3F0000-933270542", "name": "64220 � Computer Repairs", "value": 714, "items": []}, {"accountId": "400000-933270542", "name": "64230 � Equipment Repairs", "value": 450, "items": []}]}, {"accountId": "480000-933270542", "name": "65100 � Utilities", "value": 493.2, "items": [{"accountId": "490000-933270542", "name": "65110 � Gas and Electric", "value": 389.2, "items": []}, {"accountId": "4A0000-933270542", "name": "65120 � Telephone", "value": 80, "items": []}, {"accountId": "4B0000-933270542", "name": "65130 � Water", "value": 24, "items": []}]}]}, "netOperatingProfit": 5840.01, "otherExpenses": {"name": "Other Expense", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 93.42, "items": [{"accountId": "4C0000-933270542", "name": "70200 � Interest Income", "value": 93.42, "items": []}]}, "netOtherIncome": 93.42, "netProfit": 5933.43}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2023-04-01T00:00:00", "earliestAvailableMonth": "2021-05-01T00:00:00"} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-04-01T00:00:00", "toDate": "2023-04-30T00:00:00", "income": {"name": "Income", "value": 35.7, "items": [{"accountId": "68", "name": "Billable Expenses Income", "value": -15, "items": []}, {"accountId": "44", "name": "Sales", "value": 130, "items": []}, {"accountId": "66", "name": "Sales of Product Income", "value": 42.5, "items": []}, {"accountId": "1", "name": "Services", "value": -131.8, "items": []}, {"accountId": "149", "name": "Shipping Income", "value": 10, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": -8.16, "items": [{"accountId": "67", "name": "Cost of sales", "value": 33.51, "items": []}, {"accountId": "69", "name": "Cost of Sales - billable expenses", "value": -41.67, "items": []}]}, "grossProfit": 43.86, "expenses": {"name": "Expenses", "value": -987, "items": [{"accountId": "148", "name": "Billable Test", "value": -250, "items": []}, {"accountId": "16", "name": "Computer and Internet Expenses", "value": -897, "items": []}, {"accountId": "18", "name": "Depreciation Expense", "value": 100, "items": []}, {"accountId": "19", "name": "Dues and Subscriptions", "value": -40, "items": []}, {"accountId": "64", "name": "Purchases", "value": 100, "items": []}]}, "netOperatingProfit": 1030.86, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 1030.86}, {"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "income": {"name": "Income", "value": 1664.93, "items": [{"accountId": "14", "name": "Commission Income", "value": 64, "items": []}, {"accountId": "44", "name": "Sales", "value": 952.29, "items": []}, {"accountId": "43", "name": "Sales Discounts", "value": 9.05, "items": []}, {"accountId": "66", "name": "Sales of Product Income", "value": 223.52, "items": []}, {"accountId": "1", "name": "Services", "value": 392.32, "items": []}, {"accountId": "149", "name": "Shipping Income", "value": 23.75, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 2568.09, "items": [{"accountId": "67", "name": "Cost of sales", "value": 27.09, "items": []}, {"accountId": "69", "name": "Cost of Sales - billable expenses", "value": 41, "items": []}, {"accountId": "10", "name": "Entertainment Booking Fees paid on behalf of clients", "value": 2500, "items": []}]}, "grossProfit": -903.16, "expenses": {"name": "Expenses", "value": 397.62, "items": [{"accountId": "148", "name": "Billable Test", "value": -35.75, "items": []}, {"accountId": "12", "name": "Business Licenses and Permits", "value": -8, "items": []}, {"accountId": "16", "name": "Computer and Internet Expenses", "value": 42.46, "items": []}, {"accountId": "20", "name": "Equipment rental", "value": -22.76, "items": []}, {"accountId": "116", "name": "HM Revenue & Customs (VAT) Expense", "value": -25.2, "items": []}, {"accountId": "24", "name": "Insurance Expense", "value": 5.32, "items": []}, {"accountId": "23", "name": "Insurance Expense-Health Insurance", "value": -34, "items": []}, {"accountId": "31", "name": "Marketing Expense", "value": -11.56, "items": []}, {"accountId": "35", "name": "Office Supplies", "value": -12.89, "items": []}, {"accountId": "64", "name": "Purchases", "value": 500, "items": []}]}, "netOperatingProfit": -1300.78, "otherExpenses": {"name": "Other Expenses", "value": 11.92, "items": [{"accountId": "52", "name": "Exchange Gain or Loss", "value": 11.92, "items": []}]}, "otherIncome": {"name": "Other Income", "value": 29.41, "items": [{"accountId": "21", "name": "Finance Charge Income", "value": -13.44, "items": []}, {"accountId": "27", "name": "Insurance Proceeds Received", "value": 7.85, "items": []}, {"accountId": "29", "name": "Interest income", "value": 15, "items": []}, {"accountId": "39", "name": "Proceeds from Sale of Assets", "value": 20, "items": []}]}, "netOtherIncome": 17.49, "netProfit": -1283.29}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2023-04-01T00:00:00", "earliestAvailableMonth": "2021-05-01T00:00:00"} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-01-01T00:00:00", "toDate": "2023-01-31T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 4300, "items": [{"accountId": "68", "name": "303 HM Revenue & Customs (VAT) Expense", "value": 250, "items": []}, {"accountId": "22", "name": "408 Travelling expenses", "value": 4050, "items": []}]}, "netOperatingProfit": -4300, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": -4300}, {"fromDate": "2022-12-01T00:00:00", "toDate": "2022-12-31T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 10, "items": [{"accountId": "16", "name": "292 Advertising", "value": 10, "items": []}]}, "netOperatingProfit": -10, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": -10}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2023-01-01T00:00:00", "earliestAvailableMonth": "2021-02-01T00:00:00"} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2020-12-01T00:00:00Z", "toDate": "2020-12-31T00:00:00Z", "income": {"name": "Income", "value": 0, "items": [{"name": "Total Sales", "value": 0, "items": [{"accountId": "101", "name": "Product Sales", "value": 0, "items": []}, {"accountId": "102", "name": "Export Sales", "value": 0, "items": []}, {"accountId": "103", "name": "Sales of Assets", "value": 0, "items": []}, {"accountId": "104", "name": "Credit Charges (Late Payments)", "value": 0, "items": []}, {"accountId": "105", "name": "Other Sales", "value": 0, "items": []}]}]}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": [{"name": "Total Purchases", "value": 0, "items": [{"accountId": "201", "name": "Purchases", "value": 0, "items": []}, {"accountId": "202", "name": "Purchase Charges", "value": 0, "items": []}, {"accountId": "203", "name": "Stock", "value": 0, "items": []}]}, {"name": "Total Direct Expenses", "value": 0, "items": [{"accountId": "301", "name": "Labour", "value": 0, "items": []}, {"accountId": "302", "name": "Commissions", "value": 0, "items": []}, {"accountId": "303", "name": "Sales Promotion", "value": 0, "items": []}, {"accountId": "304", "name": "Miscellaneous Expenses", "value": 0, "items": []}]}]}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": [{"name": "Total Overheads", "value": 0, "items": [{"accountId": "401", "name": "Gross Wages", "value": 0, "items": []}, {"accountId": "402", "name": "Rent and Rates", "value": 0, "items": []}, {"accountId": "403", "name": "Heat, Light and Power", "value": 0, "items": []}, {"accountId": "404", "name": "Motor Expenses", "value": 0, "items": []}, {"accountId": "405", "name": "Travelling and Entertainment", "value": 0, "items": []}, {"accountId": "406", "name": "Printing and Stationery", "value": 0, "items": []}, {"accountId": "407", "name": "Professional Fees", "value": 0, "items": []}, {"accountId": "408", "name": "Equipment Hire and Rental", "value": 0, "items": []}, {"accountId": "409", "name": "Maintenance", "value": 0, "items": []}, {"accountId": "410", "name": "Bank Charges and Interest", "value": 0, "items": []}, {"accountId": "411", "name": "Depreciation", "value": 0, "items": []}, {"accountId": "412", "name": "Bad Debts", "value": 0, "items": []}, {"accountId": "413", "name": "General Expenses", "value": 0, "items": []}, {"accountId": "414", "name": "Suspense & Mispostings", "value": 0, "items": []}]}]}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": [{"accountId": "10,1001", "name": "Taxation", "value": 0, "items": []}]}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}, {"fromDate": "2020-11-01T00:00:00Z", "toDate": "2020-11-30T00:00:00Z", "income": {"name": "Income", "value": 0, "items": [{"name": "Total Sales", "value": 0, "items": [{"accountId": "101", "name": "Product Sales", "value": 0, "items": []}, {"accountId": "102", "name": "Export Sales", "value": 0, "items": []}, {"accountId": "103", "name": "Sales of Assets", "value": 0, "items": []}, {"accountId": "104", "name": "Credit Charges (Late Payments)", "value": 0, "items": []}, {"accountId": "105", "name": "Other Sales", "value": 0, "items": []}]}]}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": [{"name": "Total Purchases", "value": 0, "items": [{"accountId": "201", "name": "Purchases", "value": 0, "items": []}, {"accountId": "202", "name": "Purchase Charges", "value": 0, "items": []}, {"accountId": "203", "name": "Stock", "value": 0, "items": []}]}, {"name": "Total Direct Expenses", "value": 0, "items": [{"accountId": "301", "name": "Labour", "value": 0, "items": []}, {"accountId": "302", "name": "Commissions", "value": 0, "items": []}, {"accountId": "303", "name": "Sales Promotion", "value": 0, "items": []}, {"accountId": "304", "name": "Miscellaneous Expenses", "value": 0, "items": []}]}]}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": [{"name": "Total Overheads", "value": 0, "items": [{"accountId": "401", "name": "Gross Wages", "value": 0, "items": []}, {"accountId": "402", "name": "Rent and Rates", "value": 0, "items": []}, {"accountId": "403", "name": "Heat, Light and Power", "value": 0, "items": []}, {"accountId": "404", "name": "Motor Expenses", "value": 0, "items": []}, {"accountId": "405", "name": "Travelling and Entertainment", "value": 0, "items": []}, {"accountId": "406", "name": "Printing and Stationery", "value": 0, "items": []}, {"accountId": "407", "name": "Professional Fees", "value": 0, "items": []}, {"accountId": "408", "name": "Equipment Hire and Rental", "value": 0, "items": []}, {"accountId": "409", "name": "Maintenance", "value": 0, "items": []}, {"accountId": "410", "name": "Bank Charges and Interest", "value": 0, "items": []}, {"accountId": "411", "name": "Depreciation", "value": 0, "items": []}, {"accountId": "412", "name": "Bad Debts", "value": 0, "items": []}, {"accountId": "413", "name": "General Expenses", "value": 0, "items": []}, {"accountId": "414", "name": "Suspense & Mispostings", "value": 0, "items": []}]}]}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": [{"accountId": "10,1001", "name": "Taxation", "value": 0, "items": []}]}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2020-12-01T00:00:00", "earliestAvailableMonth": "2015-01-01T00:00:00"} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}, {"fromDate": "2023-02-01T00:00:00", "toDate": "2023-02-28T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}], "reportBasis": "Unknown", "currency": "GBP", "mostRecentAvailableMonth": "2023-03-01T00:00:00", "earliestAvailableMonth": "2021-04-01T00:00:00"} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2022-10-01T00:00:00", "toDate": "2022-10-31T00:00:00", "income": {"name": "Income", "value": -7749, "items": [{"accountId": "9a994b92267a11e797950a57719b2edb", "name": "4000 - Sales Type A", "value": -7740, "items": []}, {"accountId": "9a994e06267a11e797950a57719b2edb", "name": "4009 - Sales Discounts", "value": -9, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 11602000, "items": [{"accountId": "9a995955267a11e797950a57719b2edb", "name": "5000 - Cost of sales - goods", "value": 11602000, "items": []}]}, "grossProfit": -11609749, "expenses": {"name": "Expenses", "value": -1.83, "items": [{"accountId": "9a99a91c267a11e797950a57719b2edb", "name": "8211 - Exchange rate gain/(loss)", "value": -1.83, "items": []}]}, "netOperatingProfit": -11609747.17, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": -11609747.17}, {"fromDate": "2022-09-01T00:00:00", "toDate": "2022-09-30T00:00:00", "income": {"name": "Income", "value": 501, "items": [{"accountId": "9a994b92267a11e797950a57719b2edb", "name": "4000 - Sales Type A", "value": 511, "items": []}, {"accountId": "9a994e06267a11e797950a57719b2edb", "name": "4009 - Sales Discounts", "value": -10, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 13220073.7, "items": [{"accountId": "9a995955267a11e797950a57719b2edb", "name": "5000 - Cost of sales - goods", "value": 13220073.7, "items": []}]}, "grossProfit": -13219572.7, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": -13219572.7, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": -148.34, "items": [{"accountId": "9a995491267a11e797950a57719b2edb", "name": "4900 - Other income", "value": -148.34, "items": []}]}, "netOtherIncome": -148.34, "netProfit": -13219721.04}], "reportBasis": "Unknown", "currency": "GBP", "mostRecentAvailableMonth": "2022-10-01T00:00:00", "earliestAvailableMonth": "2020-11-01T00:00:00"} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2022-11-01T00:00:00", "toDate": "2022-11-30T00:00:00", "income": {"name": "Income", "value": 7.01, "items": [{"name": "Unrealized Gain on Foreign Exchange", "value": 7.01, "items": []}]}, "costOfSales": {"name": "Cost of Goods Sold", "value": 0, "items": []}, "grossProfit": 7.01, "expenses": {"name": "Operating Expenses", "value": 555, "items": [{"name": "Office Supplies", "value": 555, "items": []}]}, "netOperatingProfit": -547.99, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": -547.99}, {"fromDate": "2022-10-01T00:00:00", "toDate": "2022-10-31T00:00:00", "income": {"name": "Income", "value": 8.36, "items": [{"name": "Unrealized Gain on Foreign Exchange", "value": 8.36, "items": []}]}, "costOfSales": {"name": "Cost of Goods Sold", "value": 0, "items": []}, "grossProfit": 8.36, "expenses": {"name": "Operating Expenses", "value": 0, "items": []}, "netOperatingProfit": 8.36, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 8.36}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2022-11-01T00:00:00", "earliestAvailableMonth": "2020-12-01T00:00:00"} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "income": {"name": "Income", "value": 0, "items": []}, "costOfSales": {"name": "Cost of Sales", "value": 0, "items": []}, "grossProfit": 0, "expenses": {"name": "Expenses", "value": 0, "items": []}, "netOperatingProfit": 0, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 0}, {"fromDate": "2023-02-01T00:00:00", "toDate": "2023-02-28T00:00:00", "income": {"name": "Income", "value": 14496.51, "items": [{"accountId": "c563b607-fb0e-4d06-9ddb-76fdeef20ae3", "name": "Sales", "value": 14496.51, "items": []}]}, "costOfSales": {"name": "Cost of Sales", "value": 700, "items": [{"accountId": "127f3b99-8dc2-4b7e-854c-91ef9bd2757b", "name": "Purchases", "value": 700, "items": []}]}, "grossProfit": 13796.51, "expenses": {"name": "Expenses", "value": 2026.92, "items": [{"accountId": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses", "value": 215.87, "items": []}, {"accountId": "d50842c3-af67-4233-b8c9-df3180f5b7bd", "name": "Light, Power, Heating", "value": 103.43, "items": []}, {"accountId": "0be1631e-cc7e-4c27-951f-308c3307c0fe", "name": "Motor Vehicle Expenses", "value": 342.79, "items": []}, {"accountId": "a49cc958-968e-4b54-96d6-8853c036009e", "name": "Postage, Freight & Courier", "value": 94.19, "items": []}, {"accountId": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery", "value": 24.58, "items": []}, {"accountId": "dae8e236-24bb-4a7a-9787-c5fd89385e03", "name": "Rent", "value": 984.38, "items": []}, {"accountId": "a40f43e2-c7b0-4187-919a-04ccdc14a630", "name": "Subscriptions", "value": 14.9, "items": []}, {"accountId": "f3c73c3d-9887-4377-b18b-0374ab62e4aa", "name": "Telephone & Internet", "value": 45.11, "items": []}, {"accountId": "c7b73345-7f25-428a-bb97-7b20a1470a53", "name": "Travel - National", "value": 201.67, "items": []}]}, "netOperatingProfit": 11769.59, "otherExpenses": {"name": "Other Expenses", "value": 0, "items": []}, "otherIncome": {"name": "Other Income", "value": 0, "items": []}, "netOtherIncome": 0, "netProfit": 11769.59}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2023-03-01T00:00:00", "earliestAvailableMonth": "2021-04-01T00:00:00"} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2022-10-01T00:00:00", "toDate": "2022-10-31T00:00:00", "income": {"name": "Operating Income", "value": 0, "items": [{"accountId": "104957000000000394", "name": "Discount", "value": 0, "items": []}, {"accountId": "104957000000000379", "name": "General Income", "value": 0, "items": []}, {"accountId": "104957000000099070", "name": "General Income Child Test", "value": 0, "items": []}, {"accountId": "104957000000000382", "name": "Interest Income", "value": 0, "items": []}, {"accountId": "104957000000000385", "name": "Late Fee Income", "value": 0, "items": []}, {"accountId": "104957000000000503", "name": "Other Charges", "value": 0, "items": []}, {"accountId": "104957000000000376", "name": "Sales", "value": 0, "items": []}, {"accountId": "104957000000000506", "name": "Shipping Charge", "value": 0, "items": []}]}, "costOfSales": {"name": "Cost of Goods Sold", "value": 0, "items": [{"accountId": "104957000000000509", "name": "Cost of Goods Sold", "value": 0, "items": []}]}, "grossProfit": 0, "expenses": {"name": "Operating Expense", "value": 0, "items": [{"accountId": "104957000000000391", "name": "Advertising And Marketing", "value": 0, "items": []}, {"accountId": "104957000000000406", "name": "Air Travel Expense", "value": 0, "items": []}, {"accountId": "104957000000000412", "name": "Automobile Expense", "value": 0, "items": []}, {"accountId": "104957000000000427", "name": "Bad Debt", "value": 0, "items": []}, {"accountId": "104957000000000397", "name": "Bank Fees and Charges", "value": 0, "items": []}, {"accountId": "104957000000000442", "name": "Consultant Expense", "value": 0, "items": []}, {"accountId": "104957000000000400", "name": "Credit Card Charges", "value": 0, "items": []}, {"accountId": "104957000000000439", "name": "Depreciation Expense", "value": 0, "items": []}, {"accountId": "104957000000243027", "name": "Fuel/Mileage Expenses", "value": 0, "items": []}, {"accountId": "104957000000000415", "name": "IT and Internet Expenses", "value": 0, "items": []}, {"accountId": "104957000000000421", "name": "Janitorial Expense", "value": 0, "items": []}, {"accountId": "104957000000000454", "name": "Lodging", "value": 0, "items": []}, {"accountId": "104957000000000436", "name": "Meals and Entertainment", "value": 0, "items": []}, {"accountId": "104957000000000388", "name": "Office Supplies", "value": 0, "items": []}, {"accountId": "104957000000000448", "name": "Other Expenses", "value": 0, "items": []}, {"accountId": "104957000000000424", "name": "Postage", "value": 0, "items": []}, {"accountId": "104957000000000430", "name": "Printing and Stationery", "value": 0, "items": []}, {"accountId": "104957000000639102", "name": "Purchase Discounts", "value": 0, "items": []}, {"accountId": "104957000000000418", "name": "Rent Expense", "value": 0, "items": []}, {"accountId": "104957000000000445", "name": "Repairs and Maintenance", "value": 0, "items": []}, {"accountId": "104957000000000433", "name": "Salaries and Employee Wages", "value": 0, "items": []}, {"accountId": "104957000000000409", "name": "Telephone Expense", "value": 0, "items": []}, {"accountId": "104957000000000463", "name": "Uncategorized", "value": 0, "items": []}]}, "netOperatingProfit": 0, "otherExpenses": {"name": "Non Operating Expense", "value": 0, "items": [{"accountId": "104957000000000403", "name": "Exchange Gain or Loss", "value": 0, "items": []}, {"accountId": "104957000000099003", "name": "Insurance Expenses (Test Other Expense)", "value": 0, "items": []}]}, "otherIncome": {"name": "Non Operating Income", "value": 0, "items": [{"accountId": "104957000000054032", "name": "Flat Rate Profit", "value": 0, "items": []}, {"accountId": "104957000000099009", "name": "Interest Earned (Test Other Income)", "value": 0, "items": []}]}, "netOtherIncome": 0, "netProfit": 0}, {"fromDate": "2022-09-01T00:00:00", "toDate": "2022-09-30T00:00:00", "income": {"name": "Operating Income", "value": 69, "items": [{"accountId": "104957000000000394", "name": "Discount", "value": 0, "items": []}, {"accountId": "104957000000000379", "name": "General Income", "value": 0, "items": []}, {"accountId": "104957000000099070", "name": "General Income Child Test", "value": 0, "items": []}, {"accountId": "104957000000000382", "name": "Interest Income", "value": 0, "items": []}, {"accountId": "104957000000000385", "name": "Late Fee Income", "value": 0, "items": []}, {"accountId": "104957000000000503", "name": "Other Charges", "value": 0, "items": []}, {"accountId": "104957000000000376", "name": "Sales", "value": 69, "items": []}, {"accountId": "104957000000000506", "name": "Shipping Charge", "value": 0, "items": []}]}, "costOfSales": {"name": "Cost of Goods Sold", "value": 35, "items": [{"accountId": "104957000000000509", "name": "Cost of Goods Sold", "value": 35, "items": []}]}, "grossProfit": 34, "expenses": {"name": "Operating Expense", "value": 69, "items": [{"accountId": "104957000000000391", "name": "Advertising And Marketing", "value": 0, "items": []}, {"accountId": "104957000000000406", "name": "Air Travel Expense", "value": 0, "items": []}, {"accountId": "104957000000000412", "name": "Automobile Expense", "value": 0, "items": []}, {"accountId": "104957000000000427", "name": "Bad Debt", "value": 69, "items": []}, {"accountId": "104957000000000397", "name": "Bank Fees and Charges", "value": 0, "items": []}, {"accountId": "104957000000000442", "name": "Consultant Expense", "value": 0, "items": []}, {"accountId": "104957000000000400", "name": "Credit Card Charges", "value": 0, "items": []}, {"accountId": "104957000000000439", "name": "Depreciation Expense", "value": 0, "items": []}, {"accountId": "104957000000243027", "name": "Fuel/Mileage Expenses", "value": 0, "items": []}, {"accountId": "104957000000000415", "name": "IT and Internet Expenses", "value": 0, "items": []}, {"accountId": "104957000000000421", "name": "Janitorial Expense", "value": 0, "items": []}, {"accountId": "104957000000000454", "name": "Lodging", "value": 0, "items": []}, {"accountId": "104957000000000436", "name": "Meals and Entertainment", "value": 0, "items": []}, {"accountId": "104957000000000388", "name": "Office Supplies", "value": 0, "items": []}, {"accountId": "104957000000000448", "name": "Other Expenses", "value": 0, "items": []}, {"accountId": "104957000000000424", "name": "Postage", "value": 0, "items": []}, {"accountId": "104957000000000430", "name": "Printing and Stationery", "value": 0, "items": []}, {"accountId": "104957000000639102", "name": "Purchase Discounts", "value": 0, "items": []}, {"accountId": "104957000000000418", "name": "Rent Expense", "value": 0, "items": []}, {"accountId": "104957000000000445", "name": "Repairs and Maintenance", "value": 0, "items": []}, {"accountId": "104957000000000433", "name": "Salaries and Employee Wages", "value": 0, "items": []}, {"accountId": "104957000000000409", "name": "Telephone Expense", "value": 0, "items": []}, {"accountId": "104957000000000463", "name": "Uncategorized", "value": 0, "items": []}]}, "netOperatingProfit": -35, "otherExpenses": {"name": "Non Operating Expense", "value": 0, "items": [{"accountId": "104957000000000403", "name": "Exchange Gain or Loss", "value": 0, "items": []}, {"accountId": "104957000000099003", "name": "Insurance Expenses (Test Other Expense)", "value": 0, "items": []}]}, "otherIncome": {"name": "Non Operating Income", "value": 0, "items": [{"accountId": "104957000000054032", "name": "Flat Rate Profit", "value": 0, "items": []}, {"accountId": "104957000000099009", "name": "Interest Earned (Test Other Income)", "value": 0, "items": []}]}, "netOtherIncome": 0, "netProfit": -35}], "reportBasis": "Accrual", "currency": "GBP", "mostRecentAvailableMonth": "2022-10-01T00:00:00", "earliestAvailableMonth": "2020-11-01T00:00:00"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-categorized-balance-sheet-statement: - speakeasy-default-get-categorized-balance-sheet-statement: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "29-09-2020" - responses: - "200": - application/json: {"reportInfo": {"reportName": "EnhancedProfitAndLossAccounts", "companyName": "ABC LTD", "generatedDate": "2022-01-01"}, "reportItems": [{"date": "2022-01-01", "balance": 70, "accountName": "Sales UK", "accountId": "13931cbf-ea06-4d6e-9538-a8457fa66011", "accountCategory": {"status": "Suggested", "levels": [{"levelName": "Income", "confidence": 0.95}, {"levelName": "Revenue", "confidence": 0.9}]}}, {"date": "2022-01-01", "balance": 30, "accountName": "Sales US", "accountId": "13931cbf-ea06-4d6e-9538-a8457fa66011", "accountCategory": {"status": "Suggested", "levels": [{"levelName": "Income", "confidence": 0.95}, {"levelName": "Revenue", "confidence": 0.9}]}}, {"date": "2022-01-01", "balance": 70, "accountName": "Amazon", "accountId": "13931cbf-ea06-4d6e-9538-a8457fa66011", "accountCategory": {"status": "Suggested", "levels": [{"levelName": "Income", "confidence": 0.95}, {"levelName": "Revenue", "confidence": 0.95}, {"levelName": "Online", "confidence": 0.8}]}}]} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "29-09-2020" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-balance-sheet: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2023-03-31T00:00:00", "assets": {"accountId": "", "name": "Assets", "value": 4643976.27, "items": [{"accountId": "", "name": "Fixed Assets", "value": 3930291.27, "items": [{"accountId": "724ca578-8b5d-4bdb-ad45-e3820eee9de9", "name": "Office Equipment", "value": 2354838.89, "items": []}, {"accountId": "be3eb911-034b-42de-95db-0d58ac978b7f", "name": "Computer Equipment", "value": 1575452.38, "items": []}]}, {"accountId": "", "name": "Current Assets", "value": 713685, "items": [{"accountId": "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", "name": "Accounts Receivable", "value": 66538.63, "items": []}, {"accountId": "22de1660-d745-4809-a363-16b134607e66", "name": "Prepayments", "value": 27250.93, "items": []}, {"accountId": "e5d7612c-1671-47b4-b733-5db48363fcd0", "name": "Inventory", "value": 113157.44, "items": []}, {"accountId": "", "name": "Bank", "value": 506738, "items": [{"accountId": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account", "value": 506738, "items": []}]}]}]}, "liabilities": {"accountId": "", "name": "Liabilities", "value": 1183797.31, "items": [{"accountId": "", "name": "Current Liabilities", "value": 544797.71, "items": [{"accountId": "3a872b81-d1af-4d31-9bfa-a37280b8f68c", "name": "VAT", "value": 27683.3, "items": []}, {"accountId": "d19852a2-e292-4eb9-a909-9dadb95c0e76", "name": "Rounding", "value": 0, "items": []}, {"accountId": "9be6382f-6b33-402d-b448-0db1dbf67a98", "name": "Historical Adjustment", "value": 8985.44, "items": []}, {"accountId": "53bf27a7-7497-4c61-9887-dfaad5c6d80a", "name": "Accounts Payable", "value": 36981.83, "items": []}, {"accountId": "8852a857-aa9d-4706-839f-638e9d6b5a66", "name": "Unpaid Expense Claims", "value": 0, "items": []}, {"accountId": "3b58f7ff-fa16-453a-9931-f020816d76e7", "name": "Interest Payables", "value": 1193.59, "items": []}, {"accountId": "8636effc-50fb-45ba-8b2b-18336fa29b6b", "name": "John Smith", "value": 1147.11, "items": []}, {"accountId": "e2530acd-91c8-48f8-a35f-935dbd7432e2", "name": "Accruals", "value": 439935.82, "items": []}, {"accountId": "62060aae-e5a6-4db5-a3bb-6abec6d47959", "name": "Credit Card Control Account", "value": 28870.62, "items": []}]}, {"accountId": "", "name": "Long Term Liability", "value": 638999.6, "items": [{"accountId": "55008233-40e7-41ac-84af-2255fa028c2e", "name": "Loan", "value": 638999.6, "items": []}]}]}, "netAssets": 3460178.96, "equity": {"accountId": "", "name": "Equity", "value": 3460178.96, "items": [{"accountId": "39225d6f-3722-4508-ac3f-a2f6ec96ad31", "name": "Retained Earnings", "value": 3405201.39, "items": []}, {"accountId": "78828dd9-6008-4662-b43c-e9d87907fd2b", "name": "Current Year Earnings", "value": 54977.57, "items": []}]}}, {"date": "2023-02-28T00:00:00", "assets": {"accountId": "", "name": "Assets", "value": 4599890.71, "items": [{"accountId": "", "name": "Fixed Assets", "value": 3882793.51, "items": [{"accountId": "724ca578-8b5d-4bdb-ad45-e3820eee9de9", "name": "Office Equipment", "value": 2036803.36, "items": []}, {"accountId": "be3eb911-034b-42de-95db-0d58ac978b7f", "name": "Computer Equipment", "value": 1845990.15, "items": []}]}, {"accountId": "", "name": "Current Assets", "value": 717097.2, "items": [{"accountId": "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", "name": "Accounts Receivable", "value": 136245.44, "items": []}, {"accountId": "22de1660-d745-4809-a363-16b134607e66", "name": "Prepayments", "value": 18719.25, "items": []}, {"accountId": "e5d7612c-1671-47b4-b733-5db48363fcd0", "name": "Inventory", "value": 146898.62, "items": []}, {"accountId": "", "name": "Bank", "value": 415233.89, "items": [{"accountId": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account", "value": 415233.89, "items": []}]}]}]}, "liabilities": {"accountId": "", "name": "Liabilities", "value": 1150262.51, "items": [{"accountId": "", "name": "Current Liabilities", "value": 508579.57, "items": [{"accountId": "3a872b81-d1af-4d31-9bfa-a37280b8f68c", "name": "VAT", "value": 22517.83, "items": []}, {"accountId": "d19852a2-e292-4eb9-a909-9dadb95c0e76", "name": "Rounding", "value": 0, "items": []}, {"accountId": "9be6382f-6b33-402d-b448-0db1dbf67a98", "name": "Historical Adjustment", "value": 5994.86, "items": []}, {"accountId": "53bf27a7-7497-4c61-9887-dfaad5c6d80a", "name": "Accounts Payable", "value": 49993.06, "items": []}, {"accountId": "8852a857-aa9d-4706-839f-638e9d6b5a66", "name": "Unpaid Expense Claims", "value": 0, "items": []}, {"accountId": "3b58f7ff-fa16-453a-9931-f020816d76e7", "name": "Interest Payables", "value": 1424.88, "items": []}, {"accountId": "8636effc-50fb-45ba-8b2b-18336fa29b6b", "name": "John Smith", "value": 1863.01, "items": []}, {"accountId": "e2530acd-91c8-48f8-a35f-935dbd7432e2", "name": "Accruals", "value": 399839.88, "items": []}, {"accountId": "62060aae-e5a6-4db5-a3bb-6abec6d47959", "name": "Credit Card Control Account", "value": 26946.05, "items": []}]}, {"accountId": "", "name": "Long Term Liability", "value": 641682.94, "items": [{"accountId": "55008233-40e7-41ac-84af-2255fa028c2e", "name": "Loan", "value": 641682.94, "items": []}]}]}, "netAssets": 3449628.2, "equity": {"accountId": "", "name": "Equity", "value": 3449628.19, "items": [{"accountId": "39225d6f-3722-4508-ac3f-a2f6ec96ad31", "name": "Retained Earnings", "value": 3405201.39, "items": []}, {"accountId": "78828dd9-6008-4662-b43c-e9d87907fd2b", "name": "Current Year Earnings", "value": 44426.8, "items": []}]}}], "mostRecentAvailableMonth": "2023-03-31T00:00:00", "earliestAvailableMonth": "2018-04-01T00:00:00"} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2023-03-27T00:00:00", "assets": {"name": "Assets", "value": 260454.26, "items": [{"name": "", "value": 27.34, "items": [{"accountId": "c0861a65-c69f-ec11-80f1-0022481b4546", "name": "10 - Account no cat Balance Sheet", "value": 27.34, "items": []}, {"accountId": "9cc90e3e-843d-ed11-97e8-0022481b89f2", "name": "12345 - Income Statement and Asset", "value": 0, "items": []}]}, {"name": "Equipment", "value": 5504.37, "items": [{"accountId": "5b9782f7-0fe7-ec11-82f9-0022481afc56", "name": "1350 - Iana test", "value": 16, "items": []}, {"accountId": "6c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40800 - Equipment", "value": 5488.37, "items": []}]}, {"name": "Cash", "value": 36998.49, "items": [{"accountId": "5e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40100 - Checking account", "value": -35824.11, "items": []}, {"accountId": "601217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40200 - Savings account", "value": 2802.59, "items": []}, {"accountId": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40300 - Petty Cash", "value": 70020.01, "items": []}, {"accountId": "5c062318-3c59-ed11-8c36-002248c5e6c0", "name": "4544 - cash bal", "value": 0, "items": []}]}, {"name": "Accounts Receivable", "value": 189399.22, "items": [{"accountId": "641217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40400 - Accounts Receivable", "value": 129008.09, "items": []}, {"accountId": "9cb05c6f-9fbd-ed11-9a88-000d3a7ea13c", "name": "40450 - test3", "value": 0, "items": []}, {"accountId": "7a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46200 - Purchase VAT 20 % EU", "value": -11635.12, "items": []}, {"accountId": "7c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46210 - Purchase VAT 5 % EU", "value": 0, "items": []}, {"accountId": "7e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46300 - Purchase VAT 20 %", "value": 71992.44, "items": []}, {"accountId": "801217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46310 - Purchase VAT 5 %", "value": 9.35, "items": []}, {"accountId": "821217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46320 - Purchase Full VAT 5 %", "value": 10, "items": []}, {"accountId": "841217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46330 - Purchase Full VAT 20 %", "value": 14.46, "items": []}, {"accountId": "1bd1222e-94bd-ed11-9a88-6045bd0f961f", "name": "9999 - BaleSales", "value": 0, "items": []}]}, {"name": "Prepaid Expenses", "value": -1040, "items": [{"accountId": "661217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40500 - Prepaid Rent", "value": 0, "items": []}, {"accountId": "681217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40600 - Prepaid Insurance", "value": -1040, "items": []}, {"accountId": "781217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "41000 - Vendor Prepayments", "value": 0, "items": []}]}, {"name": "Inventory", "value": 26065.84, "items": [{"accountId": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40700 - Inventory", "value": 26065.84, "items": []}]}, {"name": "Accumulated Depreciation", "value": 3499, "items": [{"accountId": "6e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40900 - Accumulated Depreciation", "value": 3499, "items": []}]}, {"name": "Assets", "value": 0, "items": [{"accountId": "701217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40910 - WIP Job Sales", "value": 0, "items": []}, {"accountId": "721217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40920 - Invoiced Job Sales", "value": 0, "items": []}, {"accountId": "741217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40940 - Accrued Job Costs", "value": 0, "items": []}, {"accountId": "761217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40950 - WIP Job Costs", "value": 0, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 99721.85, "items": [{"name": "Current Liabilities", "value": 99735.85, "items": [{"accountId": "8a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50100 - Accounts Payable", "value": 42435.31, "items": []}, {"accountId": "8c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50200 - Purchase Discounts", "value": 210.22, "items": []}, {"accountId": "8e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50300 - Purchase Returns & Allowances", "value": 0, "items": []}, {"accountId": "901217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50400 - Deferred Revenue", "value": 0, "items": []}, {"accountId": "921217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50500 - Credit Cards", "value": 0, "items": []}, {"accountId": "9e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "52000 - Customer Prepayments", "value": 0, "items": []}, {"accountId": "a01217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56100 - Sales VAT 20 %", "value": 57906.98, "items": []}, {"accountId": "a21217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56110 - Sales VAT 5 %", "value": -816.66, "items": []}, {"accountId": "a41217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56120 - Sales Full VAT 5 %", "value": 0, "items": []}, {"accountId": "a61217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56130 - Sales Full VAT 20 %", "value": 0, "items": []}, {"accountId": "a81217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56140 - VAT Payable", "value": 0, "items": []}]}, {"name": "Payroll Liabilities", "value": -14, "items": [{"accountId": "941217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50700 - Accrued Salaries & Wages", "value": 0, "items": []}, {"accountId": "961217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "51400 - Employee Benefits Payable", "value": 0, "items": []}, {"accountId": "981217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "51500 - Holiday Compensation Payable", "value": 7, "items": []}, {"accountId": "9a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "51600 - Employees Payable", "value": -21, "items": []}]}, {"name": "Long Term Liabilities", "value": 0, "items": [{"accountId": "9c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "51900 - Notes Payable", "value": 0, "items": []}]}]}, "netAssets": 160732.41, "equity": {"name": "Equity", "value": 160732.41, "items": [{"name": "Common Stock", "value": 19988.72, "items": [{"accountId": "aa1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "60100 - Share Capital", "value": 19988.72, "items": []}]}, {"name": "Retained Earnings", "value": 69723.14, "items": [{"accountId": "ac1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "60200 - Retained Earnings", "value": 69723.14, "items": []}]}, {"name": "Dividends", "value": 0, "items": [{"accountId": "b01217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "60300 - Dividends", "value": 0, "items": []}]}, {"accountId": "NO-ID-EARNINGS-SO-FAR", "name": "Earnings so far", "value": 71020.55, "items": []}]}}, {"date": "2023-02-28T00:00:00", "assets": {"name": "Assets", "value": 262531.32, "items": [{"name": "", "value": 27.34, "items": [{"accountId": "c0861a65-c69f-ec11-80f1-0022481b4546", "name": "10 - Account no cat Balance Sheet", "value": 27.34, "items": []}, {"accountId": "9cc90e3e-843d-ed11-97e8-0022481b89f2", "name": "12345 - Income Statement and Asset", "value": 0, "items": []}]}, {"name": "Equipment", "value": 5504.37, "items": [{"accountId": "5b9782f7-0fe7-ec11-82f9-0022481afc56", "name": "1350 - Iana test", "value": 16, "items": []}, {"accountId": "6c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40800 - Equipment", "value": 5488.37, "items": []}]}, {"name": "Cash", "value": 37693.84, "items": [{"accountId": "5e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40100 - Checking account", "value": -35778.16, "items": []}, {"accountId": "601217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40200 - Savings account", "value": 2802.59, "items": []}, {"accountId": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40300 - Petty Cash", "value": 70669.41, "items": []}, {"accountId": "5c062318-3c59-ed11-8c36-002248c5e6c0", "name": "4544 - cash bal", "value": 0, "items": []}]}, {"name": "Accounts Receivable", "value": 188021.29, "items": [{"accountId": "641217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40400 - Accounts Receivable", "value": 127634.34, "items": []}, {"accountId": "9cb05c6f-9fbd-ed11-9a88-000d3a7ea13c", "name": "40450 - test3", "value": 0, "items": []}, {"accountId": "7a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46200 - Purchase VAT 20 % EU", "value": -11635.12, "items": []}, {"accountId": "7c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46210 - Purchase VAT 5 % EU", "value": 0, "items": []}, {"accountId": "7e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46300 - Purchase VAT 20 %", "value": 71988.26, "items": []}, {"accountId": "801217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46310 - Purchase VAT 5 %", "value": 9.35, "items": []}, {"accountId": "821217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46320 - Purchase Full VAT 5 %", "value": 10, "items": []}, {"accountId": "841217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "46330 - Purchase Full VAT 20 %", "value": 14.46, "items": []}, {"accountId": "1bd1222e-94bd-ed11-9a88-6045bd0f961f", "name": "9999 - BaleSales", "value": 0, "items": []}]}, {"name": "Prepaid Expenses", "value": -1040, "items": [{"accountId": "661217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40500 - Prepaid Rent", "value": 0, "items": []}, {"accountId": "681217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40600 - Prepaid Insurance", "value": -1040, "items": []}, {"accountId": "781217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "41000 - Vendor Prepayments", "value": 0, "items": []}]}, {"name": "Inventory", "value": 28825.48, "items": [{"accountId": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40700 - Inventory", "value": 28825.48, "items": []}]}, {"name": "Accumulated Depreciation", "value": 3499, "items": [{"accountId": "6e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40900 - Accumulated Depreciation", "value": 3499, "items": []}]}, {"name": "Assets", "value": 0, "items": [{"accountId": "701217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40910 - WIP Job Sales", "value": 0, "items": []}, {"accountId": "721217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40920 - Invoiced Job Sales", "value": 0, "items": []}, {"accountId": "741217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40940 - Accrued Job Costs", "value": 0, "items": []}, {"accountId": "761217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "40950 - WIP Job Costs", "value": 0, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 99680, "items": [{"name": "Current Liabilities", "value": 99694, "items": [{"accountId": "8a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50100 - Accounts Payable", "value": 42459.31, "items": []}, {"accountId": "8c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50200 - Purchase Discounts", "value": 210.22, "items": []}, {"accountId": "8e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50300 - Purchase Returns & Allowances", "value": 0, "items": []}, {"accountId": "901217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50400 - Deferred Revenue", "value": 0, "items": []}, {"accountId": "921217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50500 - Credit Cards", "value": 0, "items": []}, {"accountId": "9e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "52000 - Customer Prepayments", "value": 0, "items": []}, {"accountId": "a01217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56100 - Sales VAT 20 %", "value": 57841.13, "items": []}, {"accountId": "a21217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56110 - Sales VAT 5 %", "value": -816.66, "items": []}, {"accountId": "a41217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56120 - Sales Full VAT 5 %", "value": 0, "items": []}, {"accountId": "a61217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56130 - Sales Full VAT 20 %", "value": 0, "items": []}, {"accountId": "a81217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "56140 - VAT Payable", "value": 0, "items": []}]}, {"name": "Payroll Liabilities", "value": -14, "items": [{"accountId": "941217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "50700 - Accrued Salaries & Wages", "value": 0, "items": []}, {"accountId": "961217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "51400 - Employee Benefits Payable", "value": 0, "items": []}, {"accountId": "981217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "51500 - Holiday Compensation Payable", "value": 7, "items": []}, {"accountId": "9a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "51600 - Employees Payable", "value": -21, "items": []}]}, {"name": "Long Term Liabilities", "value": 0, "items": [{"accountId": "9c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "51900 - Notes Payable", "value": 0, "items": []}]}]}, "netAssets": 162851.32, "equity": {"name": "Equity", "value": 162851.32, "items": [{"name": "Common Stock", "value": 19988.72, "items": [{"accountId": "aa1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "60100 - Share Capital", "value": 19988.72, "items": []}]}, {"name": "Retained Earnings", "value": 69723.14, "items": [{"accountId": "ac1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "60200 - Retained Earnings", "value": 69723.14, "items": []}]}, {"name": "Dividends", "value": 0, "items": [{"accountId": "b01217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "60300 - Dividends", "value": 0, "items": []}]}, {"accountId": "NO-ID-EARNINGS-SO-FAR", "name": "Earnings so far", "value": 73139.46, "items": []}]}}], "mostRecentAvailableMonth": "2023-03-31T00:00:00", "earliestAvailableMonth": "2022-09-01T00:00:00"} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": []} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2022-10-31T00:00:00Z", "assets": {"name": "Assets", "value": -2, "items": [{"accountId": "cf9572e7-8afa-4339-9113-af32a66d9df9", "name": "15400 - Trade Debtors", "value": -3, "items": []}, {"accountId": "ba382d88-a4e5-4117-8fc6-4752ee8bc93d", "name": "15801 - Standard account", "value": 1, "items": []}]}, "liabilities": {"name": "Liabilities", "value": 0, "items": []}, "netAssets": -2, "equity": {"name": "Equities", "value": -2, "items": [{"accountId": "PROFIT-AND-LOSS", "name": "Profit for this period", "value": -2, "items": []}]}}, {"date": "2022-09-30T00:00:00Z", "assets": {"name": "Assets", "value": 208, "items": [{"accountId": "885ff551-664d-451b-995b-cb114c9877d0", "name": "15890 - Unallocated Cash", "value": 0, "items": []}, {"accountId": "cf9572e7-8afa-4339-9113-af32a66d9df9", "name": "15400 - Trade Debtors", "value": 78, "items": []}, {"accountId": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "15880 - Bank", "value": 130, "items": []}]}, "liabilities": {"name": "Liabilities", "value": 0, "items": [{"accountId": "88d733a8-51e1-4ee7-b2a0-fb49879e36cc", "name": "21000 - Trade Creditors", "value": 0, "items": []}]}, "netAssets": 208, "equity": {"name": "Equities", "value": 208, "items": [{"accountId": "PROFIT-AND-LOSS", "name": "Profit for this period", "value": 208, "items": []}]}}], "mostRecentAvailableMonth": "2022-10-31T00:00:00", "earliestAvailableMonth": "2022-04-01T00:00:00"} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2023-04-30T00:00:00", "assets": {"name": "assets", "value": 38416.28, "items": [{"accountId": "167679", "name": "Cash", "value": -3011.5, "items": [{"accountId": "291721", "name": "Petty Cash", "value": -3022.5, "items": []}, {"accountId": "3427097", "name": "Cash", "value": 11, "items": []}]}, {"accountId": "67357", "name": "Accounts Receivable", "value": 41445.53, "items": [{"accountId": "128611", "name": "Accounts Receivable", "value": 41445.53, "items": []}]}, {"accountId": "2761661", "name": "Current Asset", "value": -11, "items": [{"accountId": "3420060", "name": "Prepaid Expenses", "value": -11, "items": []}]}, {"accountId": "2288207", "name": "Property, Plant, and Equipment", "value": -6.75, "items": [{"accountId": "2792069", "name": "Office Equipment", "value": -6.75, "items": []}]}]}, "liabilities": {"name": "liabilities", "value": 9310.72, "items": [{"accountId": "2288209", "name": "Accounts Payable", "value": 460.39, "items": [{"accountId": "3385145", "name": "Accounts Payable", "value": 460.39, "items": []}]}, {"accountId": "67361", "name": "Taxes Payable", "value": 36.75, "items": [{"accountId": "128615", "name": "VAT", "value": -108.9, "items": []}, {"accountId": "3380553", "name": "Customs Duty", "value": -2.5, "items": []}, {"accountId": "3380555", "name": "Excise Duty", "value": -54.45, "items": []}, {"accountId": "3384241", "name": "tax 50", "value": 0.7, "items": []}, {"accountId": "3384293", "name": "helloabdul", "value": 86.03, "items": []}, {"accountId": "3384425", "name": "hello2", "value": 114.76, "items": []}, {"accountId": "3420099", "name": "VAT1", "value": 1.11, "items": []}]}, {"accountId": "237025", "name": "Customer Credit", "value": 8813.58, "items": [{"accountId": "392937", "name": "Customer Credit", "value": 8813.58, "items": []}]}]}, "netAssets": 29105.56, "equity": {"name": "equity", "value": 29105.56, "items": [{"accountId": "", "name": "Net Income", "value": 29105.56, "items": []}]}}, {"date": "2023-03-31T00:00:00", "assets": {"name": "assets", "value": 38416.28, "items": [{"accountId": "167679", "name": "Cash", "value": -3011.5, "items": [{"accountId": "291721", "name": "Petty Cash", "value": -3022.5, "items": []}, {"accountId": "3427097", "name": "Cash", "value": 11, "items": []}]}, {"accountId": "67357", "name": "Accounts Receivable", "value": 41445.53, "items": [{"accountId": "128611", "name": "Accounts Receivable", "value": 41445.53, "items": []}]}, {"accountId": "2761661", "name": "Current Asset", "value": -11, "items": [{"accountId": "3420060", "name": "Prepaid Expenses", "value": -11, "items": []}]}, {"accountId": "2288207", "name": "Property, Plant, and Equipment", "value": -6.75, "items": [{"accountId": "2792069", "name": "Office Equipment", "value": -6.75, "items": []}]}]}, "liabilities": {"name": "liabilities", "value": 9310.72, "items": [{"accountId": "2288209", "name": "Accounts Payable", "value": 460.39, "items": [{"accountId": "3385145", "name": "Accounts Payable", "value": 460.39, "items": []}]}, {"accountId": "67361", "name": "Taxes Payable", "value": 36.75, "items": [{"accountId": "128615", "name": "VAT", "value": -108.9, "items": []}, {"accountId": "3380553", "name": "Customs Duty", "value": -2.5, "items": []}, {"accountId": "3380555", "name": "Excise Duty", "value": -54.45, "items": []}, {"accountId": "3384241", "name": "tax 50", "value": 0.7, "items": []}, {"accountId": "3384293", "name": "helloabdul", "value": 86.03, "items": []}, {"accountId": "3384425", "name": "hello2", "value": 114.76, "items": []}, {"accountId": "3420099", "name": "VAT1", "value": 1.11, "items": []}]}, {"accountId": "237025", "name": "Customer Credit", "value": 8813.58, "items": [{"accountId": "392937", "name": "Customer Credit", "value": 8813.58, "items": []}]}]}, "netAssets": 29105.56, "equity": {"name": "equity", "value": 29105.56, "items": [{"accountId": "", "name": "Net Income", "value": 29105.56, "items": []}]}}], "mostRecentAvailableMonth": "2023-04-30T00:00:00", "earliestAvailableMonth": "2022-10-01T00:00:00"} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2022-09-30T00:00:00", "assets": {"name": "Assets", "value": 109979.14, "items": [{"name": "Fixed Assets", "value": 923.62, "items": [{"accountId": "29362903", "name": "FIXED ASSET CODE (SALES)", "value": -100, "items": []}, {"accountId": "29362906", "name": "FIXED ASSET CODE (OUTGOING)", "value": 1006, "items": []}, {"accountId": "29358753", "name": "TESTCODE", "value": 9.29, "items": []}, {"accountId": "21481884", "name": "Computer equipment cost", "value": 8.33, "items": []}]}, {"name": "Current Assets", "value": 109055.52, "items": [{"accountId": "21481886", "name": "Trade debtors", "value": 67166.51, "items": []}, {"accountId": "636062", "name": "Current account", "value": 425.33, "items": []}, {"accountId": "680495", "name": "Test Account", "value": 38003, "items": []}, {"accountId": "684416", "name": "Tide Account 2", "value": 303.22, "items": []}, {"accountId": "684418", "name": "New Tide Account", "value": 303.22, "items": []}, {"accountId": "686687", "name": "Pete Test 02/05", "value": 301.64, "items": []}, {"accountId": "696204", "name": "Go Live", "value": 9, "items": []}, {"accountId": "696740", "name": "Production Test", "value": 0.08, "items": []}, {"accountId": "707236", "name": "Dave Push Test uat", "value": 123.41, "items": []}, {"accountId": "707240", "name": "Dave Push Test integ", "value": 139.54, "items": []}, {"accountId": "813944", "name": "Please dont balance", "value": 110, "items": []}, {"accountId": "765768", "name": "16th Account", "value": 326, "items": []}, {"accountId": "809283", "name": "abduls company credit card", "value": 13.85, "items": []}, {"accountId": "809318", "name": "ASSET ACCOUNT", "value": 110, "items": []}, {"accountId": "776582", "name": "VandanaKasAcc1", "value": 20, "items": []}, {"accountId": "780580", "name": "ABRAHAM2", "value": 40, "items": []}, {"accountId": "780605", "name": "AbeVanTest3", "value": 10, "items": []}, {"accountId": "780619", "name": "VandanaAccTest4", "value": 92.63, "items": []}, {"accountId": "780669", "name": "NewXeroAccount10", "value": 21, "items": []}, {"accountId": "780672", "name": "NewKasAccount10", "value": 111, "items": []}, {"accountId": "809742", "name": "HSBBBBB", "value": 111, "items": []}, {"accountId": "833089", "name": "AAAAA", "value": 260, "items": []}, {"accountId": "21481890", "name": "Output VAT", "value": 511.04, "items": []}, {"accountId": "21481891", "name": "Input VAT", "value": 504.05, "items": []}, {"accountId": "21481895", "name": "CIS deductions", "value": 40, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 80187.1, "items": [{"name": "Current Liabilities", "value": 80187.1, "items": [{"accountId": "21481902", "name": "Other", "value": 43799.56, "items": []}, {"accountId": "21481888", "name": "Cash in hand", "value": 317.07, "items": []}, {"accountId": "612964", "name": "Bank account", "value": 33011.08, "items": []}, {"accountId": "687106", "name": "May 4th Account", "value": 926.81, "items": []}, {"accountId": "21481892", "name": "VAT control account", "value": 322, "items": []}, {"accountId": "21481893", "name": "Trade creditors", "value": 1618.27, "items": []}, {"accountId": "29553868", "name": "Creditors Control Account", "value": 192.31, "items": []}]}]}, "netAssets": 29792.04, "equity": {"name": "Equity", "value": 29792.05, "items": [{"name": "Capital and Reserves", "value": 29792.05, "items": [{"accountId": "21481901", "name": "Retained profit/loss", "value": 31402.01, "items": []}, {"accountId": "0", "name": "P&L Account", "value": -1609.96, "items": []}]}]}}, {"date": "2022-08-31T00:00:00", "assets": {"name": "Assets", "value": 109979.14, "items": [{"name": "Fixed Assets", "value": 923.62, "items": [{"accountId": "29362903", "name": "FIXED ASSET CODE (SALES)", "value": -100, "items": []}, {"accountId": "29362906", "name": "FIXED ASSET CODE (OUTGOING)", "value": 1006, "items": []}, {"accountId": "29358753", "name": "TESTCODE", "value": 9.29, "items": []}, {"accountId": "21481884", "name": "Computer equipment cost", "value": 8.33, "items": []}]}, {"name": "Current Assets", "value": 109055.52, "items": [{"accountId": "21481886", "name": "Trade debtors", "value": 67166.51, "items": []}, {"accountId": "636062", "name": "Current account", "value": 425.33, "items": []}, {"accountId": "680495", "name": "Test Account", "value": 38003, "items": []}, {"accountId": "684416", "name": "Tide Account 2", "value": 303.22, "items": []}, {"accountId": "684418", "name": "New Tide Account", "value": 303.22, "items": []}, {"accountId": "686687", "name": "Pete Test 02/05", "value": 301.64, "items": []}, {"accountId": "696204", "name": "Go Live", "value": 9, "items": []}, {"accountId": "696740", "name": "Production Test", "value": 0.08, "items": []}, {"accountId": "707236", "name": "Dave Push Test uat", "value": 123.41, "items": []}, {"accountId": "707240", "name": "Dave Push Test integ", "value": 139.54, "items": []}, {"accountId": "813944", "name": "Please dont balance", "value": 110, "items": []}, {"accountId": "765768", "name": "16th Account", "value": 326, "items": []}, {"accountId": "809283", "name": "abduls company credit card", "value": 13.85, "items": []}, {"accountId": "809318", "name": "ASSET ACCOUNT", "value": 110, "items": []}, {"accountId": "776582", "name": "VandanaKasAcc1", "value": 20, "items": []}, {"accountId": "780580", "name": "ABRAHAM2", "value": 40, "items": []}, {"accountId": "780605", "name": "AbeVanTest3", "value": 10, "items": []}, {"accountId": "780619", "name": "VandanaAccTest4", "value": 92.63, "items": []}, {"accountId": "780669", "name": "NewXeroAccount10", "value": 21, "items": []}, {"accountId": "780672", "name": "NewKasAccount10", "value": 111, "items": []}, {"accountId": "809742", "name": "HSBBBBB", "value": 111, "items": []}, {"accountId": "833089", "name": "AAAAA", "value": 260, "items": []}, {"accountId": "21481890", "name": "Output VAT", "value": 511.04, "items": []}, {"accountId": "21481891", "name": "Input VAT", "value": 504.05, "items": []}, {"accountId": "21481895", "name": "CIS deductions", "value": 40, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 80187.1, "items": [{"name": "Current Liabilities", "value": 80187.1, "items": [{"accountId": "21481902", "name": "Other", "value": 43799.56, "items": []}, {"accountId": "21481888", "name": "Cash in hand", "value": 317.07, "items": []}, {"accountId": "612964", "name": "Bank account", "value": 33011.08, "items": []}, {"accountId": "687106", "name": "May 4th Account", "value": 926.81, "items": []}, {"accountId": "21481892", "name": "VAT control account", "value": 322, "items": []}, {"accountId": "21481893", "name": "Trade creditors", "value": 1618.27, "items": []}, {"accountId": "29553868", "name": "Creditors Control Account", "value": 192.31, "items": []}]}]}, "netAssets": 29792.04, "equity": {"name": "Equity", "value": 29792.05, "items": [{"name": "Capital and Reserves", "value": 29792.05, "items": [{"accountId": "21481901", "name": "Retained profit/loss", "value": 31402.01, "items": []}, {"accountId": "0", "name": "P&L Account", "value": -1609.96, "items": []}]}]}}], "mostRecentAvailableMonth": "2022-09-30T00:00:00", "earliestAvailableMonth": "2022-03-01T00:00:00"} - MYOB AccountRight and Essentials: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2022-11-30T00:00:00", "assets": {"name": "Assets", "value": 0, "items": []}, "liabilities": {"name": "Liabilities", "value": 0, "items": []}, "netAssets": 0, "equity": {"name": "Equity", "value": 0, "items": []}}, {"date": "2022-10-31T00:00:00", "assets": {"name": "Assets", "value": 0, "items": []}, "liabilities": {"name": "Liabilities", "value": 0, "items": []}, "netAssets": 0, "equity": {"name": "Equity", "value": 0, "items": []}}], "mostRecentAvailableMonth": "2022-11-30T00:00:00", "earliestAvailableMonth": "2022-05-01T00:00:00"} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2023-05-31T00:00:00", "assets": {"accountId": "", "name": "Assets", "value": 703, "items": [{"accountId": "119", "name": "Accounts Receivable", "value": -565, "items": []}, {"accountId": "122", "name": "Undeposited Funds", "value": 10, "items": []}, {"accountId": "211", "name": "VAT on Purchases", "value": 24, "items": []}, {"accountId": "716", "name": "Inventory In Transit", "value": 120, "items": []}, {"accountId": "825", "name": "Codat Europe Bank", "value": 558.22, "items": [{"accountId": "825", "name": "Codat Europe Bank", "value": 558.22, "items": []}]}, {"accountId": "844", "name": "Asset account test 2", "value": 555.78, "items": [{"accountId": "844", "name": "Asset account test 2", "value": 555.78, "items": []}]}]}, "liabilities": {"accountId": "", "name": "Liabilities", "value": 635.55, "items": [{"accountId": "111", "name": "Accounts Payable", "value": 635.55, "items": [{"accountId": "111", "name": "Accounts Payable", "value": 635.55, "items": []}]}]}, "netAssets": 67.45, "equity": {"accountId": "", "name": "Equity", "value": 67.45, "items": [{"accountId": "851", "name": "Demo account equity", "value": -11, "items": []}, {"name": "Net Income", "value": 78.45, "items": []}]}}, {"date": "2023-04-30T00:00:00", "assets": {"accountId": "", "name": "Assets", "value": 703, "items": [{"accountId": "119", "name": "Accounts Receivable", "value": -565, "items": []}, {"accountId": "122", "name": "Undeposited Funds", "value": 10, "items": []}, {"accountId": "211", "name": "VAT on Purchases", "value": 24, "items": []}, {"accountId": "716", "name": "Inventory In Transit", "value": 120, "items": []}, {"accountId": "825", "name": "Codat Europe Bank", "value": 558.22, "items": [{"accountId": "825", "name": "Codat Europe Bank", "value": 558.22, "items": []}]}, {"accountId": "844", "name": "Asset account test 2", "value": 555.78, "items": [{"accountId": "844", "name": "Asset account test 2", "value": 555.78, "items": []}]}]}, "liabilities": {"accountId": "", "name": "Liabilities", "value": 635.55, "items": [{"accountId": "111", "name": "Accounts Payable", "value": 635.55, "items": [{"accountId": "111", "name": "Accounts Payable", "value": 635.55, "items": []}]}]}, "netAssets": 67.45, "equity": {"accountId": "", "name": "Equity", "value": 67.45, "items": [{"accountId": "851", "name": "Demo account equity", "value": -11, "items": []}, {"name": "Net Income", "value": 78.45, "items": []}]}}], "mostRecentAvailableMonth": "2023-05-31T00:00:00", "earliestAvailableMonth": "2022-11-01T00:00:00"} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2023-04-30T00:00:00", "assets": {"name": "ASSETS", "value": 549695.86, "items": [{"name": "Current Assets", "value": 81821.64, "items": [{"name": "Checking/Savings", "value": 57007.53, "items": [{"accountId": "20000-933270541", "name": "10100 � Checking", "value": 40814.11, "items": []}, {"accountId": "30000-933270541", "name": "10300 � Savings", "value": 15693.42, "items": []}, {"accountId": "550001-1071509830", "name": "10400 � Petty Cash", "value": 500, "items": []}]}, {"name": "Accounts Receivable", "value": 7719.99, "items": [{"accountId": "40000-933270541", "name": "11000 � Accounts Receivable", "value": 7719.99, "items": []}]}, {"name": "Other Current Assets", "value": 17094.12, "items": [{"accountId": "60000-933270541", "name": "12100 � Inventory Asset", "value": 13177.4, "items": []}, {"accountId": "50000-933270541", "name": "12800 � Employee Advances", "value": 770, "items": []}, {"accountId": "370001-1071514466", "name": "13100 � Pre-paid Insurance", "value": 1350, "items": []}, {"accountId": "70000-933270541", "name": "13400 � Retainage Receivable", "value": 1796.72, "items": []}]}]}, {"name": "Fixed Assets", "value": 466154.22, "items": [{"accountId": "5F0000-1197755449", "name": "15000 � Furniture and Equipment", "value": 22826, "items": []}, {"accountId": "90000-933270541", "name": "15100 � Vehicles", "value": 78936.91, "items": []}, {"accountId": "600000-1197756365", "name": "15200 � Buildings and Improvements", "value": 325000, "items": []}, {"accountId": "590000-1071511920", "name": "15300 � Construction Equipment", "value": 15300, "items": []}, {"accountId": "610000-1197756496", "name": "16900 � Land", "value": 90000, "items": []}, {"accountId": "620000-1197756666", "name": "17000 � Accumulated Depreciation", "value": -65908.69, "items": []}]}, {"name": "Other Assets", "value": 1720, "items": [{"accountId": "80000063-1197709076", "name": "18700 � Security Deposits", "value": 1720, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 451499.2, "items": [{"name": "Current Liabilities", "value": 6718.02, "items": [{"name": "Accounts Payable", "value": 5000, "items": [{"accountId": "C0000-933270541", "name": "20000 � Accounts Payable", "value": 5000, "items": []}]}, {"name": "Credit Cards", "value": 1400, "items": [{"accountId": "570000-1071509253", "name": "20500 � QuickBooks Credit Card", "value": 1400, "items": []}]}, {"name": "Other Current Liabilities", "value": 318.02, "items": [{"accountId": "100000-933270541", "name": "25500 � Sales Tax Payable", "value": 318.02, "items": []}]}]}, {"name": "Long Term Liabilities", "value": 444781.18, "items": [{"accountId": "120000-933270541", "name": "23000 � Loan - Vehicles (Van)", "value": 19932.64, "items": []}, {"accountId": "80000075-1197719780", "name": "23100 � Loan - Vehicles (Utility Truck)", "value": 19936.91, "items": []}, {"accountId": "80000076-1197719828", "name": "23200 � Loan - Vehicles (Pickup Truck)", "value": 22641, "items": []}, {"accountId": "5B0000-1197774305", "name": "28100 � Loan - Construction Equipment", "value": 14343.11, "items": []}, {"accountId": "80000068-1197710590", "name": "28200 � Loan - Furniture/Office Equip", "value": 21000, "items": []}, {"accountId": "8000008F-1197954502", "name": "28700 � Note Payable - Bank of Anycity", "value": 50644.52, "items": []}, {"accountId": "80000067-1197709946", "name": "28900 � Mortgage - Office Building", "value": 296283, "items": []}]}]}, "netAssets": 98196.66, "equity": {"name": "Equity", "value": 98196.66, "items": [{"accountId": "10000-933270541", "name": "30000 � Opening Bal Equity", "value": 38773.75, "items": []}, {"accountId": "80000066-1197709715", "name": "30100 � Capital Stock", "value": 500, "items": []}, {"accountId": "160000-933270541", "name": "32000 � Retained Earnings", "value": 36213.97, "items": []}, {"name": "Net Income", "value": 22708.94, "items": []}]}}, {"date": "2023-03-31T00:00:00", "assets": {"name": "ASSETS", "value": 547971.05, "items": [{"name": "Current Assets", "value": 80096.83, "items": [{"name": "Checking/Savings", "value": 45769.39, "items": [{"accountId": "20000-933270541", "name": "10100 � Checking", "value": 29575.97, "items": []}, {"accountId": "30000-933270541", "name": "10300 � Savings", "value": 15693.42, "items": []}, {"accountId": "550001-1071509830", "name": "10400 � Petty Cash", "value": 500, "items": []}]}, {"name": "Accounts Receivable", "value": 16228.47, "items": [{"accountId": "40000-933270541", "name": "11000 � Accounts Receivable", "value": 16228.47, "items": []}]}, {"name": "Other Current Assets", "value": 18098.97, "items": [{"accountId": "60000-933270541", "name": "12100 � Inventory Asset", "value": 13507.25, "items": []}, {"accountId": "50000-933270541", "name": "12800 � Employee Advances", "value": 770, "items": []}, {"accountId": "370001-1071514466", "name": "13100 � Pre-paid Insurance", "value": 2025, "items": []}, {"accountId": "70000-933270541", "name": "13400 � Retainage Receivable", "value": 1796.72, "items": []}]}]}, {"name": "Fixed Assets", "value": 466154.22, "items": [{"accountId": "5F0000-1197755449", "name": "15000 � Furniture and Equipment", "value": 22826, "items": []}, {"accountId": "90000-933270541", "name": "15100 � Vehicles", "value": 78936.91, "items": []}, {"accountId": "600000-1197756365", "name": "15200 � Buildings and Improvements", "value": 325000, "items": []}, {"accountId": "590000-1071511920", "name": "15300 � Construction Equipment", "value": 15300, "items": []}, {"accountId": "610000-1197756496", "name": "16900 � Land", "value": 90000, "items": []}, {"accountId": "620000-1197756666", "name": "17000 � Accumulated Depreciation", "value": -65908.69, "items": []}]}, {"name": "Other Assets", "value": 1720, "items": [{"accountId": "80000063-1197709076", "name": "18700 � Security Deposits", "value": 1720, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 453300.75, "items": [{"name": "Current Liabilities", "value": 5714, "items": [{"name": "Accounts Payable", "value": 5714, "items": [{"accountId": "C0000-933270541", "name": "20000 � Accounts Payable", "value": 5714, "items": []}]}]}, {"name": "Long Term Liabilities", "value": 447586.75, "items": [{"accountId": "120000-933270541", "name": "23000 � Loan - Vehicles (Van)", "value": 20376.27, "items": []}, {"accountId": "80000075-1197719780", "name": "23100 � Loan - Vehicles (Utility Truck)", "value": 19936.91, "items": []}, {"accountId": "80000076-1197719828", "name": "23200 � Loan - Vehicles (Pickup Truck)", "value": 22641, "items": []}, {"accountId": "5B0000-1197774305", "name": "28100 � Loan - Construction Equipment", "value": 14343.11, "items": []}, {"accountId": "80000068-1197710590", "name": "28200 � Loan - Furniture/Office Equip", "value": 21000, "items": []}, {"accountId": "8000008F-1197954502", "name": "28700 � Note Payable - Bank of Anycity", "value": 53006.46, "items": []}, {"accountId": "80000067-1197709946", "name": "28900 � Mortgage - Office Building", "value": 296283, "items": []}]}]}, "netAssets": 94670.3, "equity": {"name": "Equity", "value": 94670.3, "items": [{"accountId": "10000-933270541", "name": "30000 � Opening Bal Equity", "value": 38773.75, "items": []}, {"accountId": "80000066-1197709715", "name": "30100 � Capital Stock", "value": 500, "items": []}, {"accountId": "160000-933270541", "name": "32000 � Retained Earnings", "value": 36213.97, "items": []}, {"name": "Net Income", "value": 19182.58, "items": []}]}}], "mostRecentAvailableMonth": "2023-04-30T00:00:00", "earliestAvailableMonth": "2022-10-01T00:00:00"} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2023-04-30T00:00:00", "assets": {"name": "Assets", "value": 3856584.88, "items": [{"name": "Fixed Asset", "value": 2766.17, "items": [{"accountId": "3", "name": "Accumulated Depreciation", "value": -399.96, "items": []}, {"accountId": "5", "name": "Furniture and Equipment", "value": 2750, "items": []}, {"accountId": "7", "name": "Leasehold Improvements", "value": -99.12, "items": []}, {"accountId": "9", "name": "Vehicles", "value": 515.25, "items": []}]}, {"name": "Bank", "value": 520021.91, "items": [{"accountId": "114", "name": "0983741 SamplePushBankAccount2", "value": 40.5, "items": []}, {"accountId": "175", "name": "1 Push-FrontDoor-Test-1", "value": 112, "items": []}, {"accountId": "134", "name": "1001001 Revenue", "value": -235.34, "items": []}, {"accountId": "110", "name": "101 Push Refactor Test", "value": -149.4, "items": []}, {"accountId": "102", "name": "10101 IntegrationTest", "value": -1444.14, "items": []}, {"accountId": "103", "name": "101011 testdemo1", "value": 18.6, "items": []}, {"accountId": "104", "name": "101012 Dave Test", "value": -5.4, "items": []}, {"accountId": "105", "name": "101013 Push Test", "value": 5.4, "items": []}, {"accountId": "107", "name": "11 aaa", "value": 23610.49, "items": []}, {"accountId": "115", "name": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "value": -9000.81, "items": []}, {"accountId": "100", "name": "1131 Savings2", "value": 30281.54, "items": []}, {"accountId": "109", "name": "122 Generic Push Test", "value": -1079.05, "items": []}, {"accountId": "101", "name": "123 Test Savings", "value": 2293.37, "items": []}, {"accountId": "111", "name": "123123 Steve Test", "value": -1104.2, "items": []}, {"accountId": "124", "name": "123175 Nominal Card", "value": -2013.04, "items": []}, {"accountId": "137", "name": "1232 test 55", "value": 1.29, "items": []}, {"accountId": "122", "name": "1234567 Card3million", "value": -85, "items": []}, {"accountId": "176", "name": "12345671 testName_1", "value": 17546.08, "items": []}, {"accountId": "165", "name": "123564 Huws testing name", "value": -2, "items": []}, {"accountId": "159", "name": "1533465364 Huws test name", "value": 282.21, "items": []}, {"accountId": "161", "name": "160894 Tom Automated Tests ExpensesAccount", "value": -15900.6, "items": []}, {"accountId": "108", "name": "19191 New Push Operation Test", "value": 317.54, "items": []}, {"accountId": "139", "name": "2501 Barclays", "value": 211127.4, "items": []}, {"accountId": "140", "name": "2502 HSBC", "value": 109500.4, "items": []}, {"accountId": "141", "name": "2503 BoA", "value": 128050.89, "items": []}, {"accountId": "138", "name": "4234 test55", "value": -29.28, "items": []}, {"accountId": "106", "name": "aa aa", "value": -5.4, "items": []}, {"accountId": "129", "name": "Account Test 11", "value": 33.93, "items": []}, {"accountId": "147", "name": "Bank EUR", "value": 188.5, "items": []}, {"accountId": "173", "name": "Cash on hand", "value": 2655, "items": []}, {"accountId": "178", "name": "Citi", "value": 189.11, "items": []}, {"accountId": "81", "name": "Current", "value": 24513.64, "items": []}, {"accountId": "177", "name": "HSBC HKD", "value": -39.39, "items": []}, {"accountId": "169", "name": "Matt Ager Test UI Parent Account", "value": 75, "items": []}, {"accountId": "89", "name": "TestBankAccount_1", "value": 272.07, "items": []}]}, {"name": "Accounts Receivable", "value": 3074459.19, "items": [{"accountId": "70", "name": "Debtors", "value": 3041138.07, "items": []}, {"accountId": "80", "name": "Debtors - USD", "value": 33315.2, "items": []}, {"accountId": "125", "name": "Debtors 2", "value": -7.45, "items": []}, {"accountId": "88", "name": "TestBankAccount", "value": 13.37, "items": []}]}, {"name": "Other Current Asset", "value": 259337.61, "items": [{"accountId": "98", "name": "Account_001", "value": 545.86, "items": []}, {"accountId": "185", "name": "Loans To Officers", "value": 1200, "items": []}, {"accountId": "179", "name": "Loans to Others", "value": 58.2, "items": []}, {"accountId": "171", "name": "Matt Ager Test UI Parent Account 1", "value": 11, "items": []}, {"accountId": "168", "name": "Other current assets", "value": 10, "items": []}, {"accountId": "65", "name": "Stock Asset", "value": 36524, "items": []}, {"accountId": "150", "name": "stock test", "value": 10, "items": []}, {"accountId": "77", "name": "Uncategorised Asset", "value": 47.8, "items": []}, {"accountId": "85", "name": "Undeposited Funds", "value": 220930.75, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 169469.71, "items": [{"name": "Accounts Payable", "value": 93748.74, "items": [{"accountId": "71", "name": "Creditors", "value": 93635.4, "items": []}, {"accountId": "74", "name": "Creditors - HKD", "value": 113.34, "items": []}]}, {"name": "Credit Card", "value": 10841.34, "items": [{"accountId": "142", "name": "2504 Amex - CC", "value": 9957.72, "items": []}, {"accountId": "126", "name": "Credit Card 2", "value": -71.91, "items": []}, {"accountId": "183", "name": "Expense Automated Tests Credit Card", "value": -2469.91, "items": []}, {"accountId": "57", "name": "Visa Credit Card", "value": 3425.44, "items": []}]}, {"name": "Other Current Liability", "value": 10001.33, "items": [{"accountId": "118", "name": "Current Liabilities", "value": 82.12, "items": []}, {"accountId": "157", "name": "Loan Payable - Kay's Bank", "value": 12726, "items": []}, {"accountId": "187", "name": "Payroll Clearing", "value": -3458.3, "items": []}, {"accountId": "53", "name": "VAT Control", "value": -4738.49, "items": []}, {"accountId": "54", "name": "VAT Suspense", "value": 5390, "items": []}]}, {"name": "Long Term Liability", "value": 54878.3, "items": [{"accountId": "158", "name": "Loan Long term borrowings - Jay's Bank", "value": 35630, "items": []}, {"accountId": "84", "name": "Long term borrowings", "value": -1100, "items": []}, {"accountId": "63", "name": "Note Payable", "value": 19348.3, "items": []}, {"accountId": "86", "name": "Accruals and deferred income", "value": 1000, "items": []}]}]}, "netAssets": 3687115.17, "equity": {"name": "Equity", "value": 3687115.17, "items": [{"name": "Equity", "value": 3697585.43, "items": [{"accountId": "55", "name": "Opening Balance Equity", "value": 966720.56, "items": []}, {"accountId": "2", "name": "Retained Earnings", "value": 2706364.87, "items": []}, {"accountId": "61", "name": "Owner's Equity - Contributions", "value": 25500, "items": []}, {"accountId": "62", "name": "Owner's Equity - Draws", "value": -1000, "items": []}]}, {"name": "Profit for the year", "value": -10470.26, "items": []}]}}, {"date": "2023-03-31T00:00:00", "assets": {"name": "Assets", "value": 4385453.25, "items": [{"name": "Fixed Asset", "value": 2766.17, "items": [{"accountId": "3", "name": "Accumulated Depreciation", "value": -399.96, "items": []}, {"accountId": "5", "name": "Furniture and Equipment", "value": 2750, "items": []}, {"accountId": "7", "name": "Leasehold Improvements", "value": -99.12, "items": []}, {"accountId": "9", "name": "Vehicles", "value": 515.25, "items": []}]}, {"name": "Bank", "value": 1048102.14, "items": [{"accountId": "114", "name": "0983741 SamplePushBankAccount2", "value": 40.5, "items": []}, {"accountId": "175", "name": "1 Push-FrontDoor-Test-1", "value": 112, "items": []}, {"accountId": "134", "name": "1001001 Revenue", "value": -235.34, "items": []}, {"accountId": "110", "name": "101 Push Refactor Test", "value": -149.4, "items": []}, {"accountId": "102", "name": "10101 IntegrationTest", "value": -1444.14, "items": []}, {"accountId": "103", "name": "101011 testdemo1", "value": 18.6, "items": []}, {"accountId": "104", "name": "101012 Dave Test", "value": -5.4, "items": []}, {"accountId": "105", "name": "101013 Push Test", "value": 5.4, "items": []}, {"accountId": "107", "name": "11 aaa", "value": 23610.49, "items": []}, {"accountId": "115", "name": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "value": -9000.81, "items": []}, {"accountId": "100", "name": "1131 Savings2", "value": 30281.54, "items": []}, {"accountId": "109", "name": "122 Generic Push Test", "value": -1079.05, "items": []}, {"accountId": "101", "name": "123 Test Savings", "value": 2293.37, "items": []}, {"accountId": "111", "name": "123123 Steve Test", "value": -1104.2, "items": []}, {"accountId": "124", "name": "123175 Nominal Card", "value": -2013.04, "items": []}, {"accountId": "137", "name": "1232 test 55", "value": 1.29, "items": []}, {"accountId": "122", "name": "1234567 Card3million", "value": -85, "items": []}, {"accountId": "176", "name": "12345671 testName_1", "value": 14029.28, "items": []}, {"accountId": "165", "name": "123564 Huws testing name", "value": -2, "items": []}, {"accountId": "159", "name": "1533465364 Huws test name", "value": 282.21, "items": []}, {"accountId": "161", "name": "160894 Tom Automated Tests ExpensesAccount", "value": -11410.5, "items": []}, {"accountId": "108", "name": "19191 New Push Operation Test", "value": 317.54, "items": []}, {"accountId": "139", "name": "2501 Barclays", "value": 741293.8, "items": []}, {"accountId": "140", "name": "2502 HSBC", "value": 109155.93, "items": []}, {"accountId": "141", "name": "2503 BoA", "value": 128055.89, "items": []}, {"accountId": "138", "name": "4234 test55", "value": -14.28, "items": []}, {"accountId": "106", "name": "aa aa", "value": -5.4, "items": []}, {"accountId": "129", "name": "Account Test 11", "value": 33.93, "items": []}, {"accountId": "147", "name": "Bank EUR", "value": 188.5, "items": []}, {"accountId": "173", "name": "Cash on hand", "value": -5, "items": []}, {"accountId": "178", "name": "Citi", "value": 189.11, "items": []}, {"accountId": "81", "name": "Current", "value": 24438.64, "items": []}, {"accountId": "177", "name": "HSBC HKD", "value": -39.39, "items": []}, {"accountId": "169", "name": "Matt Ager Test UI Parent Account", "value": 75, "items": []}, {"accountId": "89", "name": "TestBankAccount_1", "value": 272.07, "items": []}]}, {"name": "Accounts Receivable", "value": 3075173.68, "items": [{"accountId": "70", "name": "Debtors", "value": 3041854.11, "items": []}, {"accountId": "80", "name": "Debtors - USD", "value": 33315.2, "items": []}, {"accountId": "125", "name": "Debtors 2", "value": -9, "items": []}, {"accountId": "88", "name": "TestBankAccount", "value": 13.37, "items": []}]}, {"name": "Other Current Asset", "value": 259411.26, "items": [{"accountId": "98", "name": "Account_001", "value": 545.86, "items": []}, {"accountId": "185", "name": "Loans To Officers", "value": 1200, "items": []}, {"accountId": "179", "name": "Loans to Others", "value": 58.2, "items": []}, {"accountId": "171", "name": "Matt Ager Test UI Parent Account 1", "value": 11, "items": []}, {"accountId": "168", "name": "Other current assets", "value": 10, "items": []}, {"accountId": "65", "name": "Stock Asset", "value": 36533.45, "items": []}, {"accountId": "150", "name": "stock test", "value": 10, "items": []}, {"accountId": "77", "name": "Uncategorised Asset", "value": 47.8, "items": []}, {"accountId": "85", "name": "Undeposited Funds", "value": 220994.95, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 699368.94, "items": [{"name": "Accounts Payable", "value": 93773.74, "items": [{"accountId": "71", "name": "Creditors", "value": 93660.4, "items": []}, {"accountId": "74", "name": "Creditors - HKD", "value": 113.34, "items": []}]}, {"name": "Credit Card", "value": 12226.79, "items": [{"accountId": "142", "name": "2504 Amex - CC", "value": 11004.72, "items": []}, {"accountId": "126", "name": "Credit Card 2", "value": -71.91, "items": []}, {"accountId": "183", "name": "Expense Automated Tests Credit Card", "value": -2471.46, "items": []}, {"accountId": "57", "name": "Visa Credit Card", "value": 3765.44, "items": []}]}, {"name": "Other Current Liability", "value": 538490.11, "items": [{"accountId": "118", "name": "Current Liabilities", "value": 72.12, "items": []}, {"accountId": "157", "name": "Loan Payable - Kay's Bank", "value": 12726, "items": []}, {"accountId": "187", "name": "Payroll Clearing", "value": -3458.3, "items": []}, {"accountId": "53", "name": "VAT Control", "value": -3792.71, "items": []}, {"accountId": "54", "name": "VAT Suspense", "value": 532943, "items": []}]}, {"name": "Long Term Liability", "value": 54878.3, "items": [{"accountId": "158", "name": "Loan Long term borrowings - Jay's Bank", "value": 35630, "items": []}, {"accountId": "84", "name": "Long term borrowings", "value": -1100, "items": []}, {"accountId": "63", "name": "Note Payable", "value": 19348.3, "items": []}, {"accountId": "86", "name": "Accruals and deferred income", "value": 1000, "items": []}]}]}, "netAssets": 3686084.31, "equity": {"name": "Equity", "value": 3686084.31, "items": [{"name": "Equity", "value": 3697585.43, "items": [{"accountId": "55", "name": "Opening Balance Equity", "value": 966720.56, "items": []}, {"accountId": "2", "name": "Retained Earnings", "value": 2706364.87, "items": []}, {"accountId": "61", "name": "Owner's Equity - Contributions", "value": 25500, "items": []}, {"accountId": "62", "name": "Owner's Equity - Draws", "value": -1000, "items": []}]}, {"name": "Profit for the year", "value": -11501.12, "items": []}]}}], "mostRecentAvailableMonth": "2023-04-30T00:00:00", "earliestAvailableMonth": "2022-10-01T00:00:00"} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": []} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2023-03-31T00:00:00", "assets": {"name": "Assets", "value": 239322.69, "items": [{"name": "Fixed Assets", "value": 81530.08, "items": [{"name": "Plant and Machinery", "value": 46515, "items": [{"accountId": "0020", "name": "Plant and Machinery", "value": 50000, "items": []}, {"accountId": "0021", "name": "Plant/Machinery Depreciation", "value": -3485, "items": []}]}, {"name": "Furniture and Fixtures", "value": 16807, "items": [{"accountId": "0040", "name": "Furniture and Fixtures", "value": 16900, "items": []}, {"accountId": "0041", "name": "Furniture/Fixture Depreciation", "value": -93, "items": []}]}, {"name": "Motor Vehicles", "value": 18208.08, "items": [{"accountId": "0051", "name": "Motor Vehicles Depreciation", "value": -2091.92, "items": []}, {"accountId": "0050", "name": "Motor Vehicles", "value": 20300, "items": []}]}]}, {"name": "Current Assets", "value": 157792.61, "items": [{"name": "Stock", "value": 35000, "items": [{"accountId": "1001", "name": "Stock", "value": 35000, "items": []}]}, {"name": "Debtors", "value": 90640.61, "items": [{"accountId": "1100", "name": "Debtors Control Account", "value": 90640.61, "items": []}, {"accountId": "1103", "name": "Prepayments", "value": 0, "items": []}]}, {"name": "Deposits and Cash", "value": 5148.01, "items": [{"accountId": "1220", "name": "Building Society Account", "value": 507.53, "items": []}, {"accountId": "1230", "name": "Petty Cash", "value": 1130.48, "items": []}, {"accountId": "1210", "name": "Bank Deposit Account", "value": 3510, "items": []}]}, {"name": "VAT Liability", "value": 27003.99, "items": [{"accountId": "2201", "name": "Purchase Tax Control Account", "value": 12203.64, "items": []}, {"accountId": "2202", "name": "VAT Liability", "value": 14800.35, "items": []}]}]}]}, "liabilities": {"name": "Liabilities", "value": 97996.05, "items": [{"name": "Current Liabilities", "value": 84941.05, "items": [{"name": "Bank Account", "value": 20091.04, "items": [{"accountId": "1200", "name": "Bank Current Account", "value": 20091.04, "items": []}]}, {"name": "Credit Card (Creditors)", "value": -9358.97, "items": [{"accountId": "1240", "name": "Company Credit Card", "value": -9358.97, "items": []}]}, {"name": "Creditors : Short Term", "value": 44502.68, "items": [{"accountId": "2100", "name": "Creditors Control Account", "value": 44502.68, "items": []}, {"accountId": "2109", "name": "Accruals", "value": 0, "items": []}]}, {"name": "VAT Liability", "value": 22182.53, "items": [{"accountId": "2200", "name": "Sales Tax Control Account", "value": 22182.53, "items": []}]}, {"name": "Taxation", "value": 7403.77, "items": [{"accountId": "2210", "name": "P.A.Y.E.", "value": 5396.79, "items": []}, {"accountId": "2211", "name": "National Insurance", "value": 2006.98, "items": []}]}, {"name": "Wages", "value": 120, "items": [{"accountId": "2220", "name": "Net Wages", "value": 0, "items": []}, {"accountId": "2230", "name": "Pension Fund", "value": 120, "items": []}]}]}, {"name": "Non-Current Liabilities", "value": 13055, "items": [{"name": "Creditors : Long Term", "value": 13055, "items": [{"accountId": "2310", "name": "Hire Purchase", "value": 6160, "items": []}, {"accountId": "2300", "name": "Loans", "value": 6895, "items": []}]}]}]}, "netAssets": 141326.64, "equity": {"name": "Equity", "value": 141326.64, "items": [{"name": "Share Capital", "value": 96332, "items": [{"accountId": "3000", "name": "Ordinary Shares", "value": 96332, "items": []}]}, {"name": "Profit and Loss Account", "value": 44994.64, "items": []}]}}, {"date": "2023-02-28T00:00:00", "assets": {"name": "Assets", "value": 239322.69, "items": [{"name": "Fixed Assets", "value": 81530.08, "items": [{"name": "Plant and Machinery", "value": 46515, "items": [{"accountId": "0020", "name": "Plant and Machinery", "value": 50000, "items": []}, {"accountId": "0021", "name": "Plant/Machinery Depreciation", "value": -3485, "items": []}]}, {"name": "Furniture and Fixtures", "value": 16807, "items": [{"accountId": "0040", "name": "Furniture and Fixtures", "value": 16900, "items": []}, {"accountId": "0041", "name": "Furniture/Fixture Depreciation", "value": -93, "items": []}]}, {"name": "Motor Vehicles", "value": 18208.08, "items": [{"accountId": "0051", "name": "Motor Vehicles Depreciation", "value": -2091.92, "items": []}, {"accountId": "0050", "name": "Motor Vehicles", "value": 20300, "items": []}]}]}, {"name": "Current Assets", "value": 157792.61, "items": [{"name": "Stock", "value": 35000, "items": [{"accountId": "1001", "name": "Stock", "value": 35000, "items": []}]}, {"name": "Debtors", "value": 90640.61, "items": [{"accountId": "1100", "name": "Debtors Control Account", "value": 90640.61, "items": []}, {"accountId": "1103", "name": "Prepayments", "value": 0, "items": []}]}, {"name": "Deposits and Cash", "value": 5148.01, "items": [{"accountId": "1220", "name": "Building Society Account", "value": 507.53, "items": []}, {"accountId": "1230", "name": "Petty Cash", "value": 1130.48, "items": []}, {"accountId": "1210", "name": "Bank Deposit Account", "value": 3510, "items": []}]}, {"name": "VAT Liability", "value": 27003.99, "items": [{"accountId": "2201", "name": "Purchase Tax Control Account", "value": 12203.64, "items": []}, {"accountId": "2202", "name": "VAT Liability", "value": 14800.35, "items": []}]}]}]}, "liabilities": {"name": "Liabilities", "value": 97996.05, "items": [{"name": "Current Liabilities", "value": 84941.05, "items": [{"name": "Bank Account", "value": 20091.04, "items": [{"accountId": "1200", "name": "Bank Current Account", "value": 20091.04, "items": []}]}, {"name": "Credit Card (Creditors)", "value": -9358.97, "items": [{"accountId": "1240", "name": "Company Credit Card", "value": -9358.97, "items": []}]}, {"name": "Creditors : Short Term", "value": 44502.68, "items": [{"accountId": "2100", "name": "Creditors Control Account", "value": 44502.68, "items": []}, {"accountId": "2109", "name": "Accruals", "value": 0, "items": []}]}, {"name": "VAT Liability", "value": 22182.53, "items": [{"accountId": "2200", "name": "Sales Tax Control Account", "value": 22182.53, "items": []}]}, {"name": "Taxation", "value": 7403.77, "items": [{"accountId": "2210", "name": "P.A.Y.E.", "value": 5396.79, "items": []}, {"accountId": "2211", "name": "National Insurance", "value": 2006.98, "items": []}]}, {"name": "Wages", "value": 120, "items": [{"accountId": "2220", "name": "Net Wages", "value": 0, "items": []}, {"accountId": "2230", "name": "Pension Fund", "value": 120, "items": []}]}]}, {"name": "Non-Current Liabilities", "value": 13055, "items": [{"name": "Creditors : Long Term", "value": 13055, "items": [{"accountId": "2310", "name": "Hire Purchase", "value": 6160, "items": []}, {"accountId": "2300", "name": "Loans", "value": 6895, "items": []}]}]}]}, "netAssets": 141326.64, "equity": {"name": "Equity", "value": 141326.64, "items": [{"name": "Share Capital", "value": 96332, "items": [{"accountId": "3000", "name": "Ordinary Shares", "value": 96332, "items": []}]}, {"name": "Profit and Loss Account", "value": 44994.64, "items": []}]}}], "mostRecentAvailableMonth": "2023-03-31T00:00:00", "earliestAvailableMonth": "2021-04-01T00:00:00"} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2022-10-31T00:00:00", "assets": {"name": "Assets", "value": 1740591.73, "items": [{"accountId": "9a25937b267a11e797950a57719b2edb", "name": "1200 - Current", "value": 8493.25, "items": []}, {"accountId": "9a3e4bc6267a11e797950a57719b2edb", "name": "1210 - Cash", "value": 2664.25, "items": []}, {"accountId": "9a98cf79267a11e797950a57719b2edb", "name": "1 - Assets - Cost", "value": 1302.24, "items": []}, {"accountId": "9a990bbd267a11e797950a57719b2edb", "name": "30 - Office equipment and IT - Cost", "value": 100, "items": []}, {"accountId": "9a99117b267a11e797950a57719b2edb", "name": "40 - Fixtures and fittings - Cost", "value": 485, "items": []}, {"accountId": "9a9915ef267a11e797950a57719b2edb", "name": "50 - Motor Vehicles - Cost", "value": -426.67, "items": []}, {"accountId": "9a991c56267a11e797950a57719b2edb", "name": "1100 - Trade Debtors", "value": 1425254.88, "items": []}, {"accountId": "9a991e47267a11e797950a57719b2edb", "name": "1101 - Provision for doubtful debtors", "value": 25, "items": []}, {"accountId": "7e6c7ed52c2d11e8b45c025132dab352", "name": "1220 - Savings", "value": -155764.91, "items": []}, {"accountId": "2572c8766afc11e8aaa5027d54329956", "name": "1230 - Tide Current", "value": 509590.44, "items": []}, {"accountId": "e5889b459f544926ac5b8e6756df2ad4", "name": "1560 - Abdi Internet Bank", "value": 49.61, "items": []}, {"accountId": "b17083bc9b2748b4ab321b024e260eda", "name": "147852 - Abdi Live Test", "value": -225830.75, "items": []}, {"accountId": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "12345678 - ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl", "value": 34321.11, "items": []}, {"accountId": "ae17d64a96a741719f1d31045aa4a8ef", "name": "11113 - bills bank account", "value": 2919.35, "items": []}, {"accountId": "7c8be6c5e19a40cd92f93e36aecd4156", "name": "12345698 - Abdi Savings", "value": 8949, "items": []}, {"accountId": "5a64e8ada630412eb8fd1762175b3182", "name": "12345748 - My Test Bank Account", "value": 20438.71, "items": []}, {"accountId": "8cd0b0b93f0f4c8ba3434bc72d297cc2", "name": "12345758 - AlexT", "value": 1080, "items": []}, {"accountId": "d340f7af2ba249cbb1c4cf12a6fdae14", "name": "12345768 - AbdiCredit", "value": -40, "items": []}, {"accountId": "8065f6270c984d6dae78ce817399ac4d", "name": "101010 - Test Push Account", "value": 120, "items": []}, {"accountId": "b34c43d0f3cd404ead4b282c2163c021", "name": "231 - TestArch12345", "value": -20, "items": []}, {"accountId": "0f114074c6874794961e6e4b1ab6e4b1", "name": "466 - TestArch321", "value": 0.01, "items": []}, {"accountId": "fd4573ca207742d7bc8f04481952e53a", "name": "1004 - Card Provider Bank Account", "value": -4, "items": []}, {"accountId": "90f1a608fcee4bddbc81cce5f6335060", "name": "345678 - Capital on Tap Bank Account CC", "value": -120, "items": []}, {"accountId": "5e77ffb2faa540a794f2dbd157064556", "name": "12345788 - Mike B Commerce Test Bank Account", "value": 89120.55, "items": []}, {"accountId": "ad11ee61cdc54d4bb991f4855d9608b0", "name": "12345798 - Current Account 5", "value": 30, "items": []}, {"accountId": "f8cfa3dd79da436683f1768de75858b0", "name": "12345818 - Maria's Current Account", "value": 1732.13, "items": []}, {"accountId": "e6717e9019c7456787e9054822772ebb", "name": "12345828 - Joseph Test", "value": 15662, "items": []}, {"accountId": "495afbea7acb4be38cb5910b8c8db27d", "name": "56743 - Nic Test Bank Account", "value": 13.4, "items": []}, {"accountId": "f7559ab5cf8a493aa436503bd9712158", "name": "12345858 - Rob Credit Card", "value": -200, "items": []}, {"accountId": "83fbaf62ee244bebbee822d97b267c55", "name": "12345898 - Joseph (EUR)", "value": 95.09, "items": []}, {"accountId": "afac9b7c22184fae8f7bc734d880b166", "name": "12345928 - Matt Ager test loan", "value": 10, "items": []}, {"accountId": "553ed57b302b4eda881b129b6abda736", "name": "12345938 - Matt Ager Test Current Account", "value": 239.77, "items": []}, {"accountId": "785c9d9f9b954307bd700bede22cf0b5", "name": "12345948 - Matt Ager Test Savings Account", "value": 195, "items": []}, {"accountId": "3c18fba9e0ba414bb6668bc0668a3090", "name": "12345958 - Matt Ager Test Credit Card", "value": 30, "items": []}, {"accountId": "a11475c87cd54d0bb81951852ad91035", "name": "12345968 - Matt Ager Test Cash", "value": 290, "items": []}, {"accountId": "3d067bcf4a4b4a408ef3abaa4d944b91", "name": "12345978 - Matt Ager Test Other Bank Account", "value": 20, "items": []}, {"accountId": "179e02763960436c903b7ff2708659a2", "name": "12345988 - Matt Ager Test EUR Account", "value": -58.16, "items": []}, {"accountId": "bb6151d3fd744fa6a81f2164b1d156dc", "name": "13918348 - PUSH 1 Matt Ager Test EUR Account", "value": 9, "items": []}, {"accountId": "9a207c1a748b45f29117fa7126c12a9e", "name": "13918594 - Australian Current Account", "value": 1.43, "items": []}, {"accountId": "ab8e9947a5434c848e9a294188664117", "name": "13918604 - Bank Account 70", "value": -70, "items": []}, {"accountId": "77650bcb6a1d4924be22d6a5da309031", "name": "13918624 - COT GBP Account", "value": -10, "items": []}, {"accountId": "8be8979ae30c46a6830dc653c9ad4400", "name": "57436 - Capital on Tap Business Credit Card", "value": -105, "items": []}]}, "liabilities": {"name": "Liabilities", "value": 173084617.49, "items": [{"accountId": "9a992290267a11e797950a57719b2edb", "name": "2100 - Trade Creditors", "value": 183778965.2, "items": []}, {"accountId": "9a992966267a11e797950a57719b2edb", "name": "2200 - VAT on Sales", "value": 57234.67, "items": []}, {"accountId": "9a992b99267a11e797950a57719b2edb", "name": "2201 - VAT on Purchases", "value": -34745.24, "items": []}, {"accountId": "9a992d9e267a11e797950a57719b2edb", "name": "2202 - VAT Liability", "value": 256.86, "items": []}, {"accountId": "9a992fb3267a11e797950a57719b2edb", "name": "2203 - VAT Allocations & Adjustments", "value": -40, "items": []}, {"accountId": "9a9931b4267a11e797950a57719b2edb", "name": "2205 - VAT on Sales - Holding Account", "value": 199200.59, "items": []}, {"accountId": "9a9933d1267a11e797950a57719b2edb", "name": "2206 - VAT on Purchases - Holding Account", "value": -10893226.32, "items": []}, {"accountId": "b954fb00e56447259a9f0cd84dbb6125", "name": "12345 - Pete Bill Account", "value": -6383.05, "items": []}, {"accountId": "7723dee96cbb435a800c2f7c047f47f3", "name": "312323 - Commerce Prepaid", "value": -12842.93, "items": []}, {"accountId": "f96e7c899a1c4336bfbfe3d91ff4c157", "name": "121212 - Commerce Prepaid2", "value": -464.36, "items": []}, {"accountId": "7ed323223f8d4d8f8f737d76e380a254", "name": "987 - Mike B Commerce Prepaid Test Account", "value": -5011.84, "items": []}, {"accountId": "a2b43df636774b5a92fbfd889e390348", "name": "989 - Mike B Commerce Loan Test Account", "value": 62, "items": []}, {"accountId": "5cdf52bfb00d4d86b5a01e8af0761fe5", "name": "990 - Mike B Commerce Loan Test Account", "value": 1538.24, "items": []}, {"accountId": "09f1976c146f40c6b2009b26f1d20f97", "name": "42 - TestDatatypesAccount", "value": 100, "items": []}, {"accountId": "229eb087d0574c28be42fa4cc89af1f3", "name": "2110 - Trade Creditors", "value": -26.33, "items": []}]}, "netAssets": -171344025.76, "equity": {"name": "Equities", "value": -171344025.76, "items": [{"accountId": "PROFIT-AND-LOSS", "name": "Profit for this period", "value": -171344025.76, "items": []}]}}, {"date": "2022-09-30T00:00:00", "assets": {"name": "Assets", "value": 1748139.93, "items": [{"accountId": "9a25937b267a11e797950a57719b2edb", "name": "1200 - Current", "value": 8493.25, "items": []}, {"accountId": "9a3e4bc6267a11e797950a57719b2edb", "name": "1210 - Cash", "value": 2664.25, "items": []}, {"accountId": "9a98cf79267a11e797950a57719b2edb", "name": "1 - Assets - Cost", "value": 1302.24, "items": []}, {"accountId": "9a990bbd267a11e797950a57719b2edb", "name": "30 - Office equipment and IT - Cost", "value": 100, "items": []}, {"accountId": "9a99117b267a11e797950a57719b2edb", "name": "40 - Fixtures and fittings - Cost", "value": 485, "items": []}, {"accountId": "9a9915ef267a11e797950a57719b2edb", "name": "50 - Motor Vehicles - Cost", "value": -426.67, "items": []}, {"accountId": "9a991c56267a11e797950a57719b2edb", "name": "1100 - Trade Debtors", "value": 1432812.05, "items": []}, {"accountId": "9a991e47267a11e797950a57719b2edb", "name": "1101 - Provision for doubtful debtors", "value": 25, "items": []}, {"accountId": "7e6c7ed52c2d11e8b45c025132dab352", "name": "1220 - Savings", "value": -155764.91, "items": []}, {"accountId": "2572c8766afc11e8aaa5027d54329956", "name": "1230 - Tide Current", "value": 509590.44, "items": []}, {"accountId": "e5889b459f544926ac5b8e6756df2ad4", "name": "1560 - Abdi Internet Bank", "value": 49.61, "items": []}, {"accountId": "b17083bc9b2748b4ab321b024e260eda", "name": "147852 - Abdi Live Test", "value": -225830.75, "items": []}, {"accountId": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "12345678 - ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl", "value": 34321.11, "items": []}, {"accountId": "ae17d64a96a741719f1d31045aa4a8ef", "name": "11113 - bills bank account", "value": 2919.35, "items": []}, {"accountId": "7c8be6c5e19a40cd92f93e36aecd4156", "name": "12345698 - Abdi Savings", "value": 8949, "items": []}, {"accountId": "5a64e8ada630412eb8fd1762175b3182", "name": "12345748 - My Test Bank Account", "value": 20438.74, "items": []}, {"accountId": "8cd0b0b93f0f4c8ba3434bc72d297cc2", "name": "12345758 - AlexT", "value": 1080, "items": []}, {"accountId": "d340f7af2ba249cbb1c4cf12a6fdae14", "name": "12345768 - AbdiCredit", "value": -40, "items": []}, {"accountId": "8065f6270c984d6dae78ce817399ac4d", "name": "101010 - Test Push Account", "value": 120, "items": []}, {"accountId": "b34c43d0f3cd404ead4b282c2163c021", "name": "231 - TestArch12345", "value": -20, "items": []}, {"accountId": "0f114074c6874794961e6e4b1ab6e4b1", "name": "466 - TestArch321", "value": 0.01, "items": []}, {"accountId": "fd4573ca207742d7bc8f04481952e53a", "name": "1004 - Card Provider Bank Account", "value": -4, "items": []}, {"accountId": "90f1a608fcee4bddbc81cce5f6335060", "name": "345678 - Capital on Tap Bank Account CC", "value": -120, "items": []}, {"accountId": "5e77ffb2faa540a794f2dbd157064556", "name": "12345788 - Mike B Commerce Test Bank Account", "value": 89120.55, "items": []}, {"accountId": "ad11ee61cdc54d4bb991f4855d9608b0", "name": "12345798 - Current Account 5", "value": 30, "items": []}, {"accountId": "f8cfa3dd79da436683f1768de75858b0", "name": "12345818 - Maria's Current Account", "value": 1732.13, "items": []}, {"accountId": "e6717e9019c7456787e9054822772ebb", "name": "12345828 - Joseph Test", "value": 15662, "items": []}, {"accountId": "495afbea7acb4be38cb5910b8c8db27d", "name": "56743 - Nic Test Bank Account", "value": 13.4, "items": []}, {"accountId": "f7559ab5cf8a493aa436503bd9712158", "name": "12345858 - Rob Credit Card", "value": -200, "items": []}, {"accountId": "83fbaf62ee244bebbee822d97b267c55", "name": "12345898 - Joseph (EUR)", "value": 95.09, "items": []}, {"accountId": "afac9b7c22184fae8f7bc734d880b166", "name": "12345928 - Matt Ager test loan", "value": 10, "items": []}, {"accountId": "553ed57b302b4eda881b129b6abda736", "name": "12345938 - Matt Ager Test Current Account", "value": 239.77, "items": []}, {"accountId": "785c9d9f9b954307bd700bede22cf0b5", "name": "12345948 - Matt Ager Test Savings Account", "value": 195, "items": []}, {"accountId": "3c18fba9e0ba414bb6668bc0668a3090", "name": "12345958 - Matt Ager Test Credit Card", "value": 30, "items": []}, {"accountId": "a11475c87cd54d0bb81951852ad91035", "name": "12345968 - Matt Ager Test Cash", "value": 290, "items": []}, {"accountId": "3d067bcf4a4b4a408ef3abaa4d944b91", "name": "12345978 - Matt Ager Test Other Bank Account", "value": 20, "items": []}, {"accountId": "179e02763960436c903b7ff2708659a2", "name": "12345988 - Matt Ager Test EUR Account", "value": -58.16, "items": []}, {"accountId": "9a207c1a748b45f29117fa7126c12a9e", "name": "13918594 - Australian Current Account", "value": 1.43, "items": []}, {"accountId": "ab8e9947a5434c848e9a294188664117", "name": "13918604 - Bank Account 70", "value": -70, "items": []}, {"accountId": "77650bcb6a1d4924be22d6a5da309031", "name": "13918624 - COT GBP Account", "value": -10, "items": []}, {"accountId": "8be8979ae30c46a6830dc653c9ad4400", "name": "57436 - Capital on Tap Business Credit Card", "value": -105, "items": []}]}, "liabilities": {"name": "Liabilities", "value": 161482418.52, "items": [{"accountId": "9a992290267a11e797950a57719b2edb", "name": "2100 - Trade Creditors", "value": 171440565.23, "items": []}, {"accountId": "9a992966267a11e797950a57719b2edb", "name": "2200 - VAT on Sales", "value": 57232.9, "items": []}, {"accountId": "9a992b99267a11e797950a57719b2edb", "name": "2201 - VAT on Purchases", "value": -34745.24, "items": []}, {"accountId": "9a992d9e267a11e797950a57719b2edb", "name": "2202 - VAT Liability", "value": 256.86, "items": []}, {"accountId": "9a992fb3267a11e797950a57719b2edb", "name": "2203 - VAT Allocations & Adjustments", "value": -40, "items": []}, {"accountId": "9a9931b4267a11e797950a57719b2edb", "name": "2205 - VAT on Sales - Holding Account", "value": 199003.36, "items": []}, {"accountId": "9a9933d1267a11e797950a57719b2edb", "name": "2206 - VAT on Purchases - Holding Account", "value": -10156826.32, "items": []}, {"accountId": "b954fb00e56447259a9f0cd84dbb6125", "name": "12345 - Pete Bill Account", "value": -6383.05, "items": []}, {"accountId": "7723dee96cbb435a800c2f7c047f47f3", "name": "312323 - Commerce Prepaid", "value": -12842.93, "items": []}, {"accountId": "f96e7c899a1c4336bfbfe3d91ff4c157", "name": "121212 - Commerce Prepaid2", "value": -464.36, "items": []}, {"accountId": "7ed323223f8d4d8f8f737d76e380a254", "name": "987 - Mike B Commerce Prepaid Test Account", "value": -5011.84, "items": []}, {"accountId": "a2b43df636774b5a92fbfd889e390348", "name": "989 - Mike B Commerce Loan Test Account", "value": 62, "items": []}, {"accountId": "5cdf52bfb00d4d86b5a01e8af0761fe5", "name": "990 - Mike B Commerce Loan Test Account", "value": 1538.24, "items": []}, {"accountId": "09f1976c146f40c6b2009b26f1d20f97", "name": "42 - TestDatatypesAccount", "value": 100, "items": []}, {"accountId": "229eb087d0574c28be42fa4cc89af1f3", "name": "2110 - Trade Creditors", "value": -26.33, "items": []}]}, "netAssets": -159734278.59, "equity": {"name": "Equities", "value": -159734278.59, "items": [{"accountId": "PROFIT-AND-LOSS", "name": "Profit for this period", "value": -159734278.59, "items": []}]}}], "mostRecentAvailableMonth": "2022-10-31T00:00:00", "earliestAvailableMonth": "2022-04-01T00:00:00"} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2022-11-30T00:00:00", "assets": {"name": "Assets", "value": 2220.87, "items": [{"name": "Cash and Bank", "value": 1001.87, "items": [{"name": "Abdi Bank", "value": 158.9, "items": []}, {"name": "Cash on Hand", "value": 245.31, "items": []}, {"name": "Current Account", "value": 597.66, "items": []}]}, {"name": "Other Current Assets", "value": 219, "items": [{"name": "Accounts Receivable", "value": 211.99, "items": []}, {"name": "Unrealized Gain on Foreign Exchange", "value": 7.01, "items": []}]}, {"name": "Long-term Assets", "value": 1000, "items": [{"name": "Furniture", "value": 1000, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 4641.15, "items": [{"name": "Current Liabilities", "value": 4641.15, "items": [{"name": "Accounts Payable", "value": 3557.14, "items": []}, {"name": "Abdul's new Tax", "value": 7.54, "items": []}, {"name": "FederalABC", "value": 1002.6, "items": []}, {"name": "STANDARD", "value": 73.87, "items": []}]}]}, "netAssets": -2420.28, "equity": {"name": "Equity", "value": -2420.28, "items": [{"name": "Other Equity", "value": 63.8, "items": [{"name": "Owner Investment / Drawings", "value": -36.2, "items": []}, {"name": "Some Equity", "value": 100, "items": []}]}, {"name": "Retained Earnings", "value": -2484.08, "items": [{"name": "Profit for all prior years", "value": -1950.59, "items": []}, {"name": "Profit between Jan 1, 2022 and Nov 30, 2022", "value": -533.49, "items": []}]}]}}, {"date": "2022-10-31T00:00:00", "assets": {"name": "Assets", "value": 2222.22, "items": [{"name": "Cash and Bank", "value": 1001.87, "items": [{"name": "Abdi Bank", "value": 158.9, "items": []}, {"name": "Cash on Hand", "value": 245.31, "items": []}, {"name": "Current Account", "value": 597.66, "items": []}]}, {"name": "Other Current Assets", "value": 220.35, "items": [{"name": "Accounts Receivable", "value": 211.99, "items": []}, {"name": "Unrealized Gain on Foreign Exchange", "value": 8.36, "items": []}]}, {"name": "Long-term Assets", "value": 1000, "items": [{"name": "Furniture", "value": 1000, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 4086.15, "items": [{"name": "Current Liabilities", "value": 4086.15, "items": [{"name": "Accounts Payable", "value": 3002.14, "items": []}, {"name": "Abdul's new Tax", "value": 7.54, "items": []}, {"name": "FederalABC", "value": 1002.6, "items": []}, {"name": "STANDARD", "value": 73.87, "items": []}]}]}, "netAssets": -1863.93, "equity": {"name": "Equity", "value": -1863.93, "items": [{"name": "Other Equity", "value": 63.8, "items": [{"name": "Owner Investment / Drawings", "value": -36.2, "items": []}, {"name": "Some Equity", "value": 100, "items": []}]}, {"name": "Retained Earnings", "value": -1927.73, "items": [{"name": "Profit for all prior years", "value": -1950.59, "items": []}, {"name": "Profit between Jan 1, 2022 and Oct 31, 2022", "value": 22.86, "items": []}]}]}}], "mostRecentAvailableMonth": "2022-11-30T00:00:00", "earliestAvailableMonth": "2022-05-01T00:00:00"} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2023-03-31T23:59:59", "assets": {"name": "Assets", "value": 24166.8, "items": [{"name": "Current Assets", "value": 21486.84, "items": [{"name": "Bank", "value": 924.25, "items": [{"accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account", "value": 924.25, "items": []}]}, {"accountId": "a1e2c53a-18b9-40cb-8e87-e2db200fe8af", "name": "Inventory", "value": 121.21, "items": []}, {"accountId": "8add7c44-ffe0-4a42-869e-b85dadd5eac1", "name": "Accounts Receivable", "value": 20441.38, "items": []}]}, {"name": "Fixed Assets", "value": 2679.96, "items": [{"accountId": "a4602fb6-2e9d-4064-b318-c409032692ba", "name": "Office Equipment", "value": 3665.63, "items": []}, {"accountId": "8d1ae68b-1251-4b44-9d7a-639b3976935c", "name": "Computer Equipment", "value": -985.67, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 14265.73, "items": [{"name": "Current Liabilities", "value": 14265.73, "items": [{"accountId": "b12f79b9-a082-4b8b-971e-d321292943c7", "name": "VAT", "value": 1194.45, "items": []}, {"accountId": "1873bf00-e52f-48e9-89d6-619c93723f60", "name": "Unpaid Expense Claims", "value": 150.85, "items": []}, {"accountId": "7ff95c6a-5849-4030-a361-52165fab6490", "name": "Historical Adjustment", "value": 4130.98, "items": []}, {"accountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", "name": "Accounts Payable", "value": 8789.45, "items": []}]}]}, "netAssets": 9901.07, "equity": {"name": "Equity", "value": 9901.07, "items": [{"accountId": "524c9f2d-e680-4861-82f6-4ad171b51de5", "name": "Retained Earnings", "value": -7961.99, "items": []}, {"accountId": "abababab-abab-abab-abab-abababababab", "name": "Current Year Earnings", "value": 17863.06, "items": []}]}}, {"date": "2023-02-28T23:59:59", "assets": {"name": "Assets", "value": 24166.8, "items": [{"name": "Current Assets", "value": 21486.84, "items": [{"name": "Bank", "value": 924.25, "items": [{"accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account", "value": 924.25, "items": []}]}, {"accountId": "a1e2c53a-18b9-40cb-8e87-e2db200fe8af", "name": "Inventory", "value": 121.21, "items": []}, {"accountId": "8add7c44-ffe0-4a42-869e-b85dadd5eac1", "name": "Accounts Receivable", "value": 20441.38, "items": []}]}, {"name": "Fixed Assets", "value": 2679.96, "items": [{"accountId": "a4602fb6-2e9d-4064-b318-c409032692ba", "name": "Office Equipment", "value": 3665.63, "items": []}, {"accountId": "8d1ae68b-1251-4b44-9d7a-639b3976935c", "name": "Computer Equipment", "value": -985.67, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 14265.73, "items": [{"name": "Current Liabilities", "value": 14265.73, "items": [{"accountId": "b12f79b9-a082-4b8b-971e-d321292943c7", "name": "VAT", "value": 1194.45, "items": []}, {"accountId": "1873bf00-e52f-48e9-89d6-619c93723f60", "name": "Unpaid Expense Claims", "value": 150.85, "items": []}, {"accountId": "7ff95c6a-5849-4030-a361-52165fab6490", "name": "Historical Adjustment", "value": 4130.98, "items": []}, {"accountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", "name": "Accounts Payable", "value": 8789.45, "items": []}]}]}, "netAssets": 9901.07, "equity": {"name": "Equity", "value": 9901.07, "items": [{"accountId": "524c9f2d-e680-4861-82f6-4ad171b51de5", "name": "Retained Earnings", "value": -7961.99, "items": []}, {"accountId": "abababab-abab-abab-abab-abababababab", "name": "Current Year Earnings", "value": 17863.06, "items": []}]}}], "mostRecentAvailableMonth": "2023-03-31T00:00:00", "earliestAvailableMonth": "2022-09-01T00:00:00"} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"currency": "GBP", "reports": [{"date": "2022-10-31T00:00:00", "assets": {"name": "Assets", "value": 63170.61, "items": [{"name": "Current Assets", "value": 63150.61, "items": [{"name": "Cash", "value": 1678.31, "items": [{"accountId": "104957000000000349", "name": "Petty Cash", "value": -8246.75, "items": []}, {"accountId": "104957000000000346", "name": "Undeposited Funds", "value": 9925.06, "items": []}]}, {"name": "Bank", "value": 69910.1, "items": [{"accountId": "104957000000060010", "name": "Abdi Test", "value": 69858.44, "items": []}, {"accountId": "104957000000065002", "name": "Abdi Test 2", "value": 20, "items": []}, {"accountId": "104957000000080006", "name": "EUR Test Bank Account", "value": 24.29, "items": []}, {"accountId": "104957000000508001", "name": "Subtra USD wallet", "value": 7.37, "items": []}]}, {"accountId": "104957000000000352", "name": "Accounts Receivable", "value": -959.64, "items": []}, {"name": "Other Current Assets", "value": -7478.16, "items": [{"accountId": "104957000000000358", "name": "Advance Tax", "value": 2.63, "items": []}, {"accountId": "104957000000000457", "name": "Employee Advance", "value": 0, "items": []}, {"accountId": "104957000000033015", "name": "Input VAT", "value": 356.84, "items": []}, {"accountId": "104957000000000511", "name": "Inventory Asset", "value": 90.06, "items": []}, {"accountId": "104957000000032010", "name": "Prepaid Expenses", "value": -8017.69, "items": []}, {"accountId": "104957000000388007", "name": "Sales to Customers (Cash)", "value": 0, "items": []}, {"accountId": "104957000000093001", "name": "Test prepaid expenses child account", "value": 0, "items": []}, {"accountId": "104957000000096007", "name": "Test prepaid expenses child account 2", "value": 100, "items": []}, {"accountId": "104957000000096001", "name": "Test prepaid expenses child child account", "value": -50, "items": []}, {"accountId": "104957000000085001", "name": "Test stock account", "value": 40, "items": []}]}]}, {"name": "Other Assets", "value": 0, "items": []}, {"name": "Fixed Assets", "value": 20, "items": [{"accountId": "104957000000000355", "name": "Furniture and Equipment", "value": 20, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 8615.39, "items": [{"name": "Liabilities", "value": 8615.39, "items": [{"name": "Current Liabilities", "value": 8615.39, "items": [{"accountId": "104957000000000361", "name": "Accounts Payable", "value": 2084.6, "items": []}, {"accountId": "104957000000618001", "name": "Creadit Card - BA Company", "value": 656.05, "items": []}, {"accountId": "104957000000183010", "name": "Credit Card", "value": 26.25, "items": []}, {"accountId": "104957000000000460", "name": "Employee Reimbursements", "value": 10.35, "items": []}, {"accountId": "104957000000000499", "name": "Opening Balance Adjustments", "value": 0, "items": []}, {"accountId": "104957000000033017", "name": "Output VAT", "value": 3934.75, "items": []}, {"accountId": "104957000000000501", "name": "Unearned Revenue", "value": 1903.39, "items": []}, {"accountId": "104957000000054026", "name": "VAT MOSS Payable", "value": 0, "items": []}, {"accountId": "104957000000000364", "name": "VAT Payable", "value": 0, "items": []}]}, {"name": "Long Term Liabilities", "value": 0, "items": []}, {"name": "Other Liabilities", "value": 0, "items": [{"accountId": "104957000000006001", "name": "Tag Adjustments", "value": 0, "items": []}]}]}]}, "netAssets": 54555.22, "equity": {"name": "Equities", "value": 54555.22, "items": [{"accountId": "", "name": "Current Year Earnings", "value": -15199.89, "items": []}, {"accountId": "104957000000000451", "name": "Drawing", "value": 0, "items": []}, {"accountId": "104957000000000373", "name": "Opening Balance Offset", "value": 10000, "items": []}, {"accountId": "104957000000000370", "name": "Owner's Equity", "value": 0, "items": []}, {"accountId": "104957000000000367", "name": "Retained Earnings", "value": 59755.11, "items": []}]}}, {"date": "2022-09-01T00:00:00", "assets": {"name": "Assets", "value": 63170.61, "items": [{"name": "Current Assets", "value": 63150.61, "items": [{"name": "Cash", "value": 1678.31, "items": [{"accountId": "104957000000000349", "name": "Petty Cash", "value": -8246.75, "items": []}, {"accountId": "104957000000000346", "name": "Undeposited Funds", "value": 9925.06, "items": []}]}, {"name": "Bank", "value": 69910.1, "items": [{"accountId": "104957000000060010", "name": "Abdi Test", "value": 69858.44, "items": []}, {"accountId": "104957000000065002", "name": "Abdi Test 2", "value": 20, "items": []}, {"accountId": "104957000000080006", "name": "EUR Test Bank Account", "value": 24.29, "items": []}, {"accountId": "104957000000508001", "name": "Subtra USD wallet", "value": 7.37, "items": []}]}, {"accountId": "104957000000000352", "name": "Accounts Receivable", "value": -959.64, "items": []}, {"name": "Other Current Assets", "value": -7478.16, "items": [{"accountId": "104957000000000358", "name": "Advance Tax", "value": 2.63, "items": []}, {"accountId": "104957000000000457", "name": "Employee Advance", "value": 0, "items": []}, {"accountId": "104957000000033015", "name": "Input VAT", "value": 356.84, "items": []}, {"accountId": "104957000000000511", "name": "Inventory Asset", "value": 90.06, "items": []}, {"accountId": "104957000000032010", "name": "Prepaid Expenses", "value": -8017.69, "items": []}, {"accountId": "104957000000388007", "name": "Sales to Customers (Cash)", "value": 0, "items": []}, {"accountId": "104957000000093001", "name": "Test prepaid expenses child account", "value": 0, "items": []}, {"accountId": "104957000000096007", "name": "Test prepaid expenses child account 2", "value": 100, "items": []}, {"accountId": "104957000000096001", "name": "Test prepaid expenses child child account", "value": -50, "items": []}, {"accountId": "104957000000085001", "name": "Test stock account", "value": 40, "items": []}]}]}, {"name": "Other Assets", "value": 0, "items": []}, {"name": "Fixed Assets", "value": 20, "items": [{"accountId": "104957000000000355", "name": "Furniture and Equipment", "value": 20, "items": []}]}]}, "liabilities": {"name": "Liabilities", "value": 8615.39, "items": [{"name": "Liabilities", "value": 8615.39, "items": [{"name": "Current Liabilities", "value": 8615.39, "items": [{"accountId": "104957000000000361", "name": "Accounts Payable", "value": 2084.6, "items": []}, {"accountId": "104957000000618001", "name": "Creadit Card - BA Company", "value": 656.05, "items": []}, {"accountId": "104957000000183010", "name": "Credit Card", "value": 26.25, "items": []}, {"accountId": "104957000000000460", "name": "Employee Reimbursements", "value": 10.35, "items": []}, {"accountId": "104957000000000499", "name": "Opening Balance Adjustments", "value": 0, "items": []}, {"accountId": "104957000000033017", "name": "Output VAT", "value": 3934.75, "items": []}, {"accountId": "104957000000000501", "name": "Unearned Revenue", "value": 1903.39, "items": []}, {"accountId": "104957000000054026", "name": "VAT MOSS Payable", "value": 0, "items": []}, {"accountId": "104957000000000364", "name": "VAT Payable", "value": 0, "items": []}]}, {"name": "Long Term Liabilities", "value": 0, "items": []}, {"name": "Other Liabilities", "value": 0, "items": [{"accountId": "104957000000006001", "name": "Tag Adjustments", "value": 0, "items": []}]}]}]}, "netAssets": 54555.22, "equity": {"name": "Equities", "value": 54555.22, "items": [{"accountId": "", "name": "Current Year Earnings", "value": -15199.89, "items": []}, {"accountId": "104957000000000451", "name": "Drawing", "value": 0, "items": []}, {"accountId": "104957000000000373", "name": "Opening Balance Offset", "value": 10000, "items": []}, {"accountId": "104957000000000370", "name": "Owner's Equity", "value": 0, "items": []}, {"accountId": "104957000000000367", "name": "Retained Earnings", "value": 59755.11, "items": []}]}}], "mostRecentAvailableMonth": "2022-10-31T00:00:00", "earliestAvailableMonth": "2022-04-01T00:00:00"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-accounts: - speakeasy-default-list-accounting-accounts: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:15Z", "sourceModifiedDate": "2022-12-10T16:39:00", "id": "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", "nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Asset.Current.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:15Z", "sourceModifiedDate": "2022-10-19T05:49:00", "id": "76d5f23b-9623-4e3b-89cd-da57228764d3", "nominalCode": "611", "name": "Accounts Receivable", "description": "A provision anticipating that a portion of accounts receivable will never be collected.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Asset.Current.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 98, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-03-09T16:31:54Z", "id": "8eaed16d-c69f-ec11-80f1-0022481b4546", "nominalCode": "45422026-68CA-4EF2-9", "name": "", "fullyQualifiedCategory": " .", "fullyQualifiedName": "..", "currency": "GBP", "currentBalance": 0, "type": "Unknown", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["DirectCost.LineItems.AccountRef.Id"]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-09-13T14:45:01Z", "id": "c0861a65-c69f-ec11-80f1-0022481b4546", "nominalCode": "10", "name": "Account no cat Balance Sheet", "fullyQualifiedCategory": " .", "fullyQualifiedName": "..Account no cat Balance Sheet", "currency": "GBP", "currentBalance": 27.34, "type": "Unknown", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["DirectCost.LineItems.AccountRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 122, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:36:17Z", "sourceModifiedDate": "2020-01-08T09:42:54Z", "id": "ef2fde36-4416-4bc5-b239-315b2929348c", "nominalCode": "1300", "name": "Debiteuren", "description": "Debiteuren", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Debiteuren.PaymentsEnabled", "currency": "EUR", "currentBalance": 864435.44, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}, {"modifiedDate": "2022-10-26T13:36:17Z", "sourceModifiedDate": "2021-06-10T11:00:20Z", "id": "2052b65b-20e9-4da1-85d8-fd5ca0ea3d38", "nominalCode": "888777888", "name": "One more AR account", "description": "One more AR account", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.One more AR account.PaymentsEnabled", "currency": "EUR", "currentBalance": 2174.82, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 230, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:35:15Z", "sourceModifiedDate": "2017-08-01T17:31:12Z", "id": "ca2b96b7-cc45-4e35-9fa3-82a2ba1eec40", "nominalCode": "THING", "name": "Some thing account", "description": "Some thing account", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Some thing account.PaymentsEnabled", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}, {"modifiedDate": "2022-10-26T13:35:15Z", "sourceModifiedDate": "2020-01-08T13:48:38Z", "id": "cf9572e7-8afa-4339-9113-af32a66d9df9", "nominalCode": "15400", "name": "Trade Debtors", "description": "Trade Debtors", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Trade Debtors.PaymentsEnabled", "currency": "GBP", "currentBalance": 4484655.39, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 121, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:12Z", "id": "601", "nominalCode": "601", "name": "Capital Asset Brought Forward", "fullyQualifiedCategory": "Asset.Capital", "fullyQualifiedName": "Asset.Capital.Capital Asset Brought Forward", "currency": "GBP", "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:12Z", "id": "605", "nominalCode": "605", "name": "Capital Asset Depreciation Brought Forward", "fullyQualifiedCategory": "Asset.Capital", "fullyQualifiedName": "Asset.Capital.Capital Asset Depreciation Brought Forward", "currency": "GBP", "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 292, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:24Z", "id": "67357", "nominalCode": "1200", "name": "Accounts Receivable", "fullyQualifiedCategory": "Asset", "fullyQualifiedName": "Asset.Accounts Receivable", "currency": "GBP", "currentBalance": 51445.53, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:24Z", "id": "128611", "nominalCode": "1200-1", "name": "Accounts Receivable", "fullyQualifiedCategory": "Asset.Accounts Receivable", "fullyQualifiedName": "Asset.Accounts Receivable.Accounts Receivable", "currency": "GBP", "currentBalance": 51445.53, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 96, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:16Z", "id": "27840056", "nominalCode": "70700", "name": "16th Account", "fullyQualifiedCategory": "Asset.BankAccount", "fullyQualifiedName": "Asset.BankAccount.16th Account", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}, {"modifiedDate": "2022-09-30T10:29:16Z", "id": "27840049", "nominalCode": "70600", "name": "1a1a", "fullyQualifiedCategory": "Asset.BankAccount", "fullyQualifiedName": "Asset.BankAccount.1a1a", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 157, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-30T14:48:33Z", "sourceModifiedDate": "2021-08-11T12:51:21", "id": "111", "name": "Accounts Payable", "fullyQualifiedCategory": "AcctPay.AcctPay", "fullyQualifiedName": "AcctPay.AcctPay.Accounts Payable", "currentBalance": -635.55, "type": "Liability", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}, {"modifiedDate": "2023-01-30T14:48:33Z", "sourceModifiedDate": "2021-09-08T15:23:31", "id": "119", "name": "Accounts Receivable", "fullyQualifiedCategory": "AcctRec.AcctRec", "fullyQualifiedName": "AcctRec.AcctRec.Accounts Receivable", "currentBalance": -565, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 44, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:06:23Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "40000-933270541", "nominalCode": "11000", "name": "Accounts Receivable", "description": "Accounts Receivable", "fullyQualifiedCategory": "Asset.CurrentAsset.AccountsReceivable", "fullyQualifiedName": "Asset.CurrentAsset.AccountsReceivable.Accounts Receivable", "currency": "GBP", "currentBalance": 93007.93, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:06:23Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "20000-933270541", "nominalCode": "10100", "name": "Checking", "description": "Cash", "fullyQualifiedCategory": "Asset.CurrentAsset.Bank", "fullyQualifiedName": "Asset.CurrentAsset.Bank.Checking", "currency": "GBP", "currentBalance": 46954.1, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["BillLineItem.AccountRef.Id", "BillPayment.AccountRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 116, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:34Z", "sourceModifiedDate": "2022-12-08T15:42:59Z", "id": "62", "nominalCode": "246", "name": "Debtors", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors", "currency": "GBP", "currentBalance": 41289.37, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}, {"modifiedDate": "2023-01-18T11:02:34Z", "sourceModifiedDate": "2021-02-19T14:04:45Z", "id": "92", "nominalCode": "247", "name": "Debtors - AED", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors - AED", "currency": "AED", "currentBalance": -1533.44, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 234, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-26T01:18:15Z", "id": "70", "name": "Debtors", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors", "currency": "GBP", "currentBalance": 3041173.77, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-12T15:10:38Z", "id": "80", "name": "Debtors - USD", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors - USD", "currency": "USD", "currentBalance": 54822.37, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 186, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:52Z", "id": "2864", "nominalCode": "1200", "name": "Bank Account", "description": "Bank Account", "fullyQualifiedCategory": "Asset.Bank Account", "fullyQualifiedName": "Asset.Bank Account.Bank Account", "type": "Asset", "status": "Archived", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": true}}, {"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-09-11T13:53:12Z", "id": "2368", "nominalCode": "1200", "name": "Bank Current Account", "description": "Bank Current Account", "fullyQualifiedCategory": "Asset.Bank Account", "fullyQualifiedName": "Asset.Bank Account.Bank Current Account", "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 344, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1100", "nominalCode": "1100", "name": "Debtors Control Account", "fullyQualifiedCategory": "Asset.CurrentAssets.Debtors", "fullyQualifiedName": "Asset.CurrentAssets.Debtors.Debtors Control Account", "currency": "GBP", "currentBalance": 90640.61, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1102", "nominalCode": "1102", "name": "Other Debtors", "fullyQualifiedCategory": "Asset.CurrentAssets.Debtors", "fullyQualifiedName": "Asset.CurrentAssets.Debtors.Other Debtors", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 155, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-27T10:53:26Z", "id": "e5889b459f544926ac5b8e6756df2ad4", "nominalCode": "1560", "name": "Abdi Internet Bank", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Abdi Internet Bank", "currency": "GBP", "currentBalance": 49.61, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}, {"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-28T14:00:20Z", "id": "b17083bc9b2748b4ab321b024e260eda", "nominalCode": "147852", "name": "Abdi Live Test", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Abdi Live Test", "currency": "GBP", "currentBalance": 225830.75, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 283, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:51Z", "sourceModifiedDate": "2020-01-29T01:42:43", "id": "2", "nominalCode": "12100", "name": "Accounts Receivable", "fullyQualifiedCategory": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable", "fullyQualifiedName": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:51Z", "sourceModifiedDate": "2020-10-15T15:33:15", "id": "155", "nominalCode": "12710", "name": "AR - Retainage", "fullyQualifiedCategory": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable", "fullyQualifiedName": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.AR - Retainage", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 181, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts?page=2&pageSize=2"}}} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-11-16T18:15:17Z", "id": "QWNjb3VudDo5MjIzNDE3NjkzMzk3NjA2MzM7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "name": "Abdi Bank", "description": "Test Balance Sheet", "fullyQualifiedCategory": "Asset.CashAndBank", "fullyQualifiedName": "Asset.CashAndBank.Abdi Bank", "currency": "GBP", "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}, {"modifiedDate": "2022-11-16T18:15:17Z", "id": "QWNjb3VudDo3OTE3NTA1OTcwOTQxNzQ3MTU7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "name": "Cash on Hand", "description": "Cash you haven�t deposited in the bank. Add your bank and credit card accounts to accurately categorize transactions that aren't cash.", "fullyQualifiedCategory": "Asset.CashAndBank", "fullyQualifiedName": "Asset.CashAndBank.Cash on Hand", "currency": "GBP", "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 85, "_links": {"self": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts"}, "current": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:35:08Z", "sourceModifiedDate": "2023-02-17T11:10:49", "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "nominalCode": "A090", "name": "Business Bank Account", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Business Bank Account", "currency": "GBP", "currentBalance": 924.25, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id", "DirectIncome.LineItems.AccountRef.Id", "DirectCost.LineItems.AccountRef.Id"]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:35:08Z", "sourceModifiedDate": "2023-02-17T11:10:49", "id": "a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba", "nominalCode": "A091", "name": "Business Savings Account", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Business Savings Account", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id", "DirectIncome.LineItems.AccountRef.Id", "DirectCost.LineItems.AccountRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 90, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/accounts"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/accounts?page=2&pageSize=2"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-02-05T14:58:44", "id": "104957000000000352", "nominalCode": "", "name": "Accounts Receivable", "description": "The money that customers owe you becomes the accounts receivable. A good example of this is a payment expected from an invoice sent to your customer.", "fullyQualifiedCategory": "Asset.accounts_receivable", "fullyQualifiedName": "Asset.accounts_receivable.Accounts Receivable", "currency": "GBP", "currentBalance": -959.64, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}, {"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-02-17T12:19:47", "id": "104957000000060010", "nominalCode": "", "name": "Abdi Test", "description": "", "fullyQualifiedCategory": "Asset.bank", "fullyQualifiedName": "Asset.bank.Abdi Test", "currency": "GBP", "currentBalance": 69858.44, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 68, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-account: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:15Z", "sourceModifiedDate": "2022-12-10T16:39:00", "id": "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", "nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Asset.Current.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-03-09T16:31:54Z", "id": "8eaed16d-c69f-ec11-80f1-0022481b4546", "nominalCode": "45422026-68CA-4EF2-9", "name": "", "fullyQualifiedCategory": " .", "fullyQualifiedName": "..", "currency": "GBP", "currentBalance": 0, "type": "Unknown", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["DirectCost.LineItems.AccountRef.Id"]}]} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:36:17Z", "sourceModifiedDate": "2020-01-08T09:42:54Z", "id": "ef2fde36-4416-4bc5-b239-315b2929348c", "nominalCode": "1300", "name": "Debiteuren", "description": "Debiteuren", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Debiteuren.PaymentsEnabled", "currency": "EUR", "currentBalance": 864435.44, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:35:15Z", "sourceModifiedDate": "2017-08-01T17:31:12Z", "id": "ca2b96b7-cc45-4e35-9fa3-82a2ba1eec40", "nominalCode": "THING", "name": "Some thing account", "description": "Some thing account", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Some thing account.PaymentsEnabled", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:19:12Z", "id": "601", "nominalCode": "601", "name": "Capital Asset Brought Forward", "fullyQualifiedCategory": "Asset.Capital", "fullyQualifiedName": "Asset.Capital.Capital Asset Brought Forward", "currency": "GBP", "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:24Z", "id": "67357", "nominalCode": "1200", "name": "Accounts Receivable", "fullyQualifiedCategory": "Asset", "fullyQualifiedName": "Asset.Accounts Receivable", "currency": "GBP", "currentBalance": 51445.53, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:16Z", "id": "27840056", "nominalCode": "70700", "name": "16th Account", "fullyQualifiedCategory": "Asset.BankAccount", "fullyQualifiedName": "Asset.BankAccount.16th Account", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-30T14:48:33Z", "sourceModifiedDate": "2021-08-11T12:51:21", "id": "111", "name": "Accounts Payable", "fullyQualifiedCategory": "AcctPay.AcctPay", "fullyQualifiedName": "AcctPay.AcctPay.Accounts Payable", "currentBalance": -635.55, "type": "Liability", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:06:23Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "40000-933270541", "nominalCode": "11000", "name": "Accounts Receivable", "description": "Accounts Receivable", "fullyQualifiedCategory": "Asset.CurrentAsset.AccountsReceivable", "fullyQualifiedName": "Asset.CurrentAsset.AccountsReceivable.Accounts Receivable", "currency": "GBP", "currentBalance": 93007.93, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:34Z", "sourceModifiedDate": "2022-12-08T15:42:59Z", "id": "62", "nominalCode": "246", "name": "Debtors", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors", "currency": "GBP", "currentBalance": 41289.37, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-26T01:18:15Z", "id": "70", "name": "Debtors", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors", "currency": "GBP", "currentBalance": 3041173.77, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:35:52Z", "id": "2864", "nominalCode": "1200", "name": "Bank Account", "description": "Bank Account", "fullyQualifiedCategory": "Asset.Bank Account", "fullyQualifiedName": "Asset.Bank Account.Bank Account", "type": "Asset", "status": "Archived", "isBankAccount": false, "validDatatypeLinks": []} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1100", "nominalCode": "1100", "name": "Debtors Control Account", "fullyQualifiedCategory": "Asset.CurrentAssets.Debtors", "fullyQualifiedName": "Asset.CurrentAssets.Debtors.Debtors Control Account", "currency": "GBP", "currentBalance": 90640.61, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-27T10:53:26Z", "id": "e5889b459f544926ac5b8e6756df2ad4", "nominalCode": "1560", "name": "Abdi Internet Bank", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Abdi Internet Bank", "currency": "GBP", "currentBalance": 49.61, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:31:51Z", "sourceModifiedDate": "2020-01-29T01:42:43", "id": "2", "nominalCode": "12100", "name": "Accounts Receivable", "fullyQualifiedCategory": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable", "fullyQualifiedName": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-11-16T18:15:17Z", "id": "QWNjb3VudDo5MjIzNDE3NjkzMzk3NjA2MzM7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "name": "Abdi Bank", "description": "Test Balance Sheet", "fullyQualifiedCategory": "Asset.CashAndBank", "fullyQualifiedName": "Asset.CashAndBank.Abdi Bank", "currency": "GBP", "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:35:08Z", "sourceModifiedDate": "2023-02-17T11:10:49", "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "nominalCode": "A090", "name": "Business Bank Account", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Business Bank Account", "currency": "GBP", "currentBalance": 924.25, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id", "DirectIncome.LineItems.AccountRef.Id", "DirectCost.LineItems.AccountRef.Id"]}]} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-02-05T14:58:44", "id": "104957000000000352", "nominalCode": "", "name": "Accounts Receivable", "description": "The money that customers owe you becomes the accounts receivable. A good example of this is a payment expected from an invoice sent to your customer.", "fullyQualifiedCategory": "Asset.accounts_receivable", "fullyQualifiedName": "Asset.accounts_receivable.Accounts Receivable", "currency": "GBP", "currentBalance": -959.64, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-cash-flow-statement: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2021-02-01T00:00:00", "toDate": "2021-02-28T00:00:00", "cashReceipts": {"accountId": "cashReceipts", "name": "Cash Receipts", "value": 18377.72, "items": [{"accountId": "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", "name": "Accounts Receivable", "value": 11417.63, "items": []}, {"accountId": "72df89d2-512b-4455-af51-a6b563733842", "name": "Income", "value": 6960.09, "items": []}, {"accountId": "68794a8f-b22d-4520-b97b-025b7cb10f94", "name": "Other Income", "value": 0, "items": []}]}, "cashPayments": {"accountId": "cashPayments", "name": "Cash Payments", "value": 12377.81, "items": [{"accountId": "53bf27a7-7497-4c61-9887-dfaad5c6d80a", "name": "Accounts Payable", "value": 7479.21, "items": []}, {"accountId": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Cost of Sales", "value": 700, "items": []}, {"accountId": "e6f7e297-59d6-4bd5-9353-478ee9b39685", "name": "Expenses", "value": 4198.6, "items": []}, {"accountId": "b5e801e8-8dbc-4390-ac99-3b0fff54a89f", "name": "Other Expenses", "value": 0, "items": []}]}}, {"fromDate": "2021-01-01T00:00:00", "toDate": "2021-01-31T00:00:00", "cashReceipts": {"accountId": "cashReceipts", "name": "Cash Receipts", "value": 14508.56, "items": [{"accountId": "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", "name": "Accounts Receivable", "value": 3055.53, "items": []}, {"accountId": "72df89d2-512b-4455-af51-a6b563733842", "name": "Income", "value": 11453.03, "items": []}, {"accountId": "68794a8f-b22d-4520-b97b-025b7cb10f94", "name": "Other Income", "value": 0, "items": []}]}, "cashPayments": {"accountId": "cashPayments", "name": "Cash Payments", "value": 18902.85, "items": [{"accountId": "53bf27a7-7497-4c61-9887-dfaad5c6d80a", "name": "Accounts Payable", "value": 9673.66, "items": []}, {"accountId": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Cost of Sales", "value": 1250, "items": []}, {"accountId": "e6f7e297-59d6-4bd5-9353-478ee9b39685", "name": "Expenses", "value": 7979.19, "items": []}, {"accountId": "b5e801e8-8dbc-4390-ac99-3b0fff54a89f", "name": "Other Expenses", "value": 0, "items": []}]}}], "reportBasis": "Cash", "reportInput": "Direct", "currency": "GBP", "mostRecentAvailableMonth": "2021-02-28T00:00:00", "earliestAvailableMonth": "2019-03-01T00:00:00"} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-04-01T00:00:00", "toDate": "2023-04-30T00:00:00", "cashReceipts": {"accountId": "CashReceipts", "name": "CashReceipts", "value": 0, "items": []}, "cashPayments": {"accountId": "CashPayments", "name": "CashPayments", "value": 0, "items": []}}, {"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "cashReceipts": {"accountId": "CashReceipts", "name": "CashReceipts", "value": 0, "items": []}, "cashPayments": {"accountId": "CashPayments", "name": "CashPayments", "value": 0, "items": []}}], "reportBasis": "Cash", "reportInput": "Indirect", "currency": "GBP", "mostRecentAvailableMonth": "2023-04-30T00:00:00", "earliestAvailableMonth": "2021-05-01T00:00:00"} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-04-01T00:00:00", "toDate": "2023-04-30T00:00:00", "cashReceipts": {"accountId": "cashReceipts", "name": "Cash Receipts", "value": 754.59, "items": [{"accountId": "income", "name": "Income", "value": 729.59, "items": []}, {"accountId": "accountsReceivable", "name": "Accounts Receivable", "value": 25, "items": []}]}, "cashPayments": {"accountId": "cashPayments", "name": "Cash Payments", "value": -987.94, "items": [{"accountId": "costOfSales", "name": "Cost of Sales", "value": 24.06, "items": []}, {"accountId": "expenses", "name": "Expenses", "value": -1012, "items": []}]}}, {"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T00:00:00", "cashReceipts": {"accountId": "cashReceipts", "name": "Cash Receipts", "value": 1776.25, "items": [{"accountId": "income", "name": "Income", "value": 1652.12, "items": []}, {"accountId": "accountsReceivable", "name": "Accounts Receivable", "value": 124.13, "items": []}]}, "cashPayments": {"accountId": "cashPayments", "name": "Cash Payments", "value": 2494.43, "items": [{"accountId": "costOfSales", "name": "Cost of Sales", "value": 2562, "items": []}, {"accountId": "accountsPayable", "name": "Accounts Payable", "value": 38.02, "items": []}, {"accountId": "expenses", "name": "Expenses", "value": -105.59, "items": []}]}}], "reportBasis": "Cash", "reportInput": "Direct", "currency": "GBP", "mostRecentAvailableMonth": "2023-04-30T00:00:00", "earliestAvailableMonth": "2021-05-01T00:00:00"} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-01-01T00:00:00", "toDate": "2023-01-31T00:00:00", "cashReceipts": {"accountId": "cashReceipts", "name": "Cash Receipts", "value": 0, "items": []}, "cashPayments": {"accountId": "cashPayments", "name": "Cash Payments", "value": 4300, "items": [{"accountId": "expenses", "name": "Expenses", "value": 4300, "items": []}]}}, {"fromDate": "2022-12-01T00:00:00", "toDate": "2022-12-31T00:00:00", "cashReceipts": {"accountId": "cashReceipts", "name": "Cash Receipts", "value": 0, "items": []}, "cashPayments": {"accountId": "cashPayments", "name": "Cash Payments", "value": 10, "items": [{"accountId": "expenses", "name": "Expenses", "value": 10, "items": []}]}}], "reportBasis": "Cash", "reportInput": "Direct", "currency": "GBP", "mostRecentAvailableMonth": "2023-01-31T00:00:00", "earliestAvailableMonth": "2021-02-01T00:00:00"} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2023-03-01T00:00:00", "toDate": "2023-03-31T23:59:59.9999999", "cashReceipts": {"accountId": "cashReceipt", "name": "Cash Receipts", "value": 0, "items": []}, "cashPayments": {"accountId": "cashPayment", "name": "Cash Payments", "value": 0, "items": []}}, {"fromDate": "2023-02-01T00:00:00", "toDate": "2023-02-28T23:59:59.9999999", "cashReceipts": {"accountId": "cashReceipt", "name": "Cash Receipts", "value": 0, "items": []}, "cashPayments": {"accountId": "cashPayment", "name": "Cash Payments", "value": 0, "items": []}}], "reportBasis": "Cash", "reportInput": "Direct", "currency": "GBP", "mostRecentAvailableMonth": "2023-03-31T00:00:00", "earliestAvailableMonth": "2021-04-01T00:00:00"} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "200": - application/json: {"reports": [{"fromDate": "2022-10-01T00:00:00", "toDate": "2022-10-31T00:00:00", "cashReceipts": {"accountId": "receipts", "name": "Cash Receipts", "value": 0, "items": [{"accountId": "income", "name": "Net Income", "value": 0, "items": []}, {"accountId": "104957000000000352", "name": "Accounts Receivable", "value": 0, "items": []}, {"accountId": "104957000000000358", "name": "Advance Tax", "value": 0, "items": []}, {"accountId": "104957000000618001", "name": "Creadit Card - BA Company", "value": 0, "items": []}, {"accountId": "104957000000183010", "name": "Credit Card", "value": 0, "items": []}, {"accountId": "104957000000000460", "name": "Employee Reimbursements", "value": 0, "items": []}, {"accountId": "104957000000033015", "name": "Input VAT", "value": 0, "items": []}, {"accountId": "104957000000000511", "name": "Inventory Asset", "value": 0, "items": []}, {"accountId": "104957000000033017", "name": "Output VAT", "value": 0, "items": []}, {"accountId": "104957000000032010", "name": "Prepaid Expenses", "value": 0, "items": []}, {"accountId": "104957000000006001", "name": "Tag Adjustments", "value": 0, "items": []}, {"accountId": "104957000000085001", "name": "Test stock account", "value": 0, "items": []}, {"accountId": "104957000000000501", "name": "Unearned Revenue", "value": 0, "items": []}]}, "cashPayments": {"accountId": "payments", "name": "Cash Payments", "value": 0, "items": [{"accountId": "104957000000000361", "name": "Accounts Payable", "value": 0, "items": []}]}}, {"fromDate": "2022-09-01T00:00:00", "toDate": "2022-09-30T00:00:00", "cashReceipts": {"accountId": "receipts", "name": "Cash Receipts", "value": -5, "items": [{"accountId": "income", "name": "Net Income", "value": -35, "items": []}, {"accountId": "104957000000000352", "name": "Accounts Receivable", "value": 30, "items": []}, {"accountId": "104957000000000358", "name": "Advance Tax", "value": 0, "items": []}, {"accountId": "104957000000618001", "name": "Creadit Card - BA Company", "value": 0, "items": []}, {"accountId": "104957000000183010", "name": "Credit Card", "value": 0, "items": []}, {"accountId": "104957000000000460", "name": "Employee Reimbursements", "value": 0, "items": []}, {"accountId": "104957000000000511", "name": "Inventory Asset", "value": 0, "items": []}, {"accountId": "104957000000033017", "name": "Output VAT", "value": 0, "items": []}, {"accountId": "104957000000032010", "name": "Prepaid Expenses", "value": 0, "items": []}, {"accountId": "104957000000006001", "name": "Tag Adjustments", "value": 0, "items": []}, {"accountId": "104957000000085001", "name": "Test stock account", "value": 0, "items": []}, {"accountId": "104957000000000501", "name": "Unearned Revenue", "value": 0, "items": []}]}, "cashPayments": {"accountId": "payments", "name": "Cash Payments", "value": 7, "items": [{"accountId": "104957000000000361", "name": "Accounts Payable", "value": 0, "items": []}, {"accountId": "104957000000033015", "name": "Input VAT", "value": 7, "items": []}]}}], "reportBasis": "Accrual", "reportInput": "Indirect", "currency": "GBP", "mostRecentAvailableMonth": "2022-10-31T00:00:00", "earliestAvailableMonth": "2019-11-01T00:00:00"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - periodLength: 4 - periodsToCompare: 20 - startMonth: "2022-10-23T00:00:00Z" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-categorized-bank-statement: - speakeasy-default-get-categorized-bank-statement: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "200": - application/json: {"reportInfo": {"pageNumber": 1, "pageSize": 100, "totalResults": 2401, "reportName": "Cash Flow transactions report", "companyName": "Example Company", "generatedDate": "2023-01-25T22:36:05.125Z"}, "dataSources": [{"accounts": [{"sourceRef": {"sourceType": "Banking"}, "platformName": "Plaid", "accountProvider": "Bank of Sandbox", "accountName": "Business Current Account", "accountType": "Debit", "currency": "USD", "currentBalance": 1000}, {"sourceRef": {"sourceType": "Banking"}, "platformName": "Plaid", "accountProvider": "Bank of Sandbox", "accountName": "Business Saving Account", "accountType": "Debit", "currency": "USD", "currentBalance": 5321}]}], "reportItems": [{"transactions": [{"sourceRef": {"sourceType": "Banking"}}, {"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "date": "2023-01-25", "description": "Payment to supplier", "amount": 100, "currency": "USD", "transactionCategory": {"confidence": 92.7, "confidences": [92.7, 95, 96], "levels": ["Asset", "Current", "Bank"]}, "platformName": "Plaid", "counterpartyNames": ["Counterparty"], "accountRef": {"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", "name": "Business Current Account"}, "modifiedDate": "2023-01-25T22:36:05.125Z"}, {"sourceRef": {"sourceType": "Banking"}}, {"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "date": "2023-01-25", "description": "Payment to supplier", "amount": 100, "currency": "USD", "transactionCategory": {}, "platformName": "Plaid", "counterpartyNames": [], "accountRef": {"id": "12345678-1234-1234-1234-123456789012", "name": "Business Saving Account"}, "modifiedDate": "2023-01-25T22:36:05.125Z"}]}]} - "400": - application/json: {} - "500": - application/json: {} - Categorized bank statement: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "200": - application/json: {"reportInfo": {"pageNumber": 1, "pageSize": 10, "totalResults": 2194, "reportName": "Cash flow transactions report", "companyName": "test", "generatedDate": "2023-03-24T16:44:17.5302732Z"}, "dataSources": [{"accounts": [{"sourceRef": {"sourceType": "Banking"}, "platformName": "Banking Sandbox", "accountProvider": "Lloyds Bank", "accountName": "Business Savings Account", "accountType": "Debit", "currency": "GBP", "currentBalance": 0}, {"sourceRef": {"sourceType": "Banking"}, "platformName": "Banking Sandbox", "accountProvider": "Lloyds Bank", "accountName": "Banking - Business Credit Card", "accountType": "Credit", "currency": "GBP", "currentBalance": 0}, {"sourceRef": {"sourceType": "Banking"}, "platformName": "Banking Sandbox", "accountProvider": "Lloyds Bank", "accountName": "Business Undeposited Funds", "accountType": "Debit", "currency": "GBP", "currentBalance": 0}, {"sourceRef": {"sourceType": "Banking"}, "platformName": "Banking Sandbox", "accountProvider": "Lloyds Bank", "accountName": "Business Current Account", "accountType": "Debit", "currency": "GBP", "currentBalance": 0}]}], "reportItems": [{"transactions": [{"id": "ab5e07a0-5578-4d91-8421-2dc72713b74f", "date": "2022-11-08T00:00:00", "description": "Payment m86SDGpQr3", "amount": -6905.44, "currency": "GBP", "transactionCategory": {"confidence": 52.53, "confidences": [56, 52.53], "levels": ["Expense", "Operating"]}, "platformName": "Shopify", "counterpartyNames": ["Shopify"], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", "name": "Business Current Account"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "9846bbed-46d3-472c-a848-1ce8ebea7213", "date": "2022-11-08T00:00:00", "description": "Payment from customer a5c68c7b-6825-46de-bf63-6ad23ef506a4", "amount": 4332.84, "currency": "GBP", "transactionCategory": {"confidence": 88, "confidences": [88], "levels": ["Expense"]}, "platformName": "Amazon", "counterpartyNames": ["Amazon", "Amazon Marketplace"], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", "name": "Business Current Account"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "94b213fb-d742-435e-90f1-bfe723a076d5", "date": "2022-11-08T00:00:00", "description": "Payment from customer a5c68c7b-6825-46de-bf63-6ad23ef506a4", "amount": 4034.3, "currency": "GBP", "transactionCategory": {"confidence": 61.08, "confidences": [65, 61.08], "levels": ["Income", "Revenue"]}, "platformName": "Shopify", "counterpartyNames": [], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "809b9470-c9fa-4257-bc9f-06a1dc7b0cbc", "name": "Business Undeposited Funds"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "cfceb7ff-eaa2-45b6-aca7-fa0e0b439161", "date": "2022-11-08T00:00:00", "description": "Payment to supplier 78792d13-90a0-4ea2-8e07-81c3c893997e", "amount": -313.76, "currency": "GBP", "transactionCategory": {"confidence": 40.98, "confidences": [40.98, 99.9], "levels": ["Expense", "CostOfSales"]}, "platformName": "Amazon", "counterpartyNames": [], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", "name": "Business Current Account"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "ba814f14-0fe3-41d0-9308-57f40642ac75", "date": "2022-11-08T00:00:00", "description": "Payment to supplier 46d2e1fb-b4e9-469c-814a-21ff8105a26e", "amount": -614.4, "currency": "GBP", "transactionCategory": {"confidence": 55.84, "confidences": [55.84, 75.5], "levels": ["Income", "Revenue"]}, "platformName": "Zettle", "counterpartyNames": [], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "809b9470-c9fa-4257-bc9f-06a1dc7b0cbc", "name": "Business Undeposited Funds"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "e67cc30e-fd5c-4eea-8365-ec40dfdd3ef6", "date": "2022-11-08T00:00:00", "description": "Payment from customer a5c68c7b-6825-46de-bf63-6ad23ef506a4", "amount": 5199.62, "currency": "GBP", "transactionCategory": {"confidence": 57.85, "confidences": [57.85], "levels": ["Expense"]}, "platformName": "Amazon", "counterpartyNames": [], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", "name": "Business Current Account"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "e0f08a0b-3575-4dde-98c4-3c854028d2d2", "date": "2022-11-08T00:00:00", "description": "Payment to supplier 18ac18dc-945b-4083-9013-e8a100b999fa", "amount": -21420.94, "currency": "GBP", "transactionCategory": {"confidence": 70.58, "confidences": [70.58, 100], "levels": ["Expense", "Operating"]}, "platformName": "Amazon", "counterpartyNames": [], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", "name": "Business Current Account"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "4b70d379-8284-4f44-bb37-c7935df950cc", "date": "2022-11-08T00:00:00", "description": "Payment to supplier 630a3f16-5f01-4986-ae6b-82333ec49449", "amount": -30924.22, "currency": "GBP", "transactionCategory": {"confidence": 48.26, "confidences": [48.26], "levels": ["Income"]}, "platformName": "DoorDash", "counterpartyNames": [], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "809b9470-c9fa-4257-bc9f-06a1dc7b0cbc", "name": "Business Undeposited Funds"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "76b73373-9345-472e-8edf-5be849d797fe", "date": "2022-11-08T00:00:00", "description": "Payment to supplier bQATU4eSb9", "amount": -568.78, "currency": "GBP", "transactionCategory": {"confidence": 65.21, "confidences": [65.21, 100], "levels": ["Income", "Revenue"]}, "platformName": "Uber", "counterpartyNames": ["Uber"], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "809b9470-c9fa-4257-bc9f-06a1dc7b0cbc", "name": "Business Undeposited Funds"}, "modifiedDate": "2022-11-08T12:00:00"}, {"id": "ee92fd6f-e0f7-4391-85fd-4b50921b973f", "date": "2022-11-08T00:00:00", "description": "Payment to supplier 9c37eb21-579a-4886-8296-3a853076b7bd", "amount": -13050.79, "currency": "GBP", "transactionCategory": {"confidence": 92.33, "confidences": [92.33, 92.33], "levels": ["Income", "Revenue"]}, "platformName": "DoorDash", "counterpartyNames": ["DoorDash"], "sourceRef": {"sourceType": "Banking"}, "accountRef": {"id": "809b9470-c9fa-4257-bc9f-06a1dc7b0cbc", "name": "Business Undeposited Funds"}, "modifiedDate": "2022-11-08T12:00:00"}]}]} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-banking-account-balances: - speakeasy-default-list-banking-account-balances: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Basiq: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-28T07:15:07Z", "accountId": "4811e776-6187-48d9-afee-635fb0d89d93", "balance": {"current": 11389.85}, "date": "2017-12-31T00:00:00Z"}, {"modifiedDate": "2022-10-28T07:15:07Z", "accountId": "4811e776-6187-48d9-afee-635fb0d89d93", "balance": {"current": 8002.09}, "date": "2018-01-01T00:00:00Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 3103, "_links": {"self": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-accountBalances"}, "current": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-accountBalances?page=1&pageSize=2"}, "next": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-accountBalances?page=2&pageSize=2"}}} - Plaid: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-27T10:50:16Z", "accountId": "3opGv6XXNeHPEgNVbQpyCr8MAKQ3noC8Qz1zB", "balance": {"current": 205.78}, "date": "2022-10-13T00:00:00"}, {"modifiedDate": "2022-10-27T10:50:16Z", "accountId": "3opGv6XXNeHPEgNVbQpyCr8MAKQ3noC8Qz1zB", "balance": {"current": 205.78}, "date": "2022-10-14T00:00:00"}], "pageNumber": 1, "pageSize": 2, "totalResults": 14, "_links": {"self": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-accountBalances"}, "current": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-accountBalances?page=1&pageSize=2"}, "next": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-accountBalances?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-banking-accounts: - speakeasy-default-list-banking-accounts: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Basiq: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-28T07:14:48Z", "sourceModifiedDate": "2022-10-27T13:00:00Z", "id": "4811e776-6187-48d9-afee-635fb0d89d93", "name": "Hooli Saver", "holder": "david smith", "type": "Debit", "balance": {"available": 2932.85, "current": 2932.85}, "identifiers": {"type": "Account", "number": "14293919644182", "bankCode": "416-982"}, "currency": "AUD", "institution": {"id": "AU00000", "name": "Hooli Bank"}}, {"modifiedDate": "2022-10-28T07:14:48Z", "sourceModifiedDate": "2022-10-27T13:00:00Z", "id": "736d90a5-f836-4ae0-a161-1e8056f39701", "name": "Standard Variable Rate Home Loan", "holder": "david smith", "type": "Credit", "balance": {"available": 6940.31, "current": 6940.31}, "identifiers": {"type": "Loan", "number": "14293919644183", "bankCode": "416-982"}, "currency": "AUD", "institution": {"id": "AU00000", "name": "Hooli Bank"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-accounts"}, "current": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-accounts?page=1&pageSize=2"}, "next": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-accounts?page=2&pageSize=2"}}} - Plaid: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-27T10:50:16Z", "id": "3opGv6XXNeHPEgNVbQpyCr8MAKQ3noC8Qz1zB", "name": "Plaid Silver Standard 0.1% Interest Saving", "informalName": "Plaid Saving", "type": "Debit", "balance": {"available": 200, "current": 210}, "identifiers": {"type": "Depository", "number": "1111222233331111", "bankCode": "00021", "maskedAccountNumber": "1111"}, "currency": "CAD", "institution": {"id": "ins_100533", "name": "American Express (CA)"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-accounts"}, "current": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-accounts?page=1&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-banking-account: - Basiq: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-28T07:14:48Z", "sourceModifiedDate": "2022-10-27T13:00:00Z", "id": "4811e776-6187-48d9-afee-635fb0d89d93", "name": "Hooli Saver", "holder": "david smith", "type": "Debit", "balance": {"available": 2932.85, "current": 2932.85}, "identifiers": {"type": "Account", "number": "14293919644182", "bankCode": "416-982"}, "currency": "AUD", "institution": {"id": "AU00000", "name": "Hooli Bank"}} - Plaid: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-27T10:50:16Z", "id": "3opGv6XXNeHPEgNVbQpyCr8MAKQ3noC8Qz1zB", "name": "Plaid Silver Standard 0.1% Interest Saving", "informalName": "Plaid Saving", "type": "Debit", "balance": {"available": 200, "current": 210}, "identifiers": {"type": "Depository", "number": "1111222233331111", "bankCode": "00021", "maskedAccountNumber": "1111"}, "currency": "CAD", "institution": {"id": "ins_100533", "name": "American Express (CA)"}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-banking-transactions: - speakeasy-default-list-banking-transactions: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Basiq: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-28T07:15:10Z", "id": "00017a94-c681-448d-ba8d-585a81b4128f", "accountId": "feb76128-7650-4b02-a323-e1606146be0c", "description": "RENTALCARTOLLPH131865 PARRAMATTA AU Card xx0399 Value Date: 25/07/2019", "amount": -14.26, "currency": "AUD", "postedDate": "2019-07-31T00:00:00Z", "code": "Unknown", "merchantName": "", "transactionCategoryRef": {"id": "payment", "name": "Payment"}}, {"modifiedDate": "2022-10-28T07:15:10Z", "id": "0023c431-35c8-41f5-b75e-9239413cde7e", "accountId": "4811e776-6187-48d9-afee-635fb0d89d93", "description": "Transfer from xx9263 CommBank app Shop", "amount": 191, "currency": "AUD", "postedDate": "2018-07-31T00:00:00Z", "code": "Unknown", "merchantName": "", "transactionCategoryRef": {"id": "transfer", "name": "Transfer"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 3319, "_links": {"self": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-transactions"}, "current": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-transactions?page=1&pageSize=2"}, "next": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-transactions?page=2&pageSize=2"}}} - Plaid: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-27T10:50:25Z", "id": "1514wvMMajumgG7xWA1Bt8o15xP5k3fmeo9Bg_EC6E0DC820E1F9D1A2300BF4A5B80513", "accountId": "3opGv6XXNeHPEgNVbQpyCr8MAKQ3noC8Qz1zB", "description": "CREDIT CARD 3333 PAYMENT *//", "amount": -25, "currency": "CAD", "postedDate": "2021-05-10T00:00:00", "authorizedDate": "2021-05-09T00:00:00", "code": "Unknown", "transactionCategoryRef": {"id": "TRANSFER_OUT.TRANSFER_OUT_ACCOUNT_TRANSFER", "name": "TRANSFER_OUT_ACCOUNT_TRANSFER"}}, {"modifiedDate": "2022-10-27T10:50:25Z", "id": "1514wvMMajumgG7xWA1Bt8oDLxlpm3i3zraD7_6DB63D1DACF6F5824C80F8BE2E066DB5", "accountId": "3opGv6XXNeHPEgNVbQpyCr8MAKQ3noC8Qz1zB", "description": "CREDIT CARD 3333 PAYMENT *//", "amount": -25, "currency": "CAD", "postedDate": "2022-10-02T00:00:00", "authorizedDate": "2022-10-01T00:00:00", "code": "Unknown", "transactionCategoryRef": {"id": "TRANSFER_OUT.TRANSFER_OUT_ACCOUNT_TRANSFER", "name": "TRANSFER_OUT_ACCOUNT_TRANSFER"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 49, "_links": {"self": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-transactions"}, "current": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-transactions?page=1&pageSize=2"}, "next": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-transactions?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-banking-transaction: - Basiq: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-28T07:15:10Z", "id": "00017a94-c681-448d-ba8d-585a81b4128f", "accountId": "feb76128-7650-4b02-a323-e1606146be0c", "description": "RENTALCARTOLLPH131865 PARRAMATTA AU Card xx0399 Value Date: 25/07/2019", "amount": -14.26, "currency": "AUD", "postedDate": "2019-07-31T00:00:00Z", "code": "Unknown", "merchantName": "", "transactionCategoryRef": {"id": "payment", "name": "Payment"}} - Plaid: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-27T10:50:25Z", "id": "1514wvMMajumgG7xWA1Bt8o15xP5k3fmeo9Bg_EC6E0DC820E1F9D1A2300BF4A5B80513", "accountId": "3opGv6XXNeHPEgNVbQpyCr8MAKQ3noC8Qz1zB", "description": "CREDIT CARD 3333 PAYMENT *//", "amount": -25, "currency": "CAD", "postedDate": "2021-05-10T00:00:00", "authorizedDate": "2021-05-09T00:00:00", "code": "Unknown", "transactionCategoryRef": {"id": "TRANSFER_OUT.TRANSFER_OUT_ACCOUNT_TRANSFER", "name": "TRANSFER_OUT_ACCOUNT_TRANSFER"}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-banking-transaction-categories: - speakeasy-default-list-banking-transaction-categories: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Basiq: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-28T07:14:46", "id": "bank-fee", "name": "Bank Fee", "hasChildren": false, "status": "Active"}, {"modifiedDate": "2022-10-28T07:14:46", "id": "cash-withdrawal", "name": "Cash Withdrawal", "hasChildren": false, "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 9, "_links": {"self": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-transactionCategories"}, "current": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-transactionCategories?page=1&pageSize=2"}, "next": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/connections/b4703906-e631-46f1-9acc-7e237acdc64d/data/banking-transactionCategories?page=2&pageSize=2"}}} - Plaid: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-27T10:50:17", "id": "BANK_FEES", "name": "BANK_FEES", "hasChildren": true, "status": "Active"}, {"modifiedDate": "2022-10-27T10:50:17", "id": "BANK_FEES.BANK_FEES_ATM_FEES", "name": "BANK_FEES_ATM_FEES", "parentId": "BANK_FEES", "hasChildren": false, "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 120, "_links": {"self": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-transactionCategories"}, "current": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-transactionCategories?page=1&pageSize=2"}, "next": {"href": "/companies/efc2d985-cdb3-4724-8be3-c7310f7ead6c/connections/6c44dc44-e1b1-4578-800f-0bdefb658db7/data/banking-transactionCategories?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-banking-transaction-category: - Basiq: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionCategoryId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-28T07:14:46", "id": "bank-fee", "name": "Bank Fee", "hasChildren": false, "status": "Active"} - Plaid: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionCategoryId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-27T10:50:17", "id": "BANK_FEES", "name": "BANK_FEES", "hasChildren": true, "status": "Active"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionCategoryId: "" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-reconciled-invoices: - speakeasy-default-list-reconciled-invoices: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "200": - application/json: {"reportInfo": {}, "reportItems": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "payments": [{"date": "2022-10-23T00:00:00Z", "currency": "GBP", "bankingTransactionRefs": [{"date": "2022-10-23T00:00:00Z"}]}], "paidOnDate": "2022-10-23T00:00:00Z"}]} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-invoices: - speakeasy-default-list-accounting-invoices: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2023-01-28T14:41:02", "id": "2518ca08-5e2a-4630-8cee-a6bcd1625660", "invoiceNumber": "TKj7oD38", "customerRef": {"id": "d65ac505-072c-49ec-be3c-3cb74228966d", "companyName": "Jensen Steuber"}, "salesOrderRefs": [], "issueDate": "2022-04-25T13:04:02", "dueDate": "2022-04-25T13:04:02", "paidOnDate": "2022-04-25T13:04:02", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Heavy Duty Hinged Gully Grating x4.00", "unitAmount": 402.89, "quantity": 4, "subTotal": 1611.56, "taxAmount": 161.16, "totalAmount": 1772.72, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1", "name": "Heavy Duty Hinged Gully Grating"}, "trackingCategoryRefs": [{"id": "costcode_9", "name": "PandaConstruction"}], "isDirectIncome": true}], "paymentAllocations": [{"payment": {"id": "9407d5ee-893a-4547-bd89-bc7b795ee774", "note": "Payment against invoice 2518ca08-5e2a-4630-8cee-a6bcd1625660", "reference": "2518ca08-5e2a-4630-8cee-a6bcd1625660", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-04-25T13:04:02", "totalAmount": 1772.72}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-04-25T13:04:02", "totalAmount": -1772.72}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 1611.56, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 161.16, "totalAmount": 1772.72, "amountDue": 0, "discountPercentage": 0, "status": "Paid", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-08-22T07:43:02", "id": "ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "invoiceNumber": "4F6ONfFP", "customerRef": {"id": "a82042f1-a005-4ca5-bfd3-5bc237123aa5", "companyName": "Keara Leffler"}, "salesOrderRefs": [], "issueDate": "2022-04-25T13:04:02", "dueDate": "2022-04-25T13:04:02", "paidOnDate": "2022-04-25T13:04:02", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Heavy Duty Hinged Gully Grating x8.28", "unitAmount": 402.89, "quantity": 8.28, "subTotal": 3335.93, "taxAmount": 333.59, "totalAmount": 3669.52, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1", "name": "Heavy Duty Hinged Gully Grating"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "7ba4fc1b-e248-49ba-8bf8-0813d7f203a8", "note": "Payment against invoice ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "reference": "ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-04-25T13:04:02", "totalAmount": 3669.52}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-04-25T13:04:02", "totalAmount": -3669.52}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 3335.93, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 333.59, "totalAmount": 3669.52, "amountDue": 0, "discountPercentage": 0, "status": "Paid", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 142, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/invoices"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/invoices?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-05-17T16:29:00Z", "id": "18c906bf-89d1-ea11-bbaa-000d3a2b9185", "invoiceNumber": "103001", "customerRef": {"id": "b61217b3-89d1-ea11-bbaa-000d3a2b9185", "companyName": "Trey Researches"}, "salesOrderRefs": [], "issueDate": "2019-01-15T00:00:00", "dueDate": "2019-01-15T00:00:00", "paidOnDate": "2019-01-15T00:00:00", "currency": "GBP", "lineItems": [{"description": "AMSTERDAM Lamp", "unitAmount": 35.6, "quantity": 3, "discountAmount": 0, "subTotal": 106.8, "taxAmount": 21.36, "totalAmount": 128.16, "accountRef": {"id": "181217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Income, Product Sales"}, "discountPercentage": 0, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-d41217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "AMSTERDAM Lamp / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "e0299ced-89d1-ea11-bbaa-000d3a2b9185", "note": "Invoice 102001", "reference": "Document No: 103001", "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-01-15T00:00:00", "totalAmount": 128.16}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2019-01-15T00:00:00", "totalAmount": -128.16}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 106.8, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 21.36, "totalAmount": 128.16, "amountDue": 0, "discountPercentage": 0, "status": "Paid", "note": "", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-08-10T14:46:08Z", "id": "31e97827-bb18-ed11-90eb-000d3a8747a0", "invoiceNumber": "102287", "customerRef": {"id": "0ef95175-48c4-eb11-9f0a-0022481b4343", "companyName": ""}, "salesOrderRefs": [], "issueDate": "2019-01-15T00:00:00", "dueDate": "2019-01-15T00:00:00", "currency": "USD", "lineItems": [], "paymentAllocations": [], "withholdingTax": [], "totalDiscount": 0, "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 0, "amountDue": 0, "discountPercentage": 0, "status": "Draft", "note": "", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 368, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/invoices"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/invoices?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:57:52Z", "sourceModifiedDate": "2019-11-08T11:56:22Z", "id": "91dccc63-b1af-4363-bee0-2aec6bab1bef", "invoiceNumber": "19700002", "customerRef": {"id": "c3bf08a3-4d51-4859-acbb-5075f9484f87", "companyName": "Mr Abe"}, "salesOrderRefs": [], "issueDate": "2019-11-08T00:00:00Z", "dueDate": "2019-11-29T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Consultancy per uur - Consultancy per uur", "unitAmount": 75, "quantity": 8, "discountAmount": 0, "subTotal": 600, "taxAmount": 0, "totalAmount": 600, "accountRef": {"id": "2421e8a0-5355-4ec0-af11-021fe4f39fcd", "name": "Omzet binnenland hoog tarief"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 600, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 600, "amountDue": 599, "discountPercentage": 0, "status": "PartiallyPaid"}, {"modifiedDate": "2022-10-26T13:57:52Z", "sourceModifiedDate": "2019-11-13T11:47:51Z", "id": "0078bc15-10a4-433d-86fa-b1bb235fc0ab", "invoiceNumber": "19700004", "customerRef": {"id": "46951dc4-a170-42ce-bb38-9a80b776404f", "companyName": "Cust 03"}, "salesOrderRefs": [], "issueDate": "2019-11-13T00:00:00Z", "dueDate": "2019-12-04T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Standaard artikel - Standaard artikel", "unitAmount": 25, "quantity": 1, "discountAmount": 0, "subTotal": 25, "taxAmount": 5.25, "totalAmount": 30.25, "accountRef": {"id": "2421e8a0-5355-4ec0-af11-021fe4f39fcd", "name": "Omzet binnenland hoog tarief"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 25, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 5.25, "totalAmount": 30.25, "amountDue": 30.25, "discountPercentage": 0, "status": "Submitted"}], "pageNumber": 1, "pageSize": 2, "totalResults": 5844, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/invoices"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/invoices?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:39:08Z", "sourceModifiedDate": "2017-08-02T18:23:43Z", "id": "a05d1256-f253-46bd-aa13-c6f6a992aa47", "invoiceNumber": "17700002", "customerRef": {"id": "570321bb-8b0c-49f1-a1f5-6fb1d6d94a62", "companyName": "Some customer"}, "salesOrderRefs": [], "issueDate": "2017-08-02T00:00:00Z", "dueDate": "2017-09-01T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "A bunch of stuff - A bunch of stuff", "unitAmount": 100, "quantity": 1000, "discountAmount": 0, "subTotal": 100000, "taxAmount": 0, "totalAmount": 100000, "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 100000, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 100000, "amountDue": 0, "discountPercentage": 0, "status": "Paid"}, {"modifiedDate": "2022-10-26T13:39:08Z", "sourceModifiedDate": "2017-08-03T12:22:27Z", "id": "0981b5d1-a817-40be-a101-4848f7b1a258", "invoiceNumber": "17700004", "customerRef": {"id": "570321bb-8b0c-49f1-a1f5-6fb1d6d94a62", "companyName": "Some customer"}, "salesOrderRefs": [], "issueDate": "2017-08-03T00:00:00Z", "dueDate": "2017-09-02T00:00:00Z", "paidOnDate": "2017-08-03T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "A bunch of stuff - A bunch of stuff", "unitAmount": 100, "quantity": 150, "discountAmount": 0, "subTotal": 15000, "taxAmount": 0, "totalAmount": 15000, "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 15000, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 15000, "amountDue": 0, "discountPercentage": 0, "status": "Paid"}], "pageNumber": 1, "pageSize": 2, "totalResults": 4214, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/invoices"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/invoices?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:19Z", "sourceModifiedDate": "2022-10-20T14:28:00Z", "id": "50541736", "invoiceNumber": "2348", "customerRef": {"id": "10123537", "companyName": "_Test 1"}, "salesOrderRefs": [], "issueDate": "2016-12-30T00:00:00", "dueDate": "2016-12-30T00:00:00", "paidOnDate": "2020-11-05T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "3.0 items with VatPercentage of 0.0", "unitAmount": 25.26, "quantity": 1, "discountAmount": 0, "subTotal": 25.26, "taxAmount": 0, "totalAmount": 25.26, "accountRef": {"id": "001", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "3 service charges with 0.0% vat", "unitAmount": 8.85, "quantity": 1, "discountAmount": 0, "subTotal": 8.85, "taxAmount": 0, "totalAmount": 8.85, "accountRef": {"id": "001", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Tax", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "262466203", "note": "E2E Test transaction 2 CREDIT �250.00 - Invoice receipt against 2348", "currency": "GBP", "paidOnDate": "2020-11-05T00:00:00", "totalAmount": 250}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -34.11}}], "withholdingTax": [], "subTotal": 34.11, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 34.11, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:19Z", "sourceModifiedDate": "2023-02-06T15:31:38Z", "id": "21974783", "invoiceNumber": "023", "customerRef": {"id": "6162023", "companyName": "Alderley plc"}, "salesOrderRefs": [], "issueDate": "2017-01-09T00:00:00", "dueDate": "2017-02-08T00:00:00", "paidOnDate": "2023-02-06T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Laptop", "unitAmount": 500, "quantity": 22, "discountAmount": 0, "subTotal": 11000, "taxAmount": 0, "totalAmount": 11000, "accountRef": {"id": "001", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Tax", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "154350605", "note": "Test Push Transaction OTHER �123.46 - Invoice receipt against 023 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2018-08-26T00:00:00", "totalAmount": 123.46}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -2}}, {"payment": {"id": "154350605", "note": "Test Push Transaction OTHER �123.46 - Invoice receipt against 023 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2018-08-26T00:00:00", "totalAmount": 123.46}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "214509356", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "214338075", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "214327399", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "214327371", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "214672049", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-22T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "214671769", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-22T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "214671495", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-22T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "214671482", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-22T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "214671308", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-22T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "216167014", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "215687795", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "216167064", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-12-02T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256992092", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256991833", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256991177", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256987893", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256987069", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256983353", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256982947", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256955690", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "256953648", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "216464177", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "216453277", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "216453273", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "216168092", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "216168080", "note": "�0.01 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2019-11-18T00:00:00", "totalAmount": 0.01}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "260537850", "note": "E2E Test transaction 19 DEBIT �250.00 - E2 E Test Transaction 19 - E2 E Test Transaction 19 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2020-10-23T00:00:00", "totalAmount": 235}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -225}}, {"payment": {"id": "413909805", "note": "�1.00 - Invoice receipt against 023", "currency": "GBP", "paidOnDate": "2023-02-06T00:00:00", "totalAmount": 1}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1}}], "withholdingTax": [], "subTotal": 11000, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 11000, "amountDue": 10766.74, "status": "PartiallyPaid", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1449, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/invoices"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/invoices?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2023-03-03T09:27:42", "id": "2596455", "invoiceNumber": "test-AL", "customerRef": {"id": "602174", "companyName": "ab1"}, "salesOrderRefs": [], "issueDate": "1987-10-01T00:00:00", "dueDate": "1987-10-01T00:00:00", "paidOnDate": "2023-03-03T00:00:00", "currency": "USD", "lineItems": [{"description": "Editing creative writing for a client", "unitAmount": 222.88, "quantity": 1, "discountAmount": 0, "subTotal": 222.88, "taxAmount": 0, "totalAmount": 222.88, "itemRef": {"id": "639579", "name": "Creative Writing Editorial"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "2570292", "note": "", "currency": "USD", "paidOnDate": "2023-03-03T00:00:00", "totalAmount": 0.17}, "allocation": {"currency": "USD", "currencyRate": 1, "totalAmount": -0.17}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 222.88, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 222.88, "amountDue": 222.71, "status": "Submitted", "note": "", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-02-24T07:34:31", "id": "2396753", "invoiceNumber": "0000062", "customerRef": {"id": "512927", "companyName": "Wood Turnerss"}, "salesOrderRefs": [], "issueDate": "2016-04-04T00:00:00", "dueDate": "2016-04-04T00:00:00", "currency": "GBP", "lineItems": [], "paymentAllocations": [], "withholdingTax": [], "totalDiscount": 0, "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 0, "amountDue": 0, "status": "Submitted", "note": "", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 172, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/invoices"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/invoices?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:15Z", "id": "143008521", "invoiceNumber": "40", "customerRef": {"id": "86832299", "companyName": "Mr French Person"}, "salesOrderRefs": [], "issueDate": "2005-12-15T00:00:00", "dueDate": "2006-01-12T00:00:00", "currency": "EUR", "currencyRate": 0.844737287, "lineItems": [{"unitAmount": 0, "quantity": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "0"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 0, "amountDue": 0, "status": "Paid"}, {"modifiedDate": "2022-09-30T10:29:15Z", "id": "143008597", "invoiceNumber": "41", "customerRef": {"id": "86832299", "companyName": "Mr French Person"}, "salesOrderRefs": [], "issueDate": "2010-01-01T00:00:00", "dueDate": "2010-01-29T00:00:00", "paidOnDate": "2020-11-03T00:00:00", "currency": "EUR", "currencyRate": 0.844737287, "lineItems": [{"unitAmount": 0, "quantity": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "0"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "146438947", "note": "", "currency": "EUR", "paidOnDate": "2020-11-03T00:00:00", "totalAmount": 0}, "allocation": {"currency": "EUR", "currencyRate": 1, "totalAmount": 0}}], "withholdingTax": [], "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 0, "amountDue": 0, "status": "Paid"}], "pageNumber": 1, "pageSize": 2, "totalResults": 37, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/invoices"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/invoices?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-20T08:16:10Z", "sourceModifiedDate": "2021-08-25T15:55:36", "id": "416", "invoiceNumber": "INV01", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "salesOrderRefs": [], "issueDate": "2021-04-09T00:00:00", "dueDate": "2021-04-30T00:00:00", "paidOnDate": "2021-04-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Non-Recurring Services - EC", "unitAmount": 100, "quantity": 1, "subTotal": 100, "totalAmount": 100, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "28", "name": "Non-Recurring Services - EC"}, "trackingCategoryRefs": [{"id": "location-1"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "428", "reference": "Payment #PYMT01", "accountRef": {"id": "122", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-04-20T00:00:00", "totalAmount": 90}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}, {"payment": {"id": "428", "reference": "Payment #PYMT01", "accountRef": {"id": "122", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-04-20T00:00:00", "totalAmount": 90}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -90}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 100, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 100, "amountDue": 0, "status": "Paid"}, {"modifiedDate": "2022-09-20T08:16:10Z", "sourceModifiedDate": "2022-02-24T13:51:58", "id": "8529", "invoiceNumber": "INV63", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "salesOrderRefs": [], "issueDate": "2021-04-09T00:00:00", "dueDate": "2021-04-30T00:00:00", "paidOnDate": "2022-09-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Andy Test Item", "unitAmount": 2, "quantity": 3, "subTotal": 6, "totalAmount": 6, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "143", "name": "Andy Test Item"}, "trackingCategoryRefs": [{"id": "classification-2"}, {"id": "department-1"}, {"id": "location-1"}], "isDirectIncome": false}, {"description": "Non-Recurring Services - EC", "unitAmount": 4, "quantity": 5, "subTotal": 20, "totalAmount": 20, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "28", "name": "Non-Recurring Services - EC"}, "trackingCategoryRefs": [{"id": "classification-2"}, {"id": "department-1"}, {"id": "location-1"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "17588", "note": "Payment Example - Invoice allocation", "reference": "Payment #PYMT90", "accountRef": {"id": "1", "name": "Cheque Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-06-01T00:00:00", "totalAmount": 10}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}, {"payment": {"id": "17589", "note": "Example - Payment of an invoice", "reference": "Payment #PYMT91", "accountRef": {"id": "1", "name": "Cheque Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-06-01T00:00:00", "totalAmount": 20}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}, {"payment": {"id": "24558", "note": "Test Push Payments - 1 test", "reference": "Payment #PYMT109", "accountRef": {"id": "1", "name": "Cheque Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-09-12T00:00:00", "totalAmount": 0.1}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.1}}, {"payment": {"id": "24659", "note": "Test Push Payments - 1 test", "reference": "Payment #PYMT111", "accountRef": {"id": "1", "name": "Cheque Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-09-12T00:00:00", "totalAmount": 0.1}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.1}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 26, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 26, "amountDue": 5.8, "status": "PartiallyPaid"}], "pageNumber": 1, "pageSize": 2, "totalResults": 107, "_links": {"self": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/invoices"}, "current": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/invoices?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:08:12Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "2453-1071526256", "invoiceNumber": "975", "customerRef": {"id": "420000-1071522044", "companyName": "Prentice, Adelaide"}, "salesOrderRefs": [], "issueDate": "2022-11-28T00:00:00", "dueDate": "2023-12-28T00:00:00", "paidOnDate": "2023-01-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Foundation slab - prep and pouring", "unitAmount": 167.5, "quantity": 1, "subTotal": 167.5, "taxAmount": 0, "totalAmount": 167.5, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "320000-1071525597", "name": "Concrete Slab"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"unitAmount": 0, "quantity": 1, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Rough lumber", "unitAmount": 48, "quantity": 1, "subTotal": 48, "taxAmount": 0, "totalAmount": 48, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1C0000-933272656", "name": "Lumber:Rough"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"description": "Trim lumber", "unitAmount": 38, "quantity": 1, "subTotal": 38, "taxAmount": 0, "totalAmount": 38, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1D0000-933272656", "name": "Lumber:Trim"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"description": "Window", "unitAmount": 25, "quantity": 2, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1F0000-933272656", "name": "Window"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"description": "Flooring", "unitAmount": 50, "quantity": 1, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "310000-1071509547", "name": "Flooring"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"description": "Window", "unitAmount": 30, "quantity": 2, "subTotal": 60, "taxAmount": 0, "totalAmount": 60, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1F0000-933272656", "name": "Window"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "6973-1197775625", "note": "Check - 80000-933270541", "reference": "983409", "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-15T00:00:00", "totalAmount": 431.95}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -431.95}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 413.5, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 18.45, "totalAmount": 431.95, "amountDue": 0, "discountPercentage": 0, "status": "Paid", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:08:12Z", "sourceModifiedDate": "2023-12-16T05:06:09", "id": "469E-1071530054", "invoiceNumber": "978", "customerRef": {"id": "220000-933272658", "companyName": "Melton, Johnny"}, "salesOrderRefs": [], "issueDate": "2022-11-30T00:00:00", "dueDate": "2023-12-30T00:00:00", "paidOnDate": "2023-01-10T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "See attached specification for details on work below.", "unitAmount": 0, "quantity": 1, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"unitAmount": 0, "quantity": 1, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Installation labor", "unitAmount": 45.5, "quantity": 1, "subTotal": 45.5, "taxAmount": 0, "totalAmount": 45.5, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "20000-933272655", "name": "Installation"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Install drywall", "unitAmount": 1320, "quantity": 1, "subTotal": 1320, "taxAmount": 0, "totalAmount": 1320, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "70000-933272656", "name": "Subs:Drywall"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Electrical work", "unitAmount": 1650, "quantity": 1, "subTotal": 1650, "taxAmount": 0, "totalAmount": 1650, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "80000-933272656", "name": "Subs:Electrical"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Metal Work", "unitAmount": 660, "quantity": 1, "subTotal": 660, "taxAmount": 0, "totalAmount": 660, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "A0000-933272656", "name": "Subs:Metal Wrk"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Install insulation", "unitAmount": 1100, "quantity": 1, "subTotal": 1100, "taxAmount": 0, "totalAmount": 1100, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "90000-933272656", "name": "Subs:Insulating"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Plumbing", "unitAmount": 1650, "quantity": 1, "subTotal": 1650, "taxAmount": 0, "totalAmount": 1650, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "C0000-933272656", "name": "Subs:Plumbing"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Painting", "unitAmount": 2420, "quantity": 1, "subTotal": 2420, "taxAmount": 0, "totalAmount": 2420, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "B0000-933272656", "name": "Subs:Painting"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Install carpeting", "unitAmount": 3300, "quantity": 1, "subTotal": 3300, "taxAmount": 0, "totalAmount": 3300, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "60000-933272656", "name": "Subs:Carpet"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Custom Bay Window", "unitAmount": 1925, "quantity": 1, "subTotal": 1925, "taxAmount": 0, "totalAmount": 1925, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1F0000-933272656", "name": "Window"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Window", "unitAmount": 115.5, "quantity": 1, "subTotal": 115.5, "taxAmount": 0, "totalAmount": 115.5, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1F0000-933272656", "name": "Window"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "Equipment Rental", "unitAmount": 700, "quantity": 1, "subTotal": 700, "taxAmount": 0, "totalAmount": 700, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "230000-933272656", "name": "Equip Rental"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}, {"description": "10% retainage to be billed after job is complete and approved.", "unitAmount": -555.5, "quantity": 1, "subTotal": -555.5, "taxAmount": 0, "totalAmount": -555.5, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "260000-933272656", "name": "Retainage 1"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "6915-1197775450", "note": "Check - 80000-933270541", "reference": "19650", "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-10T00:00:00", "totalAmount": 14488.64}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -14488.64}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 14330.5, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 158.14, "totalAmount": 14488.64, "amountDue": 0, "discountPercentage": 0, "status": "Paid", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 113, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/invoices"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/invoices?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:03:02Z", "sourceModifiedDate": "2022-09-20T10:12:08Z", "id": "16", "invoiceNumber": "1001", "customerRef": {"id": "3", "companyName": "Information Sharing Technology"}, "salesOrderRefs": [], "issueDate": "2019-02-18T00:00:00", "dueDate": "2019-03-20T00:00:00", "paidOnDate": "2020-06-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Service", "unitAmount": 500, "quantity": 10, "subTotal": 5000, "taxAmount": 0, "totalAmount": 5000, "accountRef": {"id": "1", "name": "Sales"}, "itemRef": {"id": "1", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "500", "note": "Payments of type PrepaidPayment", "reference": "498254", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-20T00:00:00", "totalAmount": 37.77}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -37.77}}, {"payment": {"id": "507", "note": "Payments of type PrepaidPayment", "reference": "505288", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-20T00:00:00", "totalAmount": 62.82}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -54.62}}, {"payment": {"id": "499", "note": "Payments of type Cash", "reference": "498147", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-20T00:00:00", "totalAmount": 1017}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5.08}}, {"payment": {"id": "491", "note": "Payments of type PrepaidPayment", "reference": "489239", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-18T00:00:00", "totalAmount": 48.74}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -48.74}}, {"payment": {"id": "490", "note": "Payments of type Cash", "reference": "489120", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-18T00:00:00", "totalAmount": 1112.76}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.74}}, {"payment": {"id": "482", "note": "Payments of type PrepaidPayment", "reference": "480242", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-17T00:00:00", "totalAmount": 33.9}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -33.9}}, {"payment": {"id": "481", "note": "Payments of type Cash", "reference": "480129", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-17T00:00:00", "totalAmount": 965.85}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10.21}}, {"payment": {"id": "470", "note": "Payments of type PrepaidPayment", "reference": "468248", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-13T00:00:00", "totalAmount": 67.83}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -41.38}}, {"payment": {"id": "463", "note": "Payments of type PrepaidPayment", "reference": "461243", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-13T00:00:00", "totalAmount": 7.47}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.47}}, {"payment": {"id": "462", "note": "Payments of type Cash", "reference": "461144", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-13T00:00:00", "totalAmount": 914.05}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -34.76}}, {"payment": {"id": "456", "note": "Payments of type PrepaidPayment", "reference": "454252", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-11T00:00:00", "totalAmount": 70.44}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -33.72}}, {"payment": {"id": "447", "note": "Payments of type PrepaidPayment", "reference": "445278", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-11T00:00:00", "totalAmount": 24.95}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -24.95}}, {"payment": {"id": "446", "note": "Payments of type Cash", "reference": "44518", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-11T00:00:00", "totalAmount": 904.82}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -17.96}}, {"payment": {"id": "438", "note": "Payments of type PrepaidPayment", "reference": "436234", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-10T00:00:00", "totalAmount": 6.03}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -6.03}}, {"payment": {"id": "437", "note": "Payments of type Cash", "reference": "436168", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-10T00:00:00", "totalAmount": 760.05}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -31.48}}, {"payment": {"id": "647", "note": "Payments of type PrepaidPayment", "reference": "645263", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-03-20T00:00:00", "totalAmount": 40.43}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "429", "note": "Payments of type PrepaidPayment", "reference": "427270", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-09T00:00:00", "totalAmount": 56.75}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -28.75}}, {"payment": {"id": "420", "note": "Payments of type PrepaidPayment", "reference": "418258", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-08T00:00:00", "totalAmount": 8.92}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -8.92}}, {"payment": {"id": "419", "note": "Payments of type Cash", "reference": "418157", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-08T00:00:00", "totalAmount": 407.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -2.55}}, {"payment": {"id": "705", "note": "Payments of type PrepaidPayment", "reference": "703246", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-03T00:00:00", "totalAmount": 25}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -25}}, {"payment": {"id": "411", "note": "Payments of type PrepaidPayment", "reference": "409292", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-07T00:00:00", "totalAmount": 6.22}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -6.22}}, {"payment": {"id": "410", "note": "Payments of type Cash", "reference": "409145", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-07T00:00:00", "totalAmount": 725.48}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -33.79}}, {"payment": {"id": "772", "note": "Payments of type PrepaidPayment", "reference": "770263", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-24T00:00:00", "totalAmount": 10.35}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "779", "note": "Payments of type PrepaidPayment", "reference": "777217", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-24T00:00:00", "totalAmount": 39.55}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "792", "note": "Payments of type PrepaidPayment", "reference": "790262", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-29T00:00:00", "totalAmount": 12.46}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "402", "note": "Payments of type PrepaidPayment", "reference": "400275", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-06T00:00:00", "totalAmount": 32.88}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -29.29}}, {"payment": {"id": "393", "note": "Payments of type PrepaidPayment", "reference": "391247", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 16.73}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.73}}, {"payment": {"id": "392", "note": "Payments of type Cash", "reference": "391115", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 1094.8}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -47.35}}, {"payment": {"id": "386", "note": "Payments of type PrepaidPayment", "reference": "384213", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-04T00:00:00", "totalAmount": 9.99}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -9.99}}, {"payment": {"id": "385", "note": "Payments of type Cash", "reference": "38418", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-04T00:00:00", "totalAmount": 858.41}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -13.4}}, {"payment": {"id": "377", "note": "Payments of type PrepaidPayment", "reference": "375298", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-03T00:00:00", "totalAmount": 39.06}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -39.06}}, {"payment": {"id": "376", "note": "Payments of type Cash", "reference": "375123", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-03T00:00:00", "totalAmount": 802.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -11.54}}, {"payment": {"id": "368", "note": "Payments of type PrepaidPayment", "reference": "366288", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-02T00:00:00", "totalAmount": 12.15}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -12.15}}, {"payment": {"id": "367", "note": "Payments of type Cash", "reference": "366195", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-02T00:00:00", "totalAmount": 827.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -25.4}}, {"payment": {"id": "361", "note": "Payments of type PrepaidPayment", "reference": "359220", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-01T00:00:00", "totalAmount": 54.12}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -40.61}}, {"payment": {"id": "349", "note": "Payments of type PrepaidPayment", "reference": "347216", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-31T00:00:00", "totalAmount": 25.32}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -25.32}}, {"payment": {"id": "348", "note": "Payments of type Cash", "reference": "34710", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-31T00:00:00", "totalAmount": 949.74}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.07}}, {"payment": {"id": "342", "note": "Payments of type PrepaidPayment", "reference": "340292", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-30T00:00:00", "totalAmount": 26.59}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -26.59}}, {"payment": {"id": "341", "note": "Payments of type Cash", "reference": "340128", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-30T00:00:00", "totalAmount": 859.44}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -29.21}}, {"payment": {"id": "333", "note": "Payments of type PrepaidPayment", "reference": "331236", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-30T00:00:00", "totalAmount": 17.94}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -17.58}}, {"payment": {"id": "322", "note": "Payments of type PrepaidPayment", "reference": "320256", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-29T00:00:00", "totalAmount": 14.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -14.33}}, {"payment": {"id": "321", "note": "Payments of type Cash", "reference": "320186", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-29T00:00:00", "totalAmount": 798.79}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -27.08}}, {"payment": {"id": "313", "note": "Payments of type PrepaidPayment", "reference": "311211", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-29T00:00:00", "totalAmount": 45.06}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -41.47}}, {"payment": {"id": "304", "note": "Payments of type PrepaidPayment", "reference": "302284", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-28T00:00:00", "totalAmount": 17.04}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -17.04}}, {"payment": {"id": "303", "note": "Payments of type Cash", "reference": "302128", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-28T00:00:00", "totalAmount": 837.68}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -6.66}}, {"payment": {"id": "297", "note": "Payments of type PrepaidPayment", "reference": "295264", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-27T00:00:00", "totalAmount": 14.92}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -14.92}}, {"payment": {"id": "296", "note": "Payments of type Cash", "reference": "295176", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-27T00:00:00", "totalAmount": 687.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4.18}}, {"payment": {"id": "288", "note": "Payments of type PrepaidPayment", "reference": "286250", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-26T00:00:00", "totalAmount": 12.73}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -12.73}}, {"payment": {"id": "287", "note": "Payments of type Cash", "reference": "286188", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-26T00:00:00", "totalAmount": 539.55}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -6.97}}, {"payment": {"id": "279", "note": "Payments of type PrepaidPayment", "reference": "277281", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-25T00:00:00", "totalAmount": 30.58}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -30.58}}, {"payment": {"id": "278", "note": "Payments of type Cash", "reference": "277153", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-25T00:00:00", "totalAmount": 1063.48}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -37.08}}, {"payment": {"id": "270", "note": "Payments of type PrepaidPayment", "reference": "268269", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-24T00:00:00", "totalAmount": 11.69}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -11.69}}, {"payment": {"id": "269", "note": "Payments of type Cash", "reference": "268154", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-24T00:00:00", "totalAmount": 968.21}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -48.58}}, {"payment": {"id": "263", "note": "Payments of type PrepaidPayment", "reference": "261215", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-24T00:00:00", "totalAmount": 7.24}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.24}}, {"payment": {"id": "262", "note": "Payments of type Cash", "reference": "261162", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-24T00:00:00", "totalAmount": 425.69}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -15.02}}, {"payment": {"id": "256", "note": "Payments of type PrepaidPayment", "reference": "254258", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-23T00:00:00", "totalAmount": 37.68}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.6}}, {"payment": {"id": "249", "note": "Payments of type PrepaidPayment", "reference": "247245", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-23T00:00:00", "totalAmount": 22.03}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10.84}}, {"payment": {"id": "240", "note": "Payments of type PrepaidPayment", "reference": "238213", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-23T00:00:00", "totalAmount": 47.7}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -31.98}}, {"payment": {"id": "231", "note": "Payments of type Prepaid", "reference": "229276", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-23T00:00:00", "totalAmount": 38.7}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -30.52}}, {"payment": {"id": "218", "note": "Payments of type Prepaid", "reference": "216237", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-22T00:00:00", "totalAmount": 19.67}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -19.67}}, {"payment": {"id": "217", "note": "Payments of type Cash", "reference": "216161", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-22T00:00:00", "totalAmount": 565.24}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1.66}}, {"payment": {"id": "209", "note": "Payments of type Prepaid", "reference": "207254", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-21T00:00:00", "totalAmount": 27.62}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -27.62}}, {"payment": {"id": "208", "note": "Payments of type Cash", "reference": "207189", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-21T00:00:00", "totalAmount": 914.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.86}}, {"payment": {"id": "200", "note": "Payments of type Prepaid", "reference": "198234", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 18.35}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -18.35}}, {"payment": {"id": "199", "note": "Payments of type Cash", "reference": "198128", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 1209.15}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -20.22}}, {"payment": {"id": "191", "note": "Payments of type Prepaid", "reference": "18922", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-17T00:00:00", "totalAmount": 16.44}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.44}}, {"payment": {"id": "190", "note": "Payments of type Cash", "reference": "189174", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-17T00:00:00", "totalAmount": 607.48}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -13.34}}, {"payment": {"id": "182", "note": "Payments of type Prepaid", "reference": "180274", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-17T00:00:00", "totalAmount": 47.91}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -47.91}}, {"payment": {"id": "181", "note": "Payments of type Cash", "reference": "180197", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-17T00:00:00", "totalAmount": 1087.13}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10.04}}, {"payment": {"id": "173", "note": "Payments of type Prepaid", "reference": "171213", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-15T00:00:00", "totalAmount": 35.36}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -26.29}}, {"payment": {"id": "166", "note": "Payments of type Prepaid", "reference": "164260", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-15T00:00:00", "totalAmount": 39.98}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -39.98}}, {"payment": {"id": "165", "note": "Payments of type Cash", "reference": "164142", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-15T00:00:00", "totalAmount": 913.09}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -18.99}}, {"payment": {"id": "157", "note": "Payments of type Prepaid", "reference": "155266", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-15T00:00:00", "totalAmount": 14.32}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4.87}}, {"payment": {"id": "150", "note": "Payments of type Prepaid", "reference": "148217", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-13T00:00:00", "totalAmount": 11.57}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -11.57}}, {"payment": {"id": "149", "note": "Payments of type Cash", "reference": "148151", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-13T00:00:00", "totalAmount": 643.97}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -22.26}}, {"payment": {"id": "141", "note": "Payments of type Prepaid", "reference": "139288", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-13T00:00:00", "totalAmount": 27.88}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -27.88}}, {"payment": {"id": "140", "note": "Payments of type Cash", "reference": "139163", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-13T00:00:00", "totalAmount": 1078.72}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -13.71}}, {"payment": {"id": "132", "note": "Payments of type Prepaid", "reference": "13022", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-10T00:00:00", "totalAmount": 47.38}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -42.36}}, {"payment": {"id": "123", "note": "Payments of type Prepaid", "reference": "121293", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-10T00:00:00", "totalAmount": 34.45}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -34.45}}, {"payment": {"id": "122", "note": "Payments of type Cash", "reference": "121197", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-10T00:00:00", "totalAmount": 771.61}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.31}}, {"payment": {"id": "116", "note": "Payments of type Prepaid", "reference": "114213", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-10T00:00:00", "totalAmount": 65.77}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -23.86}}, {"payment": {"id": "521", "note": "Payments of type PrepaidPayment", "reference": "519243", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-20T00:00:00", "totalAmount": 14.74}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "843", "note": "Payments of type PrepaidPayment", "reference": "841264", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-05-07T00:00:00", "totalAmount": 25.64}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "850", "note": "Payments of type PrepaidPayment", "reference": "848254", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-05-14T00:00:00", "totalAmount": 53.68}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "877", "note": "Payments of type PrepaidPayment", "reference": "875210", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-06-01T00:00:00", "totalAmount": 12.7}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 5000, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 5000, "amountDue": 3296.44, "status": "PartiallyPaid", "note": "Invoice for service"}, {"modifiedDate": "2023-01-18T11:03:02Z", "sourceModifiedDate": "2019-02-21T17:51:49Z", "id": "17", "invoiceNumber": "1002", "customerRef": {"id": "2", "companyName": "Software Coperation"}, "salesOrderRefs": [], "issueDate": "2019-02-18T00:00:00", "dueDate": "2019-03-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "IT Support", "unitAmount": 80, "quantity": 40, "subTotal": 3200, "taxAmount": 0, "totalAmount": 3200, "accountRef": {"id": "1", "name": "Sales"}, "itemRef": {"id": "2", "name": "Hours"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "totalDiscount": 0, "subTotal": 3200, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 3200, "amountDue": 3200, "status": "Submitted"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1326, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/invoices"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/invoices?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:12Z", "sourceModifiedDate": "2023-01-25T13:49:52Z", "id": "30", "invoiceNumber": "1002", "customerRef": {"id": "59", "companyName": "Ecker Holiday event"}, "salesOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-02-05T00:00:00", "paidOnDate": "2016-02-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Holiday party - gold level test v1", "unitAmount": 2000, "quantity": 1, "subTotal": 2000, "taxAmount": 400, "totalAmount": 2400, "accountRef": {"id": "44", "name": "Sales"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "7", "name": "Gold party"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Venue rental", "unitAmount": 10000, "quantity": 1, "subTotal": 10000, "taxAmount": 2000, "totalAmount": 12000, "accountRef": {"id": "68", "name": "Billable Expenses Income"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "20", "name": "Venue Rental"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "promotional items -- misc engraved items", "unitAmount": 13.5, "quantity": 75, "subTotal": 1012.5, "taxAmount": 202.5, "totalAmount": 1215, "accountRef": {"id": "68", "name": "Billable Expenses Income"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "12", "name": "Misc"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "31", "note": "", "accountRef": {"id": "81", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2016-02-12T00:00:00", "totalAmount": 15615}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -15615}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 13012.5, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 2602.5, "totalAmount": 15615, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:12Z", "sourceModifiedDate": "2022-08-22T13:04:50Z", "id": "3793", "invoiceNumber": "276e29c1", "customerRef": {"id": "59", "companyName": "Ecker Holiday event"}, "salesOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-02-05T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Holiday party - gold level test v1", "unitAmount": 2000, "quantity": 1, "subTotal": 2000, "taxAmount": 400, "totalAmount": 2400, "accountRef": {"id": "44", "name": "Sales"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "7", "name": "Gold party"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Venue rental", "unitAmount": 10000, "quantity": 1, "subTotal": 10000, "taxAmount": 2000, "totalAmount": 12000, "accountRef": {"id": "68", "name": "Billable Expenses Income"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "20", "name": "Venue Rental"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "promotional items -- misc engraved items", "unitAmount": 13.5, "quantity": 75, "subTotal": 1012.5, "taxAmount": 202.5, "totalAmount": 1215, "accountRef": {"id": "68", "name": "Billable Expenses Income"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "12", "name": "Misc"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "totalDiscount": 0, "subTotal": 13012.5, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 2602.5, "totalAmount": 15615, "amountDue": 15615, "status": "Submitted", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1077, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/invoices"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/invoices?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:36:12Z", "sourceModifiedDate": "2020-07-13T11:06:40Z", "id": "82322", "invoiceNumber": "0000000110", "customerRef": {"id": "A1D001", "companyName": "A1 Design Services"}, "salesOrderRefs": [], "issueDate": "2020-07-13T00:00:00Z", "dueDate": "2020-08-12T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Standard rate", "unitAmount": 0, "quantity": 0, "discountAmount": 0.22, "subTotal": 0, "taxAmount": 8.67, "totalAmount": 8.67, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 1.08, "subTotal": 43.34, "taxAmount": 0, "totalAmount": 43.34, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "totalDiscount": 1.3, "subTotal": 43.34, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 8.67, "totalAmount": 52.01, "amountDue": 52.01, "discountPercentage": 2.49, "status": "Submitted", "note": "0000000114"}, {"modifiedDate": "2022-10-14T09:36:12Z", "sourceModifiedDate": "2020-07-15T10:45:56Z", "id": "83515", "invoiceNumber": "0000000111", "customerRef": {"id": "BRO001", "companyName": "Bronson Inc"}, "salesOrderRefs": [], "issueDate": "2020-07-15T00:00:00Z", "dueDate": "2020-08-29T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Zero rated", "unitAmount": 0, "quantity": 0, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "taxRateRef": {"id": "1728", "name": "Zero rated", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 3.13, "subTotal": 125, "taxAmount": 0, "totalAmount": 125, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "totalDiscount": 3.13, "subTotal": 125, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 125, "amountDue": 125, "discountPercentage": 2.5, "status": "Submitted", "note": "0000000111"}], "pageNumber": 1, "pageSize": 2, "totalResults": 409, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/invoices"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/invoices?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:42Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "INV-1", "invoiceNumber": "1", "customerRef": {"id": "A1D001", "companyName": "A1 Design Services"}, "salesOrderRefs": [], "issueDate": "2021-01-02T00:00:00", "paidOnDate": "2022-01-29T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "AT Mini Tower Case", "unitAmount": 14.25, "quantity": 1, "discountAmount": 0, "subTotal": 14.25, "taxAmount": 2.43, "totalAmount": 16.68, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Whiteboard - Drywipe (900 x 1200)", "unitAmount": 19, "quantity": 4, "discountAmount": 0, "subTotal": 76, "taxAmount": 12.97, "totalAmount": 88.97, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "A4 Ledger Book - 5 Column", "unitAmount": 7.59, "quantity": 8, "discountAmount": 0, "subTotal": 60.72, "taxAmount": 10.36, "totalAmount": 71.08, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Shorthand Notebook - 80 Sheets", "unitAmount": 4.27, "quantity": 20, "discountAmount": 0, "subTotal": 85.4, "taxAmount": 14.57, "totalAmount": 99.97, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Calculator - Desktop", "unitAmount": 9.5, "quantity": 1, "discountAmount": 0, "subTotal": 9.5, "taxAmount": 1.62, "totalAmount": 11.12, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Calculator - Desktop (Printing)", "unitAmount": 16.15, "quantity": 1, "discountAmount": 0, "subTotal": 16.15, "taxAmount": 2.76, "totalAmount": 18.91, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Calculator - Printing Rolls", "unitAmount": 5.7, "quantity": 15, "discountAmount": 0, "subTotal": 85.5, "taxAmount": 14.59, "totalAmount": 100.09, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Correction Fluid - White", "unitAmount": 2.37, "quantity": 7, "discountAmount": 0, "subTotal": 16.59, "taxAmount": 2.83, "totalAmount": 19.42, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Envelope - White (110 x 220) Plain", "unitAmount": 8.54, "quantity": 20, "discountAmount": 0, "subTotal": 170.8, "taxAmount": 29.14, "totalAmount": 199.94, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Flip Chart - A1 Pad", "unitAmount": 15.2, "quantity": 10, "discountAmount": 0, "subTotal": 152, "taxAmount": 25.94, "totalAmount": 177.94, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Laminator Pouches - A4", "unitAmount": 11.4, "quantity": 5, "discountAmount": 0, "subTotal": 57, "taxAmount": 9.73, "totalAmount": 66.73, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Mouse Mat - (241 x 203) Blue", "unitAmount": 1.42, "quantity": 5, "discountAmount": 0, "subTotal": 7.1, "taxAmount": 1.21, "totalAmount": 8.31, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Copy Paper - Economy Grade", "unitAmount": 2.46, "quantity": 80, "discountAmount": 0, "subTotal": 196.8, "taxAmount": 33.58, "totalAmount": 230.38, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Coloured Paper - Pastel Blue", "unitAmount": 3.61, "quantity": 5, "discountAmount": 0, "subTotal": 18.05, "taxAmount": 3.08, "totalAmount": 21.13, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Ball Point Pen - Black", "unitAmount": 1.9, "quantity": 8, "discountAmount": 0, "subTotal": 15.2, "taxAmount": 2.59, "totalAmount": 17.79, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Pencil - HB", "unitAmount": 2.37, "quantity": 3, "discountAmount": 0, "subTotal": 7.11, "taxAmount": 1.21, "totalAmount": 8.32, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Remember-Me Sticky Notes (Recycled)", "unitAmount": 3.32, "quantity": 6, "discountAmount": 0, "subTotal": 19.92, "taxAmount": 3.4, "totalAmount": 23.32, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Scissors - Economy", "unitAmount": 2.85, "quantity": 1, "discountAmount": 0, "subTotal": 2.85, "taxAmount": 0.49, "totalAmount": 3.34, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Adhesive Tape - Brown (50mm x 66m)", "unitAmount": 2.66, "quantity": 5, "discountAmount": 0, "subTotal": 13.3, "taxAmount": 2.27, "totalAmount": 15.57, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "JP010 Jet Printer Cartridge", "unitAmount": 17.1, "quantity": 5, "discountAmount": 0, "subTotal": 85.5, "taxAmount": 14.59, "totalAmount": 100.09, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Letter Trays - 3 pack (Red)", "unitAmount": 6.65, "quantity": 2, "discountAmount": 0, "subTotal": 13.3, "taxAmount": 2.27, "totalAmount": 15.57, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -100.09}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -66.73}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -117.5}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -177.94}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -230.38}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -17.79}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -71.08}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -88.97}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -15.57}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -3.34}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -199.94}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -100.09}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.68}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -18.91}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -23.32}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -99.97}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -21.13}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -15.57}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -19.42}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -8.31}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -11.12}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -8.32}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 1223.04, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 209.13, "totalAmount": 1432.17, "amountDue": 0, "status": "Paid", "note": "", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:42Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "INV-9", "invoiceNumber": "9", "customerRef": {"id": "KIN001", "companyName": "Kinghorn & French"}, "salesOrderRefs": [], "issueDate": "2021-01-04T00:00:00", "paidOnDate": "2022-01-29T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "PC Combo Pack 4", "unitAmount": 765, "quantity": 5, "discountAmount": 765, "subTotal": 3060, "taxAmount": 522.11, "totalAmount": 3582.11, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 20, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "PC Combo Pack 5", "unitAmount": 1080, "quantity": 4, "discountAmount": 864, "subTotal": 3456, "taxAmount": 589.68, "totalAmount": 4045.68, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 20, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "PC Combo Pack 6", "unitAmount": 1350, "quantity": 2, "discountAmount": 540, "subTotal": 2160, "taxAmount": 368.55, "totalAmount": 2528.55, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 20, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "FX030 Multifunctional Fax", "unitAmount": 414, "quantity": 2, "discountAmount": 165.6, "subTotal": 662.4, "taxAmount": 113.02, "totalAmount": 775.42, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 20, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Copy Paper - Premium Grade", "unitAmount": 3.06, "quantity": 100, "discountAmount": 61.2, "subTotal": 244.8, "taxAmount": 41.77, "totalAmount": 286.57, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 20, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "271", "note": "Sales receipt 271 linked to sales invoice inv-9.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 11123.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -276.57}}, {"payment": {"id": "271", "note": "Sales receipt 271 linked to sales invoice inv-9.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 11123.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -765.42}}, {"payment": {"id": "271", "note": "Sales receipt 271 linked to sales invoice inv-9.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 11123.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4035.68}}, {"payment": {"id": "271", "note": "Sales receipt 271 linked to sales invoice inv-9.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 11123.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -2518.55}}, {"payment": {"id": "271", "note": "Sales receipt 271 linked to sales invoice inv-9.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 11123.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -3527.11}}, {"payment": {"id": "272", "note": "Sales discount 272 linked to sales invoice inv-9.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}, {"payment": {"id": "272", "note": "Sales discount 272 linked to sales invoice inv-9.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}, {"payment": {"id": "272", "note": "Sales discount 272 linked to sales invoice inv-9.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}, {"payment": {"id": "272", "note": "Sales discount 272 linked to sales invoice inv-9.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}, {"payment": {"id": "272", "note": "Sales discount 272 linked to sales invoice inv-9.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}, {"payment": {"id": "9", "note": "Sales credit tx-9 linked to sales invoice inv-9.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-12-31T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -45}}], "withholdingTax": [], "totalDiscount": 2395.8, "subTotal": 9583.2, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 1635.13, "totalAmount": 11218.33, "amountDue": 0, "status": "Paid", "note": "", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 86, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/invoices"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/invoices?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T15:03:37Z", "sourceModifiedDate": "2021-07-23T13:42:59Z", "id": "b039b0a733de11e797950a57719b2edb", "invoiceNumber": "SI-1", "customerRef": {"id": "f4ff85ba33dd11e797950a57719b2edb", "companyName": "Widgets Limited"}, "salesOrderRefs": [], "issueDate": "2017-05-08T00:00:00", "dueDate": "2017-06-07T00:00:00", "paidOnDate": "2021-07-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 900, "quantity": 8, "discountAmount": 0, "subTotal": 7200, "taxAmount": 1440, "totalAmount": 8640, "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "e1c2bd659a6111e8bad90617b3da4b8a", "note": "Sales credit note", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-08-07T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1000}}, {"payment": {"id": "e1c2bd659a6111e8bad90617b3da4b8a", "note": "Sales credit note", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-08-07T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1000}}, {"payment": {"id": "579388a0215911e8b45c025132dab352", "note": "Customer receipt using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-01-02T00:00:00", "totalAmount": 1400}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1400}}, {"payment": {"id": "52237e4e215911e8b45c025132dab352", "note": "Customer receipt using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-01-02T00:00:00", "totalAmount": 4000}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4000}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 7200, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 1440, "totalAmount": 8640, "amountDue": 1240, "status": "PartiallyPaid"}, {"modifiedDate": "2022-10-24T15:03:37Z", "sourceModifiedDate": "2018-03-05T16:58:39Z", "id": "6420b3f8209611e8b45c025132dab352", "invoiceNumber": "SI-2", "customerRef": {"id": "f4ff85ba33dd11e797950a57719b2edb", "companyName": "Widgets Limited"}, "salesOrderRefs": [], "issueDate": "2018-03-05T00:00:00", "dueDate": "2018-04-04T00:00:00", "paidOnDate": "2018-03-05T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 900, "quantity": 5, "discountAmount": 0, "subTotal": 4500, "taxAmount": 900, "totalAmount": 5400, "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "73a0490d209611e8b45c025132dab352", "note": "Customer receipt using cash - PAYMENT-CASH-001", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-03-05T00:00:00", "totalAmount": 5400}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5400}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 4500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 900, "totalAmount": 5400, "amountDue": 0, "status": "Paid"}], "pageNumber": 1, "pageSize": 2, "totalResults": 10759, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/invoices"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/invoices?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:54Z", "sourceModifiedDate": "2021-04-22T11:01:11Z", "id": "2916", "invoiceNumber": "IN0480", "customerRef": {"id": "12", "companyName": "MK Manufacturing"}, "salesOrderRefs": [], "issueDate": "2021-04-22T00:00:00", "dueDate": "2021-05-22T00:00:00", "paidOnDate": "2021-04-22T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 100, "quantity": 1, "subTotal": 100, "taxAmount": 20, "totalAmount": 120, "accountRef": {"id": "176", "name": "Revenue - Services"}, "taxRateRef": {"id": "105", "name": "UK Sale Services Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "CUSTOMER-12", "name": "MK Manufacturing"}, {"id": "DEPARTMENT-2", "name": "Services"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "2918", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2021-04-22T00:00:00", "totalAmount": 120}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -120}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 100, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 20, "totalAmount": 120, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:54Z", "sourceModifiedDate": "2022-10-05T11:02:22Z", "id": "18827", "invoiceNumber": "IN1515", "customerRef": {"id": "6", "companyName": "AG Insurance"}, "salesOrderRefs": [], "issueDate": "2022-09-28T00:00:00", "dueDate": "2022-10-28T00:00:00", "currency": "USD", "currencyRate": 0.9294, "lineItems": [{"description": "test desc Test05102022-1", "unitAmount": 180, "quantity": 1, "subTotal": 180, "taxAmount": 0, "totalAmount": 180, "accountRef": {"id": "2", "name": "Accounts Receivable"}, "taxRateRef": {"id": "58", "name": "EC Sale Goods Standard Rate", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "CUSTOMER-6", "name": "AG Insurance"}, {"id": "DEPARTMENT-1", "name": "Sales"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "totalDiscount": 0, "subTotal": 180, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 180, "amountDue": 180, "status": "Submitted", "note": "test desc Test05102022-1", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/invoices"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/invoices?page=1&pageSize=2"}}} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-11-16T18:15:23Z", "sourceModifiedDate": "2019-12-05T23:20:36Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0ludm9pY2U6NzgyNDQ4OTg1Nzc1MzE5MTYw", "invoiceNumber": "1", "customerRef": {"id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4", "companyName": "ABC Textiles"}, "salesOrderRefs": [], "issueDate": "2019-10-17T00:00:00", "dueDate": "2019-10-17T00:00:00", "paidOnDate": "2019-12-05T23:20:36Z", "currency": "USD", "currencyRate": 0.784736781, "lineItems": [{"description": "", "unitAmount": 10, "quantity": 5, "subTotal": 50, "taxAmount": 2.5, "totalAmount": 52.5, "accountRef": {"id": "QWNjb3VudDo3OTE3NTA2MDA0MjQ0NTExMTU7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "name": "Sales"}, "itemRef": {"id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1Byb2R1Y3Q6MzU2NjcyNTI=", "name": "Golf balls"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 50, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 2.5, "totalAmount": 52.5, "amountDue": 0, "status": "Paid"}, {"modifiedDate": "2022-11-16T18:15:23Z", "sourceModifiedDate": "2020-03-30T14:10:21Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0ludm9pY2U6ODgzOTc4MDA2NDIxMzUwODIx", "invoiceNumber": "2", "customerRef": {"id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjM2OTkxOTYw", "companyName": "NIC Cookies"}, "salesOrderRefs": [], "issueDate": "2020-03-05T00:00:00", "dueDate": "2020-03-05T00:00:00", "paidOnDate": "2020-03-30T14:10:21Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Decorated cookies", "unitAmount": 4, "quantity": 50, "subTotal": 200, "taxAmount": 40, "totalAmount": 240, "accountRef": {"id": "QWNjb3VudDo3OTE3NTA2MDA0MjQ0NTExMTU7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "name": "Sales"}, "itemRef": {"id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1Byb2R1Y3Q6NDEzNzEwOTU=", "name": "Cookies"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 200, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 40, "totalAmount": 240, "amountDue": 0, "status": "Paid"}], "pageNumber": 1, "pageSize": 2, "totalResults": 19, "_links": {"self": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/invoices"}, "current": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/invoices?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:38:11Z", "sourceModifiedDate": "2021-01-02T20:34:51", "id": "321bfed3-2da2-4969-9358-4de97821181b", "invoiceNumber": "INV-001-0", "customerRef": {"id": "afd4093b-c655-4847-8ee2-10a4f2c3eae3", "companyName": "Maddox Publishing Group"}, "salesOrderRefs": [], "issueDate": "2021-12-20T00:00:00", "dueDate": "2022-01-17T00:00:00", "paidOnDate": "2022-02-17T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Project management - onsite daily rate - your CRM integration project", "unitAmount": 583.3333333333, "quantity": 6, "discountAmount": 0, "subTotal": 3500, "taxAmount": 700, "totalAmount": 4200, "accountRef": {"id": "a969500a-377c-4cea-8f2b-a4e385607fd0", "name": "Other Revenue"}, "discountPercentage": 0, "taxRateRef": {"id": "OUTPUT2", "name": "20% (VAT on Income)", "effectiveTaxRate": 20}, "itemRef": {"id": "aa1c5f84-4453-42fa-9c92-69d4085607c9", "name": "Project management - daily rate"}, "trackingCategoryRefs": [{"id": "34b9b859-07a9-451a-b4d3-effc9946634a", "name": "North"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "65b746c8-9a5d-4a95-8096-d2316fcff592", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-17T00:00:00", "totalAmount": 4200}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4200}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 3500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 700, "totalAmount": 4200, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:38:11Z", "sourceModifiedDate": "2021-01-02T22:51:43", "id": "4b6d0c8f-10fa-42cd-a6e5-53b175e90005", "invoiceNumber": "INV-0001", "customerRef": {"id": "a871a956-05b5-4e2a-9419-7aeb478ca647", "companyName": "Ridgeway University"}, "salesOrderRefs": [], "issueDate": "2022-02-07T00:00:00", "dueDate": "2022-02-17T00:00:00", "paidOnDate": "2022-02-17T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Retainer for consulting work", "unitAmount": 416.67, "quantity": 1, "discountAmount": 0, "subTotal": 416.67, "taxAmount": 83.33, "totalAmount": 500, "accountRef": {"id": "c563b607-fb0e-4d06-9ddb-76fdeef20ae3", "name": "Sales"}, "discountPercentage": 0, "taxRateRef": {"id": "OUTPUT2", "name": "20% (VAT on Income)", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "8c481b70-b5d7-4de4-a7f7-9e161be2c472", "reference": "", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-17T00:00:00", "totalAmount": 500}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -500}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 416.67, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 83.33, "totalAmount": 500, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 44, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/invoices"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/invoices?page=2&pageSize=2"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-05-19T15:36:26", "id": "104957000000038034", "invoiceNumber": "INV-102", "customerRef": {"id": "104957000000037097", "companyName": "Test Company"}, "salesOrderRefs": [], "issueDate": "2020-02-06T10:54:03", "dueDate": "2020-02-17T00:00:00", "paidOnDate": "2020-05-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "paymentAllocations": [{"payment": {"id": "104957000000129048", "note": "", "reference": "9", "accountRef": {"id": "104957000000000349", "name": "Petty Cash"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-29T00:00:00", "totalAmount": 9000}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -9000}}, {"payment": {"id": "104957000000137017", "note": "", "reference": "11", "accountRef": {"id": "104957000000060010", "name": "Abdi Test"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-05-19T00:00:00", "totalAmount": 9000}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1}}], "withholdingTax": [], "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 9001, "amountDue": 0, "status": "Paid"}, {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-02-17T14:21:05", "id": "104957000000038052", "invoiceNumber": "INV-104", "customerRef": {"id": "104957000000037097", "companyName": "Test Company"}, "salesOrderRefs": [], "issueDate": "2020-02-06T10:54:04", "dueDate": "2020-02-17T00:00:00", "paidOnDate": "2020-02-06T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "paymentAllocations": [{"payment": {"id": "104957000000070175", "note": "Cheque deposit", "reference": "4", "accountRef": {"id": "104957000000060010", "name": "Abdi Test"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-06T00:00:00", "totalAmount": 9001}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -9001}}], "withholdingTax": [], "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 9001, "amountDue": 0, "status": "Paid"}], "pageNumber": 1, "pageSize": 2, "totalResults": 48, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/invoices"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/invoices?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/invoices?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-invoice: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2023-01-28T14:41:02", "id": "2518ca08-5e2a-4630-8cee-a6bcd1625660", "invoiceNumber": "TKj7oD38", "customerRef": {"id": "d65ac505-072c-49ec-be3c-3cb74228966d", "companyName": "Jensen Steuber"}, "salesOrderRefs": [], "issueDate": "2022-04-25T13:04:02", "dueDate": "2022-04-25T13:04:02", "paidOnDate": "2022-04-25T13:04:02", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Heavy Duty Hinged Gully Grating x4.00", "unitAmount": 402.89, "quantity": 4, "subTotal": 1611.56, "taxAmount": 161.16, "totalAmount": 1772.72, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1", "name": "Heavy Duty Hinged Gully Grating"}, "trackingCategoryRefs": [{"id": "costcode_9", "name": "PandaConstruction"}], "isDirectIncome": true}], "paymentAllocations": [{"payment": {"id": "9407d5ee-893a-4547-bd89-bc7b795ee774", "note": "Payment against invoice 2518ca08-5e2a-4630-8cee-a6bcd1625660", "reference": "2518ca08-5e2a-4630-8cee-a6bcd1625660", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-04-25T13:04:02", "totalAmount": 1772.72}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-04-25T13:04:02", "totalAmount": -1772.72}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 1611.56, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 161.16, "totalAmount": 1772.72, "amountDue": 0, "discountPercentage": 0, "status": "Paid", "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-05-17T16:29:00Z", "id": "18c906bf-89d1-ea11-bbaa-000d3a2b9185", "invoiceNumber": "103001", "customerRef": {"id": "b61217b3-89d1-ea11-bbaa-000d3a2b9185", "companyName": "Trey Researches"}, "salesOrderRefs": [], "issueDate": "2019-01-15T00:00:00", "dueDate": "2019-01-15T00:00:00", "paidOnDate": "2019-01-15T00:00:00", "currency": "GBP", "lineItems": [{"description": "AMSTERDAM Lamp", "unitAmount": 35.6, "quantity": 3, "discountAmount": 0, "subTotal": 106.8, "taxAmount": 21.36, "totalAmount": 128.16, "accountRef": {"id": "181217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Income, Product Sales"}, "discountPercentage": 0, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-d41217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "AMSTERDAM Lamp / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "e0299ced-89d1-ea11-bbaa-000d3a2b9185", "note": "Invoice 102001", "reference": "Document No: 103001", "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-01-15T00:00:00", "totalAmount": 128.16}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2019-01-15T00:00:00", "totalAmount": -128.16}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 106.8, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 21.36, "totalAmount": 128.16, "amountDue": 0, "discountPercentage": 0, "status": "Paid", "note": "", "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:57:52Z", "sourceModifiedDate": "2019-11-08T11:56:22Z", "id": "91dccc63-b1af-4363-bee0-2aec6bab1bef", "invoiceNumber": "19700002", "customerRef": {"id": "c3bf08a3-4d51-4859-acbb-5075f9484f87", "companyName": "Mr Abe"}, "salesOrderRefs": [], "issueDate": "2019-11-08T00:00:00Z", "dueDate": "2019-11-29T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Consultancy per uur - Consultancy per uur", "unitAmount": 75, "quantity": 8, "discountAmount": 0, "subTotal": 600, "taxAmount": 0, "totalAmount": 600, "accountRef": {"id": "2421e8a0-5355-4ec0-af11-021fe4f39fcd", "name": "Omzet binnenland hoog tarief"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 600, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 600, "amountDue": 599, "discountPercentage": 0, "status": "PartiallyPaid"} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:39:08Z", "sourceModifiedDate": "2017-08-02T18:23:43Z", "id": "a05d1256-f253-46bd-aa13-c6f6a992aa47", "invoiceNumber": "17700002", "customerRef": {"id": "570321bb-8b0c-49f1-a1f5-6fb1d6d94a62", "companyName": "Some customer"}, "salesOrderRefs": [], "issueDate": "2017-08-02T00:00:00Z", "dueDate": "2017-09-01T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "A bunch of stuff - A bunch of stuff", "unitAmount": 100, "quantity": 1000, "discountAmount": 0, "subTotal": 100000, "taxAmount": 0, "totalAmount": 100000, "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 100000, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 100000, "amountDue": 0, "discountPercentage": 0, "status": "Paid"} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:19:19Z", "sourceModifiedDate": "2022-10-20T14:28:00Z", "id": "50541736", "invoiceNumber": "2348", "customerRef": {"id": "10123537", "companyName": "_Test 1"}, "salesOrderRefs": [], "issueDate": "2016-12-30T00:00:00", "dueDate": "2016-12-30T00:00:00", "paidOnDate": "2020-11-05T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "3.0 items with VatPercentage of 0.0", "unitAmount": 25.26, "quantity": 1, "discountAmount": 0, "subTotal": 25.26, "taxAmount": 0, "totalAmount": 25.26, "accountRef": {"id": "001", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "3 service charges with 0.0% vat", "unitAmount": 8.85, "quantity": 1, "discountAmount": 0, "subTotal": 8.85, "taxAmount": 0, "totalAmount": 8.85, "accountRef": {"id": "001", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Tax", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "262466203", "note": "E2E Test transaction 2 CREDIT �250.00 - Invoice receipt against 2348", "currency": "GBP", "paidOnDate": "2020-11-05T00:00:00", "totalAmount": 250}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -34.11}}], "withholdingTax": [], "subTotal": 34.11, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 34.11, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2023-03-03T09:27:42", "id": "2596455", "invoiceNumber": "test-AL", "customerRef": {"id": "602174", "companyName": "ab1"}, "salesOrderRefs": [], "issueDate": "1987-10-01T00:00:00", "dueDate": "1987-10-01T00:00:00", "paidOnDate": "2023-03-03T00:00:00", "currency": "USD", "lineItems": [{"description": "Editing creative writing for a client", "unitAmount": 222.88, "quantity": 1, "discountAmount": 0, "subTotal": 222.88, "taxAmount": 0, "totalAmount": 222.88, "itemRef": {"id": "639579", "name": "Creative Writing Editorial"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "2570292", "note": "", "currency": "USD", "paidOnDate": "2023-03-03T00:00:00", "totalAmount": 0.17}, "allocation": {"currency": "USD", "currencyRate": 1, "totalAmount": -0.17}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 222.88, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 222.88, "amountDue": 222.71, "status": "Submitted", "note": "", "metadata": {"isDeleted": false}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:15Z", "id": "143008521", "invoiceNumber": "40", "customerRef": {"id": "86832299", "companyName": "Mr French Person"}, "salesOrderRefs": [], "issueDate": "2005-12-15T00:00:00", "dueDate": "2006-01-12T00:00:00", "currency": "EUR", "currencyRate": 0.844737287, "lineItems": [{"unitAmount": 0, "quantity": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "0"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 0, "amountDue": 0, "status": "Paid"} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-20T08:16:10Z", "sourceModifiedDate": "2021-08-25T15:55:36", "id": "416", "invoiceNumber": "INV01", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "salesOrderRefs": [], "issueDate": "2021-04-09T00:00:00", "dueDate": "2021-04-30T00:00:00", "paidOnDate": "2021-04-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Non-Recurring Services - EC", "unitAmount": 100, "quantity": 1, "subTotal": 100, "totalAmount": 100, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "28", "name": "Non-Recurring Services - EC"}, "trackingCategoryRefs": [{"id": "location-1"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "428", "reference": "Payment #PYMT01", "accountRef": {"id": "122", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-04-20T00:00:00", "totalAmount": 90}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -90}}, {"payment": {"id": "428", "reference": "Payment #PYMT01", "accountRef": {"id": "122", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-04-20T00:00:00", "totalAmount": 90}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 100, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 100, "amountDue": 0, "status": "Paid"} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:08:12Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "2453-1071526256", "invoiceNumber": "975", "customerRef": {"id": "420000-1071522044", "companyName": "Prentice, Adelaide"}, "salesOrderRefs": [], "issueDate": "2022-11-28T00:00:00", "dueDate": "2023-12-28T00:00:00", "paidOnDate": "2023-01-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Foundation slab - prep and pouring", "unitAmount": 167.5, "quantity": 1, "subTotal": 167.5, "taxAmount": 0, "totalAmount": 167.5, "taxRateRef": {"id": "20000-999022286", "name": "Non-Taxable Sales"}, "itemRef": {"id": "320000-1071525597", "name": "Concrete Slab"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"unitAmount": 0, "quantity": 1, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Rough lumber", "unitAmount": 48, "quantity": 1, "subTotal": 48, "taxAmount": 0, "totalAmount": 48, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1C0000-933272656", "name": "Lumber:Rough"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"description": "Trim lumber", "unitAmount": 38, "quantity": 1, "subTotal": 38, "taxAmount": 0, "totalAmount": 38, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1D0000-933272656", "name": "Lumber:Trim"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"description": "Window", "unitAmount": 25, "quantity": 2, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1F0000-933272656", "name": "Window"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"description": "Flooring", "unitAmount": 50, "quantity": 1, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "310000-1071509547", "name": "Flooring"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}, {"description": "Window", "unitAmount": 30, "quantity": 2, "subTotal": 60, "taxAmount": 0, "totalAmount": 60, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1F0000-933272656", "name": "Window"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "6973-1197775625", "note": "Check - 80000-933270541", "reference": "983409", "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-15T00:00:00", "totalAmount": 431.95}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -431.95}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 413.5, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 18.45, "totalAmount": 431.95, "amountDue": 0, "discountPercentage": 0, "status": "Paid", "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:03:02Z", "sourceModifiedDate": "2022-09-20T10:12:08Z", "id": "16", "invoiceNumber": "1001", "customerRef": {"id": "3", "companyName": "Information Sharing Technology"}, "salesOrderRefs": [], "issueDate": "2019-02-18T00:00:00", "dueDate": "2019-03-20T00:00:00", "paidOnDate": "2020-06-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Service", "unitAmount": 500, "quantity": 10, "subTotal": 5000, "taxAmount": 0, "totalAmount": 5000, "accountRef": {"id": "1", "name": "Sales"}, "itemRef": {"id": "1", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "116", "note": "Payments of type Prepaid", "reference": "114213", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-10T00:00:00", "totalAmount": 65.77}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -23.86}}, {"payment": {"id": "122", "note": "Payments of type Cash", "reference": "121197", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-10T00:00:00", "totalAmount": 771.61}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.31}}, {"payment": {"id": "123", "note": "Payments of type Prepaid", "reference": "121293", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-10T00:00:00", "totalAmount": 34.45}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -34.45}}, {"payment": {"id": "132", "note": "Payments of type Prepaid", "reference": "13022", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-10T00:00:00", "totalAmount": 47.38}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -42.36}}, {"payment": {"id": "140", "note": "Payments of type Cash", "reference": "139163", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-13T00:00:00", "totalAmount": 1078.72}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -13.71}}, {"payment": {"id": "141", "note": "Payments of type Prepaid", "reference": "139288", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-13T00:00:00", "totalAmount": 27.88}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -27.88}}, {"payment": {"id": "149", "note": "Payments of type Cash", "reference": "148151", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-13T00:00:00", "totalAmount": 643.97}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -22.26}}, {"payment": {"id": "150", "note": "Payments of type Prepaid", "reference": "148217", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-13T00:00:00", "totalAmount": 11.57}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -11.57}}, {"payment": {"id": "157", "note": "Payments of type Prepaid", "reference": "155266", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-15T00:00:00", "totalAmount": 14.32}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4.87}}, {"payment": {"id": "165", "note": "Payments of type Cash", "reference": "164142", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-15T00:00:00", "totalAmount": 913.09}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -18.99}}, {"payment": {"id": "166", "note": "Payments of type Prepaid", "reference": "164260", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-15T00:00:00", "totalAmount": 39.98}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -39.98}}, {"payment": {"id": "173", "note": "Payments of type Prepaid", "reference": "171213", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-15T00:00:00", "totalAmount": 35.36}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -26.29}}, {"payment": {"id": "181", "note": "Payments of type Cash", "reference": "180197", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-17T00:00:00", "totalAmount": 1087.13}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10.04}}, {"payment": {"id": "182", "note": "Payments of type Prepaid", "reference": "180274", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-17T00:00:00", "totalAmount": 47.91}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -47.91}}, {"payment": {"id": "190", "note": "Payments of type Cash", "reference": "189174", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-17T00:00:00", "totalAmount": 607.48}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -13.34}}, {"payment": {"id": "191", "note": "Payments of type Prepaid", "reference": "18922", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-17T00:00:00", "totalAmount": 16.44}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.44}}, {"payment": {"id": "199", "note": "Payments of type Cash", "reference": "198128", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 1209.15}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -20.22}}, {"payment": {"id": "200", "note": "Payments of type Prepaid", "reference": "198234", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 18.35}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -18.35}}, {"payment": {"id": "208", "note": "Payments of type Cash", "reference": "207189", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-21T00:00:00", "totalAmount": 914.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.86}}, {"payment": {"id": "209", "note": "Payments of type Prepaid", "reference": "207254", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-21T00:00:00", "totalAmount": 27.62}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -27.62}}, {"payment": {"id": "217", "note": "Payments of type Cash", "reference": "216161", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-22T00:00:00", "totalAmount": 565.24}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1.66}}, {"payment": {"id": "218", "note": "Payments of type Prepaid", "reference": "216237", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-22T00:00:00", "totalAmount": 19.67}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -19.67}}, {"payment": {"id": "231", "note": "Payments of type Prepaid", "reference": "229276", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-23T00:00:00", "totalAmount": 38.7}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -30.52}}, {"payment": {"id": "240", "note": "Payments of type PrepaidPayment", "reference": "238213", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-23T00:00:00", "totalAmount": 47.7}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -31.98}}, {"payment": {"id": "249", "note": "Payments of type PrepaidPayment", "reference": "247245", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-23T00:00:00", "totalAmount": 22.03}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10.84}}, {"payment": {"id": "256", "note": "Payments of type PrepaidPayment", "reference": "254258", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-23T00:00:00", "totalAmount": 37.68}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.6}}, {"payment": {"id": "262", "note": "Payments of type Cash", "reference": "261162", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-24T00:00:00", "totalAmount": 425.69}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -15.02}}, {"payment": {"id": "263", "note": "Payments of type PrepaidPayment", "reference": "261215", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-24T00:00:00", "totalAmount": 7.24}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.24}}, {"payment": {"id": "269", "note": "Payments of type Cash", "reference": "268154", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-24T00:00:00", "totalAmount": 968.21}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -48.58}}, {"payment": {"id": "270", "note": "Payments of type PrepaidPayment", "reference": "268269", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-24T00:00:00", "totalAmount": 11.69}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -11.69}}, {"payment": {"id": "278", "note": "Payments of type Cash", "reference": "277153", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-25T00:00:00", "totalAmount": 1063.48}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -37.08}}, {"payment": {"id": "279", "note": "Payments of type PrepaidPayment", "reference": "277281", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-25T00:00:00", "totalAmount": 30.58}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -30.58}}, {"payment": {"id": "287", "note": "Payments of type Cash", "reference": "286188", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-26T00:00:00", "totalAmount": 539.55}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -6.97}}, {"payment": {"id": "288", "note": "Payments of type PrepaidPayment", "reference": "286250", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-26T00:00:00", "totalAmount": 12.73}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -12.73}}, {"payment": {"id": "296", "note": "Payments of type Cash", "reference": "295176", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-27T00:00:00", "totalAmount": 687.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4.18}}, {"payment": {"id": "297", "note": "Payments of type PrepaidPayment", "reference": "295264", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-27T00:00:00", "totalAmount": 14.92}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -14.92}}, {"payment": {"id": "303", "note": "Payments of type Cash", "reference": "302128", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-28T00:00:00", "totalAmount": 837.68}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -6.66}}, {"payment": {"id": "304", "note": "Payments of type PrepaidPayment", "reference": "302284", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-28T00:00:00", "totalAmount": 17.04}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -17.04}}, {"payment": {"id": "313", "note": "Payments of type PrepaidPayment", "reference": "311211", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-29T00:00:00", "totalAmount": 45.06}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -41.47}}, {"payment": {"id": "321", "note": "Payments of type Cash", "reference": "320186", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-29T00:00:00", "totalAmount": 798.79}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -27.08}}, {"payment": {"id": "322", "note": "Payments of type PrepaidPayment", "reference": "320256", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-29T00:00:00", "totalAmount": 14.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -14.33}}, {"payment": {"id": "333", "note": "Payments of type PrepaidPayment", "reference": "331236", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-30T00:00:00", "totalAmount": 17.94}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -17.58}}, {"payment": {"id": "341", "note": "Payments of type Cash", "reference": "340128", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-30T00:00:00", "totalAmount": 859.44}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -29.21}}, {"payment": {"id": "342", "note": "Payments of type PrepaidPayment", "reference": "340292", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-30T00:00:00", "totalAmount": 26.59}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -26.59}}, {"payment": {"id": "348", "note": "Payments of type Cash", "reference": "34710", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-31T00:00:00", "totalAmount": 949.74}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.07}}, {"payment": {"id": "349", "note": "Payments of type PrepaidPayment", "reference": "347216", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-31T00:00:00", "totalAmount": 25.32}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -25.32}}, {"payment": {"id": "361", "note": "Payments of type PrepaidPayment", "reference": "359220", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-01T00:00:00", "totalAmount": 54.12}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -40.61}}, {"payment": {"id": "367", "note": "Payments of type Cash", "reference": "366195", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-02T00:00:00", "totalAmount": 827.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -25.4}}, {"payment": {"id": "368", "note": "Payments of type PrepaidPayment", "reference": "366288", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-02T00:00:00", "totalAmount": 12.15}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -12.15}}, {"payment": {"id": "376", "note": "Payments of type Cash", "reference": "375123", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-03T00:00:00", "totalAmount": 802.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -11.54}}, {"payment": {"id": "377", "note": "Payments of type PrepaidPayment", "reference": "375298", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-03T00:00:00", "totalAmount": 39.06}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -39.06}}, {"payment": {"id": "385", "note": "Payments of type Cash", "reference": "38418", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-04T00:00:00", "totalAmount": 858.41}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -13.4}}, {"payment": {"id": "386", "note": "Payments of type PrepaidPayment", "reference": "384213", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-04T00:00:00", "totalAmount": 9.99}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -9.99}}, {"payment": {"id": "392", "note": "Payments of type Cash", "reference": "391115", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 1094.8}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -47.35}}, {"payment": {"id": "393", "note": "Payments of type PrepaidPayment", "reference": "391247", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 16.73}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.73}}, {"payment": {"id": "402", "note": "Payments of type PrepaidPayment", "reference": "400275", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-06T00:00:00", "totalAmount": 32.88}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -29.29}}, {"payment": {"id": "410", "note": "Payments of type Cash", "reference": "409145", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-07T00:00:00", "totalAmount": 725.48}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -33.79}}, {"payment": {"id": "411", "note": "Payments of type PrepaidPayment", "reference": "409292", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-07T00:00:00", "totalAmount": 6.22}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -6.22}}, {"payment": {"id": "419", "note": "Payments of type Cash", "reference": "418157", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-08T00:00:00", "totalAmount": 407.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -2.55}}, {"payment": {"id": "420", "note": "Payments of type PrepaidPayment", "reference": "418258", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-08T00:00:00", "totalAmount": 8.92}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -8.92}}, {"payment": {"id": "429", "note": "Payments of type PrepaidPayment", "reference": "427270", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-09T00:00:00", "totalAmount": 56.75}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -28.75}}, {"payment": {"id": "437", "note": "Payments of type Cash", "reference": "436168", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-10T00:00:00", "totalAmount": 760.05}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -31.48}}, {"payment": {"id": "438", "note": "Payments of type PrepaidPayment", "reference": "436234", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-10T00:00:00", "totalAmount": 6.03}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -6.03}}, {"payment": {"id": "446", "note": "Payments of type Cash", "reference": "44518", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-11T00:00:00", "totalAmount": 904.82}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -17.96}}, {"payment": {"id": "447", "note": "Payments of type PrepaidPayment", "reference": "445278", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-11T00:00:00", "totalAmount": 24.95}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -24.95}}, {"payment": {"id": "456", "note": "Payments of type PrepaidPayment", "reference": "454252", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-11T00:00:00", "totalAmount": 70.44}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -33.72}}, {"payment": {"id": "462", "note": "Payments of type Cash", "reference": "461144", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-13T00:00:00", "totalAmount": 914.05}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -34.76}}, {"payment": {"id": "463", "note": "Payments of type PrepaidPayment", "reference": "461243", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-13T00:00:00", "totalAmount": 7.47}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.47}}, {"payment": {"id": "470", "note": "Payments of type PrepaidPayment", "reference": "468248", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-13T00:00:00", "totalAmount": 67.83}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -41.38}}, {"payment": {"id": "481", "note": "Payments of type Cash", "reference": "480129", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-17T00:00:00", "totalAmount": 965.85}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10.21}}, {"payment": {"id": "482", "note": "Payments of type PrepaidPayment", "reference": "480242", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-17T00:00:00", "totalAmount": 33.9}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -33.9}}, {"payment": {"id": "490", "note": "Payments of type Cash", "reference": "489120", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-18T00:00:00", "totalAmount": 1112.76}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7.74}}, {"payment": {"id": "491", "note": "Payments of type PrepaidPayment", "reference": "489239", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-18T00:00:00", "totalAmount": 48.74}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -48.74}}, {"payment": {"id": "499", "note": "Payments of type Cash", "reference": "498147", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-20T00:00:00", "totalAmount": 1017}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5.08}}, {"payment": {"id": "500", "note": "Payments of type PrepaidPayment", "reference": "498254", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-20T00:00:00", "totalAmount": 37.77}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -37.77}}, {"payment": {"id": "507", "note": "Payments of type PrepaidPayment", "reference": "505288", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-20T00:00:00", "totalAmount": 62.82}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -54.62}}, {"payment": {"id": "521", "note": "Payments of type PrepaidPayment", "reference": "519243", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-20T00:00:00", "totalAmount": 14.74}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "647", "note": "Payments of type PrepaidPayment", "reference": "645263", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-03-20T00:00:00", "totalAmount": 40.43}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "705", "note": "Payments of type PrepaidPayment", "reference": "703246", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-03T00:00:00", "totalAmount": 25}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -25}}, {"payment": {"id": "772", "note": "Payments of type PrepaidPayment", "reference": "770263", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-24T00:00:00", "totalAmount": 10.35}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "779", "note": "Payments of type PrepaidPayment", "reference": "777217", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-24T00:00:00", "totalAmount": 39.55}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "792", "note": "Payments of type PrepaidPayment", "reference": "790262", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-29T00:00:00", "totalAmount": 12.46}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "843", "note": "Payments of type PrepaidPayment", "reference": "841264", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-05-07T00:00:00", "totalAmount": 25.64}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "850", "note": "Payments of type PrepaidPayment", "reference": "848254", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-05-14T00:00:00", "totalAmount": 53.68}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}, {"payment": {"id": "877", "note": "Payments of type PrepaidPayment", "reference": "875210", "accountRef": {"id": "60", "name": "Money (oney)"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-06-01T00:00:00", "totalAmount": 12.7}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -0.01}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 5000, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 5000, "amountDue": 3296.44, "status": "PartiallyPaid", "note": "Invoice for service"} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:36:12Z", "sourceModifiedDate": "2023-01-25T13:49:52Z", "id": "30", "invoiceNumber": "1002", "customerRef": {"id": "59", "companyName": "Ecker Holiday event"}, "salesOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-02-05T00:00:00", "paidOnDate": "2016-02-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Holiday party - gold level test v1", "unitAmount": 2000, "quantity": 1, "subTotal": 2000, "taxAmount": 400, "totalAmount": 2400, "accountRef": {"id": "44", "name": "Sales"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "7", "name": "Gold party"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Venue rental", "unitAmount": 10000, "quantity": 1, "subTotal": 10000, "taxAmount": 2000, "totalAmount": 12000, "accountRef": {"id": "68", "name": "Billable Expenses Income"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "20", "name": "Venue Rental"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "promotional items -- misc engraved items", "unitAmount": 13.5, "quantity": 75, "subTotal": 1012.5, "taxAmount": 202.5, "totalAmount": 1215, "accountRef": {"id": "68", "name": "Billable Expenses Income"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "12", "name": "Misc"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "31", "note": "", "accountRef": {"id": "81", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2016-02-12T00:00:00", "totalAmount": 15615}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -15615}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 13012.5, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 2602.5, "totalAmount": 15615, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:36:12Z", "sourceModifiedDate": "2020-07-13T11:06:40Z", "id": "82322", "invoiceNumber": "0000000110", "customerRef": {"id": "A1D001", "companyName": "A1 Design Services"}, "salesOrderRefs": [], "issueDate": "2020-07-13T00:00:00Z", "dueDate": "2020-08-12T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Standard rate", "unitAmount": 0, "quantity": 0, "discountAmount": 0.22, "subTotal": 0, "taxAmount": 8.67, "totalAmount": 8.67, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 1.08, "subTotal": 43.34, "taxAmount": 0, "totalAmount": 43.34, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "totalDiscount": 1.3, "subTotal": 43.34, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 8.67, "totalAmount": 52.01, "amountDue": 52.01, "discountPercentage": 2.49, "status": "Submitted", "note": "0000000114"} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:42Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "INV-1", "invoiceNumber": "1", "customerRef": {"id": "A1D001", "companyName": "A1 Design Services"}, "salesOrderRefs": [], "issueDate": "2021-01-02T00:00:00", "paidOnDate": "2022-01-29T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "AT Mini Tower Case", "unitAmount": 14.25, "quantity": 1, "discountAmount": 0, "subTotal": 14.25, "taxAmount": 2.43, "totalAmount": 16.68, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Whiteboard - Drywipe (900 x 1200)", "unitAmount": 19, "quantity": 4, "discountAmount": 0, "subTotal": 76, "taxAmount": 12.97, "totalAmount": 88.97, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "A4 Ledger Book - 5 Column", "unitAmount": 7.59, "quantity": 8, "discountAmount": 0, "subTotal": 60.72, "taxAmount": 10.36, "totalAmount": 71.08, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Shorthand Notebook - 80 Sheets", "unitAmount": 4.27, "quantity": 20, "discountAmount": 0, "subTotal": 85.4, "taxAmount": 14.57, "totalAmount": 99.97, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Calculator - Desktop", "unitAmount": 9.5, "quantity": 1, "discountAmount": 0, "subTotal": 9.5, "taxAmount": 1.62, "totalAmount": 11.12, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Calculator - Desktop (Printing)", "unitAmount": 16.15, "quantity": 1, "discountAmount": 0, "subTotal": 16.15, "taxAmount": 2.76, "totalAmount": 18.91, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Calculator - Printing Rolls", "unitAmount": 5.7, "quantity": 15, "discountAmount": 0, "subTotal": 85.5, "taxAmount": 14.59, "totalAmount": 100.09, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Correction Fluid - White", "unitAmount": 2.37, "quantity": 7, "discountAmount": 0, "subTotal": 16.59, "taxAmount": 2.83, "totalAmount": 19.42, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Envelope - White (110 x 220) Plain", "unitAmount": 8.54, "quantity": 20, "discountAmount": 0, "subTotal": 170.8, "taxAmount": 29.14, "totalAmount": 199.94, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Flip Chart - A1 Pad", "unitAmount": 15.2, "quantity": 10, "discountAmount": 0, "subTotal": 152, "taxAmount": 25.94, "totalAmount": 177.94, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Laminator Pouches - A4", "unitAmount": 11.4, "quantity": 5, "discountAmount": 0, "subTotal": 57, "taxAmount": 9.73, "totalAmount": 66.73, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Mouse Mat - (241 x 203) Blue", "unitAmount": 1.42, "quantity": 5, "discountAmount": 0, "subTotal": 7.1, "taxAmount": 1.21, "totalAmount": 8.31, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Copy Paper - Economy Grade", "unitAmount": 2.46, "quantity": 80, "discountAmount": 0, "subTotal": 196.8, "taxAmount": 33.58, "totalAmount": 230.38, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Coloured Paper - Pastel Blue", "unitAmount": 3.61, "quantity": 5, "discountAmount": 0, "subTotal": 18.05, "taxAmount": 3.08, "totalAmount": 21.13, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Ball Point Pen - Black", "unitAmount": 1.9, "quantity": 8, "discountAmount": 0, "subTotal": 15.2, "taxAmount": 2.59, "totalAmount": 17.79, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Pencil - HB", "unitAmount": 2.37, "quantity": 3, "discountAmount": 0, "subTotal": 7.11, "taxAmount": 1.21, "totalAmount": 8.32, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Remember-Me Sticky Notes (Recycled)", "unitAmount": 3.32, "quantity": 6, "discountAmount": 0, "subTotal": 19.92, "taxAmount": 3.4, "totalAmount": 23.32, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Scissors - Economy", "unitAmount": 2.85, "quantity": 1, "discountAmount": 0, "subTotal": 2.85, "taxAmount": 0.49, "totalAmount": 3.34, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Adhesive Tape - Brown (50mm x 66m)", "unitAmount": 2.66, "quantity": 5, "discountAmount": 0, "subTotal": 13.3, "taxAmount": 2.27, "totalAmount": 15.57, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "JP010 Jet Printer Cartridge", "unitAmount": 17.1, "quantity": 5, "discountAmount": 0, "subTotal": 85.5, "taxAmount": 14.59, "totalAmount": 100.09, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}, {"description": "Letter Trays - 3 pack (Red)", "unitAmount": 6.65, "quantity": 2, "discountAmount": 0, "subTotal": 13.3, "taxAmount": 2.27, "totalAmount": 15.57, "accountRef": {"id": "4000", "name": "Sales North"}, "discountPercentage": 0, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -8.32}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -11.12}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -8.31}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -19.42}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -15.57}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -21.13}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -99.97}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -23.32}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -18.91}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -16.68}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -100.09}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -199.94}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -3.34}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -15.57}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -100.09}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -66.73}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -117.5}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -177.94}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -230.38}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -17.79}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -71.08}}, {"payment": {"id": "265", "note": "Sales receipt 265 linked to sales invoice inv-1.", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 1432.17}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -88.97}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 1223.04, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 209.13, "totalAmount": 1432.17, "amountDue": 0, "status": "Paid", "note": "", "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T15:03:37Z", "sourceModifiedDate": "2021-07-23T13:42:59Z", "id": "b039b0a733de11e797950a57719b2edb", "invoiceNumber": "SI-1", "customerRef": {"id": "f4ff85ba33dd11e797950a57719b2edb", "companyName": "Widgets Limited"}, "salesOrderRefs": [], "issueDate": "2017-05-08T00:00:00", "dueDate": "2017-06-07T00:00:00", "paidOnDate": "2021-07-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 900, "quantity": 8, "discountAmount": 0, "subTotal": 7200, "taxAmount": 1440, "totalAmount": 8640, "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "52237e4e215911e8b45c025132dab352", "note": "Customer receipt using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-01-02T00:00:00", "totalAmount": 4000}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4000}}, {"payment": {"id": "579388a0215911e8b45c025132dab352", "note": "Customer receipt using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-01-02T00:00:00", "totalAmount": 1400}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1400}}, {"payment": {"id": "e1c2bd659a6111e8bad90617b3da4b8a", "note": "Sales credit note", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-08-07T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1000}}, {"payment": {"id": "e1c2bd659a6111e8bad90617b3da4b8a", "note": "Sales credit note", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-08-07T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1000}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 7200, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 1440, "totalAmount": 8640, "amountDue": 1240, "status": "PartiallyPaid"} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:31:54Z", "sourceModifiedDate": "2021-04-22T11:01:11Z", "id": "2916", "invoiceNumber": "IN0480", "customerRef": {"id": "12", "companyName": "MK Manufacturing"}, "salesOrderRefs": [], "issueDate": "2021-04-22T00:00:00", "dueDate": "2021-05-22T00:00:00", "paidOnDate": "2021-04-22T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 100, "quantity": 1, "subTotal": 100, "taxAmount": 20, "totalAmount": 120, "accountRef": {"id": "176", "name": "Revenue - Services"}, "taxRateRef": {"id": "105", "name": "UK Sale Services Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "CUSTOMER-12", "name": "MK Manufacturing"}, {"id": "DEPARTMENT-2", "name": "Services"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "2918", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2021-04-22T00:00:00", "totalAmount": 120}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -120}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 100, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 20, "totalAmount": 120, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-11-16T18:15:23Z", "sourceModifiedDate": "2019-12-05T23:20:36Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0ludm9pY2U6NzgyNDQ4OTg1Nzc1MzE5MTYw", "invoiceNumber": "1", "customerRef": {"id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4", "companyName": "ABC Textiles"}, "salesOrderRefs": [], "issueDate": "2019-10-17T00:00:00", "dueDate": "2019-10-17T00:00:00", "paidOnDate": "2019-12-05T23:20:36Z", "currency": "USD", "currencyRate": 0.784736781, "lineItems": [{"description": "", "unitAmount": 10, "quantity": 5, "subTotal": 50, "taxAmount": 2.5, "totalAmount": 52.5, "accountRef": {"id": "QWNjb3VudDo3OTE3NTA2MDA0MjQ0NTExMTU7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "name": "Sales"}, "itemRef": {"id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1Byb2R1Y3Q6MzU2NjcyNTI=", "name": "Golf balls"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "withholdingTax": [], "subTotal": 50, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 2.5, "totalAmount": 52.5, "amountDue": 0, "status": "Paid"} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:38:11Z", "sourceModifiedDate": "2021-01-02T20:34:51", "id": "321bfed3-2da2-4969-9358-4de97821181b", "invoiceNumber": "INV-001-0", "customerRef": {"id": "afd4093b-c655-4847-8ee2-10a4f2c3eae3", "companyName": "Maddox Publishing Group"}, "salesOrderRefs": [], "issueDate": "2021-12-20T00:00:00", "dueDate": "2022-01-17T00:00:00", "paidOnDate": "2022-02-17T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Project management - onsite daily rate - your CRM integration project", "unitAmount": 583.3333333333, "quantity": 6, "discountAmount": 0, "subTotal": 3500, "taxAmount": 700, "totalAmount": 4200, "accountRef": {"id": "a969500a-377c-4cea-8f2b-a4e385607fd0", "name": "Other Revenue"}, "discountPercentage": 0, "taxRateRef": {"id": "OUTPUT2", "name": "20% (VAT on Income)", "effectiveTaxRate": 20}, "itemRef": {"id": "aa1c5f84-4453-42fa-9c92-69d4085607c9", "name": "Project management - daily rate"}, "trackingCategoryRefs": [{"id": "34b9b859-07a9-451a-b4d3-effc9946634a", "name": "North"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "65b746c8-9a5d-4a95-8096-d2316fcff592", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-17T00:00:00", "totalAmount": 4200}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -4200}}], "withholdingTax": [], "totalDiscount": 0, "subTotal": 3500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 700, "totalAmount": 4200, "amountDue": 0, "status": "Paid", "metadata": {"isDeleted": false}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-05-19T15:36:26", "id": "104957000000038034", "invoiceNumber": "INV-102", "customerRef": {"id": "104957000000037097", "companyName": "Test Company"}, "salesOrderRefs": [], "issueDate": "2020-02-06T10:54:03", "dueDate": "2020-02-17T00:00:00", "paidOnDate": "2020-05-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "paymentAllocations": [{"payment": {"id": "104957000000129048", "note": "", "reference": "9", "accountRef": {"id": "104957000000000349", "name": "Petty Cash"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-04-29T00:00:00", "totalAmount": 9000}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -9000}}, {"payment": {"id": "104957000000137017", "note": "", "reference": "11", "accountRef": {"id": "104957000000060010", "name": "Abdi Test"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-05-19T00:00:00", "totalAmount": 9000}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1}}], "withholdingTax": [], "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "totalAmount": 9001, "amountDue": 0, "status": "Paid"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - download-accounting-invoice-pdf: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-accounting-invoice-pdf: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/pdf: "x-file: example.file" - "401": - application/json: {} - "500": - application/json: {} - list-accounting-invoice-attachments: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-list-accounting-invoice-attachments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"attachments": null} - "401": - application/json: {} - "500": - application/json: {} - get-accounting-invoice-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-accounting-invoice-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"} - "401": - application/json: {} - "500": - application/json: {} - download-accounting-invoice-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-accounting-invoice-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/octet-stream: "x-file: example.file" - "401": - application/json: {} - "500": - application/json: {} - list-accounting-credit-notes: - speakeasy-default-list-accounting-credit-notes: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2021-01-26T21:21:18Z", "id": "e6e5ec0f-1c60-eb11-89fa-00224800a9c7", "creditNoteNumber": "104001", "customerRef": {"id": "8ddfa6bf-0c60-eb11-89fa-00224800af18", "companyName": "Abdi Company"}, "withholdingTax": [], "totalAmount": 105, "totalDiscount": 0, "subTotal": 100, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 5, "discountPercentage": 0, "remainingCredit": 80, "status": "PartiallyPaid", "issueDate": "2021-01-25T00:00:00", "currency": "GBP", "lineItems": [{"description": "Invoice No. 103221:", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "NullId"}, "discountPercentage": 0, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Linda Martin", "unitAmount": 100, "quantity": 1, "discountAmount": 0, "subTotal": 100, "taxAmount": 5, "totalAmount": 105, "accountRef": {"id": "161217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Income, Services"}, "discountPercentage": 0, "taxRateRef": {"id": "61bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / REDUCED", "effectiveTaxRate": 5}, "itemRef": {"id": "RESC-331317b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "Linda Martin / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Credit memo for partially paid inv", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "NullId"}, "discountPercentage": 0, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "62e5046d-1c60-eb11-89fa-00224800a9c7", "note": "Credit Memo 1001", "reference": "Document No: 104001", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-01-25T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2021-01-25T00:00:00", "totalAmount": 25}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2021-01-26T21:33:01Z", "id": "d0d9b378-1d60-eb11-89fa-00224800a9c7", "creditNoteNumber": "104002", "customerRef": {"id": "8ddfa6bf-0c60-eb11-89fa-00224800af18", "companyName": "Abdi Company"}, "withholdingTax": [], "totalAmount": 779.28, "totalDiscount": 0, "subTotal": 649.4, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 129.88, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2021-01-26T00:00:00", "currency": "GBP", "lineItems": [{"description": "Invoice No. 103222:", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "NullId"}, "discountPercentage": 0, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Inv. No. 103222 - Shpt. No. 102222:", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "NullId"}, "discountPercentage": 0, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "ATHENS Desk -pay with CR", "unitAmount": 649.4, "quantity": 1, "discountAmount": 0, "subTotal": 649.4, "taxAmount": 129.88, "totalAmount": 779.28, "accountRef": {"id": "181217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Income, Product Sales"}, "discountPercentage": 0, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-c81217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "ATHENS Desk / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "NullId"}, "discountPercentage": 0, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "c2942210-1e60-eb11-89fa-00224800a9c7", "note": "Credit Memo 1002", "reference": "Document No: 104002", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-01-26T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2021-01-26T00:00:00", "totalAmount": 779.28}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 13, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/creditNotes"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/creditNotes?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:09Z", "sourceModifiedDate": "2020-12-23T16:39:23Z", "id": "21952211", "creditNoteNumber": "004", "customerRef": {"id": "6162023", "companyName": "Alderley plc"}, "withholdingTax": [], "totalAmount": 165, "totalDiscount": 0, "subTotal": 165, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-10-18T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Reverse 6546", "unitAmount": 110, "quantity": 1.5, "subTotal": 165, "taxAmount": 0, "totalAmount": 165, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "270764400", "note": "�165.00 - Credit Note refund against 004", "currency": "GBP", "paidOnDate": "2020-12-23T00:00:00", "totalAmount": -165}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 165}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:09Z", "sourceModifiedDate": "2022-09-29T13:00:09Z", "id": "53604300", "creditNoteNumber": "2367", "customerRef": {"id": "6162023", "companyName": "Alderley plc"}, "withholdingTax": [], "totalAmount": 165, "totalDiscount": 0, "subTotal": 165, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 165, "status": "Draft", "issueDate": "2017-10-18T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Reverse 6546", "unitAmount": 110, "quantity": 1.5, "subTotal": 165, "taxAmount": 0, "totalAmount": 165, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 281, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/creditNotes"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/creditNotes?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "id": "33407", "creditNoteNumber": "0000065", "customerRef": {"id": "511657", "companyName": "Bob's Stationary"}, "withholdingTax": [], "totalAmount": 150, "totalDiscount": 0, "subTotal": 150, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Submitted", "issueDate": "2020-07-31T00:00:00", "currency": "GBP", "lineItems": [{"description": "Test Di", "unitAmount": 150, "quantity": 1, "subTotal": 150, "taxAmount": 0, "totalAmount": 150, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "2054019", "note": "Free $150 voucher", "currency": "GBP", "paidOnDate": "2020-07-31T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 150}}], "note": "Free $150 voucher", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "id": "33409", "creditNoteNumber": "0000066", "customerRef": {"id": "511657", "companyName": "Bob's Stationary"}, "withholdingTax": [], "totalAmount": 300, "totalDiscount": 0, "subTotal": 300, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Draft", "issueDate": "2020-07-31T00:00:00", "currency": "GBP", "lineItems": [{"description": "Test Di", "unitAmount": 150, "quantity": 2, "subTotal": 300, "taxAmount": 0, "totalAmount": 300, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "2054021", "note": "Free $150 voucher", "currency": "GBP", "paidOnDate": "2020-07-31T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 300}}], "note": "Free $150 voucher", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 53, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/creditNotes"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/creditNotes?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:16Z", "id": "85322315", "creditNoteNumber": "4", "customerRef": {"id": "69946501", "companyName": "Peter Lord"}, "withholdingTax": [], "totalAmount": 100, "totalDiscount": 0, "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-05-09T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "youm", "unitAmount": 100, "quantity": -1, "subTotal": -100, "taxAmount": 0, "totalAmount": 100, "accountRef": {"id": "21481817", "name": "Sale of goods"}, "itemRef": {"id": "158667064"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "86870120", "note": "Applying Credit Note", "currency": "GBP", "paidOnDate": "2017-05-09T00:00:00", "totalAmount": -100}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 100}}]}, {"modifiedDate": "2022-09-30T10:29:16Z", "id": "85326016", "creditNoteNumber": "5", "customerRef": {"id": "69952389", "companyName": "Things Limited"}, "withholdingTax": [], "totalAmount": 1000, "totalDiscount": 0, "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-05-09T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "158675173", "unitAmount": 1, "quantity": -1000, "subTotal": -1000, "taxAmount": 0, "totalAmount": 1000, "accountRef": {"id": "21481817", "name": "Sale of goods"}, "itemRef": {"id": "158675173"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "86873915", "note": "Applying Credit Note", "currency": "GBP", "paidOnDate": "2017-05-09T00:00:00", "totalAmount": -400}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 400}}, {"payment": {"id": "86874181", "note": "", "currency": "GBP", "paidOnDate": "2017-05-09T00:00:00", "totalAmount": -100}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 100}}, {"payment": {"id": "86874199", "note": "", "currency": "GBP", "paidOnDate": "2017-05-09T00:00:00", "totalAmount": -50}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 50}}, {"payment": {"id": "86875655", "note": "Credit Note", "currency": "GBP", "paidOnDate": "2017-05-09T00:00:00", "totalAmount": -750}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 750}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 17, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/creditNotes"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/creditNotes?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-20T08:15:31Z", "sourceModifiedDate": "2022-02-25T10:58:10", "id": "8827", "creditNoteNumber": "CM27", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "withholdingTax": [], "totalAmount": 26, "totalDiscount": 0, "subTotal": 26, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 26, "status": "Submitted", "issueDate": "2021-04-09T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Andy Test Item", "unitAmount": 2, "quantity": 3, "subTotal": 6, "totalAmount": 6, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "143", "name": "Andy Test Item"}, "trackingCategoryRefs": [{"id": "classification-2"}, {"id": "department-1"}, {"id": "location-1"}], "isDirectIncome": false}, {"description": "Non-Recurring Services - EC", "unitAmount": 4, "quantity": 5, "subTotal": 20, "totalAmount": 20, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "28", "name": "Non-Recurring Services - EC"}, "trackingCategoryRefs": [{"id": "classification-2"}, {"id": "department-1"}, {"id": "location-1"}], "isDirectIncome": false}], "paymentAllocations": []}, {"modifiedDate": "2022-09-20T08:15:31Z", "sourceModifiedDate": "2022-02-25T10:58:37", "id": "8828", "creditNoteNumber": "CM28", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "withholdingTax": [], "totalAmount": 26, "totalDiscount": 0, "subTotal": 26, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 10, "status": "PartiallyPaid", "issueDate": "2021-04-09T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Andy Test Item", "unitAmount": 2, "quantity": 3, "subTotal": 6, "totalAmount": 6, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "143", "name": "Andy Test Item"}, "trackingCategoryRefs": [{"id": "classification-2"}, {"id": "department-1"}, {"id": "location-1"}], "isDirectIncome": false}, {"description": "Non-Recurring Services - EC", "unitAmount": 4, "quantity": 5, "subTotal": 20, "totalAmount": 20, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "28", "name": "Non-Recurring Services - EC"}, "trackingCategoryRefs": [{"id": "classification-2"}, {"id": "department-1"}, {"id": "location-1"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "8828", "reference": "Credit Memo #CM28", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-04-09T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 16}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 36, "_links": {"self": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/creditNotes"}, "current": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/creditNotes?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:07:38Z", "sourceModifiedDate": "2023-12-16T05:04:05", "id": "96C-933372931", "creditNoteNumber": "4002", "customerRef": {"id": "150000-933272658", "companyName": "Abercrombie, Kristy"}, "withholdingTax": [], "totalAmount": 711.15, "totalDiscount": 0, "subTotal": 660, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 51.15, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2024-12-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Whirlpool tub\nBilled and paid for 2 tubs, should have been for only 1 tub", "unitAmount": 660, "quantity": 1, "subTotal": 660, "taxAmount": 0, "totalAmount": 660, "accountRef": {"id": "40000-933270541", "name": "Accounts Receivable"}, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1E0000-933272656", "name": "Plumb Fixtrs"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "969-933372844", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-12-01T00:00:00", "totalAmount": -711.15}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 711.15}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/creditNotes"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/creditNotes?page=1&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:55Z", "sourceModifiedDate": "2019-12-10T19:00:36Z", "id": "85", "creditNoteNumber": "3122019_6", "customerRef": {"id": "3", "companyName": "Information Sharing Technology"}, "withholdingTax": [], "totalAmount": 13.53, "totalDiscount": 0, "subTotal": 13.53, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-12-03T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refunds with payment type of Cash", "unitAmount": 13.53, "quantity": 1, "subTotal": 13.53, "taxAmount": 0, "totalAmount": 13.53, "accountRef": {"id": "1", "name": "Sales"}, "taxRateRef": {"id": "8_Invoices", "name": "Exempt Invoices", "effectiveTaxRate": 0}, "itemRef": {"id": "1", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": true}], "paymentAllocations": [{"payment": {"id": "85", "note": "", "accountRef": {"id": "63", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-12-03T00:00:00", "totalAmount": -13.53}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2019-12-03T00:00:00", "totalAmount": 13.53}}]}, {"modifiedDate": "2023-01-18T11:02:55Z", "sourceModifiedDate": "2019-12-10T19:00:37Z", "id": "86", "creditNoteNumber": "3122019_66", "customerRef": {"id": "3", "companyName": "Information Sharing Technology"}, "withholdingTax": [], "totalAmount": 1, "totalDiscount": 0, "subTotal": 1, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-12-03T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refunds with payment type of Card", "unitAmount": 1, "quantity": 1, "subTotal": 1, "taxAmount": 0, "totalAmount": 1, "accountRef": {"id": "1", "name": "Sales"}, "taxRateRef": {"id": "8_Invoices", "name": "Exempt Invoices", "effectiveTaxRate": 0}, "itemRef": {"id": "1", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": true}], "paymentAllocations": [{"payment": {"id": "86", "note": "", "accountRef": {"id": "63", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-12-03T00:00:00", "totalAmount": -1}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2019-12-03T00:00:00", "totalAmount": 1}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 1253, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/creditNotes"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/creditNotes?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:03Z", "sourceModifiedDate": "2017-09-08T12:52:27Z", "id": "185", "creditNoteNumber": "1015", "customerRef": {"id": "16", "companyName": "Jordan Burgess"}, "withholdingTax": [], "totalAmount": 1800, "totalDiscount": 0, "subTotal": 1500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 300, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-02-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Employee training off site", "unitAmount": 1500, "quantity": 1, "subTotal": 1500, "taxAmount": 300, "totalAmount": 1800, "accountRef": {"id": "44", "name": "Sales"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "5", "name": "Employee Training"}, "trackingCategoryRefs": [{"id": "DEPARTMENT_1", "name": "London"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "192", "note": "Created by QB Online to link credits to charges.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2017-09-08T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 1800}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:03Z", "sourceModifiedDate": "2018-12-18T10:08:45Z", "id": "213", "creditNoteNumber": "1030", "customerRef": {"id": "5", "companyName": "Whitehead and Sons"}, "withholdingTax": [], "totalAmount": 600, "totalDiscount": 0, "subTotal": 500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 100, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2018-12-18T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Employee celebration -- Anniversary / Retirement", "unitAmount": 500, "quantity": 1, "subTotal": 500, "taxAmount": 100, "totalAmount": 600, "accountRef": {"id": "44", "name": "Sales"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "4", "name": "Employee Celebration"}, "trackingCategoryRefs": [{"id": "DEPARTMENT_3", "name": "Birmingham"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "215", "note": "Created by QB Online to link credits to charges.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-12-18T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 600}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 141, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/creditNotes"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/creditNotes?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:55Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45891", "creditNoteNumber": "return 1a", "customerRef": {"id": "A1D001", "companyName": "A1 Design Services"}, "withholdingTax": [], "totalAmount": 378, "totalDiscount": 9.46, "subTotal": 315, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 63, "discountPercentage": 2.5, "remainingCredit": 378, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Standard rate", "unitAmount": 0, "quantity": 0, "discountAmount": 1.58, "subTotal": 0, "taxAmount": 63, "totalAmount": 63, "taxRateRef": {"id": "1"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 9.46, "subTotal": 315, "taxAmount": 0, "totalAmount": 315, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "note": "black"}, {"modifiedDate": "2022-10-14T09:35:55Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45901", "creditNoteNumber": "return 003", "customerRef": {"id": "ABS001", "companyName": "ABS Garages Ltd"}, "withholdingTax": [], "totalAmount": 177.14, "totalDiscount": 4.42, "subTotal": 147.62, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 29.52, "discountPercentage": 2.5, "remainingCredit": 177.14, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Standard rate", "unitAmount": 0, "quantity": 0, "discountAmount": 0.73, "subTotal": 0, "taxAmount": 29.52, "totalAmount": 29.52, "taxRateRef": {"id": "1"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 4.42, "subTotal": 147.62, "taxAmount": 0, "totalAmount": 147.62, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "note": "cred 003"}], "pageNumber": 1, "pageSize": 2, "totalResults": 26, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/creditNotes"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/creditNotes?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:43Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "INV-17", "creditNoteNumber": "17", "customerRef": {"id": "KIN001", "companyName": "Kinghorn & French"}, "withholdingTax": [], "totalAmount": 832.84, "totalDiscount": 0, "subTotal": 711.45, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 121.39, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2021-02-02T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "PC Combo Pack 4", "unitAmount": 832.84, "quantity": 1, "subTotal": 711.45, "taxAmount": 121.39, "totalAmount": 832.84, "accountRef": {"id": "4000", "name": "Sales North"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 63.69}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 73.49}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 157.25}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 158.25}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 344.89}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 35.27}}], "note": "PC Combo Pack 4", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:43Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "INV-34", "creditNoteNumber": "34", "customerRef": {"id": "MIL001", "companyName": "Mile Road Health Centre"}, "withholdingTax": [], "totalAmount": 1668.14, "totalDiscount": 0, "subTotal": 1425, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 243.14, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2021-02-28T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "PC Combo Pack 6", "unitAmount": 1668.14, "quantity": 1, "subTotal": 1425, "taxAmount": 243.14, "totalAmount": 1668.14, "accountRef": {"id": "4000", "name": "Sales North"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "530", "note": "Sales credit inv-34 linked to sales invoice inv-26.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-28T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 1668.14}}], "note": "PC Combo Pack 6", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 7, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/creditNotes"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/creditNotes?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:55:35Z", "sourceModifiedDate": "2017-05-08T11:09:38Z", "id": "c1a0176c33de11e797950a57719b2edb", "creditNoteNumber": "SCN-1", "customerRef": {"id": "f4ff85ba33dd11e797950a57719b2edb", "companyName": "Widgets Limited"}, "withholdingTax": [], "totalAmount": 1080, "totalDiscount": 0, "subTotal": 900, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 180, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-05-08T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 900, "quantity": 1, "discountAmount": 0, "subTotal": 900, "taxAmount": 180, "totalAmount": 1080, "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "d39f7a5733de11e797950a57719b2edb", "note": "Customer refund using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2017-05-08T00:00:00", "totalAmount": -1080}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 1080}}], "note": ""}, {"modifiedDate": "2022-10-24T14:55:35Z", "sourceModifiedDate": "2018-08-07T16:51:41Z", "id": "28a459069a6211e8bad90617b3da4b8a", "creditNoteNumber": "SCN-3", "customerRef": {"id": "f4ff85ba33dd11e797950a57719b2edb", "companyName": "Widgets Limited"}, "withholdingTax": [], "totalAmount": 5400, "totalDiscount": 0, "subTotal": 4500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 900, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2018-08-07T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 900, "quantity": 5, "discountAmount": 0, "subTotal": 4500, "taxAmount": 900, "totalAmount": 5400, "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "28a459069a6211e8bad90617b3da4b8a", "note": "Sales credit note", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-08-07T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 5400}}], "note": ""}], "pageNumber": 1, "pageSize": 2, "totalResults": 2972, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/creditNotes"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/creditNotes?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-02-23T14:21:40Z", "sourceModifiedDate": "2022-03-16T12:27:43Z", "id": "5018", "creditNoteNumber": "IN0545", "customerRef": {"id": "53", "companyName": "Pacificorp"}, "withholdingTax": [], "totalAmount": 575, "totalDiscount": 0, "subTotal": 500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 75, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-03-16T00:00:00", "allocatedOnDate": "2022-03-16T00:00:00", "currency": "ZAR", "lineItems": [{"description": "No Description Provided", "unitAmount": 500, "quantity": 1, "subTotal": 500, "taxAmount": 75, "totalAmount": 575, "accountRef": {"id": "2", "name": "Accounts Receivable"}, "taxRateRef": {"id": "27", "name": "Standard Rate Output", "effectiveTaxRate": 15}, "trackingCategoryRefs": [{"id": "LOCATION-10", "name": "South Africa"}, {"id": "DEPARTMENT-2", "name": "Services"}, {"id": "CUSTOMER-53", "name": "Pacificorp"}], "isDirectIncome": false}], "paymentAllocations": [], "note": "", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-02-23T14:21:40Z", "sourceModifiedDate": "2022-03-16T12:30:19", "id": "5020", "creditNoteNumber": "ARADJ0034", "customerRef": {"id": "53", "companyName": "Pacificorp"}, "withholdingTax": [], "totalAmount": 115, "totalDiscount": 0, "subTotal": 100, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 15, "discountPercentage": 0, "remainingCredit": 115, "status": "Submitted", "issueDate": "2022-03-16T00:00:00", "currency": "ZAR", "currencyRate": 1, "lineItems": [{"description": "No Description Provided", "unitAmount": 100, "quantity": 1, "subTotal": 100, "taxAmount": 15, "totalAmount": 115, "accountRef": {"id": "2", "name": "Accounts Receivable"}, "taxRateRef": {"id": "28", "name": "Standard Rate (Capital Goods) Output", "effectiveTaxRate": 15}, "trackingCategoryRefs": [{"id": "LOCATION-10", "name": "South Africa"}, {"id": "CUSTOMER-53", "name": "Pacificorp"}], "isDirectIncome": false}], "paymentAllocations": [], "note": "", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/b53cfc9f-1a00-4a20-936f-34e8efbe07c5/data/creditNotes"}, "current": {"href": "/companies/b53cfc9f-1a00-4a20-936f-34e8efbe07c5/data/creditNotes?page=1&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:35:09Z", "sourceModifiedDate": "2011-04-07T00:34:38", "id": "47fb825b-3c43-4284-905f-c6d97acc6b37", "creditNoteNumber": "CN-0025", "customerRef": {"id": "af0091a9-82ef-4cac-9fd6-22c095ac6a58", "companyName": "Hamilton Smith Ltd"}, "withholdingTax": [], "totalAmount": 541.25, "totalDiscount": 0, "subTotal": 451.04, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 90.21, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-11-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "FULL CREDIT of INV-0016 due to duplication of invoice INV-0012. Please accept our apologies.", "unitAmount": 0, "quantity": 0, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "discountPercentage": 0, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 451.04, "quantity": 1, "discountAmount": 0, "subTotal": 451.04, "taxAmount": 90.21, "totalAmount": 541.25, "accountRef": {"id": "c563b607-fb0e-4d06-9ddb-76fdeef20ae3", "name": "Sales"}, "discountPercentage": 0, "taxRateRef": {"id": "OUTPUT2", "name": "20% (VAT on Income)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f", "name": "Desktop/network support via email & phone"}, "trackingCategoryRefs": [{"id": "34b9b859-07a9-451a-b4d3-effc9946634a", "name": "North"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "47fb825b-3c43-4284-905f-c6d97acc6b37", "reference": "Monthly Support", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-11-20T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-11-20T00:00:00", "totalAmount": 541.25}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:35:09Z", "sourceModifiedDate": "2011-04-07T02:47:04", "id": "caba470e-962f-4168-9c57-35caa289204d", "creditNoteNumber": "CN-0026", "customerRef": {"id": "9ce626d2-14ea-463c-9fff-6785ab5f9bfb", "companyName": "Boom FM"}, "withholdingTax": [], "totalAmount": 500, "totalDiscount": 0, "subTotal": 416.67, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 83.33, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2023-01-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "CREDIT Half day training - Microsoft Office and include in suite of training\r\nINV-0024", "unitAmount": 416.67, "quantity": 1, "discountAmount": 0, "subTotal": 416.67, "taxAmount": 83.33, "totalAmount": 500, "accountRef": {"id": "c563b607-fb0e-4d06-9ddb-76fdeef20ae3", "name": "Sales"}, "discountPercentage": 0, "taxRateRef": {"id": "OUTPUT2", "name": "20% (VAT on Income)", "effectiveTaxRate": 20}, "itemRef": {"id": "489558f5-27b7-4f37-ad9f-d84611c2e2ab", "name": "Half day training - Microsoft Office"}, "trackingCategoryRefs": [{"id": "b3900cc6-3745-40ea-955f-9ef7b1c8cf7e", "name": "South"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "caba470e-962f-4168-9c57-35caa289204d", "reference": "Training", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2023-01-13T00:00:00", "totalAmount": 500}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/creditNotes"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/creditNotes?page=2&pageSize=2"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-04-28T18:16:22", "id": "104957000000129002", "creditNoteNumber": "CN-00001", "customerRef": {"id": "104957000000037097", "companyName": "Test Company"}, "withholdingTax": [], "totalAmount": 9001, "totalDiscount": 0, "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 9001, "status": "Draft", "issueDate": "2020-04-28T18:16:22", "currency": "GBP", "lineItems": [], "paymentAllocations": []}, {"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-05-06T13:05:27", "id": "104957000000134023", "creditNoteNumber": "CN-00002", "customerRef": {"id": "104957000000054050", "companyName": "Doe, John"}, "withholdingTax": [], "totalAmount": 125, "totalDiscount": 0, "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-05-06T13:04:20", "currency": "GBP", "lineItems": [], "paymentAllocations": [{"payment": {"id": "104957000000134039", "currency": "GBP", "paidOnDate": "2020-05-06T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 125}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 12, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/creditNotes"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/creditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/creditNotes?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-credit-note: - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2021-01-26T21:21:18Z", "id": "e6e5ec0f-1c60-eb11-89fa-00224800a9c7", "creditNoteNumber": "104001", "customerRef": {"id": "8ddfa6bf-0c60-eb11-89fa-00224800af18", "companyName": "Abdi Company"}, "withholdingTax": [], "totalAmount": 105, "totalDiscount": 0, "subTotal": 100, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 5, "discountPercentage": 0, "remainingCredit": 80, "status": "PartiallyPaid", "issueDate": "2021-01-25T00:00:00", "currency": "GBP", "lineItems": [{"description": "Invoice No. 103221:", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "NullId"}, "discountPercentage": 0, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Linda Martin", "unitAmount": 100, "quantity": 1, "discountAmount": 0, "subTotal": 100, "taxAmount": 5, "totalAmount": 105, "accountRef": {"id": "161217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Income, Services"}, "discountPercentage": 0, "taxRateRef": {"id": "61bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / REDUCED", "effectiveTaxRate": 5}, "itemRef": {"id": "RESC-331317b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "Linda Martin / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Credit memo for partially paid inv", "unitAmount": 0, "quantity": 1, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "accountRef": {"id": "NullId"}, "discountPercentage": 0, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "62e5046d-1c60-eb11-89fa-00224800a9c7", "note": "Credit Memo 1001", "reference": "Document No: 104001", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-01-25T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2021-01-25T00:00:00", "totalAmount": 25}}], "metadata": {"isDeleted": false}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:19:09Z", "sourceModifiedDate": "2020-12-23T16:39:23Z", "id": "21952211", "creditNoteNumber": "004", "customerRef": {"id": "6162023", "companyName": "Alderley plc"}, "withholdingTax": [], "totalAmount": 165, "totalDiscount": 0, "subTotal": 165, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-10-18T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Reverse 6546", "unitAmount": 110, "quantity": 1.5, "subTotal": 165, "taxAmount": 0, "totalAmount": 165, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "270764400", "note": "�165.00 - Credit Note refund against 004", "currency": "GBP", "paidOnDate": "2020-12-23T00:00:00", "totalAmount": -165}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 165}}], "metadata": {"isDeleted": false}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "id": "33407", "creditNoteNumber": "0000065", "customerRef": {"id": "511657", "companyName": "Bob's Stationary"}, "withholdingTax": [], "totalAmount": 150, "totalDiscount": 0, "subTotal": 150, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Submitted", "issueDate": "2020-07-31T00:00:00", "currency": "GBP", "lineItems": [{"description": "Test Di", "unitAmount": 150, "quantity": 1, "subTotal": 150, "taxAmount": 0, "totalAmount": 150, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "2054019", "note": "Free $150 voucher", "currency": "GBP", "paidOnDate": "2020-07-31T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 150}}], "note": "Free $150 voucher", "metadata": {"isDeleted": false}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:16Z", "id": "85322315", "creditNoteNumber": "4", "customerRef": {"id": "69946501", "companyName": "Peter Lord"}, "withholdingTax": [], "totalAmount": 100, "totalDiscount": 0, "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-05-09T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "youm", "unitAmount": 100, "quantity": -1, "subTotal": -100, "taxAmount": 0, "totalAmount": 100, "accountRef": {"id": "21481817", "name": "Sale of goods"}, "itemRef": {"id": "158667064"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "86870120", "note": "Applying Credit Note", "currency": "GBP", "paidOnDate": "2017-05-09T00:00:00", "totalAmount": -100}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 100}}]} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-09-20T08:15:31Z", "sourceModifiedDate": "2022-02-25T10:58:10", "id": "8827", "creditNoteNumber": "CM27", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "withholdingTax": [], "totalAmount": 26, "totalDiscount": 0, "subTotal": 26, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 26, "status": "Submitted", "issueDate": "2021-04-09T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Andy Test Item", "unitAmount": 2, "quantity": 3, "subTotal": 6, "totalAmount": 6, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "143", "name": "Andy Test Item"}, "trackingCategoryRefs": [{"id": "classification-2"}, {"id": "department-1"}, {"id": "location-1"}], "isDirectIncome": false}, {"description": "Non-Recurring Services - EC", "unitAmount": 4, "quantity": 5, "subTotal": 20, "totalAmount": 20, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "28", "name": "Non-Recurring Services - EC"}, "trackingCategoryRefs": [{"id": "classification-2"}, {"id": "department-1"}, {"id": "location-1"}], "isDirectIncome": false}], "paymentAllocations": []} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:07:38Z", "sourceModifiedDate": "2023-12-16T05:04:05", "id": "96C-933372931", "creditNoteNumber": "4002", "customerRef": {"id": "150000-933272658", "companyName": "Abercrombie, Kristy"}, "withholdingTax": [], "totalAmount": 711.15, "totalDiscount": 0, "subTotal": 660, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 51.15, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2024-12-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Whirlpool tub\nBilled and paid for 2 tubs, should have been for only 1 tub", "unitAmount": 660, "quantity": 1, "subTotal": 660, "taxAmount": 0, "totalAmount": 660, "accountRef": {"id": "40000-933270541", "name": "Accounts Receivable"}, "taxRateRef": {"id": "10000-999022286", "name": "Taxable Sales"}, "itemRef": {"id": "1E0000-933272656", "name": "Plumb Fixtrs"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "969-933372844", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-12-01T00:00:00", "totalAmount": -711.15}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 711.15}}], "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:55Z", "sourceModifiedDate": "2019-12-10T19:00:36Z", "id": "85", "creditNoteNumber": "3122019_6", "customerRef": {"id": "3", "companyName": "Information Sharing Technology"}, "withholdingTax": [], "totalAmount": 13.53, "totalDiscount": 0, "subTotal": 13.53, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-12-03T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refunds with payment type of Cash", "unitAmount": 13.53, "quantity": 1, "subTotal": 13.53, "taxAmount": 0, "totalAmount": 13.53, "accountRef": {"id": "1", "name": "Sales"}, "taxRateRef": {"id": "8_Invoices", "name": "Exempt Invoices", "effectiveTaxRate": 0}, "itemRef": {"id": "1", "name": "Sales"}, "trackingCategoryRefs": [], "isDirectIncome": true}], "paymentAllocations": [{"payment": {"id": "85", "note": "", "accountRef": {"id": "63", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-12-03T00:00:00", "totalAmount": -13.53}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2019-12-03T00:00:00", "totalAmount": 13.53}}]} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:36:03Z", "sourceModifiedDate": "2017-09-08T12:52:27Z", "id": "185", "creditNoteNumber": "1015", "customerRef": {"id": "16", "companyName": "Jordan Burgess"}, "withholdingTax": [], "totalAmount": 1800, "totalDiscount": 0, "subTotal": 1500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 300, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-02-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Employee training off site", "unitAmount": 1500, "quantity": 1, "subTotal": 1500, "taxAmount": 300, "totalAmount": 1800, "accountRef": {"id": "44", "name": "Sales"}, "taxRateRef": {"id": "3_Invoices", "name": "20.0% S Invoices", "effectiveTaxRate": 20}, "itemRef": {"id": "5", "name": "Employee Training"}, "trackingCategoryRefs": [{"id": "DEPARTMENT_1", "name": "London"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "192", "note": "Created by QB Online to link credits to charges.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2017-09-08T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 1800}}], "metadata": {"isDeleted": false}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:35:55Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45891", "creditNoteNumber": "return 1a", "customerRef": {"id": "A1D001", "companyName": "A1 Design Services"}, "withholdingTax": [], "totalAmount": 378, "totalDiscount": 9.46, "subTotal": 315, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 63, "discountPercentage": 2.5, "remainingCredit": 378, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Standard rate", "unitAmount": 0, "quantity": 0, "discountAmount": 1.58, "subTotal": 0, "taxAmount": 63, "totalAmount": 63, "taxRateRef": {"id": "1"}, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 9.46, "subTotal": 315, "taxAmount": 0, "totalAmount": 315, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [], "note": "black"} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:43Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "INV-17", "creditNoteNumber": "17", "customerRef": {"id": "KIN001", "companyName": "Kinghorn & French"}, "withholdingTax": [], "totalAmount": 832.84, "totalDiscount": 0, "subTotal": 711.45, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 121.39, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2021-02-02T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "PC Combo Pack 4", "unitAmount": 832.84, "quantity": 1, "subTotal": 711.45, "taxAmount": 121.39, "totalAmount": 832.84, "accountRef": {"id": "4000", "name": "Sales North"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_1", "name": "Sales"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 35.27}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 344.89}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 158.25}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 157.25}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 73.49}}, {"payment": {"id": "336", "note": "Sales credit inv-17 linked to sales invoice inv-45.", "accountRef": {"id": ""}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 63.69}}], "note": "PC Combo Pack 4", "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:55:35Z", "sourceModifiedDate": "2017-05-08T11:09:38Z", "id": "c1a0176c33de11e797950a57719b2edb", "creditNoteNumber": "SCN-1", "customerRef": {"id": "f4ff85ba33dd11e797950a57719b2edb", "companyName": "Widgets Limited"}, "withholdingTax": [], "totalAmount": 1080, "totalDiscount": 0, "subTotal": 900, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 180, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2017-05-08T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 900, "quantity": 1, "discountAmount": 0, "subTotal": 900, "taxAmount": 180, "totalAmount": 1080, "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "d39f7a5733de11e797950a57719b2edb", "note": "Customer refund using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2017-05-08T00:00:00", "totalAmount": -1080}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 1080}}], "note": ""} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-02-23T14:21:40Z", "sourceModifiedDate": "2022-03-16T12:27:43Z", "id": "5018", "creditNoteNumber": "IN0545", "customerRef": {"id": "53", "companyName": "Pacificorp"}, "withholdingTax": [], "totalAmount": 575, "totalDiscount": 0, "subTotal": 500, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 75, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-03-16T00:00:00", "allocatedOnDate": "2022-03-16T00:00:00", "currency": "ZAR", "lineItems": [{"description": "No Description Provided", "unitAmount": 500, "quantity": 1, "subTotal": 500, "taxAmount": 75, "totalAmount": 575, "accountRef": {"id": "2", "name": "Accounts Receivable"}, "taxRateRef": {"id": "27", "name": "Standard Rate Output", "effectiveTaxRate": 15}, "trackingCategoryRefs": [{"id": "DEPARTMENT-2", "name": "Services"}, {"id": "CUSTOMER-53", "name": "Pacificorp"}, {"id": "LOCATION-10", "name": "South Africa"}], "isDirectIncome": false}], "paymentAllocations": [], "note": "", "metadata": {"isDeleted": false}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:35:09Z", "sourceModifiedDate": "2011-04-07T00:34:38", "id": "47fb825b-3c43-4284-905f-c6d97acc6b37", "creditNoteNumber": "CN-0025", "customerRef": {"id": "af0091a9-82ef-4cac-9fd6-22c095ac6a58", "companyName": "Hamilton Smith Ltd"}, "withholdingTax": [], "totalAmount": 541.25, "totalDiscount": 0, "subTotal": 451.04, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 90.21, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-11-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "FULL CREDIT of INV-0016 due to duplication of invoice INV-0012. Please accept our apologies.", "unitAmount": 0, "quantity": 0, "discountAmount": 0, "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "discountPercentage": 0, "trackingCategoryRefs": [], "isDirectIncome": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 451.04, "quantity": 1, "discountAmount": 0, "subTotal": 451.04, "taxAmount": 90.21, "totalAmount": 541.25, "accountRef": {"id": "c563b607-fb0e-4d06-9ddb-76fdeef20ae3", "name": "Sales"}, "discountPercentage": 0, "taxRateRef": {"id": "OUTPUT2", "name": "20% (VAT on Income)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f", "name": "Desktop/network support via email & phone"}, "trackingCategoryRefs": [{"id": "34b9b859-07a9-451a-b4d3-effc9946634a", "name": "North"}], "isDirectIncome": false}], "paymentAllocations": [{"payment": {"id": "47fb825b-3c43-4284-905f-c6d97acc6b37", "reference": "Monthly Support", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-11-20T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-11-20T00:00:00", "totalAmount": 541.25}}], "metadata": {"isDeleted": false}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-04-28T18:16:22", "id": "104957000000129002", "creditNoteNumber": "CN-00001", "customerRef": {"id": "104957000000037097", "companyName": "Test Company"}, "withholdingTax": [], "totalAmount": 9001, "totalDiscount": 0, "subTotal": 0, "additionalTaxAmount": 0, "additionalTaxPercentage": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 9001, "status": "Draft", "issueDate": "2020-04-28T18:16:22", "currency": "GBP", "lineItems": [], "paymentAllocations": []} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - creditNoteId: "" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-customers: - speakeasy-default-list-accounting-customers: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2022-07-03T01:27:00", "id": "c8180244-74ac-40cf-a5df-6d83661c44d7", "customerName": "Arjun Kuvalis", "contactName": "Werner Langworth", "emailAddress": "Arjun34@hotmail.com", "defaultCurrency": "GBP", "phone": "014605 64820", "addresses": [{"type": "Delivery", "line1": "Suite 214", "line2": "8439 Lueilwitz Passage", "city": "Fernandohaven", "region": "Northern Ireland", "country": "United Kingdom", "postalCode": "JG04 7PV"}, {"type": "Delivery", "line1": "Suite 096", "line2": "864 Halie Course", "city": "Juliochester", "region": "England", "country": "United Kingdom", "postalCode": "DZ8 4BF"}, {"type": "Delivery", "line1": "Suite 001", "line2": "416 Stokes Fords", "city": "Naderborough", "region": "Wales", "country": "United Kingdom", "postalCode": "XG25 0XX"}], "contacts": [{"name": "Werner Langworth", "email": "Werner_Langworth@hotmail.com", "phone": [], "address": {"type": "Delivery", "line1": "Apt. 145", "line2": "317 Williamson Freeway", "city": "Hortenseville", "region": "Scotland", "country": "United Kingdom", "postalCode": "CV4 2HR"}, "status": "Active"}, {"name": "Belle Glover", "email": "Belle51@yahoo.com", "phone": [], "address": {"type": "Delivery", "line1": "Suite 075", "line2": "9921 Dickens Walk", "city": "South Ali", "region": "Scotland", "country": "United Kingdom", "postalCode": "TI04 4OO"}, "status": "Active"}], "registrationNumber": "NI7JEJVM", "taxNumber": "7505220209.583549", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2022-12-03T11:05:01", "id": "6d162ee4-47b4-46c6-a2e6-aa9edd0fe6b0", "customerName": "Breitenberg, Emard and Schiller", "contactName": "Miguel Hahn", "emailAddress": "contact@BreitenbergEmardandSchiller.biz", "defaultCurrency": "GBP", "phone": "0800 445 6957", "addresses": [{"type": "Billing", "line1": "Apt. 184", "line2": "60578 Louie Springs", "city": "East Khalid", "region": "Wales", "country": "United Kingdom", "postalCode": "XW89 7NT"}], "contacts": [{"name": "Miguel Hahn", "email": "Miguel.Hahn@gmail.com", "phone": [{"number": "018555 09614", "type": "Landline"}], "address": {"type": "Delivery", "line1": "Suite 400", "line2": "21930 Milan Lane", "city": "Reingerton", "region": "Wales", "country": "United Kingdom", "postalCode": "QG10 2DL"}, "status": "Active"}], "registrationNumber": "KME0AMIL", "taxNumber": "8560920952.553111", "status": "Archived", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 20, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2023-01-17T14:50:54Z", "id": "0e2f7751-7696-ed11-bff5-6045bd0d2ad6", "customerName": "", "contactName": "", "emailAddress": "", "defaultCurrency": "GBP", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "", "postalCode": ""}], "contacts": [{"name": "", "email": "", "phone": [], "address": {"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "", "postalCode": ""}, "status": "Active"}], "taxNumber": "", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2021-06-03T08:48:36Z", "id": "0ef95175-48c4-eb11-9f0a-0022481b4343", "customerName": "", "contactName": "", "emailAddress": "", "defaultCurrency": "GBP", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "GB", "postalCode": ""}], "contacts": [{"name": "", "email": "", "phone": [], "address": {"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "GB", "postalCode": ""}, "status": "Active"}], "taxNumber": "", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 42, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2021-06-14T15:26:37Z", "id": "555f8251-c65a-433a-a813-5dbe04321d1e", "customerName": "Ab Netherlands", "defaultCurrency": "EUR", "addresses": [{"type": "Billing", "country": "NL"}], "contacts": [], "status": "Active"}, {"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2022-05-24T11:53:21Z", "id": "9fd1f78e-67aa-4af7-8a10-df1fc5fb5841", "customerName": "anna test 2", "defaultCurrency": "EUR", "addresses": [{"type": "Billing", "country": "NL"}], "contacts": [], "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 71, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2020-02-26T11:23:50Z", "id": "5f20075a-a28e-434d-81a6-2db0dc170e87", "customerName": "Abdi 99", "emailAddress": "email@codat.io", "defaultCurrency": "GBP", "addresses": [{"type": "Billing", "line1": "Ink Rooms", "city": "London", "country": "GB", "postalCode": "WC1X 0BE"}], "contacts": [], "registrationNumber": "123456789", "taxNumber": "GB339 0727 47", "status": "Active"}, {"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2020-02-24T12:00:50Z", "id": "1d9dc1a7-92d6-441b-93fd-42c9fb321b1c", "customerName": "Abdulbasit Al-haj", "contactName": "abeee", "emailAddress": "a.alhaj@codat.io", "defaultCurrency": "GBP", "addresses": [{"type": "Billing", "country": "GB"}], "contacts": [{"name": "abeee", "phone": [], "address": {"type": "Unknown", "line1": "", "country": "GB "}, "status": "Active", "modifiedDate": "2020-02-24T12:00:51.027Z"}], "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 53, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:12Z", "sourceModifiedDate": "2023-04-17T06:02:46Z", "id": "11526230", "customerName": "-", "contactName": "Test 1", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "contacts": [{"name": "Test 1", "phone": [], "address": {"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}, "status": "Unknown"}], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:12Z", "sourceModifiedDate": "2023-04-24T06:19:23Z", "id": "9677150", "customerName": "-", "contactName": "Test 1", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "contacts": [{"name": "Test 1", "phone": [], "address": {"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}, "status": "Unknown"}], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 159, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2022-05-18T09:23:56", "id": "634509", "customerName": "A test customer 14 (updated)", "contactName": "test person name", "emailAddress": "test14@example.com", "defaultCurrency": "GBP", "phone": "01876 541245", "addresses": [{"type": "Billing", "line1": "Line 1", "line2": "Line 2", "city": "Some city", "region": "A region", "country": "Country 1", "postalCode": "SW1 2JQ"}], "contacts": [{"name": "test person1", "email": "test14A@example.com", "phone": [{"number": "24681012", "type": "Primary"}, {"number": "121086420", "type": "Unknown"}], "status": "Active"}, {"name": "test person2", "email": "test14B@example.com", "phone": [{"number": "1234 56789", "type": "Primary"}, {"number": "9876 54321", "type": "Unknown"}], "status": "Active"}, {"name": "test person name", "email": "test14@example.com", "phone": [{"number": "01876 541245", "type": "Unknown"}], "status": "Active"}], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2022-05-11T11:39:58", "id": "634486", "customerName": "A test customer name 2", "contactName": "test person name", "emailAddress": "test8@example.com", "defaultCurrency": "GBP", "phone": "01876 541245", "addresses": [{"type": "Billing", "line1": "Line 1", "line2": "Line 2", "city": "Some city", "region": "A region", "country": "Country 1", "postalCode": "SW1 2JQ"}], "contacts": [{"name": "test person1", "email": "test9@example.com", "phone": [{"number": "24681012", "type": "Primary"}, {"number": "121086420", "type": "Unknown"}], "status": "Active"}, {"name": "test person2", "email": "test10@example.com", "phone": [{"number": "123456789", "type": "Primary"}, {"number": "987654321", "type": "Unknown"}], "status": "Active"}, {"name": "test person name", "email": "test8@example.com", "phone": [{"number": "01876 541245", "type": "Unknown"}], "status": "Active"}], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 39, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "0001-01-01T00:00:00", "id": "92227673", "customerName": "Chekko Customer Test 01", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "contacts": [{"name": "", "email": "", "phone": [], "status": "Active"}], "taxNumber": "", "status": "Active"}, {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "2021-05-04T13:22:19", "id": "88459410", "customerName": "Diogo Sousa", "contactName": "Mr Diogo Sousa", "emailAddress": "diogomail@mail.com", "phone": "123123123", "addresses": [{"type": "Billing", "line1": "Billing Address", "line2": "Billing line 2 Billing line 3", "city": "Billing line 4", "country": "United Kingdom", "postalCode": "123321"}, {"type": "Delivery", "line1": "Delivery Address", "line2": "Delivery line2 Delivery line3", "city": "Delivery line4", "country": "United Kingdom", "postalCode": "123321"}], "contacts": [{"name": "Mr Diogo Sousa", "email": "diogomail@mail.com", "phone": [{"number": "123123123", "type": "Landline"}, {"number": "321321321", "type": "Mobile"}], "address": {"type": "Billing", "line1": "Billing Address", "line2": "Billing line 2 Billing line 3", "city": "Billing line 4", "country": "United Kingdom", "postalCode": "123321"}, "status": "Active"}, {"name": "Mr Diogo Sousa", "phone": [], "address": {"type": "Delivery", "line1": "Delivery Address", "line2": "Delivery line2 Delivery line3", "city": "Delivery line4", "country": "United Kingdom", "postalCode": "123321"}, "status": "Active"}], "taxNumber": "", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 10, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-30T14:48:02Z", "sourceModifiedDate": "2022-01-11T12:28:49", "id": "773", "customerName": "119 Test Customer", "contactName": "Mr Test Customer", "defaultCurrency": "GBP", "addresses": [], "contacts": [], "status": "Active"}, {"modifiedDate": "2023-01-30T14:48:02Z", "sourceModifiedDate": "2022-07-27T14:29:16", "id": "172722", "customerName": "1248 European Company", "contactName": "European Company", "defaultCurrency": "GBP", "addresses": [], "contacts": [], "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:07:55Z", "sourceModifiedDate": "2023-12-16T05:06:42", "id": "150000-933272658", "customerName": "Abercrombie, Kristy", "contactName": "Kristy Abercrombie", "emailAddress": "kristy@samplename.com", "defaultCurrency": "GBP", "phone": "415-555-6579", "addresses": [{"type": "Delivery", "line1": "Kristy Abercrombie", "line2": "5647 Cypress Hill Rd", "city": "Bayshore", "region": "CA", "postalCode": "94326"}, {"type": "Billing", "line1": "Kristy Abercrombie", "line2": "5647 Cypress Hill Rd", "city": "Bayshore", "region": "CA", "postalCode": "94326"}], "contacts": [{"name": "Abercrombie, Kristy", "email": "kristy@samplename.com", "phone": [{"number": "415-555-6579", "type": "Primary"}], "status": "Active"}, {"name": "Kristy Abercrombie", "phone": [], "status": "Active"}, {"name": "Steve Darcangelo", "phone": [], "status": "Active"}], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:07:55Z", "sourceModifiedDate": "2023-12-16T05:06:42", "id": "800000D0-1182061376", "customerName": "Allard, Robert", "contactName": "Amanda Roberts", "emailAddress": "rallard@myemail.com", "defaultCurrency": "GBP", "phone": "650-555-3422", "addresses": [{"type": "Delivery", "line1": "Robert Allard", "line2": "92834 Chandler St.", "city": "Millbrae", "region": "CA", "postalCode": "94030"}, {"type": "Billing", "line1": "Robert Allard", "line2": "92834 Chandler St.", "city": "Millbrae", "region": "CA", "postalCode": "94030"}], "contacts": [{"name": "Allard, Robert", "email": "rallard@myemail.com", "phone": [{"number": "650-555-3422", "type": "Primary"}, {"number": "650-555-9804", "type": "Fax"}, {"number": "650-555-8349", "type": "Unknown"}], "status": "Active"}, {"name": "Robert Allard", "phone": [], "status": "Active"}, {"name": "Rachel Fisher", "phone": [], "status": "Active"}], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 64, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:35Z", "sourceModifiedDate": "2022-12-08T15:42:59Z", "id": "9", "customerName": "Abe", "contactName": "Abraham's Company", "emailAddress": "ab@email.com", "defaultCurrency": "GBP", "addresses": [], "contacts": [{"name": "Abe", "email": "ab@email.com", "phone": [{"number": "01111111111", "type": "Mobile"}], "status": "Active"}], "registrationNumber": "XXXX9900001", "taxNumber": "XXXX9900001", "status": "Active"}, {"modifiedDate": "2023-01-18T11:02:35Z", "sourceModifiedDate": "2022-08-22T09:21:09Z", "id": "49", "customerName": "adeel qbo child test", "contactName": "Adeel test", "emailAddress": "adeel@adeel.com", "defaultCurrency": "GBP", "phone": "123456789", "addresses": [{"type": "Billing", "line1": "4 Privet Drive", "city": "London", "country": "United Kingdom", "postalCode": "WD25 7LR"}, {"type": "Delivery", "line1": "4 Privet Drive", "city": "London", "country": "United Kingdom", "postalCode": "WD25 7LR"}], "contacts": [{"name": "Adeel test", "email": "adeel@adeel.com", "phone": [{"number": "123456789", "type": "Primary"}, {"number": "07546543216", "type": "Mobile"}], "address": {"type": "Billing", "line1": "4 Privet Drive", "city": "London", "country": "United Kingdom", "postalCode": "WD25 7LR"}, "status": "Active"}], "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 40, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:56Z", "sourceModifiedDate": "2016-09-12T18:53:19Z", "id": "66", "customerName": "Abercrombie International Group", "contactName": "Kristy Abercrombie", "defaultCurrency": "GBP", "addresses": [{"type": "Billing", "line1": "123 Main St", "city": "New York, NY"}], "contacts": [{"name": "Abercrombie International Group (deleted)", "phone": [], "address": {"type": "Billing", "line1": "123 Main St", "city": "New York, NY"}, "status": "Archived"}], "status": "Archived", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:56Z", "sourceModifiedDate": "2023-03-29T01:12:55Z", "id": "67", "customerName": "Abercrombie International Group", "contactName": "Natalie Watts", "emailAddress": "n.watts@google.com", "defaultCurrency": "USD", "addresses": [{"type": "Billing"}, {"type": "Delivery"}], "contacts": [{"name": "Abercrombie International Group", "email": "n.watts@google.com", "phone": [], "address": {"type": "Billing"}, "status": "Active"}], "registrationNumber": "XXXXVat123456", "taxNumber": "XXXXVat123456", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 243, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:53Z", "sourceModifiedDate": "2022-04-27T15:17:36Z", "id": "A1D001", "customerName": "A1 Design Services", "contactName": "Lee Dalkin", "emailAddress": "newbusinessadvice@sage.com", "defaultCurrency": "GBP", "phone": "01742 876 234", "addresses": [{"type": "Delivery", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "", "postalCode": "BP12 7HT"}, {"type": "Delivery", "line1": "23a Union Street", "line2": "", "city": "Manchester", "region": "", "country": "", "postalCode": "M2 6JK"}, {"type": "Billing", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "Great Britain", "postalCode": "BP12 7HT"}], "contacts": [{"name": "Lee Dalkin", "email": "newbusinessadvice@sage.com", "phone": [{"number": "01742 876 234", "type": "Landline"}, {"number": "01742 876 235", "type": "Landline"}, {"number": "01742 876 236", "type": "Fax"}], "status": "Active"}, {"name": "Malcolm Leverret", "email": "", "phone": [], "status": "Active"}, {"name": "Jim Thomas", "email": "Jim@a1designservices.co.uk", "phone": [{"number": "01742 876 234", "type": "Landline"}, {"number": "01742 876 235", "type": "Fax"}], "status": "Active"}, {"name": "Jullian Plawsworth", "email": "Jullian@a1designservices.co.uk", "phone": [{"number": "0151 349 3939", "type": "Landline"}, {"number": "0151 349 3940", "type": "Fax"}], "status": "Active"}], "registrationNumber": "", "taxNumber": "GB238 3839 38", "status": "Active"}, {"modifiedDate": "2022-10-14T09:35:53Z", "sourceModifiedDate": "2020-09-23T10:28:58Z", "id": "A1D002", "customerName": "A2 Design Services", "contactName": "Lee Dalkin", "emailAddress": "newbusinessadvice@sage.com", "defaultCurrency": "GBP", "phone": "01742 876 234", "addresses": [{"type": "Billing", "line1": "77a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "Great Britain", "postalCode": "BP12 7HT"}], "contacts": [{"name": "Lee Dalkin", "email": "newbusinessadvice@sage.com", "phone": [{"number": "01742 876 234", "type": "Landline"}, {"number": "01742 876 235", "type": "Landline"}, {"number": "01742 876 236", "type": "Fax"}], "status": "Active"}, {"name": "Malcolm Leverret", "email": "", "phone": [], "status": "Active"}, {"name": "Jim Thomas", "email": "Jim@a1designservices.co.uk", "phone": [{"number": "01742 876 234", "type": "Landline"}, {"number": "01742 876 235", "type": "Fax"}], "status": "Active"}, {"name": "Jullian Plawsworth", "email": "Jullian@a1designservices.co.uk", "phone": [{"number": "0151 349 3939", "type": "Landline"}, {"number": "0151 349 3940", "type": "Fax"}], "status": "Active"}], "registrationNumber": "", "taxNumber": "GB238 3839 40", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 43, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:41Z", "sourceModifiedDate": "2022-11-25T09:43:54Z", "id": "A1D001", "customerName": "A1 Design Services", "contactName": "Ian Cairns", "emailAddress": "newbusinessadvice@sage.com", "defaultCurrency": "GBP", "phone": "01742 876 234", "addresses": [{"type": "Delivery", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "GB", "postalCode": "BP12 7HT"}, {"type": "Delivery", "line1": "23a Union Street", "line2": "", "city": "Manchester", "region": "", "country": "GB", "postalCode": "M2 6JK"}, {"type": "Unknown", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "GB", "postalCode": "BP12 7HT"}], "contacts": [], "taxNumber": "GB238 3839 38", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:41Z", "sourceModifiedDate": "2022-11-25T09:43:54Z", "id": "ABS001", "customerName": "ABS Garages Ltd", "contactName": "Mike Hall", "emailAddress": "newbusinessadvice@sage.com", "defaultCurrency": "GBP", "phone": "0191 254 5909", "addresses": [{"type": "Delivery", "line1": "Swanson Industries", "line2": "Dukes Industrial Estate", "city": "Whitley Bay", "region": "North Tyneside", "country": "GB", "postalCode": "NE56 4ER"}, {"type": "Delivery", "line1": "Unit 34", "line2": "Holystone Ind Estate", "city": "Hebburn", "region": "Tyne & Wear", "country": "GB", "postalCode": "NE31 1VB"}, {"type": "Unknown", "line1": "Unit 34", "line2": "Holystone Ind Estate", "city": "Hebburn", "region": "Tyne & Wear", "country": "GB", "postalCode": "NE31 1VB"}], "contacts": [], "taxNumber": "GB745 4584 68", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 30, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2021-05-10T16:31:51Z", "id": "260f6a3f94a243738f2d5e08496a41a8", "customerName": "100 test name", "contactName": "Main Contact", "emailAddress": "email@codat.io", "defaultCurrency": "GBP", "phone": "contact phone number", "addresses": [{"type": "Billing", "line1": "Aruba Address line 1", "line2": "Aruba Address line 2", "city": "Aruba City", "region": "Aruba Province", "country": "Aruba (AW)", "postalCode": "Aruba Post"}], "contacts": [{"phone": [{"number": "contact mobile number", "type": "Mobile"}, {"number": "contact fax number", "type": "Fax"}], "status": "Unknown"}], "status": "Active"}, {"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2021-06-10T14:22:46Z", "id": "44a5d9461d9e4f6d90a5ace251c5cf35", "customerName": "100 test name DS", "contactName": "Main Contact", "emailAddress": "DCemail@codat.io", "defaultCurrency": "GBP", "phone": "contact phone number", "addresses": [{"type": "Billing", "line1": "POST - Aruba Address line 1", "line2": "POST - Aruba Address line 2", "city": "POST - Aruba City", "region": "Aruba Province", "country": "Aruba (AW)", "postalCode": "Aruba Post"}], "contacts": [], "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 168, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/customers"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:32:21Z", "sourceModifiedDate": "2022-09-06T12:58:27", "id": "188", "customerName": "33Across", "contactName": "Yuna Conn", "defaultCurrency": "USD", "phone": "520-393-4468", "addresses": [{"type": "Unknown", "line1": "155 Westend Point", "line2": "", "city": "Albuquerque", "region": "NM", "country": "United States", "postalCode": "87140"}], "contacts": [{"name": "Conn, Yuna", "phone": [{"number": "520-393-4468", "type": "Primary"}], "address": {"type": "Unknown", "line1": "155 Westend Point", "line2": "", "city": "Albuquerque", "region": "NM", "country": "United States", "postalCode": "87140"}, "status": "Unknown"}], "taxNumber": "", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:32:21Z", "sourceModifiedDate": "2020-10-20T05:01:49", "id": "324", "customerName": "3Way International Logistics", "contactName": "Lauri O'Heagertie", "defaultCurrency": "CAD", "phone": "410-309-3976", "addresses": [{"type": "Unknown", "line1": "7 Lerdahl Junction", "line2": "", "city": "Sparwood", "region": "British Columbia", "country": "Canada", "postalCode": "L4R"}], "contacts": [{"name": "O'Heagertie, Lauri", "phone": [{"number": "410-309-3976", "type": "Primary"}], "address": {"type": "Unknown", "line1": "7 Lerdahl Junction", "line2": "", "city": "Sparwood", "region": "British Columbia", "country": "Canada", "postalCode": "L4R"}, "status": "Unknown"}], "taxNumber": "", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 530, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=2&pageSize=2"}}} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-11-16T18:15:30Z", "sourceModifiedDate": "2019-10-17T07:59:04Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4", "customerName": "ABC Textiles", "contactName": "", "emailAddress": "c.taylor@codat.io", "defaultCurrency": "USD", "addresses": [], "contacts": [], "status": "Active"}, {"modifiedDate": "2022-11-16T18:15:30Z", "sourceModifiedDate": "2020-03-17T19:12:39Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjM3MTUzNDI2", "customerName": "Coffee Cart", "contactName": "Coffee Carl", "emailAddress": "coffee.cart@example.com", "defaultCurrency": "GBP", "phone": "0201111", "addresses": [{"type": "Billing", "line1": "11 Coffee Lane", "line2": "Coffee Town", "city": "Coffee City", "region": "Hampshire", "country": "United Kingdom", "postalCode": "CC1 1CC"}], "contacts": [{"name": "Coffee Carl", "phone": [{"number": "07733", "type": "Mobile"}], "status": "Active"}], "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 10, "_links": {"self": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers"}, "current": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:35:10Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "e4c9d0e2-c285-4e85-b579-6d28b180c730", "customerName": "24 Locks", "emailAddress": "", "addresses": [], "contacts": [], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:35:10Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "bab779bc-c5fb-42cb-a888-953e8309711c", "customerName": "7-Eleven", "emailAddress": "", "addresses": [], "contacts": [], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 48, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/customers"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=2&pageSize=2"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-06-09T14:36:47", "id": "104957000000032105", "customerName": "A B", "contactName": "Contact (First Name) Contact (Last Name)", "emailAddress": "contactperson@whateveryouwantidontcare12345.com", "defaultCurrency": "GBP", "phone": "Work Phone", "addresses": [], "contacts": [{"name": "Contact (First Name) Contact (Last Name)", "email": "contactperson@whateveryouwantidontcare12345.com", "phone": [{"number": "Work Phone", "type": "Landline"}, {"number": "Mobile", "type": "Mobile"}], "status": "Active"}], "status": "Active"}, {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-09-28T15:09:22", "id": "104957000000054050", "customerName": "Doe, John", "contactName": "John Doe", "emailAddress": "", "defaultCurrency": "GBP", "addresses": [], "contacts": [{"name": "John Doe", "email": "", "phone": [], "status": "Active"}], "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 14, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-customer: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2022-07-03T01:27:00", "id": "c8180244-74ac-40cf-a5df-6d83661c44d7", "customerName": "Arjun Kuvalis", "contactName": "Werner Langworth", "emailAddress": "Arjun34@hotmail.com", "defaultCurrency": "GBP", "phone": "014605 64820", "addresses": [{"type": "Delivery", "line1": "Suite 214", "line2": "8439 Lueilwitz Passage", "city": "Fernandohaven", "region": "Northern Ireland", "country": "United Kingdom", "postalCode": "JG04 7PV"}, {"type": "Delivery", "line1": "Suite 096", "line2": "864 Halie Course", "city": "Juliochester", "region": "England", "country": "United Kingdom", "postalCode": "DZ8 4BF"}, {"type": "Delivery", "line1": "Suite 001", "line2": "416 Stokes Fords", "city": "Naderborough", "region": "Wales", "country": "United Kingdom", "postalCode": "XG25 0XX"}], "contacts": [{"name": "Werner Langworth", "email": "Werner_Langworth@hotmail.com", "phone": [], "address": {"type": "Delivery", "line1": "Apt. 145", "line2": "317 Williamson Freeway", "city": "Hortenseville", "region": "Scotland", "country": "United Kingdom", "postalCode": "CV4 2HR"}, "status": "Active"}, {"name": "Belle Glover", "email": "Belle51@yahoo.com", "phone": [], "address": {"type": "Delivery", "line1": "Suite 075", "line2": "9921 Dickens Walk", "city": "South Ali", "region": "Scotland", "country": "United Kingdom", "postalCode": "TI04 4OO"}, "status": "Active"}], "registrationNumber": "NI7JEJVM", "taxNumber": "7505220209.583549", "status": "Active", "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2023-01-17T14:50:54Z", "id": "0e2f7751-7696-ed11-bff5-6045bd0d2ad6", "customerName": "", "contactName": "", "emailAddress": "", "defaultCurrency": "GBP", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "", "postalCode": ""}], "contacts": [{"name": "", "email": "", "phone": [], "address": {"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "", "postalCode": ""}, "status": "Active"}], "taxNumber": "", "status": "Active", "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2021-06-14T15:26:37Z", "id": "555f8251-c65a-433a-a813-5dbe04321d1e", "customerName": "Ab Netherlands", "defaultCurrency": "EUR", "addresses": [{"type": "Billing", "country": "NL"}], "contacts": [], "status": "Active"} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2020-02-26T11:23:50Z", "id": "5f20075a-a28e-434d-81a6-2db0dc170e87", "customerName": "Abdi 99", "emailAddress": "email@codat.io", "defaultCurrency": "GBP", "addresses": [{"type": "Billing", "line1": "Ink Rooms", "city": "London", "country": "GB", "postalCode": "WC1X 0BE"}], "contacts": [], "registrationNumber": "123456789", "taxNumber": "GB339 0727 47", "status": "Active"} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:19:12Z", "sourceModifiedDate": "2023-04-17T06:02:46Z", "id": "11526230", "customerName": "-", "contactName": "Test 1", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "contacts": [{"name": "Test 1", "phone": [], "address": {"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}, "status": "Unknown"}], "status": "Active", "metadata": {"isDeleted": false}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2022-05-18T09:23:56", "id": "634509", "customerName": "A test customer 14 (updated)", "contactName": "test person name", "emailAddress": "test14@example.com", "defaultCurrency": "GBP", "phone": "01876 541245", "addresses": [{"type": "Billing", "line1": "Line 1", "line2": "Line 2", "city": "Some city", "region": "A region", "country": "Country 1", "postalCode": "SW1 2JQ"}], "contacts": [{"name": "test person1", "email": "test14A@example.com", "phone": [{"number": "24681012", "type": "Primary"}, {"number": "121086420", "type": "Unknown"}], "status": "Active"}, {"name": "test person2", "email": "test14B@example.com", "phone": [{"number": "123456789", "type": "Primary"}, {"number": "987654321", "type": "Unknown"}], "status": "Active"}, {"name": "test person name", "email": "test14@example.com", "phone": [{"number": "01876 541245", "type": "Unknown"}], "status": "Active"}], "status": "Active", "metadata": {"isDeleted": false}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "0001-01-01T00:00:00", "id": "92227673", "customerName": "Chekko Customer Test 01", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "contacts": [{"name": "", "email": "", "phone": [], "status": "Active"}], "taxNumber": "", "status": "Active"} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-30T14:48:02Z", "sourceModifiedDate": "2022-01-11T12:28:49", "id": "773", "customerName": "119 Test Customer", "contactName": "Mr Test Customer", "defaultCurrency": "GBP", "addresses": [], "contacts": [], "status": "Active"} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:07:55Z", "sourceModifiedDate": "2023-12-16T05:06:42", "id": "150000-933272658", "customerName": "Abercrombie, Kristy", "contactName": "Kristy Abercrombie", "emailAddress": "kristy@samplename.com", "defaultCurrency": "GBP", "phone": "415-555-6579", "addresses": [{"type": "Delivery", "line1": "Kristy Abercrombie", "line2": "5647 Cypress Hill Rd", "city": "Bayshore", "region": "CA", "postalCode": "94326"}, {"type": "Billing", "line1": "Kristy Abercrombie", "line2": "5647 Cypress Hill Rd", "city": "Bayshore", "region": "CA", "postalCode": "94326"}], "contacts": [{"name": "Abercrombie, Kristy", "email": "kristy@samplename.com", "phone": [{"number": "415-555-6579", "type": "Primary"}], "status": "Active"}, {"name": "Kristy Abercrombie", "phone": [], "status": "Active"}, {"name": "Steve Darcangelo", "phone": [], "status": "Active"}], "status": "Active", "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:35Z", "sourceModifiedDate": "2022-12-08T15:42:59Z", "id": "9", "customerName": "Abe", "contactName": "Abraham's Company", "emailAddress": "ab@email.com", "defaultCurrency": "GBP", "addresses": [], "contacts": [{"name": "Abe", "email": "ab@email.com", "phone": [{"number": "01111111111", "type": "Mobile"}], "status": "Active"}], "registrationNumber": "XXXX9900001", "taxNumber": "XXXX9900001", "status": "Active"} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:35:56Z", "sourceModifiedDate": "2016-09-12T18:53:19Z", "id": "66", "customerName": "Abercrombie International Group", "contactName": "Kristy Abercrombie", "defaultCurrency": "GBP", "addresses": [{"type": "Billing", "line1": "123 Main St", "city": "New York, NY"}], "contacts": [{"name": "Abercrombie International Group (deleted)", "phone": [], "address": {"type": "Billing", "line1": "123 Main St", "city": "New York, NY"}, "status": "Archived"}], "status": "Archived", "metadata": {"isDeleted": false}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:35:53Z", "sourceModifiedDate": "2022-04-27T15:17:36Z", "id": "A1D001", "customerName": "A1 Design Services", "contactName": "Lee Dalkin", "emailAddress": "newbusinessadvice@sage.com", "defaultCurrency": "GBP", "phone": "01742 876 234", "addresses": [{"type": "Delivery", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "", "postalCode": "BP12 7HT"}, {"type": "Delivery", "line1": "23a Union Street", "line2": "", "city": "Manchester", "region": "", "country": "", "postalCode": "M2 6JK"}, {"type": "Billing", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "Great Britain", "postalCode": "BP12 7HT"}], "contacts": [{"name": "Lee Dalkin", "email": "newbusinessadvice@sage.com", "phone": [{"number": "01742 876 234", "type": "Landline"}, {"number": "01742 876 235", "type": "Landline"}, {"number": "01742 876 236", "type": "Fax"}], "status": "Active"}, {"name": "Malcolm Leverret", "email": "", "phone": [], "status": "Active"}, {"name": "Jim Thomas", "email": "Jim@a1designservices.co.uk", "phone": [{"number": "01742 876 234", "type": "Landline"}, {"number": "01742 876 235", "type": "Fax"}], "status": "Active"}, {"name": "Jullian Plawsworth", "email": "Jullian@a1designservices.co.uk", "phone": [{"number": "0151 349 3939", "type": "Landline"}, {"number": "0151 349 3940", "type": "Fax"}], "status": "Active"}], "registrationNumber": "", "taxNumber": "GB238 3839 38", "status": "Active"} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:41Z", "sourceModifiedDate": "2022-11-25T09:43:54Z", "id": "A1D001", "customerName": "A1 Design Services", "contactName": "Ian Cairns", "emailAddress": "newbusinessadvice@sage.com", "defaultCurrency": "GBP", "phone": "01742 876 234", "addresses": [{"type": "Delivery", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "GB", "postalCode": "BP12 7HT"}, {"type": "Delivery", "line1": "23a Union Street", "line2": "", "city": "Manchester", "region": "", "country": "GB", "postalCode": "M2 6JK"}, {"type": "Unknown", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "GB", "postalCode": "BP12 7HT"}], "contacts": [], "taxNumber": "GB238 3839 38", "status": "Active", "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2021-05-10T16:31:51Z", "id": "260f6a3f94a243738f2d5e08496a41a8", "customerName": "100 test name", "contactName": "Main Contact", "emailAddress": "email@codat.io", "defaultCurrency": "GBP", "phone": "contact phone number", "addresses": [{"type": "Billing", "line1": "Aruba Address line 1", "line2": "Aruba Address line 2", "city": "Aruba City", "region": "Aruba Province", "country": "Aruba (AW)", "postalCode": "Aruba Post"}], "contacts": [{"phone": [{"number": "contact mobile number", "type": "Mobile"}, {"number": "contact fax number", "type": "Fax"}], "status": "Unknown"}], "status": "Active"} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:32:21Z", "sourceModifiedDate": "2022-09-06T12:58:27", "id": "188", "customerName": "33Across", "contactName": "Yuna Conn", "defaultCurrency": "USD", "phone": "520-393-4468", "addresses": [{"type": "Unknown", "line1": "155 Westend Point", "line2": "", "city": "Albuquerque", "region": "NM", "country": "United States", "postalCode": "87140"}], "contacts": [{"name": "Conn, Yuna", "phone": [{"number": "520-393-4468", "type": "Primary"}], "address": {"type": "Unknown", "line1": "155 Westend Point", "line2": "", "city": "Albuquerque", "region": "NM", "country": "United States", "postalCode": "87140"}, "status": "Unknown"}], "taxNumber": "", "status": "Active", "metadata": {"isDeleted": false}} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-11-16T18:15:30Z", "sourceModifiedDate": "2019-10-17T07:59:04Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4", "customerName": "ABC Textiles", "contactName": "", "emailAddress": "c.taylor@codat.io", "defaultCurrency": "USD", "addresses": [], "contacts": [], "status": "Active"} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:35:10Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "e4c9d0e2-c285-4e85-b579-6d28b180c730", "customerName": "24 Locks", "emailAddress": "", "addresses": [], "contacts": [], "status": "Active", "metadata": {"isDeleted": false}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-06-09T14:36:47", "id": "104957000000032105", "customerName": "A B", "contactName": "Contact (First Name) Contact (Last Name)", "emailAddress": "contactperson@whateveryouwantidontcare12345.com", "defaultCurrency": "GBP", "phone": "Work Phone", "addresses": [], "contacts": [{"name": "Contact (First Name) Contact (Last Name)", "email": "contactperson@whateveryouwantidontcare12345.com", "phone": [{"number": "Work Phone", "type": "Landline"}, {"number": "Mobile", "type": "Mobile"}], "status": "Active"}], "status": "Active"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-customer-attachments: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-list-accounting-customer-attachments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"attachments": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"}]} - "401": - application/json: {} - "500": - application/json: {} - get-accounting-customer-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-accounting-customer-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"} - "401": - application/json: {} - "500": - application/json: {} - download-accounting-customer-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-accounting-customer-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/octet-stream: "x-file: example.file" - "401": - application/json: {} - "500": - application/json: {} - list-accounting-direct-incomes: - speakeasy-default-list-accounting-direct-incomes: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-05-13T01:06:00", "id": "38e8c917-0afc-4583-8ffe-1b53ad601197", "reference": "3cb8ced3-3ecb-4974-ada5-8290b0ec3355", "note": "Direct Income with 1 line items, totaling 188.33", "contactRef": {"id": "51f03576-f6b0-40d5-9fba-81a490411c03", "dataType": "customers"}, "issueDate": "2022-04-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Underground - Drain Yard Gully", "unitAmount": 171.21, "quantity": 1, "discountAmount": 0, "discountPercentage": 0, "subTotal": 171.21, "taxAmount": 17.12, "totalAmount": 188.33, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "00491160-6ee5-4d76-9f34-998f00687481", "name": "Aluminium Silt Bucket"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "38e8c917-0afc-4583-8ffe-1b53ad601197", "note": "Payment for direct income 38e8c917-0afc-4583-8ffe-1b53ad601197", "reference": "Direct Income 38e8c917-0afc-4583-8ffe-1b53ad601197", "accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-04-19T00:00:00", "totalAmount": 188.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-04-19T00:00:00", "totalAmount": -188.33}}], "subTotal": 171.21, "taxAmount": 17.12, "totalAmount": 188.33, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2023-02-13T00:34:00", "id": "c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "reference": "ee4ea56f-8806-494d-9c69-7ec22e68dc5e", "note": "Direct Income with 4 line items, totaling 32095.91", "contactRef": {"id": "453ddfc0-49ce-4f66-a815-dae734be885c", "dataType": "customers"}, "issueDate": "2022-04-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 2, "discountAmount": 0, "discountPercentage": 0, "subTotal": 190.16, "taxAmount": 19.02, "totalAmount": 209.18, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [{"id": "costcode_9", "name": "PandaConstruction"}, {"id": "department_3", "name": "MarshallBrotherContracting"}]}, {"description": "Grease Trap", "unitAmount": 1251.89, "quantity": 6, "discountAmount": 778.93, "discountPercentage": 10.37, "subTotal": 6732.41, "taxAmount": 673.24, "totalAmount": 7405.66, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "51077072-d5c3-463b-9cb4-7da2e11886f9", "name": "150 Litre Grease Trap"}, "trackingCategoryRefs": []}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 2, "discountAmount": 0, "discountPercentage": 0, "subTotal": 5563.88, "taxAmount": 556.39, "totalAmount": 6120.27, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": []}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 6, "discountAmount": 0, "discountPercentage": 0, "subTotal": 16691.64, "taxAmount": 1669.16, "totalAmount": 18360.8, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "note": "Payment for direct income c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "reference": "Direct Income c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-04-19T00:00:00", "totalAmount": 32095.91}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-04-19T00:00:00", "totalAmount": -32095.91}}], "subTotal": 29178.09, "taxAmount": 2917.81, "totalAmount": 32095.91, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 518, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/directIncomes"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/directIncomes?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/directIncomes?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-06-15T22:56:26Z", "id": "8be30162-feec-ec11-82f9-000d3a8746a9", "reference": "B1234", "note": "4006", "issueDate": "2022-06-18T00:00:00", "currency": "USD", "currencyRate": 0.648364486, "lineItems": [{"description": "Interest Income", "unitAmount": 7.13, "quantity": 1, "subTotal": 7.13, "taxAmount": 1.43, "totalAmount": 8.56, "accountRef": {"id": "221217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Interest Income"}, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "trackingCategoryRefs": [{"id": "adbc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "ADM-Administration"}]}], "paymentAllocations": [{"payment": {"id": "8be30162-feec-ec11-82f9-000d3a8746a9", "accountRef": {"id": "8277672c-b8e6-ec11-82f8-0022481a77f0", "name": "B020-BoA"}, "currency": "USD", "currencyRate": 0.6483644859813084, "paidOnDate": "2022-06-18T00:00:00", "totalAmount": 8.56}, "allocation": {"currency": "USD", "currencyRate": 0.6483644859813084, "allocatedOnDate": "2022-06-18T00:00:00", "totalAmount": 8.56}}], "subTotal": 7.13, "taxAmount": 1.43, "totalAmount": 8.56, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2023-03-08T13:55:34Z", "id": "f68e56e0-b8bd-ed11-9a88-6045bd0f9361", "reference": "B110", "note": "4990", "issueDate": "2023-03-07T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Accounts Receivable", "unitAmount": 649.4, "quantity": -1, "subTotal": -649.4, "taxAmount": 0, "totalAmount": -649.4, "accountRef": {"id": "641217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accounts Receivable"}, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "f68e56e0-b8bd-ed11-9a88-6045bd0f9361", "accountRef": {"id": "b6545a08-a9bd-ed11-9a88-0022484358c7", "name": "HOLDING_LENDING"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-03-07T00:00:00", "totalAmount": -649.4}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2023-03-07T00:00:00", "totalAmount": -649.4}}], "subTotal": -649.4, "taxAmount": 0, "totalAmount": -649.4, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/directIncomes"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/directIncomes?page=1&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:20:36Z", "sourceModifiedDate": "2022-10-06T10:38:24Z", "id": "344673327", "note": "Test Transaction 2", "issueDate": "2017-11-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Test Transaction 2", "unitAmount": 10.5, "quantity": 1, "subTotal": 10.5, "taxAmount": 0, "totalAmount": 10.5, "accountRef": {"id": "001", "name": "Sales"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "344673327", "note": "Test Transaction 2", "accountRef": {"id": "750-1", "name": "Bank Account: Business Current Account"}, "currency": "GBP", "paidOnDate": "2017-11-01T00:00:00", "totalAmount": 10.5}, "allocation": {"currency": "GBP", "allocatedOnDate": "2017-11-01T00:00:00", "totalAmount": 10.5}}], "subTotal": 10.5, "taxAmount": 0, "totalAmount": 10.5, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:20:36Z", "sourceModifiedDate": "2022-10-24T12:13:27Z", "id": "348104863", "note": "Codat Ltd Ref: Nov Topup", "issueDate": "2017-11-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Codat Ltd Ref: Nov Topup", "unitAmount": 100, "quantity": 1, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "accountRef": {"id": "001", "name": "Sales"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "348104863", "note": "Codat Ltd Ref: Nov Topup", "accountRef": {"id": "750-1", "name": "Bank Account: Business Current Account"}, "currency": "GBP", "paidOnDate": "2017-11-23T00:00:00", "totalAmount": 100}, "allocation": {"currency": "GBP", "allocatedOnDate": "2017-11-23T00:00:00", "totalAmount": 100}}], "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 211, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/directIncomes"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/directIncomes?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/directIncomes?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:14:12Z", "sourceModifiedDate": "2023-12-16T05:06:23", "id": "9B87-1181931723", "reference": "9C08-1181931827", "contactRef": {"id": "280000-933272658", "dataType": "customers"}, "issueDate": "2023-01-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 1228.18, "quantity": 1, "subTotal": 1228.18, "taxAmount": 0, "totalAmount": 1228.18, "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "9B87-1181931723", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-15T00:00:00", "totalAmount": 1228.18}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2023-01-15T00:00:00", "totalAmount": 1228.18}}], "subTotal": 1228.18, "taxAmount": 0, "totalAmount": 1228.18, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:14:12Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "68E0-1197775239", "reference": "96F3-1197775718", "contactRef": {"id": "800000B5-1197701259", "dataType": "customers"}, "issueDate": "2023-01-17T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 361.08, "quantity": 1, "subTotal": 361.08, "taxAmount": 0, "totalAmount": 361.08, "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "68E0-1197775239", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-17T00:00:00", "totalAmount": 15281.67}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2023-01-17T00:00:00", "totalAmount": 361.08}}], "subTotal": 361.08, "taxAmount": 0, "totalAmount": 361.08, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 104, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/directIncomes"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/directIncomes?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/directIncomes?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:04Z", "sourceModifiedDate": "2016-09-12T15:26:26Z", "id": "5-1", "contactRef": {"id": "52", "dataType": "suppliers"}, "issueDate": "2015-11-24T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "contribution to start business", "unitAmount": 10000, "quantity": 1, "discountAmount": 0, "subTotal": 10000, "taxAmount": 0, "totalAmount": 10000, "accountRef": {"id": "61", "name": "Owner's Equity - Contributions"}, "taxRateRef": {"id": "2_Invoices", "name": "Exempt Invoices", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "5-1", "accountRef": {"id": "81", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2015-11-24T00:00:00", "totalAmount": 10000}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2015-11-24T00:00:00", "totalAmount": -10000}}], "subTotal": 10000, "taxAmount": 0, "totalAmount": 10000, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:04Z", "sourceModifiedDate": "2016-09-12T15:26:26Z", "id": "5-2", "contactRef": {"id": "53", "dataType": "suppliers"}, "issueDate": "2015-11-24T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "funds borrowed to start business", "unitAmount": 25000, "quantity": 1, "discountAmount": 0, "subTotal": 25000, "taxAmount": 0, "totalAmount": 25000, "accountRef": {"id": "63", "name": "Note Payable"}, "taxRateRef": {"id": "2_Invoices", "name": "Exempt Invoices", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "5-2", "accountRef": {"id": "81", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2015-11-24T00:00:00", "totalAmount": 25000}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2015-11-24T00:00:00", "totalAmount": -25000}}], "subTotal": 25000, "taxAmount": 0, "totalAmount": 25000, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 741, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/directIncomes"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/directIncomes?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/directIncomes?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:50Z", "sourceModifiedDate": "2018-12-17T14:56:20Z", "id": "1", "note": "Opening Balance from Bank", "issueDate": "2018-09-21T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 170.23, "quantity": 1, "discountAmount": 0, "subTotal": 170.23, "taxAmount": 0, "totalAmount": 170.23, "accountRef": {"id": "53", "name": "Retained profit balance forward account"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "1", "accountRef": {"id": "61", "name": "Dave PP Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-09-21T00:00:00", "totalAmount": 170.23}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2018-09-21T00:00:00", "totalAmount": -170.23}}], "subTotal": 170.23, "taxAmount": 0, "totalAmount": 170.23}, {"modifiedDate": "2023-01-18T11:02:50Z", "sourceModifiedDate": "2018-12-17T14:56:44Z", "id": "11", "note": "Payment from CD Baby, a division of Audio and Video Labs Inc", "issueDate": "2018-10-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Payment from CD Baby, a division of Audio and Video Labs Inc", "unitAmount": 8.12, "quantity": 1, "discountAmount": 0, "subTotal": 8.12, "taxAmount": 0, "totalAmount": 8.12, "accountRef": {"id": "57", "name": "Sales of Product Income"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "11", "accountRef": {"id": "61", "name": "Dave PP Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-10-15T00:00:00", "totalAmount": 8.12}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2018-10-15T00:00:00", "totalAmount": -8.12}}], "subTotal": 8.12, "taxAmount": 0, "totalAmount": 8.12}], "pageNumber": 1, "pageSize": 2, "totalResults": 1171, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/directIncomes"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/directIncomes?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/directIncomes?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-28T11:10:26Z", "sourceModifiedDate": "2022-03-15T12:45:58Z", "id": "4973", "reference": "dt test contact", "note": "dt header description", "issueDate": "2022-03-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Dt test line1", "unitAmount": 125, "quantity": 1, "subTotal": 125, "taxAmount": 25, "totalAmount": 150, "accountRef": {"id": "151", "name": "Cash"}, "taxRateRef": {"id": "99", "name": "UK Sale Goods Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "DEPARTMENT-1", "name": "Sales"}, {"id": "LOCATION-8", "name": "United Kingdom"}]}, {"description": "dt test line 2", "unitAmount": 166.67, "quantity": 1, "subTotal": 166.67, "taxAmount": 33.33, "totalAmount": 200, "accountRef": {"id": "152", "name": "Cash Equivalents"}, "taxRateRef": {"id": "99", "name": "UK Sale Goods Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "DEPARTMENT-2", "name": "Services"}, {"id": "LOCATION-8", "name": "United Kingdom"}]}], "paymentAllocations": [{"payment": {"id": "4973", "note": "dt header description", "accountRef": {"id": "289", "name": "Checking 5 - Bank Of England"}, "currency": "GBP", "paidOnDate": "2022-03-15T00:00:00", "totalAmount": 350}, "allocation": {"currency": "GBP", "allocatedOnDate": "2022-03-15T00:00:00", "totalAmount": 350}}], "subTotal": 291.67, "taxAmount": 58.33, "totalAmount": 350}, {"modifiedDate": "2022-10-28T11:10:26Z", "id": "5314", "reference": "Test Int Income", "note": "Test Description", "issueDate": "2022-03-24T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Interest earned", "unitAmount": 300, "quantity": 1, "subTotal": 300, "totalAmount": 300, "accountRef": {"id": "5", "name": "Other Income"}, "trackingCategoryRefs": [{"id": "DEPARTMENT-1", "name": "Sales"}, {"id": "LOCATION-8", "name": "United Kingdom"}]}], "paymentAllocations": [{"payment": {"id": "5314", "note": "Test Description", "reference": "Test Int Income", "accountRef": {"id": "289", "name": "Checking 5 - Bank Of England"}, "currency": "GBP", "paidOnDate": "2022-03-24T00:00:00", "totalAmount": 300}, "allocation": {"currency": "GBP", "allocatedOnDate": "2022-03-24T00:00:00", "totalAmount": 300}}], "subTotal": 300, "taxAmount": 0, "totalAmount": 300}], "pageNumber": 1, "pageSize": 2, "totalResults": 43, "_links": {"self": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/connections/be80adfc-1157-4db4-9170-f8bcbbc051ba/data/directIncomes"}, "current": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/connections/be80adfc-1157-4db4-9170-f8bcbbc051ba/data/directIncomes?page=1&pageSize=2"}, "next": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/connections/be80adfc-1157-4db4-9170-f8bcbbc051ba/data/directIncomes?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2011-04-11T00:45:38", "id": "3a1be853-5964-4afe-ad6a-fb89cbaf6606", "reference": "Sub 098801", "contactRef": {"id": "bc446de5-971e-48b5-8efd-1745149844ef", "dataType": "customers"}, "issueDate": "2023-02-14T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Long-term subscriber discount - refund on sub", "unitAmount": 35, "quantity": 1, "subTotal": 35, "taxAmount": 0, "totalAmount": 35, "accountRef": {"id": "a40f43e2-c7b0-4187-919a-04ccdc14a630", "name": "Subscriptions"}, "taxRateRef": {"id": "EXEMPTINPUT", "name": "Exempt Expenses", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "3a1be853-5964-4afe-ad6a-fb89cbaf6606", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-02-14T00:00:00", "totalAmount": 35}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2023-02-14T00:00:00", "totalAmount": 35}}], "subTotal": 35, "taxAmount": 0, "totalAmount": 35, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/directIncomes"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/directIncomes?page=1&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-direct-income: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-05-13T01:06:00", "id": "38e8c917-0afc-4583-8ffe-1b53ad601197", "reference": "3cb8ced3-3ecb-4974-ada5-8290b0ec3355", "note": "Direct Income with 1 line items, totaling 188.33", "contactRef": {"id": "51f03576-f6b0-40d5-9fba-81a490411c03", "dataType": "customers"}, "issueDate": "2022-04-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Underground - Drain Yard Gully", "unitAmount": 171.21, "quantity": 1, "discountAmount": 0, "discountPercentage": 0, "subTotal": 171.21, "taxAmount": 17.12, "totalAmount": 188.33, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "00491160-6ee5-4d76-9f34-998f00687481", "name": "Aluminium Silt Bucket"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "38e8c917-0afc-4583-8ffe-1b53ad601197", "note": "Payment for direct income 38e8c917-0afc-4583-8ffe-1b53ad601197", "reference": "Direct Income 38e8c917-0afc-4583-8ffe-1b53ad601197", "accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-04-19T00:00:00", "totalAmount": 188.33}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-04-19T00:00:00", "totalAmount": -188.33}}], "subTotal": 171.21, "taxAmount": 17.12, "totalAmount": 188.33, "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-06-15T22:56:26Z", "id": "8be30162-feec-ec11-82f9-000d3a8746a9", "reference": "B1234", "note": "4006", "issueDate": "2022-06-18T00:00:00", "currency": "USD", "currencyRate": 0.648364486, "lineItems": [{"description": "Interest Income", "unitAmount": 7.13, "quantity": 1, "subTotal": 7.13, "taxAmount": 1.43, "totalAmount": 8.56, "accountRef": {"id": "221217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Interest Income"}, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "trackingCategoryRefs": [{"id": "adbc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "ADM-Administration"}]}], "paymentAllocations": [{"payment": {"id": "8be30162-feec-ec11-82f9-000d3a8746a9", "accountRef": {"id": "8277672c-b8e6-ec11-82f8-0022481a77f0", "name": "B020-BoA"}, "currency": "USD", "currencyRate": 0.6483644859813084, "paidOnDate": "2022-06-18T00:00:00", "totalAmount": 8.56}, "allocation": {"currency": "USD", "currencyRate": 0.6483644859813084, "allocatedOnDate": "2022-06-18T00:00:00", "totalAmount": 8.56}}], "subTotal": 7.13, "taxAmount": 1.43, "totalAmount": 8.56, "metadata": {"isDeleted": false}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:20:36Z", "sourceModifiedDate": "2022-10-06T10:38:24Z", "id": "344673327", "note": "Test Transaction 2", "issueDate": "2017-11-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Test Transaction 2", "unitAmount": 10.5, "quantity": 1, "subTotal": 10.5, "taxAmount": 0, "totalAmount": 10.5, "accountRef": {"id": "001", "name": "Sales"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "344673327", "note": "Test Transaction 2", "accountRef": {"id": "750-1", "name": "Bank Account: Business Current Account"}, "currency": "GBP", "paidOnDate": "2017-11-01T00:00:00", "totalAmount": 10.5}, "allocation": {"currency": "GBP", "allocatedOnDate": "2017-11-01T00:00:00", "totalAmount": 10.5}}], "subTotal": 10.5, "taxAmount": 0, "totalAmount": 10.5, "metadata": {"isDeleted": false}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:14:12Z", "sourceModifiedDate": "2023-12-16T05:06:23", "id": "9B87-1181931723", "reference": "9C08-1181931827", "contactRef": {"id": "280000-933272658", "dataType": "customers"}, "issueDate": "2023-01-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 1228.18, "quantity": 1, "subTotal": 1228.18, "taxAmount": 0, "totalAmount": 1228.18, "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "9B87-1181931723", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-15T00:00:00", "totalAmount": 1228.18}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2023-01-15T00:00:00", "totalAmount": 1228.18}}], "subTotal": 1228.18, "taxAmount": 0, "totalAmount": 1228.18, "metadata": {"isDeleted": false}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:36:04Z", "sourceModifiedDate": "2016-09-12T15:26:26Z", "id": "5-1", "contactRef": {"id": "52", "dataType": "suppliers"}, "issueDate": "2015-11-24T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "contribution to start business", "unitAmount": 10000, "quantity": 1, "discountAmount": 0, "subTotal": 10000, "taxAmount": 0, "totalAmount": 10000, "accountRef": {"id": "61", "name": "Owner's Equity - Contributions"}, "taxRateRef": {"id": "2_Invoices", "name": "Exempt Invoices", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "5-1", "accountRef": {"id": "81", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2015-11-24T00:00:00", "totalAmount": 10000}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2015-11-24T00:00:00", "totalAmount": -10000}}], "subTotal": 10000, "taxAmount": 0, "totalAmount": 10000, "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:50Z", "sourceModifiedDate": "2018-12-17T14:56:20Z", "id": "1", "note": "Opening Balance from Bank", "issueDate": "2018-09-21T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 170.23, "quantity": 1, "discountAmount": 0, "subTotal": 170.23, "taxAmount": 0, "totalAmount": 170.23, "accountRef": {"id": "53", "name": "Retained profit balance forward account"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "1", "accountRef": {"id": "61", "name": "Dave PP Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-09-21T00:00:00", "totalAmount": 170.23}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2018-09-21T00:00:00", "totalAmount": -170.23}}], "subTotal": 170.23, "taxAmount": 0, "totalAmount": 170.23} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-28T11:10:26Z", "sourceModifiedDate": "2022-03-15T12:45:58Z", "id": "4973", "reference": "dt test contact", "note": "dt header description", "issueDate": "2022-03-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Dt test line1", "unitAmount": 125, "quantity": 1, "subTotal": 125, "taxAmount": 25, "totalAmount": 150, "accountRef": {"id": "151", "name": "Cash"}, "taxRateRef": {"id": "99", "name": "UK Sale Goods Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "DEPARTMENT-1", "name": "Sales"}, {"id": "LOCATION-8", "name": "United Kingdom"}]}, {"description": "dt test line 2", "unitAmount": 166.67, "quantity": 1, "subTotal": 166.67, "taxAmount": 33.33, "totalAmount": 200, "accountRef": {"id": "152", "name": "Cash Equivalents"}, "taxRateRef": {"id": "99", "name": "UK Sale Goods Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "DEPARTMENT-2", "name": "Services"}, {"id": "LOCATION-8", "name": "United Kingdom"}]}], "paymentAllocations": [{"payment": {"id": "4973", "note": "dt header description", "accountRef": {"id": "289", "name": "Checking 5 - Bank Of England"}, "currency": "GBP", "paidOnDate": "2022-03-15T00:00:00", "totalAmount": 350}, "allocation": {"currency": "GBP", "allocatedOnDate": "2022-03-15T00:00:00", "totalAmount": 350}}], "subTotal": 291.67, "taxAmount": 58.33, "totalAmount": 350} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2011-04-11T00:45:38", "id": "3a1be853-5964-4afe-ad6a-fb89cbaf6606", "reference": "Sub 098801", "contactRef": {"id": "bc446de5-971e-48b5-8efd-1745149844ef", "dataType": "customers"}, "issueDate": "2023-02-14T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Long-term subscriber discount - refund on sub", "unitAmount": 35, "quantity": 1, "subTotal": 35, "taxAmount": 0, "totalAmount": 35, "accountRef": {"id": "a40f43e2-c7b0-4187-919a-04ccdc14a630", "name": "Subscriptions"}, "taxRateRef": {"id": "EXEMPTINPUT", "name": "Exempt Expenses", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "3a1be853-5964-4afe-ad6a-fb89cbaf6606", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-02-14T00:00:00", "totalAmount": 35}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2023-02-14T00:00:00", "totalAmount": 35}}], "subTotal": 35, "taxAmount": 0, "totalAmount": 35, "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-direct-income-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-accounting-direct-income-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: null - "401": - application/json: {} - "500": - application/json: {} - download-accounting-direct-income-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-accounting-direct-income-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/octet-stream: "x-file: example.file" - "401": - application/json: {} - "500": - application/json: {} - list-accounting-direct-income-attachments: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-list-accounting-direct-income-attachments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"attachments": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"}]} - "401": - application/json: {} - "500": - application/json: {} - list-accounting-payments: - speakeasy-default-list-accounting-payments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-04-25T13:04:02", "id": "7ba4fc1b-e248-49ba-8bf8-0813d7f203a8", "customerRef": {"id": "a82042f1-a005-4ca5-bfd3-5bc237123aa5", "companyName": "Keara Leffler"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "totalAmount": 3669.52, "currency": "GBP", "currencyRate": 1, "date": "2022-04-25T13:04:02", "note": "Payment against invoice ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "lines": [{"amount": 3669.52, "links": [{"type": "Invoice", "id": "ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "amount": -3669.52, "currencyRate": 1}], "allocatedOnDate": "2022-04-25T13:04:02"}], "reference": "ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-04-25T13:04:02", "id": "9407d5ee-893a-4547-bd89-bc7b795ee774", "customerRef": {"id": "d65ac505-072c-49ec-be3c-3cb74228966d", "companyName": "Jensen Steuber"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "paymentMethodRef": {"id": "8db2de81-0db4-46ee-b7f9-c711a7e89a01", "name": "Cash payments-IHz"}, "totalAmount": 1772.72, "currency": "GBP", "currencyRate": 1, "date": "2022-04-25T13:04:02", "note": "Payment against invoice 2518ca08-5e2a-4630-8cee-a6bcd1625660", "lines": [{"amount": 1772.72, "links": [{"type": "Invoice", "id": "2518ca08-5e2a-4630-8cee-a6bcd1625660", "amount": -1772.72, "currencyRate": 1}], "allocatedOnDate": "2022-04-25T13:04:02"}], "reference": "2518ca08-5e2a-4630-8cee-a6bcd1625660", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 200, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/payments"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/payments?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:27Z", "sourceModifiedDate": "0001-01-01T00:00:00Z", "id": "e0299ced-89d1-ea11-bbaa-000d3a2b9185", "customerRef": {"id": "b61217b3-89d1-ea11-bbaa-000d3a2b9185", "companyName": "Trey Researches"}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 128.16, "currency": "GBP", "currencyRate": 1, "date": "2019-01-15T00:00:00", "note": "Invoice 102001", "lines": [{"amount": 128.16, "links": [{"type": "Invoice", "id": "18c906bf-89d1-ea11-bbaa-000d3a2b9185", "amount": -128.16, "currencyRate": 1}], "allocatedOnDate": "2019-01-15T00:00:00"}], "reference": "Document No: 103001", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:27Z", "sourceModifiedDate": "0001-01-01T00:00:00Z", "id": "042a9ced-89d1-ea11-bbaa-000d3a2b9185", "customerRef": {"id": "b41217b3-89d1-ea11-bbaa-000d3a2b9185", "companyName": "Adatum Corporation"}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 600.48, "currency": "GBP", "currencyRate": 1, "date": "2019-01-16T00:00:00", "note": "Invoice 102002", "lines": [{"amount": 600.48, "links": [{"type": "Invoice", "id": "1bc906bf-89d1-ea11-bbaa-000d3a2b9185", "amount": -600.48, "currencyRate": 1}], "allocatedOnDate": "2019-01-16T00:00:00"}], "reference": "Document No: 103002", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 249, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/payments"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/payments?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:36:13Z", "sourceModifiedDate": "2019-11-26T12:31:46Z", "id": "090f5d9f-d1ce-4a61-985f-d3915618b64a_c3bf08a3-4d51-4859-acbb-5075f9484f87", "customerRef": {"id": "c3bf08a3-4d51-4859-acbb-5075f9484f87", "companyName": "Mr Abe"}, "accountRef": {"id": "35717508-0696-4481-a32c-2835f0ed8b4e", "name": "Test GL account 2"}, "totalAmount": 229.08, "currency": "EUR", "currencyRate": 1, "date": "2019-11-26T00:00:00Z", "lines": [{"amount": 229.08, "links": [{"type": "Invoice", "id": "f010d4df-13ea-45d1-8525-785164df7dd9", "amount": -229.08, "currencyRate": 1}]}], "reference": "19230011"}, {"modifiedDate": "2022-10-26T13:36:13Z", "sourceModifiedDate": "2019-11-26T12:31:12Z", "id": "1650bb9c-5d9a-40f2-9015-0e251a12f861_c3bf08a3-4d51-4859-acbb-5075f9484f87", "customerRef": {"id": "c3bf08a3-4d51-4859-acbb-5075f9484f87", "companyName": "Mr Abe"}, "accountRef": {"id": "35717508-0696-4481-a32c-2835f0ed8b4e", "name": "Test GL account 2"}, "totalAmount": 991.56, "currency": "EUR", "currencyRate": 1, "date": "2019-11-26T00:00:00Z", "lines": [{"amount": 991.56, "links": [{"type": "Invoice", "id": "013f05e6-2583-4e6d-8309-a479808cf7bf", "amount": -991.56, "currencyRate": 1}]}], "reference": "19230010"}], "pageNumber": 1, "pageSize": 2, "totalResults": 46, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/payments"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/payments?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:35:14Z", "sourceModifiedDate": "2020-01-02T10:08:27Z", "id": "14b7d656-07ee-4d70-aafa-61c0030c08ad_7e566728-a7f3-4860-a7f5-381664673287", "customerRef": {"id": "7e566728-a7f3-4860-a7f5-381664673287", "companyName": "Customer A"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 1, "currency": "GBP", "currencyRate": 1, "date": "2020-01-02T00:00:00Z", "lines": [{"amount": 1, "links": [{"type": "Invoice", "id": "6220ed43-1fec-4e17-a88f-c7ee5b949e76", "amount": -1, "currencyRate": 1}]}], "reference": "20200002"}, {"modifiedDate": "2022-10-26T13:35:14Z", "sourceModifiedDate": "2020-01-02T09:58:15Z", "id": "d8b093cf-3d37-405b-9e85-72552226553f_7e566728-a7f3-4860-a7f5-381664673287", "customerRef": {"id": "7e566728-a7f3-4860-a7f5-381664673287", "companyName": "Customer A"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 1, "currency": "GBP", "currencyRate": 1, "date": "2020-01-02T00:00:00Z", "lines": [{"amount": 1, "links": [{"type": "Invoice", "id": "6220ed43-1fec-4e17-a88f-c7ee5b949e76", "amount": -1, "currencyRate": 1}]}], "reference": "20200001"}], "pageNumber": 1, "pageSize": 2, "totalResults": 5, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/payments"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/payments?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:21:37Z", "id": "135234099", "customerRef": {"id": "6162049", "companyName": "Wintershall Holding GmbH"}, "totalAmount": 100, "currency": "GBP", "date": "2017-11-23T00:00:00", "note": "CODAT LTD ref: NOV TOPUP OTHER �100.00 - Invoice receipt against 015", "lines": [{"amount": 100, "links": [{"type": "Invoice", "id": "21973931", "amount": -100, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:21:37Z", "id": "135258250", "customerRef": {"id": "6162230", "companyName": "Stronachs LLP"}, "totalAmount": 100, "currency": "GBP", "date": "2017-11-23T00:00:00", "note": "CODAT LTD ref: NOV TOPUP OTHER �100.00 - Invoice receipt against 006", "lines": [{"amount": 100, "links": [{"type": "Invoice", "id": "21952246", "amount": -100, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1146, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/payments"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/payments?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2018-09-11T06:58:46", "id": "765831", "customerRef": {"id": "113070"}, "totalAmount": 1, "currency": "GBP", "date": "2018-09-11T00:00:00", "note": "Overpayment: invoice #0000003, some test", "lines": [{"amount": 1, "links": [{"type": "PaymentOnAccount", "id": "113070", "amount": -1, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2019-01-21T10:23:59", "id": "988600", "customerRef": {"id": "380630"}, "totalAmount": 5, "currency": "GBP", "date": "2019-01-21T00:00:00", "note": "Overpayment: invoice #0000007", "lines": [{"amount": 5, "links": [{"type": "PaymentOnAccount", "id": "380630", "amount": -5, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 239, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/payments"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/payments?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:15Z", "id": "139214921", "customerRef": {"id": "85743294", "companyName": "Parent customer"}, "totalAmount": 1.2, "currency": "GBP", "date": "2010-04-07T00:00:00", "note": "", "lines": [{"amount": 1.2, "links": [{"type": "Invoice", "id": "137055108", "amount": -1.2, "currencyRate": 1}]}]}, {"modifiedDate": "2022-09-30T10:29:15Z", "id": "86861497", "customerRef": {"id": "69946501", "companyName": "Peter Lord"}, "totalAmount": 10, "currency": "GBP", "date": "2017-05-01T00:00:00", "note": "", "lines": [{"amount": 10, "links": [{"type": "Invoice", "id": "85315064", "amount": -10, "currencyRate": 1}]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 74, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/payments"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/payments?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-20T08:18:33Z", "sourceModifiedDate": "2022-02-25T10:58:37", "id": "8828", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "totalAmount": 0, "currency": "GBP", "currencyRate": 1, "date": "2021-04-09T00:00:00", "lines": [{"amount": 0, "links": [{"type": "Invoice", "id": "8530", "amount": -16, "currencyRate": 1}, {"type": "CreditNote", "id": "8828", "amount": 16, "currencyRate": 1}]}], "reference": "Credit Memo #CM28"}, {"modifiedDate": "2022-09-20T08:18:33Z", "sourceModifiedDate": "2022-04-28T13:36:54", "id": "428", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "accountRef": {"id": "122", "name": "Undeposited Funds"}, "totalAmount": 90, "currency": "GBP", "currencyRate": 1, "date": "2021-04-20T00:00:00", "lines": [{"amount": 90, "links": [{"type": "Invoice", "id": "416", "amount": -90, "currencyRate": 1}]}, {"amount": 10, "links": [{"type": "Invoice", "id": "416", "amount": -10, "currencyRate": 1}]}, {"amount": -10, "links": [{"type": "Other", "id": "428", "amount": 10, "currencyRate": 1}]}], "reference": "Payment #PYMT01"}], "pageNumber": 1, "pageSize": 2, "totalResults": 113, "_links": {"self": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/payments"}, "current": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/payments?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:08:36Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "6915-1197775450", "customerRef": {"id": "220000-933272658", "companyName": "Melton, Johnny"}, "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "totalAmount": 14488.64, "currency": "GBP", "currencyRate": 1, "date": "2023-01-10T00:00:00", "note": "Check - 80000-933270541", "lines": [{"amount": 14488.64, "links": [{"type": "Invoice", "id": "469E-1071530054", "amount": -14488.64, "currencyRate": 1}]}], "reference": "19650", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:08:36Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "6973-1197775625", "customerRef": {"id": "420000-1071522044", "companyName": "Prentice, Adelaide"}, "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "totalAmount": 431.95, "currency": "GBP", "currencyRate": 1, "date": "2023-01-15T00:00:00", "note": "Check - 80000-933270541", "lines": [{"amount": 431.95, "links": [{"type": "Invoice", "id": "2453-1071526256", "amount": -431.95, "currencyRate": 1}]}], "reference": "983409", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 108, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/payments"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/payments?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:03:14Z", "sourceModifiedDate": "2020-08-14T09:59:29Z", "id": "710", "customerRef": {"id": "9", "companyName": "Abe"}, "accountRef": {"id": "56", "name": "Undeposited Funds"}, "totalAmount": 95.2, "currency": "GBP", "currencyRate": 1, "date": "2018-10-05T00:00:00", "note": "Sarah's Test", "lines": [{"amount": 95.2, "links": [{"type": "Invoice", "id": "688", "amount": -95.2, "currencyRate": 1}]}]}, {"modifiedDate": "2023-01-18T11:03:18Z", "sourceModifiedDate": "2022-06-20T13:51:36Z", "id": "9298", "customerRef": {"id": "9", "companyName": "Abe"}, "accountRef": {"id": "56", "name": "Undeposited Funds"}, "totalAmount": 95.2, "currency": "GBP", "currencyRate": 1, "date": "2018-10-05T00:00:00", "note": "Adeel Test", "lines": [{"amount": 95.2, "links": [{"type": "PaymentOnAccount", "id": "9", "amount": -95.2, "currencyRate": 1}]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 3723, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/payments"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/payments?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:50Z", "sourceModifiedDate": "2022-02-03T12:09:35Z", "id": "25", "customerRef": {"id": "55", "companyName": "Oxon Insurance - Holiday Party"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 10800, "currency": "GBP", "currencyRate": 1, "date": "2016-02-12T00:00:00", "note": "", "lines": [{"amount": 10800, "links": [{"type": "PaymentOnAccount", "id": "55", "amount": -10800, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:50Z", "sourceModifiedDate": "2016-09-12T16:50:17Z", "id": "31", "customerRef": {"id": "59", "companyName": "Ecker Holiday event"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 15615, "currency": "GBP", "currencyRate": 1, "date": "2016-02-12T00:00:00", "note": "", "lines": [{"amount": 15615, "links": [{"type": "Invoice", "id": "30", "amount": -15615, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 813, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/payments"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/payments?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:36:05Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "29684", "customerRef": {"id": "STE001", "companyName": "Stevenson & Smith"}, "totalAmount": 500, "currency": "GBP", "currencyRate": 1, "date": "2019-01-30T00:00:00Z", "note": "Payment on Account", "lines": [{"amount": 12.5, "links": [{"type": "Invoice", "id": "29676", "amount": -12.5, "currencyRate": 1}]}, {"amount": 487.5, "links": [{"type": "Invoice", "id": "29851", "amount": -487.5, "currencyRate": 1}]}], "reference": "5897532"}, {"modifiedDate": "2022-10-14T09:36:05Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "29681", "customerRef": {"id": "MAC001", "companyName": "Macolm Hall Associates"}, "totalAmount": 0, "currency": "GBP", "currencyRate": 1, "date": "2019-12-31T00:00:00Z", "note": "Opening Balance", "lines": [{"amount": 0, "links": [{"type": "Invoice", "id": "29745", "amount": 0.05, "currencyRate": 1}, {"type": "CreditNote", "id": "29681", "amount": -0.05, "currencyRate": 1}]}], "reference": "O/BAL"}], "pageNumber": 1, "pageSize": 2, "totalResults": 83, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/payments"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/payments?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:39Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "53", "customerRef": {"id": "STE001", "companyName": "Stevenson & Smith"}, "accountRef": {"id": "1200", "name": "Bank Current Account"}, "totalAmount": 500, "currency": "GBP", "currencyRate": 1, "date": "2021-01-30T00:00:00", "note": "Sales receipt on account 53 linked to sales invoice tx-3, sales invoice inv-31.", "lines": [{"amount": 12.5, "links": [{"type": "Invoice", "id": "TX-3", "amount": -12.5, "currencyRate": 1}]}, {"amount": 245.34, "links": [{"type": "Invoice", "id": "INV-31", "amount": -245.34, "currencyRate": 1}]}, {"amount": 126.9, "links": [{"type": "Invoice", "id": "INV-31", "amount": -126.9, "currencyRate": 1}]}, {"amount": 115.26, "links": [{"type": "Invoice", "id": "INV-31", "amount": -115.26, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:39Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "8", "customerRef": {"id": "MAC001", "companyName": "Macolm Hall Associates"}, "accountRef": {"id": ""}, "totalAmount": 0, "currency": "GBP", "currencyRate": 1, "date": "2021-12-31T00:00:00", "note": "Sales credit tx-8 linked to sales invoice inv-10.", "lines": [{"amount": 0, "links": [{"type": "Invoice", "id": "INV-10", "amount": -0.05, "currencyRate": 1}, {"type": "CreditNote", "id": "TX-8", "amount": 0.05, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 53, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/payments"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/payments?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:55:39Z", "sourceModifiedDate": "2017-05-08T11:09:38Z", "id": "d39f7a5733de11e797950a57719b2edb", "customerRef": {"id": "f4ff85ba33dd11e797950a57719b2edb", "companyName": "Widgets Limited"}, "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "totalAmount": -1080, "currency": "GBP", "currencyRate": 1, "date": "2017-05-08T00:00:00", "note": "Customer refund using credit/debit card", "lines": [{"amount": -1080, "links": [{"type": "CreditNote", "id": "c1a0176c33de11e797950a57719b2edb", "amount": 1080, "currencyRate": 1}]}]}, {"modifiedDate": "2022-10-24T14:55:39Z", "sourceModifiedDate": "2019-01-17T14:14:55Z", "id": "03a5fdc8baa643fb97587033b0c4590b", "customerRef": {"id": "3cc3148bbd8111e8bad90617b3da4b8a", "companyName": "John's Test Customer"}, "accountRef": {"id": "2572c8766afc11e8aaa5027d54329956", "name": "Tide Current"}, "totalAmount": 100, "currency": "GBP", "currencyRate": 1, "date": "2017-11-23T00:00:00", "note": "Customer receipt using credit/debit card", "lines": [{"amount": 100, "links": [{"type": "Invoice", "id": "ede1e735bd8111e8bad90617b3da4b8a", "amount": -100, "currencyRate": 1}]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 2321, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/payments"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/payments?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:32:02Z", "sourceModifiedDate": "2021-04-22T11:01:11Z", "id": "2918", "customerRef": {"id": "12", "companyName": "MK Manufacturing"}, "accountRef": {"id": "353", "name": "Current Account"}, "paymentMethodRef": {"id": "1", "name": "Printed Check"}, "totalAmount": 120, "currency": "GBP", "date": "2021-04-22T00:00:00", "note": "", "lines": [{"amount": 120, "links": [{"type": "Invoice", "id": "2916", "amount": -120, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:32:02Z", "sourceModifiedDate": "2022-04-19T13:38:45Z", "id": "6105", "customerRef": {"id": "531", "companyName": "Shoprite"}, "accountRef": {"id": "353", "name": "Current Account"}, "paymentMethodRef": {"id": "6", "name": "Cash"}, "totalAmount": 150, "currency": "GBP", "date": "2022-04-19T00:00:00", "note": "", "lines": [{"amount": 150, "links": [{"type": "PaymentOnAccount", "id": "531", "amount": -150, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/payments"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/payments?page=1&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:37:08Z", "sourceModifiedDate": "2021-01-02T22:50:58", "id": "65b746c8-9a5d-4a95-8096-d2316fcff592", "customerRef": {"id": "afd4093b-c655-4847-8ee2-10a4f2c3eae3", "companyName": "Maddox Publishing Group"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 4200, "currency": "GBP", "currencyRate": 1, "date": "2022-02-17T00:00:00", "lines": [{"amount": 4200, "links": [{"type": "Invoice", "id": "321bfed3-2da2-4969-9358-4de97821181b", "amount": -4200, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:37:08Z", "sourceModifiedDate": "2021-01-02T22:51:43", "id": "8c481b70-b5d7-4de4-a7f7-9e161be2c472", "customerRef": {"id": "a871a956-05b5-4e2a-9419-7aeb478ca647", "companyName": "Ridgeway University"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 500, "currency": "GBP", "currencyRate": 1, "date": "2022-02-17T00:00:00", "lines": [{"amount": 500, "links": [{"type": "Invoice", "id": "4b6d0c8f-10fa-42cd-a6e5-53b175e90005", "amount": -500, "currencyRate": 1}]}], "reference": "", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 30, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/payments"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/payments?page=2&pageSize=2"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:41:17Z", "id": "104957000000070175", "customerRef": {"id": "104957000000037097", "companyName": "Test Company"}, "accountRef": {"id": "104957000000060010", "name": "Abdi Test"}, "totalAmount": 9001, "currency": "GBP", "currencyRate": 1, "date": "2020-02-06T00:00:00", "note": "Cheque deposit", "lines": [{"amount": 9001, "links": [{"type": "Invoice", "id": "104957000000038052", "amount": -9001, "currencyRate": 1}]}], "reference": "4"}, {"modifiedDate": "2022-10-03T08:41:17Z", "id": "104957000000067014", "customerRef": {"id": "104957000000037097", "companyName": "Test Company"}, "accountRef": {"id": "104957000000060010", "name": "Abdi Test"}, "totalAmount": 9001, "currency": "GBP", "currencyRate": 1, "date": "2020-02-14T00:00:00", "note": "", "lines": [{"amount": 9001, "links": [{"type": "Invoice", "id": "104957000000038106", "amount": -9001, "currencyRate": 1}]}], "reference": "1"}], "pageNumber": 1, "pageSize": 2, "totalResults": 33, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/payments"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/payments?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/payments?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-payment: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-04-25T13:04:02", "id": "7ba4fc1b-e248-49ba-8bf8-0813d7f203a8", "customerRef": {"id": "a82042f1-a005-4ca5-bfd3-5bc237123aa5", "companyName": "Keara Leffler"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "totalAmount": 3669.52, "currency": "GBP", "currencyRate": 1, "date": "2022-04-25T13:04:02", "note": "Payment against invoice ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "lines": [{"amount": 3669.52, "links": [{"type": "Invoice", "id": "ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "amount": -3669.52, "currencyRate": 1}], "allocatedOnDate": "2022-04-25T13:04:02"}], "reference": "ac3ac4dd-defe-4f9c-b7bb-2c3fe726a9d1", "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:27Z", "sourceModifiedDate": "0001-01-01T00:00:00Z", "id": "e0299ced-89d1-ea11-bbaa-000d3a2b9185", "customerRef": {"id": "b61217b3-89d1-ea11-bbaa-000d3a2b9185", "companyName": "Trey Researches"}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 128.16, "currency": "GBP", "currencyRate": 1, "date": "2019-01-15T00:00:00", "note": "Invoice 102001", "lines": [{"amount": 128.16, "links": [{"type": "Invoice", "id": "18c906bf-89d1-ea11-bbaa-000d3a2b9185", "amount": -128.16, "currencyRate": 1}], "allocatedOnDate": "2019-01-15T00:00:00"}], "reference": "Document No: 103001", "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:36:13Z", "sourceModifiedDate": "2019-11-26T12:31:46Z", "id": "090f5d9f-d1ce-4a61-985f-d3915618b64a_c3bf08a3-4d51-4859-acbb-5075f9484f87", "customerRef": {"id": "c3bf08a3-4d51-4859-acbb-5075f9484f87", "companyName": "Mr Abe"}, "accountRef": {"id": "35717508-0696-4481-a32c-2835f0ed8b4e", "name": "Test GL account 2"}, "totalAmount": 229.08, "currency": "EUR", "currencyRate": 1, "date": "2019-11-26T00:00:00Z", "lines": [{"amount": 229.08, "links": [{"type": "Invoice", "id": "f010d4df-13ea-45d1-8525-785164df7dd9", "amount": -229.08, "currencyRate": 1}]}], "reference": "19230011"} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:35:14Z", "sourceModifiedDate": "2020-01-02T10:08:27Z", "id": "14b7d656-07ee-4d70-aafa-61c0030c08ad_7e566728-a7f3-4860-a7f5-381664673287", "customerRef": {"id": "7e566728-a7f3-4860-a7f5-381664673287", "companyName": "Customer A"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 1, "currency": "GBP", "currencyRate": 1, "date": "2020-01-02T00:00:00Z", "lines": [{"amount": 1, "links": [{"type": "Invoice", "id": "6220ed43-1fec-4e17-a88f-c7ee5b949e76", "amount": -1, "currencyRate": 1}]}], "reference": "20200002"} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:21:37Z", "id": "135234099", "customerRef": {"id": "6162049", "companyName": "Wintershall Holding GmbH"}, "totalAmount": 100, "currency": "GBP", "date": "2017-11-23T00:00:00", "note": "CODAT LTD ref: NOV TOPUP OTHER �100.00 - Invoice receipt against 015", "lines": [{"amount": 100, "links": [{"type": "Invoice", "id": "21973931", "amount": -100, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2018-09-11T06:58:46", "id": "765831", "customerRef": {"id": "113070"}, "totalAmount": 1, "currency": "GBP", "date": "2018-09-11T00:00:00", "note": "Overpayment: invoice #0000003, some test", "lines": [{"amount": 1, "links": [{"type": "PaymentOnAccount", "id": "113070", "amount": -1, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:15Z", "id": "139214921", "customerRef": {"id": "85743294", "companyName": "Parent customer"}, "totalAmount": 1.2, "currency": "GBP", "date": "2010-04-07T00:00:00", "note": "", "lines": [{"amount": 1.2, "links": [{"type": "Invoice", "id": "137055108", "amount": -1.2, "currencyRate": 1}]}]} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-20T08:18:33Z", "sourceModifiedDate": "2022-02-25T10:58:37", "id": "8828", "customerRef": {"id": "417", "companyName": "10 Breww Ltd"}, "totalAmount": 0, "currency": "GBP", "currencyRate": 1, "date": "2021-04-09T00:00:00", "lines": [{"amount": 0, "links": [{"type": "Invoice", "id": "8530", "amount": -16, "currencyRate": 1}, {"type": "CreditNote", "id": "8828", "amount": 16, "currencyRate": 1}]}], "reference": "Credit Memo #CM28"} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:08:36Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "6915-1197775450", "customerRef": {"id": "220000-933272658", "companyName": "Melton, Johnny"}, "accountRef": {"id": "80000-933270541", "name": "Undeposited Funds"}, "totalAmount": 14488.64, "currency": "GBP", "currencyRate": 1, "date": "2023-01-10T00:00:00", "note": "Check - 80000-933270541", "lines": [{"amount": 14488.64, "links": [{"type": "Invoice", "id": "469E-1071530054", "amount": -14488.64, "currencyRate": 1}]}], "reference": "19650", "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:03:14Z", "sourceModifiedDate": "2020-08-14T09:59:29Z", "id": "710", "customerRef": {"id": "9", "companyName": "Abe"}, "accountRef": {"id": "56", "name": "Undeposited Funds"}, "totalAmount": 95.2, "currency": "GBP", "currencyRate": 1, "date": "2018-10-05T00:00:00", "note": "Sarah's Test", "lines": [{"amount": 95.2, "links": [{"type": "Invoice", "id": "688", "amount": -95.2, "currencyRate": 1}]}]} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:36:50Z", "sourceModifiedDate": "2022-02-03T12:09:35Z", "id": "25", "customerRef": {"id": "55", "companyName": "Oxon Insurance - Holiday Party"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 10800, "currency": "GBP", "currencyRate": 1, "date": "2016-02-12T00:00:00", "note": "", "lines": [{"amount": 10800, "links": [{"type": "PaymentOnAccount", "id": "55", "amount": -10800, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:36:05Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "29684", "customerRef": {"id": "STE001", "companyName": "Stevenson & Smith"}, "totalAmount": 500, "currency": "GBP", "currencyRate": 1, "date": "2019-01-30T00:00:00Z", "note": "Payment on Account", "lines": [{"amount": 12.5, "links": [{"type": "Invoice", "id": "29676", "amount": -12.5, "currencyRate": 1}]}, {"amount": 487.5, "links": [{"type": "Invoice", "id": "29851", "amount": -487.5, "currencyRate": 1}]}], "reference": "5897532"} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:39Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "53", "customerRef": {"id": "STE001", "companyName": "Stevenson & Smith"}, "accountRef": {"id": "1200", "name": "Bank Current Account"}, "totalAmount": 500, "currency": "GBP", "currencyRate": 1, "date": "2021-01-30T00:00:00", "note": "Sales receipt on account 53 linked to sales invoice tx-3, sales invoice inv-31.", "lines": [{"amount": 12.5, "links": [{"type": "Invoice", "id": "TX-3", "amount": -12.5, "currencyRate": 1}]}, {"amount": 245.34, "links": [{"type": "Invoice", "id": "INV-31", "amount": -245.34, "currencyRate": 1}]}, {"amount": 126.9, "links": [{"type": "Invoice", "id": "INV-31", "amount": -126.9, "currencyRate": 1}]}, {"amount": 115.26, "links": [{"type": "Invoice", "id": "INV-31", "amount": -115.26, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:55:39Z", "sourceModifiedDate": "2017-05-08T11:09:38Z", "id": "d39f7a5733de11e797950a57719b2edb", "customerRef": {"id": "f4ff85ba33dd11e797950a57719b2edb", "companyName": "Widgets Limited"}, "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "totalAmount": -1080, "currency": "GBP", "currencyRate": 1, "date": "2017-05-08T00:00:00", "note": "Customer refund using credit/debit card", "lines": [{"amount": -1080, "links": [{"type": "CreditNote", "id": "c1a0176c33de11e797950a57719b2edb", "amount": 1080, "currencyRate": 1}]}]} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:32:02Z", "sourceModifiedDate": "2021-04-22T11:01:11Z", "id": "2918", "customerRef": {"id": "12", "companyName": "MK Manufacturing"}, "accountRef": {"id": "353", "name": "Current Account"}, "paymentMethodRef": {"id": "1", "name": "Printed Check"}, "totalAmount": 120, "currency": "GBP", "date": "2021-04-22T00:00:00", "note": "", "lines": [{"amount": 120, "links": [{"type": "Invoice", "id": "2916", "amount": -120, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:37:08Z", "sourceModifiedDate": "2021-01-02T22:50:58", "id": "65b746c8-9a5d-4a95-8096-d2316fcff592", "customerRef": {"id": "afd4093b-c655-4847-8ee2-10a4f2c3eae3", "companyName": "Maddox Publishing Group"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 4200, "currency": "GBP", "currencyRate": 1, "date": "2022-02-17T00:00:00", "lines": [{"amount": 4200, "links": [{"type": "Invoice", "id": "321bfed3-2da2-4969-9358-4de97821181b", "amount": -4200, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-03T08:41:17Z", "id": "104957000000070175", "customerRef": {"id": "104957000000037097", "companyName": "Test Company"}, "accountRef": {"id": "104957000000060010", "name": "Abdi Test"}, "totalAmount": 9001, "currency": "GBP", "currencyRate": 1, "date": "2020-02-06T00:00:00", "note": "Cheque deposit", "lines": [{"amount": 9001, "links": [{"type": "Invoice", "id": "104957000000038052", "amount": -9001, "currencyRate": 1}]}], "reference": "4"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - is-aged-debtors-report-available: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-is-aged-debtors-report-available: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: true - "401": - application/json: {} - "500": - application/json: {} - get-accounting-aged-debtors-report: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:21.4959955Z", "reportDate": "2023-05-02T16:05:21.4459444Z", "data": [{"customerId": "c8180244-74ac-40cf-a5df-6d83661c44d7", "customerName": "Arjun Kuvalis", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -3367.71, "details": [{"name": "CreditNotes", "amount": -3367.71}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "6d162ee4-47b4-46c6-a2e6-aa9edd0fe6b0", "customerName": "Breitenberg, Emard and Schiller", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -4299.26, "details": [{"name": "Invoices", "amount": 0}, {"name": "CreditNotes", "amount": -4299.26}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "981d56a7-cf63-4ed2-b8db-2eba2c0aeb5a", "customerName": "Collins - Anderson", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -14959.84, "details": [{"name": "CreditNotes", "amount": -14959.84}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 773.94, "details": [{"name": "Invoices", "amount": 773.94}]}]}]}, {"customerId": "d3739e0f-5a70-465b-9dfe-deb8efac0cd3", "customerName": "Damien Schneider", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2817.59, "details": [{"name": "CreditNotes", "amount": -2817.59}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "10652b76-2a9a-43ba-a892-fb4f369fe1ef", "customerName": "Franco Labadie", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1541.52, "details": [{"name": "CreditNotes", "amount": -1541.52}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "03b7f9fd-40e0-4c71-9f93-58e867233bcb", "customerName": "Harvey Predovic", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -14312.59, "details": [{"name": "CreditNotes", "amount": -14312.59}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 158.76, "details": [{"name": "Invoices", "amount": 158.76}]}]}]}, {"customerId": "bbea9634-7a60-4c3f-97cd-70e481ec2cce", "customerName": "Jenkins Inc", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -32818.36, "details": [{"name": "CreditNotes", "amount": -32818.36}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 431.71, "details": [{"name": "Invoices", "amount": 431.71}]}]}]}, {"customerId": "d65ac505-072c-49ec-be3c-3cb74228966d", "customerName": "Jensen Steuber", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -9766.18, "details": [{"name": "Invoices", "amount": 0}, {"name": "CreditNotes", "amount": -9766.18}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1273.16, "details": [{"name": "Invoices", "amount": 1273.16}]}]}]}, {"customerId": "a82042f1-a005-4ca5-bfd3-5bc237123aa5", "customerName": "Keara Leffler", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2595.66, "details": [{"name": "CreditNotes", "amount": -2595.66}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1397.98, "details": [{"name": "Invoices", "amount": 1397.98}]}]}]}, {"customerId": "f67eab14-12f1-432f-af73-81ebf6ec8ddc", "customerName": "Neoma Kreiger", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -3047.62, "details": [{"name": "CreditNotes", "amount": -3047.62}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "2d6a5c2d-80dc-4aac-8909-ddfb3cb24437", "customerName": "Newton Zieme", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -225.44, "details": [{"name": "CreditNotes", "amount": -225.44}, {"name": "Invoices", "amount": 0}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "976a2402-0908-46d9-9121-a93005d29c01", "customerName": "Norbert Tillman", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -537.61, "details": [{"name": "CreditNotes", "amount": -537.61}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "453ddfc0-49ce-4f66-a815-dae734be885c", "customerName": "Ralph Wilderman", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2538.49, "details": [{"name": "CreditNotes", "amount": -2538.49}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "51f03576-f6b0-40d5-9fba-81a490411c03", "customerName": "Raul Johns", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -4403.5, "details": [{"name": "CreditNotes", "amount": -4403.5}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3477.81, "details": [{"name": "Invoices", "amount": 3477.81}]}]}]}, {"customerId": "84539fde-118f-48ed-978d-0aa50c7ec223", "customerName": "Rodger Feest", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1456.66, "details": [{"name": "CreditNotes", "amount": -1456.66}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7366.21, "details": [{"name": "Invoices", "amount": 7366.21}]}]}]}, {"customerId": "dc75136b-b504-49c5-be35-04e1d2771e1e", "customerName": "Vincenzo Wolff", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -80.97, "details": [{"name": "CreditNotes", "amount": -80.97}, {"name": "Invoices", "amount": 0}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}]} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.8918448Z", "reportDate": "2023-05-02T16:05:20.8411594Z", "data": [{"customerId": "8ddfa6bf-0c60-eb11-89fa-00224800af18", "customerName": "Abdi Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -80, "details": [{"name": "CreditNotes", "amount": -80}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -257.28, "details": [{"name": "Payments", "amount": -300}, {"name": "Invoices", "amount": 42.72}]}]}]}, {"customerId": "b41217b3-89d1-ea11-bbaa-000d3a2b9185", "customerName": "Adatum Corporation", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1558.56, "details": [{"name": "CreditNotes", "amount": -1558.56}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 33200.76, "details": [{"name": "Invoices", "amount": 34782.32}, {"name": "Payments", "amount": -1581.56}]}]}, {"currency": "HKD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 8554.46, "details": [{"name": "Invoices", "amount": 8554.46}]}]}]}, {"customerId": "ba1217b3-89d1-ea11-bbaa-000d3a2b9185", "customerName": "Alpine Ski House", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7503.08, "details": [{"name": "Invoices", "amount": 7503.08}]}]}]}, {"customerId": "f5860a8e-4b5a-eb11-89fa-00224800af18", "customerName": "CustomerQA", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 349.68, "details": [{"name": "Invoices", "amount": 349.68}]}]}]}, {"customerId": "feef29a2-1d59-ed11-8c36-002248c5e6c0", "customerName": "DP Test Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 332.2, "details": [{"name": "Invoices", "amount": 427.2}, {"name": "Payments", "amount": -95}]}]}]}, {"customerId": "264d74d4-3218-ed11-90eb-000d3a873415", "customerName": "Eliana", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -779.28, "details": [{"name": "CreditNotes", "amount": -779.28}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1905, "details": [{"name": "Invoices", "amount": 1905}]}]}]}, {"customerId": "99faf6fb-5209-eb11-bbf6-0022481ad2e8", "customerName": "QA Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4923.48, "details": [{"name": "Invoices", "amount": 4923.48}]}]}]}, {"customerId": "bc1217b3-89d1-ea11-bbaa-000d3a2b9185", "customerName": "Relecloud", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10559.04, "details": [{"name": "Invoices", "amount": 10559.04}]}]}]}, {"customerId": "b81217b3-89d1-ea11-bbaa-000d3a2b9185", "customerName": "School of Fine Art", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 33438.88, "details": [{"name": "Invoices", "amount": 34811.2}, {"name": "Payments", "amount": -1372.32}]}]}]}, {"customerId": "dc3f4f1b-3c54-ed11-9470-002248c5e18c", "customerName": "Test no payment terms", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10, "details": [{"name": "Invoices", "amount": 10}]}]}]}, {"customerId": "9e55a119-064e-ed11-946f-0022481b84d7", "customerName": "Test Push", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 126, "details": [{"name": "Invoices", "amount": 126}]}]}]}, {"customerId": "b30ca600-074e-ed11-946f-0022481b84d7", "customerName": "Test Push", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 116, "details": [{"name": "Invoices", "amount": 116}]}]}]}, {"customerId": "b61217b3-89d1-ea11-bbaa-000d3a2b9185", "customerName": "Trey Researches", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -24, "details": [{"name": "CreditNotes", "amount": -24}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2663.38, "details": [{"name": "Payments", "amount": 10}, {"name": "Invoices", "amount": 2653.38}]}]}]}, {"customerId": "d93ceb37-b805-ec11-86bc-0022481a45c2", "customerName": "Vegan Bakeshop", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -18.67, "details": [{"name": "Payments", "amount": -18.67}]}]}]}]} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.6173310Z", "reportDate": "2023-05-02T16:05:20.5039554Z", "data": [{"agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -1, "details": [{"name": "Payments", "amount": -1}]}]}]}, {"agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -5, "details": [{"name": "Payments", "amount": -5}]}]}]}, {"agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -500, "details": [{"name": "Payments", "amount": -500}, {"name": "Invoices", "amount": 0}]}]}]}, {"agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -100, "details": [{"name": "Payments", "amount": -100}]}]}]}, {"agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -49, "details": [{"name": "Payments", "amount": -49}]}]}]}, {"agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -10, "details": [{"name": "Payments", "amount": -10}]}]}]}, {"agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 100, "details": [{"name": "Invoices", "amount": 100}]}]}]}, {"customerId": "602174", "customerName": "ab1", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 222.71, "details": [{"name": "Invoices", "amount": 222.71}]}]}, {"currency": "AED", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -5, "details": [{"name": "Payments", "amount": -5}]}]}]}, {"customerId": "511657", "customerName": "Bob's Stationary", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -2060.2, "details": [{"name": "Payments", "amount": -2083.83}, {"name": "Invoices", "amount": 23.63}]}]}]}, {"customerId": "581145", "customerName": "CanadaCo", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -132.15, "details": [{"name": "Payments", "amount": -160.9}, {"name": "Invoices", "amount": 28.75}]}]}, {"currency": "CNY", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2.88, "details": [{"name": "Invoices", "amount": 2.88}]}]}]}, {"customerId": "578409", "customerName": "company1", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -1031.45, "details": [{"name": "Invoices", "amount": 144}, {"name": "Payments", "amount": -1175.45}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -100.29, "details": [{"name": "Invoices", "amount": 0}, {"name": "Payments", "amount": -100.29}]}]}]}, {"customerId": "669531", "customerName": "P", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 24.98, "details": [{"name": "Invoices", "amount": 24.98}]}]}]}, {"customerId": "515655", "customerName": "Parent company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -2898.25, "details": [{"name": "Payments", "amount": -2898.25}, {"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "511669", "customerName": "Pens International", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 516.3, "details": [{"name": "Payments", "amount": 0}, {"name": "Invoices", "amount": 516.3}]}]}]}, {"customerId": "582461", "customerName": "QA Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -76, "details": [{"name": "Invoices", "amount": 20}, {"name": "Payments", "amount": -96}]}]}, {"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -1.15, "details": [{"name": "Payments", "amount": -1.15}]}]}]}, {"customerId": "511661", "customerName": "Sarah's Office Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -10, "details": [{"name": "Invoices", "amount": 0}, {"name": "Payments", "amount": -10}]}]}]}, {"customerId": "572047", "customerName": "SRS Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 141.25, "details": [{"name": "Invoices", "amount": 141.25}]}]}]}, {"customerId": "536295", "customerName": "Test company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -144.46, "details": [{"name": "Invoices", "amount": 7.64}, {"name": "Payments", "amount": -152.1}]}]}]}, {"customerId": "512927", "customerName": "Wood Turnerss", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 48442.07, "details": [{"name": "Invoices", "amount": 51089.28}, {"name": "Payments", "amount": -2647.21}]}]}, {"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -10, "details": [{"name": "Invoices", "amount": 0}, {"name": "Payments", "amount": -10}]}]}, {"currency": "CAD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 192.28, "details": [{"name": "Invoices", "amount": 1186.28}, {"name": "Payments", "amount": -994}]}]}]}]} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.3727270Z", "reportDate": "2023-05-02T16:05:20.3123550Z", "data": [{"customerId": "88459410", "customerName": "Diogo Sousa", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 482.57, "details": [{"name": "Invoices", "amount": 482.57}]}]}]}, {"customerId": "86810130", "customerName": "Maria Gomez", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -216, "details": [{"name": "Invoices", "amount": -216}]}]}]}, {"customerId": "86832299", "customerName": "Mr French Person", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5, "details": [{"name": "Invoices", "amount": 5}]}]}, {"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5, "details": [{"name": "Invoices", "amount": 5}]}]}]}, {"customerId": "69946501", "customerName": "Peter Lord", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3, "details": [{"name": "Invoices", "amount": 3}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -46, "details": [{"name": "CreditNotes", "amount": -46}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 55661.49, "details": [{"name": "Invoices", "amount": 55911.49}, {"name": "Payments", "amount": -250}]}]}]}, {"customerId": "88353693", "customerName": "Test Customer updated", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4771.03, "details": [{"name": "Invoices", "amount": 4771.03}]}]}]}, {"customerId": "69952389", "customerName": "Things Limited", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -42.42, "details": [{"name": "CreditNotes", "amount": -42.42}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 6385, "details": [{"name": "Invoices", "amount": 6385}]}]}]}]} - MYOB AccountRight and Essentials: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:21.0942911Z", "reportDate": "2023-05-02T16:05:20.8602315Z", "data": []} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.0339587Z", "reportDate": "2023-05-02T16:05:19.8669114Z", "data": []} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:19.9204890Z", "reportDate": "2023-05-02T16:05:19.8723073Z", "data": [{"customerId": "1F0000-933272658", "customerName": "Jacobsen, Doug", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 7991.52, "details": [{"name": "Invoices", "amount": 7991.52}, {"name": "Payments", "amount": 0}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"customerId": "6F0000-1071510646", "customerName": "Morgenthaler, Jenny", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -271.53, "details": [{"name": "Payments", "amount": -271.53}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}]} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:21.0640297Z", "reportDate": "2023-05-02T16:05:20.9965545Z", "data": [{"customerId": "67", "customerName": "Abercrombie International Group", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -837.11, "details": [{"name": "CreditNotes", "amount": -837.11}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 55512.84, "details": [{"name": "Invoices", "amount": 55578.69}, {"name": "Payments", "amount": -65.85}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10, "details": [{"name": "Payments", "amount": 10}]}]}]}, {"customerId": "4", "customerName": "Cathy's Consulting Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -905.8, "details": [{"name": "Invoices", "amount": 314.2}, {"name": "Payments", "amount": -1220}]}]}]}, {"customerId": "20", "customerName": "Chadha's Consultants", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -75, "details": [{"name": "Payments", "amount": -75}]}]}]}, {"customerId": "7", "customerName": "Clement's Cleaners", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 24, "details": [{"name": "Invoices", "amount": 24}]}]}]}, {"customerId": "301", "customerName": "Codat Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -650.27, "details": [{"name": "Invoices", "amount": 15}, {"name": "CreditNotes", "amount": -469.52}, {"name": "Payments", "amount": -195.75}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 266.49, "details": [{"name": "Invoices", "amount": 210.01}, {"name": "Payments", "amount": 56.48}]}]}]}, {"customerId": "305", "customerName": "Codat Customer (USD)", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Payments", "amount": 0}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 121.5, "details": [{"name": "Invoices", "amount": 0}, {"name": "Payments", "amount": 121.5}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10, "details": [{"name": "Payments", "amount": 10}]}]}]}, {"customerId": "136", "customerName": "Customer Name", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 13.37, "details": [{"name": "Payments", "amount": 13.37}]}]}]}, {"customerId": "218", "customerName": "Diego Trantow", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 11.65, "details": [{"name": "Payments", "amount": 11.65}]}]}]}, {"customerId": "8", "customerName": "Ecker Designs", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2273, "details": [{"name": "Invoices", "amount": 2273}]}]}]}, {"customerId": "59", "customerName": "Ecker Holiday event", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3206779, "details": [{"name": "Invoices", "amount": 3206779}]}]}]}, {"customerId": "13", "customerName": "Himateja Madala", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -100, "details": [{"name": "Invoices", "amount": 0}, {"name": "Payments", "amount": -100}]}]}]}, {"customerId": "11", "customerName": "Ho Engineering Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10, "details": [{"name": "Invoices", "amount": 10}]}]}]}, {"customerId": "114", "customerName": "huw default not included", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 116.4, "details": [{"name": "Invoices", "amount": 116.4}]}]}]}, {"customerId": "117", "customerName": "Huw's Test Push customer2", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -521.4, "details": [{"name": "CreditNotes", "amount": -521.4}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1120.6, "details": [{"name": "Invoices", "amount": 1232.2}, {"name": "Payments", "amount": -111.6}]}]}]}, {"customerId": "306", "customerName": "J Codat", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 32.1, "details": [{"name": "Invoices", "amount": 176.1}, {"name": "Payments", "amount": -144}]}]}]}, {"customerId": "15", "customerName": "Jen Zaccarella", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4800, "details": [{"name": "Invoices", "amount": 4800}]}]}]}, {"customerId": "307", "customerName": "Jo Codat 2", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 112.6, "details": [{"name": "Invoices", "amount": 143.96}, {"name": "Payments", "amount": 58.14}, {"name": "CreditNotes", "amount": -89.5}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"customerId": "119", "customerName": "John Smith 1", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 160, "details": [{"name": "Invoices", "amount": 160}]}]}]}, {"customerId": "16", "customerName": "Jordan Burgess", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1098, "details": [{"name": "CreditNotes", "amount": -1098}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -60, "details": [{"name": "Invoices", "amount": 0}, {"name": "Payments", "amount": -60}]}]}]}, {"customerId": "83", "customerName": "Kay's Bake Shop", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 8508.37, "details": [{"name": "Invoices", "amount": 8717.33}, {"name": "Payments", "amount": -208.96}]}]}]}, {"customerId": "1", "customerName": "Ko International Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -3586.2, "details": [{"name": "CreditNotes", "amount": -3586.2}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 11291.4, "details": [{"name": "Invoices", "amount": 11474.05}, {"name": "Payments", "amount": -182.65}]}]}]}, {"customerId": "91", "customerName": "Mr Huw Test", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2311.27, "details": [{"name": "CreditNotes", "amount": -2311.27}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2292.91, "details": [{"name": "Invoices", "amount": 2290.91}, {"name": "Payments", "amount": 2}]}]}]}, {"customerId": "55", "customerName": "Oxon Insurance - Holiday Party", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -10800, "details": [{"name": "Payments", "amount": -10800}]}]}]}, {"customerId": "70", "customerName": "Project X", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 50, "details": [{"name": "Invoices", "amount": 50}]}]}]}, {"customerId": "281", "customerName": "Renee O'Connell", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 12.75, "details": [{"name": "Payments", "amount": 12.75}]}]}]}, {"customerId": "118", "customerName": "RSP", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 100, "details": [{"name": "Payments", "amount": 100}]}]}]}, {"customerId": "76", "customerName": "TestPushCustomer5", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1320, "details": [{"name": "Invoices", "amount": 1320}]}]}]}, {"customerId": "77", "customerName": "TestPushCustomer6", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1848, "details": [{"name": "Invoices", "amount": 1848}]}]}]}, {"customerId": "79", "customerName": "TestPushCustomer7", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -25, "details": [{"name": "Payments", "amount": -25}]}]}]}, {"customerId": "84", "customerName": "Vegan Cake Shop", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -86.4, "details": [{"name": "CreditNotes", "amount": -116.4}, {"name": "Payments", "amount": 30}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -206460.15, "details": [{"name": "Invoices", "amount": 5145.29}, {"name": "Payments", "amount": -211605.44}]}]}]}, {"customerId": "60", "customerName": "Whitehead - Employee celebration", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1100, "details": [{"name": "CreditNotes", "amount": -1100}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"customerId": "5", "customerName": "Whitehead and Sons", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 754.4, "details": [{"name": "Invoices", "amount": 754.4}]}]}]}, {"customerId": "3", "customerName": "Yeung's Architects", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -600, "details": [{"name": "CreditNotes", "amount": -600}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 20035.25, "details": [{"name": "Invoices", "amount": 20604.49}, {"name": "Payments", "amount": -569.24}]}]}]}]} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.5553019Z", "reportDate": "2023-05-02T16:05:20.4958267Z", "data": [{"customerId": "A1D001", "customerName": "A1 Design Services", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -378, "details": [{"name": "CreditNotes", "amount": -378}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4504.07, "details": [{"name": "Invoices", "amount": 4505.07}, {"name": "Payments", "amount": -1}]}]}]}, {"customerId": "A1D002", "customerName": "A2 Design Services", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -66, "details": [{"name": "CreditNotes", "amount": -66}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 540, "details": [{"name": "Invoices", "amount": 540}]}]}]}, {"customerId": "A1D003", "customerName": "A2 Design Services", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -24.71, "details": [{"name": "CreditNotes", "amount": -24.71}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 16606.32, "details": [{"name": "Invoices", "amount": 16606.32}]}]}]}, {"customerId": "ABS001", "customerName": "ABS Garages Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -177.14, "details": [{"name": "CreditNotes", "amount": -177.14}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4345.3, "details": [{"name": "Invoices", "amount": 4845.3}, {"name": "Payments", "amount": -500}]}]}]}, {"customerId": "USA1", "customerName": "American Sales", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 100, "details": [{"name": "Invoices", "amount": 100}]}]}]}, {"customerId": "BBS001", "customerName": "Bobs Building Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -103.16, "details": [{"name": "CreditNotes", "amount": -103.16}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4284.77, "details": [{"name": "Invoices", "amount": 4309.77}, {"name": "Payments", "amount": -25}]}]}]}, {"customerId": "BRO001", "customerName": "Bronson Inc", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 786.48, "details": [{"name": "Invoices", "amount": 852}, {"name": "Payments", "amount": -65.52}]}]}]}, {"customerId": "BUS001", "customerName": "Business Exhibitions", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2274.62, "details": [{"name": "Invoices", "amount": 2374.62}, {"name": "Payments", "amount": -100}]}]}]}, {"customerId": "CASH001", "customerName": "Cash and Credit Card Sales", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 324.5, "details": [{"name": "Invoices", "amount": 324.5}]}]}]}, {"customerId": "COM001", "customerName": "Compton Packaging", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4571.04, "details": [{"name": "Invoices", "amount": 4571.04}]}]}]}, {"customerId": "CGS001", "customerName": "County Golf Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2028.03, "details": [{"name": "Invoices", "amount": 2028.03}]}]}]}, {"customerId": "STU001", "customerName": "Edward Stuart", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2341.25, "details": [{"name": "Invoices", "amount": 2341.25}]}]}]}, {"customerId": "FGL001", "customerName": "F G Landscape & Design", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 11260.26, "details": [{"name": "Invoices", "amount": 11260.26}]}]}]}, {"customerId": "BRI001", "customerName": "Fred Briant", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 536.67, "details": [{"name": "Invoices", "amount": 656.67}, {"name": "Payments", "amount": -120}]}]}]}, {"customerId": "GRA001", "customerName": "Graham Electonics", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4149.09, "details": [{"name": "Invoices", "amount": 4149.09}]}]}]}, {"customerId": "HAU001", "customerName": "Hausser GMBH", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2082.96, "details": [{"name": "Invoices", "amount": 2082.96}]}]}]}, {"customerId": "JSS001", "customerName": "John Smith Studios", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1228.34, "details": [{"name": "Invoices", "amount": 1228.34}]}]}]}, {"customerId": "KIN001", "customerName": "Kinghorn & French", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 9254.03, "details": [{"name": "Invoices", "amount": 9254.03}]}]}]}, {"customerId": "MAC001", "customerName": "Macolm Hall Associates", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 6927.26, "details": [{"name": "Invoices", "amount": 6927.26}]}]}]}, {"customerId": "1A2B3C", "customerName": "Maria Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 69.12, "details": [{"name": "Invoices", "amount": 69.12}]}]}]}, {"customerId": "MIB001", "customerName": "Mikes Insurance Services", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3597.16, "details": [{"name": "Invoices", "amount": 3597.16}]}]}]}, {"customerId": "MIL001", "customerName": "Mile Road Health Centre", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5644.12, "details": [{"name": "Invoices", "amount": 6644.12}, {"name": "Payments", "amount": -1000}]}]}]}, {"customerId": "MOR001", "customerName": "Morley Solicitors", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 392.67, "details": [{"name": "Invoices", "amount": 1767.67}, {"name": "Payments", "amount": -1375}]}]}]}, {"customerId": "PAT001", "customerName": "Patterson & Graham Garages", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 915.24, "details": [{"name": "Invoices", "amount": 915.24}]}]}]}, {"customerId": "YOU001", "customerName": "Peter Young", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -168, "details": [{"name": "CreditNotes", "amount": -168}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2106.84, "details": [{"name": "Invoices", "amount": 2106.84}]}]}]}, {"customerId": "PIC001", "customerName": "Picture Frame Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 546.12, "details": [{"name": "Invoices", "amount": 1413.9}, {"name": "Payments", "amount": -867.78}]}]}]}, {"customerId": "RSP001", "customerName": "Richard Sanderson-Pope", "agedCurrencyOutstanding": [{"currency": "JPY", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -29210, "details": [{"name": "CreditNotes", "amount": -29210}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 623907.28, "details": [{"name": "Invoices", "amount": 624053.94}, {"name": "Payments", "amount": -146.66}]}]}]}, {"customerId": "ROB001", "customerName": "Robertson Joinery", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4550.2, "details": [{"name": "Invoices", "amount": 4550.2}]}]}]}, {"customerId": "SDE001", "customerName": "S D Enterprises", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 15339.68, "details": [{"name": "Invoices", "amount": 15339.68}]}]}]}, {"customerId": "STE001", "customerName": "Stevenson & Smith", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1562.75, "details": [{"name": "Invoices", "amount": 1562.75}]}]}]}, {"customerId": "SWA001", "customerName": "Swan Leisure Centre", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -16.68, "details": [{"name": "CreditNotes", "amount": -16.68}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1615.51, "details": [{"name": "Invoices", "amount": 1615.51}]}]}]}, {"customerId": "0001", "customerName": "Test Customer01", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -366.71, "details": [{"name": "CreditNotes", "amount": -366.71}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 900.22, "details": [{"name": "Invoices", "amount": 913.38}, {"name": "Payments", "amount": -13.16}]}]}]}, {"customerId": "TESTSUPP", "customerName": "Test supplier for testing purposes 1234567891234567891234567", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 149.61, "details": [{"name": "Invoices", "amount": 149.61}]}]}]}, {"customerId": "SHO001", "customerName": "The Show Lodge", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7148.07, "details": [{"name": "Invoices", "amount": 7148.07}]}]}]}, {"customerId": "VID001", "customerName": "The Video Rental Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2041.66, "details": [{"name": "Invoices", "amount": 2041.66}]}]}]}]} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:19.8072734Z", "reportDate": "2023-05-02T16:05:19.7472225Z", "data": [{"customerId": "A1D001", "customerName": "A1 Design Services", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -5.37, "details": [{"name": "Invoices", "amount": -5.37}]}]}]}, {"customerId": "ABS001", "customerName": "ABS Garages Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2454.97, "details": [{"name": "Invoices", "amount": 2454.97}]}]}]}, {"customerId": "BBS001", "customerName": "Bobs Building Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4309.77, "details": [{"name": "Invoices", "amount": 4309.77}]}]}]}, {"customerId": "BUS001", "customerName": "Business Exhibitions", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2066.61, "details": [{"name": "Invoices", "amount": 2166.61}, {"name": "Payments", "amount": -100}]}]}]}, {"customerId": "CASH001", "customerName": "Cash and Credit Card Sales", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -0.01, "details": [{"name": "Invoices", "amount": -0.01}]}]}]}, {"customerId": "COM001", "customerName": "Compton Packaging", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2749.02, "details": [{"name": "Invoices", "amount": 2749.02}]}]}]}, {"customerId": "CGS001", "customerName": "County Golf Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2028.03, "details": [{"name": "Invoices", "amount": 2028.03}]}]}]}, {"customerId": "STU001", "customerName": "Edward Stuart", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2341.25, "details": [{"name": "Invoices", "amount": 2341.25}]}]}]}, {"customerId": "FGL001", "customerName": "F G Landscape & Design", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 11256.18, "details": [{"name": "Invoices", "amount": 11256.18}]}]}]}, {"customerId": "GRA001", "customerName": "Graham Electonics", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4149.08, "details": [{"name": "Invoices", "amount": 4149.08}]}]}]}, {"customerId": "HAU001", "customerName": "Hausser GMBH", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1965.96, "details": [{"name": "Invoices", "amount": 1965.96}]}]}]}, {"customerId": "JSS001", "customerName": "John Smith Studios", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 977.09, "details": [{"name": "Invoices", "amount": 977.09}]}]}]}, {"customerId": "KIN001", "customerName": "Kinghorn & French", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7398.33, "details": [{"name": "Invoices", "amount": 7398.33}]}]}]}, {"customerId": "MAC001", "customerName": "Macolm Hall Associates", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 6916.46, "details": [{"name": "Invoices", "amount": 6916.46}]}]}]}, {"customerId": "MIB001", "customerName": "Mikes Insurance Services", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3525.26, "details": [{"name": "Invoices", "amount": 3525.26}]}]}]}, {"customerId": "MIL001", "customerName": "Mile Road Health Centre", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2307.84, "details": [{"name": "Invoices", "amount": 3307.84}, {"name": "Payments", "amount": -1000}]}]}]}, {"customerId": "MOR001", "customerName": "Morley Solicitors", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 370.27, "details": [{"name": "Invoices", "amount": 1745.27}, {"name": "Payments", "amount": -1375}]}]}]}, {"customerId": "PAT001", "customerName": "Patterson & Graham Garages", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 915.24, "details": [{"name": "Invoices", "amount": 915.24}]}]}]}, {"customerId": "YOU001", "customerName": "Peter Young", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2115.77, "details": [{"name": "Invoices", "amount": 2115.77}]}]}]}, {"customerId": "PIC001", "customerName": "Picture Frame Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 268.93, "details": [{"name": "Invoices", "amount": 1136.71}, {"name": "Payments", "amount": -867.78}]}]}]}, {"customerId": "ROB001", "customerName": "Robertson Joinery", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4530.98, "details": [{"name": "Invoices", "amount": 4530.98}]}]}]}, {"customerId": "SDE001", "customerName": "S D Enterprises", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 15339.68, "details": [{"name": "Invoices", "amount": 15339.68}]}]}]}, {"customerId": "STE002", "customerName": "Steven Stephenson", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 8.35, "details": [{"name": "Invoices", "amount": 8.35}]}]}]}, {"customerId": "STE001", "customerName": "Stevenson & Smith", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1562.75, "details": [{"name": "Invoices", "amount": 1562.75}]}]}]}, {"customerId": "SWA001", "customerName": "Swan Leisure Centre", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -16.68, "details": [{"name": "CreditNotes", "amount": -16.68}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1615.51, "details": [{"name": "Invoices", "amount": 1615.51}]}]}]}, {"customerId": "SHO001", "customerName": "The Show Lodge", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7305.77, "details": [{"name": "Invoices", "amount": 7305.77}]}]}]}, {"customerId": "VID001", "customerName": "The Video Rental Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2041.64, "details": [{"name": "Invoices", "amount": 2041.64}]}]}]}]} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.9416221Z", "reportDate": "2023-05-02T16:05:20.7435694Z", "data": [{"customerId": "260f6a3f94a243738f2d5e08496a41a8", "customerName": "100 test name", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -60, "details": [{"name": "CreditNotes", "amount": -60}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1471, "details": [{"name": "Invoices", "amount": 1891}, {"name": "Payments", "amount": -420}]}]}]}, {"customerId": "860dd9f1ad9346ba85117aedfa19cc72", "customerName": "100 test name DS", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1065, "details": [{"name": "Invoices", "amount": 1080}, {"name": "Payments", "amount": -15}]}]}]}, {"customerId": "395d26ee8ab44f8b861b468caf63b00d", "customerName": "222 Abdul's Test Name", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -120, "details": [{"name": "CreditNotes", "amount": -120}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2443.8, "details": [{"name": "Invoices", "amount": 2759.8}, {"name": "Payments", "amount": -316}]}]}]}, {"customerId": "013cf04960924a0da800f019369c3262", "customerName": "333 Abdul's Test Name", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -0.66, "details": [{"name": "Invoices", "amount": 9.34}, {"name": "Payments", "amount": -10}]}]}]}, {"customerId": "4ba77efb904e4380accc242b1526ac2c", "customerName": "333 Abdul's Test Name", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -10, "details": [{"name": "CreditNotes", "amount": -10}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 65, "details": [{"name": "Invoices", "amount": 65}]}]}]}, {"customerId": "18e45991fe6440ad8e8b5ecf9a2e7e09", "customerName": "444 Abdul's Test Name", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -2, "details": [{"name": "Invoices", "amount": 48}, {"name": "Payments", "amount": -50}]}]}]}, {"customerId": "23ca7ffaa2b54360937531dde804c9aa", "customerName": "aaa", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -22, "details": [{"name": "CreditNotes", "amount": -22}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -62, "details": [{"name": "Invoices", "amount": 7}, {"name": "Payments", "amount": -69}]}]}]}, {"customerId": "2b93da6ce4af4dc99520eafd28768457", "customerName": "Abdul Al-haj", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 288, "details": [{"name": "Invoices", "amount": 288}]}]}]}, {"customerId": "460af92dd82a4a61b6ce1d18245789b3", "customerName": "Abdul Al-haj", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 48, "details": [{"name": "Invoices", "amount": 48}]}]}]}, {"customerId": "b8bd7e0dfdd64d39abaaf2dcd1c48b49", "customerName": "Abdul Al-haj", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -119.99, "details": [{"name": "CreditNotes", "amount": -119.99}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"customerId": "aa37b59417024d2494f01ba23d92a2ef", "customerName": "Abe The Engineer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1562, "details": [{"name": "CreditNotes", "amount": -1562}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1337, "details": [{"name": "Invoices", "amount": 1362}, {"name": "Payments", "amount": -25}]}]}]}, {"customerId": "df65eaa6789111e8aaa5027d54329956", "customerName": "Baguettes Ltd", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -844.99, "details": [{"name": "CreditNotes", "amount": -844.99}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 616726.02, "details": [{"name": "Invoices", "amount": 617888.74}, {"name": "Payments", "amount": -1162.72}]}]}]}, {"customerId": "2916114b3b6942a7b08f1bcc971f5bf9", "customerName": "c.taylor@codat.io", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1.2, "details": [{"name": "Invoices", "amount": 1.2}]}]}]}, {"customerId": "0556b365ef4e42068fff775f847c0330", "customerName": "Customer 71 (AUD)", "agedCurrencyOutstanding": [{"currency": "AUD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -701, "details": [{"name": "Payments", "amount": -701}]}]}]}, {"customerId": "145dee01b49c4359a052682f234007e3", "customerName": "Customer Name", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -10, "details": [{"name": "Payments", "amount": -10}]}]}]}, {"customerId": "76f656dfbafa4cec823f1e2e43ea1a8e", "customerName": "Customer Test 59", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -10, "details": [{"name": "Payments", "amount": -10}]}]}]}, {"customerId": "a11e6776ca9a4e16af3425982de25a22", "customerName": "Debs Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5279.2, "details": [{"name": "Invoices", "amount": 5279.2}]}]}]}, {"customerId": "cc80e0fb747e4ddaab743d778d04ec4a", "customerName": "Debs US Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 15111, "details": [{"name": "Invoices", "amount": 15111}]}]}]}, {"customerId": "adb9cae8b34e446da3d53305b299168b", "customerName": "Fo Shizzle", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 300, "details": [{"name": "Invoices", "amount": 300}]}]}]}, {"customerId": "cc745370213545f6bd4129a7502f19fb", "customerName": "Grace Lo", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -1150, "details": [{"name": "Invoices", "amount": 0}, {"name": "Payments", "amount": -1150}]}]}]}, {"customerId": "3b17c5ae9caf4b88a4a9e33a83fa321d", "customerName": "Hello", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 12, "details": [{"name": "Invoices", "amount": 12}]}]}]}, {"customerId": "979c5156ea0e45d9a9ea7b9d54775138", "customerName": "J Customer FR", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -52795, "details": [{"name": "CreditNotes", "amount": -52795}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 134045, "details": [{"name": "Invoices", "amount": 134045}]}]}]}, {"customerId": "99d52ca7060341a698a664d1737663c5", "customerName": "J Customer UK", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -265, "details": [{"name": "CreditNotes", "amount": -265}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 15, "details": [{"name": "Invoices", "amount": 30}, {"name": "Payments", "amount": -15}]}]}]}, {"customerId": "f40870d5b704407481be14f780122d4f", "customerName": "J Customer US", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -161570, "details": [{"name": "CreditNotes", "amount": -161570}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 181372, "details": [{"name": "Invoices", "amount": 181372}]}]}]}, {"customerId": "50a66e9756d2416d946419948bcf3631", "customerName": "J Customer ZA", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -10, "details": [{"name": "CreditNotes", "amount": -10}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"customerId": "0328dd6b109a4a6cbcb3d1a73f1d541b", "customerName": "James Arroyo", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -719, "details": [{"name": "Invoices", "amount": 178}, {"name": "Payments", "amount": -897}]}]}]}, {"customerId": "bca2a47d7b4549c79b0c092d26b6661c", "customerName": "Jay Farm", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 25.01, "details": [{"name": "Invoices", "amount": 25.01}]}]}]}, {"customerId": "6477be6d012b4d48b4c160c098645c1c", "customerName": "Jo's Bake Shop", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -37.8, "details": [{"name": "CreditNotes", "amount": -37.8}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 22.25, "details": [{"name": "Invoices", "amount": 48}, {"name": "Payments", "amount": -25.75}]}]}]}, {"customerId": "097305a078ba473c884d2519ab290e57", "customerName": "John QuickEntry Test", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 396, "details": [{"name": "Invoices", "amount": 396}]}]}]}, {"customerId": "eac978a7622e4ef8b8d3af661f0cfdd3", "customerName": "John Smith", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 200, "details": [{"name": "Invoices", "amount": 200}]}]}]}, {"customerId": "3cc3148bbd8111e8bad90617b3da4b8a", "customerName": "John's Test Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1081.2, "details": [{"name": "CreditNotes", "amount": -1081.2}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3379, "details": [{"name": "Invoices", "amount": 3479}, {"name": "Payments", "amount": -100}]}]}]}, {"customerId": "f66deccde15843ef80a82daad887146b", "customerName": "Kiran testing 2", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 48, "details": [{"name": "Invoices", "amount": 48}]}]}]}, {"customerId": "6e921696a21a45c891ff4716a18e7649", "customerName": "M Smith", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 900, "details": [{"name": "Invoices", "amount": 900}]}]}]}, {"customerId": "bbb0582a0d054f5db268e570b50b4d6c", "customerName": "Mark Smith", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 40, "details": [{"name": "Invoices", "amount": 40}]}]}]}, {"customerId": "440ba2199c07426a93e8edc1beb09791", "customerName": "Matt Ager test EUR customer", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -8159.78, "details": [{"name": "CreditNotes", "amount": -8159.78}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 6016.67, "details": [{"name": "Invoices", "amount": 6022.98}, {"name": "Payments", "amount": -6.31}]}]}]}, {"customerId": "d430ed86b05645d7af0a630dae5d11d2", "customerName": "Matthew Smith", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 240, "details": [{"name": "Invoices", "amount": 240}]}]}]}, {"customerId": "9e8c3d82a2164ad29e29ab3a09ddf382", "customerName": "Morv Smith", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 300, "details": [{"name": "Invoices", "amount": 300}]}]}]}, {"customerId": "fbdd38adb5b4441ebb200b83700d7ea5", "customerName": "My Shop Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -384, "details": [{"name": "CreditNotes", "amount": -384}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 398, "details": [{"name": "Invoices", "amount": 398}]}]}]}, {"customerId": "4b4cc40d998f47c3bec92fc088dcf327", "customerName": "Nicoletta Carchia", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 90, "details": [{"name": "Invoices", "amount": 90}]}]}]}, {"customerId": "ed070b1768bb4dd295e2a544a74c8ec0", "customerName": "Paige Burlingham", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -48, "details": [{"name": "CreditNotes", "amount": -48}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 48, "details": [{"name": "Invoices", "amount": 48}]}]}]}, {"customerId": "84709d3f01a4462eb7f1527718f525f4", "customerName": "SageOneCustomer.BusinessName", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1085, "details": [{"name": "CreditNotes", "amount": -1085}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"customerId": "90c438274d0b43759407da704394c104", "customerName": "Test Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -16.2, "details": [{"name": "CreditNotes", "amount": -16.2}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1137.2, "details": [{"name": "Invoices", "amount": 1137.2}]}]}]}, {"customerId": "762e6895c1ff43f988f35fb507e20dd9", "customerName": "Test Custiomer 2", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -615, "details": [{"name": "CreditNotes", "amount": -615}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2178.25, "details": [{"name": "Invoices", "amount": 2178.25}]}]}]}, {"customerId": "7b9c18af4b66454b9f7e9409eb7da123", "customerName": "Test Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1200, "details": [{"name": "Invoices", "amount": 1200}]}]}]}, {"customerId": "4ccf5c5fa14046ecb591e0620d87ea2e", "customerName": "Test Customer 3", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -50, "details": [{"name": "CreditNotes", "amount": -50}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 499971, "details": [{"name": "Invoices", "amount": 499971}]}]}]}, {"customerId": "f4ff85ba33dd11e797950a57719b2edb", "customerName": "Widgets Limited", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -23206.12, "details": [{"name": "CreditNotes", "amount": -23206.12}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 733824.64, "details": [{"name": "Invoices", "amount": 739536.49}, {"name": "Payments", "amount": -5711.85}]}]}]}]} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:22.6557479Z", "reportDate": "2023-05-02T16:05:22.6081858Z", "data": [{"customerId": "6", "customerName": "AG Insurance", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 180, "details": [{"name": "Invoices", "amount": 180}]}]}]}, {"customerId": "531", "customerName": "Shoprite", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -150, "details": [{"name": "Payments", "amount": -150}]}]}]}]} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.0730291Z", "reportDate": "2023-05-02T16:05:20.0102278Z", "data": [{"customerId": "305ca5cf-497d-4fee-a161-cdb30e6be989", "customerName": "Basket Case", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 914.55, "details": [{"name": "Invoices", "amount": 914.55}]}]}]}, {"customerId": "362819c9-f285-4d09-ac95-26327863adac", "customerName": "Bayside Club", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3434, "details": [{"name": "Invoices", "amount": 3434}]}]}]}, {"customerId": "9ce626d2-14ea-463c-9fff-6785ab5f9bfb", "customerName": "Boom FM", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1623.75, "details": [{"name": "Invoices", "amount": 1623.75}]}]}]}, {"customerId": "c523e12f-8b74-4d3a-bbd8-32d7a2f598b4", "customerName": "City Limousines", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1169.95, "details": [{"name": "Invoices", "amount": 1169.95}]}]}]}, {"customerId": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "customerName": "DIISR - Small Business Services", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4470.63, "details": [{"name": "Invoices", "amount": 4470.63}]}]}]}, {"customerId": "94cb6d7b-5291-49f3-a0bc-fc0c01e68575", "customerName": "Marine Systems", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 396, "details": [{"name": "Invoices", "amount": 396}]}]}]}, {"customerId": "847933f0-7c35-4e5b-b884-5f9df64c8e4b", "customerName": "Port & Philip Freight", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2245, "details": [{"name": "Invoices", "amount": 2245}]}]}]}, {"customerId": "a871a956-05b5-4e2a-9419-7aeb478ca647", "customerName": "Ridgeway University", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 6187.5, "details": [{"name": "Invoices", "amount": 6187.5}]}]}]}]} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:23.2078272Z", "reportDate": "2023-05-02T16:05:23.1573589Z", "data": [{"customerId": "104957000000054050", "customerName": "Doe, John", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -10567, "details": [{"name": "CreditNotes", "amount": -10567}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 38965, "details": [{"name": "Invoices", "amount": 39865}, {"name": "Payments", "amount": -900}]}]}]}, {"customerId": "104957000000634160", "customerName": "Dr. Jekyll", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -110, "details": [{"name": "CreditNotes", "amount": -110}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"customerId": "104957000000080010", "customerName": "Max Mustermann", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -68, "details": [{"name": "Invoices", "amount": 0}, {"name": "Payments", "amount": -68}]}]}]}, {"customerId": "104957000000277089", "customerName": "Miss. No Contact Persons", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -10, "details": [{"name": "CreditNotes", "amount": -10}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Invoices", "amount": 0}]}]}]}, {"customerId": "104957000000054080", "customerName": "Ms. Jane Doe", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -465, "details": [{"name": "CreditNotes", "amount": -465}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"customerId": "104957000000277001", "customerName": "Sousa, Diogo", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 9001, "details": [{"name": "Invoices", "amount": 9001}]}]}]}, {"customerId": "104957000000037097", "customerName": "Test Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -9001, "details": [{"name": "CreditNotes", "amount": -9001}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3556.98, "details": [{"name": "Invoices", "amount": 4501}, {"name": "Payments", "amount": -944.02}]}]}]}, {"customerId": "104957000001497001", "customerName": "Will Westrop", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 56, "details": [{"name": "Invoices", "amount": 56}]}]}]}]} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - is-aged-creditors-report-available: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-is-aged-creditors-report-available: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: true - "401": - application/json: {} - "500": - application/json: {} - get-accounting-aged-creditors-report: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:21.7545859Z", "reportDate": "2023-05-02T16:05:21.7016767Z", "data": [{"supplierId": "owQ2Gqgj9f", "supplierName": "Abshire - Kshlerin", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -78.12, "details": [{"name": "BillCreditNotes", "amount": -78.12}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 375.6, "details": [{"name": "Bills", "amount": 375.6}]}]}]}, {"supplierId": "FyUkHbZxhn", "supplierName": "Arjun Kuvalis", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -3782.27, "details": [{"name": "BillCreditNotes", "amount": -3782.27}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 8556.1, "details": [{"name": "Bills", "amount": 8556.1}]}]}]}, {"supplierId": "gxazX5hqx4", "supplierName": "Bernier Inc", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 213.19, "details": [{"name": "Bills", "amount": 213.19}]}]}]}, {"supplierId": "ro8nWYGzlg", "supplierName": "Botsford - Hickle", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2242.95, "details": [{"name": "Bills", "amount": 0}, {"name": "BillCreditNotes", "amount": -2242.95}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 838.67, "details": [{"name": "Bills", "amount": 838.67}]}]}]}, {"supplierId": "D4Q4iYwHou", "supplierName": "Breitenberg, Emard and Schiller", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -276.5, "details": [{"name": "BillCreditNotes", "amount": -276.5}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 46060.53, "details": [{"name": "Bills", "amount": 46060.53}]}]}]}, {"supplierId": "9436ead6-545e-4e8c-8444-0220047c5a38", "supplierName": "Champlin LLC", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 22726.97, "details": [{"name": "Bills", "amount": 22726.97}]}]}]}, {"supplierId": "O6jExrbN3v", "supplierName": "Collins - Anderson", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -19.39, "details": [{"name": "BillCreditNotes", "amount": -19.39}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "9d4b61a4-4ce3-4d90-8d6b-66614694dc27", "supplierName": "Crona - Adams", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 302.8, "details": [{"name": "Bills", "amount": 302.8}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "ad8f4ee1-7a04-415f-b3dc-365d41d8d4f0", "supplierName": "Cronin, Kunde and Tremblay", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -3271.91, "details": [{"name": "BillCreditNotes", "amount": -3271.91}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3479.78, "details": [{"name": "Bills", "amount": 3479.78}]}]}]}, {"supplierId": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -16511.91, "details": [{"name": "BillCreditNotes", "amount": -16511.91}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "XOPP3v2lQu", "supplierName": "Fisher and Sons", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 238599.9, "details": [{"name": "Bills", "amount": 238599.9}]}]}]}, {"supplierId": "0a7b0432-7de3-4e29-bf15-4e7ca0722384", "supplierName": "Flatley - Kirlin", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -113.59, "details": [{"name": "BillCreditNotes", "amount": -113.59}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 910.45, "details": [{"name": "Bills", "amount": 910.45}]}]}]}, {"supplierId": "HrGZeW4I51", "supplierName": "Frami, Simonis and Krajcik", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2070.59, "details": [{"name": "BillCreditNotes", "amount": -2070.59}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "SFmBGSHLQ3", "supplierName": "Gottlieb LLC", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -105.07, "details": [{"name": "BillCreditNotes", "amount": -105.07}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "unNIu8Uyap", "supplierName": "Hahn and Sons", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -297.78, "details": [{"name": "BillCreditNotes", "amount": -297.78}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2095.75, "details": [{"name": "Bills", "amount": 2095.75}]}]}]}, {"supplierId": "GTGS3Sx241", "supplierName": "Harvey Predovic", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3612.41, "details": [{"name": "Bills", "amount": 3612.41}]}]}]}, {"supplierId": "w07H3CBm5P", "supplierName": "Hayes, Predovic and Ruecker", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -11662.51, "details": [{"name": "BillCreditNotes", "amount": -11662.51}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 393776.18, "details": [{"name": "Bills", "amount": 393776.18}]}]}]}, {"supplierId": "92144542-2227-409e-8f5b-fc73260e670b", "supplierName": "Hettinger, Schmitt and Will", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 3433.54, "details": [{"name": "Bills", "amount": 3433.54}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "rpLhEYz0ML", "supplierName": "Hickle - Buckridge", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -7484.88, "details": [{"name": "BillCreditNotes", "amount": -7484.88}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "d2056eb9-649e-4808-8f96-d8ea4dac71fe", "supplierName": "Hodkiewicz Group", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -6627.16, "details": [{"name": "BillCreditNotes", "amount": -6627.16}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 18266.27, "details": [{"name": "Bills", "amount": 18266.27}]}]}]}, {"supplierId": "s3WcvMyVdR", "supplierName": "Howe - Ruecker", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4042.16, "details": [{"name": "Bills", "amount": 4042.16}]}]}]}, {"supplierId": "b60XbI9zhE", "supplierName": "Jenkins Inc", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -12938.29, "details": [{"name": "BillCreditNotes", "amount": -12938.29}, {"name": "Bills", "amount": 0}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 18360.8, "details": [{"name": "Bills", "amount": 18360.8}]}]}]}, {"supplierId": "OtXKRTOcQc", "supplierName": "Jensen Steuber", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 190.16, "details": [{"name": "Bills", "amount": 190.16}]}]}]}, {"supplierId": "c02bc2f1-631d-4721-aec1-a190d63e8322", "supplierName": "Jones - Zulauf", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -69.05, "details": [{"name": "BillCreditNotes", "amount": -69.05}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 51357.36, "details": [{"name": "Bills", "amount": 51357.36}]}]}]}, {"supplierId": "c02382bd-ff23-4b34-bfd7-8dce15fa7d6a", "supplierName": "Keara Leffler", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2496.69, "details": [{"name": "BillCreditNotes", "amount": -2496.69}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1519.74, "details": [{"name": "Bills", "amount": 1519.74}]}]}]}, {"supplierId": "d3tf43eghS", "supplierName": "Klocko - Keebler", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 12367.4, "details": [{"name": "Bills", "amount": 12367.4}]}]}]}, {"supplierId": "7GObELDcsE", "supplierName": "Lakin, Schmeler and Kihn", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -318.71, "details": [{"name": "BillCreditNotes", "amount": -318.71}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "gO8p5O3Mvy", "supplierName": "Lehner Group", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1042.8, "details": [{"name": "BillCreditNotes", "amount": -1042.8}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "62229022-713f-4c64-84f2-63cf6dd11443", "supplierName": "Littel - Cole", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -7.5, "details": [{"name": "BillCreditNotes", "amount": -7.5}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "39b32019-c5d0-4db3-ae83-f0a644e614ef", "supplierName": "Marvin - Schaden", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1611.56, "details": [{"name": "BillCreditNotes", "amount": -1611.56}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "8635b986-048f-424c-985d-912576c004d9", "supplierName": "Mills, Bechtelar and Wintheiser", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -604.41, "details": [{"name": "BillCreditNotes", "amount": -604.41}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "d2fb1aba-79ac-4840-95d5-6c173c9beaad", "supplierName": "Morissette LLC", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -55.93, "details": [{"name": "BillCreditNotes", "amount": -55.93}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "27dc0345-aae8-4b69-a903-fed6b0a8778b", "supplierName": "Newton Zieme", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1546.46, "details": [{"name": "Bills", "amount": 1546.46}]}]}]}, {"supplierId": "0d892acd-4b56-4412-80ee-381b8118637b", "supplierName": "Nicolas - McKenzie", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -186.97, "details": [{"name": "BillCreditNotes", "amount": -186.97}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5131.74, "details": [{"name": "Bills", "amount": 5131.74}]}]}]}, {"supplierId": "cc283863-960f-42f8-8e38-1e22235e9cfc", "supplierName": "Nicolas Group", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -6.41, "details": [{"name": "BillCreditNotes", "amount": -6.41}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "9UvJVVmPHO", "supplierName": "Nienow - Schroeder", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2822.41, "details": [{"name": "BillCreditNotes", "amount": -2822.41}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "1346295c-2970-47a7-8a99-1f935567db02", "supplierName": "Polly Crona", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3600.36, "details": [{"name": "Bills", "amount": 3600.36}]}]}]}, {"supplierId": "5fcb09bf-ae92-42a1-a69b-57c5f0ebedd9", "supplierName": "Raul Johns", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2938.85, "details": [{"name": "Bills", "amount": 0}, {"name": "BillCreditNotes", "amount": -2938.85}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "4253a13e-638e-4a42-9e61-665a60267a48", "supplierName": "Robel, Ledner and Stroman", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1106.72, "details": [{"name": "Bills", "amount": 1106.72}]}]}]}, {"supplierId": "143ed2c5-2623-465e-a015-5ac12df75aa6", "supplierName": "Schulist - Douglas", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -12468.22, "details": [{"name": "BillCreditNotes", "amount": -12468.22}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 39306.44, "details": [{"name": "Bills", "amount": 39306.44}]}]}]}, {"supplierId": "d770b767-489e-455b-9d32-29c37a1b9d07", "supplierName": "Schultz Group", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -517.52, "details": [{"name": "BillCreditNotes", "amount": -517.52}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "98e93284-fcaa-440c-8f86-f36e5df591da", "supplierName": "Simonis - Ziemann", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -597.01, "details": [{"name": "BillCreditNotes", "amount": -597.01}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "87e907ed-97f8-4146-b276-fea2a10671bf", "supplierName": "Sporer and Sons", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -62443.6, "details": [{"name": "BillCreditNotes", "amount": -62443.6}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "97682025-4e50-449f-8510-6d09d1d0f84b", "supplierName": "Sporer LLC", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1104.37, "details": [{"name": "BillCreditNotes", "amount": -1104.37}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1050.12, "details": [{"name": "Bills", "amount": 1050.12}]}]}]}, {"supplierId": "c51351a0-b43f-48c6-8dbb-8417171bda67", "supplierName": "Veum - Schiller", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1966.59, "details": [{"name": "BillCreditNotes", "amount": -1966.59}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10234.97, "details": [{"name": "Bills", "amount": 10234.97}]}]}]}, {"supplierId": "26f6b56a-4a86-468f-a302-9d60bdc01d91", "supplierName": "Vincenzo Wolff", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -23450.31, "details": [{"name": "BillCreditNotes", "amount": -23450.31}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "f589fd05-c5f8-4815-b205-0a9f3f0b3b96", "supplierName": "Weber LLC", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -681.79, "details": [{"name": "BillCreditNotes", "amount": -681.79}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10221.45, "details": [{"name": "Bills", "amount": 10221.45}]}]}]}, {"supplierId": "1cc8b95c-62ec-415a-ab0e-facf7e7218bf", "supplierName": "Welch, Terry and Hermiston", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1219.54, "details": [{"name": "Bills", "amount": 1219.54}]}]}]}, {"supplierId": "f6CgWtm1aw", "supplierName": "Wisoky Group", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 272.67, "details": [{"name": "Bills", "amount": 272.67}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "je5ok1Cam5", "supplierName": "Wunsch, Kerluke and West", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7238.24, "details": [{"name": "Bills", "amount": 7238.24}]}]}]}]} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:21.1349781Z", "reportDate": "2023-05-02T16:05:21.0866594Z", "data": [{"supplierId": "e89328bd-485a-eb11-89fa-00224800af18", "supplierName": "A QA", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -526.8, "details": [{"name": "BillCreditNotes", "amount": -526.8}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 120, "details": [{"name": "Bills", "amount": 120}]}]}]}, {"supplierId": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc.", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -65, "details": [{"name": "BillCreditNotes", "amount": -65}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -11904.4, "details": [{"name": "Bills", "amount": 461.6}, {"name": "BillPayments", "amount": -12366}]}]}, {"currency": "PLN", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -15, "details": [{"name": "BillPayments", "amount": -15}]}]}, {"currency": "MAD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5, "details": [{"name": "Bills", "amount": 5}]}]}]}, {"supplierId": "c01217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "First Up Consultants", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 12123.81, "details": [{"name": "Bills", "amount": 12128.81}, {"name": "BillPayments", "amount": -5}]}]}]}, {"supplierId": "c21217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Graphic Design Institute", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7514.8, "details": [{"name": "Bills", "amount": 7520.8}, {"name": "BillPayments", "amount": -6}]}]}]}, {"supplierId": "4a1b210e-b805-ec11-86bc-0022481a45c2", "supplierName": "Kays Farm", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -121, "details": [{"name": "BillPayments", "amount": -121}]}]}]}, {"supplierId": "c61217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Nod Publishers", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 13156.74, "details": [{"name": "Bills", "amount": 13156.74}]}]}]}, {"supplierId": "b864b5ae-4a5a-eb11-89fa-00224800af18", "supplierName": "Test Supplier", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3951, "details": [{"name": "Bills", "amount": 3951}]}]}, {"currency": "MAD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 121.45, "details": [{"name": "Bills", "amount": 121.45}]}]}]}, {"supplierId": "8b4c95b4-b705-ec11-86bc-0022481a45c2", "supplierName": "Vegan Farm", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -5.27, "details": [{"name": "Bills", "amount": 0}, {"name": "BillPayments", "amount": -5.27}]}]}, {"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -11.75, "details": [{"name": "BillPayments", "amount": -11.75}]}]}]}, {"supplierId": "c41217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Wide World Importers", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 15843.22, "details": [{"name": "Bills", "amount": 15848.22}, {"name": "BillPayments", "amount": -5}]}]}]}]} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:19.8312183Z", "reportDate": "2023-05-02T16:05:19.7538301Z", "data": [{"supplierId": "3150917c-1d92-4d77-9018-31b5c4758ca9", "supplierName": "Abe", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -38.28, "details": [{"name": "BillCreditNotes", "amount": -38.28}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1952.27, "details": [{"name": "Bills", "amount": 1941.58}, {"name": "BillPayments", "amount": 10.69}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10, "details": [{"name": "Bills", "amount": 10}]}]}]}, {"supplierId": "5811b467-53eb-4491-8ca1-bc9b7889811b", "supplierName": "Ann's test supplier 2", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -10000, "details": [{"name": "BillCreditNotes", "amount": -10000}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}, {"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 117, "details": [{"name": "Bills", "amount": 117}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4997.25, "details": [{"name": "Bills", "amount": 4997.25}]}]}]}, {"supplierId": "78afea22-ee21-48c3-84d5-45b9b24768e9", "supplierName": "Ann's test supplier 2", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 110, "details": [{"name": "Bills", "amount": 108}, {"name": "BillPayments", "amount": 2}]}]}]}, {"supplierId": "773416a6-b196-487b-ae02-eeb273a86bcd", "supplierName": "Belastingdienst", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -293.14, "details": [{"name": "BillCreditNotes", "amount": -293.14}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1547.08, "details": [{"name": "Bills", "amount": 1547.08}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 32.17, "details": [{"name": "Bills", "amount": 32.17}]}]}]}, {"supplierId": "7017da1f-2d49-4601-abf3-c4e779459976", "supplierName": "Bool Test", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 121, "details": [{"name": "Bills", "amount": 121}]}]}]}, {"supplierId": "f87070e2-bbd7-4383-a7c9-824748c1d70e", "supplierName": "Exact Software Nederland B.V.", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -65.73, "details": [{"name": "BillCreditNotes", "amount": -65.73}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -83351.62, "details": [{"name": "BillPayments", "amount": -83381.63}, {"name": "Bills", "amount": 30.01}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -8285.73, "details": [{"name": "BillPayments", "amount": -8285.73}]}]}]}, {"supplierId": "8cb6745b-4769-4c7a-9d92-bc688c60ca3c", "supplierName": "iZettle AB (Supplier)", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 19.93, "details": [{"name": "Bills", "amount": 19.93}]}]}]}, {"supplierId": "63fadca8-4905-475a-b32a-b4341293bcf4", "supplierName": "Kelly's Industrial Supplies", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5, "details": [{"name": "BillPayments", "amount": 5}]}]}]}, {"supplierId": "acde3236-898e-4e68-b076-4e946defbc5f", "supplierName": "Matt Ager Test Supplier 1", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -276, "details": [{"name": "BillCreditNotes", "amount": -276}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 75, "details": [{"name": "Bills", "amount": 105}, {"name": "BillPayments", "amount": -30}]}]}, {"currency": "RUB", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -10, "details": [{"name": "BillPayments", "amount": -10}]}]}]}, {"supplierId": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -12.1, "details": [{"name": "BillCreditNotes", "amount": -12.1}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 119.97, "details": [{"name": "Bills", "amount": 119.97}]}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -7040, "details": [{"name": "BillCreditNotes", "amount": -7040}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 8800, "details": [{"name": "Bills", "amount": 8800}]}]}]}, {"supplierId": "fc189bfa-f083-438c-bf09-379a0631d4a1", "supplierName": "Mickey Mouse", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -0.83, "details": [{"name": "Bills", "amount": -0.83}]}]}]}, {"supplierId": "1d2c9f47-a2fc-48e6-a967-71583d764b10", "supplierName": "NLSuppliers07", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 25, "details": [{"name": "Bills", "amount": 25}]}]}]}, {"supplierId": "a1e88d58-caec-4ed6-ad1b-646ebb959c17", "supplierName": "supplierrrr", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -55, "details": [{"name": "BillCreditNotes", "amount": -55}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 11084, "details": [{"name": "Bills", "amount": 11084}]}]}]}, {"supplierId": "cdcdce7b-0330-49fb-8169-0a50e0b74dcc", "supplierName": "Test NL sup1", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 13.21, "details": [{"name": "BillPayments", "amount": 13.21}]}]}]}, {"supplierId": "bad8020a-267f-41fb-9e0f-e93465ee9529", "supplierName": "Test supplier", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 718.22, "details": [{"name": "Bills", "amount": 718.22}]}]}]}, {"supplierId": "26bc5305-8613-43e4-ab97-522ade34cbba", "supplierName": "Vandana's Test Supplier", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 403.74, "details": [{"name": "Bills", "amount": 403.74}]}]}]}]} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:22.8960035Z", "reportDate": "2023-05-02T16:05:22.8283897Z", "data": [{"supplierId": "0185fea2-0298-445b-909a-0db685118a9e", "supplierName": "a", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -10, "details": [{"name": "BillCreditNotes", "amount": -10}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 560.1, "details": [{"name": "Bills", "amount": 660.1}, {"name": "BillPayments", "amount": -100}]}]}]}, {"supplierId": "64ae712f-4155-48bb-9fce-98232c51d979", "supplierName": "aa", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -400, "details": [{"name": "BillCreditNotes", "amount": -400}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 30, "details": [{"name": "Bills", "amount": 430}, {"name": "BillPayments", "amount": -400}]}]}]}, {"supplierId": "5f20075a-a28e-434d-81a6-2db0dc170e87", "supplierName": "Abdi 99", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -65, "details": [{"name": "BillCreditNotes", "amount": -65}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 609, "details": [{"name": "Bills", "amount": 258}, {"name": "BillPayments", "amount": 351}]}]}]}, {"supplierId": "0d3f8692-4b0a-4bc3-85f2-4cb763306397", "supplierName": "Ann's test supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -3600, "details": [{"name": "BillCreditNotes", "amount": -3600}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2400, "details": [{"name": "Bills", "amount": 2400}]}]}]}, {"supplierId": "fc62db43-a6f8-4b65-9d29-15290ec56674", "supplierName": "Anna's test supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1717.5, "details": [{"name": "BillCreditNotes", "amount": -1717.5}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2751, "details": [{"name": "Bills", "amount": 2751}]}]}]}, {"supplierId": "cde51f36-2a06-4eac-9784-c0c967c1e1ed", "supplierName": "b", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -6, "details": [{"name": "BillCreditNotes", "amount": -6}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "437c6631-3c5d-4351-b757-6ad4f94bd26e", "supplierName": "bb", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 220, "details": [{"name": "Bills", "amount": 220}]}]}]}, {"supplierId": "fe713acb-3c98-423d-8372-68a32aae6232", "supplierName": "cc", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -60, "details": [{"name": "BillPayments", "amount": -60}]}]}]}, {"supplierId": "1c703cce-967c-4476-a86a-32e35341a8f5", "supplierName": "Customer Bill Supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -100073.4, "details": [{"name": "BillCreditNotes", "amount": -100073.4}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 374.8, "details": [{"name": "Bills", "amount": 373.8}, {"name": "BillPayments", "amount": 1}]}]}]}, {"supplierId": "6a4c6a14-d5eb-4427-aae0-c544f67dff7a", "supplierName": "CustomerAndSupplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2.05, "details": [{"name": "BillPayments", "amount": 2.05}]}]}]}, {"supplierId": "efb5d438-7d3a-4b77-a254-2d90f76d3f22", "supplierName": "dd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 200, "details": [{"name": "Bills", "amount": 200}]}]}]}, {"supplierId": "77b652bb-a363-4425-adbd-0206e2ce4639", "supplierName": "e", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -72.33, "details": [{"name": "BillCreditNotes", "amount": -72.33}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "a4d5d739-c979-4819-b0ce-666db1ec3a7d", "supplierName": "Exact Software (UK) Ltd � Exact Online", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 133.6, "details": [{"name": "Bills", "amount": 133.6}]}]}]}, {"supplierId": "7c8a9143-7322-48e3-b809-88a038b8a0e0", "supplierName": "John Doe", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 192.5, "details": [{"name": "Bills", "amount": 192.5}]}]}]}, {"supplierId": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1200, "details": [{"name": "BillCreditNotes", "amount": -1200}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3837, "details": [{"name": "Bills", "amount": 3837}]}]}]}, {"supplierId": "41302634-76b5-4442-b800-0bb63780e77c", "supplierName": "Some Supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -46.8, "details": [{"name": "BillCreditNotes", "amount": -46.8}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -54537.12, "details": [{"name": "Bills", "amount": 455.73}, {"name": "BillPayments", "amount": -54992.85}]}]}]}]} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:23.3560058Z", "reportDate": "2023-05-02T16:05:23.3059155Z", "data": [{"supplierId": "10123537", "supplierName": "_Test 1", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": [{"name": "BillPayments", "amount": 0}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 791, "details": [{"name": "Bills", "amount": 791}]}]}, {"currency": "QAR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 12, "details": [{"name": "Bills", "amount": 12}]}]}]}, {"supplierId": "11526230", "supplierName": "-", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -6430, "details": [{"name": "Bills", "amount": 1500}, {"name": "BillCreditNotes", "amount": -7930}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1200, "details": [{"name": "Bills", "amount": 1200}]}]}]}, {"supplierId": "9677150", "supplierName": "-", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5, "details": [{"name": "Bills", "amount": 5}]}]}]}, {"supplierId": "8959011", "supplierName": "1", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -134.3, "details": [{"name": "BillCreditNotes", "amount": -134.3}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 46, "details": [{"name": "Bills", "amount": 46}]}]}]}, {"supplierId": "6161941", "supplierName": "A & J Fabtech Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -2433.99, "details": [{"name": "BillCreditNotes", "amount": -2433.99}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3431, "details": [{"name": "Bills", "amount": 3431}]}]}, {"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 400, "details": [{"name": "Bills", "amount": 400}]}]}]}, {"supplierId": "6161963", "supplierName": "ABB Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -10, "details": [{"name": "BillCreditNotes", "amount": -10}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": [{"name": "Bills", "amount": 0}]}]}]}, {"supplierId": "9356878", "supplierName": "Abdul Al-haj", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 12, "details": [{"name": "Bills", "amount": 12}]}]}]}, {"supplierId": "8984892", "supplierName": "Abraham's Spider Hunting Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 77, "details": [{"name": "Bills", "amount": 77}]}]}]}, {"supplierId": "9273150", "supplierName": "Best Company", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -456, "details": [{"name": "BillCreditNotes", "amount": -456}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "6161956", "supplierName": "C Allen", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -100, "details": [{"name": "BillCreditNotes", "amount": -100}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 122, "details": [{"name": "Bills", "amount": 122}]}]}]}, {"supplierId": "7994567", "supplierName": "codat", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10, "details": [{"name": "Bills", "amount": 10}]}]}]}, {"supplierId": "5730310", "supplierName": "Demo Customer", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 200, "details": [{"name": "Bills", "amount": 200}]}]}]}, {"supplierId": "6162169", "supplierName": "PricewaterhouseCoopers LLP", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 42, "details": [{"name": "Bills", "amount": 42}]}]}]}, {"supplierId": "10672202", "supplierName": "Random Org", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -42, "details": [{"name": "BillCreditNotes", "amount": -42}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 130, "details": [{"name": "Bills", "amount": 130}]}]}]}, {"supplierId": "8989342", "supplierName": "Supplier Hidden", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -500, "details": [{"name": "BillCreditNotes", "amount": -500}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}, {"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -150, "details": [{"name": "BillPayments", "amount": -150}]}]}]}, {"supplierId": "7169654", "supplierName": "The Eagle", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -492, "details": [{"name": "BillCreditNotes", "amount": -492}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3523.75, "details": [{"name": "Bills", "amount": 3523.75}]}]}, {"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 301, "details": [{"name": "Bills", "amount": 301}]}]}]}]} - MYOB AccountRight and Essentials: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:21.5229720Z", "reportDate": "2023-05-02T16:05:21.2821865Z", "data": []} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.3296968Z", "reportDate": "2023-05-02T16:05:20.2442587Z", "data": [{"supplierId": "779", "supplierName": "Test Vendor", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 56, "details": [{"name": "Bills", "amount": 56}]}]}]}, {"supplierId": "724", "supplierName": "Vendor A.A.A", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 579.55, "details": [{"name": "Bills", "amount": 524}, {"name": "BillPayments", "amount": 55.55}]}]}]}]} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.3972104Z", "reportDate": "2023-05-02T16:05:20.3178060Z", "data": [{"supplierId": "B0000-933272656", "supplierName": "Patton Hardware Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": [{"name": "BillPayments", "amount": 0}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5000, "details": [{"name": "Bills", "amount": 5000}]}]}]}]} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:21.3065432Z", "reportDate": "2023-05-02T16:05:21.2488309Z", "data": [{"supplierId": "129", "supplierName": "Ally Johnson", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 230.98, "details": [{"name": "Bills", "amount": 276.38}, {"name": "BillPayments", "amount": -45.4}]}]}]}, {"supplierId": "88", "supplierName": "Andrew Haberbosch", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -16, "details": [{"name": "BillCreditNotes", "amount": -16}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 66.25, "details": [{"name": "BillPayments", "amount": -13.75}, {"name": "Bills", "amount": 80}]}]}]}, {"supplierId": "53", "supplierName": "Bank of AnyCity", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 63, "details": [{"name": "Bills", "amount": 63}]}]}]}, {"supplierId": "282", "supplierName": "Becky's Bakery", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 490.5, "details": [{"name": "BillPayments", "amount": -9.5}, {"name": "Bills", "amount": 500}]}]}]}, {"supplierId": "24", "supplierName": "Brijesh Jain", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -69, "details": [{"name": "BillCreditNotes", "amount": -69}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 52260, "details": [{"name": "Bills", "amount": 52260}]}]}]}, {"supplierId": "25", "supplierName": "Brittney Hughes", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 70, "details": [{"name": "Bills", "amount": 70}]}]}]}, {"supplierId": "26", "supplierName": "Burc Gunes", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 33.05, "details": [{"name": "Bills", "amount": 33.05}]}]}]}, {"supplierId": "27", "supplierName": "Cass Hayden", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1450, "details": [{"name": "Bills", "amount": 1500}, {"name": "BillPayments", "amount": -50}]}]}]}, {"supplierId": "51", "supplierName": "City Water Co", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7.25, "details": [{"name": "Bills", "amount": 24}, {"name": "BillPayments", "amount": -16.75}]}]}]}, {"supplierId": "297", "supplierName": "Codat Supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -128, "details": [{"name": "Bills", "amount": 0}, {"name": "BillPayments", "amount": -25}, {"name": "BillCreditNotes", "amount": -103}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -328.32, "details": [{"name": "Bills", "amount": 0}, {"name": "BillPayments", "amount": -328.32}]}]}]}, {"supplierId": "87", "supplierName": "Costco", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -17.85, "details": [{"name": "BillPayments", "amount": -17.85}]}]}]}, {"supplierId": "57", "supplierName": "Hall's Promo Items", "agedCurrencyOutstanding": [{"currency": "HKD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1041.09, "details": [{"name": "Bills", "amount": 1041.09}]}]}]}, {"supplierId": "92", "supplierName": "Huw Thomas", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 25292, "details": [{"name": "Bills", "amount": 25302}, {"name": "BillPayments", "amount": -10}]}]}]}, {"supplierId": "85", "supplierName": "Jay's Farm", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -446.83, "details": [{"name": "BillCreditNotes", "amount": -446.83}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 9759.68, "details": [{"name": "Bills", "amount": 9822.46}, {"name": "BillPayments", "amount": -62.78}]}]}]}, {"supplierId": "34", "supplierName": "Jennifer Hargreaves", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 239.01, "details": [{"name": "Bills", "amount": 239.01}]}]}]}, {"supplierId": "37", "supplierName": "Kristina Gibson", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1710, "details": [{"name": "BillCreditNotes", "amount": -1710}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 502.38, "details": [{"name": "Bills", "amount": 502.38}]}]}]}, {"supplierId": "41", "supplierName": "Mark Howard", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 3000, "details": [{"name": "Bills", "amount": 3000}]}]}]}, {"supplierId": "23", "supplierName": "Mr Andrew Thomas Haberbosch", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -21.2, "details": [{"name": "BillCreditNotes", "amount": -21.2}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 54.09, "details": [{"name": "Bills", "amount": 54.09}]}]}]}, {"supplierId": "54", "supplierName": "Organization of Outstanding Event Planners", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 390, "details": [{"name": "Bills", "amount": 390}]}]}]}, {"supplierId": "47", "supplierName": "Sanjeev Kak", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 21, "details": [{"name": "Bills", "amount": 21}]}]}]}, {"supplierId": "74", "supplierName": "TestPushCustomer3", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 200, "details": [{"name": "Bills", "amount": 200}]}]}]}, {"supplierId": "86", "supplierName": "Vegan Farm", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -42.76, "details": [{"name": "BillCreditNotes", "amount": -42.76}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1249.3, "details": [{"name": "BillPayments", "amount": -504.24}, {"name": "Bills", "amount": 1753.54}]}]}]}, {"supplierId": "58", "supplierName": "Venue Rental", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 461, "details": [{"name": "Bills", "amount": 500}, {"name": "BillPayments", "amount": -39}]}]}]}]} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.7939148Z", "reportDate": "2023-05-02T16:05:20.7474542Z", "data": [{"supplierId": "CON002", "supplierName": "Concept Stationery Sub A", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 411.76, "details": [{"name": "Bills", "amount": 782.56}, {"name": "BillPayments", "amount": -370.8}]}]}]}, {"supplierId": "CON001", "supplierName": "Concept Stationery Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -167.1, "details": [{"name": "BillCreditNotes", "amount": -167.1}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5062.78, "details": [{"name": "Bills", "amount": 5111.01}, {"name": "BillPayments", "amount": -48.23}]}]}]}, {"supplierId": "MCN001", "supplierName": "McNally Computer Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 25802.03, "details": [{"name": "Bills", "amount": 25934.03}, {"name": "BillPayments", "amount": -132}]}]}]}, {"supplierId": "MEA001", "supplierName": "Mears Insurance", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -48, "details": [{"name": "BillCreditNotes", "amount": -48}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1368.02, "details": [{"name": "Bills", "amount": 1524}, {"name": "BillPayments", "amount": -155.98}]}]}]}, {"supplierId": "NEW001", "supplierName": "Newtown Builders Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -13.21, "details": [{"name": "BillCreditNotes", "amount": -13.21}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1024.13, "details": [{"name": "Bills", "amount": 1041.61}, {"name": "BillPayments", "amount": -17.48}]}]}]}, {"supplierId": "QUA001", "supplierName": "Quality Motors", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -105.64, "details": [{"name": "BillCreditNotes", "amount": -105.64}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 155.92, "details": [{"name": "Bills", "amount": 155.92}]}]}]}, {"supplierId": "RSP002", "supplierName": "Richard Sanderson-Pope", "agedCurrencyOutstanding": [{"currency": "JPY", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 60000, "details": [{"name": "Bills", "amount": 60000}]}]}]}, {"supplierId": "SDE001", "supplierName": "S D Enterprises", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1130.29, "details": [{"name": "Bills", "amount": 1189.29}, {"name": "BillPayments", "amount": -59}]}]}]}, {"supplierId": "STU001", "supplierName": "Studio Designs", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 562.06, "details": [{"name": "Bills", "amount": 562.06}]}]}]}, {"supplierId": "SUP002", "supplierName": "Superclean", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 2055.3, "details": [{"name": "Bills", "amount": 2055.3}]}]}]}, {"supplierId": "SUP001", "supplierName": "Superior Technologies Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 9433.71, "details": [{"name": "Bills", "amount": 9433.71}]}]}]}, {"supplierId": "THO001", "supplierName": "Thompsons Electricals", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -135.13, "details": [{"name": "BillCreditNotes", "amount": -135.13}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 576.04, "details": [{"name": "Bills", "amount": 1091.04}, {"name": "BillPayments", "amount": -515}]}]}]}, {"supplierId": "UNI001", "supplierName": "Unique Systems", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -103.4, "details": [{"name": "BillCreditNotes", "amount": -103.4}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1104.16, "details": [{"name": "Bills", "amount": 1104.16}]}]}]}, {"supplierId": "WAL001", "supplierName": "Wallace Office Equipment", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -70.76, "details": [{"name": "BillCreditNotes", "amount": -70.76}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -55.52, "details": [{"name": "Bills", "amount": 94.48}, {"name": "BillPayments", "amount": -150}]}]}]}, {"supplierId": "WIS001", "supplierName": "Wise Electricals Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -35.01, "details": [{"name": "BillCreditNotes", "amount": -35.01}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -221.75, "details": [{"name": "Bills", "amount": -121.75}, {"name": "BillPayments", "amount": -100}]}]}]}, {"supplierId": "WIS002", "supplierName": "Wiseman Paper Products", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5868.13, "details": [{"name": "Bills", "amount": 5868.13}]}]}]}]} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.0257207Z", "reportDate": "2023-05-02T16:05:19.9751677Z", "data": [{"supplierId": "CON001", "supplierName": "Concept Stationery Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1644.39, "details": [{"name": "Bills", "amount": 1644.39}]}]}]}, {"supplierId": "MCN001", "supplierName": "McNally Computer Supplies", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 24734.12, "details": [{"name": "Bills", "amount": 24734.12}]}]}]}, {"supplierId": "NEW001", "supplierName": "Newtown Builders Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -0.01, "details": [{"name": "BillCreditNotes", "amount": -0.01}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0.01, "details": [{"name": "Bills", "amount": 0.01}]}]}]}, {"supplierId": "QUA001", "supplierName": "Quality Motors", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -42.63, "details": [{"name": "BillCreditNotes", "amount": -42.63}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 72.85, "details": [{"name": "Bills", "amount": 72.85}]}]}]}, {"supplierId": "SDE001", "supplierName": "S D Enterprises", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 352.5, "details": [{"name": "Bills", "amount": 352.5}]}]}]}, {"supplierId": "SUP002", "supplierName": "Superclean", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1762.5, "details": [{"name": "Bills", "amount": 1762.5}]}]}]}, {"supplierId": "SUP001", "supplierName": "Superior Technologies Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 9164.95, "details": [{"name": "Bills", "amount": 9164.95}]}]}]}, {"supplierId": "THO001", "supplierName": "Thompsons Electricals", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -135.13, "details": [{"name": "BillCreditNotes", "amount": -135.13}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 472.24, "details": [{"name": "Bills", "amount": 972.24}, {"name": "BillPayments", "amount": -500}]}]}]}, {"supplierId": "UNI001", "supplierName": "Unique Systems", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -103.4, "details": [{"name": "BillCreditNotes", "amount": -103.4}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 744.16, "details": [{"name": "Bills", "amount": 744.16}]}]}]}, {"supplierId": "WAL001", "supplierName": "Wallace Office Equipment", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -58.76, "details": [{"name": "BillCreditNotes", "amount": -58.76}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -55.52, "details": [{"name": "Bills", "amount": 94.48}, {"name": "BillPayments", "amount": -150}]}]}]}, {"supplierId": "WIS001", "supplierName": "Wise Electricals Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -35.01, "details": [{"name": "BillCreditNotes", "amount": -35.01}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 117.29, "details": [{"name": "Bills", "amount": 117.29}]}]}]}, {"supplierId": "WIS002", "supplierName": "Wiseman Paper Products", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 5868.13, "details": [{"name": "Bills", "amount": 5868.13}]}]}]}]} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:21.3095542Z", "reportDate": "2023-05-02T16:05:21.1514485Z", "data": [{"supplierId": "65179671e9ef424caff8b9006cd111c8", "supplierName": "5555 Abdul's Test Name", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -60, "details": [{"name": "BillCreditNotes", "amount": -60}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1548.84, "details": [{"name": "Bills", "amount": 1608.84}, {"name": "BillPayments", "amount": -60}]}]}]}, {"supplierId": "cf7f44d693904944a6a7cf3de0887964", "supplierName": "Abdi Supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -841570.32, "details": [{"name": "BillCreditNotes", "amount": -841570.32}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 661901.14, "details": [{"name": "Bills", "amount": 662062.14}, {"name": "BillPayments", "amount": -161}]}]}]}, {"supplierId": "f82f0f59fbf44416b833562783388ee9", "supplierName": "Abe's Spider Hunting Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -38.8, "details": [{"name": "Bills", "amount": 1.2}, {"name": "BillPayments", "amount": -40}]}]}]}, {"supplierId": "ec716559789111e8aaa5027d54329956", "supplierName": "Bagels Limited", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -140.97, "details": [{"name": "BillCreditNotes", "amount": -140.97}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1856307.16, "details": [{"name": "BillPayments", "amount": -213}, {"name": "Bills", "amount": 1856520.16}]}]}]}, {"supplierId": "b1354c4ae5db4d069acbcf49bee62215", "supplierName": "Boyer Inc", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 360000, "details": [{"name": "Bills", "amount": 360000}]}]}]}, {"supplierId": "46b3d6acedcb4738a9646dc512562cda", "supplierName": "callum", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1.2, "details": [{"name": "Bills", "amount": 1.2}]}]}]}, {"supplierId": "7e7450fadbb94d09abdaf609a51d05eb", "supplierName": "Debs UK Supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -36, "details": [{"name": "BillCreditNotes", "amount": -36}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1814652, "details": [{"name": "Bills", "amount": 1814652}]}]}]}, {"supplierId": "bf6fc20701264c899a1ba96365aa9d70", "supplierName": "Eliana's", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -105.6, "details": [{"name": "BillCreditNotes", "amount": -105.6}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 26.4, "details": [{"name": "Bills", "amount": 26.4}]}]}]}, {"supplierId": "30862a4b2c084a4fa2e640f9ef371e4c", "supplierName": "Flour Inc", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 60, "details": [{"name": "Bills", "amount": 60}]}]}]}, {"supplierId": "390ca10633cb4bf989961491e834b47a", "supplierName": "Jo Cheese", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 9, "details": [{"name": "Bills", "amount": 9}]}]}]}, {"supplierId": "b10be78d0e9340a79743c538a0b481d0", "supplierName": "M7 Smith", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 65150090, "details": [{"name": "Bills", "amount": 65150090}]}]}]}, {"supplierId": "693d3b961e744b02a6a260f4bada75b0", "supplierName": "Matt Ager Test EU Supplier", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -6841.33, "details": [{"name": "BillCreditNotes", "amount": -6841.33}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 6841.33, "details": [{"name": "Bills", "amount": 6841.33}]}]}]}, {"supplierId": "1edf56c368e14a35a050b3e8336e2272", "supplierName": "Mike B Commerce Test", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 300, "details": [{"name": "Bills", "amount": 300}]}]}]}, {"supplierId": "c6d3fa5bf2634b148d0ee82b6fbb8fe3", "supplierName": "my shop supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -120, "details": [{"name": "BillCreditNotes", "amount": -120}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "cdeae2fcbe6447f698d2a59d68e4ad82", "supplierName": "Nic Supp", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -36, "details": [{"name": "BillCreditNotes", "amount": -36}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 0, "details": []}]}]}, {"supplierId": "2e14c8cfee3041a4a5e8a619b336f900", "supplierName": "Nic Supplies Ltd", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 30, "details": [{"name": "Bills", "amount": 30}]}]}]}, {"supplierId": "c41981674176495f927f46ce663d46ac", "supplierName": "Ninetta Ponting", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -306, "details": [{"name": "BillPayments", "amount": -306}]}]}]}, {"supplierId": "e2dd680fed99410982673f8fc2722357", "supplierName": "Supplier 70", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -70, "details": [{"name": "BillPayments", "amount": -70}]}]}]}, {"supplierId": "8d61f7cd3a2f4ceea26ac5bca15e10da", "supplierName": "Supplier 71 (AUD)", "agedCurrencyOutstanding": [{"currency": "AUD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": -701, "details": [{"name": "BillPayments", "amount": -701}]}]}]}, {"supplierId": "7a67caeb261f40259f0948785090af0b", "supplierName": "supplier test", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 12014.4, "details": [{"name": "Bills", "amount": 12014.4}]}]}]}, {"supplierId": "d884f637bb3a4e589d640085b31ad6ee", "supplierName": "Tasty Treats Icecreams", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -454, "details": [{"name": "BillCreditNotes", "amount": -454}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 456, "details": [{"name": "Bills", "amount": 456}]}]}]}, {"supplierId": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -1152.78, "details": [{"name": "BillCreditNotes", "amount": -1152.78}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 14960.37, "details": [{"name": "Bills", "amount": 15064.41}, {"name": "BillPayments", "amount": -104.04}]}]}]}, {"supplierId": "2541e491791c485a96cc480cfde112d6", "supplierName": "Test Supplier 2", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -50, "details": [{"name": "BillCreditNotes", "amount": -50}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 63338524.47, "details": [{"name": "Bills", "amount": 63338524.47}]}]}]}, {"supplierId": "877aac191c3c40eda61115eea12641f7", "supplierName": "Test Supplier 3", "agedCurrencyOutstanding": [{"currency": "EUR", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": -3535.61, "details": [{"name": "BillCreditNotes", "amount": -3535.61}]}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 50658.58, "details": [{"name": "Bills", "amount": 50658.58}]}]}]}, {"supplierId": "d98e7afb4ca846dfbb12ca285f95f863", "supplierName": "Test Supplier 4 (US)", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 51872949, "details": [{"name": "Bills", "amount": 51872949}]}]}]}]} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:22.9252709Z", "reportDate": "2023-05-02T16:05:22.8758390Z", "data": [{"supplierId": "3", "supplierName": "ADP", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 487.5, "details": [{"name": "Bills", "amount": 487.5}]}]}]}, {"supplierId": "14", "supplierName": "Kristofferson Consulting", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 7200, "details": [{"name": "Bills", "amount": 7200}]}]}]}, {"supplierId": "7", "supplierName": "Lenovo", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 190, "details": [{"name": "Bills", "amount": 190}]}]}]}, {"supplierId": "8", "supplierName": "Worldwide Commercial", "agedCurrencyOutstanding": [{"currency": "USD", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 10, "details": [{"name": "Bills", "amount": 10}]}]}]}]} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "200": - application/json: {"generated": "2023-05-02T16:05:20.3006654Z", "reportDate": "2023-05-02T16:05:20.2587933Z", "data": [{"supplierId": "699f0091-b127-4796-9f15-41a2f42abeb2", "supplierName": "ABC Furniture", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1200, "details": [{"name": "Bills", "amount": 1200}]}]}]}, {"supplierId": "362819c9-f285-4d09-ac95-26327863adac", "supplierName": "Bayside Club", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 130, "details": [{"name": "Bills", "amount": 130}]}]}]}, {"supplierId": "2dc0ef7c-582f-4542-963b-dbdc069e4819", "supplierName": "Bayside Wholesale", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 961.21, "details": [{"name": "Bills", "amount": 961.21}]}]}]}, {"supplierId": "51cbbfb0-8dc9-41aa-aad6-eb93b3cc40c6", "supplierName": "Capital Cab Co", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 242, "details": [{"name": "Bills", "amount": 242}]}]}]}, {"supplierId": "3828f379-afa5-4b2a-9000-9c53d75ba1c6", "supplierName": "Central Copiers", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 1063.56, "details": [{"name": "Bills", "amount": 1063.56}]}]}]}, {"supplierId": "8a593982-291c-4ec3-9a42-3dbccbc6e3c8", "supplierName": "MCO Cleaning Services", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 119.08, "details": [{"name": "Bills", "amount": 119.08}]}]}]}, {"supplierId": "97cc88ca-f89b-41f0-b8b9-e750b6f2f1d9", "supplierName": "Net Connect", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 54.13, "details": [{"name": "Bills", "amount": 54.13}]}]}]}, {"supplierId": "dec56ceb-65e9-43b3-ac98-7fe09eb37e31", "supplierName": "PowerDirect", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 244.45, "details": [{"name": "Bills", "amount": 244.45}]}]}]}, {"supplierId": "f5a77e82-50e3-4340-a6e0-13d6a482a08a", "supplierName": "SMART Agency", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 4500, "details": [{"name": "Bills", "amount": 4500}]}]}]}, {"supplierId": "3a0d40a2-2698-4cf5-b7b2-30133c632ab6", "supplierName": "Swanston Security", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 93.64, "details": [{"name": "Bills", "amount": 93.64}]}]}]}, {"supplierId": "ac48c67d-3eea-44eb-96b1-9f7a89d9b761", "supplierName": "Xero", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 56.35, "details": [{"name": "Bills", "amount": 56.35}]}]}]}, {"supplierId": "94a82e91-53da-4f87-a417-63d6a1607ced", "supplierName": "Young Bros Transport", "agedCurrencyOutstanding": [{"currency": "GBP", "agedOutstandingAmounts": [{"fromDate": "2023-04-02T00:00:00.0000000", "toDate": "2023-05-02T00:00:00.0000000", "amount": 0, "details": []}, {"fromDate": "0001-01-01T00:00:00.0000000", "toDate": "2023-04-02T00:00:00.0000000", "amount": 125.03, "details": [{"name": "Bills", "amount": 125.03}]}]}]}]} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportDate: "2022-12-31" - numberOfPeriods: 12 - periodLengthDays: 30 - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - generate-loan-transactions: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - sourceType: "commerce" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-generate-loan-transactions: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - sourceType: "accounting" - responses: - "400": - application/json: {} - "500": - application/json: {} - list-loan-transactions: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - sourceType: "commerce" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-list-loan-transactions: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - sourceType: "accounting" - responses: - "200": - application/json: {"reportInfo": {"pageNumber": 1, "pageSize": 1000, "totalResults": 1, "reportName": "AccountingLoanTransactions", "companyName": "Supermarket store", "generatedDate": "2022-10-23T00:00:00Z"}, "reportItems": [{"loanRef": {"id": "332", "dataConnectionId": "ecd2d6be-5194-40a1-838f-5577a4881aaa", "type": "chartOfAccount"}, "itemRef": {"id": "755488", "dataConnectionId": "ecd2d6be-5194-40a1-838f-5577a4881aaa", "type": "journalEntry"}, "date": "2020-08-02", "amount": -455, "lender": "Barclays Bank"}]} - "400": - application/json: {} - "500": - application/json: {} - generate-loan-summary: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - sourceType: "accounting" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-generate-loan-summary: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - sourceType: "commerce" - responses: - "401": - application/json: {} - "500": - application/json: {} - get-loan-summary: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - sourceType: "accounting" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-loan-summary: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - sourceType: "accounting" - responses: - "200": - application/json: {"reportInfo": {"reportName": "LoanSummaryReport", "companyName": "The Coffee shop", "generatedDate": "2022-10-23T00:00:00Z"}, "reportItems": [{"recordRef": {"id": "string", "dataConnectionId": "DE34E8E3-089F-4DF4-89E9-F7C43618FCAAA", "integrationType": "Accounting", "recordRefType": "accounts"}, "description": "string", "startDate": "2021-01-01", "totalRepayments": 83481.72, "balance": 42513.18, "lender": "Barclays Bank"}]} - "401": - application/json: {} - "500": - application/json: {} - get-commerce-revenue-metrics: - speakeasy-default-get-commerce-revenue-metrics: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 44877 - numberOfPeriods: 459595 - periodUnit: "Year" - responses: - "200": - application/json: {} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 754126 - numberOfPeriods: 963062 - periodUnit: "Day" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-customer-retention-metrics: - speakeasy-default-get-commerce-customer-retention-metrics: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 555812 - numberOfPeriods: 292320 - periodUnit: "Day" - responses: - "200": - application/json: {} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 663889 - numberOfPeriods: 947330 - periodUnit: "Day" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-lifetime-value-metrics: - speakeasy-default-get-commerce-lifetime-value-metrics: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 402759 - numberOfPeriods: 976344 - periodUnit: "Day" - responses: - "200": - application/json: {} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 668002 - numberOfPeriods: 386506 - periodUnit: "Year" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-orders-report: - speakeasy-default-get-commerce-orders-report: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 176756 - numberOfPeriods: 64425 - periodUnit: "Day" - responses: - "200": - application/json: {} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 590459 - numberOfPeriods: 282843 - periodUnit: "Day" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-refunds-report: - speakeasy-default-get-commerce-refunds-report: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 931992 - numberOfPeriods: 555513 - periodUnit: "Year" - responses: - "200": - application/json: {} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - reportDate: "29-09-2020" - periodLength: 589461 - numberOfPeriods: 436285 - periodUnit: "Week" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-customers: - speakeasy-default-list-commerce-customers: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-11T10:33:49Z", "sourceModifiedDate": "2022-06-15T15:54:15Z", "id": "1", "customerName": "Amy Jones", "emailAddress": "a.jackson@email.me", "phone": "07770 666777", "defaultCurrency": "XXX", "addresses": [{"type": "Unknown", "line1": "My Billing Address ./*drop table", "city": "Portsmouth", "region": "", "country": "United Kingdom", "postalCode": "PS13HJ"}, {"type": "Unknown", "line1": "This is my address, I cant hit enter.", "city": "Portsmouth", "region": "", "country": "United Kingdom", "postalCode": "PS13HJ"}], "createdDate": "2022-06-15T15:54:15Z"}, {"modifiedDate": "2023-04-17T15:42:55Z", "sourceModifiedDate": "2023-04-11T15:49:25Z", "id": "2", "customerName": "Cust001 Cust001", "emailAddress": "Cust001@example.com", "phone": "05442 203941", "defaultCurrency": "XXX", "addresses": [], "createdDate": "2023-04-11T15:49:25Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 201, "_links": {"self": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-customers"}, "current": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-customers?page=1&pageSize=2"}, "next": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-customers?page=2&pageSize=2"}}} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-09T11:01:03Z", "sourceModifiedDate": "0001-01-01T00:00:00", "id": "2CBJ8R898ZJAR", "customerName": "", "addresses": [], "createdDate": "2021-09-22T13:10:12Z"}, {"modifiedDate": "2023-01-09T11:01:03Z", "sourceModifiedDate": "0001-01-01T00:00:00", "id": "511JV0FRN2QYC", "customerName": "", "addresses": [], "createdDate": "2021-09-21T14:54:38Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 9, "_links": {"self": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-customers"}, "current": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-customers?page=1&pageSize=2"}, "next": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-customers?page=2&pageSize=2"}}} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-03-17T15:47:28Z", "id": "cst_NUkBHQmekz", "customerName": "Frod Baggins", "emailAddress": "frodo.baggings@theshire.com", "addresses": [], "createdDate": "2022-01-18T11:41:54"}, {"modifiedDate": "2022-03-17T15:47:28Z", "id": "cst_BvBxwuwfvH", "customerName": "Frodo Baggins", "emailAddress": "frodo.baggings@theshire.com", "addresses": [], "createdDate": "2022-01-18T11:42:05"}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-customers"}, "current": {"href": "/companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-customers?page=1&pageSize=2"}, "next": {"href": "/companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-customers?page=2&pageSize=2"}}} - Mollie Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-08-17T11:33:19Z", "id": "cst_NUkBHQmekz", "customerName": "Frod Baggins", "emailAddress": "frodo.baggings@theshire.com", "addresses": [], "createdDate": "2022-01-18T11:41:54"}, {"modifiedDate": "2022-08-17T11:33:19Z", "id": "cst_BvBxwuwfvH", "customerName": "Frodo Baggins", "emailAddress": "frodo.baggings@theshire.com", "addresses": [], "createdDate": "2022-01-18T11:42:05"}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-customers"}, "current": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-customers?page=1&pageSize=2"}, "next": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-customers?page=2&pageSize=2"}}} - PrestaShop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-01-26T15:09:42Z", "sourceModifiedDate": "2021-09-02T07:54:26", "id": "2", "customerName": "Bob Smith", "emailAddress": "bob.smith@example.com", "addresses": [{"type": "Unknown", "line1": "1 test street", "city": "City Test", "region": "Virginia", "country": "US", "postalCode": "55678"}], "createdDate": "2021-09-02T07:54:26"}, {"modifiedDate": "2022-01-26T15:09:42Z", "sourceModifiedDate": "2021-09-03T01:55:13", "id": "3", "customerName": "Fake Name", "emailAddress": "bob@bob.com", "addresses": [], "createdDate": "2021-09-03T01:55:13"}], "pageNumber": 1, "pageSize": 2, "totalResults": 5, "_links": {"self": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-customers"}, "current": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-customers?page=1&pageSize=2"}, "next": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-customers?page=2&pageSize=2"}}} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-02-10T15:18:25Z", "sourceModifiedDate": "2021-11-18T15:24:03", "id": "5839032287390", "customerName": "AL A", "emailAddress": "a.macra@codat.io", "addresses": [{"type": "Unknown", "line1": "301 Ink Rooms, 28 Easton St, Farringdon", "line2": "28 Easton St, Farringdon", "city": "London", "region": "England", "country": "United Kingdom", "postalCode": "WC1X 0BE"}], "createdDate": "2021-11-18T15:24:03"}, {"modifiedDate": "2023-02-10T15:18:25Z", "sourceModifiedDate": "2022-08-01T13:07:59", "id": "5097398534302", "customerName": "Qa Test", "phone": "+445593368390", "addresses": [{"type": "Unknown", "line1": "Look Street", "city": "London", "postalCode": "PO16 7GZ"}, {"type": "Unknown", "line1": "Look Street", "city": "London", "region": "England", "country": "United Kingdom", "postalCode": "PO16 7GZ"}], "note": "", "createdDate": "2021-03-19T10:12:37"}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-customers"}, "current": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-customers?page=1&pageSize=2"}, "next": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-customers?page=2&pageSize=2"}}} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-08-02T10:27:32Z", "sourceModifiedDate": "2021-03-08T11:21:11Z", "id": "FT9948H3VD6GF8MPDD5438KY1M", "emailAddress": "fake@name.com", "phone": "+441234567890", "addresses": [{"type": "Unknown", "line1": "1 Main Street", "line2": "Flat 20", "city": "London", "region": "London", "postalCode": "W1A 1AA"}], "createdDate": "2021-03-08T11:21:11Z"}, {"modifiedDate": "2022-08-02T10:27:32Z", "sourceModifiedDate": "2020-11-19T14:56:00Z", "id": "GXQDPSZSMN6C58270SZN4YJZ8R", "emailAddress": "s.shandil+square@codat.io", "phone": "+447729946295", "addresses": [], "createdDate": "2020-11-19T14:56:00Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-customers"}, "current": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-customers?page=1&pageSize=2"}}} - Stripe Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T11:18:27Z", "id": "cus_LXdjls7KY5ZHaz", "customerName": "Barry Smith", "emailAddress": "barry@example.com", "defaultCurrency": "gbp", "addresses": [], "note": "Test Subscription", "createdDate": "2022-04-20T07:59:52Z"}, {"modifiedDate": "2022-09-30T11:18:27Z", "id": "cus_LXdFFgHqqVURIv", "customerName": "David Dunlow", "emailAddress": "david@example.com", "phone": "+447545309714", "defaultCurrency": "gbp", "addresses": [{"type": "Billing", "line1": "301 Ink Rooms", "line2": "28 Easton Street", "city": "London", "country": "GB", "postalCode": "WC1X 0BE"}, {"type": "Delivery", "line1": "301 Ink Rooms", "line2": "28 Easton Street", "city": "London", "country": "GB", "postalCode": "WC1X 0BE"}], "note": "Test Subscriptions", "createdDate": "2022-04-20T07:30:01Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 14, "_links": {"self": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-customers"}, "current": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-customers?page=1&pageSize=2"}, "next": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-customers?page=2&pageSize=2"}}} - WooCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2021-07-13T16:19:00Z", "sourceModifiedDate": "2021-03-11T09:07:00", "id": "201694267", "customerName": "Qa Test", "emailAddress": "a.macra@codat.io", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "", "postalCode": ""}], "createdDate": "2021-03-11T09:04:27"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-customers"}, "current": {"href": "/companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-customers?page=1&pageSize=2"}}} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2021-01-27T13:08:51Z", "sourceModifiedDate": "2021-01-08T09:57:56", "id": "firstname.lastname@example.com", "customerName": "Firstname Lastname", "emailAddress": "firstname.lastname@example.com", "addresses": [{"type": "Unknown", "line1": "Line1", "city": "City", "country": "GB", "postalCode": "TT1 1TT"}], "createdDate": "2021-01-07T16:17:34"}, {"modifiedDate": "2021-01-27T13:08:51Z", "sourceModifiedDate": "2020-12-21T14:52:15", "id": "joe@bloggs.com", "customerName": "Joe Bloggs", "emailAddress": "joe@bloggs.com", "phone": "02012 345678", "addresses": [{"type": "Unknown", "line1": "Flat 1", "line2": "1 High Street", "city": "London", "region": "London", "country": "GB"}, {"type": "Unknown", "line1": "Flat 2", "line2": "2 High Street", "city": "London", "region": "London", "country": "GB"}], "createdDate": "2020-12-21T14:52:15"}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/fe8e3158-47e6-4367-9537-7d5001295500/connections/d60b15e7-7db9-459b-92a0-9557f7ebdeea/data/commerce-customers"}, "current": {"href": "/companies/fe8e3158-47e6-4367-9537-7d5001295500/connections/d60b15e7-7db9-459b-92a0-9557f7ebdeea/data/commerce-customers?page=1&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-customer: - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-11T10:33:49Z", "sourceModifiedDate": "2022-06-15T15:54:15Z", "id": "1", "customerName": "Amy Jones", "emailAddress": "a.durbanjackson+amy@codat.io", "phone": "07770666777", "defaultCurrency": "XXX", "addresses": [{"type": "Unknown", "line1": "My Billing Address ./*drop table", "city": "Portsmouth", "region": "", "country": "United Kingdom", "postalCode": "PS13HJ"}, {"type": "Unknown", "line1": "This is my address, I cant hit enter.", "city": "Portsmouth", "region": "", "country": "United Kingdom", "postalCode": "PS13HJ"}], "createdDate": "2022-06-15T15:54:15Z"} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-09T11:01:03Z", "sourceModifiedDate": "0001-01-01T00:00:00", "id": "2CBJ8R898ZJAR", "customerName": "", "addresses": [], "createdDate": "2021-09-22T13:10:12Z"} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-03-17T15:47:28Z", "id": "cst_NUkBHQmekz", "customerName": "Frod Baggins", "emailAddress": "frodo.baggings@theshire.com", "addresses": [], "createdDate": "2022-01-18T11:41:54"} - Mollie Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-08-17T11:33:19Z", "id": "cst_NUkBHQmekz", "customerName": "Frod Baggins", "emailAddress": "frodo.baggings@theshire.com", "addresses": [], "createdDate": "2022-01-18T11:41:54"} - PrestaShop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-01-26T15:09:42Z", "sourceModifiedDate": "2021-09-02T07:54:26", "id": "2", "customerName": "Bob Smith", "emailAddress": "bob.smith@example.com", "addresses": [{"type": "Unknown", "line1": "1 test street", "city": "City Test", "region": "Virginia", "country": "US", "postalCode": "55678"}], "createdDate": "2021-09-02T07:54:26"} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-02-10T15:18:25Z", "sourceModifiedDate": "2021-11-18T15:24:03", "id": "5839032287390", "customerName": "AL A", "emailAddress": "a.macra@codat.io", "addresses": [{"type": "Unknown", "line1": "301 Ink Rooms, 28 Easton St, Farringdon", "line2": "28 Easton St, Farringdon", "city": "London", "region": "England", "country": "United Kingdom", "postalCode": "WC1X 0BE"}], "createdDate": "2021-11-18T15:24:03"} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-08-02T10:27:32Z", "sourceModifiedDate": "2021-03-08T11:21:11Z", "id": "FT9948H3VD6GF8MPDD5438KY1M", "emailAddress": "fake@name.com", "phone": "+441234567890", "addresses": [{"type": "Unknown", "line1": "1 Main Street", "line2": "Flat 20", "city": "London", "region": "London", "postalCode": "W1A 1AA"}], "createdDate": "2021-03-08T11:21:11Z"} - Stripe Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T11:18:27Z", "id": "cus_LXdjls7KY5ZHaz", "customerName": "Barry Smith", "emailAddress": "barry@example.com", "defaultCurrency": "gbp", "addresses": [], "note": "Test Subscription", "createdDate": "2022-04-20T07:59:52Z"} - WooCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2021-07-13T16:19:00Z", "sourceModifiedDate": "2021-03-11T09:07:00", "id": "201694267", "customerName": "Qa Test", "emailAddress": "a.macra@codat.io", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "", "postalCode": ""}], "createdDate": "2021-03-11T09:04:27"} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2021-01-27T13:08:51Z", "sourceModifiedDate": "2021-01-08T09:57:56", "id": "firstname.lastname@example.com", "customerName": "Firstname Lastname", "emailAddress": "firstname.lastname@example.com", "addresses": [{"type": "Unknown", "line1": "Line1", "city": "City", "country": "GB", "postalCode": "TT1 1TT"}], "createdDate": "2021-01-07T16:17:34"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-disputes: - speakeasy-default-list-commerce-disputes: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-02-10T15:18:22Z", "sourceModifiedDate": "2021-03-28T11:00:17", "id": "8502411422", "disputedTransactions": [{"id": "3684116791454", "type": "Order"}], "totalAmount": 175, "currency": "GBP", "status": "Processing", "reason": "fraudulent", "dueDate": "2021-03-28T00:00:00", "createdDate": "2021-03-19T13:16:27"}, {"modifiedDate": "2023-02-10T15:18:22Z", "sourceModifiedDate": "2021-03-28T11:00:18", "id": "8502444190", "disputedTransactions": [{"id": "3684119445662", "type": "Order"}], "totalAmount": 600, "currency": "GBP", "status": "Processing", "reason": "fraudulent", "dueDate": "2021-03-28T00:00:00", "createdDate": "2021-03-19T13:18:31"}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-disputes"}, "current": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-disputes?page=1&pageSize=2"}}} - Stripe Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T11:18:27Z", "id": "dp_1Hqhl8A8m8S1Gh7OJrvF3gsK", "disputedTransactions": [{"id": "txn_1Hqhl8A8m8S1Gh7OtmAPNr9e", "type": "Payment"}], "totalAmount": 25, "currency": "GBP", "status": "Processing", "reason": "fraudulent", "dueDate": "2020-12-02T23:59:59Z", "createdDate": "2020-11-23T16:19:22Z"}, {"modifiedDate": "2022-09-30T11:18:27Z", "id": "dp_1HqiwVA8m8S1Gh7OpS3ozlcd", "disputedTransactions": [{"id": "txn_1HqiwVA8m8S1Gh7O0IVelTQ5", "type": "Payment"}], "totalAmount": 55, "currency": "GBP", "status": "Lost", "reason": "product_not_received", "dueDate": "2020-12-02T23:59:59Z", "createdDate": "2020-11-23T17:35:11Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 5, "_links": {"self": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-disputes"}, "current": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-disputes?page=1&pageSize=2"}, "next": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-disputes?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-dispute: - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-02-10T15:18:22Z", "sourceModifiedDate": "2021-03-28T11:00:17", "id": "8502411422", "disputedTransactions": [{"id": "3684116791454", "type": "Order"}], "totalAmount": 175, "currency": "GBP", "status": "Processing", "reason": "fraudulent", "dueDate": "2021-03-28T00:00:00", "createdDate": "2021-03-19T13:16:27"} - Stripe Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T11:18:27Z", "id": "dp_1Hqhl8A8m8S1Gh7OJrvF3gsK", "disputedTransactions": [{"id": "txn_1Hqhl8A8m8S1Gh7OtmAPNr9e", "type": "Payment"}], "totalAmount": 25, "currency": "GBP", "status": "Processing", "reason": "fraudulent", "dueDate": "2020-12-02T23:59:59Z", "createdDate": "2020-11-23T16:19:22Z"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-locations: - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-09T11:01:03Z", "id": "GA3WP1ZC3ZFK1", "name": "Codat", "address": {"type": "Inventory", "line1": "301 Ink Rooms, 28 Easton Street", "city": "London", "region": "London", "country": "GB", "postalCode": "WC1X 0BE"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-locations"}, "current": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-locations?page=1&pageSize=2"}}} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-02T09:48:48Z", "id": "647208621834538", "name": "QA Shared - New Test Site", "address": {"type": "Unknown", "country": "AU"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-locations"}, "current": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-locations?page=1&pageSize=2"}}} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-02-10T15:18:25Z", "sourceModifiedDate": "2021-03-19T10:06:06", "id": "61375348894", "name": "301 Ink Rooms, 28 Easton St", "address": {"type": "Inventory", "line1": "301 Ink Rooms, 28 Easton St", "city": "London", "region": "London", "country": "GB", "postalCode": "WC1X 0BE"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-locations"}, "current": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-locations?page=1&pageSize=2"}}} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-08-02T10:27:32Z", "sourceModifiedDate": "2020-01-17T14:07:30Z", "id": "D8DVHD1G6NT2J", "name": "Codat Limited", "address": {"type": "Inventory", "line1": "301 Ink Rooms", "line2": "28 Easton Street", "city": "London", "country": "GB", "postalCode": "WC1X0BE"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-locations"}, "current": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-locations?page=1&pageSize=2"}}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-location: - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-09T11:01:03Z", "id": "GA3WP1ZC3ZFK1", "name": "Codat", "address": {"type": "Inventory", "line1": "301 Ink Rooms, 28 Easton Street", "city": "London", "region": "London", "country": "GB", "postalCode": "WC1X 0BE"}} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-02T09:48:48Z", "id": "647208621834538", "name": "QA Shared - New Test Site", "address": {"type": "Unknown", "country": "AU"}} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-02-10T15:18:25Z", "sourceModifiedDate": "2021-03-19T10:06:06", "id": "61375348894", "name": "301 Ink Rooms, 28 Easton St", "address": {"type": "Inventory", "line1": "301 Ink Rooms, 28 Easton St", "city": "London", "region": "London", "country": "GB", "postalCode": "WC1X 0BE"}} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-08-02T10:27:32Z", "sourceModifiedDate": "2020-01-17T14:07:30Z", "id": "D8DVHD1G6NT2J", "name": "Codat Limited", "address": {"type": "Inventory", "line1": "301 Ink Rooms", "line2": "28 Easton Street", "city": "London", "country": "GB", "postalCode": "WC1X0BE"}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-orders: - speakeasy-default-list-commerce-orders: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Amazon Seller Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-09T09:12:12Z", "sourceModifiedDate": "1970-01-19T03:58:32Z", "id": "902-1845936-5435065", "orderNumber": "902-1845936-5435065", "country": "US ", "currency": "USD", "totalAmount": 10, "totalRefund": 0, "totalTaxAmount": 1.01, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "O05015851154158", "quantity": 1, "taxPercentage": 11.23, "totalAmount": 10, "totalTaxAmount": 1.01, "unitPrice": 8.99, "taxes": [], "productVariantRef": {"id": "NABetaASINB00551Q3CS"}, "discountAllocations": []}], "payments": [], "serviceCharges": [], "createdDate": "1970-01-19T03:58:30Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-orders"}, "current": {"href": "/companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-orders?page=1&pageSize=2"}}} - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-11T10:33:56Z", "sourceModifiedDate": "2022-06-15T15:48:18Z", "id": "100", "orderNumber": "100", "country": "GBR", "currency": "GBP", "totalAmount": 675, "totalRefund": 0, "totalTaxAmount": 112.5, "totalDiscount": 10, "totalGratuity": 0, "orderLineItems": [{"id": "1", "quantity": 1, "taxPercentage": 20, "totalAmount": 221.64, "totalTaxAmount": 36.94, "unitPrice": 187.5, "taxes": [], "productRef": {"id": "86", "name": "[Sample] Able Brewing System"}, "productVariantRef": {"id": "66", "name": "[Sample] Able Brewing System"}, "discountAllocations": [{"name": "Manual Discount", "totalAmount": 3.36}]}, {"id": "2", "quantity": 5, "taxPercentage": 19.9999, "totalAmount": 438.36, "totalTaxAmount": 73.06, "unitPrice": 74.1667, "taxes": [], "productRef": {"id": "81", "name": "[Sample] Orbit Terrarium - Small"}, "productVariantRef": {"id": "65", "name": "[Sample] Orbit Terrarium - Small"}, "discountAllocations": [{"name": "Manual Discount", "totalAmount": 6.64}]}], "payments": [], "serviceCharges": [{"description": "Shipping Charge", "totalAmount": 15, "taxPercentage": 20, "taxAmount": 2.5, "taxes": [], "quantity": 1, "type": "Shipping"}], "customerRef": {"id": "0"}, "createdDate": "2022-06-15T15:48:18Z"}, {"modifiedDate": "2023-04-11T10:33:56Z", "sourceModifiedDate": "2022-06-15T15:49:02Z", "id": "101", "orderNumber": "101", "country": "GBR", "currency": "GBP", "totalAmount": 675, "totalRefund": 0, "totalTaxAmount": 112.5, "totalDiscount": 10, "totalGratuity": 0, "orderLineItems": [{"id": "3", "quantity": 1, "taxPercentage": 20, "totalAmount": 221.64, "totalTaxAmount": 36.94, "unitPrice": 187.5, "taxes": [], "productRef": {"id": "86", "name": "[Sample] Able Brewing System"}, "productVariantRef": {"id": "66", "name": "[Sample] Able Brewing System"}, "discountAllocations": [{"name": "Manual Discount", "totalAmount": 3.36}]}, {"id": "4", "quantity": 5, "taxPercentage": 19.9999, "totalAmount": 438.36, "totalTaxAmount": 73.06, "unitPrice": 74.1667, "taxes": [], "productRef": {"id": "81", "name": "[Sample] Orbit Terrarium - Small"}, "productVariantRef": {"id": "65", "name": "[Sample] Orbit Terrarium - Small"}, "discountAllocations": [{"name": "Manual Discount", "totalAmount": 6.64}]}], "payments": [], "serviceCharges": [{"description": "Shipping Charge", "totalAmount": 15, "taxPercentage": 20, "taxAmount": 2.5, "taxes": [], "quantity": 1, "type": "Shipping"}], "customerRef": {"id": "0"}, "createdDate": "2022-06-15T15:49:02Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 14, "_links": {"self": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-orders"}, "current": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-orders?page=1&pageSize=2"}, "next": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-orders?page=2&pageSize=2"}}} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-08T15:47:43Z", "sourceModifiedDate": "2021-05-24T10:33:45Z", "id": "0BCZPWGFC3M16", "orderNumber": "0BCZPWGFC3M16", "country": "GB ", "currency": "GBP", "totalAmount": 1200, "totalRefund": 0, "totalTaxAmount": 200, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "985WY5J4H12XY", "quantity": 1, "taxPercentage": 20, "totalAmount": 1200, "totalTaxAmount": 200, "unitPrice": 1000, "taxes": [{"taxComponentRef": {"id": "KAWQTPZP3R9VT", "name": "VAT 20%"}}], "productRef": {"id": "NMZHKK6FKF6ZJ", "name": "Laptop"}, "discountAllocations": []}], "payments": [{"id": "S2D924NX13T2G"}], "serviceCharges": [], "locationRef": {"id": "GA3WP1ZC3ZFK1", "name": "Codat"}, "createdDate": "2021-05-24T10:33:41Z"}, {"modifiedDate": "2022-09-08T15:47:43Z", "sourceModifiedDate": "2021-05-24T11:24:52Z", "id": "0G22TXMYQQE54", "orderNumber": "0G22TXMYQQE54", "country": "GB ", "currency": "GBP", "totalAmount": 1340, "totalRefund": 0, "totalTaxAmount": 240, "totalDiscount": 100, "totalGratuity": 0, "orderLineItems": [{"id": "GZ73TPFAV6NTP", "quantity": 1, "taxPercentage": 20, "totalAmount": 1440, "totalTaxAmount": 240, "unitPrice": 1200, "taxes": [{"taxComponentRef": {"id": "KAWQTPZP3R9VT", "name": "VAT 20%"}}], "productRef": {"id": "QVAV6KM1457B0", "name": "Desktop"}, "discountAllocations": []}, {"id": "Discount: �10 off", "quantity": 1, "taxPercentage": 0, "totalAmount": -100, "totalTaxAmount": 0, "unitPrice": 0, "taxes": [], "discountAllocations": [{"name": "�10 off", "totalAmount": 100}]}], "payments": [{"id": "H726AAJQYE3SP"}], "serviceCharges": [], "locationRef": {"id": "GA3WP1ZC3ZFK1", "name": "Codat"}, "createdDate": "2021-05-24T11:24:48Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 76, "_links": {"self": {"href": "/companies/1535235d-5efb-4d17-9d94-491c1f35ff92/connections/ed802898-f920-486b-b553-d7b4c1ac6c8d/data/commerce-orders"}, "current": {"href": "/companies/1535235d-5efb-4d17-9d94-491c1f35ff92/connections/ed802898-f920-486b-b553-d7b4c1ac6c8d/data/commerce-orders?page=1&pageSize=2"}, "next": {"href": "/companies/1535235d-5efb-4d17-9d94-491c1f35ff92/connections/ed802898-f920-486b-b553-d7b4c1ac6c8d/data/commerce-orders?page=2&pageSize=2"}}} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-08T13:49:34Z", "id": "A61465.1", "orderNumber": "A61465.1", "country": "AU ", "currency": "AUD", "closedDate": "2022-12-09T02:27:46Z", "totalAmount": 5, "totalRefund": 0, "totalTaxAmount": 0.45, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "S61465.1", "quantity": 1, "taxPercentage": 10, "totalAmount": 5, "totalTaxAmount": 0.45, "unitPrice": 4.5455, "taxes": [{"taxComponentRef": {"id": "GST10", "name": "10% GST"}}], "productRef": {"id": "647208621834617", "name": "Hot Chocolate"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2023-03-02T09:50:43", "id": "R61465.1_1_A61465.1_2022-12-09T02:27:46.273Z", "amount": 5, "currency": "AUD", "type": "Unknown", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-12-09T02:27:46"}], "serviceCharges": [], "locationRef": {"id": "647208621834538", "name": "QA Shared - New Test Site"}, "createdDate": "2022-12-09T02:27:14Z"}, {"modifiedDate": "2023-03-08T13:49:34Z", "id": "A61465.2", "orderNumber": "A61465.2", "country": "AU ", "currency": "AUD", "closedDate": "2022-12-12T23:21:29Z", "totalAmount": 10, "totalRefund": 0, "totalTaxAmount": 0.91, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "S61465.2", "quantity": 1, "taxPercentage": 10, "totalAmount": 5, "totalTaxAmount": 0.46, "unitPrice": 4.5455, "taxes": [{"taxComponentRef": {"id": "GST10", "name": "10% GST"}}], "productRef": {"id": "647208621834663", "name": "Royal"}, "discountAllocations": []}, {"id": "S61465.3", "quantity": 1, "taxPercentage": 10, "totalAmount": 5, "totalTaxAmount": 0.45, "unitPrice": 4.5455, "taxes": [{"taxComponentRef": {"id": "GST10", "name": "10% GST"}}], "productRef": {"id": "647208621834623", "name": "Mocha"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2023-03-02T09:50:43", "id": "R61465.2_1_A61465.2_2022-12-12T23:21:29.006Z", "amount": 10, "currency": "AUD", "type": "Unknown", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-12-12T23:21:29"}], "serviceCharges": [], "locationRef": {"id": "647208621834538", "name": "QA Shared - New Test Site"}, "createdDate": "2022-12-12T23:20:12Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 24, "_links": {"self": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-orders"}, "current": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-orders?page=1&pageSize=2"}, "next": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-orders?page=2&pageSize=2"}}} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-03-17T15:47:28Z", "id": "ord_2at3ck", "orderNumber": "1337", "country": "NLD", "currency": "EUR", "totalAmount": 1027.99, "totalRefund": 0, "totalTaxAmount": 178.41, "totalDiscount": 100, "totalGratuity": 0, "orderLineItems": [{"id": "odl_1.3tvc32", "quantity": 1, "taxPercentage": 21, "totalAmount": 329.99, "totalTaxAmount": 57.27, "unitPrice": 329.99, "taxes": [], "discountAllocations": []}, {"id": "odl_1.x95vuk", "quantity": 2, "taxPercentage": 21, "totalAmount": 698, "totalTaxAmount": 121.14, "unitPrice": 399, "taxes": [], "discountAllocations": [{"name": "Discount", "totalAmount": 100}]}], "payments": [{"modifiedDate": "2022-03-17T15:47:28", "sourceModifiedDate": "2022-02-08T16:02:02", "id": "tr_GpHuaqHrca", "amount": 1027.99, "currency": "EUR", "type": "OnlineCard", "status": "Failed", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-02-08T15:44:22"}, {"modifiedDate": "2022-03-17T15:47:28", "sourceModifiedDate": "2022-01-20T09:46:02", "id": "tr_w7RGQc3k3V", "amount": 1027.99, "currency": "EUR", "type": "OnlineCard", "status": "Failed", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-01-20T09:28:32"}], "serviceCharges": [], "createdDate": "2022-01-20T09:28:32"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-orders"}, "current": {"href": "/companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-orders?page=1&pageSize=2"}}} - Mollie Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-08-17T11:33:19Z", "id": "ord_2at3ck", "orderNumber": "1337", "country": "NLD", "currency": "EUR", "totalAmount": 1027.99, "totalRefund": 0, "totalTaxAmount": 178.41, "totalDiscount": 100, "totalGratuity": 0, "orderLineItems": [{"id": "odl_1.x95vuk", "quantity": 2, "taxPercentage": 21, "totalAmount": 698, "totalTaxAmount": 121.14, "unitPrice": 338.43, "taxes": [], "discountAllocations": [{"name": "Discount", "totalAmount": 100}]}, {"id": "odl_1.3tvc32", "quantity": 1, "taxPercentage": 21, "totalAmount": 329.99, "totalTaxAmount": 57.27, "unitPrice": 272.72, "taxes": [], "discountAllocations": []}], "payments": [{"id": "tr_GpHuaqHrca"}, {"id": "tr_w7RGQc3k3V"}], "serviceCharges": [], "createdDate": "2022-01-20T09:28:32"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-orders"}, "current": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-orders?page=1&pageSize=2"}}} - Partner Commerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-05-12T07:22:02Z", "sourceModifiedDate": "2021-02-10T01:37:23", "id": "6d135134-2f77-45f7-af3d-ee873e42da45", "orderNumber": "93128704", "country": "GM ", "currency": "CAD", "totalAmount": 203.82, "totalRefund": 0, "totalTaxAmount": 40.77, "totalDiscount": 25.63, "totalGratuity": 80.81, "orderLineItems": [{"id": "89f5e83a-c87d-4b60-a009-0ea9065867aa", "quantity": 3, "taxPercentage": 20, "totalAmount": 85.44, "totalTaxAmount": 17.09, "unitPrice": 28.48, "taxes": [], "productRef": {"id": "98ef828e-33e1-4c23-9383-a029f1d6a3a6"}, "productVariantRef": {"id": "dffcd99e-13bb-4b89-89ef-719b3b0777e6"}, "discountAllocations": [{"name": "Discount", "totalAmount": 8.54}, {"name": "Discount", "totalAmount": 17.09}]}, {"id": "4c65f0d9-05c8-48eb-9c4a-1774f5073e66", "quantity": 3, "taxPercentage": 20, "totalAmount": 118.38, "totalTaxAmount": 23.68, "unitPrice": 39.46, "taxes": [], "productRef": {"id": "561f8efb-3429-4c1f-a014-1fa595f9b3c6"}, "productVariantRef": {"id": "e0715a7a-0179-4a2e-b40d-800fd2f36764"}, "discountAllocations": []}], "payments": [{"id": "3ec3d4c4-8003-4f77-a44e-08b3e17057bf"}], "serviceCharges": [], "locationRef": {"id": "d84a8ce0-d7e4-400a-b07a-d4bddd9c1873"}, "customerRef": {"id": "0dc0206d-f22f-48c9-a4e5-79f8383c3426"}, "createdDate": "2021-02-10T01:37:23"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/4342cb7d-d7b1-492f-851e-4aa5084933c1/connections/9e5422fa-f03f-4d58-bcf4-161b574ab350/data/commerce-orders"}, "current": {"href": "/companies/4342cb7d-d7b1-492f-851e-4aa5084933c1/connections/9e5422fa-f03f-4d58-bcf4-161b574ab350/data/commerce-orders?page=1&pageSize=2"}}} - PrestaShop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-01-26T15:09:42Z", "sourceModifiedDate": "2021-09-02T06:00:54", "id": "1", "orderNumber": "XKBKNABJK", "country": "US ", "currency": "USD", "totalAmount": 61.8, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "1", "quantity": 1, "taxPercentage": 0, "totalAmount": 23.9, "totalTaxAmount": 0, "unitPrice": 23.9, "taxes": [], "productRef": {"id": "1", "name": "Hummingbird printed t-shirt"}, "discountAllocations": []}, {"id": "2", "quantity": 1, "taxPercentage": 0, "totalAmount": 35.9, "totalTaxAmount": 0, "unitPrice": 35.9, "taxes": [], "productRef": {"id": "2", "name": "Hummingbird printed sweater"}, "discountAllocations": []}], "payments": [], "serviceCharges": [{"description": "Shipping", "totalAmount": 2, "taxPercentage": 0, "taxAmount": 0, "taxes": [], "quantity": 1, "type": "Shipping"}], "customerRef": {"id": "1", "name": "John DOE"}, "createdDate": "2021-09-02T06:00:54"}, {"modifiedDate": "2022-01-26T15:09:42Z", "sourceModifiedDate": "2021-09-28T08:09:46", "id": "10", "orderNumber": "UFQZXPGQU", "country": "US ", "currency": "USD", "totalAmount": 19.12, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 4.78, "totalGratuity": 0, "orderLineItems": [{"id": "14", "quantity": 1, "taxPercentage": 0, "totalAmount": 19.12, "totalTaxAmount": 0, "unitPrice": 23.9, "taxes": [], "productRef": {"id": "1", "name": "Hummingbird printed t-shirt"}, "discountAllocations": [{"name": "20% Discount", "totalAmount": 4.78}]}], "payments": [], "serviceCharges": [], "customerRef": {"id": "5", "name": "Tobi Yinusa"}, "createdDate": "2021-09-28T08:09:46"}], "pageNumber": 1, "pageSize": 2, "totalResults": 10, "_links": {"self": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-orders"}, "current": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-orders?page=1&pageSize=2"}, "next": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-orders?page=2&pageSize=2"}}} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-02-10T15:18:24Z", "sourceModifiedDate": "2022-08-01T13:12:35", "id": "3684119445662", "orderNumber": "1007", "country": "XXX", "currency": "GBP", "totalAmount": 600, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "9670458146974", "quantity": 4, "taxPercentage": 0, "totalAmount": 600, "totalTaxAmount": 0, "unitPrice": 150, "taxes": [], "productRef": {"id": "6595494117534", "name": "Monitor"}, "productVariantRef": {"id": "39444526694558", "name": "Monitor"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2023-02-10T15:18:24", "sourceModifiedDate": "2021-03-19T13:17:49", "id": "4630233579678", "amount": 600, "currency": "GBP", "type": "OnlineCard", "status": "Failed", "paymentProvider": "Shopify Payments", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-19T13:17:49"}, {"modifiedDate": "2023-02-10T15:18:24", "sourceModifiedDate": "2021-03-19T13:18:29", "id": "4630234497182", "amount": 600, "currency": "GBP", "type": "OnlineCard", "status": "Paid", "paymentProvider": "Shopify Payments", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-19T13:18:29"}], "serviceCharges": [], "customerRef": {"id": "5097398534302", "name": "Qa Test"}, "createdDate": "2021-03-19T13:18:33"}, {"modifiedDate": "2023-02-10T15:18:24Z", "sourceModifiedDate": "2022-08-01T13:12:35", "id": "3684180361374", "orderNumber": "1011", "country": "XXX", "currency": "GBP", "totalAmount": 105, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "9670570901662", "quantity": 3, "taxPercentage": 0, "totalAmount": 105, "totalTaxAmount": 0, "unitPrice": 35, "taxes": [], "productRef": {"id": "6595497787550", "name": "Keyboard"}, "productVariantRef": {"id": "39444537213086", "name": "Keyboard"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2023-02-10T15:18:24", "sourceModifiedDate": "2021-03-19T13:57:30", "id": "4630311108766", "amount": 105, "currency": "GBP", "type": "Unknown", "status": "Paid", "paymentProvider": "Manual", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-19T13:57:30"}], "serviceCharges": [], "customerRef": {"id": "5097398534302", "name": "Qa Test"}, "createdDate": "2021-03-19T13:57:30"}], "pageNumber": 1, "pageSize": 2, "totalResults": 30, "_links": {"self": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-orders"}, "current": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-orders?page=1&pageSize=2"}, "next": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-orders?page=2&pageSize=2"}}} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-08-02T10:27:33Z", "sourceModifiedDate": "2021-02-14T19:38:28Z", "id": "BDYNvtIYyWClkTjnh99CFR3fPwKZY", "orderNumber": "BDYNvtIYyWClkTjnh99CFR3fPwKZY", "country": "GB ", "currency": "GBP", "closedDate": "0001-01-01T00:00:00", "totalAmount": 50, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "lLJpgArKQbBEn9nTvLRHP", "quantity": 1, "taxPercentage": 0, "totalAmount": 50, "totalTaxAmount": 0, "unitPrice": 50, "taxes": [], "discountAllocations": []}], "payments": [], "serviceCharges": [], "locationRef": {"id": "D8DVHD1G6NT2J", "name": "Codat Limited"}, "createdDate": "2021-02-14T19:38:28Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1, "_links": {"self": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-orders"}, "current": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-orders?page=1&pageSize=2"}}} - SumUp: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-14T10:58:04Z", "id": "07efcdd0-7f61-4d82-957f-52e8f0bd3f89", "orderNumber": "TECXTU2KT6", "country": "XXX", "currency": "GBP", "totalAmount": 200, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "Product undefined by SumUp", "quantity": 1, "taxPercentage": 0, "totalAmount": 200, "totalTaxAmount": 0, "unitPrice": 200, "taxes": [], "discountAllocations": []}], "payments": [{"id": "07efcdd0-7f61-4d82-957f-52e8f0bd3f89"}], "serviceCharges": [], "createdDate": "2021-03-30T12:20:40Z"}, {"modifiedDate": "2022-09-14T10:58:04Z", "id": "46d36a64-ea48-4e37-9340-3548cbf3ca2f", "orderNumber": "TNEU7333HZ", "country": "XXX", "currency": "GBP", "totalAmount": 15, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "Sale of some product", "quantity": 1, "taxPercentage": 0, "totalAmount": 15, "totalTaxAmount": 0, "unitPrice": 15, "taxes": [], "discountAllocations": []}], "payments": [{"id": "46d36a64-ea48-4e37-9340-3548cbf3ca2f"}], "serviceCharges": [], "createdDate": "2021-03-26T21:09:59Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-orders"}, "current": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-orders?page=1&pageSize=2"}, "next": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-orders?page=2&pageSize=2"}}} - WooCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-07-11T15:35:48Z", "sourceModifiedDate": "2021-04-01T13:34:59Z", "id": "111", "orderNumber": "111", "country": "GB ", "currency": "GBP", "totalAmount": 39.5, "totalRefund": 0, "totalTaxAmount": 6, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "53", "quantity": 2, "taxPercentage": 20, "totalAmount": 12, "totalTaxAmount": 2, "unitPrice": 5, "taxes": [], "productRef": {"id": "82"}, "discountAllocations": []}, {"id": "54", "quantity": 2, "taxPercentage": 20, "totalAmount": 24, "totalTaxAmount": 4, "unitPrice": 10, "taxes": [], "productRef": {"id": "81"}, "discountAllocations": []}], "payments": [], "serviceCharges": [{"description": "Royal Mail", "totalAmount": 3.5, "taxPercentage": 0, "taxAmount": 0, "taxes": [], "quantity": 1, "type": "Shipping"}], "customerRef": {"id": "200585744"}, "createdDate": "2021-03-27T23:29:38Z"}, {"modifiedDate": "2022-07-11T15:35:48Z", "sourceModifiedDate": "2022-03-24T16:01:23Z", "id": "145", "orderNumber": "145", "country": "GB ", "currency": "GBP", "totalAmount": 27.5, "totalRefund": 0, "totalTaxAmount": 5.5, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "59", "quantity": 2, "taxPercentage": 25, "totalAmount": 27.5, "totalTaxAmount": 5.5, "unitPrice": 11, "taxes": [], "productRef": {"id": "87"}, "discountAllocations": []}], "payments": [], "serviceCharges": [], "createdDate": "2021-09-24T12:15:29Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 25, "_links": {"self": {"href": "/companies/00396b78-7113-4b1f-996f-4c561b00573a/connections/b39ed7d6-5eda-44c5-85bb-647d03edd649/data/commerce-orders"}, "current": {"href": "/companies/00396b78-7113-4b1f-996f-4c561b00573a/connections/b39ed7d6-5eda-44c5-85bb-647d03edd649/data/commerce-orders?page=1&pageSize=2"}, "next": {"href": "/companies/00396b78-7113-4b1f-996f-4c561b00573a/connections/b39ed7d6-5eda-44c5-85bb-647d03edd649/data/commerce-orders?page=2&pageSize=2"}}} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2021-10-27T15:22:37Z", "sourceModifiedDate": "2020-11-23T14:27:20Z", "id": "7TunRi2XEeueVK3fSQEQIw", "orderNumber": "3", "country": "GB ", "currency": "GBP", "totalAmount": 45, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "0", "quantity": 1, "taxPercentage": 0, "totalAmount": 45, "totalTaxAmount": 0, "unitPrice": 45, "taxes": [], "productRef": {"id": "7f9f31e4-2d97-11eb-9f55-acde48001122"}, "productVariantRef": {"id": "7f9f35ea-2d97-11eb-9f55-acde48001122"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2021-10-27T15:22:37", "id": "ed97bcde-2d97-11eb-a42e-25130f2dd258", "amount": 45, "currency": "GBP", "type": "Paypal", "status": "Unknown", "dueDate": "0001-01-01T00:00:00", "createdDate": "2020-11-23T14:27:19"}], "serviceCharges": [], "createdDate": "2020-11-23T14:27:20Z"}, {"modifiedDate": "2021-10-27T15:22:37Z", "sourceModifiedDate": "2020-11-23T14:28:05Z", "id": "CV5TJC2YEeueVK3fSQEQIw", "orderNumber": "4", "country": "GB ", "currency": "GBP", "totalAmount": 25, "totalRefund": 0, "totalTaxAmount": 1.19, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "0", "quantity": 1, "taxPercentage": 5, "totalAmount": 25, "totalTaxAmount": 1.19, "unitPrice": 23.81, "taxes": [], "productRef": {"id": "89570bee-2d97-11eb-9f55-acde48001122"}, "productVariantRef": {"id": "89570c52-2d97-11eb-9f55-acde48001122"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2021-10-27T15:22:37", "id": "09b94cfc-2d98-11eb-8021-0e1b9dcbeca1", "amount": 25, "currency": "GBP", "type": "Paypal", "status": "Unknown", "dueDate": "0001-01-01T00:00:00", "createdDate": "2020-11-23T14:28:04"}], "serviceCharges": [], "createdDate": "2020-11-23T14:28:05Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-orders"}, "current": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-orders?page=1&pageSize=2"}, "next": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-orders?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-order: - Amazon Seller Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-09T09:12:12Z", "sourceModifiedDate": "1970-01-19T03:58:32Z", "id": "902-1845936-5435065", "orderNumber": "902-1845936-5435065", "country": "US ", "currency": "USD", "totalAmount": 10, "totalRefund": 0, "totalTaxAmount": 1.01, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "O05015851154158", "quantity": 1, "taxPercentage": 11.23, "totalAmount": 10, "totalTaxAmount": 1.01, "unitPrice": 8.99, "taxes": [], "productVariantRef": {"id": "NABetaASINB00551Q3CS"}, "discountAllocations": []}], "payments": [], "serviceCharges": [], "createdDate": "1970-01-19T03:58:30Z"} - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-11T10:33:56Z", "sourceModifiedDate": "2022-06-15T15:48:18Z", "id": "100", "orderNumber": "100", "country": "GBR", "currency": "GBP", "totalAmount": 675, "totalRefund": 0, "totalTaxAmount": 112.5, "totalDiscount": 10, "totalGratuity": 0, "orderLineItems": [{"id": "1", "quantity": 1, "taxPercentage": 20, "totalAmount": 221.64, "totalTaxAmount": 36.94, "unitPrice": 187.5, "taxes": [], "productRef": {"id": "86", "name": "[Sample] Able Brewing System"}, "productVariantRef": {"id": "66", "name": "[Sample] Able Brewing System"}, "discountAllocations": [{"name": "Manual Discount", "totalAmount": 3.36}]}, {"id": "2", "quantity": 5, "taxPercentage": 19.9999, "totalAmount": 438.36, "totalTaxAmount": 73.06, "unitPrice": 74.1667, "taxes": [], "productRef": {"id": "81", "name": "[Sample] Orbit Terrarium - Small"}, "productVariantRef": {"id": "65", "name": "[Sample] Orbit Terrarium - Small"}, "discountAllocations": [{"name": "Manual Discount", "totalAmount": 6.64}]}], "payments": [], "serviceCharges": [{"description": "Shipping Charge", "totalAmount": 15, "taxPercentage": 20, "taxAmount": 2.5, "taxes": [], "quantity": 1, "type": "Shipping"}], "customerRef": {"id": "0"}, "createdDate": "2022-06-15T15:48:18Z"} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-08T15:47:43Z", "sourceModifiedDate": "2021-05-24T10:33:45Z", "id": "0BCZPWGFC3M16", "orderNumber": "0BCZPWGFC3M16", "country": "GB ", "currency": "GBP", "totalAmount": 1200, "totalRefund": 0, "totalTaxAmount": 200, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "985WY5J4H12XY", "quantity": 1, "taxPercentage": 20, "totalAmount": 1200, "totalTaxAmount": 200, "unitPrice": 1000, "taxes": [{"taxComponentRef": {"id": "KAWQTPZP3R9VT", "name": "VAT 20%"}}], "productRef": {"id": "NMZHKK6FKF6ZJ", "name": "Laptop"}, "discountAllocations": []}], "payments": [{"id": "S2D924NX13T2G"}], "serviceCharges": [], "locationRef": {"id": "GA3WP1ZC3ZFK1", "name": "Codat"}, "createdDate": "2021-05-24T10:33:41Z"} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-08T13:49:34Z", "id": "A61465.1", "orderNumber": "A61465.1", "country": "AU ", "currency": "AUD", "closedDate": "2022-12-09T02:27:46Z", "totalAmount": 5, "totalRefund": 0, "totalTaxAmount": 0.45, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "S61465.1", "quantity": 1, "taxPercentage": 10, "totalAmount": 5, "totalTaxAmount": 0.45, "unitPrice": 4.5455, "taxes": [{"taxComponentRef": {"id": "GST10", "name": "10% GST"}}], "productRef": {"id": "647208621834617", "name": "Hot Chocolate"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2023-03-02T09:50:43", "id": "R61465.1_1_A61465.1_2022-12-09T02:27:46.273Z", "amount": 5, "currency": "AUD", "type": "Unknown", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-12-09T02:27:46"}], "serviceCharges": [], "locationRef": {"id": "647208621834538", "name": "QA Shared - New Test Site"}, "createdDate": "2022-12-09T02:27:14Z"} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-03-17T15:47:28Z", "id": "ord_2at3ck", "orderNumber": "1337", "country": "NLD", "currency": "EUR", "totalAmount": 1027.99, "totalRefund": 0, "totalTaxAmount": 178.41, "totalDiscount": 100, "totalGratuity": 0, "orderLineItems": [{"id": "odl_1.3tvc32", "quantity": 1, "taxPercentage": 21, "totalAmount": 329.99, "totalTaxAmount": 57.27, "unitPrice": 329.99, "taxes": [], "discountAllocations": []}, {"id": "odl_1.x95vuk", "quantity": 2, "taxPercentage": 21, "totalAmount": 698, "totalTaxAmount": 121.14, "unitPrice": 399, "taxes": [], "discountAllocations": [{"name": "Discount", "totalAmount": 100}]}], "payments": [{"modifiedDate": "2022-03-17T15:47:28", "sourceModifiedDate": "2022-02-08T16:02:02", "id": "tr_GpHuaqHrca", "amount": 1027.99, "currency": "EUR", "type": "OnlineCard", "status": "Failed", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-02-08T15:44:22"}, {"modifiedDate": "2022-03-17T15:47:28", "sourceModifiedDate": "2022-01-20T09:46:02", "id": "tr_w7RGQc3k3V", "amount": 1027.99, "currency": "EUR", "type": "OnlineCard", "status": "Failed", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-01-20T09:28:32"}], "serviceCharges": [], "createdDate": "2022-01-20T09:28:32"} - Mollie Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-08-17T11:33:19Z", "id": "ord_2at3ck", "orderNumber": "1337", "country": "NLD", "currency": "EUR", "totalAmount": 1027.99, "totalRefund": 0, "totalTaxAmount": 178.41, "totalDiscount": 100, "totalGratuity": 0, "orderLineItems": [{"id": "odl_1.x95vuk", "quantity": 2, "taxPercentage": 21, "totalAmount": 698, "totalTaxAmount": 121.14, "unitPrice": 338.43, "taxes": [], "discountAllocations": [{"name": "Discount", "totalAmount": 100}]}, {"id": "odl_1.3tvc32", "quantity": 1, "taxPercentage": 21, "totalAmount": 329.99, "totalTaxAmount": 57.27, "unitPrice": 272.72, "taxes": [], "discountAllocations": []}], "payments": [{"id": "tr_GpHuaqHrca"}, {"id": "tr_w7RGQc3k3V"}], "serviceCharges": [], "createdDate": "2022-01-20T09:28:32"} - Partner Commerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-05-12T07:22:02Z", "sourceModifiedDate": "2021-02-10T01:37:23", "id": "6d135134-2f77-45f7-af3d-ee873e42da45", "orderNumber": "93128704", "country": "GM ", "currency": "CAD", "totalAmount": 203.82, "totalRefund": 0, "totalTaxAmount": 40.77, "totalDiscount": 25.63, "totalGratuity": 80.81, "orderLineItems": [{"id": "89f5e83a-c87d-4b60-a009-0ea9065867aa", "quantity": 3, "taxPercentage": 20, "totalAmount": 85.44, "totalTaxAmount": 17.09, "unitPrice": 28.48, "taxes": [], "productRef": {"id": "98ef828e-33e1-4c23-9383-a029f1d6a3a6"}, "productVariantRef": {"id": "dffcd99e-13bb-4b89-89ef-719b3b0777e6"}, "discountAllocations": [{"name": "Discount", "totalAmount": 8.54}, {"name": "Discount", "totalAmount": 17.09}]}, {"id": "4c65f0d9-05c8-48eb-9c4a-1774f5073e66", "quantity": 3, "taxPercentage": 20, "totalAmount": 118.38, "totalTaxAmount": 23.68, "unitPrice": 39.46, "taxes": [], "productRef": {"id": "561f8efb-3429-4c1f-a014-1fa595f9b3c6"}, "productVariantRef": {"id": "e0715a7a-0179-4a2e-b40d-800fd2f36764"}, "discountAllocations": []}], "payments": [{"id": "3ec3d4c4-8003-4f77-a44e-08b3e17057bf"}], "serviceCharges": [], "locationRef": {"id": "d84a8ce0-d7e4-400a-b07a-d4bddd9c1873"}, "customerRef": {"id": "0dc0206d-f22f-48c9-a4e5-79f8383c3426"}, "createdDate": "2021-02-10T01:37:23"} - PrestaShop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-01-26T15:09:42Z", "sourceModifiedDate": "2021-09-02T06:00:54", "id": "1", "orderNumber": "XKBKNABJK", "country": "US ", "currency": "USD", "totalAmount": 61.8, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "1", "quantity": 1, "taxPercentage": 0, "totalAmount": 23.9, "totalTaxAmount": 0, "unitPrice": 23.9, "taxes": [], "productRef": {"id": "1", "name": "Hummingbird printed t-shirt"}, "discountAllocations": []}, {"id": "2", "quantity": 1, "taxPercentage": 0, "totalAmount": 35.9, "totalTaxAmount": 0, "unitPrice": 35.9, "taxes": [], "productRef": {"id": "2", "name": "Hummingbird printed sweater"}, "discountAllocations": []}], "payments": [], "serviceCharges": [{"description": "Shipping", "totalAmount": 2, "taxPercentage": 0, "taxAmount": 0, "taxes": [], "quantity": 1, "type": "Shipping"}], "customerRef": {"id": "1", "name": "John DOE"}, "createdDate": "2021-09-02T06:00:54"} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-02-10T15:18:24Z", "sourceModifiedDate": "2022-08-01T13:12:35", "id": "3684119445662", "orderNumber": "1007", "country": "XXX", "currency": "GBP", "totalAmount": 600, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "9670458146974", "quantity": 4, "taxPercentage": 0, "totalAmount": 600, "totalTaxAmount": 0, "unitPrice": 150, "taxes": [], "productRef": {"id": "6595494117534", "name": "Monitor"}, "productVariantRef": {"id": "39444526694558", "name": "Monitor"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2023-02-10T15:18:24", "sourceModifiedDate": "2021-03-19T13:17:49", "id": "4630233579678", "amount": 600, "currency": "GBP", "type": "OnlineCard", "status": "Failed", "paymentProvider": "Shopify Payments", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-19T13:17:49"}, {"modifiedDate": "2023-02-10T15:18:24", "sourceModifiedDate": "2021-03-19T13:18:29", "id": "4630234497182", "amount": 600, "currency": "GBP", "type": "OnlineCard", "status": "Paid", "paymentProvider": "Shopify Payments", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-19T13:18:29"}], "serviceCharges": [], "customerRef": {"id": "5097398534302", "name": "Qa Test"}, "createdDate": "2021-03-19T13:18:33"} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-08-02T10:27:33Z", "sourceModifiedDate": "2021-02-14T19:38:28Z", "id": "BDYNvtIYyWClkTjnh99CFR3fPwKZY", "orderNumber": "BDYNvtIYyWClkTjnh99CFR3fPwKZY", "country": "GB ", "currency": "GBP", "closedDate": "0001-01-01T00:00:00", "totalAmount": 50, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "lLJpgArKQbBEn9nTvLRHP", "quantity": 1, "taxPercentage": 0, "totalAmount": 50, "totalTaxAmount": 0, "unitPrice": 50, "taxes": [], "discountAllocations": []}], "payments": [], "serviceCharges": [], "locationRef": {"id": "D8DVHD1G6NT2J", "name": "Codat Limited"}, "createdDate": "2021-02-14T19:38:28Z"} - SumUp: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-14T10:58:04Z", "id": "07efcdd0-7f61-4d82-957f-52e8f0bd3f89", "orderNumber": "TECXTU2KT6", "country": "XXX", "currency": "GBP", "totalAmount": 200, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "Product undefined by SumUp", "quantity": 1, "taxPercentage": 0, "totalAmount": 200, "totalTaxAmount": 0, "unitPrice": 200, "taxes": [], "discountAllocations": []}], "payments": [{"id": "07efcdd0-7f61-4d82-957f-52e8f0bd3f89"}], "serviceCharges": [], "createdDate": "2021-03-30T12:20:40Z"} - WooCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-07-11T15:35:48Z", "sourceModifiedDate": "2021-04-01T13:34:59Z", "id": "111", "orderNumber": "111", "country": "GB ", "currency": "GBP", "totalAmount": 39.5, "totalRefund": 0, "totalTaxAmount": 6, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "53", "quantity": 2, "taxPercentage": 20, "totalAmount": 12, "totalTaxAmount": 2, "unitPrice": 5, "taxes": [], "productRef": {"id": "82"}, "discountAllocations": []}, {"id": "54", "quantity": 2, "taxPercentage": 20, "totalAmount": 24, "totalTaxAmount": 4, "unitPrice": 10, "taxes": [], "productRef": {"id": "81"}, "discountAllocations": []}], "payments": [], "serviceCharges": [{"description": "Royal Mail", "totalAmount": 3.5, "taxPercentage": 0, "taxAmount": 0, "taxes": [], "quantity": 1, "type": "Shipping"}], "customerRef": {"id": "200585744"}, "createdDate": "2021-03-27T23:29:38Z"} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2021-10-27T15:22:37Z", "sourceModifiedDate": "2020-11-23T14:27:20Z", "id": "7TunRi2XEeueVK3fSQEQIw", "orderNumber": "3", "country": "GB ", "currency": "GBP", "totalAmount": 45, "totalRefund": 0, "totalTaxAmount": 0, "totalDiscount": 0, "totalGratuity": 0, "orderLineItems": [{"id": "0", "quantity": 1, "taxPercentage": 0, "totalAmount": 45, "totalTaxAmount": 0, "unitPrice": 45, "taxes": [], "productRef": {"id": "7f9f31e4-2d97-11eb-9f55-acde48001122"}, "productVariantRef": {"id": "7f9f35ea-2d97-11eb-9f55-acde48001122"}, "discountAllocations": []}], "payments": [{"modifiedDate": "2021-10-27T15:22:37", "id": "ed97bcde-2d97-11eb-a42e-25130f2dd258", "amount": 45, "currency": "GBP", "type": "Paypal", "status": "Unknown", "dueDate": "0001-01-01T00:00:00", "createdDate": "2020-11-23T14:27:19"}], "serviceCharges": [], "createdDate": "2020-11-23T14:27:20Z"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-payment-methods: - speakeasy-default-list-commerce-payment-methods: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Amazon Seller Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-09T09:12:03Z", "id": "COD", "name": "Cash On Delivery", "status": "Active"}, {"modifiedDate": "2023-01-09T09:12:03Z", "id": "GC", "name": "Gift Card", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-paymentMethods"}, "current": {"href": "/companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-paymentMethods?page=2&pageSize=2"}}} - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-11T10:33:48Z", "id": "bigcommerce_gift_certificate", "name": "Gift Certificate", "status": "Active"}, {"modifiedDate": "2023-04-11T10:33:48Z", "id": "bigcommerce_store_credit", "name": "Store Credit", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-paymentMethods"}, "current": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-paymentMethods?page=1&pageSize=2"}}} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-09T11:01:04Z", "id": "0DPQ6QP48YYHW", "name": "TapMango Wallet", "status": "Active"}, {"modifiedDate": "2023-01-09T11:01:04Z", "id": "24H1ANYP1BNXG", "name": "MyTab", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 13, "_links": {"self": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-paymentMethods"}, "current": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-paymentMethods?page=2&pageSize=2"}}} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-02T09:48:56Z", "id": "647208621834260", "name": "Cash", "status": "Active"}, {"modifiedDate": "2023-03-02T09:48:56Z", "id": "647208621834261", "name": "Credit Card", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 11, "_links": {"self": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-paymentMethods"}, "current": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-paymentMethods?page=2&pageSize=2"}}} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-08-09T15:08:19Z", "id": "applepay", "name": "Apple Pay", "status": "Unknown"}, {"modifiedDate": "2022-08-09T15:08:19Z", "id": "bancontact", "name": "Bancontact", "status": "Unknown"}], "pageNumber": 1, "pageSize": 2, "totalResults": 19, "_links": {"self": {"href": "/companies/a2503b54-143c-4705-8bec-9ef84f51ca86/connections/4c8df852-f1b3-4642-939b-c33d6f34a312/data/commerce-paymentMethods"}, "current": {"href": "/companies/a2503b54-143c-4705-8bec-9ef84f51ca86/connections/4c8df852-f1b3-4642-939b-c33d6f34a312/data/commerce-paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/a2503b54-143c-4705-8bec-9ef84f51ca86/connections/4c8df852-f1b3-4642-939b-c33d6f34a312/data/commerce-paymentMethods?page=2&pageSize=2"}}} - Mollie Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-08-17T11:33:19Z", "id": "applepay", "name": "Apple Pay", "status": "Unknown"}, {"modifiedDate": "2022-08-17T11:33:19Z", "id": "bancontact", "name": "Bancontact", "status": "Unknown"}], "pageNumber": 1, "pageSize": 2, "totalResults": 19, "_links": {"self": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-paymentMethods"}, "current": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-paymentMethods?page=2&pageSize=2"}}} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-08-02T10:27:32Z", "id": "BANK_ACCOUNT", "name": "Bank Account", "status": "Unknown"}, {"modifiedDate": "2022-08-02T10:27:32Z", "id": "BUY_NOW_PAY_LATER", "name": "Buy Now Pay Later", "status": "Unknown"}], "pageNumber": 1, "pageSize": 2, "totalResults": 20, "_links": {"self": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-paymentMethods"}, "current": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-paymentMethods?page=2&pageSize=2"}}} - SumUp: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-14T10:58:03Z", "id": "CASH", "name": "Cash", "status": "Active"}, {"modifiedDate": "2022-09-14T10:58:03Z", "id": "CC_CUSTOMER_ENTERED", "name": "Credit Card", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 8, "_links": {"self": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-paymentMethods"}, "current": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-paymentMethods?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-payment-method: - Amazon Seller Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-09T09:12:03Z", "id": "COD", "name": "Cash On Delivery", "status": "Active"} - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-11T10:33:48Z", "id": "bigcommerce_gift_certificate", "name": "Gift Certificate", "status": "Active"} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-09T11:01:04Z", "id": "0DPQ6QP48YYHW", "name": "TapMango Wallet", "status": "Active"} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-02T09:48:56Z", "id": "647208621834260", "name": "Cash", "status": "Active"} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-08-09T15:08:19Z", "id": "applepay", "name": "Apple Pay", "status": "Unknown"} - Mollie Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-08-17T11:33:19Z", "id": "applepay", "name": "Apple Pay", "status": "Unknown"} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-08-02T10:27:32Z", "id": "BANK_ACCOUNT", "name": "Bank Account", "status": "Unknown"} - SumUp: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-14T10:58:03Z", "id": "CASH", "name": "Cash", "status": "Active"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-payments: - speakeasy-default-list-commerce-payments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-11T10:33:52Z", "id": "103_1_1_refund", "amount": -64, "currency": "GBP", "status": "Paid", "paymentProvider": "bigpaypay", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-06-15T17:13:13Z"}, {"modifiedDate": "2023-04-11T10:33:52Z", "id": "105_2_2_refund", "amount": -33.95, "currency": "GBP", "status": "Paid", "paymentProvider": "bigpaypay", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-06-24T13:57:01Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 20, "_links": {"self": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-payments"}, "current": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-payments?page=2&pageSize=2"}}} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-09T11:01:02Z", "sourceModifiedDate": "2021-05-24T10:35:08Z", "id": "01J7HV88GT6B8", "amount": 1000, "currency": "USD", "paymentMethodRef": {"id": "BR5M17TG091SP", "name": "Credit Card"}, "status": "Paid", "paymentProvider": "clover", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-05-24T10:35:08Z"}, {"modifiedDate": "2023-01-09T11:01:02Z", "sourceModifiedDate": "2021-05-24T10:35:31Z", "id": "0A8ZMPG40Q9AM", "amount": 1000, "currency": "USD", "paymentMethodRef": {"id": "BR5M17TG091SP", "name": "Credit Card"}, "status": "Paid", "paymentProvider": "clover", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-05-24T10:35:31Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 77, "_links": {"self": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-payments"}, "current": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-payments?page=2&pageSize=2"}}} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-02T09:50:43Z", "id": "1_A62084.1_2023-01-05T03:34:50.296Z", "amount": 0, "currency": "AUD", "paymentMethodRef": {"id": "0"}, "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2023-01-05T03:34:50Z"}, {"modifiedDate": "2023-03-02T09:50:43Z", "id": "R61465.1_1_A61465.1_2022-12-09T02:27:46.273Z", "amount": 5, "currency": "AUD", "paymentMethodRef": {"id": "647208621834714", "name": "LSPay - Mary"}, "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-12-09T02:27:46Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 26, "_links": {"self": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-payments"}, "current": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-payments?page=2&pageSize=2"}}} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-03-17T16:15:23Z", "id": "re_Azhe8TzfUK", "amount": -20, "currency": "EUR", "status": "Paid", "paymentProvider": "mollie", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-01-17T16:00:46"}, {"modifiedDate": "2022-03-17T16:15:23Z", "id": "re_NPKEJhQveu", "amount": -60, "currency": "EUR", "status": "Paid", "paymentProvider": "mollie", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-01-17T16:00:05"}], "pageNumber": 1, "pageSize": 2, "totalResults": 16, "_links": {"self": {"href": "/companies/65fe5864-16d7-41f4-8823-87ae1cf3a283/connections/1dbbf0ab-a27a-45b0-982a-ae0d8985affc/data/commerce-payments"}, "current": {"href": "/companies/65fe5864-16d7-41f4-8823-87ae1cf3a283/connections/1dbbf0ab-a27a-45b0-982a-ae0d8985affc/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/65fe5864-16d7-41f4-8823-87ae1cf3a283/connections/1dbbf0ab-a27a-45b0-982a-ae0d8985affc/data/commerce-payments?page=2&pageSize=2"}}} - PrestaShop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-01-26T15:09:42Z", "id": "1", "amount": 20.9, "currency": "USD", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-09-08T01:52:55"}, {"modifiedDate": "2022-01-26T15:09:42Z", "id": "2", "amount": 20.9, "currency": "USD", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-09-08T01:53:28"}], "pageNumber": 1, "pageSize": 2, "totalResults": 5, "_links": {"self": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-payments"}, "current": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-payments?page=2&pageSize=2"}}} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-02-10T15:18:24Z", "sourceModifiedDate": "2021-03-19T13:17:49Z", "id": "4630233579678", "amount": 600, "currency": "GBP", "status": "Failed", "paymentProvider": "Shopify Payments", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-19T13:17:49Z"}, {"modifiedDate": "2023-02-10T15:18:24Z", "sourceModifiedDate": "2021-03-19T13:18:29Z", "id": "4630234497182", "amount": 600, "currency": "GBP", "status": "Paid", "paymentProvider": "Shopify Payments", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-19T13:18:29Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 46, "_links": {"self": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-payments"}, "current": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-payments?page=2&pageSize=2"}}} - SumUp: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-03-17T16:13:46Z", "id": "07efcdd0-7f61-4d82-957f-52e8f0bd3f89", "amount": 200, "currency": "GBP", "status": "Cancelled", "paymentProvider": "sumup", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-30T12:20:40Z"}, {"modifiedDate": "2022-03-17T16:13:46Z", "id": "46d36a64-ea48-4e37-9340-3548cbf3ca2f", "amount": 15, "currency": "GBP", "status": "Paid", "paymentProvider": "sumup", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-26T21:09:59Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/d9e78460-7ee5-4a34-a3f4-9652a5946b1f/connections/60959ebe-8491-4368-bf0a-f715c3ce2e53/data/commerce-payments"}, "current": {"href": "/companies/d9e78460-7ee5-4a34-a3f4-9652a5946b1f/connections/60959ebe-8491-4368-bf0a-f715c3ce2e53/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/d9e78460-7ee5-4a34-a3f4-9652a5946b1f/connections/60959ebe-8491-4368-bf0a-f715c3ce2e53/data/commerce-payments?page=2&pageSize=2"}}} - WooCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2021-07-13T16:19:00Z", "id": "33", "amount": 0, "currency": "GBP", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-11T09:07:00Z"}, {"modifiedDate": "2021-07-13T16:19:00Z", "id": "35", "amount": 30, "currency": "GBP", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-11T09:08:56Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 5, "_links": {"self": {"href": "/companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-payments"}, "current": {"href": "/companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-payments?page=2&pageSize=2"}}} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2021-10-27T15:22:37Z", "id": "09b94cfc-2d98-11eb-8021-0e1b9dcbeca1", "amount": 25, "currency": "GBP", "status": "Unknown", "dueDate": "0001-01-01T00:00:00", "createdDate": "2020-11-23T14:28:04Z"}, {"modifiedDate": "2021-10-27T15:22:37Z", "id": "226580d6-2d98-11eb-a35c-fed5e63de507", "amount": 58.5, "currency": "GBP", "status": "Unknown", "dueDate": "0001-01-01T00:00:00", "createdDate": "2020-11-23T14:28:47Z"}], "pageNumber": 1, "pageSize": 2, "totalResults": 8, "_links": {"self": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-payments"}, "current": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-payments?page=1&pageSize=2"}, "next": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-payments?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-payment: - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-11T10:33:52Z", "id": "103_1_1_refund", "amount": -64, "currency": "GBP", "status": "Paid", "paymentProvider": "bigpaypay", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-06-15T17:13:13Z"} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-09T11:01:02Z", "sourceModifiedDate": "2021-05-24T10:35:08Z", "id": "01J7HV88GT6B8", "amount": 1000, "currency": "USD", "paymentMethodRef": {"id": "BR5M17TG091SP", "name": "Credit Card"}, "status": "Paid", "paymentProvider": "clover", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-05-24T10:35:08Z"} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-02T09:50:43Z", "id": "1_A62084.1_2023-01-05T03:34:50.296Z", "amount": 0, "currency": "AUD", "paymentMethodRef": {"id": "0"}, "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2023-01-05T03:34:50Z"} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-03-17T16:15:23Z", "id": "re_Azhe8TzfUK", "amount": -20, "currency": "EUR", "status": "Paid", "paymentProvider": "mollie", "dueDate": "0001-01-01T00:00:00", "createdDate": "2022-01-17T16:00:46"} - PrestaShop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-01-26T15:09:42Z", "id": "1", "amount": 20.9, "currency": "USD", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-09-08T01:52:55"} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-02-10T15:18:24Z", "sourceModifiedDate": "2021-03-19T13:17:49Z", "id": "4630233579678", "amount": 600, "currency": "GBP", "status": "Failed", "paymentProvider": "Shopify Payments", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-19T13:17:49Z"} - SumUp: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-03-17T16:13:46Z", "id": "07efcdd0-7f61-4d82-957f-52e8f0bd3f89", "amount": 200, "currency": "GBP", "status": "Cancelled", "paymentProvider": "sumup", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-30T12:20:40Z"} - WooCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2021-07-13T16:19:00Z", "id": "33", "amount": 0, "currency": "GBP", "status": "Paid", "dueDate": "0001-01-01T00:00:00", "createdDate": "2021-03-11T09:07:00Z"} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2021-10-27T15:22:37Z", "id": "09b94cfc-2d98-11eb-8021-0e1b9dcbeca1", "amount": 25, "currency": "GBP", "status": "Unknown", "dueDate": "0001-01-01T00:00:00", "createdDate": "2020-11-23T14:28:04Z"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-product-categories: - speakeasy-default-list-commerce-product-categories: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-02T09:49:11Z", "id": "647208621834281", "name": "Alcoholic beverages", "ancestorRefs": [], "hasChildren": false}, {"modifiedDate": "2023-03-02T09:49:11Z", "id": "647208621834282", "name": "NA beverages", "ancestorRefs": [], "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 8, "_links": {"self": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-productCategories"}, "current": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-productCategories?page=1&pageSize=2"}, "next": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-productCategories?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-product-category: - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-02T09:49:11Z", "id": "647208621834281", "name": "Alcoholic beverages", "ancestorRefs": [], "hasChildren": false} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-products: - speakeasy-default-list-commerce-products: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Amazon Seller Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "Chromecast", "name": "Chromecast", "description": "Cast from your phone to your TV with this all new chromecast.", "categorization": "DEVICE", "isGiftCard": false, "variants": [{"id": "packaging_asin_gating", "name": "Chromecast in a cardboard box", "isTaxEnabled": false, "sku": "packaging_asin_gating", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 50}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2021-02-07T12:30:01Z"}]}, {"id": "vb554a-bl1915", "name": "Waterproof Jacket", "description": "Wind and rainproof, keeping you dry all year round.", "categorization": "COAT", "isGiftCard": false, "variants": [{"id": "ARRIS,SB6141", "name": "Waterproof Jacket (Black)", "isTaxEnabled": false, "sku": "ARRIS,SB6141", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 200}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2021-02-07T12:30:01Z"}, {"id": "RTN66U-N9000", "name": "Waterproof Jacket (Blue)", "isTaxEnabled": false, "sku": "RTN66U-N9000", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 200}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2021-02-07T12:30:01Z"}, {"id": "TLWR841N", "name": "Waterproof Jacket (Red)", "isTaxEnabled": false, "sku": "TLWR841N", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 200}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2021-02-07T12:30:01Z"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-products"}, "current": {"href": "/companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-products?page=2&pageSize=2"}}} - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "103", "name": "[Sample] Canvas Laundry Cart", "description": "The last laundry cart you'll ever buy. This industrial non-collapsable cart is constructed with a steel framed body using heavyweight canvas capped with a soft leather rim sitting on four smooth rolling casters. Keeps the grubby garments off the floor and almost makes laundry enjoyable. Can also be used as the ideal storage solution: many people find it ideal for children's toys or a load of chopped firewood. Load it up and wheel it away. Natural Heavyweight Canvas with Vegetable Tanned Leather Rim Measure�", "categorization": "Shop All, Utility", "isGiftCard": false, "variants": [{"id": "71", "name": "[Sample] Canvas Laundry Cart", "isTaxEnabled": false, "sku": "CLC", "barcode": "", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 200}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}]}, {"id": "104", "name": "[Sample] Utility Caddy", "description": "This powder coated steel utility caddy ensures your cleaning essentials are stowed away in one spot ready for your household chores. Brushes, cloths, liquid soaps can all easily be stashed away. Also ideal to be used as a garden caddy to easily grab from the shed for a days work. Works well as a mop bucket too. The wood carrying handle ensures a comfortable grip when toting it from room to room. Measures 19 h x 36 w x 20 dia cm/7.5 h x 14.1 w x 7.8 dia in", "categorization": "Shop All, Utility", "isGiftCard": false, "variants": [{"id": "72", "name": "[Sample] Utility Caddy", "isTaxEnabled": false, "sku": "OFSUC", "barcode": "", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 45.95}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 18, "_links": {"self": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-products"}, "current": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-products?page=2&pageSize=2"}}} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "DJANHKK2AVEYY", "name": "Coffee", "description": "Coffee", "isGiftCard": false, "variants": [{"id": "DJANHKK2AVEYY", "name": "Coffee", "isTaxEnabled": true, "sku": "12222", "barcode": "1234", "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 3}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}]}, {"id": "NMZHKK6FKF6ZJ", "name": "Laptop", "description": "Cool Laptop", "isGiftCard": false, "variants": [{"id": "NMZHKK6FKF6ZJ", "name": "Laptop", "isTaxEnabled": true, "sku": "111", "barcode": "123", "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 1000}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-products"}, "current": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-products?page=2&pageSize=2"}}} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "647208621834539", "name": "Alcoholic beverages", "description": "Alcoholic beverages", "categorization": "Alcoholic beverages", "isGiftCard": false, "variants": []}, {"id": "647208621834542", "name": "NA beverages", "description": "NA beverages", "categorization": "NA beverages", "isGiftCard": false, "variants": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 39, "_links": {"self": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-products"}, "current": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-products?page=2&pageSize=2"}}} - PrestaShop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "1", "name": "Hummingbird printed t-shirt", "description": "Symbol of lightness and delicacy, the hummingbird evokes curiosity and joy. Studio Design' PolyFaune collection features classic products with colorful patterns, inspired by the traditional japanese origamis. To wear with a chino or jeans. The sublimation textile printing process provides an exceptional color rendering and a color, guaranteed overtime.", "categorization": "Home - Clothes - Men", "isGiftCard": false, "variants": [{"id": "8", "name": "Hummingbird printed t-shirt (Size = XL, Color = Black)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "4", "name": "Hummingbird printed t-shirt (Size = M, Color = Black)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "5", "name": "Hummingbird printed t-shirt (Size = L, Color = White)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "3", "name": "Hummingbird printed t-shirt (Size = M, Color = White)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "6", "name": "Hummingbird printed t-shirt (Size = L, Color = Black)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "1", "name": "Hummingbird printed t-shirt (Size = S, Color = White)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "2", "name": "Hummingbird printed t-shirt (Size = S, Color = Black)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "7", "name": "Hummingbird printed t-shirt (Size = XL, Color = White)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}]}, {"id": "10", "name": "Brown bear cushion", "description": "The brown bear cushion will add a graphic and colorful touch to your sofa, armchair or bed. Create a modern and zen atmosphere that inspires relaxation. Cover 100% cotton, machine washable at 60� / Filling 100% hypoallergenic polyester.", "categorization": "Home - Accessories - Home Accessories", "isGiftCard": false, "variants": [{"id": "24", "name": "Brown bear cushion (Color = White)", "isTaxEnabled": true, "sku": "demo_16", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 18.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "25", "name": "Brown bear cushion (Color = Black)", "isTaxEnabled": true, "sku": "demo_16", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 18.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 22, "_links": {"self": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-products"}, "current": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-products?page=2&pageSize=2"}}} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "6595494117534", "name": "Monitor", "description": "", "categorization": "Asus", "isGiftCard": false, "variants": [{"id": "39444526694558", "name": "Monitor", "isTaxEnabled": true, "sku": "", "barcode": "", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 150}], "inventory": {"totalQuantity": 91, "locations": []}, "shippingRequired": true, "createdDate": "2021-03-19T10:13:22Z"}]}, {"id": "6595497066654", "name": "Mouse", "description": "", "categorization": "Logitech", "isGiftCard": false, "variants": [{"id": "39444533706910", "name": "Mouse", "isTaxEnabled": false, "sku": "", "barcode": "", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 25}], "inventory": {"totalQuantity": 71, "locations": []}, "shippingRequired": true, "createdDate": "2021-03-19T10:14:01Z"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-products"}, "current": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-products?page=2&pageSize=2"}}} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "AX54KZQ3UAVCVPUMNEGFEU35", "name": "Monitor", "categorization": "Hardware", "isGiftCard": false, "variants": [{"id": "A5BUT6SYUNYRSQ2R7GZ6UKN6", "name": "Regular", "isTaxEnabled": true, "vatPercentage": 10, "prices": [{"currency": "GBP", "unitPrice": 200}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2021-02-18T15:47:31Z"}]}, {"id": "FYRIQNFTFRGQNQZGZG66MJWI", "name": "Desk", "categorization": "Furniture", "isGiftCard": false, "variants": [{"id": "VMKSQEABA3WIYGXNAV63JOTZ", "name": "Regular", "isTaxEnabled": true, "vatPercentage": 10, "prices": [{"currency": "GBP", "unitPrice": 70}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2021-02-18T15:47:45Z"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/25debd39-e024-41a1-a86c-4fd47f29c853/connections/d5071fdf-a769-48f3-b39e-e588d515bb83/data/commerce-products"}, "current": {"href": "/companies/25debd39-e024-41a1-a86c-4fd47f29c853/connections/d5071fdf-a769-48f3-b39e-e588d515bb83/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/25debd39-e024-41a1-a86c-4fd47f29c853/connections/d5071fdf-a769-48f3-b39e-e588d515bb83/data/commerce-products?page=2&pageSize=2"}}} - Stripe Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "prod_IaSbzLnxOHmC0i", "name": "Blue T Shirt", "description": "Nice cozy cotton t shirt", "isGiftCard": false, "variants": [{"id": "price_1ICJVEA8m8S1Gh7OIOCDOG8j", "name": "Blue T Shirt - Standard Price", "isTaxEnabled": false, "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 15}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2021-01-22T06:52:16Z"}, {"id": "price_1ICJQgA8m8S1Gh7OfErQdx5R", "name": "Blue T Shirt - Standard Price", "isTaxEnabled": false, "vatPercentage": 0, "prices": [{"currency": "USD", "unitPrice": 30}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2021-01-22T06:47:34Z"}, {"id": "price_1HzHiCA8m8S1Gh7OXZVa6r3F", "name": "Blue T Shirt - Standard Price", "isTaxEnabled": false, "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 15}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2020-12-17T08:19:48Z"}]}, {"id": "prod_IQ6G1MDsvUb87Y", "name": "Laptop", "isGiftCard": false, "variants": [{"id": "price_1HpG3tA8m8S1Gh7Oa6bGLvVD", "name": "Laptop - Standard Price", "isTaxEnabled": false, "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 100}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2020-11-19T16:32:45Z"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-products"}, "current": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-products?page=2&pageSize=2"}}} - WooCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "27", "name": "Monitor", "description": "", "categorization": "Hardware", "isGiftCard": false, "variants": [{"id": "27", "name": "Monitor", "isTaxEnabled": true, "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 150}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2021-03-11T08:55:22"}]}, {"id": "28", "name": "Keyboard", "description": "", "categorization": "Hardware", "isGiftCard": false, "variants": [{"id": "28", "name": "Keyboard", "isTaxEnabled": true, "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 30}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2021-03-11T09:02:58"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-products"}, "current": {"href": "/companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-products?page=1&pageSize=2"}, "next": {"href": "/companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-products?page=2&pageSize=2"}}} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"id": "9d21fd90-a34a-11eb-b574-ad6abe469b61", "name": "T-Shirt", "categorization": "Clothing", "isGiftCard": false, "variants": [{"id": "bb9bcf30-a34a-11eb-b574-ad6abe469b61", "name": "Medium", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 10}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}, {"id": "b919df40-a34a-11eb-b574-ad6abe469b61", "name": "Large", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 10}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}, {"id": "bcb5cab0-a34a-11eb-b574-ad6abe469b61", "name": "Small", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 10}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}]}, {"id": "e02c2930-a34a-11eb-b9db-8f5efc0924aa", "name": "Hoodie", "categorization": "Clothing", "isGiftCard": false, "variants": [{"id": "fa180e40-a34a-11eb-b9db-8f5efc0924aa", "name": "Medium", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 30}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}, {"id": "fc412fd0-a34a-11eb-b9db-8f5efc0924aa", "name": "Extra Large", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 30}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}, {"id": "f8a03b50-a34a-11eb-b9db-8f5efc0924aa", "name": "Small", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 30}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}, {"id": "fac1bbc0-a34a-11eb-b9db-8f5efc0924aa", "name": "Large", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 30}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-products"}, "current": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-products?page=1&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-product: - Amazon Seller Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "Chromecast", "name": "Chromecast", "description": "Cast from your phone to your TV with this all new chromecast.", "categorization": "DEVICE", "isGiftCard": false, "variants": [{"id": "packaging_asin_gating", "name": "Chromecast in a cardboard box", "isTaxEnabled": false, "sku": "packaging_asin_gating", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 50}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2021-02-07T12:30:01Z"}]} - BigCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "103", "name": "[Sample] Canvas Laundry Cart", "description": "The last laundry cart you'll ever buy. This industrial non-collapsable cart is constructed with a steel framed body using heavyweight canvas capped with a soft leather rim sitting on four smooth rolling casters. Keeps the grubby garments off the floor and almost makes laundry enjoyable. Can also be used as the ideal storage solution: many people find it ideal for children's toys or a load of chopped firewood. Load it up and wheel it away. Natural Heavyweight Canvas with Vegetable Tanned Leather Rim Measure�", "categorization": "Shop All, Utility", "isGiftCard": false, "variants": [{"id": "71", "name": "[Sample] Canvas Laundry Cart", "isTaxEnabled": false, "sku": "CLC", "barcode": "", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 200}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}]} - Clover: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "DJANHKK2AVEYY", "name": "Coffee", "description": "Coffee", "isGiftCard": false, "variants": [{"id": "DJANHKK2AVEYY", "name": "Coffee", "isTaxEnabled": true, "sku": "12222", "barcode": "1234", "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 3}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}]} - Lightspeed K Trial: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "647208621834539", "name": "Alcoholic beverages", "description": "Alcoholic beverages", "categorization": "Alcoholic beverages", "isGiftCard": false, "variants": []} - PrestaShop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "1", "name": "Hummingbird printed t-shirt", "description": "Symbol of lightness and delicacy, the hummingbird evokes curiosity and joy. Studio Design' PolyFaune collection features classic products with colorful patterns, inspired by the traditional japanese origamis. To wear with a chino or jeans. The sublimation textile printing process provides an exceptional color rendering and a color, guaranteed overtime.", "categorization": "Home - Clothes - Men", "isGiftCard": false, "variants": [{"id": "8", "name": "Hummingbird printed t-shirt (Size = XL, Color = Black)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "4", "name": "Hummingbird printed t-shirt (Size = M, Color = Black)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "5", "name": "Hummingbird printed t-shirt (Size = L, Color = White)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "3", "name": "Hummingbird printed t-shirt (Size = M, Color = White)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "6", "name": "Hummingbird printed t-shirt (Size = L, Color = Black)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "1", "name": "Hummingbird printed t-shirt (Size = S, Color = White)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "2", "name": "Hummingbird printed t-shirt (Size = S, Color = Black)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}, {"id": "7", "name": "Hummingbird printed t-shirt (Size = XL, Color = White)", "isTaxEnabled": true, "sku": "demo_1", "vatPercentage": 6, "prices": [{"currency": "USD", "unitPrice": 23.9}], "inventory": {"totalQuantity": 300, "locations": []}, "shippingRequired": true, "createdDate": "0001-01-01T00:00:00"}]} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "6595494117534", "name": "Monitor", "description": "", "categorization": "Asus", "isGiftCard": false, "variants": [{"id": "39444526694558", "name": "Monitor", "isTaxEnabled": true, "sku": "", "barcode": "", "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 150}], "inventory": {"totalQuantity": 91, "locations": []}, "shippingRequired": true, "createdDate": "2021-03-19T10:13:22Z"}]} - Square: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "AX54KZQ3UAVCVPUMNEGFEU35", "name": "Monitor", "categorization": "Hardware", "isGiftCard": false, "variants": [{"id": "A5BUT6SYUNYRSQ2R7GZ6UKN6", "name": "Regular", "isTaxEnabled": true, "vatPercentage": 10, "prices": [{"currency": "GBP", "unitPrice": 200}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "2021-02-18T15:47:31Z"}]} - Stripe Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "prod_IaSbzLnxOHmC0i", "name": "Blue T Shirt", "description": "Nice cozy cotton t shirt", "isGiftCard": false, "variants": [{"id": "price_1ICJVEA8m8S1Gh7OIOCDOG8j", "name": "Blue T Shirt - Standard Price", "isTaxEnabled": false, "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 15}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2021-01-22T06:52:16Z"}, {"id": "price_1ICJQgA8m8S1Gh7OfErQdx5R", "name": "Blue T Shirt - Standard Price", "isTaxEnabled": false, "vatPercentage": 0, "prices": [{"currency": "USD", "unitPrice": 30}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2021-01-22T06:47:34Z"}, {"id": "price_1HzHiCA8m8S1Gh7OXZVa6r3F", "name": "Blue T Shirt - Standard Price", "isTaxEnabled": false, "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 15}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2020-12-17T08:19:48Z"}]} - WooCommerce: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "27", "name": "Monitor", "description": "", "categorization": "Hardware", "isGiftCard": false, "variants": [{"id": "27", "name": "Monitor", "isTaxEnabled": true, "vatPercentage": 0, "prices": [{"currency": "GBP", "unitPrice": 150}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": true, "createdDate": "2021-03-11T08:55:22"}]} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"id": "9d21fd90-a34a-11eb-b574-ad6abe469b61", "name": "T-Shirt", "categorization": "Clothing", "isGiftCard": false, "variants": [{"id": "bb9bcf30-a34a-11eb-b574-ad6abe469b61", "name": "Medium", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 10}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}, {"id": "b919df40-a34a-11eb-b574-ad6abe469b61", "name": "Large", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 10}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}, {"id": "bcb5cab0-a34a-11eb-b574-ad6abe469b61", "name": "Small", "isTaxEnabled": true, "vatPercentage": 20, "prices": [{"currency": "GBP", "unitPrice": 10}], "inventory": {"totalQuantity": 0, "locations": []}, "shippingRequired": false, "createdDate": "0001-01-01T00:00:00"}]} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-commerce-transactions: - speakeasy-default-list-commerce-transactions: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"createdDate": "2022-01-17T16:00:46", "modifiedDate": "2022-03-17T15:47:28Z", "id": "re_Azhe8TzfUK", "totalAmount": -20, "currency": "EUR", "type": "Refund"}, {"createdDate": "2022-01-17T16:00:05", "modifiedDate": "2022-03-17T15:47:28Z", "id": "re_NPKEJhQveu", "totalAmount": -60, "currency": "EUR", "type": "Refund"}], "pageNumber": 1, "pageSize": 2, "totalResults": 7, "_links": {"self": {"href": "/companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-transactions"}, "current": {"href": "/companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-transactions?page=1&pageSize=2"}, "next": {"href": "/companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-transactions?page=2&pageSize=2"}}} - Mollie Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"createdDate": "2022-01-17T16:00:46", "modifiedDate": "2022-08-17T11:33:19Z", "id": "re_Azhe8TzfUK", "totalAmount": -20, "currency": "EUR", "type": "Refund", "subType": "PaymentRefund"}, {"createdDate": "2022-01-17T16:00:05", "modifiedDate": "2022-08-17T11:33:19Z", "id": "re_NPKEJhQveu", "totalAmount": -60, "currency": "EUR", "type": "Refund", "subType": "PaymentRefund"}], "pageNumber": 1, "pageSize": 2, "totalResults": 7, "_links": {"self": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-transactions"}, "current": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-transactions?page=1&pageSize=2"}, "next": {"href": "/companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-transactions?page=2&pageSize=2"}}} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"createdDate": "2021-03-19T13:16:26", "modifiedDate": "2023-02-10T15:18:23Z", "sourceModifiedDate": "2021-03-19T13:16:26", "id": "ShopifyPayment-1633176289438", "totalAmount": 175, "currency": "GBP", "type": "Payment", "subType": "charge", "transactionSourceRef": {"id": "3684116791454", "type": "Order"}}, {"createdDate": "2021-03-19T13:16:26", "modifiedDate": "2023-02-10T15:18:23Z", "sourceModifiedDate": "2021-03-19T13:16:26", "id": "ShopifyPayment-1633176289438:Fee", "totalAmount": -4.05, "currency": "GBP", "type": "PaymentFee", "subType": "charge", "transactionSourceRef": {"id": "3684116791454", "type": "Order"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 64, "_links": {"self": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-transactions"}, "current": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-transactions?page=1&pageSize=2"}, "next": {"href": "/companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-transactions?page=2&pageSize=2"}}} - Stripe Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"createdDate": "2020-11-19T16:56:06Z", "modifiedDate": "2022-09-30T11:18:28Z", "id": "txn_1HpGQUA8m8S1Gh7OR21pB0Yj", "totalAmount": 50, "currency": "GBP", "type": "Payment", "subType": "charge", "transactionSourceRef": {"id": "ch_1HpGQUA8m8S1Gh7Ot4WDTus5", "type": "Payment"}}, {"createdDate": "2020-11-19T16:56:06Z", "modifiedDate": "2022-09-30T11:18:28Z", "id": "txn_1HpGQUA8m8S1Gh7OR21pB0Yj:Stripe processing fees", "totalAmount": -0.9, "currency": "GBP", "type": "PaymentFee", "subType": "stripe_fee", "transactionSourceRef": {"id": "ch_1HpGQUA8m8S1Gh7Ot4WDTus5", "type": "Payment"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 70, "_links": {"self": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-transactions"}, "current": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-transactions?page=1&pageSize=2"}, "next": {"href": "/companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-transactions?page=2&pageSize=2"}}} - SumUp: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"createdDate": "2021-03-26T21:09:59Z", "modifiedDate": "2022-09-14T10:58:03Z", "id": "46d36a64-ea48-4e37-9340-3548cbf3ca2f", "totalAmount": 15, "currency": "GBP", "type": "Payment", "subType": "PAYMENT"}, {"createdDate": "2021-03-30T12:22:14Z", "modifiedDate": "2022-09-14T10:58:03Z", "id": "471914a4-a82f-4fc4-b39b-9986fd706d26", "totalAmount": 215, "currency": "GBP", "type": "Payment", "subType": "PAYMENT"}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-transactions"}, "current": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-transactions?page=1&pageSize=2"}, "next": {"href": "/companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-transactions?page=2&pageSize=2"}}} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"createdDate": "2020-11-23T14:27:38Z", "modifiedDate": "2021-10-27T15:23:04Z", "sourceModifiedDate": "2020-11-25T23:10:01Z", "id": "PAYMENT:09b94cfc-2d98-11eb-8021-0e1b9dcbeca1", "totalAmount": 25, "currency": "GBP", "type": "Payment", "transactionSourceRef": {"id": "09b94cfc-2d98-11eb-8021-0e1b9dcbeca1", "type": "Unknown"}}, {"createdDate": "2020-11-23T14:28:20Z", "modifiedDate": "2021-10-27T15:23:04Z", "sourceModifiedDate": "2020-11-25T23:10:02Z", "id": "PAYMENT:226580d6-2d98-11eb-a35c-fed5e63de507", "totalAmount": 58.5, "currency": "GBP", "type": "Payment", "transactionSourceRef": {"id": "226580d6-2d98-11eb-a35c-fed5e63de507", "type": "Unknown"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 16, "_links": {"self": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-transactions"}, "current": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-transactions?page=1&pageSize=2"}, "next": {"href": "/companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-transactions?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-transaction: - Mollie: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"createdDate": "2022-01-17T16:00:46", "modifiedDate": "2022-03-17T15:47:28Z", "id": "re_Azhe8TzfUK", "totalAmount": -20, "currency": "EUR", "type": "Refund"} - Mollie Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"createdDate": "2022-01-17T16:00:46", "modifiedDate": "2022-08-17T11:33:19Z", "id": "re_Azhe8TzfUK", "totalAmount": -20, "currency": "EUR", "type": "Refund", "subType": "PaymentRefund"} - Shopify: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"createdDate": "2021-03-19T13:16:26", "modifiedDate": "2023-02-10T15:18:23Z", "sourceModifiedDate": "2021-03-19T13:16:26", "id": "ShopifyPayment-1633176289438", "totalAmount": 175, "currency": "GBP", "type": "Payment", "subType": "charge", "transactionSourceRef": {"id": "3684116791454", "type": "Order"}} - Stripe Test: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"createdDate": "2020-11-19T16:56:06Z", "modifiedDate": "2022-09-30T11:18:28Z", "id": "txn_1HpGQUA8m8S1Gh7OR21pB0Yj", "totalAmount": 50, "currency": "GBP", "type": "Payment", "subType": "charge", "transactionSourceRef": {"id": "ch_1HpGQUA8m8S1Gh7Ot4WDTus5", "type": "Payment"}} - SumUp: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"createdDate": "2021-03-26T21:09:59Z", "modifiedDate": "2022-09-14T10:58:03Z", "id": "46d36a64-ea48-4e37-9340-3548cbf3ca2f", "totalAmount": 15, "currency": "GBP", "type": "Payment", "subType": "PAYMENT"} - Zettle: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"createdDate": "2020-11-23T14:27:38Z", "modifiedDate": "2021-10-27T15:23:04Z", "sourceModifiedDate": "2020-11-25T23:10:01Z", "id": "PAYMENT:09b94cfc-2d98-11eb-8021-0e1b9dcbeca1", "totalAmount": 25, "currency": "GBP", "type": "Payment", "transactionSourceRef": {"id": "09b94cfc-2d98-11eb-8021-0e1b9dcbeca1", "type": "Unknown"}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - generate-excel-report: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportType: "enhancedFinancials" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-generate-excel-report: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportType: "enhancedFinancials" - responses: - "200": - application/json: {"lastGenerated": "2023-01-25T22:36:05.125Z", "inProgress": true, "queued": "2023-01-25T22:36:05.125Z", "success": true, "errorMessage": "string", "lastInvocationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "reportType": "audit", "fileSize": 0} - "400": - application/json: {} - "500": - application/json: {} - get-excel-report-generation-status: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportType: "enhancedCashFlow" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportType: "audit" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-excel-report-generation-status: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportType: "enhancedCashFlow" - responses: - "200": - application/json: {"lastGenerated": "2023-01-25T22:36:05.125Z", "inProgress": true, "queued": "2023-01-25T22:36:05.125Z", "success": true, "errorMessage": "string", "lastInvocationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "reportType": "enhancedFinancials", "fileSize": 0} - "400": - application/json: {} - "500": - application/json: {} - download-excel-report: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportType: "enhancedCashFlow" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-excel-report: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - reportType: "enhancedFinancials" - responses: - "200": - application/octet-stream: "0x8CD2A8f2Ba" - "400": - application/json: {} - "500": - application/json: {} - list-accounting-account-transactions: - speakeasy-default-list-accounting-account-transactions: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:18", "sourceModifiedDate": "2022-05-13T01:06:00", "id": "062b3a9b-b04f-4d9c-9ebc-81dcb5bbf285", "transactionId": "356deb9f-98e6-4d6f-8db3-b378241895a1", "note": "Direct income 38e8c917-0afc-4583-8ffe-1b53ad601197", "bankAccountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}, "date": "2022-04-19T00:00:00", "status": "Unreconciled", "currency": "GBP", "currencyRate": 1, "lines": [{"description": "Payment for direct income $38e8c917-0afc-4583-8ffe-1b53ad601197", "recordRef": {"id": "38e8c917-0afc-4583-8ffe-1b53ad601197", "dataType": "directIncomes"}, "amount": 188.33}], "totalAmount": 188.33, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:18", "sourceModifiedDate": "2023-02-13T00:34:00", "id": "f2656119-9521-4d51-a24d-003b44c1410b", "transactionId": "1fde4f8f-68ca-48fc-8fe7-79ac467d2946", "note": "Direct income c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "bankAccountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}, "date": "2022-04-19T00:00:00", "status": "Void", "currency": "GBP", "currencyRate": 1, "lines": [{"description": "Payment for direct income $c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "recordRef": {"id": "c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "dataType": "directIncomes"}, "amount": 32095.91}], "totalAmount": 32095.91, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1745, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/accountTransactions"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/accountTransactions?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/accountTransactions?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:13:23", "sourceModifiedDate": "2023-12-16T05:04:10", "id": "D7B-933784104", "transactionId": "D7B-933784104", "bankAccountRef": {"id": "20000-933270541", "name": "Checking"}, "date": "2022-12-01T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"recordRef": {"id": "D7B-933784104", "dataType": "directCosts"}, "amount": -1200}], "totalAmount": -1200, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:13:23", "sourceModifiedDate": "2023-12-16T05:04:11", "id": "DFA-933785132", "transactionId": "DFA-933785132", "bankAccountRef": {"id": "20000-933270541", "name": "Checking"}, "date": "2022-12-05T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"recordRef": {"id": "DFA-933785132", "dataType": "directCosts"}, "amount": -35}], "totalAmount": -35, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 652, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/accountTransactions"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/accountTransactions?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/accountTransactions?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:37:16", "sourceModifiedDate": "2016-09-12T18:13:07Z", "id": "85", "transactionId": "85", "note": "Opening Balance from Bank", "bankAccountRef": {"id": "57", "name": "Visa Credit Card"}, "date": "2015-08-12T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"description": "Opening Balance from Bank", "recordRef": {"id": "PUR-85", "dataType": "directCosts"}, "amount": -3831.8}], "totalAmount": -3831.8, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:37:17", "sourceModifiedDate": "2016-09-12T15:26:26Z", "id": "5", "transactionId": "5", "bankAccountRef": {"id": "81", "name": "Current"}, "date": "2015-11-24T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"description": "contribution to start business", "recordRef": {"id": "5-1", "dataType": "directIncomes"}, "amount": 10000}, {"description": "funds borrowed to start business", "recordRef": {"id": "5-2", "dataType": "directIncomes"}, "amount": 25000}], "totalAmount": 35000, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 9141, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/accountTransactions"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/accountTransactions?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/accountTransactions?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:03:12", "sourceModifiedDate": "2018-12-17T14:56:20Z", "id": "1", "transactionId": "1", "note": "Opening Balance from Bank", "bankAccountRef": {"id": "61", "name": "Dave PP Current"}, "date": "2018-09-21T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"recordRef": {"id": "1", "dataType": "directIncomes"}, "amount": 170.23}], "totalAmount": 170.23}, {"modifiedDate": "2023-01-18T11:03:11", "sourceModifiedDate": "2018-12-17T14:56:44Z", "id": "15", "transactionId": "15", "note": "Payment to Google", "bankAccountRef": {"id": "61", "name": "Dave PP Current"}, "date": "2018-09-21T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"description": "Payment to Google", "recordRef": {"id": "PUR-15", "dataType": "directCosts"}, "amount": -1.59}], "totalAmount": -1.59}], "pageNumber": 1, "pageSize": 2, "totalResults": 5984, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/accountTransactions"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/accountTransactions?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/accountTransactions?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:37:10", "sourceModifiedDate": "2021-01-02T22:51:40", "id": "74004690-82a1-4810-aaca-6ce575af94b4", "transactionId": "74004690-82a1-4810-aaca-6ce575af94b4", "bankAccountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "date": "2021-12-20T00:00:00", "status": "Reconciled", "currency": "GBP", "currencyRate": 1, "lines": [{"recordRef": {"id": "74004690-82a1-4810-aaca-6ce575af94b4", "dataType": "billPayments"}, "amount": -7267.2}], "totalAmount": -7267.2, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:37:10", "sourceModifiedDate": "2021-01-02T22:50:58", "id": "65b746c8-9a5d-4a95-8096-d2316fcff592", "transactionId": "65b746c8-9a5d-4a95-8096-d2316fcff592", "bankAccountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "date": "2022-02-17T00:00:00", "status": "Reconciled", "currency": "GBP", "currencyRate": 1, "lines": [{"recordRef": {"id": "65b746c8-9a5d-4a95-8096-d2316fcff592", "dataType": "payments"}, "amount": 4200}], "totalAmount": 4200, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 70, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/accountTransactions"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/accountTransactions?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/accountTransactions?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-account-transaction: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountTransactionId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:18", "sourceModifiedDate": "2022-05-13T01:06:00", "id": "062b3a9b-b04f-4d9c-9ebc-81dcb5bbf285", "transactionId": "356deb9f-98e6-4d6f-8db3-b378241895a1", "note": "Direct income 38e8c917-0afc-4583-8ffe-1b53ad601197", "bankAccountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}, "date": "2022-04-19T00:00:00", "status": "Unreconciled", "currency": "GBP", "currencyRate": 1, "lines": [{"description": "Payment for direct income $38e8c917-0afc-4583-8ffe-1b53ad601197", "recordRef": {"id": "38e8c917-0afc-4583-8ffe-1b53ad601197", "dataType": "directIncomes"}, "amount": 188.33}], "totalAmount": 188.33, "metadata": {"isDeleted": false}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountTransactionId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:13:23", "sourceModifiedDate": "2023-12-16T05:04:10", "id": "D7B-933784104", "transactionId": "D7B-933784104", "bankAccountRef": {"id": "20000-933270541", "name": "Checking"}, "date": "2022-12-01T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"recordRef": {"id": "D7B-933784104", "dataType": "directCosts"}, "amount": -1200}], "totalAmount": -1200, "metadata": {"isDeleted": false}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountTransactionId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:37:16", "sourceModifiedDate": "2016-09-12T18:13:07Z", "id": "85", "transactionId": "85", "note": "Opening Balance from Bank", "bankAccountRef": {"id": "57", "name": "Visa Credit Card"}, "date": "2015-08-12T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"description": "Opening Balance from Bank", "recordRef": {"id": "PUR-85", "dataType": "directCosts"}, "amount": -3831.8}], "totalAmount": -3831.8, "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountTransactionId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:03:12", "sourceModifiedDate": "2018-12-17T14:56:20Z", "id": "1", "transactionId": "1", "note": "Opening Balance from Bank", "bankAccountRef": {"id": "61", "name": "Dave PP Current"}, "date": "2018-09-21T00:00:00", "status": "Unknown", "currency": "GBP", "currencyRate": 1, "lines": [{"recordRef": {"id": "1", "dataType": "directIncomes"}, "amount": 170.23}], "totalAmount": 170.23} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountTransactionId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:37:10", "sourceModifiedDate": "2021-01-02T22:51:40", "id": "74004690-82a1-4810-aaca-6ce575af94b4", "transactionId": "74004690-82a1-4810-aaca-6ce575af94b4", "bankAccountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "date": "2021-12-20T00:00:00", "status": "Reconciled", "currency": "GBP", "currencyRate": 1, "lines": [{"recordRef": {"id": "74004690-82a1-4810-aaca-6ce575af94b4", "dataType": "billPayments"}, "amount": -7267.2}], "totalAmount": -7267.2, "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountTransactionId: "" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-direct-costs: - speakeasy-default-list-accounting-direct-costs: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-09-18T20:59:02", "id": "994ad234-ca05-466e-8e6a-117783b38cf6", "reference": "005b7b62-dc9f-42d2-85a2-4a2cefc6bab2", "note": "Direct Cost with 1 line items, totaling 242.20", "contactRef": {"id": "D4Q4iYwHou", "dataType": "suppliers"}, "issueDate": "2022-04-27T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Underground - Drain Saddle Branches 160mm x 110mm x 87 �", "unitAmount": 220.18, "quantity": 1, "discountAmount": 0, "discountPercentage": 0, "subTotal": 220.18, "taxAmount": 22.02, "totalAmount": 242.2, "accountRef": {"id": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Purchases"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "2", "name": "Solvent Weld Branch 160mm x 110mm x 87 �"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "994ad234-ca05-466e-8e6a-117783b38cf6", "note": "Payment for direct cost 994ad234-ca05-466e-8e6a-117783b38cf6", "reference": "Direct Cost 994ad234-ca05-466e-8e6a-117783b38cf6", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-04-27T00:00:00", "totalAmount": 242.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-04-27T00:00:00", "totalAmount": -242.2}}], "subTotal": 220.18, "taxAmount": 22.02, "totalAmount": 242.2, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-10-13T07:15:02", "id": "735b5f9b-9e58-4f8f-8a9d-083de599986c", "reference": "7d011ce8-89ae-43e7-a2ed-cf028534ccdc", "note": "Direct Cost with 4 line items, totaling 13684.57", "contactRef": {"id": "d3tf43eghS", "dataType": "suppliers"}, "issueDate": "2022-05-02T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Underground - Drain Yard Gully", "unitAmount": 148.88, "quantity": 5, "discountAmount": 73.62, "discountPercentage": 9.89, "subTotal": 670.78, "taxAmount": 67.08, "totalAmount": 737.86, "accountRef": {"id": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Purchases"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "00491160-6ee5-4d76-9f34-998f00687481", "name": "Aluminium Silt Bucket"}, "trackingCategoryRefs": []}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 82.68, "quantity": 3, "discountAmount": 0, "discountPercentage": 0, "subTotal": 248.04, "taxAmount": 24.8, "totalAmount": 272.84, "accountRef": {"id": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Purchases"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": []}, {"description": "Grease Trap", "unitAmount": 1192.51, "quantity": 8, "discountAmount": 0, "discountPercentage": 0, "subTotal": 9540.08, "taxAmount": 954.01, "totalAmount": 10494.09, "accountRef": {"id": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Purchases"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": []}, {"description": "Underground - Drain Saddle Branches 160mm x 110mm x 87 �", "unitAmount": 220.18, "quantity": 9, "discountAmount": 0, "discountPercentage": 0, "subTotal": 1981.62, "taxAmount": 198.16, "totalAmount": 2179.78, "accountRef": {"id": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Purchases"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "2", "name": "Solvent Weld Branch 160mm x 110mm x 87 �"}, "trackingCategoryRefs": [{"id": "costcode_1", "name": "Green Concrete"}]}], "paymentAllocations": [{"payment": {"id": "735b5f9b-9e58-4f8f-8a9d-083de599986c", "note": "Payment for direct cost 735b5f9b-9e58-4f8f-8a9d-083de599986c", "reference": "Direct Cost 735b5f9b-9e58-4f8f-8a9d-083de599986c", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-02T00:00:00", "totalAmount": 13684.57}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-02T00:00:00", "totalAmount": -13684.57}}], "subTotal": 12440.52, "taxAmount": 1244.05, "totalAmount": 13684.57, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 90, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/directCosts"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/directCosts?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-05-19T17:17:33Z", "id": "6ab3e391-97d7-ec11-8e7e-000d3a0cfe40", "reference": "INS000090", "note": "3931", "issueDate": "2022-05-21T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "test expenses 2", "unitAmount": 17.89, "quantity": -1, "subTotal": -17.89, "taxAmount": 0, "totalAmount": -17.89, "accountRef": {"id": "30"}, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "6ab3e391-97d7-ec11-8e7e-000d3a0cfe40", "accountRef": {"id": "TEST"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-21T00:00:00", "totalAmount": -17.89}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-21T00:00:00", "totalAmount": -17.89}}], "subTotal": -17.89, "taxAmount": 0, "totalAmount": -17.89, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-05-19T15:26:48Z", "id": "b832f518-88d7-ec11-8e7e-000d3a0cfe40", "reference": "INS000050", "note": "3915", "issueDate": "2022-05-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Utilities Expense", "unitAmount": 14.76, "quantity": 1, "subTotal": 14.76, "taxAmount": 0, "totalAmount": 14.76, "accountRef": {"id": "31300"}, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "b832f518-88d7-ec11-8e7e-000d3a0cfe40", "accountRef": {"id": "TEST"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-23T00:00:00", "totalAmount": 14.76}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-23T00:00:00", "totalAmount": 14.76}}], "subTotal": 14.76, "taxAmount": 0, "totalAmount": 14.76, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 67, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/directCosts"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/directCosts?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:20:36Z", "sourceModifiedDate": "2019-11-22T14:31:14Z", "id": "190325254", "note": "Atomic Software Limite Wellington,Nzl", "issueDate": "2017-11-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Atomic Software Limite Wellington,Nzl", "unitAmount": 11.92, "quantity": 1, "subTotal": 11.92, "taxAmount": 2.38, "totalAmount": 14.3, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "190325254", "note": "Atomic Software Limite Wellington,Nzl", "accountRef": {"id": "750-1", "name": "Bank Account: Business Current Account"}, "currency": "GBP", "paidOnDate": "2017-11-23T00:00:00", "totalAmount": 14.3}, "allocation": {"currency": "GBP", "allocatedOnDate": "2017-11-23T00:00:00", "totalAmount": 14.3}}], "subTotal": 11.92, "taxAmount": 2.38, "totalAmount": 14.3, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:20:36Z", "sourceModifiedDate": "2022-10-24T12:35:29Z", "id": "348108455", "note": "Atomic Software Limite Wellington,Nzl", "issueDate": "2017-11-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Atomic Software Limite Wellington,Nzl", "unitAmount": 11.92, "quantity": 1, "subTotal": 11.92, "taxAmount": 2.38, "totalAmount": 14.3, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "348108455", "note": "Atomic Software Limite Wellington,Nzl", "accountRef": {"id": "750-1", "name": "Bank Account: Business Current Account"}, "currency": "GBP", "paidOnDate": "2017-11-23T00:00:00", "totalAmount": 14.3}, "allocation": {"currency": "GBP", "allocatedOnDate": "2017-11-23T00:00:00", "totalAmount": 14.3}}], "subTotal": 11.92, "taxAmount": 2.38, "totalAmount": 14.3, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 456, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/directCosts"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/directCosts?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-10-28T15:21:46", "id": "29870062", "reference": "Food to keep me working", "note": "Food to keep me working", "contactRef": {"id": "Sainsburys", "dataType": "suppliers"}, "issueDate": "2019-02-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Food to keep me working", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "3361426", "name": "Meals & Entertainment"}, "trackingCategoryRefs": [{"id": "4370503", "name": "Meals & Entertainment"}]}], "paymentAllocations": [], "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-10-28T15:21:47", "id": "107509561", "reference": "Buying pencils", "note": "Buying pencils", "contactRef": {"id": "Pencils Wholesale", "dataType": "suppliers"}, "issueDate": "2020-01-27T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Buying pencils", "unitAmount": 43.48, "quantity": 1, "subTotal": 43.48, "taxAmount": 6.52, "totalAmount": 50, "accountRef": {"id": "3380551", "name": "Supplies"}, "trackingCategoryRefs": [{"id": "5397997", "name": "Supplies"}]}], "paymentAllocations": [], "subTotal": 43.48, "taxAmount": 6.52, "totalAmount": 50, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 73, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/connections/100d8da9-91b1-495c-ae2e-2219c244acae/data/directCosts"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/connections/100d8da9-91b1-495c-ae2e-2219c244acae/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/connections/100d8da9-91b1-495c-ae2e-2219c244acae/data/directCosts?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:13:57Z", "sourceModifiedDate": "2023-12-16T05:04:10", "id": "D7B-933784104", "reference": "93", "contactRef": {"id": "360000-933272659", "dataType": "suppliers"}, "issueDate": "2022-12-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 1200, "quantity": 1, "subTotal": 1200, "totalAmount": 1200, "accountRef": {"id": "3C0000-933270542", "name": "Rent"}, "trackingCategoryRefs": [{"id": "80000007-1197713802", "name": "Overhead"}], "tracking": {"recordRefs": [{"id": "80000007-1197713802", "dataType": "trackingCategories"}, {"id": "800000B0-1197755238", "dataType": "customers"}]}}], "paymentAllocations": [{"payment": {"id": "D7B-933784104", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-01T00:00:00", "totalAmount": 1200}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-01T00:00:00", "totalAmount": 1200}}], "subTotal": 1200, "taxAmount": 0, "totalAmount": 1200, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:13:57Z", "sourceModifiedDate": "2023-12-16T05:04:11", "id": "DFA-933785132", "reference": "95", "contactRef": {"id": "320000-933272659", "dataType": "suppliers"}, "issueDate": "2022-12-05T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 35, "quantity": 1, "subTotal": 35, "totalAmount": 35, "accountRef": {"id": "280000-933270542", "name": "Freight & Delivery"}, "trackingCategoryRefs": [{"id": "40000-933272658", "name": "Remodel"}], "tracking": {"recordRefs": [{"id": "40000-933272658", "dataType": "trackingCategories"}, {"id": "1E0000-933272658", "dataType": "customers"}]}}], "paymentAllocations": [{"payment": {"id": "DFA-933785132", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-05T00:00:00", "totalAmount": 35}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-05T00:00:00", "totalAmount": 35}}], "subTotal": 35, "taxAmount": 0, "totalAmount": 35, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 250, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/directCosts"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/directCosts?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:40Z", "sourceModifiedDate": "2016-09-12T18:13:07Z", "id": "PUR-85", "note": "Opening Balance from Bank", "issueDate": "2015-08-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 3831.8, "quantity": 1, "subTotal": 3831.8, "taxAmount": 0, "totalAmount": 3831.8, "accountRef": {"id": "55", "name": "Opening Balance Equity"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"recordRefs": []}}], "paymentAllocations": [{"payment": {"id": "85", "reference": "Opening Balance from Bank", "accountRef": {"id": "57", "name": "Visa Credit Card"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2015-08-12T00:00:00", "totalAmount": 3831.8}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2015-08-12T00:00:00", "totalAmount": -3831.8}}], "subTotal": 3831.8, "taxAmount": 0, "totalAmount": 3831.8, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:40Z", "sourceModifiedDate": "2022-08-19T10:19:56Z", "id": "PUR-3617", "reference": "2001", "contactRef": {"id": "27", "dataType": "suppliers"}, "issueDate": "2015-11-27T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Insurance - general liability", "unitAmount": 750, "quantity": 1, "subTotal": 750, "taxAmount": 150, "totalAmount": 900, "accountRef": {"id": "22", "name": "Insurance Expense-General Liability Insurance"}, "taxRateRef": {"id": "3_Bills", "name": "20.0% S Bills", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "tracking": {"recordRefs": []}}], "paymentAllocations": [{"payment": {"id": "3617", "note": "2001", "accountRef": {"id": "81", "name": "Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2015-11-27T00:00:00", "totalAmount": 900}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2015-11-27T00:00:00", "totalAmount": -900}}], "subTotal": 750, "taxAmount": 150, "totalAmount": 900, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 4460, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/directCosts"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/directCosts?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:59Z", "sourceModifiedDate": "2018-12-17T14:56:44Z", "id": "PUR-15", "note": "Payment to Google", "issueDate": "2018-09-21T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Payment to Google", "unitAmount": 1.59, "quantity": 1, "subTotal": 1.59, "taxAmount": 0, "totalAmount": 1.59, "accountRef": {"id": "37", "name": "Computer equipment accumulated depreciation brought forward"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "15", "reference": "Payment to Google", "accountRef": {"id": "61", "name": "Dave PP Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-09-21T00:00:00", "totalAmount": 1.59}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2018-09-21T00:00:00", "totalAmount": -1.59}}], "subTotal": 1.59, "taxAmount": 0, "totalAmount": 1.59}, {"modifiedDate": "2023-01-18T11:02:59Z", "sourceModifiedDate": "2022-07-11T10:32:16Z", "id": "PUR-9303", "note": "Payment to Google", "contactRef": {"id": "4", "dataType": "suppliers"}, "issueDate": "2018-09-21T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Payment to Google", "unitAmount": 1.59, "quantity": 1, "subTotal": 1.59, "taxAmount": 0, "totalAmount": 1.59, "accountRef": {"id": "37", "name": "Computer equipment accumulated depreciation brought forward"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "9303", "reference": "Payment to Google", "accountRef": {"id": "61", "name": "Dave PP Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-09-21T00:00:00", "totalAmount": 1.59}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2018-09-21T00:00:00", "totalAmount": -1.59}}], "subTotal": 1.59, "taxAmount": 0, "totalAmount": 1.59}], "pageNumber": 1, "pageSize": 2, "totalResults": 2176, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/directCosts"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/directCosts?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:35Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "73", "reference": "DD/STO", "issueDate": "2021-01-29T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Electrcity Direct Debit", "unitAmount": 150, "quantity": 1, "subTotal": 150, "taxAmount": 12, "totalAmount": 162, "accountRef": {"id": "7200", "name": "Electricity"}, "taxRateRef": {"id": "3"}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}]}], "paymentAllocations": [{"payment": {"id": "73", "reference": "DD/STO", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-01-29T00:00:00", "totalAmount": 162}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2021-01-29T00:00:00", "totalAmount": 162}}], "subTotal": 150, "taxAmount": 12, "totalAmount": 162, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:35Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "52", "reference": "568953", "issueDate": "2021-01-30T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Vat Payment Quater End 3112.96", "unitAmount": 1497.58, "quantity": 1, "subTotal": 1497.58, "taxAmount": 0, "totalAmount": 1497.58, "accountRef": {"id": "2202", "name": "VAT Liability"}, "taxRateRef": {"id": "9", "name": "Non-Vatable Tax Code", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}]}], "paymentAllocations": [{"payment": {"id": "52", "reference": "568953", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-01-30T00:00:00", "totalAmount": 1497.58}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2021-01-30T00:00:00", "totalAmount": 1497.58}}], "subTotal": 1497.58, "taxAmount": 0, "totalAmount": 1497.58, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 106, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/directCosts"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/directCosts?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-28T11:10:28Z", "sourceModifiedDate": "2022-08-22T09:26:42", "id": "CCTRANSACTION:4355", "reference": "", "note": "Test 1", "issueDate": "2020-01-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 9.99, "quantity": 1, "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99, "accountRef": {"id": "195", "name": "Insurance"}, "taxRateRef": {"id": "62018"}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}]}], "paymentAllocations": [{"payment": {"id": "4355", "note": "", "reference": "", "accountRef": {"id": "348", "name": "CMRR Renewal"}, "currency": "GBP", "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 11.99}, "allocation": {"currency": "GBP", "allocatedOnDate": "2020-01-20T00:00:00", "totalAmount": 11.99}}], "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99}, {"modifiedDate": "2022-10-28T11:10:28Z", "sourceModifiedDate": "2022-02-17T23:26:16", "id": "CCTRANSACTION:4356", "reference": "", "note": "Test 1", "issueDate": "2020-01-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 9.99, "quantity": 1, "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99, "accountRef": {"id": "195", "name": "Insurance"}, "taxRateRef": {"id": "62022"}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}]}], "paymentAllocations": [{"payment": {"id": "4356", "note": "", "reference": "", "accountRef": {"id": "348", "name": "CMRR Renewal"}, "currency": "GBP", "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 11.99}, "allocation": {"currency": "GBP", "allocatedOnDate": "2020-01-20T00:00:00", "totalAmount": 11.99}}], "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99}], "pageNumber": 1, "pageSize": 2, "totalResults": 57, "_links": {"self": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/connections/be80adfc-1157-4db4-9170-f8bcbbc051ba/data/directCosts"}, "current": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/connections/be80adfc-1157-4db4-9170-f8bcbbc051ba/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/connections/be80adfc-1157-4db4-9170-f8bcbbc051ba/data/directCosts?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-03T21:43:46", "id": "dc1bb034-7bbf-4e84-b418-b7f4aee59d72", "reference": "", "contactRef": {"id": "737982b0-2811-44c9-bdb3-3b26a3a6ef8c", "dataType": "suppliers"}, "issueDate": "2022-11-22T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Bank fee", "unitAmount": 15, "quantity": 1, "subTotal": 15, "taxAmount": 0, "totalAmount": 15, "accountRef": {"id": "2c410b86-de57-49d1-b540-4e8ce824979c", "name": "Bank Fees"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "dc1bb034-7bbf-4e84-b418-b7f4aee59d72", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-11-22T00:00:00", "totalAmount": 15}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-11-22T00:00:00", "totalAmount": 15}}], "subTotal": 15, "taxAmount": 0, "totalAmount": 15, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-03T21:43:51", "id": "521c2396-7f74-404c-9cca-31115296b808", "reference": "Eft", "contactRef": {"id": "74ea95ea-6e1e-435d-9c30-0dff8ae1bd80", "dataType": "suppliers"}, "issueDate": "2022-11-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Misc stationery", "unitAmount": 18.09, "quantity": 1, "subTotal": 18.09, "taxAmount": 3.62, "totalAmount": 21.71, "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "521c2396-7f74-404c-9cca-31115296b808", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-11-23T00:00:00", "totalAmount": 21.71}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-11-23T00:00:00", "totalAmount": 21.71}}], "subTotal": 18.09, "taxAmount": 3.62, "totalAmount": 21.71, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 15, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/directCosts"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/directCosts?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/directCosts?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-direct-cost: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-09-18T20:59:02", "id": "994ad234-ca05-466e-8e6a-117783b38cf6", "reference": "005b7b62-dc9f-42d2-85a2-4a2cefc6bab2", "note": "Direct Cost with 1 line items, totaling 242.20", "contactRef": {"id": "D4Q4iYwHou", "dataType": "suppliers"}, "issueDate": "2022-04-27T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Underground - Drain Saddle Branches 160mm x 110mm x 87 �", "unitAmount": 220.18, "quantity": 1, "discountAmount": 0, "discountPercentage": 0, "subTotal": 220.18, "taxAmount": 22.02, "totalAmount": 242.2, "accountRef": {"id": "7403e960-5b72-42ff-abf4-c870ad8910bd", "name": "Purchases"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "2", "name": "Solvent Weld Branch 160mm x 110mm x 87 �"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "994ad234-ca05-466e-8e6a-117783b38cf6", "note": "Payment for direct cost 994ad234-ca05-466e-8e6a-117783b38cf6", "reference": "Direct Cost 994ad234-ca05-466e-8e6a-117783b38cf6", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-04-27T00:00:00", "totalAmount": 242.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-04-27T00:00:00", "totalAmount": -242.2}}], "subTotal": 220.18, "taxAmount": 22.02, "totalAmount": 242.2, "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-05-19T17:17:33Z", "id": "6ab3e391-97d7-ec11-8e7e-000d3a0cfe40", "reference": "INS000090", "note": "3931", "issueDate": "2022-05-21T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "test expenses 2", "unitAmount": 17.89, "quantity": -1, "subTotal": -17.89, "taxAmount": 0, "totalAmount": -17.89, "accountRef": {"id": "30"}, "taxRateRef": {"id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "6ab3e391-97d7-ec11-8e7e-000d3a0cfe40", "accountRef": {"id": "TEST"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-21T00:00:00", "totalAmount": -17.89}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-21T00:00:00", "totalAmount": -17.89}}], "subTotal": -17.89, "taxAmount": 0, "totalAmount": -17.89, "metadata": {"isDeleted": false}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:20:36Z", "sourceModifiedDate": "2019-11-22T14:31:14Z", "id": "190325254", "note": "Atomic Software Limite Wellington,Nzl", "issueDate": "2017-11-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Atomic Software Limite Wellington,Nzl", "unitAmount": 11.92, "quantity": 1, "subTotal": 11.92, "taxAmount": 2.38, "totalAmount": 14.3, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "190325254", "note": "Atomic Software Limite Wellington,Nzl", "accountRef": {"id": "750-1", "name": "Bank Account: Business Current Account"}, "currency": "GBP", "paidOnDate": "2017-11-23T00:00:00", "totalAmount": 14.3}, "allocation": {"currency": "GBP", "allocatedOnDate": "2017-11-23T00:00:00", "totalAmount": 14.3}}], "subTotal": 11.92, "taxAmount": 2.38, "totalAmount": 14.3, "metadata": {"isDeleted": false}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-10-28T15:21:46", "id": "29870062", "reference": "Food to keep me working", "note": "Food to keep me working", "contactRef": {"id": "Sainsburys", "dataType": "suppliers"}, "issueDate": "2019-02-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Food to keep me working", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "3361426", "name": "Meals & Entertainment"}, "trackingCategoryRefs": [{"id": "4370503", "name": "Meals & Entertainment"}]}], "paymentAllocations": [], "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "metadata": {"isDeleted": false}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:13:57Z", "sourceModifiedDate": "2023-12-16T05:04:10", "id": "D7B-933784104", "reference": "93", "contactRef": {"id": "360000-933272659", "dataType": "suppliers"}, "issueDate": "2022-12-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 1200, "quantity": 1, "subTotal": 1200, "totalAmount": 1200, "accountRef": {"id": "3C0000-933270542", "name": "Rent"}, "trackingCategoryRefs": [{"id": "80000007-1197713802", "name": "Overhead"}], "tracking": {"recordRefs": [{"id": "80000007-1197713802", "dataType": "trackingCategories"}, {"id": "800000B0-1197755238", "dataType": "customers"}]}}], "paymentAllocations": [{"payment": {"id": "D7B-933784104", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-01T00:00:00", "totalAmount": 1200}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-01T00:00:00", "totalAmount": 1200}}], "subTotal": 1200, "taxAmount": 0, "totalAmount": 1200, "metadata": {"isDeleted": false}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:36:40Z", "sourceModifiedDate": "2016-09-12T18:13:07Z", "id": "PUR-85", "note": "Opening Balance from Bank", "issueDate": "2015-08-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 3831.8, "quantity": 1, "subTotal": 3831.8, "taxAmount": 0, "totalAmount": 3831.8, "accountRef": {"id": "55", "name": "Opening Balance Equity"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"recordRefs": []}}], "paymentAllocations": [{"payment": {"id": "85", "reference": "Opening Balance from Bank", "accountRef": {"id": "57", "name": "Visa Credit Card"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2015-08-12T00:00:00", "totalAmount": 3831.8}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2015-08-12T00:00:00", "totalAmount": -3831.8}}], "subTotal": 3831.8, "taxAmount": 0, "totalAmount": 3831.8, "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:59Z", "sourceModifiedDate": "2018-12-17T14:56:44Z", "id": "PUR-15", "note": "Payment to Google", "issueDate": "2018-09-21T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Payment to Google", "unitAmount": 1.59, "quantity": 1, "subTotal": 1.59, "taxAmount": 0, "totalAmount": 1.59, "accountRef": {"id": "37", "name": "Computer equipment accumulated depreciation brought forward"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "15", "reference": "Payment to Google", "accountRef": {"id": "61", "name": "Dave PP Current"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2018-09-21T00:00:00", "totalAmount": 1.59}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2018-09-21T00:00:00", "totalAmount": -1.59}}], "subTotal": 1.59, "taxAmount": 0, "totalAmount": 1.59} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:35Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "73", "reference": "DD/STO", "issueDate": "2021-01-29T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Electrcity Direct Debit", "unitAmount": 150, "quantity": 1, "subTotal": 150, "taxAmount": 12, "totalAmount": 162, "accountRef": {"id": "7200", "name": "Electricity"}, "taxRateRef": {"id": "3"}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}]}], "paymentAllocations": [{"payment": {"id": "73", "reference": "DD/STO", "accountRef": {"id": "1200", "name": "Bank Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-01-29T00:00:00", "totalAmount": 162}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2021-01-29T00:00:00", "totalAmount": 162}}], "subTotal": 150, "taxAmount": 12, "totalAmount": 162, "metadata": {"isDeleted": false}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-28T11:10:28Z", "sourceModifiedDate": "2022-08-22T09:26:42", "id": "CCTRANSACTION:4355", "reference": "", "note": "Test 1", "issueDate": "2020-01-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 9.99, "quantity": 1, "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99, "accountRef": {"id": "195", "name": "Insurance"}, "taxRateRef": {"id": "62018"}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}]}], "paymentAllocations": [{"payment": {"id": "4355", "note": "", "reference": "", "accountRef": {"id": "348", "name": "CMRR Renewal"}, "currency": "GBP", "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 11.99}, "allocation": {"currency": "GBP", "allocatedOnDate": "2020-01-20T00:00:00", "totalAmount": 11.99}}], "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-03T21:43:46", "id": "dc1bb034-7bbf-4e84-b418-b7f4aee59d72", "reference": "", "contactRef": {"id": "737982b0-2811-44c9-bdb3-3b26a3a6ef8c", "dataType": "suppliers"}, "issueDate": "2022-11-22T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Bank fee", "unitAmount": 15, "quantity": 1, "subTotal": 15, "taxAmount": 0, "totalAmount": 15, "accountRef": {"id": "2c410b86-de57-49d1-b540-4e8ce824979c", "name": "Bank Fees"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "dc1bb034-7bbf-4e84-b418-b7f4aee59d72", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-11-22T00:00:00", "totalAmount": 15}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-11-22T00:00:00", "totalAmount": 15}}], "subTotal": 15, "taxAmount": 0, "totalAmount": 15, "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-direct-cost-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-accounting-direct-cost-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"} - "401": - application/json: {} - "500": - application/json: {} - download-accounting-direct-cost-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-accounting-direct-cost-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/octet-stream: "x-file: example.file" - "401": - application/json: {} - "500": - application/json: {} - list-accounting-direct-cost-attachments: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-list-accounting-direct-cost-attachments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"attachments": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"}]} - "401": - application/json: {} - "500": - application/json: {} - list-accounting-journal-entries: - speakeasy-default-list-accounting-journal-entries: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:18Z", "id": "770c89bb-3d6a-449a-9243-739378b4cd7d", "postedOn": "2022-04-19T00:00:00", "createdOn": "2022-04-19T00:00:00", "journalRef": {"id": "90bb7784-083b-4bcb-a534-b30756cee65d", "name": "General Journal"}, "journalLines": [{"description": "", "netAmount": 32095.91, "currency": "GBP", "accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}}, {"description": "Tax for direct income c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "netAmount": -2917.81, "currency": "GBP", "accountRef": {"id": "3a872b81-d1af-4d31-9bfa-a37280b8f68c", "name": "VAT"}}, {"description": "", "netAmount": -29178.09, "currency": "GBP", "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}}], "recordRef": {"id": "c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "dataType": "directIncomes"}, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:18Z", "id": "9f96606f-6846-40c6-b423-9b1753458e75", "postedOn": "2022-04-19T00:00:00", "createdOn": "2022-04-19T00:00:00", "journalRef": {"id": "90bb7784-083b-4bcb-a534-b30756cee65d", "name": "General Journal"}, "journalLines": [{"description": "", "netAmount": 188.33, "currency": "GBP", "accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}}, {"description": "Tax for direct income 38e8c917-0afc-4583-8ffe-1b53ad601197", "netAmount": -17.12, "currency": "GBP", "accountRef": {"id": "3a872b81-d1af-4d31-9bfa-a37280b8f68c", "name": "VAT"}}, {"description": "", "netAmount": -171.21, "currency": "GBP", "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}}], "recordRef": {"id": "38e8c917-0afc-4583-8ffe-1b53ad601197", "dataType": "directIncomes"}, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1862, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/journalEntries"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/journalEntries?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:31Z", "sourceModifiedDate": "2020-07-29T10:56:12Z", "id": "START", "postedOn": "2018-12-31T00:00:00", "createdOn": "2018-12-31T00:00:00", "journalRef": {"id": "4caabc3e-3d64-ed11-8c34-000d3a870cba", "name": "DEFAULT"}, "journalLines": [{"description": "Opening Entry", "netAmount": -69723.14, "currency": "GBP", "accountRef": {"id": "ac1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Retained Earnings"}}, {"description": "Opening Entry", "netAmount": -20000, "currency": "GBP", "accountRef": {"id": "aa1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Share Capital"}}, {"description": "Opening Entry", "netAmount": -2329.42, "currency": "GBP", "accountRef": {"id": "8a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accounts Payable"}}, {"description": "Opening Entry", "netAmount": 3499, "currency": "GBP", "accountRef": {"id": "6e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accumulated Depreciation"}}, {"description": "Opening Entry", "netAmount": 5498, "currency": "GBP", "accountRef": {"id": "6c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Equipment"}}, {"description": "Opening Entry", "netAmount": 28547.16, "currency": "GBP", "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}}, {"description": "Opening Entry", "netAmount": 31638.4, "currency": "GBP", "accountRef": {"id": "641217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accounts Receivable"}}, {"description": "Opening Entry", "netAmount": 2870, "currency": "GBP", "accountRef": {"id": "641217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accounts Receivable"}}, {"description": "Opening Entry", "netAmount": 20000, "currency": "GBP", "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:31Z", "sourceModifiedDate": "2020-07-29T10:56:12Z", "id": "01-2019", "postedOn": "2019-01-01T00:00:00", "createdOn": "2019-01-01T00:00:00", "journalRef": {"id": "4caabc3e-3d64-ed11-8c34-000d3a870cba", "name": "DEFAULT"}, "journalLines": [{"description": "January 2019", "netAmount": -2000, "currency": "GBP", "accountRef": {"id": "5e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Checking account"}}, {"description": "January 2019", "netAmount": 1000, "currency": "GBP", "accountRef": {"id": "401217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Salaries Expense"}}, {"description": "January 2019", "netAmount": 1000, "currency": "GBP", "accountRef": {"id": "341217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Rent Expense"}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 825, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/journalEntries"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/journalEntries?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:37:10Z", "sourceModifiedDate": "2022-01-11T14:18:54Z", "id": "00002c0a-8061-4ad2-84fa-c879eea880a7", "createdOn": "2022-01-11T14:18:54", "updatedOn": "2022-01-11T14:18:54", "journalRef": {"id": "55ff34a3-0857-4202-b7ec-a399cfc26a4e", "name": "Memoriaal"}, "journalLines": [{"description": "1 transactions of type CARD_PAYMENT_FEE_REFUND", "netAmount": -6.94, "currency": "EUR", "accountRef": {"id": "e0217fbf-8963-4134-80ef-929d5de8612d", "name": "Kosten 13e maand"}, "tracking": {"recordRefs": []}}, {"description": "1 transactions of type CARD_PAYMENT_FEE_REFUND", "netAmount": 6.94, "currency": "EUR", "accountRef": {"id": "0166c96b-adf2-4667-a755-87e67c741f41", "name": "Resultaat verkoop activa"}, "tracking": {"recordRefs": []}}]}, {"modifiedDate": "2022-10-26T13:37:08Z", "sourceModifiedDate": "2020-04-22T13:56:46Z", "id": "000154f0-e83a-4012-96a3-7db0b036b96b", "createdOn": "2020-04-22T13:56:46", "updatedOn": "2020-04-22T13:56:46", "journalRef": {"id": "151313ae-55b1-4ba0-b32a-e2ef6a8ce52a", "name": "Nominal Card"}, "journalLines": [{"description": "Refunds with payment type of Cash", "netAmount": -144.36, "currency": "EUR", "accountRef": {"id": "0741cc89-e33a-4358-bcbd-3acb07b005dc", "name": "Nominal Card"}, "tracking": {"recordRefs": []}}, {"description": "Refunds with payment type of Cash", "netAmount": 144.36, "currency": "EUR", "accountRef": {"id": "ef2fde36-4416-4bc5-b239-315b2929348c", "name": "Debiteuren"}, "tracking": {"recordRefs": []}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 35972, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/journalEntries"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/journalEntries?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:35:45Z", "sourceModifiedDate": "2020-07-03T10:51:46Z", "id": "0008ef00-c5f8-4f97-bce9-5094b2f569dd", "createdOn": "2020-07-03T10:51:46", "updatedOn": "2020-07-03T10:51:46", "journalRef": {"id": "ed5068ff-cb0e-4edd-9777-36ac94a5d6f0", "name": "Sales journal"}, "journalLines": [{"netAmount": -9.1, "currency": "GBP", "accountRef": {"id": "45ae4323-c93b-48b1-8393-db54254e4e6c", "name": "VAT To Pay"}, "tracking": {"recordRefs": []}}, {"description": "6 service charges with 0.0% vat", "netAmount": -11.21, "currency": "GBP", "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "tracking": {"recordRefs": []}}, {"description": "28.0 items with VatPercentage of 0.0", "netAmount": -308.61, "currency": "GBP", "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "tracking": {"recordRefs": []}}, {"description": "Gratuity", "netAmount": -25.87, "currency": "GBP", "accountRef": {"id": "febc52c4-a1ed-4000-b51a-76f9f525445d", "name": "Salary Control Account"}, "tracking": {"recordRefs": []}}, {"netAmount": -47.14, "currency": "GBP", "accountRef": {"id": "45ae4323-c93b-48b1-8393-db54254e4e6c", "name": "VAT To Pay"}, "tracking": {"recordRefs": []}}, {"description": "19.0 items with VatPercentage of 20.0", "netAmount": -235.72, "currency": "GBP", "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "tracking": {"recordRefs": []}}, {"description": "13.0 items with VatPercentage of 5.0", "netAmount": -182.06, "currency": "GBP", "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "tracking": {"recordRefs": []}}, {"description": "1.0 gift cards", "netAmount": -1, "currency": "GBP", "accountRef": {"id": "febc52c4-a1ed-4000-b51a-76f9f525445d", "name": "Salary Control Account"}, "tracking": {"recordRefs": []}}, {"netAmount": 820.71, "currency": "GBP", "accountRef": {"id": "cf9572e7-8afa-4339-9113-af32a66d9df9", "name": "Trade Debtors"}, "tracking": {"recordRefs": []}}], "recordRef": {"id": "0008ef00-c5f8-4f97-bce9-5094b2f569dd", "dataType": "invoices"}}, {"modifiedDate": "2022-10-26T13:35:45Z", "sourceModifiedDate": "2021-07-30T18:02:23Z", "id": "001a8d63-2d5b-4b00-b17f-894108b6ce81", "createdOn": "2021-07-30T18:02:23", "updatedOn": "2021-07-30T18:02:23", "journalRef": {"id": "ed5068ff-cb0e-4edd-9777-36ac94a5d6f0", "name": "Sales journal"}, "journalLines": [{"netAmount": 1038.01, "currency": "GBP", "accountRef": {"id": "cf9572e7-8afa-4339-9113-af32a66d9df9", "name": "Trade Debtors"}, "tracking": {"recordRefs": []}}, {"description": "1.0 gift cards", "netAmount": -1, "currency": "GBP", "accountRef": {"id": "cc0ab812-d89a-452b-88a8-61666a0f0211", "name": "Accruals"}, "tracking": {"recordRefs": []}}, {"netAmount": -19.29, "currency": "GBP", "accountRef": {"id": "45ae4323-c93b-48b1-8393-db54254e4e6c", "name": "VAT To Pay"}, "tracking": {"recordRefs": []}}, {"netAmount": -60.82, "currency": "GBP", "accountRef": {"id": "45ae4323-c93b-48b1-8393-db54254e4e6c", "name": "VAT To Pay"}, "tracking": {"recordRefs": []}}, {"description": "15.0 items with VatPercentage of 0.0", "netAmount": -248.28, "currency": "GBP", "accountRef": {"id": "ba7d27d1-72cf-411b-8ef3-55ca4b13dac3", "name": "Sundry Non-Operating Expenses"}, "tracking": {"recordRefs": []}}, {"description": "Gratuity", "netAmount": -8.97, "currency": "GBP", "accountRef": {"id": "8f27a6b8-101d-4613-a059-2b462fb01b2f", "name": "anna_test_prod"}, "tracking": {"recordRefs": []}}, {"description": "28.0 items with VatPercentage of 5.0", "netAmount": -385.7, "currency": "GBP", "accountRef": {"id": "ba7d27d1-72cf-411b-8ef3-55ca4b13dac3", "name": "Sundry Non-Operating Expenses"}, "tracking": {"recordRefs": []}}, {"description": "2 service charges with 0.0% vat", "netAmount": -9.85, "currency": "GBP", "accountRef": {"id": "ba7d27d1-72cf-411b-8ef3-55ca4b13dac3", "name": "Sundry Non-Operating Expenses"}, "tracking": {"recordRefs": []}}, {"description": "27.0 items with VatPercentage of 20.0", "netAmount": -304.1, "currency": "GBP", "accountRef": {"id": "ba7d27d1-72cf-411b-8ef3-55ca4b13dac3", "name": "Sundry Non-Operating Expenses"}, "tracking": {"recordRefs": []}}], "recordRef": {"id": "001a8d63-2d5b-4b00-b17f-894108b6ce81", "dataType": "invoices"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 6785, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/journalEntries"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/journalEntries?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:38Z", "sourceModifiedDate": "1987-10-01T00:00:00", "id": "24389149", "postedOn": "1987-10-01T00:00:00", "createdOn": "1987-10-01T00:00:00", "updatedOn": "1987-10-01T00:00:00", "journalLines": [{"description": "", "netAmount": 222.88, "currency": "GBP", "accountRef": {"id": "128611", "name": "Accounts Receivable"}}, {"description": "Creative Writing Editorial", "netAmount": -222.88, "currency": "GBP", "accountRef": {"id": "128613", "name": "Sales"}}, {"description": "", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "128613", "name": "Sales"}}], "recordRef": {"id": "2596455", "dataType": "invoices"}, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:38Z", "sourceModifiedDate": "1987-10-01T00:00:00", "id": "24389396", "postedOn": "1987-10-01T00:00:00", "createdOn": "1987-10-01T00:00:00", "updatedOn": "1987-10-01T00:00:00", "journalLines": [{"description": "", "netAmount": -222.88, "currency": "GBP", "accountRef": {"id": "128611", "name": "Accounts Receivable"}}, {"description": "Creative Writing Editorial", "netAmount": 222.88, "currency": "GBP", "accountRef": {"id": "128613", "name": "Sales"}}, {"description": "", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "128613", "name": "Sales"}}], "recordRef": {"id": "2596455", "dataType": "invoices"}, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 734, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/journalEntries"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/journalEntries?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-30T14:49:07Z", "sourceModifiedDate": "2021-03-26T10:31:06", "id": "112", "postedOn": "2021-03-26T00:00:00", "createdOn": "2021-03-26T10:31:05", "updatedOn": "2021-03-26T10:31:06", "journalLines": [{"netAmount": -120, "currency": "GBP", "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "tracking": {"recordRefs": [{"id": "location-4", "dataType": "trackingCategories"}, {"id": "724", "dataType": "suppliers"}]}}, {"netAmount": 120, "currency": "GBP", "accountRef": {"id": "111", "name": "Accounts Payable"}, "tracking": {"recordRefs": [{"id": "location-4", "dataType": "trackingCategories"}, {"id": "724", "dataType": "suppliers"}]}}], "recordRef": {"id": "112", "dataType": "billPayments"}}, {"modifiedDate": "2023-01-30T14:49:07Z", "sourceModifiedDate": "2022-07-05T13:38:10", "id": "7", "postedOn": "2021-03-26T00:00:00", "createdOn": "2021-03-26T10:02:18", "updatedOn": "2022-07-05T13:38:10", "journalLines": [{"netAmount": -144, "currency": "GBP", "accountRef": {"id": "111", "name": "Accounts Payable"}, "tracking": {"recordRefs": [{"id": "724", "dataType": "suppliers"}]}}, {"netAmount": 120, "currency": "GBP", "accountRef": {"id": "716", "name": "Inventory In Transit"}, "tracking": {"recordRefs": [{"id": "location-4", "dataType": "trackingCategories"}]}}, {"description": "VAT", "netAmount": 24, "currency": "GBP", "accountRef": {"id": "211", "name": "VAT on Purchases"}, "tracking": {"recordRefs": [{"id": "713", "dataType": "suppliers"}]}}], "recordRef": {"id": "7", "dataType": "bills"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 11, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/journalEntries"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/journalEntries?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:11:56Z", "sourceModifiedDate": "2023-12-16T05:04:21", "id": "2453-1071526256", "postedOn": "2022-11-28T00:00:00", "createdOn": "2022-11-28T00:00:00", "journalLines": [{"description": "", "netAmount": 431.95, "currency": "GBP", "accountRef": {"id": "40000-933270541", "name": "Accounts Receivable"}}, {"description": "Foundation slab - prep and pouring", "netAmount": -167.5, "currency": "GBP", "accountRef": {"id": "190000-933270541", "name": "Labor Income"}}, {"description": "CA sales tax, San Domingo County", "netAmount": -18.45, "currency": "GBP", "accountRef": {"id": "100000-933270541", "name": "Sales Tax Payable"}}, {"description": "Rough lumber", "netAmount": -48, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Trim lumber", "netAmount": -38, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Window", "netAmount": -50, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Flooring", "netAmount": -50, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Window", "netAmount": -60, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}], "recordRef": {"id": "2453-1071526256", "dataType": "invoices"}, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:11:56Z", "sourceModifiedDate": "2023-12-16T05:05:41", "id": "469E-1071530054", "postedOn": "2022-11-30T00:00:00", "createdOn": "2022-11-30T00:00:00", "journalLines": [{"description": "", "netAmount": 14488.64, "currency": "GBP", "accountRef": {"id": "40000-933270541", "name": "Accounts Receivable"}}, {"description": "Installation labor", "netAmount": -45.5, "currency": "GBP", "accountRef": {"id": "190000-933270541", "name": "Labor Income"}}, {"description": "Install drywall", "netAmount": -1320, "currency": "GBP", "accountRef": {"id": "1C0000-933270542", "name": "Subcontracted Labor Income"}}, {"description": "Electrical work", "netAmount": -1650, "currency": "GBP", "accountRef": {"id": "1C0000-933270542", "name": "Subcontracted Labor Income"}}, {"description": "Metal Work", "netAmount": -660, "currency": "GBP", "accountRef": {"id": "1C0000-933270542", "name": "Subcontracted Labor Income"}}, {"description": "Install insulation", "netAmount": -1100, "currency": "GBP", "accountRef": {"id": "1C0000-933270542", "name": "Subcontracted Labor Income"}}, {"description": "Plumbing", "netAmount": -1650, "currency": "GBP", "accountRef": {"id": "1C0000-933270542", "name": "Subcontracted Labor Income"}}, {"description": "Painting", "netAmount": -2420, "currency": "GBP", "accountRef": {"id": "1C0000-933270542", "name": "Subcontracted Labor Income"}}, {"description": "Install carpeting", "netAmount": -3300, "currency": "GBP", "accountRef": {"id": "1C0000-933270542", "name": "Subcontracted Labor Income"}}, {"description": "Custom Bay Window", "netAmount": -1925, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Window", "netAmount": -115.5, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Equipment Rental", "netAmount": -700, "currency": "GBP", "accountRef": {"id": "190000-933270541", "name": "Labor Income"}}, {"description": "10% retainage to be billed after job is complete and approved.", "netAmount": 555.5, "currency": "GBP", "accountRef": {"id": "70000-933270541", "name": "Retainage Receivable"}}, {"description": "CA sales tax, San Tomas County", "netAmount": -158.14, "currency": "GBP", "accountRef": {"id": "100000-933270541", "name": "Sales Tax Payable"}}], "recordRef": {"id": "469E-1071530054", "dataType": "invoices"}, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 140, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journalEntries"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journalEntries?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:03:25Z", "sourceModifiedDate": "2018-12-17T14:56:20Z", "id": "1", "postedOn": "2018-09-21T00:00:00", "createdOn": "2018-09-21T00:00:00", "journalLines": [{"description": "Opening Balance from Bank", "netAmount": 170.23, "currency": "GBP", "accountRef": {"id": "61", "name": "Dave PP Current"}, "tracking": {"recordRefs": []}}, {"description": "", "netAmount": -170.23, "currency": "GBP", "accountRef": {"id": "53", "name": "Retained profit balance forward account"}, "tracking": {"recordRefs": []}}]}, {"modifiedDate": "2023-01-18T11:03:25Z", "sourceModifiedDate": "2018-12-17T14:56:44Z", "id": "15", "postedOn": "2018-09-21T00:00:00", "createdOn": "2018-09-21T00:00:00", "journalLines": [{"description": "Payment to Google", "netAmount": -1.59, "currency": "GBP", "accountRef": {"id": "61", "name": "Dave PP Current"}, "tracking": {"recordRefs": []}}, {"description": "Payment to Google", "netAmount": 1.59, "currency": "GBP", "accountRef": {"id": "37", "name": "Computer equipment accumulated depreciation brought forward"}, "tracking": {"recordRefs": []}}], "recordRef": {"id": "PUR-15", "dataType": "directCosts"}}], "pageNumber": 1, "pageSize": 2, "totalResults": 9405, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/journalEntries"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/journalEntries?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-12T16:02:02Z", "id": "12", "postedOn": "2015-02-23T00:00:00", "createdOn": "2015-02-23T00:00:00", "journalLines": [{"description": "Opening stock for Guest Book", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "55", "name": "Opening Balance Equity"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Guest Book", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "65", "name": "Stock Asset"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Guest Book", "netAmount": 250, "currency": "GBP", "accountRef": {"id": "65", "name": "Stock Asset"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Guest Book", "netAmount": -250, "currency": "GBP", "accountRef": {"id": "55", "name": "Opening Balance Equity"}, "tracking": {"recordRefs": []}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-12T16:02:04Z", "id": "13", "postedOn": "2015-02-23T00:00:00", "createdOn": "2015-02-23T00:00:00", "journalLines": [{"description": "Opening stock for Name Badges", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "55", "name": "Opening Balance Equity"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Name Badges", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "65", "name": "Stock Asset"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Name Badges", "netAmount": 7500, "currency": "GBP", "accountRef": {"id": "65", "name": "Stock Asset"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Name Badges", "netAmount": -7500, "currency": "GBP", "accountRef": {"id": "55", "name": "Opening Balance Equity"}, "tracking": {"recordRefs": []}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 9190, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/journalEntries"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/journalEntries?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "88", "description": "Opening Stock", "postedOn": "2021-01-01T00:00:00", "createdOn": "2010-04-27T17:16:57", "journalLines": [{"description": "Opening Stock", "netAmount": -40710, "currency": "GBP", "accountRef": {"id": "1001", "name": "Stock"}}, {"description": "Opening Stock", "netAmount": 40710, "currency": "GBP", "accountRef": {"id": "5200", "name": "Opening Stock"}}], "recordRef": {"id": "88", "dataType": "journalEntries"}, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "92", "description": "Goods", "postedOn": "2021-01-01T00:00:00", "createdOn": "2010-04-27T17:16:57", "journalLines": [{"description": "Goods/Services - Goods", "netAmount": -5875, "currency": "GBP", "accountRef": {"id": "2100", "name": "Creditors Control Account"}}, {"description": "Goods/Services - Goods", "netAmount": 5000, "currency": "GBP", "accountRef": {"id": "5000", "name": "Materials Purchased"}}, {"description": "Goods/Services - Goods", "netAmount": 875, "currency": "GBP", "accountRef": {"id": "2201", "name": "Purchase Tax Control Account"}}], "recordRef": {"id": "92", "dataType": "bills"}, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1119, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/journalEntries"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/journalEntries?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T15:31:26Z", "sourceModifiedDate": "2017-05-08T11:08:39Z", "id": "b0489c4b33de11e797950a57719b2edb", "postedOn": "2017-05-08T11:08:39", "createdOn": "2017-05-08T11:08:39", "updatedOn": "2017-05-08T11:08:39", "journalLines": [{"description": "Consulting services", "netAmount": 1440, "currency": "GBP", "accountRef": {"id": "9a9931b4267a11e797950a57719b2edb", "name": "VAT on Sales - Holding Account"}}, {"description": "Consulting services", "netAmount": 7200, "currency": "GBP", "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}}, {"netAmount": -8640, "currency": "GBP", "accountRef": {"id": "9a991c56267a11e797950a57719b2edb", "name": "Trade Debtors"}}]}, {"modifiedDate": "2022-10-24T15:31:26Z", "sourceModifiedDate": "2017-05-08T11:09:09Z", "id": "c23efa4233de11e797950a57719b2edb", "postedOn": "2017-05-08T11:09:09", "createdOn": "2017-05-08T11:09:09", "updatedOn": "2017-05-08T11:09:09", "journalLines": [{"netAmount": 1080, "currency": "GBP", "accountRef": {"id": "9a991c56267a11e797950a57719b2edb", "name": "Trade Debtors"}}, {"description": "Consulting services", "netAmount": -180, "currency": "GBP", "accountRef": {"id": "9a9931b4267a11e797950a57719b2edb", "name": "VAT on Sales - Holding Account"}}, {"description": "Consulting services", "netAmount": -900, "currency": "GBP", "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 24386, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/journalEntries"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/journalEntries?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2021-04-22T10:44:27", "id": "262177", "description": "Invoices - 1100: 2021/04/22 03:44:26:7042 Batch Summary Entry", "postedOn": "2021-04-22T00:00:00", "createdOn": "2021-04-22T10:44:27", "updatedOn": "2021-04-22T10:44:27", "journalRef": {"id": "1", "name": "Accounts Receivable Journal"}, "journalLines": [{"description": "", "netAmount": -100, "currency": "GBP", "accountRef": {"id": "176", "name": "Revenue - Services"}}, {"description": "", "netAmount": -20, "currency": "GBP", "accountRef": {"id": "306", "name": "Sales Tax Payable"}}, {"description": "", "netAmount": 120, "currency": "GBP", "accountRef": {"id": "2", "name": "Accounts Receivable"}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2022-04-19T13:38:45", "id": "262179", "description": "Receipts(Bank-501_CHK) - 1100: April 2021 Batch Summary Entry", "postedOn": "2021-04-30T00:00:00", "createdOn": "2021-04-22T11:01:11", "updatedOn": "2022-04-19T13:38:45", "journalRef": {"id": "7", "name": "Cash Receipts Journal"}, "journalLines": [{"description": "", "netAmount": -120, "currency": "GBP", "accountRef": {"id": "2", "name": "Accounts Receivable"}}, {"description": "", "netAmount": 120, "currency": "GBP", "accountRef": {"id": "353", "name": "Current Account"}}, {"description": "", "netAmount": 150, "currency": "GBP", "accountRef": {"id": "353", "name": "Current Account"}}, {"description": "", "netAmount": -150, "currency": "GBP", "accountRef": {"id": "179", "name": "Revenue - Other"}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 21, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/journalEntries"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/journalEntries?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:37:09Z", "sourceModifiedDate": "2023-02-17T21:07:12", "id": "033d79c7-565b-419a-9e1b-33ab58efcf3d", "postedOn": "2021-11-19T00:00:00", "createdOn": "2023-02-17T21:07:12", "journalLines": [{"description": "", "netAmount": -7267.2, "currency": "GBP", "accountRef": {"id": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", "name": "Accounts Payable"}}, {"description": "Half day training - Microsoft Office", "netAmount": 1800, "currency": "GBP", "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10", "name": "Consulting"}}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "netAmount": 4000, "currency": "GBP", "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}}, {"description": "Stationery charges", "netAmount": 256, "currency": "GBP", "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}}, {"description": "", "netAmount": 1211.2, "currency": "GBP", "accountRef": {"id": "b12f79b9-a082-4b8b-971e-d321292943c7", "name": "VAT"}}], "recordRef": {"id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "dataType": "bills"}, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:37:09Z", "sourceModifiedDate": "2023-02-17T21:07:23", "id": "98ac5060-c9ed-4359-bcd5-711e649e7899", "postedOn": "2021-12-20T00:00:00", "createdOn": "2023-02-17T21:07:23", "journalLines": [{"description": "", "netAmount": -7267.2, "currency": "GBP", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}}, {"description": "", "netAmount": 7267.2, "currency": "GBP", "accountRef": {"id": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", "name": "Accounts Payable"}}], "recordRef": {"id": "74004690-82a1-4810-aaca-6ce575af94b4", "dataType": "billPayments"}, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 290, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/journalEntries"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/journalEntries?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/journalEntries?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-journal-entry: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:18Z", "id": "770c89bb-3d6a-449a-9243-739378b4cd7d", "postedOn": "2022-04-19T00:00:00", "createdOn": "2022-04-19T00:00:00", "journalRef": {"id": "90bb7784-083b-4bcb-a534-b30756cee65d", "name": "General Journal"}, "journalLines": [{"description": "", "netAmount": 32095.91, "currency": "GBP", "accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "name": "Undeposited Funds"}}, {"description": "Tax for direct income c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "netAmount": -2917.81, "currency": "GBP", "accountRef": {"id": "3a872b81-d1af-4d31-9bfa-a37280b8f68c", "name": "VAT"}}, {"description": "", "netAmount": -29178.09, "currency": "GBP", "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}}], "recordRef": {"id": "c31a3778-e3ea-4d01-9281-dd2f291c8cb8", "dataType": "directIncomes"}, "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:31Z", "sourceModifiedDate": "2020-07-29T10:56:12Z", "id": "START", "postedOn": "2018-12-31T00:00:00", "createdOn": "2018-12-31T00:00:00", "journalRef": {"id": "4caabc3e-3d64-ed11-8c34-000d3a870cba", "name": "DEFAULT"}, "journalLines": [{"description": "Opening Entry", "netAmount": -69723.14, "currency": "GBP", "accountRef": {"id": "ac1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Retained Earnings"}}, {"description": "Opening Entry", "netAmount": -20000, "currency": "GBP", "accountRef": {"id": "aa1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Share Capital"}}, {"description": "Opening Entry", "netAmount": -2329.42, "currency": "GBP", "accountRef": {"id": "8a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accounts Payable"}}, {"description": "Opening Entry", "netAmount": 3499, "currency": "GBP", "accountRef": {"id": "6e1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accumulated Depreciation"}}, {"description": "Opening Entry", "netAmount": 5498, "currency": "GBP", "accountRef": {"id": "6c1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Equipment"}}, {"description": "Opening Entry", "netAmount": 28547.16, "currency": "GBP", "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}}, {"description": "Opening Entry", "netAmount": 31638.4, "currency": "GBP", "accountRef": {"id": "641217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accounts Receivable"}}, {"description": "Opening Entry", "netAmount": 2870, "currency": "GBP", "accountRef": {"id": "641217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Accounts Receivable"}}, {"description": "Opening Entry", "netAmount": 20000, "currency": "GBP", "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}}], "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:37:10Z", "sourceModifiedDate": "2022-01-11T14:18:54Z", "id": "00002c0a-8061-4ad2-84fa-c879eea880a7", "createdOn": "2022-01-11T14:18:54", "updatedOn": "2022-01-11T14:18:54", "journalRef": {"id": "55ff34a3-0857-4202-b7ec-a399cfc26a4e", "name": "Memoriaal"}, "journalLines": [{"description": "1 transactions of type CARD_PAYMENT_FEE_REFUND", "netAmount": -6.94, "currency": "EUR", "accountRef": {"id": "e0217fbf-8963-4134-80ef-929d5de8612d", "name": "Kosten 13e maand"}, "tracking": {"recordRefs": []}}, {"description": "1 transactions of type CARD_PAYMENT_FEE_REFUND", "netAmount": 6.94, "currency": "EUR", "accountRef": {"id": "0166c96b-adf2-4667-a755-87e67c741f41", "name": "Resultaat verkoop activa"}, "tracking": {"recordRefs": []}}]} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:35:45Z", "sourceModifiedDate": "2020-07-03T10:51:46Z", "id": "0008ef00-c5f8-4f97-bce9-5094b2f569dd", "createdOn": "2020-07-03T10:51:46", "updatedOn": "2020-07-03T10:51:46", "journalRef": {"id": "ed5068ff-cb0e-4edd-9777-36ac94a5d6f0", "name": "Sales journal"}, "journalLines": [{"netAmount": -9.1, "currency": "GBP", "accountRef": {"id": "45ae4323-c93b-48b1-8393-db54254e4e6c", "name": "VAT To Pay"}, "tracking": {"recordRefs": []}}, {"description": "6 service charges with 0.0% vat", "netAmount": -11.21, "currency": "GBP", "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "tracking": {"recordRefs": []}}, {"description": "28.0 items with VatPercentage of 0.0", "netAmount": -308.61, "currency": "GBP", "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "tracking": {"recordRefs": []}}, {"description": "Gratuity", "netAmount": -25.87, "currency": "GBP", "accountRef": {"id": "febc52c4-a1ed-4000-b51a-76f9f525445d", "name": "Salary Control Account"}, "tracking": {"recordRefs": []}}, {"netAmount": -47.14, "currency": "GBP", "accountRef": {"id": "45ae4323-c93b-48b1-8393-db54254e4e6c", "name": "VAT To Pay"}, "tracking": {"recordRefs": []}}, {"description": "19.0 items with VatPercentage of 20.0", "netAmount": -235.72, "currency": "GBP", "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "tracking": {"recordRefs": []}}, {"description": "13.0 items with VatPercentage of 5.0", "netAmount": -182.06, "currency": "GBP", "accountRef": {"id": "43acd218-6a95-445f-994c-660273e0ced9", "name": "Sales"}, "tracking": {"recordRefs": []}}, {"description": "1.0 gift cards", "netAmount": -1, "currency": "GBP", "accountRef": {"id": "febc52c4-a1ed-4000-b51a-76f9f525445d", "name": "Salary Control Account"}, "tracking": {"recordRefs": []}}, {"netAmount": 820.71, "currency": "GBP", "accountRef": {"id": "cf9572e7-8afa-4339-9113-af32a66d9df9", "name": "Trade Debtors"}, "tracking": {"recordRefs": []}}], "recordRef": {"id": "0008ef00-c5f8-4f97-bce9-5094b2f569dd", "dataType": "invoices"}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:38Z", "sourceModifiedDate": "1987-10-01T00:00:00", "id": "24389149", "postedOn": "1987-10-01T00:00:00", "createdOn": "1987-10-01T00:00:00", "updatedOn": "1987-10-01T00:00:00", "journalLines": [{"description": "", "netAmount": 222.88, "currency": "GBP", "accountRef": {"id": "128611", "name": "Accounts Receivable"}}, {"description": "Creative Writing Editorial", "netAmount": -222.88, "currency": "GBP", "accountRef": {"id": "128613", "name": "Sales"}}, {"description": "", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "128613", "name": "Sales"}}], "recordRef": {"id": "2596455", "dataType": "invoices"}, "metadata": {"isDeleted": false}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-30T14:49:07Z", "sourceModifiedDate": "2021-03-26T10:31:06", "id": "112", "postedOn": "2021-03-26T00:00:00", "createdOn": "2021-03-26T10:31:05", "updatedOn": "2021-03-26T10:31:06", "journalLines": [{"netAmount": -120, "currency": "GBP", "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "tracking": {"recordRefs": [{"id": "location-4", "dataType": "trackingCategories"}, {"id": "724", "dataType": "suppliers"}]}}, {"netAmount": 120, "currency": "GBP", "accountRef": {"id": "111", "name": "Accounts Payable"}, "tracking": {"recordRefs": [{"id": "location-4", "dataType": "trackingCategories"}, {"id": "724", "dataType": "suppliers"}]}}], "recordRef": {"id": "112", "dataType": "billPayments"}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:11:56Z", "sourceModifiedDate": "2023-12-16T05:04:21", "id": "2453-1071526256", "postedOn": "2022-11-28T00:00:00", "createdOn": "2022-11-28T00:00:00", "journalLines": [{"description": "", "netAmount": 431.95, "currency": "GBP", "accountRef": {"id": "40000-933270541", "name": "Accounts Receivable"}}, {"description": "Foundation slab - prep and pouring", "netAmount": -167.5, "currency": "GBP", "accountRef": {"id": "190000-933270541", "name": "Labor Income"}}, {"description": "CA sales tax, San Domingo County", "netAmount": -18.45, "currency": "GBP", "accountRef": {"id": "100000-933270541", "name": "Sales Tax Payable"}}, {"description": "Rough lumber", "netAmount": -48, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Trim lumber", "netAmount": -38, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Window", "netAmount": -50, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Flooring", "netAmount": -50, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}, {"description": "Window", "netAmount": -60, "currency": "GBP", "accountRef": {"id": "1A0000-933270542", "name": "Materials Income"}}], "recordRef": {"id": "2453-1071526256", "dataType": "invoices"}, "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:03:25Z", "sourceModifiedDate": "2018-12-17T14:56:20Z", "id": "1", "postedOn": "2018-09-21T00:00:00", "createdOn": "2018-09-21T00:00:00", "journalLines": [{"description": "Opening Balance from Bank", "netAmount": 170.23, "currency": "GBP", "accountRef": {"id": "61", "name": "Dave PP Current"}, "tracking": {"recordRefs": []}}, {"description": "", "netAmount": -170.23, "currency": "GBP", "accountRef": {"id": "53", "name": "Retained profit balance forward account"}, "tracking": {"recordRefs": []}}]} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-12T16:02:02Z", "id": "12", "postedOn": "2015-02-23T00:00:00", "createdOn": "2015-02-23T00:00:00", "journalLines": [{"description": "Opening stock for Guest Book", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "55", "name": "Opening Balance Equity"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Guest Book", "netAmount": 0, "currency": "GBP", "accountRef": {"id": "65", "name": "Stock Asset"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Guest Book", "netAmount": 250, "currency": "GBP", "accountRef": {"id": "65", "name": "Stock Asset"}, "tracking": {"recordRefs": []}}, {"description": "Opening stock for Guest Book", "netAmount": -250, "currency": "GBP", "accountRef": {"id": "55", "name": "Opening Balance Equity"}, "tracking": {"recordRefs": []}}], "metadata": {"isDeleted": false}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "88", "description": "Opening Stock", "postedOn": "2021-01-01T00:00:00", "createdOn": "2010-04-27T17:16:57", "journalLines": [{"description": "Opening Stock", "netAmount": -40710, "currency": "GBP", "accountRef": {"id": "1001", "name": "Stock"}}, {"description": "Opening Stock", "netAmount": 40710, "currency": "GBP", "accountRef": {"id": "5200", "name": "Opening Stock"}}], "recordRef": {"id": "88", "dataType": "journalEntries"}, "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T15:31:26Z", "sourceModifiedDate": "2017-05-08T11:08:39Z", "id": "b0489c4b33de11e797950a57719b2edb", "postedOn": "2017-05-08T11:08:39", "createdOn": "2017-05-08T11:08:39", "updatedOn": "2017-05-08T11:08:39", "journalLines": [{"description": "Consulting services", "netAmount": 1440, "currency": "GBP", "accountRef": {"id": "9a9931b4267a11e797950a57719b2edb", "name": "VAT on Sales - Holding Account"}}, {"description": "Consulting services", "netAmount": 7200, "currency": "GBP", "accountRef": {"id": "9a994b92267a11e797950a57719b2edb", "name": "Sales Type A"}}, {"netAmount": -8640, "currency": "GBP", "accountRef": {"id": "9a991c56267a11e797950a57719b2edb", "name": "Trade Debtors"}}]} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2021-04-22T10:44:27", "id": "262177", "description": "Invoices - 1100: 2021/04/22 03:44:26:7042 Batch Summary Entry", "postedOn": "2021-04-22T00:00:00", "createdOn": "2021-04-22T10:44:27", "updatedOn": "2021-04-22T10:44:27", "journalRef": {"id": "1", "name": "Accounts Receivable Journal"}, "journalLines": [{"description": "", "netAmount": -100, "currency": "GBP", "accountRef": {"id": "176", "name": "Revenue - Services"}}, {"description": "", "netAmount": -20, "currency": "GBP", "accountRef": {"id": "306", "name": "Sales Tax Payable"}}, {"description": "", "netAmount": 120, "currency": "GBP", "accountRef": {"id": "2", "name": "Accounts Receivable"}}], "metadata": {"isDeleted": false}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:37:09Z", "sourceModifiedDate": "2023-02-17T21:07:12", "id": "033d79c7-565b-419a-9e1b-33ab58efcf3d", "postedOn": "2021-11-19T00:00:00", "createdOn": "2023-02-17T21:07:12", "journalLines": [{"description": "", "netAmount": -7267.2, "currency": "GBP", "accountRef": {"id": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", "name": "Accounts Payable"}}, {"description": "Half day training - Microsoft Office", "netAmount": 1800, "currency": "GBP", "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10", "name": "Consulting"}}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "netAmount": 4000, "currency": "GBP", "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}}, {"description": "Stationery charges", "netAmount": 256, "currency": "GBP", "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}}, {"description": "", "netAmount": 1211.2, "currency": "GBP", "accountRef": {"id": "b12f79b9-a082-4b8b-971e-d321292943c7", "name": "VAT"}}], "recordRef": {"id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "dataType": "bills"}, "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-journals: - speakeasy-default-list-accounting-journals: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-07-15T20:19:02", "id": "90bb7784-083b-4bcb-a534-b30756cee65d", "journalCode": "GJ", "name": "General Journal", "type": "General Journal", "hasChildren": true, "createdOn": "2021-12-11T13:04:02", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-07-24T14:17:02", "id": "07b94827-c0a5-4cc7-ba58-3f9efec3b4b3", "journalCode": "PAY", "name": "Payroll Journal", "type": "Payroll Journal", "parentId": "90bb7784-083b-4bcb-a534-b30756cee65d", "hasChildren": false, "createdOn": "2021-12-11T13:04:02", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2023-02-02T10:26:25Z", "id": "211317b3-89d1-ea11-bbaa-000d3a2b9185", "journalCode": "ASSETS", "name": "ASSETS", "type": "Assets", "hasChildren": true, "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2022-06-15T22:45:30Z", "id": "9a94ef78-92ec-ec11-82f9-000d3a8746a9", "journalCode": "BNKDEPOSIT-BNKD", "name": "BNKD", "type": "Bank Deposits", "parentId": "af7d7e6b-e5c8-ec11-8e7e-000d3a86e04a", "hasChildren": false, "createdOn": "2022-06-15T10:03:59", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 46, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2020-01-24T11:41:25Z", "id": "aae31284-e23d-456b-9957-fbf4bcef6c19", "journalCode": "21", "name": "12345678", "type": "Bank", "hasChildren": false, "createdOn": "2019-11-05T14:44:51", "status": "Active"}, {"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2019-11-22T13:35:57Z", "id": "74677165-1bd3-49b4-87d0-32d974674f86", "journalCode": "23", "name": "Abraham's Billion Dollar stuff", "type": "Bank", "hasChildren": false, "createdOn": "2019-11-22T13:35:57", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 47, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2021-04-26T16:44:47Z", "id": "05b9febe-34b3-4836-8277-002294b233a9", "journalCode": "25", "name": "annaBankAccount1", "type": "Bank", "hasChildren": false, "createdOn": "2021-04-26T16:44:47", "status": "Active"}, {"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2021-05-18T10:24:18Z", "id": "b9c3d6a6-4ce2-4714-9ff6-fb15892300f7", "journalCode": "31", "name": "annaBankAccount10", "type": "Bank", "hasChildren": false, "createdOn": "2021-05-18T10:24:18", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 21, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-01-17T10:44:23", "id": "207", "journalCode": "AJPT", "name": "A Journal Push Test", "type": "", "hasChildren": false, "createdOn": "2022-01-17T10:44:23", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-01-18T15:39:07", "id": "223", "journalCode": "AJPT2", "name": "A Journal Push Test 2", "type": "", "hasChildren": false, "createdOn": "2022-01-18T15:39:07", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1211, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-journal: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-07-15T20:19:02", "id": "90bb7784-083b-4bcb-a534-b30756cee65d", "journalCode": "GJ", "name": "General Journal", "type": "General Journal", "hasChildren": true, "createdOn": "2021-12-11T13:04:02", "status": "Active", "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2023-02-02T10:26:25Z", "id": "211317b3-89d1-ea11-bbaa-000d3a2b9185", "journalCode": "ASSETS", "name": "ASSETS", "type": "Assets", "hasChildren": true, "status": "Active", "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2020-01-24T11:41:25Z", "id": "aae31284-e23d-456b-9957-fbf4bcef6c19", "journalCode": "21", "name": "12345678", "type": "Bank", "hasChildren": false, "createdOn": "2019-11-05T14:44:51", "status": "Active"} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalId: "" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2021-04-26T16:44:47Z", "id": "05b9febe-34b3-4836-8277-002294b233a9", "journalCode": "25", "name": "annaBankAccount1", "type": "Bank", "hasChildren": false, "createdOn": "2021-04-26T16:44:47", "status": "Active"} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalId: "" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-01-17T10:44:23", "id": "207", "journalCode": "AJPT", "name": "A Journal Push Test", "type": "", "hasChildren": false, "createdOn": "2022-01-17T10:44:23", "status": "Active", "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - journalId: "" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-transfers: - speakeasy-default-list-accounting-transfers: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:18", "sourceModifiedDate": "2022-04-25T07:20:00", "id": "0bd2f801-6f02-44d6-a2ab-5431553d16f9", "description": "depositing 16531.08 into Current Account", "contactRef": {"id": "e4baf949-cb1d-4341-8452-200a93baa3fa", "dataType": "customers"}, "date": "2022-04-25T07:20:00", "from": {"accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 16531.08}, "to": {"accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 16531.08}, "trackingCategoryRefs": [], "depositedRecordRefs": [{"id": "fc253cca-0dfe-46e8-b75f-c7fb3db760b2", "dataType": "directIncomes"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:18", "sourceModifiedDate": "2022-04-25T07:20:00", "id": "78373000-29e1-4ef4-a2e6-9b573ed656e4", "description": "depositing 188.33 into Current Account", "contactRef": {"id": "51f03576-f6b0-40d5-9fba-81a490411c03", "dataType": "customers"}, "date": "2022-04-25T07:20:00", "from": {"accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 188.33}, "to": {"accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 188.33}, "trackingCategoryRefs": [], "depositedRecordRefs": [{"id": "38e8c917-0afc-4583-8ffe-1b53ad601197", "dataType": "directIncomes"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 357, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/transfers"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/transfers?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/connections/57b731ba-1d45-4386-ba58-2a1ca0234624/data/transfers?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:26", "sourceModifiedDate": "2020-11-26T12:16:44Z", "id": "G00001", "date": "2020-11-26T00:00:00", "from": {"accountRef": {"id": "cf1417b3-89d1-ea11-bbaa-000d3a2b9185", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 20}, "to": {"accountRef": {"id": "ce1417b3-89d1-ea11-bbaa-000d3a2b9185", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 20}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:26", "sourceModifiedDate": "2022-10-25T15:47:48Z", "id": "TST-001", "date": "2022-10-25T00:00:00", "from": {"accountRef": {"id": "8277672c-b8e6-ec11-82f8-0022481a77f0", "dataType": "bankAccounts"}, "currency": "USD", "amount": 3.6}, "to": {"accountRef": {"id": "8982e7d8-cb19-eb11-bbf9-0022481ad2f4", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 2.34}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 10, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/transfers"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/transfers?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/transfers?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:21:36", "sourceModifiedDate": "2022-03-23T15:55:58Z", "id": "307335275", "description": "Transfer from Savings Account to Freeagent Test12", "date": "2018-06-14T00:00:00", "from": {"accountRef": {"id": "532100", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 0.69}, "to": {"accountRef": {"id": "708504", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 0.69}, "trackingCategoryRefs": [{"id": "761"}], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:21:36", "sourceModifiedDate": "2022-03-31T16:09:27Z", "id": "308682395", "description": "Transfer from Business Current Account to Nic Test11", "date": "2019-12-23T00:00:00", "from": {"accountRef": {"id": "469976", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 250}, "to": {"accountRef": {"id": "691393", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 250}, "trackingCategoryRefs": [{"id": "761"}], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 99, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/transfers"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/transfers?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/transfers?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-20T08:16:26", "sourceModifiedDate": "2022-04-28T13:36:47", "id": "2-1", "contactRef": {"id": "417", "dataType": "customers"}, "date": "2021-03-10T00:00:00", "from": {"accountRef": {"id": "122", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 90}, "to": {"accountRef": {"id": "513", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 90}, "trackingCategoryRefs": [{"id": "location-1"}], "depositedRecordRefs": [{"id": "428", "dataType": "payments"}]}, {"modifiedDate": "2022-09-20T08:16:26", "sourceModifiedDate": "2022-04-28T14:14:33", "id": "2-11822", "contactRef": {"id": "417", "dataType": "customers"}, "date": "2022-04-28T00:00:00", "from": {"accountRef": {"id": "513", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 1200}, "to": {"accountRef": {"id": "122", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 1200}, "trackingCategoryRefs": [{"id": "location-1"}], "depositedRecordRefs": [{"id": "7526", "dataType": "payments"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 47, "_links": {"self": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/connections/5f07dcfb-23c0-49e6-895c-4498ea728ff3/data/transfers"}, "current": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/connections/5f07dcfb-23c0-49e6-895c-4498ea728ff3/data/transfers?page=1&pageSize=2"}, "next": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/connections/5f07dcfb-23c0-49e6-895c-4498ea728ff3/data/transfers?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:13:45", "sourceModifiedDate": "2023-12-16T05:03:58", "id": "4B1-933288922", "description": "Funds Transfer", "date": "2024-10-14T00:00:00", "from": {"accountRef": {"id": "30000-933270541", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 15000}, "to": {"accountRef": {"id": "20000-933270541", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 15000}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:13:45", "sourceModifiedDate": "2023-12-16T05:04:07", "id": "C2A-933780606", "description": "Funds Transfer", "date": "2024-11-25T00:00:00", "from": {"accountRef": {"id": "20000-933270541", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 42300}, "to": {"accountRef": {"id": "30000-933270541", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 42300}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/transfers"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/transfers?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/transfers?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:33", "sourceModifiedDate": "2020-08-26T11:41:20Z", "id": "646", "date": "2020-08-21T00:00:00", "from": {"accountRef": {"id": "102", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 73.41}, "to": {"accountRef": {"id": "108", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 73.41}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:33", "sourceModifiedDate": "2020-08-29T00:01:20Z", "id": "678", "date": "2020-08-22T00:00:00", "from": {"accountRef": {"id": "124", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 66.66}, "to": {"accountRef": {"id": "109", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 66.66}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 442, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/transfers"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/transfers?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/transfers?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:03:00", "sourceModifiedDate": "2020-09-03T11:19:54Z", "id": "1881", "date": "2020-08-29T00:00:00", "from": {"accountRef": {"id": "60", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 86.19}, "to": {"accountRef": {"id": "61", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 86.19}, "trackingCategoryRefs": [], "depositedRecordRefs": []}, {"modifiedDate": "2023-01-18T11:03:00", "sourceModifiedDate": "2020-09-03T11:23:44Z", "id": "1885", "date": "2020-09-02T00:00:00", "from": {"accountRef": {"id": "60", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 45.73}, "to": {"accountRef": {"id": "61", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 45.73}, "trackingCategoryRefs": [], "depositedRecordRefs": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 18, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/transfers"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/transfers?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/transfers?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:54:11", "sourceModifiedDate": "2018-03-06T16:20:19Z", "id": "434bce57215a11e8b45c025132dab352", "description": "Some cheque", "date": "2018-03-06T00:00:00", "from": {"accountRef": {"id": "9a3f0ed6267a11e797950a57719b2edb", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 1000}, "to": {"accountRef": {"id": "9a2c3770267a11e797950a57719b2edb", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 1000}, "trackingCategoryRefs": [], "depositedRecordRefs": []}, {"modifiedDate": "2022-10-24T14:54:11", "sourceModifiedDate": "2018-03-06T16:21:40Z", "id": "73d909a4215a11e8b45c025132dab352", "description": "Some cash", "date": "2018-03-06T00:00:00", "from": {"accountRef": {"id": "9a3f0ed6267a11e797950a57719b2edb", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 465}, "to": {"accountRef": {"id": "9a2c3770267a11e797950a57719b2edb", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 465}, "trackingCategoryRefs": [], "depositedRecordRefs": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 646, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/transfers"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/transfers?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/transfers?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-02-23T14:18:48", "sourceModifiedDate": "2022-03-10T12:38:23", "id": "4844", "description": "Description", "date": "2022-03-10T00:00:00", "from": {"accountRef": {"id": "CHECKINGACCOUNT:12", "dataType": "bankAccounts"}, "currency": "ZAR", "amount": 418.27}, "to": {"accountRef": {"id": "CHECKINGACCOUNT:9", "dataType": "bankAccounts"}, "currency": "CAD", "amount": 35.45}, "trackingCategoryRefs": [{"id": "LOCATION-10", "name": "South Africa"}], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-02-23T14:18:48", "sourceModifiedDate": "2022-10-05T15:28:15", "id": "18828", "description": "From bank account '700_CHK' to bank account 'Test Savings Account'", "date": "2022-10-05T00:00:00", "from": {"accountRef": {"id": "CHECKINGACCOUNT:12", "dataType": "bankAccounts"}, "currency": "ZAR", "amount": 4040.62}, "to": {"accountRef": {"id": "SAVINGSACCOUNT:17", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 200}, "trackingCategoryRefs": [{"id": "LOCATION-10", "name": "South Africa"}], "depositedRecordRefs": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/b53cfc9f-1a00-4a20-936f-34e8efbe07c5/connections/d891700f-d906-4e57-998a-0cf03d2a05d3/data/transfers"}, "current": {"href": "/companies/b53cfc9f-1a00-4a20-936f-34e8efbe07c5/connections/d891700f-d906-4e57-998a-0cf03d2a05d3/data/transfers?page=1&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-transfer: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:18", "sourceModifiedDate": "2022-04-25T07:20:00", "id": "0bd2f801-6f02-44d6-a2ab-5431553d16f9", "description": "depositing 16531.08 into Current Account", "contactRef": {"id": "e4baf949-cb1d-4341-8452-200a93baa3fa", "dataType": "customers"}, "date": "2022-04-25T07:20:00", "from": {"accountRef": {"id": "ff8fdc4c-2aad-4ec1-9430-6bd201832eb3", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 16531.08}, "to": {"accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 16531.08}, "trackingCategoryRefs": [], "depositedRecordRefs": [{"id": "fc253cca-0dfe-46e8-b75f-c7fb3db760b2", "dataType": "directIncomes"}], "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:26", "sourceModifiedDate": "2020-11-26T12:16:44Z", "id": "G00001", "date": "2020-11-26T00:00:00", "from": {"accountRef": {"id": "cf1417b3-89d1-ea11-bbaa-000d3a2b9185", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 20}, "to": {"accountRef": {"id": "ce1417b3-89d1-ea11-bbaa-000d3a2b9185", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 20}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:21:36", "sourceModifiedDate": "2022-03-23T15:55:58Z", "id": "307335275", "description": "Transfer from Savings Account to Freeagent Test12", "date": "2018-06-14T00:00:00", "from": {"accountRef": {"id": "532100", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 0.69}, "to": {"accountRef": {"id": "708504", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 0.69}, "trackingCategoryRefs": [{"id": "761"}], "depositedRecordRefs": [], "metadata": {"isDeleted": false}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-20T08:16:26", "sourceModifiedDate": "2022-04-28T13:36:47", "id": "2-1", "contactRef": {"id": "417", "dataType": "customers"}, "date": "2021-03-10T00:00:00", "from": {"accountRef": {"id": "122", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 90}, "to": {"accountRef": {"id": "513", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 90}, "trackingCategoryRefs": [{"id": "location-1"}], "depositedRecordRefs": [{"id": "428", "dataType": "payments"}]} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:13:45", "sourceModifiedDate": "2023-12-16T05:03:58", "id": "4B1-933288922", "description": "Funds Transfer", "date": "2024-10-14T00:00:00", "from": {"accountRef": {"id": "30000-933270541", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 15000}, "to": {"accountRef": {"id": "20000-933270541", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 15000}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:36:33", "sourceModifiedDate": "2020-08-26T11:41:20Z", "id": "646", "date": "2020-08-21T00:00:00", "from": {"accountRef": {"id": "102", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 73.41}, "to": {"accountRef": {"id": "108", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 73.41}, "trackingCategoryRefs": [], "depositedRecordRefs": [], "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:03:00", "sourceModifiedDate": "2020-09-03T11:19:54Z", "id": "1881", "date": "2020-08-29T00:00:00", "from": {"accountRef": {"id": "60", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 86.19}, "to": {"accountRef": {"id": "61", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 86.19}, "trackingCategoryRefs": [], "depositedRecordRefs": []} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:54:11", "sourceModifiedDate": "2018-03-06T16:20:19Z", "id": "434bce57215a11e8b45c025132dab352", "description": "Some cheque", "date": "2018-03-06T00:00:00", "from": {"accountRef": {"id": "9a3f0ed6267a11e797950a57719b2edb", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 1000}, "to": {"accountRef": {"id": "9a2c3770267a11e797950a57719b2edb", "dataType": "bankAccounts"}, "currency": "GBP", "amount": 1000}, "trackingCategoryRefs": [], "depositedRecordRefs": []} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-02-23T14:18:48", "sourceModifiedDate": "2022-03-10T12:38:23", "id": "4844", "description": "Description", "date": "2022-03-10T00:00:00", "from": {"accountRef": {"id": "CHECKINGACCOUNT:12", "dataType": "bankAccounts"}, "currency": "ZAR", "amount": 418.27}, "to": {"accountRef": {"id": "CHECKINGACCOUNT:9", "dataType": "bankAccounts"}, "currency": "CAD", "amount": 35.45}, "trackingCategoryRefs": [{"id": "LOCATION-10", "name": "South Africa"}], "depositedRecordRefs": [], "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-bill-credit-notes: - speakeasy-default-list-accounting-bill-credit-notes: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:26Z", "id": "0deaed0a-9f51-eb11-89f9-00224800af18", "billCreditNoteNumber": "109001", "supplierRef": {"id": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc."}, "withholdingTax": [], "totalAmount": 8, "totalDiscount": 0, "subTotal": 8, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 8, "status": "Submitted", "issueDate": "2020-12-21T00:00:00", "currency": "GBP", "lineItems": [{"description": "Abdi Item No VAT", "unitAmount": 8, "quantity": 1, "discountAmount": 0, "subTotal": 8, "taxAmount": 0, "totalAmount": 8, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "discountPercentage": 0, "taxRateRef": {"id": "6bbc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for EXPORT / ZERO", "effectiveTaxRate": 0}, "itemRef": {"id": "ITEM-dbc37b18-4209-eb11-bbf6-0022481ad2e8-EXPORT-EXPORT", "name": "Abdi Item No VAT / General Business Posting Group: 'EXPORT' / VAT Business Posting Group: 'EXPORT'"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "note": "BCN001", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:26Z", "id": "157c025f-a19e-eb11-8ce6-0022481a7bed", "billCreditNoteNumber": "109002", "supplierRef": {"id": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc."}, "withholdingTax": [], "totalAmount": 20, "totalDiscount": 0, "subTotal": 20, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 10, "status": "PartiallyPaid", "issueDate": "2021-01-26T00:00:00", "currency": "GBP", "lineItems": [{"description": "Abdi Item No VAT", "unitAmount": 20, "quantity": 1, "discountAmount": 0, "subTotal": 20, "taxAmount": 0, "totalAmount": 20, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "discountPercentage": 0, "taxRateRef": {"id": "6bbc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for EXPORT / ZERO", "effectiveTaxRate": 0}, "itemRef": {"id": "ITEM-dbc37b18-4209-eb11-bbf6-0022481ad2e8-EXPORT-EXPORT", "name": "Abdi Item No VAT / General Business Posting Group: 'EXPORT' / VAT Business Posting Group: 'EXPORT'"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "257c025f-a19e-eb11-8ce6-0022481a7bed", "note": "Credit Memo 1002", "reference": "109002", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-01-26T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2021-04-16T00:00:00", "totalAmount": 10}}], "note": "16042021", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 224, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billCreditNotes"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billCreditNotes?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:19Z", "id": "443bd109-e1ed-4de2-b1ab-3b13e980d288", "billCreditNoteNumber": "19600007", "supplierRef": {"id": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse"}, "withholdingTax": [], "totalAmount": 12.1, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 2.1, "discountPercentage": 0, "remainingCredit": 12.1, "status": "Submitted", "issueDate": "2019-12-16T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": []}], "paymentAllocations": []}, {"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-20T19:38:37Z", "id": "6643f559-d7e9-4cfe-802f-60beddbc4ed9", "billCreditNoteNumber": "20600003", "supplierRef": {"id": "f87070e2-bbd7-4383-a7c9-824748c1d70e", "supplierName": "Exact Software Nederland B.V."}, "withholdingTax": [], "totalAmount": 13.57, "totalDiscount": 0, "subTotal": 13.57, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 13.57, "status": "Submitted", "issueDate": "2020-01-20T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "1 transactions of type CARD_PAYMENT_FEE_REFUND", "unitAmount": 13.57, "quantity": 1, "discountAmount": 0, "subTotal": 13.57, "totalAmount": 13.57, "accountRef": {"id": "f6c251f5-21d0-4164-9b8f-17789fd2fee9", "name": "Kosten werkgeverslasten vakantiegeld"}, "trackingCategoryRefs": []}], "paymentAllocations": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 42, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billCreditNotes"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billCreditNotes?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:23Z", "sourceModifiedDate": "2019-10-30T13:12:56Z", "id": "f9083d38-40c7-4b5f-a693-f4670e3d85bc", "billCreditNoteNumber": "19600008", "supplierRef": {"id": "1c703cce-967c-4476-a86a-32e35341a8f5", "supplierName": "Customer Bill Supplier"}, "withholdingTax": [], "totalAmount": 99999, "totalDiscount": 0, "subTotal": 99999, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 99999, "status": "Submitted", "issueDate": "2019-10-30T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Oil Change", "unitAmount": -150, "quantity": 1000.5, "discountAmount": 0, "subTotal": -150075, "totalAmount": -150075, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "itemRef": {"id": "3001"}, "trackingCategoryRefs": []}, {"description": "description", "unitAmount": 250074, "quantity": 1, "discountAmount": 0, "subTotal": 250074, "totalAmount": 250074, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "trackingCategoryRefs": []}], "paymentAllocations": []}, {"modifiedDate": "2022-10-26T13:33:23Z", "sourceModifiedDate": "2019-11-01T15:07:18Z", "id": "05023688-5bd5-4034-ae4c-5e3e5099bbfb", "billCreditNoteNumber": "19600009", "supplierRef": {"id": "1c703cce-967c-4476-a86a-32e35341a8f5", "supplierName": "Customer Bill Supplier"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 10, "status": "Submitted", "issueDate": "2019-11-01T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Credit note line item #5", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "totalAmount": 10, "accountRef": {"id": "62be6536-f4ea-49b8-9797-1adc23982334", "name": "Depreciation"}, "trackingCategoryRefs": []}], "paymentAllocations": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 40, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billCreditNotes"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billCreditNotes?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2018-08-22T13:22:08Z", "id": "10665024", "billCreditNoteNumber": "Bill Credit", "supplierRef": {"id": "6161941", "supplierName": "A & J Fabtech Ltd"}, "withholdingTax": [], "totalAmount": 1500, "totalDiscount": 0, "subTotal": 1250, "totalTaxAmount": 250, "discountPercentage": 0, "remainingCredit": 1500, "status": "Submitted", "issueDate": "2018-08-22T00:00:00", "currency": "GBP", "lineItems": [{"description": "A & J Fabtech Ltd - Bill Credit Note Bill Credit", "unitAmount": 1250, "quantity": 1, "taxAmount": 250, "totalAmount": 1500, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2018-10-17T12:56:54Z", "id": "11007024", "billCreditNoteNumber": "Draft test", "supplierRef": {"id": "6161963", "supplierName": "ABB Ltd"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 8.33, "totalTaxAmount": 1.67, "discountPercentage": 0, "remainingCredit": 10, "status": "Submitted", "issueDate": "2018-10-17T00:00:00", "currency": "GBP", "lineItems": [{"description": "ABB Ltd - Bill Credit Note Draft test", "unitAmount": 8.33, "quantity": 1, "taxAmount": 1.67, "totalAmount": 10, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 45, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billCreditNotes"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billCreditNotes?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:16Z", "id": "91339087", "billCreditNoteNumber": "5", "supplierRef": {"id": "6202387", "supplierName": "Dell"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-02-25T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Oil refund", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "21481832", "name": "Oil"}, "itemRef": {"id": "114817740"}, "trackingCategoryRefs": []}], "paymentAllocations": []}, {"modifiedDate": "2022-09-30T10:29:16Z", "id": "91341939", "billCreditNoteNumber": "6", "supplierRef": {"id": "6202387", "supplierName": "Dell"}, "withholdingTax": [], "totalAmount": 240, "totalDiscount": 0, "subTotal": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-02-25T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": -200, "quantity": -1, "subTotal": 200, "taxAmount": -40, "totalAmount": 240, "accountRef": {"id": "21481820", "name": "Materials purchased"}, "itemRef": {"id": "114821376"}, "trackingCategoryRefs": []}], "paymentAllocations": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 8, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/billCreditNotes"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/billCreditNotes?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-20T08:16:22Z", "sourceModifiedDate": "2021-11-02T19:58:58", "id": "1781", "billCreditNoteNumber": "VENDCRED1", "supplierRef": {"id": "749", "supplierName": "Jo's Cheese"}, "withholdingTax": [], "totalAmount": 174.6, "totalDiscount": 0, "subTotal": 145.5, "totalTaxAmount": 29.1, "discountPercentage": 0, "remainingCredit": 174.6, "status": "Submitted", "issueDate": "2021-11-02T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "billcredit_test", "unitAmount": 145.5, "quantity": 1, "unitOfMeasurement": "pack", "subTotal": 145.5, "totalAmount": 145.5, "accountRef": {"id": "713", "name": "Inventory Asset"}, "trackingCategoryRefs": [{"id": "department-1"}, {"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "department-1"}, {"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "note": "Codat1"}, {"modifiedDate": "2022-09-20T08:16:22Z", "sourceModifiedDate": "2021-11-03T18:27:14", "id": "1782", "billCreditNoteNumber": "VENDCRED2", "supplierRef": {"id": "749", "supplierName": "Jo's Cheese"}, "withholdingTax": [], "totalAmount": 642.3, "totalDiscount": 0, "subTotal": 535.25, "totalTaxAmount": 107.05, "discountPercentage": 0, "remainingCredit": 342.3, "status": "PartiallyPaid", "issueDate": "2021-11-02T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Cheese", "unitAmount": 400, "quantity": 1, "unitOfMeasurement": "pack", "subTotal": 400, "totalAmount": 400, "accountRef": {"id": "714", "name": "Cost of Goods Sold"}, "createdFromLineRef": {"id": "7462", "dataType": "bills", "lineNumber": "1"}, "trackingCategoryRefs": [{"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}, {"description": "double cream", "unitAmount": 100, "quantity": 1, "subTotal": 100, "totalAmount": 100, "accountRef": {"id": "714", "name": "Cost of Goods Sold"}, "trackingCategoryRefs": [{"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}, {"description": "", "unitAmount": 35.25, "quantity": 1, "subTotal": 35.25, "totalAmount": 35.25, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "128", "name": "Test Item"}, "trackingCategoryRefs": [{"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [{"payment": {"id": "1782", "note": "Codat1", "reference": "Bill Credit 02/11/2021", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-11-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 300}}], "createdFromRefs": [{"id": "7462", "dataType": "bills"}], "note": "Codat1"}], "pageNumber": 1, "pageSize": 2, "totalResults": 16, "_links": {"self": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/billCreditNotes"}, "current": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/billCreditNotes?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:12:30Z", "sourceModifiedDate": "2023-12-16T05:06:19", "id": "6D2C-1197698059", "billCreditNoteNumber": "Return", "supplierRef": {"id": "E0000-933272656", "supplierName": "Timberloft Lumber"}, "withholdingTax": [], "totalAmount": 475, "totalDiscount": 0, "subTotal": 475, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 475, "status": "Submitted", "issueDate": "2024-10-30T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Lumber:Rough - Rough lumber", "unitAmount": 475, "quantity": 0, "discountAmount": 0, "subTotal": 475, "taxAmount": 0, "totalAmount": 475, "discountPercentage": 0, "itemRef": {"id": "1C0000-933272656", "name": "Lumber:Rough"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [{"payment": {"id": "6D2C-1197698059", "reference": "Return", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-10-30T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 475}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:12:30Z", "sourceModifiedDate": "2023-12-16T05:05:03", "id": "F3A-933787869", "billCreditNoteNumber": "CR-1098", "supplierRef": {"id": "80000-933272656", "supplierName": "Sloan Roofing"}, "withholdingTax": [], "totalAmount": 850, "totalDiscount": 0, "subTotal": 850, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 850, "status": "Submitted", "issueDate": "2024-12-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Subs:Roofing - Roofing", "unitAmount": 850, "quantity": 0, "discountAmount": 0, "subTotal": 850, "taxAmount": 0, "totalAmount": 850, "discountPercentage": 0, "itemRef": {"id": "D0000-933272656", "name": "Subs:Roofing"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [{"payment": {"id": "F3A-933787869", "reference": "CR-1098", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-12-12T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 850}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billCreditNotes"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billCreditNotes?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2019-05-13T13:14:06Z", "id": "19", "billCreditNoteNumber": "19", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "withholdingTax": [], "totalAmount": 5, "totalDiscount": 0, "subTotal": 5, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-05-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [{"payment": {"id": "20", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-05-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 5}}]}, {"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2020-03-23T10:44:06Z", "id": "677", "billCreditNoteNumber": "677", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "withholdingTax": [], "totalAmount": 5, "totalDiscount": 0, "subTotal": 5, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-03-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [{"payment": {"id": "678", "note": "payment note test", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-03-23T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 5}}], "note": "Codat Note field"}], "pageNumber": 1, "pageSize": 2, "totalResults": 11, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billCreditNotes"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billCreditNotes?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2019-06-20T15:48:50Z", "id": "424", "billCreditNoteNumber": "424", "supplierRef": {"id": "24", "supplierName": "Brijesh Jain"}, "withholdingTax": [], "totalAmount": 69, "totalDiscount": 0, "subTotal": 69, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 69, "status": "Submitted", "issueDate": "2019-06-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund of iZettle Fees", "unitAmount": 69, "quantity": 1, "subTotal": 69, "taxAmount": 0, "totalAmount": 69, "accountRef": {"id": "30", "name": "Janitorial Expense"}, "taxRateRef": {"id": "20_Bills", "name": "5.0% RC CIS Bills", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2019-07-16T09:49:14Z", "id": "455", "billCreditNoteNumber": "455", "supplierRef": {"id": "53", "supplierName": "Bank of AnyCity"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-06-26T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "a", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "11", "name": "Ask My Accountant"}, "taxRateRef": {"id": "20_Bills", "name": "5.0% RC CIS Bills", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [{"payment": {"id": "530", "reference": "4", "accountRef": {"id": "100", "name": "Savings2"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-07-16T00:00:00", "totalAmount": 170}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 10}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 26, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billCreditNotes"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billCreditNotes?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45391", "billCreditNoteNumber": "Return 1", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "withholdingTax": [], "totalAmount": 120, "totalDiscount": 2.5, "subTotal": 100, "totalTaxAmount": 20, "discountPercentage": 2.5, "remainingCredit": 109.5, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "allocatedOnDate": "2020-01-20T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.5, "subTotal": 0, "taxAmount": 20, "totalAmount": 20, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 2.5, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "45391", "note": "ret1", "reference": "Return 1", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10.5}}], "note": "ret1"}, {"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45421", "billCreditNoteNumber": "Return 2", "supplierRef": {"id": "QUA001", "supplierName": "Quality Motors"}, "withholdingTax": [], "totalAmount": 60, "totalDiscount": 1.25, "subTotal": 50, "totalTaxAmount": 10, "discountPercentage": 2.5, "remainingCredit": 60, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "allocatedOnDate": "2020-02-03T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.25, "subTotal": 0, "taxAmount": 10, "totalAmount": 10, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 1.25, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "trackingCategoryRefs": []}], "paymentAllocations": [], "note": "ret2"}], "pageNumber": 1, "pageSize": 2, "totalResults": 21, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billCreditNotes"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billCreditNotes?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "20", "billCreditNoteNumber": "O/BAL", "supplierRef": {"id": "NEW001", "supplierName": "Newtown Builders Ltd"}, "withholdingTax": [], "totalAmount": 0.01, "totalDiscount": 0, "subTotal": 0.01, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0.01, "status": "Submitted", "issueDate": "2021-12-31T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Opening Balance", "unitAmount": 0.01, "quantity": 1, "subTotal": 0.01, "taxAmount": 0, "totalAmount": 0.01, "accountRef": {"id": "9998", "name": "Suspense Account"}, "taxRateRef": {"id": "9", "name": "Non-Vatable Tax Code", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}], "tracking": {"categoryRefs": [{"id": "department_0", "name": "Default"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "note": "Opening Balance", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "323", "billCreditNoteNumber": "Return", "supplierRef": {"id": "UNI001", "supplierName": "Unique Systems"}, "withholdingTax": [], "totalAmount": 103.4, "totalDiscount": 0, "subTotal": 88, "totalTaxAmount": 15.4, "discountPercentage": 0, "remainingCredit": 103.4, "status": "Submitted", "issueDate": "2022-02-28T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Returned Goods, damaged", "unitAmount": 103.4, "quantity": 1, "subTotal": 88, "taxAmount": 15.4, "totalAmount": 103.4, "accountRef": {"id": "5000", "name": "Materials Purchased"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}], "tracking": {"categoryRefs": [{"id": "department_0", "name": "Default"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "note": "Returned Goods, damaged", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 12, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billCreditNotes"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billCreditNotes?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:53:32Z", "sourceModifiedDate": "2019-11-19T14:17:32Z", "id": "b6c6fce9866849b0b44cac99ab7dc579", "billCreditNoteNumber": "Supplier credit note", "supplierRef": {"id": "ec716559789111e8aaa5027d54329956", "supplierName": "Bagels Limited"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2018-11-23T00:00:00", "currency": "USD", "currencyRate": 0.776970973, "lineItems": [{"description": "Consulting services", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_ZERO", "name": "Zero Rated 0.00%", "effectiveTaxRate": 0}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "bf6496aaf0294883b27c423ce8266113", "note": "Supplier refund using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "USD", "currencyRate": 0.771449236, "paidOnDate": "2019-11-19T00:00:00", "totalAmount": -10}, "allocation": {"currency": "USD", "currencyRate": 1, "totalAmount": 10}}]}, {"modifiedDate": "2022-10-24T14:53:32Z", "sourceModifiedDate": "2020-07-16T15:00:36Z", "id": "23d866f6367d4f11956a36a71e47bc37", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "withholdingTax": [], "totalAmount": 60, "totalDiscount": 0, "subTotal": 50, "totalTaxAmount": 10, "discountPercentage": 0, "remainingCredit": 60, "status": "Submitted", "issueDate": "2019-01-29T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 10, "quantity": 5, "discountAmount": 0, "subTotal": 50, "taxAmount": 10, "totalAmount": 60, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": []}], "paymentAllocations": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 747, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billCreditNotes"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billCreditNotes?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-28T11:10:22Z", "sourceModifiedDate": "2021-09-20T13:50:16", "id": "3359", "billCreditNoteNumber": "APADJ0001", "supplierRef": {"id": "3", "supplierName": "ADP"}, "withholdingTax": [], "totalAmount": 12, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 2, "discountPercentage": 0, "remainingCredit": 12, "status": "Submitted", "issueDate": "2021-09-20T00:00:00", "currency": "USD", "currencyRate": 0.7283, "lineItems": [{"description": "No Description Provided", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 1, "totalAmount": 6, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "47", "name": "EC Purchase Goods Standard Rate Input", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}, {"description": "No Description Provided", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 1, "totalAmount": 6, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "47", "name": "EC Purchase Goods Standard Rate Input", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "note": ""}, {"modifiedDate": "2022-10-28T11:10:22Z", "sourceModifiedDate": "2021-09-29T13:34:47", "id": "3399", "billCreditNoteNumber": "APADJ0002", "supplierRef": {"id": "3", "supplierName": "ADP"}, "withholdingTax": [], "totalAmount": 360, "totalDiscount": 0, "subTotal": 300, "totalTaxAmount": 60, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2021-09-24T00:00:00", "allocatedOnDate": "2021-09-29T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "No Description Provided", "unitAmount": 300, "quantity": 1, "subTotal": 300, "taxAmount": 60, "totalAmount": 360, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "81", "name": "UK Purchase Goods Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "note": ""}], "pageNumber": 1, "pageSize": 2, "totalResults": 82, "_links": {"self": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/data/billCreditNotes"}, "current": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/data/billCreditNotes?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2011-04-07T07:26:30", "id": "ee8bec08-2be8-40ba-acd0-d53d5df11235", "billCreditNoteNumber": "RPT429-1", "supplierRef": {"id": "3a0d40a2-2698-4cf5-b7b2-30133c632ab6", "supplierName": "Swanston Security"}, "withholdingTax": [], "totalAmount": 25.44, "totalDiscount": 0, "subTotal": 25.44, "totalTaxAmount": 4.24, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-12-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund as agreed due to window break when guard absent", "unitAmount": 21.2, "quantity": 1, "discountAmount": 0, "subTotal": 21.2, "taxAmount": 4.24, "totalAmount": 25.44, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "discountPercentage": 0, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "ee8bec08-2be8-40ba-acd0-d53d5df11235", "reference": "", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-12T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-12T00:00:00", "totalAmount": 25.44}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2011-04-06T21:00:33", "id": "7d1f4e11-e909-43b0-901c-2c824dff1e82", "billCreditNoteNumber": "720-2", "supplierRef": {"id": "cf8fa320-a527-496c-823e-22dd069d29e6", "supplierName": "PC Complete"}, "withholdingTax": [], "totalAmount": 270.36, "totalDiscount": 0, "subTotal": 270.36, "totalTaxAmount": 45.06, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-12-16T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Unable to supply DVD writer for laptop", "unitAmount": 225.3, "quantity": 1, "discountAmount": 0, "subTotal": 225.3, "taxAmount": 45.06, "totalAmount": 270.36, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "discountPercentage": 0, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "7d1f4e11-e909-43b0-901c-2c824dff1e82", "reference": "", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-16T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-16T00:00:00", "totalAmount": 270.36}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billCreditNotes"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billCreditNotes?page=1&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-bill-credit-note: - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:26Z", "id": "0deaed0a-9f51-eb11-89f9-00224800af18", "billCreditNoteNumber": "109001", "supplierRef": {"id": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc."}, "withholdingTax": [], "totalAmount": 8, "totalDiscount": 0, "subTotal": 8, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 8, "status": "Submitted", "issueDate": "2020-12-21T00:00:00", "currency": "GBP", "lineItems": [{"description": "Abdi Item No VAT", "unitAmount": 8, "quantity": 1, "discountAmount": 0, "subTotal": 8, "taxAmount": 0, "totalAmount": 8, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "discountPercentage": 0, "taxRateRef": {"id": "6bbc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for EXPORT / ZERO", "effectiveTaxRate": 0}, "itemRef": {"id": "ITEM-dbc37b18-4209-eb11-bbf6-0022481ad2e8-EXPORT-EXPORT", "name": "Abdi Item No VAT / General Business Posting Group: 'EXPORT' / VAT Business Posting Group: 'EXPORT'"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "note": "BCN001", "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:19Z", "id": "443bd109-e1ed-4de2-b1ab-3b13e980d288", "billCreditNoteNumber": "19600007", "supplierRef": {"id": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse"}, "withholdingTax": [], "totalAmount": 12.1, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 2.1, "discountPercentage": 0, "remainingCredit": 12.1, "status": "Submitted", "issueDate": "2019-12-16T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": []}], "paymentAllocations": []} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:33:23Z", "sourceModifiedDate": "2019-10-30T13:12:56Z", "id": "f9083d38-40c7-4b5f-a693-f4670e3d85bc", "billCreditNoteNumber": "19600008", "supplierRef": {"id": "1c703cce-967c-4476-a86a-32e35341a8f5", "supplierName": "Customer Bill Supplier"}, "withholdingTax": [], "totalAmount": 99999, "totalDiscount": 0, "subTotal": 99999, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 99999, "status": "Submitted", "issueDate": "2019-10-30T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Oil Change", "unitAmount": -150, "quantity": 1000.5, "discountAmount": 0, "subTotal": -150075, "totalAmount": -150075, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "itemRef": {"id": "3001"}, "trackingCategoryRefs": []}, {"description": "description", "unitAmount": 250074, "quantity": 1, "discountAmount": 0, "subTotal": 250074, "totalAmount": 250074, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "trackingCategoryRefs": []}], "paymentAllocations": []} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2018-08-22T13:22:08Z", "id": "10665024", "billCreditNoteNumber": "Bill Credit", "supplierRef": {"id": "6161941", "supplierName": "A & J Fabtech Ltd"}, "withholdingTax": [], "totalAmount": 1500, "totalDiscount": 0, "subTotal": 1250, "totalTaxAmount": 250, "discountPercentage": 0, "remainingCredit": 1500, "status": "Submitted", "issueDate": "2018-08-22T00:00:00", "currency": "GBP", "lineItems": [{"description": "A & J Fabtech Ltd - Bill Credit Note Bill Credit", "unitAmount": 1250, "quantity": 1, "taxAmount": 250, "totalAmount": 1500, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "metadata": {"isDeleted": false}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:16Z", "id": "91339087", "billCreditNoteNumber": "5", "supplierRef": {"id": "6202387", "supplierName": "Dell"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-02-25T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Oil refund", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "21481832", "name": "Oil"}, "itemRef": {"id": "114817740"}, "trackingCategoryRefs": []}], "paymentAllocations": []} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-20T08:16:22Z", "sourceModifiedDate": "2021-11-02T19:58:58", "id": "1781", "billCreditNoteNumber": "VENDCRED1", "supplierRef": {"id": "749", "supplierName": "Jo's Cheese"}, "withholdingTax": [], "totalAmount": 174.6, "totalDiscount": 0, "subTotal": 145.5, "totalTaxAmount": 29.1, "discountPercentage": 0, "remainingCredit": 174.6, "status": "Submitted", "issueDate": "2021-11-02T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "billcredit_test", "unitAmount": 145.5, "quantity": 1, "unitOfMeasurement": "pack", "subTotal": 145.5, "totalAmount": 145.5, "accountRef": {"id": "713", "name": "Inventory Asset"}, "createdFromLineRef": {"id": "1432", "dataType": "bills", "lineNumber": "1"}, "trackingCategoryRefs": [{"id": "department-1"}, {"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "department-1"}, {"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [{"id": "1432", "dataType": "bills"}], "note": "Codat1"} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:12:30Z", "sourceModifiedDate": "2023-12-16T05:06:19", "id": "6D2C-1197698059", "billCreditNoteNumber": "Return", "supplierRef": {"id": "E0000-933272656", "supplierName": "Timberloft Lumber"}, "withholdingTax": [], "totalAmount": 475, "totalDiscount": 0, "subTotal": 475, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 475, "status": "Submitted", "issueDate": "2024-10-30T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Lumber:Rough - Rough lumber", "unitAmount": 475, "quantity": 0, "discountAmount": 0, "subTotal": 475, "taxAmount": 0, "totalAmount": 475, "discountPercentage": 0, "itemRef": {"id": "1C0000-933272656", "name": "Lumber:Rough"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [{"payment": {"id": "6D2C-1197698059", "reference": "Return", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-10-30T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 475}}], "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2019-05-13T13:14:06Z", "id": "19", "billCreditNoteNumber": "19", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "withholdingTax": [], "totalAmount": 5, "totalDiscount": 0, "subTotal": 5, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-05-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [{"payment": {"id": "20", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-05-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 5}}]} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2019-06-20T15:48:50Z", "id": "424", "billCreditNoteNumber": "424", "supplierRef": {"id": "24", "supplierName": "Brijesh Jain"}, "withholdingTax": [], "totalAmount": 69, "totalDiscount": 0, "subTotal": 69, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 69, "status": "Submitted", "issueDate": "2019-06-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund of iZettle Fees", "unitAmount": 69, "quantity": 1, "subTotal": 69, "taxAmount": 0, "totalAmount": 69, "accountRef": {"id": "30", "name": "Janitorial Expense"}, "taxRateRef": {"id": "20_Bills", "name": "5.0% RC CIS Bills", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [], "metadata": {"isDeleted": false}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45391", "billCreditNoteNumber": "Return 1", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "withholdingTax": [], "totalAmount": 120, "totalDiscount": 2.5, "subTotal": 100, "totalTaxAmount": 20, "discountPercentage": 2.5, "remainingCredit": 109.5, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "allocatedOnDate": "2020-01-20T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.5, "subTotal": 0, "taxAmount": 20, "totalAmount": 20, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 2.5, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "45391", "note": "ret1", "reference": "Return 1", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -10.5}}], "note": "ret1"} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "20", "billCreditNoteNumber": "O/BAL", "supplierRef": {"id": "NEW001", "supplierName": "Newtown Builders Ltd"}, "withholdingTax": [], "totalAmount": 0.01, "totalDiscount": 0, "subTotal": 0.01, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0.01, "status": "Submitted", "issueDate": "2021-12-31T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Opening Balance", "unitAmount": 0.01, "quantity": 1, "subTotal": 0.01, "taxAmount": 0, "totalAmount": 0.01, "accountRef": {"id": "9998", "name": "Suspense Account"}, "taxRateRef": {"id": "9", "name": "Non-Vatable Tax Code", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}], "tracking": {"categoryRefs": [{"id": "department_0", "name": "Default"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "note": "Opening Balance", "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:53:32Z", "sourceModifiedDate": "2019-11-19T14:17:32Z", "id": "b6c6fce9866849b0b44cac99ab7dc579", "billCreditNoteNumber": "Supplier credit note", "supplierRef": {"id": "ec716559789111e8aaa5027d54329956", "supplierName": "Bagels Limited"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2018-11-23T00:00:00", "currency": "USD", "currencyRate": 0.776970973, "lineItems": [{"description": "Consulting services", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_ZERO", "name": "Zero Rated 0.00%", "effectiveTaxRate": 0}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "bf6496aaf0294883b27c423ce8266113", "note": "Supplier refund using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "USD", "currencyRate": 0.771449236, "paidOnDate": "2019-11-19T00:00:00", "totalAmount": -10}, "allocation": {"currency": "USD", "currencyRate": 1, "totalAmount": 10}}]} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-28T11:10:22Z", "sourceModifiedDate": "2021-09-20T13:50:16", "id": "3359", "billCreditNoteNumber": "APADJ0001", "supplierRef": {"id": "3", "supplierName": "ADP"}, "withholdingTax": [], "totalAmount": 12, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 2, "discountPercentage": 0, "remainingCredit": 12, "status": "Submitted", "issueDate": "2021-09-20T00:00:00", "currency": "USD", "currencyRate": 0.7283, "lineItems": [{"description": "No Description Provided", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 1, "totalAmount": 6, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "47", "name": "EC Purchase Goods Standard Rate Input", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}, {"description": "No Description Provided", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 1, "totalAmount": 6, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "47", "name": "EC Purchase Goods Standard Rate Input", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "note": ""} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2011-04-07T07:26:30", "id": "ee8bec08-2be8-40ba-acd0-d53d5df11235", "billCreditNoteNumber": "RPT429-1", "supplierRef": {"id": "3a0d40a2-2698-4cf5-b7b2-30133c632ab6", "supplierName": "Swanston Security"}, "withholdingTax": [], "totalAmount": 25.44, "totalDiscount": 0, "subTotal": 25.44, "totalTaxAmount": 4.24, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-12-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund as agreed due to window break when guard absent", "unitAmount": 21.2, "quantity": 1, "discountAmount": 0, "subTotal": 21.2, "taxAmount": 4.24, "totalAmount": 25.44, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "discountPercentage": 0, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "ee8bec08-2be8-40ba-acd0-d53d5df11235", "reference": "", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-12T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-12T00:00:00", "totalAmount": 25.44}}], "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-bill-payments: - speakeasy-default-list-accounting-bill-payments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-05-06T00:00:00", "id": "dcb18480-8b69-44d8-aa26-268b6a80d170", "supplierRef": {"id": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "totalAmount": 71351.42, "currency": "GBP", "currencyRate": 1, "date": "2022-05-06T00:00:00", "note": "Bill Payment against bill 81539597-e681-40c9-a4dd-ec2fffcde572", "paymentMethodRef": {"id": "cb4a5647-aa86-40ab-bb4f-158acaa99c12", "name": "Check payments-u4p"}, "lines": [{"amount": 71351.42, "links": [{"type": "Bill", "id": "81539597-e681-40c9-a4dd-ec2fffcde572", "amount": -71351.42, "currencyRate": 1}], "allocatedOnDate": "2022-05-06T00:00:00"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-05-14T13:12:00", "id": "ca0976d0-036d-4187-ab66-7169286b007d", "supplierRef": {"id": "9efd64dc-4b31-425d-9eb2-7c7773593713", "supplierName": "Jacobson, Konopelski and Heidenreich"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "totalAmount": 16221.64, "currency": "GBP", "currencyRate": 1, "date": "2022-05-14T13:12:00", "note": "Bill Payment against bill 3f44d2be-d4c2-4cc3-8216-8add5265eb13", "paymentMethodRef": {"id": "fc87fba8-812e-4a54-b633-29ef2abf4c12", "name": "CreditCard payments-u4p"}, "lines": [{"amount": 16221.64, "links": [{"type": "Bill", "id": "3f44d2be-d4c2-4cc3-8216-8add5265eb13", "amount": -16221.64, "currencyRate": 1}], "allocatedOnDate": "2022-05-14T13:12:00"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 232, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/billPayments"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/billPayments?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "id": "19387f05-8ad1-ea11-bbaa-000d3a2b9185", "supplierRef": {"id": "c41217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Wide World Importers"}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 234, "currency": "GBP", "currencyRate": 1, "date": "2019-01-01T00:00:00", "note": "Invoice 107006", "lines": [{"amount": 234, "links": [{"type": "Bill", "id": "c8cb06bf-89d1-ea11-bbaa-000d3a2b9185-108006", "amount": -234, "currencyRate": 1}], "allocatedOnDate": "2019-01-01T00:00:00"}], "reference": "108006", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "id": "3d387f05-8ad1-ea11-bbaa-000d3a2b9185", "supplierRef": {"id": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc."}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 390, "currency": "GBP", "currencyRate": 1, "date": "2019-01-01T00:00:00", "note": "Invoice 107007", "lines": [{"amount": 390, "links": [{"type": "Bill", "id": "cbcb06bf-89d1-ea11-bbaa-000d3a2b9185-108007", "amount": -390, "currencyRate": 1}], "allocatedOnDate": "2019-01-01T00:00:00"}], "reference": "108007", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 236, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billPayments"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billPayments?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:35:13Z", "sourceModifiedDate": "2019-11-05T14:26:22Z", "id": "da7e456f-76f7-42ac-8dad-d90a040f3afb", "supplierRef": {"id": "63fadca8-4905-475a-b32a-b4341293bcf4", "supplierName": "Kelly's Industrial Supplies"}, "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "totalAmount": -5, "currency": "EUR", "currencyRate": 1, "date": "2019-11-05T00:00:00Z", "lines": [{"amount": -5, "links": [{"type": "PaymentOnAccount", "id": "63fadca8-4905-475a-b32a-b4341293bcf4", "amount": 5, "currencyRate": 1}]}], "reference": "19200008"}, {"modifiedDate": "2022-10-26T13:35:14Z", "sourceModifiedDate": "2021-11-17T12:08:10Z", "id": "002b8462-f3a3-4019-84fe-6a2af1f30c5a", "supplierRef": {"id": "5811b467-53eb-4491-8ca1-bc9b7889811b", "supplierName": "Ann's test supplier 2"}, "accountRef": {"id": "1879b322-7758-4e20-8f3f-701df27f2340", "name": "Kas"}, "totalAmount": 0.13, "currency": "EUR", "currencyRate": 1, "date": "2019-11-07T00:00:00Z", "lines": [{"amount": -0.12, "links": [{"type": "CreditNote", "id": "33f3016c-2ecf-4d17-911e-b385537e7341", "amount": 0.12, "currencyRate": 1}]}, {"amount": 0.12, "links": [{"type": "Bill", "id": "de6b3634-faf2-4688-b06b-72ed3ca6cf4e", "amount": -0.12, "currencyRate": 1}]}, {"amount": 0.13, "links": [{"type": "Bill", "id": "de6b3634-faf2-4688-b06b-72ed3ca6cf4e", "amount": -0.13, "currencyRate": 1}]}], "reference": "19100002"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1173, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billPayments"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billPayments?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:17Z", "sourceModifiedDate": "2017-10-11T10:12:29Z", "id": "7a5f621b-739f-4ed8-b738-2aae3ef886ac", "supplierRef": {"id": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 123, "currency": "GBP", "currencyRate": 1, "date": "2017-10-11T00:00:00Z", "lines": [{"amount": 123, "links": [{"type": "Bill", "id": "e7a45898-2db3-424c-acb9-a51647740f26", "amount": -123, "currencyRate": 1}]}], "reference": "17200006"}, {"modifiedDate": "2022-10-26T13:33:17Z", "sourceModifiedDate": "2019-02-14T17:56:54Z", "id": "b358df76-3930-42ad-8f38-78edcc60172d", "supplierRef": {"id": "41302634-76b5-4442-b800-0bb63780e77c", "supplierName": "Some Supplier"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 55000, "currency": "GBP", "currencyRate": 1, "date": "2017-10-31T00:00:00Z", "lines": [{"amount": 55000, "links": [{"type": "PaymentOnAccount", "id": "41302634-76b5-4442-b800-0bb63780e77c", "amount": -55000, "currencyRate": 1}]}], "reference": "17200001"}], "pageNumber": 1, "pageSize": 2, "totalResults": 39, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billPayments"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billPayments?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:21:36Z", "id": "135234103", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "totalAmount": 14.3, "currency": "GBP", "date": "2017-11-23T00:00:00", "note": "ATOMIC SOFTWARE LIMITE WELLINGTON,NZL OTHER �14.30 - Bill payment against Pints1 (The Eagle)", "lines": [{"amount": 14.3, "links": [{"type": "Bill", "id": "10659723", "amount": -14.3, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:21:36Z", "id": "168350314", "supplierRef": {"id": "6161941", "supplierName": "A & J Fabtech Ltd"}, "totalAmount": 30, "currency": "GBP", "date": "2019-01-03T00:00:00", "note": "�30.00 - Bill payment against Test123 (A & J Fabtech Ltd)", "lines": [{"amount": 30, "links": [{"type": "Bill", "id": "11224800", "amount": -30, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 89, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billPayments"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billPayments?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "id": "16", "supplierRef": {"id": "29"}, "accountRef": {"id": "167679", "name": "Cash"}, "totalAmount": 10, "currency": "GBP", "date": "2021-08-18T00:00:00", "note": "Bill payment", "lines": [{"amount": 10, "links": [{"type": "Bill", "id": "16", "amount": -10, "currencyRate": 1}], "allocatedOnDate": "2021-08-18T00:00:00"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "id": "18", "supplierRef": {"id": "39"}, "accountRef": {"id": "167679", "name": "Cash"}, "totalAmount": 15, "currency": "USD", "date": "2021-08-18T00:00:00", "note": "Bill payment Ikea", "lines": [{"amount": 15, "links": [{"type": "Bill", "id": "18", "amount": -15, "currencyRate": 1}], "allocatedOnDate": "2021-08-18T00:00:00"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 26, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/billPayments"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/billPayments?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-30T14:48:40Z", "sourceModifiedDate": "2021-03-26T10:31:06", "id": "112", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "totalAmount": 120, "currency": "GBP", "currencyRate": 1, "date": "2021-03-26T00:00:00", "lines": [{"amount": 120, "links": [{"type": "Bill", "id": "7", "amount": -120, "currencyRate": 1}]}], "reference": "Bill Payment #1"}, {"modifiedDate": "2023-01-30T14:48:40Z", "sourceModifiedDate": "2022-07-11T09:41:02", "id": "159623-724", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "totalAmount": -555.55, "currency": "GBP", "currencyRate": 1, "date": "2022-07-11T00:00:00", "lines": [{"amount": -555.55, "links": [{"type": "PaymentOnAccount", "id": "724", "amount": 555.55, "currencyRate": 1}]}], "reference": "Deposit #DEP25"}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/billPayments"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/billPayments?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:09:20Z", "sourceModifiedDate": "2023-12-16T05:04:58", "id": "3A09-1071529982", "supplierRef": {"id": "720000-1071512482", "supplierName": "Bayshore Auto Mall"}, "accountRef": {"id": "20000-933270541", "name": "Checking"}, "totalAmount": 532.97, "currency": "GBP", "currencyRate": 1, "date": "2023-01-11T00:00:00", "note": "Monthly Truck Payment", "lines": [{"amount": 532.97, "links": [{"type": "Bill", "id": "38AA-1071513625", "amount": -532.97, "currencyRate": 1}]}], "reference": "101", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:09:20Z", "sourceModifiedDate": "2023-12-16T05:06:15", "id": "84C2-1197705262", "supplierRef": {"id": "B0000-933272656", "supplierName": "Patton Hardware Supplies"}, "accountRef": {"id": "8000007E-1197732180", "name": "CalOil Credit Card"}, "totalAmount": 4050.98, "currency": "GBP", "currencyRate": 1, "date": "2023-01-15T00:00:00", "lines": [{"amount": 4050.98, "links": [{"type": "Bill", "id": "84C2-1197705262", "amount": -4050.98, "currencyRate": 1}], "allocatedOnDate": "2023-01-15T00:00:00"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 214, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billPayments"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billPayments?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:47Z", "sourceModifiedDate": "2019-05-13T13:14:26Z", "id": "20", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "totalAmount": 0, "currency": "GBP", "currencyRate": 1, "date": "2019-05-13T00:00:00", "lines": [{"amount": 0, "links": [{"type": "Bill", "id": "18", "amount": -5, "currencyRate": 1}, {"type": "CreditNote", "id": "19", "amount": 5, "currencyRate": 1}]}]}, {"modifiedDate": "2023-01-18T11:02:47Z", "sourceModifiedDate": "2019-05-31T12:55:10Z", "id": "25", "supplierRef": {"id": "5", "supplierName": "Callum McGinley"}, "accountRef": {"id": "63", "name": "Business Bank Account"}, "totalAmount": 5999.99, "currency": "GBP", "currencyRate": 1, "date": "2019-05-31T00:00:00", "lines": [{"amount": 5999.99, "links": [{"type": "Bill", "id": "24", "amount": -5999.99, "currencyRate": 1}]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 126, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billPayments"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billPayments?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-13T21:19:36Z", "id": "158", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 7940.6, "currency": "HKD", "currencyRate": 0.078807, "date": "2016-01-23T00:00:00", "lines": [{"amount": 7940.6, "links": [{"type": "Bill", "id": "157", "amount": -7940.6, "currencyRate": 1}]}], "reference": "1067", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-13T21:19:49Z", "id": "159", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 742.5, "currency": "HKD", "currencyRate": 0.078807, "date": "2016-01-23T00:00:00", "lines": [{"amount": 742.5, "links": [{"type": "Bill", "id": "28", "amount": -742.5, "currencyRate": 1}]}], "reference": "1068", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 191, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billPayments"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billPayments?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:54Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45462", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "totalAmount": 27, "currency": "GBP", "currencyRate": 1, "date": "2020-01-05T00:00:00Z", "note": "", "lines": [{"amount": 27, "links": [{"type": "PaymentOnAccount", "id": "CON001", "amount": -27, "currencyRate": 1}]}], "reference": "Payment invoice 1"}, {"modifiedDate": "2022-10-14T09:35:54Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45502", "supplierRef": {"id": "SDE001", "supplierName": "S D Enterprises"}, "totalAmount": 59, "currency": "GBP", "currencyRate": 1, "date": "2020-01-17T00:00:00Z", "note": "pay3", "lines": [{"amount": 59, "links": [{"type": "PaymentOnAccount", "id": "SDE001", "amount": -59, "currencyRate": 1}]}], "reference": "payment inv3"}], "pageNumber": 1, "pageSize": 2, "totalResults": 64, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billPayments"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billPayments?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "255", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "totalAmount": 370.71, "currency": "GBP", "currencyRate": 1, "date": "2022-01-29T00:00:00", "note": "Purchase payment 255 linked to, purchase invoice 86, purchase invoice 87, purchase invoice 250, purchase invoice 251, purchase invoice 252.", "lines": [{"amount": 117.5, "links": [{"type": "Bill", "id": "86", "amount": -117.5, "currencyRate": 1}]}, {"amount": 64.63, "links": [{"type": "Bill", "id": "87", "amount": -64.63, "currencyRate": 1}]}, {"amount": 50.57, "links": [{"type": "Bill", "id": "250", "amount": -50.57, "currencyRate": 1}]}, {"amount": 36.87, "links": [{"type": "Bill", "id": "251", "amount": -36.87, "currencyRate": 1}]}, {"amount": 101.14, "links": [{"type": "Bill", "id": "252", "amount": -101.14, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "256", "supplierRef": {"id": "QUA001", "supplierName": "Quality Motors"}, "totalAmount": 256.36, "currency": "GBP", "currencyRate": 1, "date": "2022-01-29T00:00:00", "note": "Purchase payment 256 linked to, purchase invoice 17.", "lines": [{"amount": 256.36, "links": [{"type": "Bill", "id": "17", "amount": -256.36, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 27, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billPayments"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billPayments?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:54:04Z", "sourceModifiedDate": "2019-11-20T09:30:03Z", "id": "d953b45e156011e8b45c025132dab352", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "totalAmount": 52.02, "currency": "GBP", "currencyRate": 1, "date": "2018-02-15T00:00:00", "note": "Supplier payment using credit/debit card - Cool stuff", "lines": [{"amount": 52.02, "links": [{"type": "PaymentOnAccount", "id": "ca430e0d156011e8b45c025132dab352", "amount": -52.02, "currencyRate": 1}]}]}, {"modifiedDate": "2022-10-24T14:54:04Z", "sourceModifiedDate": "2018-03-06T17:13:17Z", "id": "a99b9aae216111e8b45c025132dab352", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "accountRef": {"id": "9a3e4bc6267a11e797950a57719b2edb", "name": "Cash"}, "totalAmount": 52.02, "currency": "GBP", "currencyRate": 1, "date": "2018-03-06T00:00:00", "note": "Supplier payment using cash", "lines": [{"amount": 52.02, "links": [{"type": "PaymentOnAccount", "id": "ca430e0d156011e8b45c025132dab352", "amount": -52.02, "currencyRate": 1}]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 2225, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billPayments"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billPayments?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:32:13Z", "sourceModifiedDate": "2022-02-23T12:03:30", "id": "4471", "supplierRef": {"id": "3", "supplierName": "ADP"}, "accountRef": {"id": "353", "name": "Current Account"}, "totalAmount": 20, "currency": "GBP", "date": "2022-01-06T00:00:00", "note": "", "paymentMethodRef": {"id": "6", "name": "Cash"}, "lines": [{"amount": 20, "links": [{"type": "Bill", "id": "4470", "amount": -20, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:32:13Z", "sourceModifiedDate": "2022-02-23T12:06:58", "id": "4472", "supplierRef": {"id": "3", "supplierName": "ADP"}, "accountRef": {"id": "353", "name": "Current Account"}, "totalAmount": 5, "currency": "GBP", "date": "2022-01-06T00:00:00", "note": "", "paymentMethodRef": {"id": "6", "name": "Cash"}, "lines": [{"amount": 5, "links": [{"type": "Bill", "id": "4470", "amount": -5, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/billPayments"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/billPayments?page=1&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:37:10Z", "sourceModifiedDate": "2021-01-02T22:51:40", "id": "74004690-82a1-4810-aaca-6ce575af94b4", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 7267.2, "currency": "GBP", "currencyRate": 1, "date": "2021-12-20T00:00:00", "lines": [{"amount": 7267.2, "links": [{"type": "Bill", "id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "amount": -7267.2, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:37:10Z", "sourceModifiedDate": "2021-01-02T22:51:38", "id": "f2062172-b444-4c8b-b797-9f4c7a4244c7", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 7267.2, "currency": "GBP", "currencyRate": 1, "date": "2022-02-17T00:00:00", "lines": [{"amount": 7267.2, "links": [{"type": "Bill", "id": "09aa506f-cb81-4cd3-a1ea-6a0b91804d5a", "amount": -7267.2, "currencyRate": 1}]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 30, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billPayments"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billPayments?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-bill-payment: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-05-06T00:00:00", "id": "dcb18480-8b69-44d8-aa26-268b6a80d170", "supplierRef": {"id": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "totalAmount": 71351.42, "currency": "GBP", "currencyRate": 1, "date": "2022-05-06T00:00:00", "note": "Bill Payment against bill 81539597-e681-40c9-a4dd-ec2fffcde572", "paymentMethodRef": {"id": "cb4a5647-aa86-40ab-bb4f-158acaa99c12", "name": "Check payments-u4p"}, "lines": [{"amount": 71351.42, "links": [{"type": "Bill", "id": "81539597-e681-40c9-a4dd-ec2fffcde572", "amount": -71351.42, "currencyRate": 1}], "allocatedOnDate": "2022-05-06T00:00:00"}], "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "id": "19387f05-8ad1-ea11-bbaa-000d3a2b9185", "supplierRef": {"id": "c41217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Wide World Importers"}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 234, "currency": "GBP", "currencyRate": 1, "date": "2019-01-01T00:00:00", "note": "Invoice 107006", "lines": [{"amount": 234, "links": [{"type": "Bill", "id": "c8cb06bf-89d1-ea11-bbaa-000d3a2b9185-108006", "amount": -234, "currencyRate": 1}], "allocatedOnDate": "2019-01-01T00:00:00"}], "reference": "108006", "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:35:13Z", "sourceModifiedDate": "2019-11-05T14:26:22Z", "id": "da7e456f-76f7-42ac-8dad-d90a040f3afb", "supplierRef": {"id": "63fadca8-4905-475a-b32a-b4341293bcf4", "supplierName": "Kelly's Industrial Supplies"}, "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "totalAmount": -5, "currency": "EUR", "currencyRate": 1, "date": "2019-11-05T00:00:00Z", "lines": [{"amount": -5, "links": [{"type": "PaymentOnAccount", "id": "63fadca8-4905-475a-b32a-b4341293bcf4", "amount": 5, "currencyRate": 1}]}], "reference": "19200008"} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:33:17Z", "sourceModifiedDate": "2017-10-11T10:12:29Z", "id": "7a5f621b-739f-4ed8-b738-2aae3ef886ac", "supplierRef": {"id": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 123, "currency": "GBP", "currencyRate": 1, "date": "2017-10-11T00:00:00Z", "lines": [{"amount": 123, "links": [{"type": "Bill", "id": "e7a45898-2db3-424c-acb9-a51647740f26", "amount": -123, "currencyRate": 1}]}], "reference": "17200006"} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:21:36Z", "id": "135234103", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "totalAmount": 14.3, "currency": "GBP", "date": "2017-11-23T00:00:00", "note": "ATOMIC SOFTWARE LIMITE WELLINGTON,NZL OTHER �14.30 - Bill payment against Pints1 (The Eagle)", "lines": [{"amount": 14.3, "links": [{"type": "Bill", "id": "10659723", "amount": -14.3, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "id": "16", "supplierRef": {"id": "29"}, "accountRef": {"id": "167679", "name": "Cash"}, "totalAmount": 10, "currency": "GBP", "date": "2021-08-18T00:00:00", "note": "Bill payment", "lines": [{"amount": 10, "links": [{"type": "Bill", "id": "16", "amount": -10, "currencyRate": 1}], "allocatedOnDate": "2021-08-18T00:00:00"}], "metadata": {"isDeleted": false}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-30T14:48:40Z", "sourceModifiedDate": "2021-03-26T10:31:06", "id": "112", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "totalAmount": 120, "currency": "GBP", "currencyRate": 1, "date": "2021-03-26T00:00:00", "lines": [{"amount": 120, "links": [{"type": "Bill", "id": "7", "amount": -120, "currencyRate": 1}]}], "reference": "Bill Payment #1"} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:09:20Z", "sourceModifiedDate": "2023-12-16T05:04:58", "id": "3A09-1071529982", "supplierRef": {"id": "720000-1071512482", "supplierName": "Bayshore Auto Mall"}, "accountRef": {"id": "20000-933270541", "name": "Checking"}, "totalAmount": 532.97, "currency": "GBP", "currencyRate": 1, "date": "2023-01-11T00:00:00", "note": "Monthly Truck Payment", "lines": [{"amount": 532.97, "links": [{"type": "Bill", "id": "38AA-1071513625", "amount": -532.97, "currencyRate": 1}]}], "reference": "101", "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:47Z", "sourceModifiedDate": "2019-05-13T13:14:26Z", "id": "20", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "totalAmount": 0, "currency": "GBP", "currencyRate": 1, "date": "2019-05-13T00:00:00", "lines": [{"amount": 0, "links": [{"type": "Bill", "id": "18", "amount": -5, "currencyRate": 1}, {"type": "CreditNote", "id": "19", "amount": 5, "currencyRate": 1}]}]} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-13T21:19:36Z", "id": "158", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 7940.6, "currency": "HKD", "currencyRate": 0.078807, "date": "2016-01-23T00:00:00", "lines": [{"amount": 7940.6, "links": [{"type": "Bill", "id": "157", "amount": -7940.6, "currencyRate": 1}]}], "reference": "1067", "metadata": {"isDeleted": false}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:35:54Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45462", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "totalAmount": 27, "currency": "GBP", "currencyRate": 1, "date": "2020-01-05T00:00:00Z", "note": "", "lines": [{"amount": 27, "links": [{"type": "PaymentOnAccount", "id": "CON001", "amount": -27, "currencyRate": 1}]}], "reference": "Payment invoice 1"} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "255", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "totalAmount": 370.71, "currency": "GBP", "currencyRate": 1, "date": "2022-01-29T00:00:00", "note": "Purchase payment 255 linked to, purchase invoice 86, purchase invoice 87, purchase invoice 250, purchase invoice 251, purchase invoice 252.", "lines": [{"amount": 117.5, "links": [{"type": "Bill", "id": "86", "amount": -117.5, "currencyRate": 1}]}, {"amount": 64.63, "links": [{"type": "Bill", "id": "87", "amount": -64.63, "currencyRate": 1}]}, {"amount": 50.57, "links": [{"type": "Bill", "id": "250", "amount": -50.57, "currencyRate": 1}]}, {"amount": 36.87, "links": [{"type": "Bill", "id": "251", "amount": -36.87, "currencyRate": 1}]}, {"amount": 101.14, "links": [{"type": "Bill", "id": "252", "amount": -101.14, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:54:04Z", "sourceModifiedDate": "2019-11-20T09:30:03Z", "id": "d953b45e156011e8b45c025132dab352", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "totalAmount": 52.02, "currency": "GBP", "currencyRate": 1, "date": "2018-02-15T00:00:00", "note": "Supplier payment using credit/debit card - Cool stuff", "lines": [{"amount": 52.02, "links": [{"type": "PaymentOnAccount", "id": "ca430e0d156011e8b45c025132dab352", "amount": -52.02, "currencyRate": 1}]}]} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:32:13Z", "sourceModifiedDate": "2022-02-23T12:03:30", "id": "4471", "supplierRef": {"id": "3", "supplierName": "ADP"}, "accountRef": {"id": "353", "name": "Current Account"}, "totalAmount": 20, "currency": "GBP", "date": "2022-01-06T00:00:00", "note": "", "paymentMethodRef": {"id": "6", "name": "Cash"}, "lines": [{"amount": 20, "links": [{"type": "Bill", "id": "4470", "amount": -20, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:37:10Z", "sourceModifiedDate": "2021-01-02T22:51:40", "id": "74004690-82a1-4810-aaca-6ce575af94b4", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 7267.2, "currency": "GBP", "currencyRate": 1, "date": "2021-12-20T00:00:00", "lines": [{"amount": 7267.2, "links": [{"type": "Bill", "id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "amount": -7267.2, "currencyRate": 1}]}], "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-bills: - speakeasy-default-list-accounting-bills: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2023-02-14T17:09:02", "id": "81539597-e681-40c9-a4dd-ec2fffcde572", "reference": "b465a2c9-3212-4620-889b-6328ba148215", "supplierRef": {"id": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki"}, "purchaseOrderRefs": [], "issueDate": "2022-04-29T00:00:00", "dueDate": "2022-05-06T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 5, "discountAmount": 0, "subTotal": 13909.7, "taxAmount": 1390.97, "totalAmount": 15300.67, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 5, "discountAmount": 0, "subTotal": 6856.95, "taxAmount": 685.7, "totalAmount": 7542.65, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 6, "discountAmount": 0, "subTotal": 8228.34, "taxAmount": 822.83, "totalAmount": 9051.17, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 3, "discountAmount": 0, "subTotal": 8345.82, "taxAmount": 834.58, "totalAmount": 9180.4, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Trapped Road Gully 450mm x 450mm", "unitAmount": 402.89, "quantity": 8, "discountAmount": 0, "subTotal": 3223.12, "taxAmount": 322.31, "totalAmount": 3545.43, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1", "name": "Heavy Duty Hinged Gully Grating"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 7, "discountAmount": 0, "subTotal": 665.56, "taxAmount": 66.56, "totalAmount": 732.12, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 1, "discountAmount": 0, "subTotal": 95.08, "taxAmount": 9.51, "totalAmount": 104.59, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 2, "discountAmount": 0, "subTotal": 2742.78, "taxAmount": 274.28, "totalAmount": 3017.06, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 1, "discountAmount": 0, "subTotal": 2781.94, "taxAmount": 278.19, "totalAmount": 3060.13, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 7, "discountAmount": 0, "subTotal": 665.56, "taxAmount": 66.56, "totalAmount": 732.12, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1251.89, "quantity": 4, "discountAmount": 0, "subTotal": 5007.56, "taxAmount": 500.76, "totalAmount": 5508.32, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "51077072-d5c3-463b-9cb4-7da2e11886f9", "name": "150 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 9, "discountAmount": 0, "subTotal": 12342.51, "taxAmount": 1234.25, "totalAmount": 13576.76, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 64864.92, "taxAmount": 6486.5, "totalAmount": 71351.42, "amountDue": 0, "note": "Bill with 12 line items, totaling 71351.42", "paymentAllocations": [{"payment": {"id": "dcb18480-8b69-44d8-aa26-268b6a80d170", "note": "Bill Payment against bill 81539597-e681-40c9-a4dd-ec2fffcde572", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-06T00:00:00", "totalAmount": 71351.42}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-06T00:00:00", "totalAmount": -71351.42}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2023-04-14T01:56:02", "id": "acc1dc9d-a21a-41b8-953e-73da4afab6e6", "reference": "d88e83b8-a5cc-4578-815d-afa263df4beb", "supplierRef": {"id": "7GObELDcsE", "supplierName": "Lakin, Schmeler and Kihn"}, "purchaseOrderRefs": [{"id": "7f07b584-bebe-450f-aa9e-1d7aed630b66", "purchaseOrderNumber": "ee9b8e00-49a2-4d83-bc33-e2eee59a1c36"}], "issueDate": "2022-04-30T00:00:00", "dueDate": "2022-05-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 4, "discountAmount": 0, "subTotal": 380.32, "taxAmount": 38.03, "totalAmount": 418.35, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 380.32, "taxAmount": 38.03, "totalAmount": 418.35, "amountDue": 0, "note": "Bill for purchase order ee9b8e00-49a2-4d83-bc33-e2eee59a1c36", "paymentAllocations": [{"payment": {"id": "a4fa017a-3911-4eb0-aaf9-b002c446c8c3", "note": "Bill Payment against bill acc1dc9d-a21a-41b8-953e-73da4afab6e6", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-15T00:00:00", "totalAmount": 418.35}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-15T00:00:00", "totalAmount": -418.35}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 183, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/bills"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/bills?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-11-02T17:02:48Z", "id": "4019ee2b-d05a-ed11-8c34-000d3a0d28a2-108276", "reference": "108276", "supplierRef": {"id": "c01217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "First Up Consultants"}, "purchaseOrderRefs": [], "issueDate": "2019-01-01T00:00:00", "dueDate": "2019-01-01T00:00:00", "currency": "GBP", "lineItems": [{"description": "ATHENS Desk", "unitAmount": 506.6, "quantity": 4, "discountAmount": 202.64, "subTotal": 1823.76, "taxAmount": 364.75, "totalAmount": 2188.51, "discountPercentage": 10, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-c81217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "ATHENS Desk / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 1823.76, "taxAmount": 364.75, "totalAmount": 2188.51, "amountDue": 2188.51, "note": "129148", "paymentAllocations": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-05-17T16:29:02Z", "id": "b9cb06bf-89d1-ea11-bbaa-000d3a2b9185-108001", "reference": "108001", "supplierRef": {"id": "c01217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "First Up Consultants"}, "purchaseOrderRefs": [], "issueDate": "2019-01-01T00:00:00", "dueDate": "2019-01-01T00:00:00", "currency": "GBP", "lineItems": [{"description": "ATHENS Desk", "unitAmount": 506.6, "quantity": 4, "discountAmount": 0, "subTotal": 2026.4, "taxAmount": 405.28, "totalAmount": 2431.68, "discountPercentage": 0, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-c81217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "ATHENS Desk / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 2026.4, "taxAmount": 405.28, "totalAmount": 2431.68, "amountDue": 0, "note": "107001", "paymentAllocations": [{"payment": {"id": "57377f05-8ad1-ea11-bbaa-000d3a2b9185", "note": "Invoice 107001", "reference": "108001", "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-01-01T00:00:00", "totalAmount": 2431.68}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2019-01-01T00:00:00", "totalAmount": -2431.68}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 294, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/bills"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/bills?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:02Z", "id": "1c55118b-793e-4437-9c13-4f554b9ca989", "reference": "19600006", "supplierRef": {"id": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse"}, "purchaseOrderRefs": [], "issueDate": "2019-12-16T00:00:00Z", "dueDate": "2019-11-09T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "d9a2980b-2a43-46f2-9c7f-413d925b3cdd", "reference": "20200032", "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2021-03-22T00:00:00", "totalAmount": 12.1}, "allocation": {"currency": "EUR", "currencyRate": 1, "totalAmount": -12.1}}]}, {"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:39Z", "id": "ec0c61a1-deb6-4496-b9ee-feb29b16019c", "reference": "19600008", "supplierRef": {"id": "fc189bfa-f083-438c-bf09-379a0631d4a1", "supplierName": "Mickey Mouse"}, "purchaseOrderRefs": [], "issueDate": "2019-12-16T00:00:00Z", "dueDate": "2019-11-09T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "amountDue": 12.1, "paymentAllocations": [{"payment": {"id": "ef5d140b-16da-4fd2-a0c8-d5bfb89a13ee", "reference": "19900056", "accountRef": {"id": "a2d51b6f-677d-4bbf-ad0c-b45fd6231546", "name": "Activa herwaarderingen"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2019-11-07T00:00:00", "totalAmount": 0.21}, "allocation": {"currency": "EUR", "currencyRate": 1, "totalAmount": -0.21}}, {"payment": {"id": "b69e7ad4-2b90-4a5f-a8a0-67418ac95531", "reference": "19900053", "accountRef": {"id": "a2d51b6f-677d-4bbf-ad0c-b45fd6231546", "name": "Activa herwaarderingen"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2019-11-07T00:00:00", "totalAmount": 0.2}, "allocation": {"currency": "EUR", "currencyRate": 1, "totalAmount": -0.2}}, {"payment": {"id": "6ccd1256-6073-4bfc-8d88-700417685e72", "reference": "21200028", "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2021-10-05T00:00:00", "totalAmount": 12.1}, "allocation": {"currency": "EUR", "currencyRate": 1, "totalAmount": -12.1}}, {"payment": {"id": "69a8533b-3e59-4d2d-9bca-bc37bc0f7984", "reference": "19900055", "accountRef": {"id": "a2d51b6f-677d-4bbf-ad0c-b45fd6231546", "name": "Activa herwaarderingen"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2019-11-07T00:00:00", "totalAmount": 0.21}, "allocation": {"currency": "EUR", "currencyRate": 1, "totalAmount": -0.21}}, {"payment": {"id": "2dae3548-ff11-4ad8-886c-eb5cb7965024", "reference": "19900054", "accountRef": {"id": "a2d51b6f-677d-4bbf-ad0c-b45fd6231546", "name": "Activa herwaarderingen"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2019-11-07T00:00:00", "totalAmount": 0.21}, "allocation": {"currency": "EUR", "currencyRate": 1, "totalAmount": -0.21}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 80, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/bills"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/bills?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:20Z", "sourceModifiedDate": "2019-01-11T14:18:17Z", "id": "e7a45898-2db3-424c-acb9-a51647740f26", "reference": "17600002", "supplierRef": {"id": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils"}, "purchaseOrderRefs": [], "issueDate": "2017-09-26T00:00:00Z", "dueDate": "2017-10-26T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Stationery", "unitAmount": 400, "quantity": 2, "discountAmount": 0, "subTotal": 800, "taxAmount": 160, "totalAmount": 960, "accountRef": {"id": "e5e9e994-0f14-4614-b162-7b5593b21276", "name": "Finished Goods Stock"}, "taxRateRef": {"id": "63cd143a-66ab-4320-8a6d-ab6be85ed048", "name": "UK purchases standard rate � Excluding", "effectiveTaxRate": 20}, "itemRef": {"id": "001"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 800, "taxAmount": 160, "totalAmount": 960, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "7a5f621b-739f-4ed8-b738-2aae3ef886ac", "reference": "17200006", "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2017-10-11T00:00:00", "totalAmount": 123}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -123}}]}, {"modifiedDate": "2022-10-26T13:33:20Z", "sourceModifiedDate": "2019-01-11T12:03:31Z", "id": "064fbab9-9b4d-4e83-b2df-0f4ce12bc2bf", "reference": "19600001", "supplierRef": {"id": "a4d5d739-c979-4819-b0ce-666db1ec3a7d", "supplierName": "Exact Software (UK) Ltd � Exact Online"}, "purchaseOrderRefs": [], "issueDate": "2019-01-11T00:00:00Z", "dueDate": "2019-02-10T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Basket balls", "unitAmount": 20, "quantity": 1, "discountAmount": 0, "subTotal": 20, "taxAmount": 0, "totalAmount": 20, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "itemRef": {"id": "23"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 20, "taxAmount": 0, "totalAmount": 20, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "d871f677-c2df-4069-bda0-c6804a46b71b", "reference": "19200001", "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-02-10T00:00:00", "totalAmount": 20}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -20}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 83, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/bills"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/bills?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2020-11-11T12:48:55Z", "id": "16609552", "reference": "MATT - U", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "purchaseOrderRefs": [], "issueDate": "2014-08-21T00:00:00", "dueDate": "2018-09-20T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 125, "quantity": 1, "taxAmount": 25, "totalAmount": 150, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 125, "taxAmount": 25, "totalAmount": 150, "amountDue": 150, "paymentAllocations": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2020-11-11T12:50:41Z", "id": "16609589", "reference": "MATT - U", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "purchaseOrderRefs": [], "issueDate": "2014-08-21T00:00:00", "dueDate": "2018-09-20T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 125, "quantity": 1, "taxAmount": 25, "totalAmount": 150, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 125, "taxAmount": 25, "totalAmount": 150, "amountDue": 150, "paymentAllocations": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 137, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/bills"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/bills?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-04-26T19:34:22", "id": "27", "supplierRef": {"id": "87"}, "purchaseOrderRefs": [], "issueDate": "2021-04-26T00:00:00", "dueDate": "2021-05-26T00:00:00", "currency": "USD", "lineItems": [{"description": "Grocery", "unitAmount": 50, "quantity": 1, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "accountRef": {"id": "3384197", "name": "Advertising"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "amountDue": 50, "paymentAllocations": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-08-18T13:52:33", "id": "29", "supplierRef": {"id": "89"}, "purchaseOrderRefs": [], "issueDate": "2021-04-28T00:00:00", "dueDate": "2021-05-28T00:00:00", "currency": "GBP", "lineItems": [{"description": "Advertising refund", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "3384197", "name": "Advertising"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "amountDue": 0, "paymentAllocations": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 16, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/bills"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/bills?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:15Z", "id": "97615244", "reference": "25", "supplierRef": {"id": "9272052", "supplierName": "Supplier man"}, "purchaseOrderRefs": [], "issueDate": "2000-01-01T00:00:00", "dueDate": "2000-01-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 8.33, "quantity": 1, "subTotal": 8.33, "taxAmount": 1.67, "totalAmount": 10, "accountRef": {"id": "21481884", "name": "Computer equipment cost"}, "itemRef": {"id": "122990246"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 8.33, "taxAmount": 1.67, "totalAmount": 10, "amountDue": 0, "paymentAllocations": []}, {"modifiedDate": "2022-09-30T10:29:15Z", "id": "76144089", "reference": "1", "supplierRef": {"id": "6202387", "supplierName": "Dell"}, "purchaseOrderRefs": [], "issueDate": "2019-01-28T00:00:00", "dueDate": "2019-02-27T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 120, "quantity": 5, "subTotal": 600, "taxAmount": 0, "totalAmount": 600, "accountRef": {"id": "21481820", "name": "Materials purchased"}, "itemRef": {"id": "95293985"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 600, "taxAmount": 0, "totalAmount": 600, "amountDue": 0, "paymentAllocations": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 19, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/bills"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/bills?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-30T14:47:34Z", "sourceModifiedDate": "2022-07-05T13:38:10", "id": "7", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "purchaseOrderRefs": [], "issueDate": "2021-03-26T00:00:00", "dueDate": "2021-03-26T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 120, "quantity": 1, "unitOfMeasurement": "litre", "subTotal": 120, "totalAmount": 120, "accountRef": {"id": "716", "name": "Inventory In Transit"}, "trackingCategoryRefs": [{"id": "location-4", "name": "Europe"}], "tracking": {"categoryRefs": [{"id": "location-4", "name": "Europe"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 120, "taxAmount": 24, "totalAmount": 144, "amountDue": 24, "paymentAllocations": [{"payment": {"id": "112", "reference": "Bill Payment #1", "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-03-26T00:00:00", "totalAmount": 120}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -120}}]}, {"modifiedDate": "2023-01-30T14:47:34Z", "sourceModifiedDate": "2022-07-15T11:35:47", "id": "165372", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "purchaseOrderRefs": [], "issueDate": "2022-07-15T00:00:00", "dueDate": "2022-07-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 555.78, "quantity": 1, "subTotal": 555.78, "totalAmount": 555.78, "accountRef": {"id": "844", "name": "Asset account test 2"}, "trackingCategoryRefs": [{"id": "location-4", "name": "Europe"}], "tracking": {"categoryRefs": [{"id": "location-4", "name": "Europe"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 555.78, "taxAmount": 0, "totalAmount": 555.78, "amountDue": 500, "paymentAllocations": [{"payment": {"id": "165373", "reference": "Bill Payment #2", "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-07-15T00:00:00", "totalAmount": 555.78}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -55.78}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/bills"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/bills?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:06:42Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "3691-1071520776", "reference": "3847498", "supplierRef": {"id": "B0000-933272656", "supplierName": "Patton Hardware Supplies"}, "purchaseOrderRefs": [{"id": "3684-1071520443", "purchaseOrderNumber": "6225"}], "issueDate": "2022-12-02T00:00:00", "dueDate": "2024-01-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Cabinets:Light Pine - Light pine kitchen cabinet wall unit \n#CLD- 1235-p", "unitAmount": 1500, "quantity": 5, "discountAmount": 0, "subTotal": 7500, "taxAmount": 0, "totalAmount": 7500, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "110000-933272656", "name": "Cabinets:Light Pine"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}, {"description": "Hardware:Doorknobs Std - Doorknobs Part # DK 3704", "unitAmount": 27, "quantity": 100, "discountAmount": 0, "subTotal": 2700, "taxAmount": 0, "totalAmount": 2700, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "130000-933272656", "name": "Hardware:Doorknobs Std"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}, {"description": "Hardware:Lk Doorknobs - Locking interior doorknobs Part # DK415", "unitAmount": 34.95, "quantity": 100, "discountAmount": 0, "subTotal": 3495, "taxAmount": 0, "totalAmount": 3495, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "140000-933272656", "name": "Hardware:Lk Doorknobs"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 13695, "taxAmount": 0, "totalAmount": 13695, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "9E4C-1182131999", "reference": "115", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-31T00:00:00", "totalAmount": 13759}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -8695}}, {"payment": {"id": "36AD-1071520917", "note": "RC 93", "reference": "484", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-12-05T00:00:00", "totalAmount": 5325}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5000}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:06:42Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "5CAB-1197713763", "reference": "8374892", "supplierRef": {"id": "30000-933272656", "supplierName": "C. U. Electric"}, "purchaseOrderRefs": [], "issueDate": "2022-12-15T00:00:00", "dueDate": "2024-01-14T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 532, "quantity": 1, "discountAmount": 0, "subTotal": 532, "taxAmount": 0, "totalAmount": 532, "discountPercentage": 0, "accountRef": {"id": "490000-933270542", "name": "Gas and Electric"}, "trackingCategoryRefs": [{"id": "80000007-1197713802", "name": "Overhead"}], "tracking": {"categoryRefs": [{"id": "80000007-1197713802", "name": "Overhead"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 532, "taxAmount": 0, "totalAmount": 532, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "9E42-1182131999", "reference": "113", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-31T00:00:00", "totalAmount": 532}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -532}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 239, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/bills"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/bills?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:41Z", "sourceModifiedDate": "2022-05-26T10:34:10Z", "id": "18", "reference": "12", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "purchaseOrderRefs": [], "issueDate": "2019-05-13T00:00:00", "dueDate": "2019-05-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 5, "quantity": 1, "discountAmount": 0, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "20", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-05-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}]}, {"modifiedDate": "2023-01-18T11:02:41Z", "sourceModifiedDate": "2020-03-23T10:44:06Z", "id": "22", "reference": "12", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "purchaseOrderRefs": [], "issueDate": "2019-05-13T00:00:00", "dueDate": "2019-05-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 5, "quantity": 1, "discountAmount": 0, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "678", "note": "payment note test", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-03-23T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 147, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/bills"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/bills?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2023-01-26T11:20:45Z", "id": "157", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "purchaseOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-01-16T00:00:00", "currency": "HKD", "currencyRate": 0.081142, "lineItems": [{"description": "Water bottles -- generic", "unitAmount": 66.1717023, "quantity": 100, "discountAmount": 0, "subTotal": 6617.17, "taxAmount": 1323.43, "totalAmount": 7940.6, "taxRateRef": {"id": "3_Bills", "name": "20.0% S Bills", "effectiveTaxRate": 20}, "itemRef": {"id": "19", "name": "Water Bottles"}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "customerRef": {"id": "55", "companyName": "Oxon Insurance - Holiday Party"}, "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6617.17, "taxAmount": 1323.43, "totalAmount": 7940.6, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "158", "reference": "1067", "accountRef": {"id": "81", "name": "Current"}, "currency": "HKD", "currencyRate": 0.078807, "paidOnDate": "2016-01-23T00:00:00", "totalAmount": 7940.6}, "allocation": {"currency": "HKD", "currencyRate": 1, "totalAmount": -7940.6}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2016-09-13T21:19:49Z", "id": "28", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "purchaseOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-01-06T00:00:00", "currency": "HKD", "currencyRate": 0.081142, "lineItems": [{"description": "promotional items -- misc engraved items", "unitAmount": 8.25, "quantity": 75, "discountAmount": 0, "subTotal": 618.75, "taxAmount": 123.75, "totalAmount": 742.5, "taxRateRef": {"id": "3_Bills", "name": "20.0% S Bills", "effectiveTaxRate": 20}, "itemRef": {"id": "12", "name": "Misc"}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "customerRef": {"id": "59", "companyName": "Ecker Holiday event"}, "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 618.75, "taxAmount": 123.75, "totalAmount": 742.5, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "159", "reference": "1068", "accountRef": {"id": "81", "name": "Current"}, "currency": "HKD", "currencyRate": 0.078807, "paidOnDate": "2016-01-23T00:00:00", "totalAmount": 742.5}, "allocation": {"currency": "HKD", "currencyRate": 1, "totalAmount": -742.5}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 711, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/bills"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/bills?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:36:01Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45121", "reference": "Order no 1", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "purchaseOrderRefs": [], "issueDate": "2020-07-22T00:00:00Z", "dueDate": "2020-02-15T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.5, "subTotal": 0, "taxAmount": 20, "totalAmount": 20, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 2.5, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 100, "taxAmount": 20, "totalAmount": 120, "amountDue": 120, "note": "No1", "paymentAllocations": []}, {"modifiedDate": "2022-10-14T09:36:01Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45131", "reference": "Order 2", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "purchaseOrderRefs": [], "issueDate": "2020-07-22T00:00:00Z", "dueDate": "2020-03-01T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0, "subTotal": 0, "taxAmount": 31.6, "totalAmount": 31.6, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 0, "subTotal": 158, "taxAmount": 0, "totalAmount": 158, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 158, "taxAmount": 31.6, "totalAmount": 189.6, "amountDue": 179.1, "note": "No2", "paymentAllocations": [{"payment": {"id": "45391", "note": "ret1", "reference": "Return 1", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": 10.5}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 162, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/bills"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/bills?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "92", "reference": "2569", "supplierRef": {"id": "THO001", "supplierName": "Thompsons Electricals"}, "purchaseOrderRefs": [], "issueDate": "2021-01-01T00:00:00", "dueDate": "2022-01-31T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Goods", "unitAmount": 5875, "quantity": 1, "subTotal": 5000, "taxAmount": 875, "totalAmount": 5875, "accountRef": {"id": "5000", "name": "Materials Purchased"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_7", "name": "Workshop"}], "tracking": {"categoryRefs": [{"id": "department_7", "name": "Workshop"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5000, "taxAmount": 875, "totalAmount": 5875, "amountDue": 0, "note": "Goods", "paymentAllocations": [{"payment": {"id": "260", "note": "Purchase payment 260 linked to, purchase invoice 11, purchase invoice 18, purchase invoice 92, purchase invoice 93.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 7141.98}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5875}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "93", "reference": "2570", "supplierRef": {"id": "THO001", "supplierName": "Thompsons Electricals"}, "purchaseOrderRefs": [], "issueDate": "2021-01-15T00:00:00", "dueDate": "2022-02-14T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Goods", "unitAmount": 1175, "quantity": 1, "subTotal": 1000, "taxAmount": 175, "totalAmount": 1175, "accountRef": {"id": "5000", "name": "Materials Purchased"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_7", "name": "Workshop"}], "tracking": {"categoryRefs": [{"id": "department_7", "name": "Workshop"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 1000, "taxAmount": 175, "totalAmount": 1175, "amountDue": 0, "note": "Goods", "paymentAllocations": [{"payment": {"id": "260", "note": "Purchase payment 260 linked to, purchase invoice 11, purchase invoice 18, purchase invoice 92, purchase invoice 93.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 7141.98}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -1175}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 95, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/bills"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/bills?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:56:08Z", "sourceModifiedDate": "2020-02-05T15:19:28Z", "id": "15a7a15773b011e8aaa5027d54329956", "reference": "19/06/2018 - 435.60", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "purchaseOrderRefs": [], "issueDate": "2018-06-19T00:00:00", "dueDate": "2018-07-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 11, "quantity": 33, "subTotal": 363, "taxAmount": 72.6, "totalAmount": 435.6, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 363, "taxAmount": 72.6, "totalAmount": 435.6, "amountDue": 405.6, "paymentAllocations": [{"payment": {"id": "f11134e299cb4456be096265136a7770", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "e3e35dcda09642ca8880fc603b0a98e9", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "d9b643b9d6e149f4b443cbc6f22fe1dd", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "cbff2fed2f1641b7bee59f5dd68d29a1", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "3c3ed62353cf4d148352a14027738dbe", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "332e402b9d4b4614af82594d186f5f29", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}]}, {"modifiedDate": "2022-10-24T14:56:08Z", "sourceModifiedDate": "2022-02-22T13:48:56Z", "id": "09034445789211e8aaa5027d54329956", "reference": "25/06/2018 - 1,000.00", "supplierRef": {"id": "ec716559789111e8aaa5027d54329956", "supplierName": "Bagels Limited"}, "purchaseOrderRefs": [], "issueDate": "2018-06-25T00:00:00", "dueDate": "2018-07-25T00:00:00", "currency": "USD", "currencyRate": 0.752601305, "lineItems": [{"description": "Bagels", "unitAmount": 1000, "quantity": 1, "subTotal": 1000, "taxAmount": 0, "totalAmount": 1000, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "taxRateRef": {"id": "GB_ZERO", "name": "Zero Rated 0.00%", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 1000, "taxAmount": 0, "totalAmount": 1000, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "66d010243e3441ba89a793446eb9c74b", "note": "Supplier payment using credit/debit card - Test note", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "USD", "currencyRate": 0.734679838, "paidOnDate": "2022-02-16T00:00:00", "totalAmount": 1000}, "allocation": {"currency": "USD", "currencyRate": 1, "totalAmount": -1000}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 4658, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/bills"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/bills?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2022-02-23T12:06:58", "id": "4470", "reference": "test", "supplierRef": {"id": "3", "supplierName": "ADP"}, "purchaseOrderRefs": [], "issueDate": "2021-10-19T00:00:00", "dueDate": "2021-10-29T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 25, "quantity": 1, "subTotal": 25, "taxAmount": 0, "totalAmount": 25, "accountRef": {"id": "3", "name": "Accounts Payable"}, "taxRateRef": {"id": "82", "name": "UK Purchase Goods Zero Rate", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "tracking": {"categoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 25, "taxAmount": 0, "totalAmount": 25, "amountDue": 0, "note": "", "paymentAllocations": [{"payment": {"id": "4471", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2022-01-06T00:00:00", "totalAmount": 20}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -20}}, {"payment": {"id": "4472", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2022-01-06T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2022-04-22T12:24:59", "id": "4705", "reference": "JohnAndRob", "supplierRef": {"id": "8", "supplierName": "Worldwide Commercial"}, "purchaseOrderRefs": [], "issueDate": "2022-02-04T00:00:00", "dueDate": "2022-02-19T00:00:00", "currency": "USD", "currencyRate": 14, "lineItems": [{"description": "Some text for a description", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "3", "name": "Accounts Payable"}, "taxRateRef": {"id": "49", "name": "EC Purchase Goods Zero Rate", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "tracking": {"categoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "amountDue": 10, "note": "Some note on my bill", "paymentAllocations": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 17, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/bills"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/bills?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-02T21:07:23", "id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "reference": "", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "purchaseOrderRefs": [], "issueDate": "2021-11-19T00:00:00", "dueDate": "2021-12-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Half day training - Microsoft Office", "unitAmount": 1800, "quantity": 1, "discountAmount": 0, "subTotal": 1800, "taxAmount": 360, "totalAmount": 2160, "discountPercentage": 0, "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10", "name": "Consulting"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "489558f5-27b7-4f37-ad9f-d84611c2e2ab", "name": "Half day training - Microsoft Office"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 4000, "quantity": 1, "discountAmount": 0, "subTotal": 4000, "taxAmount": 800, "totalAmount": 4800, "discountPercentage": 0, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f", "name": "Desktop/network support via email & phone"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Stationery charges", "unitAmount": 32, "quantity": 8, "discountAmount": 0, "subTotal": 256, "taxAmount": 51.2, "totalAmount": 307.2, "discountPercentage": 0, "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6056, "taxAmount": 1211.2, "totalAmount": 7267.2, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "74004690-82a1-4810-aaca-6ce575af94b4", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-12-20T00:00:00", "totalAmount": 7267.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7267.2}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-02T21:06:22", "id": "09aa506f-cb81-4cd3-a1ea-6a0b91804d5a", "reference": "", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "purchaseOrderRefs": [], "issueDate": "2022-01-17T00:00:00", "dueDate": "2022-02-17T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Half day training - Microsoft Office", "unitAmount": 1800, "quantity": 1, "discountAmount": 0, "subTotal": 1800, "taxAmount": 360, "totalAmount": 2160, "discountPercentage": 0, "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10", "name": "Consulting"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "489558f5-27b7-4f37-ad9f-d84611c2e2ab", "name": "Half day training - Microsoft Office"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 4000, "quantity": 1, "discountAmount": 0, "subTotal": 4000, "taxAmount": 800, "totalAmount": 4800, "discountPercentage": 0, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f", "name": "Desktop/network support via email & phone"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Stationery charges", "unitAmount": 32, "quantity": 8, "discountAmount": 0, "subTotal": 256, "taxAmount": 51.2, "totalAmount": 307.2, "discountPercentage": 0, "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6056, "taxAmount": 1211.2, "totalAmount": 7267.2, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "f2062172-b444-4c8b-b797-9f4c7a4244c7", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-17T00:00:00", "totalAmount": 7267.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7267.2}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 44, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/bills"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/bills?page=2&pageSize=2"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-06-23T13:47:17", "id": "104957000000152027", "reference": "1", "supplierRef": {"id": "104957000000152001", "supplierName": "Mr. P N"}, "purchaseOrderRefs": [], "issueDate": "2020-06-23T00:00:00", "dueDate": "2020-06-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "withholdingTax": [], "status": "Paid", "subTotal": 0, "taxAmount": 0, "totalAmount": 10, "amountDue": 0, "paymentAllocations": []}, {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-11-04T13:07:23", "id": "104957000000152067", "reference": "2", "supplierRef": {"id": "104957000000152001", "supplierName": "Mr. P N"}, "purchaseOrderRefs": [], "issueDate": "2020-06-23T00:00:00", "dueDate": "2020-06-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "withholdingTax": [], "status": "Paid", "subTotal": 0, "taxAmount": 0, "totalAmount": 12, "amountDue": 0, "paymentAllocations": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 36, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/bills"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/bills?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-bill: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2023-02-14T17:09:02", "id": "81539597-e681-40c9-a4dd-ec2fffcde572", "reference": "b465a2c9-3212-4620-889b-6328ba148215", "supplierRef": {"id": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki"}, "purchaseOrderRefs": [], "issueDate": "2022-04-29T00:00:00", "dueDate": "2022-05-06T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 5, "discountAmount": 0, "subTotal": 13909.7, "taxAmount": 1390.97, "totalAmount": 15300.67, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 5, "discountAmount": 0, "subTotal": 6856.95, "taxAmount": 685.7, "totalAmount": 7542.65, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 6, "discountAmount": 0, "subTotal": 8228.34, "taxAmount": 822.83, "totalAmount": 9051.17, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 3, "discountAmount": 0, "subTotal": 8345.82, "taxAmount": 834.58, "totalAmount": 9180.4, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Trapped Road Gully 450mm x 450mm", "unitAmount": 402.89, "quantity": 8, "discountAmount": 0, "subTotal": 3223.12, "taxAmount": 322.31, "totalAmount": 3545.43, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1", "name": "Heavy Duty Hinged Gully Grating"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 7, "discountAmount": 0, "subTotal": 665.56, "taxAmount": 66.56, "totalAmount": 732.12, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 1, "discountAmount": 0, "subTotal": 95.08, "taxAmount": 9.51, "totalAmount": 104.59, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 2, "discountAmount": 0, "subTotal": 2742.78, "taxAmount": 274.28, "totalAmount": 3017.06, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 1, "discountAmount": 0, "subTotal": 2781.94, "taxAmount": 278.19, "totalAmount": 3060.13, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 7, "discountAmount": 0, "subTotal": 665.56, "taxAmount": 66.56, "totalAmount": 732.12, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1251.89, "quantity": 4, "discountAmount": 0, "subTotal": 5007.56, "taxAmount": 500.76, "totalAmount": 5508.32, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "51077072-d5c3-463b-9cb4-7da2e11886f9", "name": "150 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 9, "discountAmount": 0, "subTotal": 12342.51, "taxAmount": 1234.25, "totalAmount": 13576.76, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 64864.92, "taxAmount": 6486.5, "totalAmount": 71351.42, "amountDue": 0, "note": "Bill with 12 line items, totaling 71351.42", "paymentAllocations": [{"payment": {"id": "dcb18480-8b69-44d8-aa26-268b6a80d170", "note": "Bill Payment against bill 81539597-e681-40c9-a4dd-ec2fffcde572", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-06T00:00:00", "totalAmount": 71351.42}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-06T00:00:00", "totalAmount": -71351.42}}], "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-11-02T17:02:48Z", "id": "4019ee2b-d05a-ed11-8c34-000d3a0d28a2-108276", "reference": "108276", "supplierRef": {"id": "c01217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "First Up Consultants"}, "purchaseOrderRefs": [], "issueDate": "2019-01-01T00:00:00", "dueDate": "2019-01-01T00:00:00", "currency": "GBP", "lineItems": [{"description": "ATHENS Desk", "unitAmount": 506.6, "quantity": 4, "discountAmount": 202.64, "subTotal": 1823.76, "taxAmount": 364.75, "totalAmount": 2188.51, "discountPercentage": 10, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-c81217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "ATHENS Desk / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 1823.76, "taxAmount": 364.75, "totalAmount": 2188.51, "amountDue": 2188.51, "note": "129148", "paymentAllocations": [], "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:02Z", "id": "1c55118b-793e-4437-9c13-4f554b9ca989", "reference": "19600006", "supplierRef": {"id": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse"}, "purchaseOrderRefs": [], "issueDate": "2019-12-16T00:00:00Z", "dueDate": "2019-11-09T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "d9a2980b-2a43-46f2-9c7f-413d925b3cdd", "reference": "20200032", "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2021-03-22T00:00:00", "totalAmount": 12.1}, "allocation": {"currency": "EUR", "currencyRate": 1, "totalAmount": -12.1}}]} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:33:20Z", "sourceModifiedDate": "2019-01-11T14:18:17Z", "id": "e7a45898-2db3-424c-acb9-a51647740f26", "reference": "17600002", "supplierRef": {"id": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils"}, "purchaseOrderRefs": [], "issueDate": "2017-09-26T00:00:00Z", "dueDate": "2017-10-26T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Stationery", "unitAmount": 400, "quantity": 2, "discountAmount": 0, "subTotal": 800, "taxAmount": 160, "totalAmount": 960, "accountRef": {"id": "e5e9e994-0f14-4614-b162-7b5593b21276", "name": "Finished Goods Stock"}, "taxRateRef": {"id": "63cd143a-66ab-4320-8a6d-ab6be85ed048", "name": "UK purchases standard rate � Excluding", "effectiveTaxRate": 20}, "itemRef": {"id": "001"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 800, "taxAmount": 160, "totalAmount": 960, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "7a5f621b-739f-4ed8-b738-2aae3ef886ac", "reference": "17200006", "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2017-10-11T00:00:00", "totalAmount": 123}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -123}}]} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2020-11-11T12:48:55Z", "id": "16609552", "reference": "MATT - U", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "purchaseOrderRefs": [], "issueDate": "2014-08-21T00:00:00", "dueDate": "2018-09-20T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 125, "quantity": 1, "taxAmount": 25, "totalAmount": 150, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 125, "taxAmount": 25, "totalAmount": 150, "amountDue": 150, "paymentAllocations": [], "metadata": {"isDeleted": false}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-04-26T19:34:22", "id": "27", "supplierRef": {"id": "87"}, "purchaseOrderRefs": [], "issueDate": "2021-04-26T00:00:00", "dueDate": "2021-05-26T00:00:00", "currency": "USD", "lineItems": [{"description": "Grocery", "unitAmount": 50, "quantity": 1, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "accountRef": {"id": "3384197", "name": "Advertising"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "amountDue": 50, "paymentAllocations": [], "metadata": {"isDeleted": false}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:15Z", "id": "97615244", "reference": "25", "supplierRef": {"id": "9272052", "supplierName": "Supplier man"}, "purchaseOrderRefs": [], "issueDate": "2000-01-01T00:00:00", "dueDate": "2000-01-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 8.33, "quantity": 1, "subTotal": 8.33, "taxAmount": 1.67, "totalAmount": 10, "accountRef": {"id": "21481884", "name": "Computer equipment cost"}, "itemRef": {"id": "122990246"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 8.33, "taxAmount": 1.67, "totalAmount": 10, "amountDue": 0, "paymentAllocations": []} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-30T14:47:34Z", "sourceModifiedDate": "2022-07-05T13:38:10", "id": "7", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "purchaseOrderRefs": [], "issueDate": "2021-03-26T00:00:00", "dueDate": "2021-03-26T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 120, "quantity": 1, "unitOfMeasurement": "litre", "subTotal": 120, "totalAmount": 120, "accountRef": {"id": "716", "name": "Inventory In Transit"}, "trackingCategoryRefs": [{"id": "location-4", "name": "Europe"}], "tracking": {"categoryRefs": [{"id": "location-4", "name": "Europe"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 120, "taxAmount": 24, "totalAmount": 144, "amountDue": 24, "paymentAllocations": [{"payment": {"id": "112", "reference": "Bill Payment #1", "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-03-26T00:00:00", "totalAmount": 120}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -120}}]} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:06:42Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "3691-1071520776", "reference": "3847498", "supplierRef": {"id": "B0000-933272656", "supplierName": "Patton Hardware Supplies"}, "purchaseOrderRefs": [{"id": "3684-1071520443", "purchaseOrderNumber": "6225"}], "issueDate": "2022-12-02T00:00:00", "dueDate": "2024-01-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Cabinets:Light Pine - Light pine kitchen cabinet wall unit \n#CLD- 1235-p", "unitAmount": 1500, "quantity": 5, "discountAmount": 0, "subTotal": 7500, "taxAmount": 0, "totalAmount": 7500, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "110000-933272656", "name": "Cabinets:Light Pine"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}, {"description": "Hardware:Doorknobs Std - Doorknobs Part # DK 3704", "unitAmount": 27, "quantity": 100, "discountAmount": 0, "subTotal": 2700, "taxAmount": 0, "totalAmount": 2700, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "130000-933272656", "name": "Hardware:Doorknobs Std"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}, {"description": "Hardware:Lk Doorknobs - Locking interior doorknobs Part # DK415", "unitAmount": 34.95, "quantity": 100, "discountAmount": 0, "subTotal": 3495, "taxAmount": 0, "totalAmount": 3495, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "140000-933272656", "name": "Hardware:Lk Doorknobs"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 13695, "taxAmount": 0, "totalAmount": 13695, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "36AD-1071520917", "note": "RC 93", "reference": "484", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-12-05T00:00:00", "totalAmount": 5325}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5000}}, {"payment": {"id": "9E4C-1182131999", "reference": "115", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-31T00:00:00", "totalAmount": 13759}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -8695}}], "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:41Z", "sourceModifiedDate": "2022-05-26T10:34:10Z", "id": "18", "reference": "12", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "purchaseOrderRefs": [], "issueDate": "2019-05-13T00:00:00", "dueDate": "2019-05-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 5, "quantity": 1, "discountAmount": 0, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "20", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-05-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}]} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2023-01-26T11:20:45Z", "id": "157", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "purchaseOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-01-16T00:00:00", "currency": "HKD", "currencyRate": 0.081142, "lineItems": [{"description": "Water bottles -- generic", "unitAmount": 66.1717023, "quantity": 100, "discountAmount": 0, "subTotal": 6617.17, "taxAmount": 1323.43, "totalAmount": 7940.6, "taxRateRef": {"id": "3_Bills", "name": "20.0% S Bills", "effectiveTaxRate": 20}, "itemRef": {"id": "19", "name": "Water Bottles"}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "customerRef": {"id": "55", "companyName": "Oxon Insurance - Holiday Party"}, "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6617.17, "taxAmount": 1323.43, "totalAmount": 7940.6, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "158", "reference": "1067", "accountRef": {"id": "81", "name": "Current"}, "currency": "HKD", "currencyRate": 0.078807, "paidOnDate": "2016-01-23T00:00:00", "totalAmount": 7940.6}, "allocation": {"currency": "HKD", "currencyRate": 1, "totalAmount": -7940.6}}], "metadata": {"isDeleted": false}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:36:01Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45121", "reference": "Order no 1", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "purchaseOrderRefs": [], "issueDate": "2020-07-22T00:00:00Z", "dueDate": "2020-02-15T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.5, "subTotal": 0, "taxAmount": 20, "totalAmount": 20, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 2.5, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 100, "taxAmount": 20, "totalAmount": 120, "amountDue": 120, "note": "No1", "paymentAllocations": []} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "92", "reference": "2569", "supplierRef": {"id": "THO001", "supplierName": "Thompsons Electricals"}, "purchaseOrderRefs": [], "issueDate": "2021-01-01T00:00:00", "dueDate": "2022-01-31T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Goods", "unitAmount": 5875, "quantity": 1, "subTotal": 5000, "taxAmount": 875, "totalAmount": 5875, "accountRef": {"id": "5000", "name": "Materials Purchased"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_7", "name": "Workshop"}], "tracking": {"categoryRefs": [{"id": "department_7", "name": "Workshop"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5000, "taxAmount": 875, "totalAmount": 5875, "amountDue": 0, "note": "Goods", "paymentAllocations": [{"payment": {"id": "260", "note": "Purchase payment 260 linked to, purchase invoice 11, purchase invoice 18, purchase invoice 92, purchase invoice 93.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 7141.98}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5875}}], "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:56:08Z", "sourceModifiedDate": "2020-02-05T15:19:28Z", "id": "15a7a15773b011e8aaa5027d54329956", "reference": "19/06/2018 - 435.60", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "purchaseOrderRefs": [], "issueDate": "2018-06-19T00:00:00", "dueDate": "2018-07-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 11, "quantity": 33, "subTotal": 363, "taxAmount": 72.6, "totalAmount": 435.6, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 363, "taxAmount": 72.6, "totalAmount": 435.6, "amountDue": 405.6, "paymentAllocations": [{"payment": {"id": "332e402b9d4b4614af82594d186f5f29", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "3c3ed62353cf4d148352a14027738dbe", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "cbff2fed2f1641b7bee59f5dd68d29a1", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "d9b643b9d6e149f4b443cbc6f22fe1dd", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "e3e35dcda09642ca8880fc603b0a98e9", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "f11134e299cb4456be096265136a7770", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}]} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2022-02-23T12:06:58", "id": "4470", "reference": "test", "supplierRef": {"id": "3", "supplierName": "ADP"}, "purchaseOrderRefs": [], "issueDate": "2021-10-19T00:00:00", "dueDate": "2021-10-29T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 25, "quantity": 1, "subTotal": 25, "taxAmount": 0, "totalAmount": 25, "accountRef": {"id": "3", "name": "Accounts Payable"}, "taxRateRef": {"id": "82", "name": "UK Purchase Goods Zero Rate", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "tracking": {"categoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 25, "taxAmount": 0, "totalAmount": 25, "amountDue": 0, "note": "", "paymentAllocations": [{"payment": {"id": "4472", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2022-01-06T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -5}}, {"payment": {"id": "4471", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2022-01-06T00:00:00", "totalAmount": 20}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -20}}], "metadata": {"isDeleted": false}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-02T21:07:23", "id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "reference": "", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "purchaseOrderRefs": [], "issueDate": "2021-11-19T00:00:00", "dueDate": "2021-12-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Half day training - Microsoft Office", "unitAmount": 1800, "quantity": 1, "discountAmount": 0, "subTotal": 1800, "taxAmount": 360, "totalAmount": 2160, "discountPercentage": 0, "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10", "name": "Consulting"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "489558f5-27b7-4f37-ad9f-d84611c2e2ab", "name": "Half day training - Microsoft Office"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 4000, "quantity": 1, "discountAmount": 0, "subTotal": 4000, "taxAmount": 800, "totalAmount": 4800, "discountPercentage": 0, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f", "name": "Desktop/network support via email & phone"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Stationery charges", "unitAmount": 32, "quantity": 8, "discountAmount": 0, "subTotal": 256, "taxAmount": 51.2, "totalAmount": 307.2, "discountPercentage": 0, "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6056, "taxAmount": 1211.2, "totalAmount": 7267.2, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "74004690-82a1-4810-aaca-6ce575af94b4", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-12-20T00:00:00", "totalAmount": 7267.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "totalAmount": -7267.2}}], "metadata": {"isDeleted": false}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-06-23T13:47:17", "id": "104957000000152027", "reference": "1", "supplierRef": {"id": "104957000000152001", "supplierName": "Mr. P N"}, "purchaseOrderRefs": [], "issueDate": "2020-06-23T00:00:00", "dueDate": "2020-06-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "withholdingTax": [], "status": "Paid", "subTotal": 0, "taxAmount": 0, "totalAmount": 10, "amountDue": 0, "paymentAllocations": []} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-bill-attachments: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-list-accounting-bill-attachments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"attachments": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"}]} - "401": - application/json: {} - "500": - application/json: {} - get-accounting-bill-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-accounting-bill-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"} - "401": - application/json: {} - "500": - application/json: {} - download-accounting-bill-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-accounting-bill-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/octet-stream: "x-file: example.file" - "401": - application/json: {} - "500": - application/json: {} - list-accounting-suppliers: - speakeasy-default-list-accounting-suppliers: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "1660-11-28T23:18:00", "id": "owQ2Gqgj9f", "supplierName": "Abshire - Kshlerin", "contactName": "Faye Hansen", "emailAddress": "hello@Abshire-Kshlerin.info", "phone": "01338 858162", "addresses": [{"type": "Delivery", "line1": "Suite 431", "line2": "289 Giles Lake", "city": "Cesarmouth", "region": "Northern Ireland", "country": "United Kingdom", "postalCode": "BG40 9GP"}], "registrationNumber": "VYL1XZXR", "taxNumber": "1396267523.0914588", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "0177-04-27T11:56:00", "id": "FyUkHbZxhn", "supplierName": "Arjun Kuvalis", "contactName": "Werner Langworth", "emailAddress": "Arjun34@hotmail.com", "phone": "0116 796 3163", "addresses": [{"type": "Delivery", "line1": "Suite 214", "line2": "8439 Lueilwitz Passage", "city": "Fernandohaven", "region": "Northern Ireland", "country": "United Kingdom", "postalCode": "JG04 7PV"}, {"type": "Delivery", "line1": "Suite 096", "line2": "864 Halie Course", "city": "Juliochester", "region": "England", "country": "United Kingdom", "postalCode": "DZ8 4BF"}, {"type": "Delivery", "line1": "Suite 001", "line2": "416 Stokes Fords", "city": "Naderborough", "region": "Wales", "country": "United Kingdom", "postalCode": "XG25 0XX"}], "registrationNumber": "NI7JEJVM", "taxNumber": "7505220209.583549", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 100, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=2&pageSize=2"}}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:12Z", "sourceModifiedDate": "2020-11-04T11:44:22Z", "id": "78623f13-931e-eb11-bbf8-0022481b3585", "supplierName": "", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "GB", "postalCode": ""}], "taxNumber": "", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:12Z", "sourceModifiedDate": "2022-10-25T13:17:36Z", "id": "be49ec62-6754-ed11-946f-0022481b67d1", "supplierName": "", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "GB", "postalCode": ""}], "taxNumber": "", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 31, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=2&pageSize=2"}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2022-07-15T12:01:15Z", "id": "3150917c-1d92-4d77-9018-31b5c4758ca9", "supplierName": "Abe", "contactName": "Kelly's Contact Name", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "city": "Bakersfield", "region": "California", "country": "US", "postalCode": "933081"}], "registrationNumber": "8409314368", "status": "Active", "defaultCurrency": "EUR"}, {"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2021-06-09T12:04:08Z", "id": "00014c12-2616-481a-a2e8-31bdf2497775", "supplierName": "Ann's test supplier 2", "contactName": "Ann's contact name", "emailAddress": "anna@anna888888.com", "phone": "55555555", "addresses": [{"type": "Billing", "line1": "line1", "line2": "line2", "city": "city", "region": "region", "country": "RU", "postalCode": "postal"}], "registrationNumber": "55566677788899944455", "taxNumber": "RU4444444", "status": "Active", "defaultCurrency": "USD"}], "pageNumber": 1, "pageSize": 2, "totalResults": 73, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=2&pageSize=2"}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:13Z", "sourceModifiedDate": "2017-08-02T10:58:54Z", "id": "0185fea2-0298-445b-909a-0db685118a9e", "supplierName": "a", "addresses": [{"type": "Billing", "country": "GB"}], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2022-10-26T13:33:13Z", "sourceModifiedDate": "2020-05-01T14:05:46Z", "id": "64ae712f-4155-48bb-9fce-98232c51d979", "supplierName": "aa", "addresses": [{"type": "Billing", "country": "GB"}], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 118, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:08Z", "sourceModifiedDate": "2023-04-17T06:02:46", "id": "11526230", "supplierName": "-", "contactName": "Test 1", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:08Z", "sourceModifiedDate": "2023-04-24T06:19:23", "id": "9677150", "supplierName": "-", "contactName": "Test 1", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 159, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=2&pageSize=2"}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:25Z", "id": "api vendor", "supplierName": "api vendor", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:25Z", "id": "DUndsRykrmy8kFsc+FvYk29YkJze4zSjGecoF4YcUEhVU7auJ5JkQA0VjXptZ7XQ+D4n6WoxFIkaGY2V/t4flA==", "supplierName": "Chekko Test merchant 100 - Test Very long name: ORIG CO NAME:AMERICAN EXPRESS ORIG ID:9493560001 DESC DATE:220307 CO ENTRY DESCR:ACH PMT SEC:CCD TRACE#:021000023255482 EED:220307 IND ID:A4670 IND NAME:Rick Sanchez", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 7, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "2017-05-09T00:00:00", "id": "6202387", "supplierName": "Dell", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "taxNumber": "", "status": "Unknown"}, {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "1990-01-01T00:00:00", "id": "9338173", "supplierName": "Home", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "taxNumber": "", "status": "Unknown"}], "pageNumber": 1, "pageSize": 2, "totalResults": 7, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-30T14:47:02Z", "sourceModifiedDate": "2022-02-04T14:24:43", "id": "779", "supplierName": "Test Vendor", "contactName": "Test Vendor", "emailAddress": "", "phone": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2023-01-30T14:47:02Z", "sourceModifiedDate": "2021-03-26T09:53:15", "id": "726", "supplierName": "Vendor -.A", "contactName": "Vendor -.A", "emailAddress": "", "phone": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:09:03Z", "sourceModifiedDate": "2023-12-16T05:06:44", "id": "A60000-1197760912", "supplierName": "A Cheung Limited", "contactName": "Angela Cheung", "emailAddress": "AC@CheungLimited.com", "phone": "510 555 5723", "addresses": [{"type": "Billing", "line1": "A Cheung Limited, Angela Cheung", "line2": "3818 Bear Rd. West", "city": "Berkeley", "region": "CA", "postalCode": "94688"}], "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:09:03Z", "sourceModifiedDate": "2023-12-16T05:06:44", "id": "A40000-1197774038", "supplierName": "Bank of Anycity", "contactName": "Lisa D. Holzhauser", "emailAddress": "lisah@samplename.com", "phone": "415-555-9135", "addresses": [{"type": "Billing", "line1": "Bank of Anycity, Lisa Holzhauser", "line2": "1935 Main Street", "city": "Middlefield", "region": "CA", "postalCode": "94482"}], "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 54, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:36Z", "sourceModifiedDate": "2022-12-07T10:48:18Z", "id": "41", "supplierName": "AI Support", "contactName": "AI Support", "addresses": [{"type": "Billing", "line1": "test", "region": "string", "country": "Djibouti"}], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2023-01-18T11:02:36Z", "sourceModifiedDate": "2021-08-31T08:45:02Z", "id": "42", "supplierName": "AI Support 2", "contactName": "AI Support 2", "addresses": [{"type": "Billing", "line1": "test", "region": "string", "country": "DJ"}], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 23, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-13T01:51:08Z", "id": "129", "supplierName": "Ally Johnson", "contactName": "Miss Smith", "phone": "0728 38474", "addresses": [{"type": "Billing", "line1": "100 London Road", "line2": "Angel", "city": "London", "region": "Greater London", "country": "England", "postalCode": "EC1M"}], "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2022-07-06T15:55:28Z", "id": "88", "supplierName": "Andrew Haberbosch", "addresses": [], "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 64, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=2&pageSize=2"}}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:58Z", "id": "776", "supplierName": "Aaren", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Unknown", "line1": "", "line2": "", "city": "", "region": "", "country": "Great Britain", "postalCode": ""}], "taxNumber": "", "status": "Archived", "defaultCurrency": "GBP", "metadata": {"isDeleted": true}}, {"modifiedDate": "2022-10-14T09:35:58Z", "id": "914", "supplierName": "Aaren", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Unknown", "line1": "", "line2": "", "city": "", "region": "", "country": "Great Britain", "postalCode": ""}], "taxNumber": "", "status": "Archived", "defaultCurrency": "GBP", "metadata": {"isDeleted": true}}], "pageNumber": 1, "pageSize": 2, "totalResults": 943, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-11-25T09:43:54Z", "id": "CON001", "supplierName": "Concept Stationery Supplies", "contactName": "Mark Ramsay", "emailAddress": "newbusinessadvice@sage.com", "phone": "0191 643 4343", "addresses": [{"type": "Delivery", "line1": "66 New Street", "line2": "Ridgeway", "city": "Newcastle Upon Tyne", "region": "", "country": "GB", "postalCode": "NE1 4GF"}, {"type": "Unknown", "line1": "66 New Street", "line2": "Ridgeway", "city": "Newcastle upon Tyne", "region": "", "country": "GB", "postalCode": "NE1 4GF"}], "taxNumber": "GB988 3453 23", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-12-05T13:37:26Z", "id": "MCN001", "supplierName": "McNally Computer Supplies", "contactName": "Stuart Lynn", "emailAddress": "newbusinessadvice@sage.com", "phone": "0191 415 3434", "addresses": [{"type": "Delivery", "line1": "Station Lane Ind Est", "line2": "Birtley", "city": "Chester le Street", "region": "County Durham", "country": "GB", "postalCode": "DH1 3RG"}, {"type": "Unknown", "line1": "Station Lane Ind Est", "line2": "Birtley", "city": "Chester le Street", "region": "County Durham", "country": "GB", "postalCode": "DH1 3RG"}], "taxNumber": "GB455 2385 34", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 15, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2020-02-25T17:23:33Z", "id": "65179671e9ef424caff8b9006cd111c8", "supplierName": "5555 Abdul's Test Name", "contactName": "Main Contact", "addresses": [{"type": "Billing", "country": "United Kingdom (GB)"}], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2020-02-13T10:38:19Z", "id": "cf7f44d693904944a6a7cf3de0887964", "supplierName": "Abdi Supplier", "contactName": "Abdi", "emailAddress": "abdisupplier@company.com", "addresses": [{"type": "Billing", "line1": "1 Place House", "city": "London", "country": "United Kingdom (GB)", "postalCode": "WC1X 1AH"}], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 64, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:32:20Z", "sourceModifiedDate": "2023-02-16T09:48:27", "id": "3", "supplierName": "ADP", "contactName": "Jones, William", "phone": "214-760-9491", "addresses": [{"type": "Unknown", "line1": "208 S Akard St", "line2": "", "city": "Dallas", "region": "TX", "country": "United States", "postalCode": "75265"}], "registrationNumber": "", "taxNumber": "85-3678274", "status": "Active", "defaultCurrency": "USD", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:32:20Z", "sourceModifiedDate": "2022-06-15T11:38:29", "id": "29", "supplierName": "Advisor Printing", "contactName": "Roach, Nathan", "phone": "130-202-4796", "addresses": [{"type": "Unknown", "line1": "5 Carey Hill", "line2": "", "city": "Drayton Valley", "region": "Alberta", "country": "Canada", "postalCode": "G8V"}], "registrationNumber": "", "taxNumber": "", "status": "Active", "defaultCurrency": "CAD", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 77, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=2&pageSize=2"}}} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-11-16T18:15:24Z", "sourceModifiedDate": "2020-04-07T13:28:02Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0", "supplierName": "Computer Shop", "contactName": "", "emailAddress": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2022-11-16T18:15:24Z", "sourceModifiedDate": "2020-04-07T13:12:40Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0NzQx", "supplierName": "Flour Mill", "contactName": "", "emailAddress": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 9, "_links": {"self": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers"}, "current": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "e4c9d0e2-c285-4e85-b579-6d28b180c730", "supplierName": "24 Locks", "emailAddress": "", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "bab779bc-c5fb-42cb-a888-953e8309711c", "supplierName": "7-Eleven", "emailAddress": "", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 48, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=2&pageSize=2"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-09-16T13:09:56", "id": "104957000001494001", "supplierName": "Acme Corporation", "emailAddress": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-06-10T09:07:16", "id": "104957000000648001", "supplierName": "Cool company", "contactName": "Dre", "emailAddress": "", "addresses": [], "status": "Active", "defaultCurrency": "CAD"}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-supplier: - Clear Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "1660-11-28T23:18:00", "id": "owQ2Gqgj9f", "supplierName": "Abshire - Kshlerin", "contactName": "Faye Hansen", "emailAddress": "hello@Abshire-Kshlerin.info", "phone": "01338 858162", "addresses": [{"type": "Delivery", "line1": "Suite 431", "line2": "289 Giles Lake", "city": "Cesarmouth", "region": "Northern Ireland", "country": "United Kingdom", "postalCode": "BG40 9GP"}], "registrationNumber": "VYL1XZXR", "taxNumber": "1396267523.0914588", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:12Z", "sourceModifiedDate": "2020-11-04T11:44:22Z", "id": "78623f13-931e-eb11-bbf8-0022481b3585", "supplierName": "", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "GB", "postalCode": ""}], "taxNumber": "", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2022-07-15T12:01:15Z", "id": "3150917c-1d92-4d77-9018-31b5c4758ca9", "supplierName": "Abe", "contactName": "Kelly's Contact Name", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "city": "Bakersfield", "region": "California", "country": "US", "postalCode": "933081"}], "registrationNumber": "8409314368", "status": "Active", "defaultCurrency": "EUR"} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-26T13:33:13Z", "sourceModifiedDate": "2017-08-02T10:58:54Z", "id": "0185fea2-0298-445b-909a-0db685118a9e", "supplierName": "a", "addresses": [{"type": "Billing", "country": "GB"}], "status": "Active", "defaultCurrency": "GBP"} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:19:08Z", "sourceModifiedDate": "2023-04-17T06:02:46", "id": "11526230", "supplierName": "-", "contactName": "Test 1", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "status": "Active", "metadata": {"isDeleted": false}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-24T16:07:25Z", "id": "api vendor", "supplierName": "api vendor", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "2017-05-09T00:00:00", "id": "6202387", "supplierName": "Dell", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "taxNumber": "", "status": "Unknown"} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-30T14:47:02Z", "sourceModifiedDate": "2022-02-04T14:24:43", "id": "779", "supplierName": "Test Vendor", "contactName": "Test Vendor", "emailAddress": "", "phone": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:09:03Z", "sourceModifiedDate": "2023-12-16T05:06:44", "id": "A60000-1197760912", "supplierName": "A Cheung Limited", "contactName": "Angela Cheung", "emailAddress": "AC@CheungLimited.com", "phone": "510 555 5723", "addresses": [{"type": "Billing", "line1": "A Cheung Limited, Angela Cheung", "line2": "3818 Bear Rd. West", "city": "Berkeley", "region": "CA", "postalCode": "94688"}], "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:36Z", "sourceModifiedDate": "2022-12-07T10:48:18Z", "id": "41", "supplierName": "AI Support", "contactName": "AI Support", "addresses": [{"type": "Billing", "line1": "test", "region": "string", "country": "Djibouti"}], "status": "Active", "defaultCurrency": "GBP"} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-13T01:51:08Z", "id": "129", "supplierName": "Ally Johnson", "contactName": "Miss Smith", "phone": "0728 38474", "addresses": [{"type": "Billing", "line1": "100 London Road", "line2": "Angel", "city": "London", "region": "Greater London", "country": "England", "postalCode": "EC1M"}], "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} - Sage 200cloud: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-14T09:35:58Z", "id": "776", "supplierName": "Aaren", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Unknown", "line1": "", "line2": "", "city": "", "region": "", "country": "Great Britain", "postalCode": ""}], "taxNumber": "", "status": "Archived", "defaultCurrency": "GBP", "metadata": {"isDeleted": true}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-11-25T09:43:54Z", "id": "CON001", "supplierName": "Concept Stationery Supplies", "contactName": "Mark Ramsay", "emailAddress": "newbusinessadvice@sage.com", "phone": "0191 643 4343", "addresses": [{"type": "Delivery", "line1": "66 New Street", "line2": "Ridgeway", "city": "Newcastle Upon Tyne", "region": "", "country": "GB", "postalCode": "NE1 4GF"}, {"type": "Unknown", "line1": "66 New Street", "line2": "Ridgeway", "city": "Newcastle upon Tyne", "region": "", "country": "GB", "postalCode": "NE1 4GF"}], "taxNumber": "GB988 3453 23", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2020-02-25T17:23:33Z", "id": "65179671e9ef424caff8b9006cd111c8", "supplierName": "5555 Abdul's Test Name", "contactName": "Main Contact", "addresses": [{"type": "Billing", "country": "United Kingdom (GB)"}], "status": "Active", "defaultCurrency": "GBP"} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:32:20Z", "sourceModifiedDate": "2023-02-16T09:48:27", "id": "3", "supplierName": "ADP", "contactName": "Jones, William", "phone": "214-760-9491", "addresses": [{"type": "Unknown", "line1": "208 S Akard St", "line2": "", "city": "Dallas", "region": "TX", "country": "United States", "postalCode": "75265"}], "registrationNumber": "", "taxNumber": "85-3678274", "status": "Active", "defaultCurrency": "USD", "metadata": {"isDeleted": false}} - Wave: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-11-16T18:15:24Z", "sourceModifiedDate": "2020-04-07T13:28:02Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0", "supplierName": "Computer Shop", "contactName": "", "emailAddress": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "e4c9d0e2-c285-4e85-b579-6d28b180c730", "supplierName": "24 Locks", "emailAddress": "", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-09-16T13:09:56", "id": "104957000001494001", "supplierName": "Acme Corporation", "emailAddress": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-supplier-attachments: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-list-accounting-supplier-attachments: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"attachments": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"}]} - "401": - application/json: {} - "500": - application/json: {} - get-accounting-supplier-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-accounting-supplier-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "dateCreated": "2022-10-23T00:00:00Z"} - "401": - application/json: {} - "500": - application/json: {} - download-accounting-supplier-attachment: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-accounting-supplier-attachment: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/octet-stream: "x-file: example.file" - "401": - application/json: {} - "500": - application/json: {} - get-accounting-profile: - Example 1: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: {"companyName": "Codat", "accountingPlatformRef": "1700060034_ETD", "companyLegalName": "Codat Ltd", "addresses": [{"type": "Billing", "line1": "301 Ink Rooms", "line2": "28 Easton Street", "city": "London", "region": "England", "country": "United Kingdom", "postalCode": "WC1X 0BE"}, {"type": "Delivery", "line1": "28 Easton Street", "city": "London", "country": "UK", "postalCode": "WC1X 0BE"}], "phoneNumbers": [{"number": "02012 345678", "type": "Landline"}, {"number": "07123 456789", "type": "Mobile"}, {"number": "02012 345678", "type": "Fax"}], "webLinks": [{"type": "Website", "url": "https://www.codat.io/"}, {"type": "Social", "url": "https://www.linkedin.com/company/codat-limited/"}], "registrationNumber": "5590111724", "taxNumber": "74111622555799035846", "financialYearStartDate": "2023-04-01T00:00:00", "baseCurrency": "GBP", "sourceUrls": {"Api": "https://api.codat.io"}, "createdDate": "2020-03-09T15:19:26"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-commerce-profile: - Example 1: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"modifiedDate": "2022-03-10T15:42:13", "sourceModifiedDate": "2021-06-10T01:48:49", "companyName": "Codat", "companyLegalName": "Codat Ltd", "addresses": [{"type": "Billing", "line1": "301 Ink Rooms", "line2": "28 Easton Street", "city": "London", "region": "England", "country": "United Kingdom", "postalCode": "WC1X 0BE"}, {"type": "Delivery", "line1": "28 Easton Street", "city": "London", "country": "UK", "postalCode": "WC1X 0BE"}], "phoneNumbers": [{"number": "02012 345678", "type": "Landline"}, {"number": "07123 456789", "type": "Mobile"}, {"number": "02012 345678", "type": "Fax"}], "webLinks": [{"type": "Website", "url": "https://www.codat.io/"}, {"type": "Social", "url": "https://www.linkedin.com/company/codat-limited/"}], "registrationNumber": "5590111724", "baseCurrency": "GBP", "accountBalances": [{"available": 20053.23, "pending": 2034.23, "reserved": 517.23, "currency": "GBP"}], "sourceUrls": {"Api": "https://api.codat.io"}, "createdDate": "2019-03-07T16:50:49"} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-bank-account-transactions: - speakeasy-default-list-accounting-bank-account-transactions: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:19Z", "id": "07c891b4-f67a-ed11-9989-0022481ae525", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2022-11-17T00:00:00", "description": "Share Capital", "reconciled": false, "amount": 1, "balance": 1, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "5ced3895-f77a-ed11-9989-0022481b6241", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2022-11-17T00:00:00", "description": "Share Capital", "reconciled": false, "amount": 1, "balance": 2, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "cd12966b-8871-ed11-8c34-6045bd0c6935", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2022-12-02T00:00:00", "description": "", "reconciled": false, "amount": -19, "balance": -17, "transactionType": "Other"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "b13392b6-95a0-ed11-9a88-6045bdd16279", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-01-30T00:00:00", "description": "", "reconciled": false, "amount": -30, "balance": -72, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "b3696a16-1fa2-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-01-30T00:00:00", "description": "Income, Services", "reconciled": false, "amount": -10, "balance": -122, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "b73392b6-95a0-ed11-9a88-6045bdd16279", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-01-30T00:00:00", "description": "Child", "reconciled": false, "amount": -40, "balance": -112, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "befdd569-22a2-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-01-30T00:00:00", "description": "Child Child", "reconciled": false, "amount": -13, "balance": -160, "transactionType": "Other"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "cb71c33a-22a2-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-01-30T00:00:00", "description": "Income, Services", "reconciled": false, "amount": -25, "balance": -147, "transactionType": "Other"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "e7ec12c9-94a0-ed11-9a88-6045bdd16279", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-01-30T00:00:00", "description": "Child Child", "reconciled": false, "amount": -10, "balance": -27, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "fef7a026-95a0-ed11-9a88-6045bdd16279", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-01-30T00:00:00", "description": "", "reconciled": false, "amount": -15, "balance": -42, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "20869cb1-39a2-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-01T00:00:00", "description": "Accounts Payable", "reconciled": false, "amount": -14, "balance": -184, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "8c298754-20a2-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-01T00:00:00", "description": "", "reconciled": false, "amount": -10, "balance": -170, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "935d5578-3ca2-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-01T00:00:00", "description": "", "reconciled": false, "amount": -17, "balance": -201, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "935f4303-e3a2-ed11-9a88-002248010b7e", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-01T00:00:00", "description": "", "reconciled": false, "amount": -17, "balance": -239, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "d8ceb342-dba2-ed11-9a88-002248010b7e", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-01T00:00:00", "description": "", "reconciled": false, "amount": -21, "balance": -222, "transactionType": "Other"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "15719c0c-22a6-ed11-9a88-002248010b7e", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "", "reconciled": false, "amount": -20, "balance": -292.69, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "213d027d-b1a3-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "", "reconciled": false, "amount": -9.35, "balance": -265.19, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "273d027d-b1a3-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "Account no cat Balance Sheet", "reconciled": false, "amount": -7.5, "balance": -272.69, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "978c4a27-e0a2-ed11-9a88-002248010b7e", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "", "reconciled": false, "amount": 2.16, "balance": -236.84, "transactionType": "Other"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "a80f63ae-b0a3-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "", "reconciled": false, "amount": -7.01, "balance": -262.85, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "ad0f63ae-b0a3-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "Account no cat Balance Sheet", "reconciled": false, "amount": 7.01, "balance": -255.84, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "b5de7b74-afa3-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "", "reconciled": false, "amount": -4.91, "balance": -260.75, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "bbde7b74-afa3-ed11-9a88-000d3ad59051", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "", "reconciled": false, "amount": 4.91, "balance": -255.84, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "f9540bf4-e5a2-ed11-9a88-000d3ad5d945", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-02T00:00:00", "description": "", "reconciled": false, "amount": -19, "balance": -255.84, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "feca50d8-22a6-ed11-9a88-002248010b7e", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-06T00:00:00", "description": "", "reconciled": false, "amount": -20, "balance": -312.69, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "4777d7ec-cfa6-ed11-9a88-000d3a7fb2e5", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-07T00:00:00", "description": "", "reconciled": false, "amount": -2.34, "balance": -315.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "38b632de-7aac-ed11-9a88-002248410639", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-09T00:00:00", "description": "Invalid VAT Posting Setup", "reconciled": false, "amount": -10, "balance": -315.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "ffc0b740-68a8-ed11-9a88-6045bdd12fc1", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-09T00:00:00", "description": "", "reconciled": false, "amount": 10, "balance": -305.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "95f27455-7cac-ed11-9a88-002248410639", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-14T00:00:00", "description": "", "reconciled": false, "amount": -10, "balance": -325.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "0d6b1378-acae-ed11-9a88-6045bdd16279", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-16T00:00:00", "description": "Bank Account Line", "reconciled": false, "amount": -12, "balance": -337.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "978da9f7-baae-ed11-9a88-6045bdc1c1f3", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-18T00:00:00", "description": "Bank", "reconciled": false, "amount": 6, "balance": -342.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "dd34e6eb-b6ae-ed11-9a88-6045bdc1c1f3", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-18T00:00:00", "description": "G/L", "reconciled": false, "amount": -1, "balance": -338.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "e234e6eb-b6ae-ed11-9a88-6045bdc1c1f3", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-18T00:00:00", "description": "Customer", "reconciled": false, "amount": 2, "balance": -336.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "e734e6eb-b6ae-ed11-9a88-6045bdc1c1f3", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-18T00:00:00", "description": "Vendor", "reconciled": false, "amount": -3, "balance": -339.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "ed34e6eb-b6ae-ed11-9a88-6045bdc1c1f3", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-18T00:00:00", "description": "Bank", "reconciled": false, "amount": -4, "balance": -343.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "f234e6eb-b6ae-ed11-9a88-6045bdc1c1f3", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-18T00:00:00", "description": "Employee", "reconciled": false, "amount": -5, "balance": -348.03, "transactionType": "Payment"}, {"modifiedDate": "2023-03-27T14:21:19Z", "id": "39de1293-d3b1-ed11-9a88-6045bd0f94d6", "accountId": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "clearedOnDate": "2023-02-21T00:00:00", "description": "", "reconciled": false, "amount": -10, "balance": -352.03, "transactionType": "Credit"}], "pageNumber": 1, "pageSize": 100, "totalResults": 37, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts/c9a41bc7-6e5b-ed11-8c34-0022481b8b5b/bankTransactions"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts/c9a41bc7-6e5b-ed11-8c34-0022481b8b5b/bankTransactions"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2020-10-28T16:27:10Z", "id": "261197890", "accountId": "738783", "clearedOnDate": "2020-10-28T00:00:00", "description": "Invoice receipt against 1762", "reconciled": true, "amount": 111, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2021-04-27T04:55:42Z", "id": "290878530", "accountId": "738783", "clearedOnDate": "2021-04-23T00:00:00", "description": "Invoice receipt against 1980", "reconciled": true, "amount": 10, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2021-04-26T14:05:15Z", "id": "290825614", "accountId": "738783", "clearedOnDate": "2021-04-26T00:00:00", "description": "Invoice receipt against 1976", "reconciled": true, "amount": 10, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2021-04-27T04:55:44Z", "id": "290878531", "accountId": "738783", "clearedOnDate": "2021-04-26T00:00:00", "description": "Invoice receipt against 1981", "reconciled": true, "amount": 20, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2021-04-28T13:43:56Z", "id": "291227300", "accountId": "738783", "clearedOnDate": "2021-04-28T00:00:00", "description": "Invoice receipt against 2002", "reconciled": true, "amount": 20, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2021-04-28T16:14:16Z", "id": "291242296", "accountId": "738783", "clearedOnDate": "2021-04-28T00:00:00", "description": "Invoice receipt against 2012", "reconciled": true, "amount": 40, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2022-03-21T14:59:40Z", "id": "346437532", "accountId": "738783", "clearedOnDate": "2022-03-21T00:00:00", "description": "Invoice receipt against 2304", "reconciled": true, "amount": 1, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2022-03-21T15:37:54Z", "id": "346444438", "accountId": "738783", "clearedOnDate": "2022-03-21T00:00:00", "description": "Invoice receipt against 2304", "reconciled": true, "amount": 1, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2022-03-21T15:41:22Z", "id": "346444989", "accountId": "738783", "clearedOnDate": "2022-03-21T00:00:00", "description": "Invoice receipt against 2304", "reconciled": true, "amount": 1, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2022-03-21T17:07:50Z", "id": "346457774", "accountId": "738783", "clearedOnDate": "2022-03-21T00:00:00", "description": "Credit Note refund against 2313", "reconciled": true, "amount": -1, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2022-03-21T17:14:15Z", "id": "346458196", "accountId": "738783", "clearedOnDate": "2022-03-21T00:00:00", "description": "Invoice receipt against 2311", "reconciled": true, "amount": 1, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441841", "accountId": "738783", "clearedOnDate": "2022-12-20T00:00:00", "description": "MCDONALDS - ROYSTON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -12.78, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441842", "accountId": "738783", "clearedOnDate": "2022-12-20T00:00:00", "description": "HERMES PARCELNET LTD T/A - 08445437147 - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -7.98, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441845", "accountId": "738783", "clearedOnDate": "2022-12-20T00:00:00", "description": "TRAVELODGE GB0000 - THAME - Card Ending: 4999//OTHER/", "reconciled": false, "amount": -648.63, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441847", "accountId": "738783", "clearedOnDate": "2022-12-20T00:00:00", "description": "TRAVELODGE GB0000 - THAME - Card Ending: 4999//OTHER/", "reconciled": false, "amount": -324.31, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441849", "accountId": "738783", "clearedOnDate": "2022-12-20T00:00:00", "description": "RUGBY, PRET A MANGER - RUGBY - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -11.45, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441851", "accountId": "738783", "clearedOnDate": "2022-12-20T00:00:00", "description": "Just Eat - London - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -22.52, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441852", "accountId": "738783", "clearedOnDate": "2022-12-20T00:00:00", "description": "CN TAR TAROM SA-MOBILP - ORAS OTOPENI - Card Ending: 4999//OTHER/", "reconciled": false, "amount": -340.13, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441854", "accountId": "738783", "clearedOnDate": "2022-12-21T00:00:00", "description": "MOTO RUGBY SERVICES - RUGBY - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -126.12, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441855", "accountId": "738783", "clearedOnDate": "2022-12-21T00:00:00", "description": "POMANDA.COM - 138 HOLBORN, - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -9.99, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441856", "accountId": "738783", "clearedOnDate": "2022-12-21T00:00:00", "description": "RYANAIR 224BEZ3YM - LONDON - Card Ending: 4999//OTHER/", "reconciled": false, "amount": -267.97, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441857", "accountId": "738783", "clearedOnDate": "2022-12-21T00:00:00", "description": "TESCO STORES 5956 - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -9.35, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441859", "accountId": "738783", "clearedOnDate": "2022-12-21T00:00:00", "description": "SPOTIFY - LONDON - Card Ending: 4999//OTHER/", "reconciled": false, "amount": -16.99, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441860", "accountId": "738783", "clearedOnDate": "2022-12-21T00:00:00", "description": "Revive My Device - London - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -149, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441861", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "DELIVEROO - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -39.36, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:33Z", "id": "414441862", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "UPS LTD - FELTHAM - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -2.4, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441863", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "Amazon.co.uk*1N0N04VK4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -17.76, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441864", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "TESCO STORES 5956 - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -10.65, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441865", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "GATHER & GATHER 3401 - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -16.75, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441866", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "GATHER & GATHER 3401 - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -4.55, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441867", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "TRAVELODGE GB0937 - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -10.75, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441868", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "DELIVEROO - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -34.2, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441869", "accountId": "738783", "clearedOnDate": "2022-12-22T00:00:00", "description": "TFL TRAVEL CH - TFL.GOV.UK/CP - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -2.8, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441870", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "SIDS DIY - LONDON E1 - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -5.99, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441871", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "RESOLUTION GB LTD - WHITCHURCH - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -368.72, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441872", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "GATHER & GATHER 3401 - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -6.15, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441874", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "HERMES PARCELNET LTD T/A - 08445437147 - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -5.34, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441875", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "Refund: SCREWFIX DIR LTD - WHITECHAP1983 - Card Ending: 9271//OTHER/", "reconciled": false, "amount": 6.8, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441876", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "Refund: SCREWFIX DIR LTD - WHITECHAP1983 - Card Ending: 9271//OTHER/", "reconciled": false, "amount": 12.49, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441877", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "SCREWFIX DIR LTD - WHITECHAP1983 - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -6.5, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441878", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "SCREWFIX DIR LTD - WHITECHAP1983 - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -27.15, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441879", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "GOODMANS FIELD - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -8, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441880", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "GOODMANS FIELD - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -25.7, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:34Z", "id": "414441881", "accountId": "738783", "clearedOnDate": "2022-12-23T00:00:00", "description": "CREAMLINE DAIRIES ONLINE - MANCHESTER - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -50, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441883", "accountId": "738783", "clearedOnDate": "2022-12-24T00:00:00", "description": "AIRBNB * HMYDEXRY4N - 203-318-1111 - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -388.24, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441884", "accountId": "738783", "clearedOnDate": "2022-12-24T00:00:00", "description": "UPS LTD - FELTHAM - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -9.35, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441886", "accountId": "738783", "clearedOnDate": "2022-12-24T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -11.9, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441889", "accountId": "738783", "clearedOnDate": "2022-12-24T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -6.84, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441891", "accountId": "738783", "clearedOnDate": "2022-12-24T00:00:00", "description": "WELCOME BREAK - NEWPORT PAGNE - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -102.23, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441892", "accountId": "738783", "clearedOnDate": "2022-12-24T00:00:00", "description": "SUBWAY 63582 London Gatew - Mill Hill, Lo - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -15.38, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441893", "accountId": "738783", "clearedOnDate": "2022-12-26T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -40.65, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441894", "accountId": "738783", "clearedOnDate": "2022-12-26T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -2, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441895", "accountId": "738783", "clearedOnDate": "2022-12-26T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -34.06, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441897", "accountId": "738783", "clearedOnDate": "2022-12-26T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -2, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441901", "accountId": "738783", "clearedOnDate": "2022-12-28T00:00:00", "description": "Tesla - West Drayton - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -9.99, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441904", "accountId": "738783", "clearedOnDate": "2022-12-28T00:00:00", "description": "Box Deansgate - Manchester - Card Ending: 0614//OTHER/", "reconciled": false, "amount": -20.65, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441906", "accountId": "738783", "clearedOnDate": "2022-12-28T00:00:00", "description": "MANCHESTER UNITED KIOSK - MANCHESTER - Card Ending: 0614//OTHER/", "reconciled": false, "amount": -26.5, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441908", "accountId": "738783", "clearedOnDate": "2022-12-29T00:00:00", "description": "TFL TRAVEL CH - TFL.GOV.UK/CP - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -2.8, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441909", "accountId": "738783", "clearedOnDate": "2022-12-31T00:00:00", "description": "TFL TRAVEL CH - TFL.GOV.UK/CP - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -1.65, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441910", "accountId": "738783", "clearedOnDate": "2023-01-01T00:00:00", "description": "UBER* TRIP - LONDON - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -2, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:35Z", "id": "414441911", "accountId": "738783", "clearedOnDate": "2023-01-01T00:00:00", "description": "UBER* TRIP - LONDON - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -11.95, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441912", "accountId": "738783", "clearedOnDate": "2023-01-02T00:00:00", "description": "UBER* TRIP - LONDON - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -13.68, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441913", "accountId": "738783", "clearedOnDate": "2023-01-02T00:00:00", "description": "WWW.KASHFLOW.COM - DATCHET - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -22.8, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441914", "accountId": "738783", "clearedOnDate": "2023-01-02T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -9.14, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441915", "accountId": "738783", "clearedOnDate": "2023-01-02T00:00:00", "description": "GOOGLE*GSUITE ISOMI.CO - DUBLIN 2 - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -216.2, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441916", "accountId": "738783", "clearedOnDate": "2023-01-03T00:00:00", "description": "Refund: AMZ*quickpickdeals - amazon.co.uk - Card Ending: 4999//OTHER/", "reconciled": false, "amount": 10.97, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441917", "accountId": "738783", "clearedOnDate": "2023-01-04T00:00:00", "description": "Finance Charge//OTHER/", "reconciled": false, "amount": -0.41, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441918", "accountId": "738783", "clearedOnDate": "2023-01-04T00:00:00", "description": "WWW.KASHFLOW.COM - DATCHET - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -22.8, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441919", "accountId": "738783", "clearedOnDate": "2023-01-04T00:00:00", "description": "ACCU.CO.UK - HUDDERSFIELD - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -86.34, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441920", "accountId": "738783", "clearedOnDate": "2023-01-04T00:00:00", "description": "ASDA GROCERIES ONLINE - INTERNET - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -6.5, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441922", "accountId": "738783", "clearedOnDate": "2023-01-04T00:00:00", "description": "AMAZON PRIME*164AU3UZ4 AM - AMZN.CO.UK/PM - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -96, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441924", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "Amazon.co.uk*162DC7II4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -44.62, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441926", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "trainline - +443332022222 - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -65.46, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441931", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "VITAL PARTS LTD - MAIDSTONE - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -124.35, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441934", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "Amazon.co.uk*168E49IU4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -2.52, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441935", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "ASDA GROCERIES ONLINE - INTERNET - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -108.16, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441936", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "Refund: ASDA GROCERIES ONLINE - INTERNET - Card Ending: 2327//OTHER/", "reconciled": false, "amount": 22.96, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:36Z", "id": "414441937", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "Amazon.co.uk*1H31B0CO4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -20.52, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441939", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "Amazon.co.uk*1H4GR4CH4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -13.69, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441941", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "Amazon.co.uk*162V47WY4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -16.83, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441945", "accountId": "738783", "clearedOnDate": "2023-01-05T00:00:00", "description": "Amazon.co.uk*160J00WI4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -17.68, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441946", "accountId": "738783", "clearedOnDate": "2023-01-06T00:00:00", "description": "Amazon.co.uk*1692Y9YY4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -29.74, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441947", "accountId": "738783", "clearedOnDate": "2023-01-06T00:00:00", "description": "Amazon.co.uk*166I62Y14 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -29.74, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441948", "accountId": "738783", "clearedOnDate": "2023-01-06T00:00:00", "description": "GMELIUS GROWTH - MEYRIN - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -121.3, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441949", "accountId": "738783", "clearedOnDate": "2023-01-07T00:00:00", "description": "ACCU.CO.UK - HUDDERSFIELD - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -116.34, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441950", "accountId": "738783", "clearedOnDate": "2023-01-07T00:00:00", "description": "AMZNMktplace - amazon.co.uk - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -66.79, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441951", "accountId": "738783", "clearedOnDate": "2023-01-07T00:00:00", "description": "TOOLSTATION UK - NORTHAMPTON - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -77.88, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441952", "accountId": "738783", "clearedOnDate": "2023-01-07T00:00:00", "description": "SHELL CHESTER - CHESTER - Card Ending: 9271//OTHER/", "reconciled": false, "amount": -112.24, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441953", "accountId": "738783", "clearedOnDate": "2023-01-08T00:00:00", "description": "BRITISH A 1252150515112 - LONDON - Card Ending: 4999//OTHER/", "reconciled": false, "amount": -450.85, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441954", "accountId": "738783", "clearedOnDate": "2023-01-08T00:00:00", "description": "BRITISH A 1254217966962 - LONDON - Card Ending: 4999//OTHER/", "reconciled": false, "amount": -65, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441955", "accountId": "738783", "clearedOnDate": "2023-01-08T00:00:00", "description": "TFL TRAVEL CH - TFL.GOV.UK/CP - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -3.3, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441956", "accountId": "738783", "clearedOnDate": "2023-01-09T00:00:00", "description": "Amazon.co.uk*1H97Y6TL4 - AMAZON.CO.UK - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -17.45, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441957", "accountId": "738783", "clearedOnDate": "2023-01-09T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -15.03, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441959", "accountId": "738783", "clearedOnDate": "2023-01-09T00:00:00", "description": "UBER *TRIP - HELP.UBER.COM - Card Ending: 1332//OTHER/", "reconciled": false, "amount": -16.43, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:37Z", "id": "414441960", "accountId": "738783", "clearedOnDate": "2023-01-09T00:00:00", "description": "Payment made (BACS)//OTHER/", "reconciled": false, "amount": 5000, "transactionType": "Credit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:38Z", "id": "414441961", "accountId": "738783", "clearedOnDate": "2023-01-10T00:00:00", "description": "AMZNMktplace - amazon.co.uk - Card Ending: 2327//OTHER/", "reconciled": false, "amount": -32.57, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:38Z", "id": "414441962", "accountId": "738783", "clearedOnDate": "2023-01-10T00:00:00", "description": "TESCO STORES - LONDON - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -3.9, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:38Z", "id": "414441963", "accountId": "738783", "clearedOnDate": "2023-01-10T00:00:00", "description": "VICTORIA INN - PECKHAM - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -15.5, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:38Z", "id": "414441965", "accountId": "738783", "clearedOnDate": "2023-01-10T00:00:00", "description": "TFL TRAVEL CH - TFL.GOV.UK/CP - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -7.7, "transactionType": "Debit"}, {"modifiedDate": "2023-04-25T14:21:41Z", "sourceModifiedDate": "2023-02-08T09:05:38Z", "id": "414441967", "accountId": "738783", "clearedOnDate": "2023-01-10T00:00:00", "description": "PRET A MANGER - 326 - Card Ending: 5913//OTHER/", "reconciled": false, "amount": -13.8, "transactionType": "Debit"}], "pageNumber": 1, "pageSize": 100, "totalResults": 153, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts/738783/bankTransactions"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts/738783/bankTransactions"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts/738783/bankTransactions?page=2&pageSize=100"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:15Z", "id": "765768:137014109", "accountId": "765768", "clearedOnDate": "2020-04-28T00:00:00", "description": "FIRST Transaction", "reconciled": false, "amount": 100, "transactionType": "Unknown"}, {"modifiedDate": "2022-09-30T10:29:15Z", "id": "765768:137014143", "accountId": "765768", "clearedOnDate": "2020-04-28T00:00:00", "description": "SECOND Transaction", "reconciled": false, "amount": 120, "transactionType": "Unknown"}, {"modifiedDate": "2022-09-30T10:29:15Z", "id": "765768:93269803", "accountId": "765768", "clearedOnDate": "2020-04-28T00:00:00", "description": "KF00021:", "reconciled": false, "amount": -5, "transactionType": "Unknown"}, {"modifiedDate": "2022-09-30T10:29:15Z", "id": "765768:141203309", "accountId": "765768", "clearedOnDate": "2020-06-18T00:00:00", "description": "INV #33: Customer overpayment", "reconciled": false, "amount": 110, "transactionType": "Unknown"}, {"modifiedDate": "2022-09-30T10:29:15Z", "id": "765768:144653342", "accountId": "765768", "clearedOnDate": "2020-10-23T00:00:00", "description": "", "reconciled": false, "amount": 1, "transactionType": "Unknown"}], "pageNumber": 1, "pageSize": 100, "totalResults": 5, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts/765768/bankTransactions"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts/765768/bankTransactions"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:10", "id": "D7B-933784104", "accountId": "20000-933270541", "clearedOnDate": "2022-12-01T00:00:00", "description": "", "reconciled": false, "amount": -1200, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:11", "id": "DFA-933785132", "accountId": "20000-933270541", "clearedOnDate": "2022-12-05T00:00:00", "description": "", "reconciled": false, "amount": -35, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:11", "id": "E2E-933785785", "accountId": "20000-933270541", "clearedOnDate": "2022-12-10T00:00:00", "description": "", "reconciled": false, "amount": -197.59, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:05:47", "id": "536B-1197755199", "accountId": "20000-933270541", "clearedOnDate": "2022-12-20T00:00:00", "description": "", "reconciled": false, "amount": -2100, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:06", "id": "5C18-1197711471-to", "accountId": "20000-933270541", "clearedOnDate": "2022-12-31T00:00:00", "description": "Opening Balance - Bank Balance - Checking Account", "reconciled": false, "amount": 27874.62, "transactionType": "Other"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:58", "id": "3A09-1071529982", "accountId": "20000-933270541", "clearedOnDate": "2023-01-11T00:00:00", "description": "Monthly Truck Payment", "reconciled": false, "amount": -532.97, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:19", "id": "95C6-1197729008", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "941 Deposit for December 2005 Payyroll", "reconciled": false, "amount": -3495.82, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:19", "id": "95CA-1197729081", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "FUTA Payment - 4 Qrt 2005", "reconciled": false, "amount": -100, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:19", "id": "95D0-1197729222", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "State Unemployment and Disability - 4th Quarter 2005", "reconciled": false, "amount": -208.09, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:19", "id": "95D4-1197729376", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "Worker's Compensation - 4th Quarter 2005", "reconciled": false, "amount": -1214.31, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:23", "id": "9C06-1181931827", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "Deposit", "reconciled": false, "amount": 1228.18, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "9E3A-1182063799", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "", "reconciled": false, "amount": -308.34, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A293-1197953458", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "", "reconciled": false, "amount": -12362.89, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A2AB-1197953786", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "", "reconciled": false, "amount": -9521, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A33E-1197955762", "accountId": "20000-933270541", "clearedOnDate": "2023-01-15T00:00:00", "description": "ABCD 11-234567", "reconciled": false, "amount": -3146.88, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "6992-1197775718", "accountId": "20000-933270541", "clearedOnDate": "2023-01-17T00:00:00", "description": "Deposit", "reconciled": false, "amount": 15281.67, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:05:09", "id": "3E5D-1071498699", "accountId": "20000-933270541", "clearedOnDate": "2023-01-21T00:00:00", "description": "786-35", "reconciled": false, "amount": -712.56, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "699D-1197775731", "accountId": "20000-933270541", "clearedOnDate": "2023-01-25T00:00:00", "description": "Deposit", "reconciled": false, "amount": 31474.25, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:00", "id": "53D-933354764", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "Monthly Water - Flat Rate Plan", "reconciled": false, "amount": -24, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "9E3D-1182131998", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "", "reconciled": false, "amount": -205, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "9E42-1182131999", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "", "reconciled": false, "amount": -532, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "9E47-1182131999", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "", "reconciled": false, "amount": -623, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "9E4C-1182131999", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "", "reconciled": false, "amount": -13759, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:32", "id": "9ED6-1182133365", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "Fuel", "reconciled": false, "amount": -138, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F2D-1197948760", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "Monthly Vehicle Repairs and Maintenance", "reconciled": false, "amount": -218, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F96-1197949640", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "Acct #560-82645-99C", "reconciled": false, "amount": -123.67, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A2CD-1197955250", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "Pmt# 1", "reconciled": false, "amount": -2710.9, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:13", "id": "F29-933787474", "accountId": "20000-933270541", "clearedOnDate": "2023-01-31T00:00:00", "description": "Checking Account Service Charge", "reconciled": false, "amount": -12.5, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "698D-1197775698", "accountId": "20000-933270541", "clearedOnDate": "2023-02-02T00:00:00", "description": "Deposit", "reconciled": false, "amount": 1040, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:11", "id": "69A8-1197775740", "accountId": "20000-933270541", "clearedOnDate": "2023-02-09T00:00:00", "description": "Deposit", "reconciled": false, "amount": 271.53, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:58", "id": "3A10-1071529997", "accountId": "20000-933270541", "clearedOnDate": "2023-02-11T00:00:00", "description": "Monthly Truck Payment", "reconciled": false, "amount": -532.97, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A0BD-1197950967", "accountId": "20000-933270541", "clearedOnDate": "2023-02-15T00:00:00", "description": "", "reconciled": false, "amount": -268.39, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A2AF-1197953842", "accountId": "20000-933270541", "clearedOnDate": "2023-02-15T00:00:00", "description": "", "reconciled": false, "amount": -4050.98, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A343-1197955826", "accountId": "20000-933270541", "clearedOnDate": "2023-02-15T00:00:00", "description": "ABCD 11-234567", "reconciled": false, "amount": -1466.32, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:23", "id": "9C0B-1181931843", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "Deposit", "reconciled": false, "amount": 25471.56, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "9E63-1182132109", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "For Vetter Basement Remodel", "reconciled": false, "amount": -2050, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:32", "id": "9ED9-1182133383", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "Fuel", "reconciled": false, "amount": -142, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F33-1197948806", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "Monthly Vechiicle Repairs and Maintenance", "reconciled": false, "amount": -222, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F99-1197949656", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "Acct #560-82645-99C", "reconciled": false, "amount": -125.89, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "9FBD-1197949852", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "Monthly Water - Flat Rate Plan", "reconciled": false, "amount": -24, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "A052-1197950680", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "Flat Rate Phone and Long Distance Bundle", "reconciled": false, "amount": -80, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A081-1197950831", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "Checking Account Service Charge", "reconciled": false, "amount": -12.5, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A2D1-1197955271", "accountId": "20000-933270541", "clearedOnDate": "2023-02-28T00:00:00", "description": "Pmt# 2", "reconciled": false, "amount": -2710.9, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:58", "id": "3A17-1071530007", "accountId": "20000-933270541", "clearedOnDate": "2023-03-11T00:00:00", "description": "Monthly Truck Payment", "reconciled": false, "amount": -532.97, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:24", "id": "9C38-1182054225", "accountId": "20000-933270541", "clearedOnDate": "2023-03-13T00:00:00", "description": "", "reconciled": false, "amount": -7500, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A296-1197953484", "accountId": "20000-933270541", "clearedOnDate": "2023-03-15T00:00:00", "description": "", "reconciled": false, "amount": -1600, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A346-1197955854", "accountId": "20000-933270541", "clearedOnDate": "2023-03-15T00:00:00", "description": "ABCD 11-234567", "reconciled": false, "amount": -83.6, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:23", "id": "9C10-1181931855", "accountId": "20000-933270541", "clearedOnDate": "2023-03-20T00:00:00", "description": "Deposit", "reconciled": false, "amount": 6278.8, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "9E72-1182132247", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "", "reconciled": false, "amount": -435, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:32", "id": "9EDC-1182133383", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "Fuel", "reconciled": false, "amount": -127, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F36-1197948806", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "Monthly Vechiicle Repairs and Maintenance", "reconciled": false, "amount": -232, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F7B-1197949443", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "Payment - Quarterly Office Maintenance Contract", "reconciled": false, "amount": -450, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F9C-1197949656", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "Acct #560-82645-99C", "reconciled": false, "amount": -389.2, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "9FC0-1197949852", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "Monthly Water - Flat Rate Plan", "reconciled": false, "amount": -24, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "A056-1197950680", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "Flat Rate Phone and Long Distance Bundle", "reconciled": false, "amount": -80, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A084-1197950832", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "Checking Account Service Charge", "reconciled": false, "amount": -12.5, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A2D5-1197955280", "accountId": "20000-933270541", "clearedOnDate": "2023-03-31T00:00:00", "description": "Pmt# 3", "reconciled": false, "amount": -2710.9, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:58", "id": "3A1E-1071530019", "accountId": "20000-933270541", "clearedOnDate": "2023-04-12T00:00:00", "description": "Monthly Truck Payment", "reconciled": false, "amount": -532.97, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:05:32", "id": "4271-1071523732", "accountId": "20000-933270541", "clearedOnDate": "2023-04-17T00:00:00", "description": "", "reconciled": false, "amount": -714, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:05:11", "id": "3E98-1071499056", "accountId": "20000-933270541", "clearedOnDate": "2023-04-19T00:00:00", "description": "786-35", "reconciled": false, "amount": -712.56, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:24", "id": "9C68-1182054440", "accountId": "20000-933270541", "clearedOnDate": "2023-04-20T00:00:00", "description": "Deposit", "reconciled": false, "amount": 16500, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:32", "id": "9EDF-1182133383", "accountId": "20000-933270541", "clearedOnDate": "2023-04-30T00:00:00", "description": "Fuel", "reconciled": false, "amount": -162, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F39-1197948806", "accountId": "20000-933270541", "clearedOnDate": "2023-04-30T00:00:00", "description": "Monthly Vechiicle Repairs and Maintenance", "reconciled": false, "amount": -192, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F9F-1197949656", "accountId": "20000-933270541", "clearedOnDate": "2023-04-30T00:00:00", "description": "Acct #560-82645-99C", "reconciled": false, "amount": -120.93, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "9FC3-1197949852", "accountId": "20000-933270541", "clearedOnDate": "2023-04-30T00:00:00", "description": "Monthly Water - Flat Rate Plan", "reconciled": false, "amount": -24, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "A05A-1197950680", "accountId": "20000-933270541", "clearedOnDate": "2023-04-30T00:00:00", "description": "Flat Rate Phone and Long Distance Bundle", "reconciled": false, "amount": -80, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A087-1197950832", "accountId": "20000-933270541", "clearedOnDate": "2023-04-30T00:00:00", "description": "Checking Account Service Charge", "reconciled": false, "amount": -12.5, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A2D9-1197955286", "accountId": "20000-933270541", "clearedOnDate": "2023-04-30T00:00:00", "description": "Pmt# 4", "reconciled": false, "amount": -2710.9, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:24", "id": "9C86-1182054823", "accountId": "20000-933270541", "clearedOnDate": "2023-05-01T00:00:00", "description": "", "reconciled": false, "amount": -7500, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:59", "id": "3A25-1071530029", "accountId": "20000-933270541", "clearedOnDate": "2023-05-13T00:00:00", "description": "Monthly Truck Payment", "reconciled": false, "amount": -532.97, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A0C0-1197950991", "accountId": "20000-933270541", "clearedOnDate": "2023-05-15T00:00:00", "description": "", "reconciled": false, "amount": -950.23, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A299-1197953515", "accountId": "20000-933270541", "clearedOnDate": "2023-05-15T00:00:00", "description": "", "reconciled": false, "amount": -1400, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A349-1197955899", "accountId": "20000-933270541", "clearedOnDate": "2023-05-15T00:00:00", "description": "ABCD 11-234567", "reconciled": false, "amount": -318.02, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:25", "id": "9CB8-1182055085", "accountId": "20000-933270541", "clearedOnDate": "2023-05-31T00:00:00", "description": "Deposit", "reconciled": false, "amount": 16500, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:32", "id": "9EE2-1182133383", "accountId": "20000-933270541", "clearedOnDate": "2023-05-31T00:00:00", "description": "Fuel", "reconciled": false, "amount": -143, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F3C-1197948806", "accountId": "20000-933270541", "clearedOnDate": "2023-05-31T00:00:00", "description": "Monthly Vechiicle Repairs and Maintenance", "reconciled": false, "amount": -232, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9FA2-1197949656", "accountId": "20000-933270541", "clearedOnDate": "2023-05-31T00:00:00", "description": "Acct #560-82645-99C", "reconciled": false, "amount": -128.03, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "9FC6-1197949852", "accountId": "20000-933270541", "clearedOnDate": "2023-05-31T00:00:00", "description": "Monthly Water - Flat Rate Plan", "reconciled": false, "amount": -24, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "A05E-1197950680", "accountId": "20000-933270541", "clearedOnDate": "2023-05-31T00:00:00", "description": "Flat Rate Phone and Long Distance Bundle", "reconciled": false, "amount": -80, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A08A-1197950832", "accountId": "20000-933270541", "clearedOnDate": "2023-05-31T00:00:00", "description": "Checking Account Service Charge", "reconciled": false, "amount": -12.5, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A2DD-1197955294", "accountId": "20000-933270541", "clearedOnDate": "2023-05-31T00:00:00", "description": "Pmt# 5", "reconciled": false, "amount": -2710.9, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:25", "id": "9CBD-1182055262", "accountId": "20000-933270541", "clearedOnDate": "2023-06-06T00:00:00", "description": "", "reconciled": false, "amount": -5275, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:59", "id": "3A2C-1071530042", "accountId": "20000-933270541", "clearedOnDate": "2023-06-10T00:00:00", "description": "Monthly Truck Payment", "reconciled": false, "amount": -532.97, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:05:46", "id": "5356-1197761596", "accountId": "20000-933270541", "clearedOnDate": "2023-06-16T00:00:00", "description": "", "reconciled": false, "amount": -1786, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:32", "id": "9EE5-1182133383", "accountId": "20000-933270541", "clearedOnDate": "2023-06-30T00:00:00", "description": "Fuel", "reconciled": false, "amount": -157, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F3F-1197948806", "accountId": "20000-933270541", "clearedOnDate": "2023-06-30T00:00:00", "description": "Monthly Vechiicle Repairs and Maintenance", "reconciled": false, "amount": -186, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F7E-1197949458", "accountId": "20000-933270541", "clearedOnDate": "2023-06-30T00:00:00", "description": "Payment - Quarterly Office Maintenance Contract", "reconciled": false, "amount": -450, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9FA5-1197949656", "accountId": "20000-933270541", "clearedOnDate": "2023-06-30T00:00:00", "description": "Acct #560-82645-99C", "reconciled": false, "amount": -135.02, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "9FC9-1197949852", "accountId": "20000-933270541", "clearedOnDate": "2023-06-30T00:00:00", "description": "Monthly Water - Flat Rate Plan", "reconciled": false, "amount": -24, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "A062-1197950680", "accountId": "20000-933270541", "clearedOnDate": "2023-06-30T00:00:00", "description": "Flat Rate Phone and Long Distance Bundle", "reconciled": false, "amount": -80, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A08D-1197950832", "accountId": "20000-933270541", "clearedOnDate": "2023-06-30T00:00:00", "description": "Checking Account Service Charge", "reconciled": false, "amount": -12.5, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:36", "id": "A2E1-1197955306", "accountId": "20000-933270541", "clearedOnDate": "2023-06-30T00:00:00", "description": "Pmt# 6", "reconciled": false, "amount": -2710.9, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:04:59", "id": "3A33-1071530066", "accountId": "20000-933270541", "clearedOnDate": "2023-07-11T00:00:00", "description": "Monthly Truck Payment", "reconciled": false, "amount": -532.97, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:05:09", "id": "3E67-1071498733", "accountId": "20000-933270541", "clearedOnDate": "2023-07-19T00:00:00", "description": "786-35", "reconciled": false, "amount": -712.56, "transactionType": "Unknown"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:35", "id": "A0C3-1197951027", "accountId": "20000-933270541", "clearedOnDate": "2023-07-23T00:00:00", "description": "", "reconciled": false, "amount": -239.29, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:32", "id": "9EE8-1182133383", "accountId": "20000-933270541", "clearedOnDate": "2023-07-31T00:00:00", "description": "Fuel", "reconciled": false, "amount": -126, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9F42-1197948806", "accountId": "20000-933270541", "clearedOnDate": "2023-07-31T00:00:00", "description": "Monthly Vechiicle Repairs and Maintenance", "reconciled": false, "amount": -126, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:33", "id": "9FA8-1197949656", "accountId": "20000-933270541", "clearedOnDate": "2023-07-31T00:00:00", "description": "Acct #560-82645-99C", "reconciled": false, "amount": -128.03, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "9FCC-1197949852", "accountId": "20000-933270541", "clearedOnDate": "2023-07-31T00:00:00", "description": "Monthly Water - Flat Rate Plan", "reconciled": false, "amount": -24, "transactionType": "Payment"}, {"modifiedDate": "2023-04-26T09:07:14Z", "sourceModifiedDate": "2023-12-16T05:06:34", "id": "A066-1197950680", "accountId": "20000-933270541", "clearedOnDate": "2023-07-31T00:00:00", "description": "Flat Rate Phone and Long Distance Bundle", "reconciled": false, "amount": -80, "transactionType": "Payment"}], "pageNumber": 1, "pageSize": 100, "totalResults": 495, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts/20000-933270541/bankTransactions"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts/20000-933270541/bankTransactions"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts/20000-933270541/bankTransactions?page=2&pageSize=100"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "73", "accountId": "1200", "clearedOnDate": "2021-01-29T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -162, "balance": -10164.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "52", "accountId": "1200", "clearedOnDate": "2021-01-30T00:00:00", "description": "568953", "reconciled": false, "amount": -1497.58, "balance": -10302.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "53", "accountId": "1200", "clearedOnDate": "2021-01-30T00:00:00", "description": "5897532", "reconciled": false, "amount": 500, "balance": -9802.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "54", "accountId": "1200", "clearedOnDate": "2021-01-30T00:00:00", "description": "TRANS", "reconciled": false, "amount": -250, "balance": -10052.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "58", "accountId": "1200", "clearedOnDate": "2021-01-30T00:00:00", "description": "VOID", "reconciled": false, "amount": 50, "balance": -10002.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "50", "accountId": "1200", "clearedOnDate": "2021-01-31T00:00:00", "description": "TRANS", "reconciled": false, "amount": -500, "balance": -8804.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "85", "accountId": "1200", "clearedOnDate": "2021-01-31T00:00:00", "description": "6565689", "reconciled": false, "amount": -1800, "balance": -11964.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "97", "accountId": "1200", "clearedOnDate": "2021-01-31T00:00:00", "description": "Salary", "reconciled": false, "amount": -5932.29, "balance": -17896.83, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1183", "accountId": "1200", "clearedOnDate": "2021-09-01T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -162, "balance": 11299.91, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1184", "accountId": "1200", "clearedOnDate": "2021-09-15T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": 10099.91, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1185", "accountId": "1200", "clearedOnDate": "2021-09-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -150, "balance": 9949.91, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1186", "accountId": "1200", "clearedOnDate": "2021-09-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -5.55, "balance": 9944.36, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1187", "accountId": "1200", "clearedOnDate": "2021-10-13T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": 8744.36, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1188", "accountId": "1200", "clearedOnDate": "2021-10-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -150, "balance": 8594.36, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1189", "accountId": "1200", "clearedOnDate": "2021-10-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -5.55, "balance": 8588.81, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1190", "accountId": "1200", "clearedOnDate": "2021-11-10T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": 7388.81, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1191", "accountId": "1200", "clearedOnDate": "2021-11-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -150, "balance": 7238.81, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1192", "accountId": "1200", "clearedOnDate": "2021-11-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -5.55, "balance": 7233.26, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1193", "accountId": "1200", "clearedOnDate": "2021-12-08T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": 6033.26, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1194", "accountId": "1200", "clearedOnDate": "2021-12-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -150, "balance": 5883.26, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1195", "accountId": "1200", "clearedOnDate": "2021-12-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -5.55, "balance": 5877.71, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "24", "accountId": "1200", "clearedOnDate": "2021-12-31T00:00:00", "description": "O/Bal", "reconciled": true, "amount": -6511.96, "balance": -6511.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "26", "accountId": "1200", "clearedOnDate": "2021-12-31T00:00:00", "description": "56956", "reconciled": false, "amount": 55, "balance": -6456.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "27", "accountId": "1200", "clearedOnDate": "2021-12-31T00:00:00", "description": "656678", "reconciled": false, "amount": -150, "balance": -6606.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "28", "accountId": "1200", "clearedOnDate": "2021-12-31T00:00:00", "description": "656679", "reconciled": false, "amount": -352, "balance": -6958.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "29", "accountId": "1200", "clearedOnDate": "2021-12-31T00:00:00", "description": "656680", "reconciled": false, "amount": -550, "balance": -7508.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "30", "accountId": "1200", "clearedOnDate": "2021-12-31T00:00:00", "description": "656681", "reconciled": false, "amount": -250, "balance": -7758.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "31", "accountId": "1200", "clearedOnDate": "2021-12-31T00:00:00", "description": "656869", "reconciled": false, "amount": -546, "balance": -8304.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1196", "accountId": "1200", "clearedOnDate": "2022-01-01T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -162, "balance": 5715.71, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1197", "accountId": "1200", "clearedOnDate": "2022-01-05T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": 4515.71, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1198", "accountId": "1200", "clearedOnDate": "2022-01-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -150, "balance": 4365.71, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1199", "accountId": "1200", "clearedOnDate": "2022-01-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -5.55, "balance": 4360.16, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "255", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "(BACS)", "reconciled": false, "amount": -370.71, "balance": -18267.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "256", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100001", "reconciled": false, "amount": -256.36, "balance": -18523.9, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "257", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100002", "reconciled": false, "amount": -25.5, "balance": -18549.4, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "258", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100003", "reconciled": false, "amount": -1977.58, "balance": -20526.98, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "259", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100004", "reconciled": false, "amount": -599.03, "balance": -21126.01, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "260", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100005", "reconciled": false, "amount": -7141.98, "balance": -28267.99, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "261", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100006", "reconciled": false, "amount": -150.96, "balance": -28418.95, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "262", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100007", "reconciled": false, "amount": -63, "balance": -28481.95, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "263", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100008", "reconciled": false, "amount": -35.01, "balance": -28516.96, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "264", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "100009", "reconciled": false, "amount": -1659.34, "balance": -30176.3, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "265", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "4353454", "reconciled": false, "amount": 1432.17, "balance": -28744.13, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "266", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "", "reconciled": false, "amount": 2684.26, "balance": -26059.87, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "267", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "", "reconciled": false, "amount": 1204.57, "balance": -24855.3, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "268", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "", "reconciled": false, "amount": 1140.78, "balance": -23714.52, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "269", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "", "reconciled": false, "amount": 4372, "balance": -19342.52, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "270", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "", "reconciled": false, "amount": 1946.18, "balance": -17396.34, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "271", "accountId": "1200", "clearedOnDate": "2022-01-29T00:00:00", "description": "", "reconciled": false, "amount": 11123.33, "balance": -6273.01, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1200", "accountId": "1200", "clearedOnDate": "2022-02-02T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": 3160.16, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "300", "accountId": "1200", "clearedOnDate": "2022-02-03T00:00:00", "description": "TRANS", "reconciled": false, "amount": -500, "balance": -16588.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1201", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -150, "balance": 3010.16, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1202", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -5.55, "balance": 3004.61, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "276", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "Credit", "reconciled": false, "amount": -500, "balance": -6773.01, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "279", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "", "reconciled": false, "amount": -58.75, "balance": -6831.76, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "280", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "TRANS", "reconciled": false, "amount": -1400, "balance": -8231.76, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "282", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "TRANS", "reconciled": false, "amount": -12600, "balance": -20831.76, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "286", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "TRANS", "reconciled": false, "amount": 6500, "balance": -14331.76, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "287", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "PAYE", "reconciled": false, "amount": -1256.33, "balance": -15588.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "288", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "Deposit", "reconciled": false, "amount": -500, "balance": -16088.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "314", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -162, "balance": -16750.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "315", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": -17950.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "325", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "Loan", "reconciled": false, "amount": -150, "balance": -18100.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "326", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "Loan", "reconciled": false, "amount": -5.55, "balance": -18105.64, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "328", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "Returned", "reconciled": false, "amount": 103.4, "balance": -18002.24, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "331", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "Salary", "reconciled": false, "amount": -5932.29, "balance": -23934.53, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "523", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "", "reconciled": false, "amount": 6556.33, "balance": -17378.2, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "525", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "", "reconciled": false, "amount": 3350.33, "balance": -14027.87, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "526", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "(BACS)", "reconciled": false, "amount": -435.14, "balance": -14463.01, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "529", "accountId": "1200", "clearedOnDate": "2022-02-28T00:00:00", "description": "12324", "reconciled": false, "amount": -8561.48, "balance": -23024.49, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "532", "accountId": "1200", "clearedOnDate": "2022-03-01T00:00:00", "description": "VOID", "reconciled": false, "amount": 352.5, "balance": -22671.99, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "534", "accountId": "1200", "clearedOnDate": "2022-03-01T00:00:00", "description": "SED", "reconciled": false, "amount": 55, "balance": -22616.99, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1203", "accountId": "1200", "clearedOnDate": "2022-03-02T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": 1804.61, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "821", "accountId": "1200", "clearedOnDate": "2022-03-10T00:00:00", "description": "", "reconciled": false, "amount": 1908.89, "balance": -14370.08, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "820", "accountId": "1200", "clearedOnDate": "2022-03-20T00:00:00", "description": "776", "reconciled": false, "amount": 9057.34, "balance": -16278.97, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "606", "accountId": "1200", "clearedOnDate": "2022-03-24T00:00:00", "description": "Deposit", "reconciled": false, "amount": -150, "balance": -22370.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "607", "accountId": "1200", "clearedOnDate": "2022-03-25T00:00:00", "description": "44555", "reconciled": false, "amount": 100, "balance": -22270.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "823", "accountId": "1200", "clearedOnDate": "2022-03-25T00:00:00", "description": "", "reconciled": false, "amount": 1770.15, "balance": -12229.5, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "578", "accountId": "1200", "clearedOnDate": "2022-03-27T00:00:00", "description": "456", "reconciled": false, "amount": -15, "balance": -22084.91, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "608", "accountId": "1200", "clearedOnDate": "2022-03-27T00:00:00", "description": "CREDIT", "reconciled": false, "amount": -100, "balance": -22370.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "824", "accountId": "1200", "clearedOnDate": "2022-03-27T00:00:00", "description": "", "reconciled": false, "amount": 1025.86, "balance": -11203.64, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1204", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -150, "balance": 1654.61, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1205", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -5.55, "balance": 1649.06, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "546", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -162, "balance": -22778.99, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "547", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -1200, "balance": -23978.99, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "548", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -150, "balance": -24128.99, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "549", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "DD/STO", "reconciled": false, "amount": -5.55, "balance": -24134.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "555", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "VOID", "reconciled": false, "amount": 50, "balance": -24084.54, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "560", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "REFUND", "reconciled": false, "amount": 64.63, "balance": -24019.91, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "562", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "TRANS", "reconciled": false, "amount": 2000, "balance": -22019.91, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "563", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "TRANS", "reconciled": false, "amount": -50, "balance": -22069.91, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "584", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "CREDIT", "reconciled": false, "amount": -70.31, "balance": -22155.22, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "589", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "VOID", "reconciled": false, "amount": 30, "balance": -22125.22, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "596", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "REFUND", "reconciled": false, "amount": 35.01, "balance": -22090.21, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "597", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "PAYE", "reconciled": false, "amount": -2070.23, "balance": -24160.44, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "598", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "NI", "reconciled": false, "amount": -1003.49, "balance": -25163.93, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "604", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "TRANS", "reconciled": false, "amount": 3000, "balance": -22163.93, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "605", "accountId": "1200", "clearedOnDate": "2022-03-28T00:00:00", "description": "225", "reconciled": false, "amount": -56.16, "balance": -22220.09, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "612", "accountId": "1200", "clearedOnDate": "2022-03-29T00:00:00", "description": "NI", "reconciled": false, "amount": -1003.49, "balance": -29305.87, "transactionType": "Credit"}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "614", "accountId": "1200", "clearedOnDate": "2022-03-29T00:00:00", "description": "Sales", "reconciled": false, "amount": 179.2, "balance": -29126.67, "transactionType": "Credit"}], "pageNumber": 1, "pageSize": 100, "totalResults": 179, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts/1200/bankTransactions"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts/1200/bankTransactions"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts/1200/bankTransactions?page=2&pageSize=100"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2020-02-07T11:35:39Z", "id": "26b727ca84734e3c8e245011bd04dbf1", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2020-02-05T00:00:00", "description": "string Supplier Payment", "reconciled": false, "amount": -5, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2020-02-10T10:51:43Z", "id": "508f3fd4403e45cb903b362a4ae55344", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2020-02-05T00:00:00", "description": "string Supplier Payment", "reconciled": false, "amount": -3.86, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2020-02-07T14:36:01Z", "id": "52e58431005e44328af44116e0433230", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2020-02-05T00:00:00", "description": "string Supplier Payment", "reconciled": false, "amount": -3.85, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2020-02-07T14:19:24Z", "id": "f3255e4b79c5427ba5b963d0e26cecfc", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2020-02-05T00:00:00", "description": "string Supplier Payment", "reconciled": false, "amount": -3.86, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2020-04-21T21:03:25Z", "id": "a00e1ce357cc4064b9cce8abe1b15110", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2020-04-21T00:00:00", "description": "Cash Deposit Bank Transfer", "reconciled": false, "amount": 1000, "transactionType": "Debit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2020-11-25T19:35:03Z", "id": "a7d26740129945c3a76209020fbb7fd1", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2020-11-25T00:00:00", "description": "Bank Transfer", "reconciled": false, "amount": -40, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2021-07-02T13:14:57Z", "id": "829f45112347471cbf99b0d9afe08113", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2021-07-02T00:00:00", "description": "Made from codat api Customer Receipt", "reconciled": false, "amount": 10, "transactionType": "Debit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2021-07-22T14:12:38Z", "id": "786f769ae88a4fa898e25e2cbff43be3", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2021-07-20T00:00:00", "description": "Supplier payment AD Supplier Payment", "reconciled": false, "amount": -2400, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2021-07-21T14:09:59Z", "id": "abb5995867c546c2b32097d515dcef2a", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2021-07-21T00:00:00", "description": "Payment Customer Receipt", "reconciled": false, "amount": 12, "transactionType": "Debit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2021-08-17T11:58:37Z", "id": "943f3bd6eacc4071807d89895fe03ef4", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2021-08-17T00:00:00", "description": "Ref5565 Other Receipt", "reconciled": false, "amount": 50, "transactionType": "Debit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2021-09-22T14:22:57Z", "id": "039e6bb20b6e44d690601e4dd04a5b21", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2021-09-22T00:00:00", "description": "Note 1 Customer Receipt", "reconciled": false, "amount": 1080, "transactionType": "Debit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2021-09-27T14:04:05Z", "id": "1a62f54358e74ba4a71dd733f2b08ba4", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2021-09-27T00:00:00", "description": "Note 2 Customer Receipt", "reconciled": false, "amount": 1080, "transactionType": "Debit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2021-12-01T13:03:00Z", "id": "a79ebcf0710d415baad6b588eb28307b", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2021-12-01T00:00:00", "description": "Payment Customer Receipt", "reconciled": false, "amount": 33, "transactionType": "Debit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2022-07-19T08:51:52Z", "id": "4b691b78b6cd43c9a64d75aeb29e4d11", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2022-07-19T00:00:00", "description": "Bank Transfer", "reconciled": false, "amount": -10, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2022-07-19T13:15:26Z", "id": "7b1f2f55f39042838d5f7226aa92386f", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2022-07-19T00:00:00", "description": "Bank Transfer", "reconciled": false, "amount": -1415, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2022-07-19T13:01:47Z", "id": "87eca750292b4cfea216e13bb22923c6", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2022-07-19T00:00:00", "description": "Bank Transfer", "reconciled": false, "amount": -10, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:14Z", "sourceModifiedDate": "2022-07-19T13:10:42Z", "id": "a48474f83d214637a700e76e24446086", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2022-07-19T00:00:00", "description": "Bank Transfer", "reconciled": false, "amount": -10, "transactionType": "Credit"}, {"modifiedDate": "2022-10-24T15:31:15Z", "sourceModifiedDate": "2022-09-14T16:20:09Z", "id": "cc1fc960e05c40c1968314efe1175b9f", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2022-09-14T00:00:00", "description": "string Customer Receipt", "reconciled": false, "amount": 69, "transactionType": "Debit"}, {"modifiedDate": "2022-10-24T15:31:15Z", "sourceModifiedDate": "2022-09-14T16:12:03Z", "id": "e600eb7549b74d96bdca18b9cc60f39d", "accountId": "154d05abe9f24c4babe0f6a741dec1b9", "clearedOnDate": "2022-09-14T00:00:00", "description": "Customer Receipt", "reconciled": false, "amount": 60, "transactionType": "Debit"}], "pageNumber": 1, "pageSize": 100, "totalResults": 19, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts/154d05abe9f24c4babe0f6a741dec1b9/bankTransactions"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts/154d05abe9f24c4babe0f6a741dec1b9/bankTransactions"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2021-12-20T00:00:00", "description": "DD", "reconciled": true, "amount": -7267.2, "balance": -3136.22, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-02-17T00:00:00", "description": "DD", "reconciled": true, "amount": 500, "balance": -5703.42, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-02-17T00:00:00", "description": "INV0010", "reconciled": true, "amount": 4200, "balance": -6203.42, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-02-17T00:00:00", "description": "DD", "reconciled": true, "amount": -7267.2, "balance": -10403.42, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-02-19T00:00:00", "description": "DD", "reconciled": true, "amount": -95.5, "balance": -5798.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-03-19T00:00:00", "description": "DD", "reconciled": true, "amount": 500, "balance": -5298.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-03-21T00:00:00", "description": "DD", "reconciled": true, "amount": -97, "balance": -5395.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-04-19T00:00:00", "description": "INV-0003", "reconciled": true, "amount": 500, "balance": -4895.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-04-21T00:00:00", "description": "DD", "reconciled": true, "amount": -92, "balance": -4987.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-05-21T00:00:00", "description": "INV-0004", "reconciled": true, "amount": 1000, "balance": -3987.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-05-21T00:00:00", "description": "DD", "reconciled": true, "amount": -89, "balance": -4076.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-06-19T00:00:00", "description": "INV-005", "reconciled": true, "amount": 500, "balance": -3576.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-06-21T00:00:00", "description": "DD", "reconciled": true, "amount": -91, "balance": -3667.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-07-20T00:00:00", "description": "INV-006", "reconciled": true, "amount": 500, "balance": -3167.92, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-07-22T00:00:00", "description": "DD", "reconciled": true, "amount": -96.25, "balance": -3264.17, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-08-19T00:00:00", "description": "INV-007", "reconciled": true, "amount": 1500, "balance": -1764.17, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-08-21T00:00:00", "description": "DD", "reconciled": true, "amount": -100.6, "balance": -1864.77, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-09-19T00:00:00", "description": "INV-008", "reconciled": true, "amount": 500, "balance": -1364.77, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-09-21T00:00:00", "description": "DD", "reconciled": true, "amount": -105.75, "balance": -1470.52, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-10-19T00:00:00", "description": "INV-009", "reconciled": true, "amount": 1200, "balance": -270.52, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-10-21T00:00:00", "description": "DD", "reconciled": true, "amount": -106.5, "balance": -377.02, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-20T00:00:00", "description": "INV-0010", "reconciled": true, "amount": 500, "balance": 122.98, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-21T00:00:00", "description": "DD", "reconciled": true, "amount": -119.08, "balance": 3.9, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-22T00:00:00", "description": "Monthly a/c fee", "reconciled": true, "amount": -15, "balance": -11.1, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-23T00:00:00", "description": "FP089876", "reconciled": true, "amount": -3126.17, "balance": -1591.58, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-23T00:00:00", "description": "Subs DD", "reconciled": true, "amount": -56.35, "balance": -89.16, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-23T00:00:00", "description": "0015", "reconciled": true, "amount": 541.25, "balance": 1534.59, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-23T00:00:00", "description": "INV-0014", "reconciled": true, "amount": 541.25, "balance": 993.34, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-23T00:00:00", "description": "", "reconciled": true, "amount": -21.71, "balance": -32.81, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-23T00:00:00", "description": "INV-0013", "reconciled": true, "amount": 541.25, "balance": 452.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-11-24T00:00:00", "description": "INV0012", "reconciled": true, "amount": 541.25, "balance": -1050.33, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-01T00:00:00", "description": "", "reconciled": true, "amount": -65.2, "balance": -1115.53, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-02T00:00:00", "description": "", "reconciled": true, "amount": -15.6, "balance": -1131.13, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-09T00:00:00", "description": "AR-0019", "reconciled": true, "amount": 1500, "balance": 368.87, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-11T00:00:00", "description": "CHQ 6543-000409", "reconciled": true, "amount": -148.5, "balance": 220.37, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-16T00:00:00", "description": "", "reconciled": true, "amount": -16, "balance": 204.37, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-19T00:00:00", "description": "", "reconciled": true, "amount": -50, "balance": 154.37, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-20T00:00:00", "description": "AR-0011", "reconciled": true, "amount": 2500, "balance": 2583.57, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-20T00:00:00", "description": "", "reconciled": true, "amount": -70.8, "balance": 83.57, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-23T00:00:00", "description": "", "reconciled": true, "amount": -1463.88, "balance": 1449.49, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-23T00:00:00", "description": "AR-0018", "reconciled": true, "amount": 329.8, "balance": 2913.37, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-23T00:00:00", "description": "Bank Fee", "reconciled": true, "amount": -15, "balance": 1434.49, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-23T00:00:00", "description": "", "reconciled": true, "amount": -1181.25, "balance": 253.24, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2022-12-29T00:00:00", "description": "FP101897", "reconciled": false, "amount": -1223.91, "balance": -970.67, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-19T00:00:00", "description": "", "reconciled": true, "amount": -98.32, "balance": -1177.59, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-19T00:00:00", "description": "", "reconciled": true, "amount": -108.6, "balance": -1079.27, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-19T00:00:00", "description": "AR-0020", "reconciled": true, "amount": 6187.5, "balance": 5009.91, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-20T00:00:00", "description": "", "reconciled": true, "amount": -1181.25, "balance": 3828.66, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-20T00:00:00", "description": "", "reconciled": true, "amount": -59.54, "balance": 3769.12, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-21T00:00:00", "description": "", "reconciled": true, "amount": -56.35, "balance": 3712.77, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-22T00:00:00", "description": "INV0022", "reconciled": true, "amount": 1407.25, "balance": 5120.02, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-23T00:00:00", "description": "0024", "reconciled": true, "amount": 1000, "balance": 6120.02, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-24T00:00:00", "description": "CHQ 6543-000410", "reconciled": true, "amount": -148.5, "balance": 5971.52, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-25T00:00:00", "description": "0027-Part", "reconciled": true, "amount": 579.37, "balance": 6550.89, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-26T00:00:00", "description": "Inv 0029", "reconciled": true, "amount": 541.25, "balance": 7092.14, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-26T00:00:00", "description": "INV0032", "reconciled": true, "amount": 541.25, "balance": 8715.89, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-26T00:00:00", "description": "0030", "reconciled": true, "amount": 541.25, "balance": 7633.39, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-26T00:00:00", "description": "INV-0031", "reconciled": true, "amount": 541.25, "balance": 8174.64, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-27T00:00:00", "description": "Eft", "reconciled": true, "amount": -34.1, "balance": 8681.79, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-28T00:00:00", "description": "033-Full", "reconciled": true, "amount": 250, "balance": 8931.79, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-30T00:00:00", "description": "Eft", "reconciled": true, "amount": -49.2, "balance": 8882.59, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-01-31T00:00:00", "description": "", "reconciled": true, "amount": -22, "balance": 8860.59, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-01T00:00:00", "description": "CHQ 6543-000411", "reconciled": true, "amount": -69.5, "balance": 8791.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-02T00:00:00", "description": "08-4123", "reconciled": true, "amount": -5953.75, "balance": 2837.34, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-03T00:00:00", "description": "", "reconciled": true, "amount": -1500, "balance": 1337.34, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-06T00:00:00", "description": "Exps", "reconciled": true, "amount": -29.5, "balance": 1307.84, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-07T00:00:00", "description": "Rent", "reconciled": false, "amount": -1181.25, "balance": 6314.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-07T00:00:00", "description": "INV-0035", "reconciled": false, "amount": 6187.5, "balance": 7495.34, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-08T00:00:00", "description": "0017-Part", "reconciled": false, "amount": 100, "balance": 1914.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-08T00:00:00", "description": "DEPOSIT ADV", "reconciled": false, "amount": 2000, "balance": 3914.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-08T00:00:00", "description": "0195 0210", "reconciled": false, "amount": -4500, "balance": 1814.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-09T00:00:00", "description": "Eft", "reconciled": false, "amount": -15.75, "balance": 3898.34, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-10T00:00:00", "description": "", "reconciled": false, "amount": -15.5, "balance": 3882.84, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-11T00:00:00", "description": "", "reconciled": false, "amount": -59.55, "balance": 3811.39, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-11T00:00:00", "description": "", "reconciled": false, "amount": -11.9, "balance": 3870.94, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-12T00:00:00", "description": "", "reconciled": false, "amount": -29.8, "balance": 4769.59, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-12T00:00:00", "description": "", "reconciled": false, "amount": 1000, "balance": 4811.39, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-12T00:00:00", "description": "", "reconciled": false, "amount": -12, "balance": 4799.39, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-13T00:00:00", "description": "", "reconciled": false, "amount": -12, "balance": 4757.59, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-13T00:00:00", "description": "Sub 092201", "reconciled": false, "amount": -49.9, "balance": 4588.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-13T00:00:00", "description": "Reg 8018922", "reconciled": false, "amount": -85, "balance": 4672.59, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-13T00:00:00", "description": "", "reconciled": false, "amount": -34.6, "balance": 4637.99, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-14T00:00:00", "description": "Sublet RM2031", "reconciled": false, "amount": 450, "balance": 6526.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-14T00:00:00", "description": "", "reconciled": false, "amount": -12, "balance": 4576.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-14T00:00:00", "description": "", "reconciled": false, "amount": 1500, "balance": 6076.09, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-15T00:00:00", "description": "", "reconciled": false, "amount": -12, "balance": 6499.79, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-15T00:00:00", "description": "CR 092201", "reconciled": false, "amount": 35, "balance": 6534.79, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-15T00:00:00", "description": "", "reconciled": false, "amount": -14.3, "balance": 6511.79, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-16T00:00:00", "description": "", "reconciled": false, "amount": 200, "balance": 6712.29, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-16T00:00:00", "description": "", "reconciled": false, "amount": -10.5, "balance": 6512.29, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-16T00:00:00", "description": "Fee", "reconciled": false, "amount": -15, "balance": 6697.29, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-16T00:00:00", "description": "", "reconciled": false, "amount": -15.5, "balance": 6681.79, "transactionType": "Unknown"}, {"modifiedDate": "2023-03-15T20:37:10Z", "accountId": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "clearedOnDate": "2023-02-16T00:00:00", "description": "", "reconciled": false, "amount": -12, "balance": 6522.79, "transactionType": "Unknown"}], "pageNumber": 1, "pageSize": 100, "totalResults": 93, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts/bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4/bankTransactions"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts/bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4/bankTransactions"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000070175", "accountId": "104957000000060010", "clearedOnDate": "2020-02-06T00:00:00", "description": "", "reconciled": false, "amount": 9001, "transactionType": "Cash"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000060014", "accountId": "104957000000060010", "clearedOnDate": "2020-02-12T00:00:00", "description": "", "reconciled": false, "amount": 10000, "transactionType": "Dep"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000067014", "accountId": "104957000000060010", "clearedOnDate": "2020-02-14T00:00:00", "description": "", "reconciled": false, "amount": 9001, "transactionType": "Cash"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000070035", "accountId": "104957000000060010", "clearedOnDate": "2020-02-17T00:00:00", "description": "", "reconciled": false, "amount": 11980, "transactionType": "Debit"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000070055", "accountId": "104957000000060010", "clearedOnDate": "2020-02-17T00:00:00", "description": "", "reconciled": false, "amount": -20, "transactionType": "Payment"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000070097", "accountId": "104957000000060010", "clearedOnDate": "2020-02-17T00:00:00", "description": "", "reconciled": false, "amount": 10789.21, "transactionType": "Cash"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000097011", "accountId": "104957000000060010", "clearedOnDate": "2020-02-26T00:00:00", "description": "", "reconciled": false, "amount": 10000, "transactionType": "Cash"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000099013", "accountId": "104957000000060010", "clearedOnDate": "2020-02-27T00:00:00", "description": "", "reconciled": false, "amount": -72, "transactionType": "Payment"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000099053", "accountId": "104957000000060010", "clearedOnDate": "2020-02-27T00:00:00", "description": "", "reconciled": false, "amount": 10, "transactionType": "Debit"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000137017", "accountId": "104957000000060010", "clearedOnDate": "2020-05-19T00:00:00", "description": "", "reconciled": false, "amount": 9000, "transactionType": "Cash"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000336002", "accountId": "104957000000060010", "clearedOnDate": "2020-12-01T00:00:00", "description": "", "reconciled": false, "amount": -20, "transactionType": "Xfer"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000000336020", "accountId": "104957000000060010", "clearedOnDate": "2020-12-01T00:00:00", "description": "", "reconciled": false, "amount": 1.79, "transactionType": "Xfer"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000001706009", "accountId": "104957000000060010", "clearedOnDate": "2021-04-12T00:00:00", "description": "", "reconciled": false, "amount": 200, "transactionType": "Cash"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000001469026", "accountId": "104957000000060010", "clearedOnDate": "2022-05-12T00:00:00", "description": "", "reconciled": false, "amount": -50, "transactionType": "Credit"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000001480001", "accountId": "104957000000060010", "clearedOnDate": "2022-05-13T00:00:00", "description": "", "reconciled": false, "amount": 18.98, "transactionType": "Debit"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000001480045", "accountId": "104957000000060010", "clearedOnDate": "2022-05-13T00:00:00", "description": "", "reconciled": false, "amount": -20, "transactionType": "Credit"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000001633002", "accountId": "104957000000060010", "clearedOnDate": "2022-07-27T00:00:00", "description": "", "reconciled": false, "amount": 26, "transactionType": "Other"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000001652007", "accountId": "104957000000060010", "clearedOnDate": "2022-08-08T00:00:00", "description": "", "reconciled": false, "amount": 11.75, "transactionType": "Other"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000001689069", "accountId": "104957000000060010", "clearedOnDate": "2022-08-24T00:00:00", "description": "", "reconciled": false, "amount": -2.89, "transactionType": "Payment"}, {"modifiedDate": "2022-10-03T08:40:40Z", "id": "104957000000060010-104957000001689125", "accountId": "104957000000060010", "clearedOnDate": "2022-08-25T00:00:00", "description": "", "reconciled": false, "amount": 3.6, "transactionType": "Debit"}], "pageNumber": 1, "pageSize": 100, "totalResults": 20, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts/104957000000060010/bankTransactions"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts/104957000000060010/bankTransactions"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-accounting-bank-accounts: - speakeasy-default-list-accounting-bank-accounts: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2023-02-07T00:00:00", "id": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "accountName": "55", "accountType": "Unknown", "nominalCode": "10500", "sortCode": "", "accountNumber": "", "iBan": "", "currency": "GBP", "balance": -352.03, "overdraftLimit": 0, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2022-06-07T00:00:00", "id": "47020f80-60e6-ec11-82f8-0022481a77f0", "accountName": "555", "accountType": "Unknown", "nominalCode": "40300", "sortCode": "", "accountNumber": "", "iBan": "", "currency": "PLN", "balance": 661.79, "overdraftLimit": 0, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 28, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts?page=2&pageSize=2"}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:12Z", "id": "738783", "accountName": "\\w3fw", "accountType": "Debit", "sortCode": "236972", "accountNumber": "A06268209", "currency": "GBP", "balance": -10484.65, "availableBalance": -10484.65, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:12Z", "id": "738778", "accountName": "2e2bna45hy\\", "accountType": "Debit", "sortCode": "236972", "accountNumber": "D01825250", "currency": "GBP", "balance": -114.4, "availableBalance": -114.4, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 82, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts?page=2&pageSize=2"}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:16Z", "id": "765768", "accountName": "16th Account", "accountType": "Unknown", "nominalCode": "70700", "currency": "GBP", "balance": 326, "availableBalance": 326}, {"modifiedDate": "2022-09-30T10:29:16Z", "id": "765766", "accountName": "1a1a", "accountType": "Unknown", "nominalCode": "70600", "currency": "GBP", "balance": 0, "availableBalance": 0}], "pageNumber": 1, "pageSize": 2, "totalResults": 56, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts?page=2&pageSize=2"}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-05-02T13:24:36Z", "sourceModifiedDate": "2022-07-15T11:34:02", "id": "825", "accountName": "Codat Europe Bank", "accountType": "Debit", "nominalCode": "111111122222111", "currency": "GBP", "balance": 558.22, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-05-02T13:24:36Z", "sourceModifiedDate": "2021-03-26T10:31:40", "id": "826", "accountName": "Codat Europe Bank USD", "accountType": "Debit", "nominalCode": "1133221133", "currency": "USD", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts?page=2&pageSize=2"}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:12:37Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "20000-933270541", "accountName": "Checking", "accountType": "Unknown", "nominalCode": "10100", "currency": "GBP", "balance": 46954.1, "availableBalance": 46954.1, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:12:37Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "550001-1071509830", "accountName": "Petty Cash", "accountType": "Unknown", "nominalCode": "10400", "currency": "GBP", "balance": 500, "availableBalance": 500, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts?page=2&pageSize=2"}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2022-07-20T14:11:28Z", "id": "164", "accountName": "00", "accountType": "Debit", "nominalCode": "123567", "currency": "GBP", "balance": 0, "availableBalance": 0, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2022-07-20T14:11:28Z", "id": "163", "accountName": "11", "accountType": "Debit", "currency": "GBP", "balance": 0, "availableBalance": 0, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 57, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts?page=2&pageSize=2"}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2022-11-11T14:15:13Z", "id": "202", "accountName": "\\aa", "accountType": "Debit", "currency": "GBP", "balance": 123, "availableBalance": 123}, {"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2023-01-18T06:05:12Z", "id": "193", "accountName": "1 year ago", "accountType": "Debit", "currency": "GBP", "balance": 5300.02, "availableBalance": 5300.02}], "pageNumber": 1, "pageSize": 2, "totalResults": 140, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts?page=2&pageSize=2"}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:25:48", "id": "1200", "accountName": "Bank Current Account", "accountType": "Unknown", "nominalCode": "1200", "sortCode": "23-34-34", "accountNumber": "003234234", "iBan": "", "currency": "GBP", "balance": -20091.04, "institution": "Lloyds Bank PLC", "availableBalance": -20091.04, "overdraftLimit": 120000, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:25:48", "id": "1210", "accountName": "Bank Deposit Account", "accountType": "Unknown", "nominalCode": "1210", "sortCode": "45-45-45", "accountNumber": "9/00474345", "iBan": "", "currency": "GBP", "balance": 3510, "institution": "Halifax Building Society", "availableBalance": 3510, "overdraftLimit": 0, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts?page=2&pageSize=2"}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-27T10:53:26Z", "id": "154d05abe9f24c4babe0f6a741dec1b9", "accountName": "Abdi Internet Bank", "accountType": "Unknown", "nominalCode": "1560", "sortCode": "010101", "accountNumber": "11111", "currency": "GBP", "balance": 49.61, "availableBalance": 49.61}, {"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-28T14:00:20Z", "id": "565ce07212bc492c8c2d04f43f9f67e3", "accountName": "Abdi Live Test", "accountType": "Unknown", "nominalCode": "147852", "sortCode": "123456", "accountNumber": "1234567", "currency": "GBP", "balance": -225830.75, "availableBalance": -225830.75}], "pageNumber": 1, "pageSize": 2, "totalResults": 45, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts?page=2&pageSize=2"}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:46Z", "sourceModifiedDate": "2023-03-27T14:11:48", "id": "CREDITCARD:55", "accountName": "CoT Credit Card", "accountType": "Credit", "nominalCode": "10021", "currency": "GBP", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:46Z", "sourceModifiedDate": "2023-03-27T14:15:11", "id": "CREDITCARD:58", "accountName": "Cot Credit Card 2", "accountType": "Credit", "nominalCode": "11112", "currency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 14, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts?page=2&pageSize=2"}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-03-15T20:35:07", "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "accountName": "Business Bank Account", "accountType": "Debit", "sortCode": "990404", "accountNumber": "987654321", "currency": "GBP", "balance": 6681.79, "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-03-15T20:36:06", "id": "a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba", "accountName": "Business Savings Account", "accountType": "Debit", "sortCode": "890303", "accountNumber": "876543210", "currency": "GBP", "balance": 0, "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts?page=1&pageSize=2"}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:38Z", "id": "104957000000060010", "accountName": "Abdi Test", "accountType": "Unknown", "sortCode": "112233", "accountNumber": "xxxx5678", "currency": "GBP", "balance": 69858.44, "institution": "Test Bank"}, {"modifiedDate": "2022-10-03T08:40:38Z", "id": "104957000000065002", "accountName": "Abdi Test 2", "accountType": "Unknown", "sortCode": "", "accountNumber": "", "currency": "AED", "balance": 98.03, "institution": ""}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts?page=2&pageSize=2"}}} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-accounting-bank-account: - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2023-02-07T00:00:00", "id": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "accountName": "55", "accountType": "Unknown", "nominalCode": "10500", "sortCode": "", "accountNumber": "", "iBan": "", "currency": "GBP", "balance": -352.03, "overdraftLimit": 0, "metadata": {"isDeleted": false}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-25T14:19:12Z", "id": "738783", "accountName": "\\w3fw", "accountType": "Debit", "sortCode": "236972", "accountNumber": "A06268209", "currency": "GBP", "balance": -10484.65, "availableBalance": -10484.65, "metadata": {"isDeleted": false}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-09-30T10:29:16Z", "id": "765768", "accountName": "16th Account", "accountType": "Unknown", "nominalCode": "70700", "currency": "GBP", "balance": 326, "availableBalance": 326} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:12:37Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "20000-933270541", "accountName": "Checking", "accountType": "Unknown", "nominalCode": "10100", "currency": "GBP", "balance": 46954.1, "availableBalance": 46954.1, "metadata": {"isDeleted": false}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:25:48", "id": "1200", "accountName": "Bank Current Account", "accountType": "Unknown", "nominalCode": "1200", "sortCode": "23-34-34", "accountNumber": "003234234", "iBan": "", "currency": "GBP", "balance": -20091.04, "institution": "Lloyds Bank PLC", "availableBalance": -20091.04, "overdraftLimit": 120000, "metadata": {"isDeleted": false}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-27T10:53:26Z", "id": "154d05abe9f24c4babe0f6a741dec1b9", "accountName": "Abdi Internet Bank", "accountType": "Unknown", "nominalCode": "1560", "sortCode": "010101", "accountNumber": "11111", "currency": "GBP", "balance": 49.61, "availableBalance": 49.61} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-03-15T20:35:07", "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "accountName": "Business Bank Account", "accountType": "Debit", "sortCode": "990404", "accountNumber": "987654321", "currency": "GBP", "balance": 6681.79, "metadata": {"isDeleted": false}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2022-10-03T08:40:38Z", "id": "104957000000060010", "accountName": "Abdi Test", "accountType": "Unknown", "sortCode": "112233", "accountNumber": "xxxx5678", "currency": "GBP", "balance": 69858.44, "institution": "Test Bank"} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-05-02T13:24:36Z", "sourceModifiedDate": "2022-07-15T11:34:02", "id": "825", "accountName": "Codat Europe Bank", "accountType": "Debit", "nominalCode": "111111122222111", "currency": "GBP", "balance": 558.22, "metadata": {"isDeleted": false}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2022-07-20T14:11:28Z", "id": "164", "accountName": "00", "accountType": "Debit", "nominalCode": "123567", "currency": "GBP", "balance": 0, "availableBalance": 0, "metadata": {"isDeleted": false}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2022-11-11T14:15:13Z", "id": "202", "accountName": "\\aa", "accountType": "Debit", "currency": "GBP", "balance": 123, "availableBalance": 123} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"modifiedDate": "2023-04-04T16:31:46Z", "sourceModifiedDate": "2023-03-27T14:11:48", "id": "CREDITCARD:55", "accountName": "CoT Credit Card", "accountType": "Credit", "nominalCode": "10021", "currency": "GBP", "metadata": {"isDeleted": false}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-files: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-list-files: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - responses: - "200": - application/json: [{"uploaded": "2022-10-23T00:00:00Z"}] - "401": - application/json: {} - "500": - application/json: {} - download-files: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - date: "2022-10-23T00:00:00Z" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-download-files: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - date: "2022-10-23T00:00:00Z" - responses: - "200": - application/octet-stream: "x-file: example.file" - "400": - application/json: {} - "500": - application/json: {} - upload-files: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-upload-files: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "400": - application/json: {} - "500": - application/json: {} - get-create-update-bankAccounts-model: - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountName", "details": "Needs to be of the format '{No.}-{Name}'"}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": true}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "The account number for the bank account", "required": false}, "nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": false, "validation": {"warnings": [], "information": [{"field": "NominalCode", "details": "Bank Account Posting Group with Nominal Account must exist"}]}}, "sortCode": {"type": "String", "displayName": "Sort Code", "description": "The sort code for the bank account", "required": false, "validation": {"warnings": [], "information": [{"field": "SortCode", "details": "Must have a length between 0 and 20 characters"}]}}, "iBan": {"type": "String", "displayName": "IBAN", "description": "The international bank account number of the account. Often used when making or receiving international payments", "required": false}, "overdraftLimit": {"type": "Number", "displayName": "Overdraft Limit", "description": "The pre-arranged overdraft limit of the account", "required": false, "validation": {"warnings": [], "information": [{"field": "OverdraftLimit", "details": "Default value is 0"}]}}}} - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "The account number for the bank account", "required": true, "validation": {"warnings": [{"field": "AccountNumber", "details": "Should not exceed the maximum length of 14 characters if the specified currency is GBP."}], "information": []}}, "sortCode": {"type": "String", "displayName": "Sort Code", "description": "The sort code for the bank account", "required": false, "validation": {"warnings": [{"field": "SortCode", "details": "Must be 6 characters long if the specified currency is GBP."}, {"field": "SortCode", "details": "Must be provided if the specified currency is GBP."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": false}, "nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": false}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "The account number for the bank account", "required": true, "validation": {"warnings": [{"field": "AccountNumber", "details": "Should not exceed the maximum length of 14 characters if the specified currency is GBP."}], "information": []}}, "sortCode": {"type": "String", "displayName": "Sort Code", "description": "The sort code for the bank account", "required": false, "validation": {"warnings": [{"field": "SortCode", "details": "Must be 6 characters long if the specified currency is GBP."}, {"field": "SortCode", "details": "Must be provided if the specified currency is GBP."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": false}, "nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": false}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true}, "sortCode": {"type": "String", "displayName": "Sort Code", "description": "The sort code for the bank account", "required": false, "validation": {"warnings": [{"field": "SortCode", "details": "Must have a length between 0 and 8 characters"}], "information": []}}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "The account number for the bank account", "required": false}, "iBan": {"type": "String", "displayName": "IBAN", "description": "The international bank account number of the account. Often used when making or receiving international payments", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": true, "options": [{"value": "AED", "type": "String", "displayName": "AED", "required": false}, {"value": "AMD", "type": "String", "displayName": "AMD", "required": false}, {"value": "AOA", "type": "String", "displayName": "AOA", "required": false}, {"value": "ARS", "type": "String", "displayName": "ARS", "required": false}, {"value": "AUD", "type": "String", "displayName": "AUD", "required": false}, {"value": "AWG", "type": "String", "displayName": "AWG", "required": false}, {"value": "AZN", "type": "String", "displayName": "AZN", "required": false}, {"value": "BBD", "type": "String", "displayName": "BBD", "required": false}, {"value": "BDT", "type": "String", "displayName": "BDT", "required": false}, {"value": "BGN", "type": "String", "displayName": "BGN", "required": false}, {"value": "BRL", "type": "String", "displayName": "BRL", "required": false}, {"value": "BWP", "type": "String", "displayName": "BWP", "required": false}, {"value": "CAD", "type": "String", "displayName": "CAD", "required": false}, {"value": "CHF", "type": "String", "displayName": "CHF", "required": false}, {"value": "CLP", "type": "String", "displayName": "CLP", "required": false}, {"value": "CNY", "type": "String", "displayName": "CNY", "required": false}, {"value": "COP", "type": "String", "displayName": "COP", "required": false}, {"value": "CRC", "type": "String", "displayName": "CRC", "required": false}, {"value": "CUC", "type": "String", "displayName": "CUC", "required": false}, {"value": "CUP", "type": "String", "displayName": "CUP", "required": false}, {"value": "CZK", "type": "String", "displayName": "CZK", "required": false}, {"value": "DKK", "type": "String", "displayName": "DKK", "required": false}, {"value": "DOP", "type": "String", "displayName": "DOP", "required": false}, {"value": "EGP", "type": "String", "displayName": "EGP", "required": false}, {"value": "EUR", "type": "String", "displayName": "EUR", "required": false}, {"value": "FJD", "type": "String", "displayName": "FJD", "required": false}, {"value": "GBP", "type": "String", "displayName": "GBP", "required": false}, {"value": "GEL", "type": "String", "displayName": "GEL", "required": false}, {"value": "GHS", "type": "String", "displayName": "GHS", "required": false}, {"value": "GTQ", "type": "String", "displayName": "GTQ", "required": false}, {"value": "GYD", "type": "String", "displayName": "GYD", "required": false}, {"value": "HKD", "type": "String", "displayName": "HKD", "required": false}, {"value": "HNL", "type": "String", "displayName": "HNL", "required": false}, {"value": "HRK", "type": "String", "displayName": "HRK", "required": false}, {"value": "HUF", "type": "String", "displayName": "HUF", "required": false}, {"value": "IDR", "type": "String", "displayName": "IDR", "required": false}, {"value": "ILS", "type": "String", "displayName": "ILS", "required": false}, {"value": "INR", "type": "String", "displayName": "INR", "required": false}, {"value": "ISK", "type": "String", "displayName": "ISK", "required": false}, {"value": "JMD", "type": "String", "displayName": "JMD", "required": false}, {"value": "JPY", "type": "String", "displayName": "JPY", "required": false}, {"value": "KES", "type": "String", "displayName": "KES", "required": false}, {"value": "KRW", "type": "String", "displayName": "KRW", "required": false}, {"value": "KWD", "type": "String", "displayName": "KWD", "required": false}, {"value": "KYD", "type": "String", "displayName": "KYD", "required": false}, {"value": "KZT", "type": "String", "displayName": "KZT", "required": false}, {"value": "LAK", "type": "String", "displayName": "LAK", "required": false}, {"value": "LBP", "type": "String", "displayName": "LBP", "required": false}, {"value": "LKR", "type": "String", "displayName": "LKR", "required": false}, {"value": "LTL", "type": "String", "displayName": "LTL", "required": false}, {"value": "LVL", "type": "String", "displayName": "LVL", "required": false}, {"value": "MAD", "type": "String", "displayName": "MAD", "required": false}, {"value": "MDL", "type": "String", "displayName": "MDL", "required": false}, {"value": "MGA", "type": "String", "displayName": "MGA", "required": false}, {"value": "MUR", "type": "String", "displayName": "MUR", "required": false}, {"value": "MVR", "type": "String", "displayName": "MVR", "required": false}, {"value": "MWK", "type": "String", "displayName": "MWK", "required": false}, {"value": "MXN", "type": "String", "displayName": "MXN", "required": false}, {"value": "MYR", "type": "String", "displayName": "MYR", "required": false}, {"value": "MZN", "type": "String", "displayName": "MZN", "required": false}, {"value": "NAD", "type": "String", "displayName": "NAD", "required": false}, {"value": "NGN", "type": "String", "displayName": "NGN", "required": false}, {"value": "NOK", "type": "String", "displayName": "NOK", "required": false}, {"value": "NPR", "type": "String", "displayName": "NPR", "required": false}, {"value": "NZD", "type": "String", "displayName": "NZD", "required": false}, {"value": "OMR", "type": "String", "displayName": "OMR", "required": false}, {"value": "PEN", "type": "String", "displayName": "PEN", "required": false}, {"value": "PHP", "type": "String", "displayName": "PHP", "required": false}, {"value": "PKR", "type": "String", "displayName": "PKR", "required": false}, {"value": "PLN", "type": "String", "displayName": "PLN", "required": false}, {"value": "QAR", "type": "String", "displayName": "QAR", "required": false}, {"value": "RON", "type": "String", "displayName": "RON", "required": false}, {"value": "RSD", "type": "String", "displayName": "RSD", "required": false}, {"value": "RUB", "type": "String", "displayName": "RUB", "required": false}, {"value": "RWF", "type": "String", "displayName": "RWF", "required": false}, {"value": "SAR", "type": "String", "displayName": "SAR", "required": false}, {"value": "SCR", "type": "String", "displayName": "SCR", "required": false}, {"value": "SEK", "type": "String", "displayName": "SEK", "required": false}, {"value": "SGD", "type": "String", "displayName": "SGD", "required": false}, {"value": "THB", "type": "String", "displayName": "THB", "required": false}, {"value": "TND", "type": "String", "displayName": "TND", "required": false}, {"value": "TRY", "type": "String", "displayName": "TRY", "required": false}, {"value": "TTD", "type": "String", "displayName": "TTD", "required": false}, {"value": "TWD", "type": "String", "displayName": "TWD", "required": false}, {"value": "TZS", "type": "String", "displayName": "TZS", "required": false}, {"value": "UAH", "type": "String", "displayName": "UAH", "required": false}, {"value": "UGX", "type": "String", "displayName": "UGX", "required": false}, {"value": "USD", "type": "String", "displayName": "USD", "required": false}, {"value": "UYU", "type": "String", "displayName": "UYU", "required": false}, {"value": "VEF", "type": "String", "displayName": "VEF", "required": false}, {"value": "VND", "type": "String", "displayName": "VND", "required": false}, {"value": "VUV", "type": "String", "displayName": "VUV", "required": false}, {"value": "XAF", "type": "String", "displayName": "XAF", "required": false}, {"value": "XCD", "type": "String", "displayName": "XCD", "required": false}, {"value": "XOF", "type": "String", "displayName": "XOF", "required": false}, {"value": "ZAR", "type": "String", "displayName": "ZAR", "required": false}, {"value": "ZMK", "type": "String", "displayName": "ZMK", "required": false}]}, "balance": {"type": "Number", "displayName": "Balance", "description": "The balance of the bank account", "required": false, "validation": {"warnings": [], "information": [{"field": "Balance", "details": "The opening balance, in the account currency"}]}}, "institution": {"type": "String", "displayName": "Institution", "description": "The institution of the bank account", "required": false}}} - KashFlow: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Account Name", "description": "Name of the bank account as it appears in Kashflow.", "required": true}, "balance": {"type": "Number", "displayName": "Balance", "description": "The opening balance, in the account currency.", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account.", "required": true}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "Max length of 7 characters."}], "information": []}}, "accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true, "validation": {"warnings": [{"field": "AccountName", "details": "Max length of 31 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is 'Asset.AccountsReceivable','Liability.AccountsPayable' or 'Liability.CreditCard'"}, {"field": "Currency", "details": "Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company"}, {"field": "Currency", "details": "Can only be set if the QuickBooks Desktop company has Multicurrency enabled."}], "information": [{"field": "Currency", "details": "If not set, will default to the base currency of the QuickBooks Desktop company"}]}}, "balance": {"type": "Number", "displayName": "Balance", "description": "The balance of the bank account", "required": false}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Account Name", "description": "Name of account as it appears in the chart of accounts or general ledger.", "required": true}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account.", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bank account.", "required": true}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountName", "details": "Must be provided."}, {"field": "AccountName", "details": "Should not be longer than 50 characters."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": true, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Must be provided."}, {"field": "Currency", "details": "Must match the company's base currency."}]}}, "sortCode": {"type": "String", "displayName": "Sort Code", "description": "The sort code for the bank account", "required": false, "validation": {"warnings": [], "information": [{"field": "SortCode", "details": "Should be a 6 digit number."}]}}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "The account number for the bank account", "required": false, "validation": {"warnings": [], "information": [{"field": "AccountNumber", "details": "Should not be longer than 25 characters."}]}}, "iBan": {"type": "String", "displayName": "IBAN", "description": "The international bank account number of the account. Often used when making or receiving international payments", "required": false, "validation": {"warnings": [], "information": [{"field": "IBan", "details": "Should be in the international bank account number format."}]}}, "nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": false, "validation": {"warnings": [], "information": [{"field": "NominalCode", "details": "Should be a number between 1 and 99999999."}]}}}} - Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true}, "accountType": {"type": "String", "displayName": "Account Type", "description": "The type of account", "required": true}, "nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true}, "sortCode": {"type": "String", "displayName": "Sort Code", "description": "The sort code for the bank account", "required": true}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "The account number for the bank account", "required": true}, "iBan": {"type": "String", "displayName": "IBAN", "description": "The international bank account number of the account. Often used when making or receiving international payments", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": true}, "balance": {"type": "Number", "displayName": "Balance", "description": "The balance of the bank account", "required": true}, "availableBalance": {"type": "Number", "displayName": "Available Balance", "description": "The available balance of the bank account", "required": true}, "overdraftLimit": {"type": "Number", "displayName": "Overdraft Limit", "description": "The pre-arranged overdraft limit of the account", "required": true}, "institution": {"type": "String", "displayName": "Institution", "description": "The institution of the bank account", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true, "properties": {"isDeleted": {"type": "Boolean", "displayName": "IsDeleted", "description": "A boolean to indicate whether the object has been deleted", "required": true}}}}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-bank-account: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "GBP", "status": "Active"} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-create-bank-account: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "GBP", "status": "Active"} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "GBP", "status": "Active"}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "f553785e-0965-44ce-84ff-3208e3026760", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 252912} - "400": - application/json: {} - "500": - application/json: {} - get-create-chartOfAccounts-model: - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [], "information": [{"field": "NominalCode", "details": "Must be provided."}]}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true, "validation": {"warnings": [], "information": [{"field": "Name", "details": "Must be provided."}]}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "Asset.Assets.Cash", "type": "String", "displayName": "Asset.Assets.Cash", "required": false}, {"value": "Asset.Assets.Bank", "type": "String", "displayName": "Asset.Assets.Bank", "required": false}, {"value": "Asset.Assets.PaymentServices", "type": "String", "displayName": "Asset.Assets.PaymentServices", "required": false}, {"value": "Asset.Assets.AccountsReceivable", "type": "String", "displayName": "Asset.Assets.AccountsReceivable", "required": false}, {"value": "Liability.EquityAndLiabilities.AccountsPayable", "type": "String", "displayName": "Liability.EquityAndLiabilities.AccountsPayable", "required": false}, {"value": "Asset.Assets.VAT", "type": "String", "displayName": "Asset.Assets.VAT", "required": false}, {"value": "Liability.EquityAndLiabilities.EmployeesPayable", "type": "String", "displayName": "Liability.EquityAndLiabilities.EmployeesPayable", "required": false}, {"value": "Asset.Assets.PrepaidExpenses", "type": "String", "displayName": "Asset.Assets.PrepaidExpenses", "required": false}, {"value": "Liability.EquityAndLiabilities.AccruedExpenses", "type": "String", "displayName": "Liability.EquityAndLiabilities.AccruedExpenses", "required": false}, {"value": "Liability.EquityAndLiabilities.IncomeTaxesPayable", "type": "String", "displayName": "Liability.EquityAndLiabilities.IncomeTaxesPayable", "required": false}, {"value": "Asset.Assets.FixedAssets", "type": "String", "displayName": "Asset.Assets.FixedAssets", "required": false}, {"value": "Asset.Assets.OtherAssets", "type": "String", "displayName": "Asset.Assets.OtherAssets", "required": false}, {"value": "Asset.Assets.AccumulatedDeprecation", "type": "String", "displayName": "Asset.Assets.AccumulatedDeprecation", "required": false}, {"value": "Asset.Assets.Inventory", "type": "String", "displayName": "Asset.Assets.Inventory", "required": false}, {"value": "Equity.EquityAndLiabilities.CapitalStock", "type": "String", "displayName": "Equity.EquityAndLiabilities.CapitalStock", "required": false}, {"value": "Equity.EquityAndLiabilities.RetainedEarnings", "type": "String", "displayName": "Equity.EquityAndLiabilities.RetainedEarnings", "required": false}, {"value": "Liability.EquityAndLiabilities.LongTermDebt", "type": "String", "displayName": "Liability.EquityAndLiabilities.LongTermDebt", "required": false}, {"value": "Liability.EquityAndLiabilities.CurrentPortionOfDebt", "type": "String", "displayName": "Liability.EquityAndLiabilities.CurrentPortionOfDebt", "required": false}, {"value": "Unknown.EquityAndLiabilities.Intercompany", "type": "String", "displayName": "Unknown.EquityAndLiabilities.Intercompany", "required": false}, {"value": "Unknown.General.General", "type": "String", "displayName": "Unknown.General.General", "required": false}, {"value": "Income.NetIncome.Revenue", "type": "String", "displayName": "Income.NetIncome.Revenue", "required": false}, {"value": "Expense.NetIncome.CostOfGoods", "type": "String", "displayName": "Expense.NetIncome.CostOfGoods", "required": false}, {"value": "Expense.NetIncome.OtherCosts", "type": "String", "displayName": "Expense.NetIncome.OtherCosts", "required": false}, {"value": "Expense.NetIncome.SalesGeneralAdministrativeExpenses", "type": "String", "displayName": "Expense.NetIncome.SalesGeneralAdministrativeExpenses", "required": false}, {"value": "Expense.NetIncome.DeprecationCosts", "type": "String", "displayName": "Expense.NetIncome.DeprecationCosts", "required": false}, {"value": "Expense.NetIncome.ResearchAndDevelopment", "type": "String", "displayName": "Expense.NetIncome.ResearchAndDevelopment", "required": false}, {"value": "Expense.NetIncome.EmployeeCosts", "type": "String", "displayName": "Expense.NetIncome.EmployeeCosts", "required": false}, {"value": "Expense.NetIncome.EmploymentCosts", "type": "String", "displayName": "Expense.NetIncome.EmploymentCosts", "required": false}, {"value": "Expense.ExceptionalIncome.ExceptionalCosts", "type": "String", "displayName": "Expense.ExceptionalIncome.ExceptionalCosts", "required": false}, {"value": "Income.ExceptionalIncome.ExceptionalIncome", "type": "String", "displayName": "Income.ExceptionalIncome.ExceptionalIncome", "required": false}, {"value": "Expense.ExceptionalIncome.IncomeTaxes", "type": "String", "displayName": "Expense.ExceptionalIncome.IncomeTaxes", "required": false}, {"value": "Income.ExceptionalIncome.InterestIncome", "type": "String", "displayName": "Income.ExceptionalIncome.InterestIncome", "required": false}], "validation": {"warnings": [], "information": [{"field": "FullyQualifiedCategory", "details": "Must be provided."}]}}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Pending", "type": "String", "displayName": "Pending", "required": false}, {"value": "Unknown", "type": "String", "displayName": "Unknown", "required": false}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "Must be provided."}]}}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [], "information": [{"field": "NominalCode", "details": "Must be provided."}]}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true, "validation": {"warnings": [], "information": [{"field": "Name", "details": "Must be provided."}]}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "Asset.Assets.Cash", "type": "String", "displayName": "Asset.Assets.Cash", "required": false}, {"value": "Asset.Assets.Bank", "type": "String", "displayName": "Asset.Assets.Bank", "required": false}, {"value": "Asset.Assets.PaymentServices", "type": "String", "displayName": "Asset.Assets.PaymentServices", "required": false}, {"value": "Asset.Assets.AccountsReceivable", "type": "String", "displayName": "Asset.Assets.AccountsReceivable", "required": false}, {"value": "Liability.EquityAndLiabilities.AccountsPayable", "type": "String", "displayName": "Liability.EquityAndLiabilities.AccountsPayable", "required": false}, {"value": "Asset.Assets.VAT", "type": "String", "displayName": "Asset.Assets.VAT", "required": false}, {"value": "Liability.EquityAndLiabilities.EmployeesPayable", "type": "String", "displayName": "Liability.EquityAndLiabilities.EmployeesPayable", "required": false}, {"value": "Asset.Assets.PrepaidExpenses", "type": "String", "displayName": "Asset.Assets.PrepaidExpenses", "required": false}, {"value": "Liability.EquityAndLiabilities.AccruedExpenses", "type": "String", "displayName": "Liability.EquityAndLiabilities.AccruedExpenses", "required": false}, {"value": "Liability.EquityAndLiabilities.IncomeTaxesPayable", "type": "String", "displayName": "Liability.EquityAndLiabilities.IncomeTaxesPayable", "required": false}, {"value": "Asset.Assets.FixedAssets", "type": "String", "displayName": "Asset.Assets.FixedAssets", "required": false}, {"value": "Asset.Assets.OtherAssets", "type": "String", "displayName": "Asset.Assets.OtherAssets", "required": false}, {"value": "Asset.Assets.AccumulatedDeprecation", "type": "String", "displayName": "Asset.Assets.AccumulatedDeprecation", "required": false}, {"value": "Asset.Assets.Inventory", "type": "String", "displayName": "Asset.Assets.Inventory", "required": false}, {"value": "Equity.EquityAndLiabilities.CapitalStock", "type": "String", "displayName": "Equity.EquityAndLiabilities.CapitalStock", "required": false}, {"value": "Equity.EquityAndLiabilities.RetainedEarnings", "type": "String", "displayName": "Equity.EquityAndLiabilities.RetainedEarnings", "required": false}, {"value": "Liability.EquityAndLiabilities.LongTermDebt", "type": "String", "displayName": "Liability.EquityAndLiabilities.LongTermDebt", "required": false}, {"value": "Liability.EquityAndLiabilities.CurrentPortionOfDebt", "type": "String", "displayName": "Liability.EquityAndLiabilities.CurrentPortionOfDebt", "required": false}, {"value": "Unknown.EquityAndLiabilities.Intercompany", "type": "String", "displayName": "Unknown.EquityAndLiabilities.Intercompany", "required": false}, {"value": "Unknown.General.General", "type": "String", "displayName": "Unknown.General.General", "required": false}, {"value": "Income.NetIncome.Revenue", "type": "String", "displayName": "Income.NetIncome.Revenue", "required": false}, {"value": "Expense.NetIncome.CostOfGoods", "type": "String", "displayName": "Expense.NetIncome.CostOfGoods", "required": false}, {"value": "Expense.NetIncome.OtherCosts", "type": "String", "displayName": "Expense.NetIncome.OtherCosts", "required": false}, {"value": "Expense.NetIncome.SalesGeneralAdministrativeExpenses", "type": "String", "displayName": "Expense.NetIncome.SalesGeneralAdministrativeExpenses", "required": false}, {"value": "Expense.NetIncome.DeprecationCosts", "type": "String", "displayName": "Expense.NetIncome.DeprecationCosts", "required": false}, {"value": "Expense.NetIncome.ResearchAndDevelopment", "type": "String", "displayName": "Expense.NetIncome.ResearchAndDevelopment", "required": false}, {"value": "Expense.NetIncome.EmployeeCosts", "type": "String", "displayName": "Expense.NetIncome.EmployeeCosts", "required": false}, {"value": "Expense.NetIncome.EmploymentCosts", "type": "String", "displayName": "Expense.NetIncome.EmploymentCosts", "required": false}, {"value": "Expense.ExceptionalIncome.ExceptionalCosts", "type": "String", "displayName": "Expense.ExceptionalIncome.ExceptionalCosts", "required": false}, {"value": "Income.ExceptionalIncome.ExceptionalIncome", "type": "String", "displayName": "Income.ExceptionalIncome.ExceptionalIncome", "required": false}, {"value": "Expense.ExceptionalIncome.IncomeTaxes", "type": "String", "displayName": "Expense.ExceptionalIncome.IncomeTaxes", "required": false}, {"value": "Income.ExceptionalIncome.InterestIncome", "type": "String", "displayName": "Income.ExceptionalIncome.InterestIncome", "required": false}], "validation": {"warnings": [], "information": [{"field": "FullyQualifiedCategory", "details": "Must be provided."}]}}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Pending", "type": "String", "displayName": "Pending", "required": false}, {"value": "Unknown", "type": "String", "displayName": "Unknown", "required": false}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "Must be provided."}]}}}} - MYOB AccountRight and Essentials: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "If alphanumeric is supported, must be between 1 and 10 characters. Otherwise format is x-xxxx"}], "information": []}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": false, "validation": {"warnings": [{"field": "Name", "details": "Must have a length between 1 and 60 characters"}], "information": []}}, "description": {"type": "String", "displayName": "Description", "description": "Description of the account", "required": false, "validation": {"warnings": [{"field": "Description", "details": "Must have a length between 1 and 255 characters"}], "information": []}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "Asset.Bank", "type": "String", "displayName": "Bank", "required": false}, {"value": "Asset.AccountReceivable", "type": "String", "displayName": "Accounts Receivable", "required": false}, {"value": "Asset.OtherCurrentAsset", "type": "String", "displayName": "Other Current Asset", "required": false}, {"value": "Asset.FixedAsset", "type": "String", "displayName": "Fixed Asset", "required": false}, {"value": "Asset.OtherAsset", "type": "String", "displayName": "Other Asset", "required": false}, {"value": "Asset.CashAndBank", "type": "String", "displayName": "Cash", "required": false}, {"value": "Asset.Property Plant and Equipment", "type": "String", "displayName": "Equipment Machinery", "required": false}, {"value": "Liability.CreditCard", "type": "String", "displayName": "Credit Card", "required": false}, {"value": "Liability.AccountsPayable", "type": "String", "displayName": "Accounts Payable", "required": false}, {"value": "Liability.OtherCurrentLiability", "type": "String", "displayName": "Other Current Liability", "required": false}, {"value": "Liability.LongTermLiability", "type": "String", "displayName": "Long Term Liability", "required": false}, {"value": "Liability.OtherLiability", "type": "String", "displayName": "Other Liability", "required": false}, {"value": "Equity", "type": "String", "displayName": "Equity", "required": false}, {"value": "Equity.Equity", "type": "String", "displayName": "Retained Earnings", "required": false}, {"value": "Equity.Equity.RetainedEarnings", "type": "String", "displayName": "Retained Earnings", "required": false}, {"value": "Equity.Owner's Equity", "type": "String", "displayName": "Retained Earnings", "required": false}, {"value": "Income", "type": "String", "displayName": "Income", "required": false}, {"value": "OtherIncome", "type": "String", "displayName": "Other Income", "required": false}, {"value": "Expense", "type": "String", "displayName": "Expense", "required": false}, {"value": "Expense.Expense", "type": "String", "displayName": "Sales Marketing", "required": false}, {"value": "Expense.Expense.Insurance", "type": "String", "displayName": "General Administrative", "required": false}, {"value": "Expense.Overhead", "type": "String", "displayName": "General Administrative", "required": false}, {"value": "Expense.Expense.RepairMaintenance", "type": "String", "displayName": "Repairs Maintenance", "required": false}, {"value": "OtherExpense", "type": "String", "displayName": "Other Expense", "required": false}, {"value": "CostOfSales", "type": "String", "displayName": "Cost of Sales", "required": false}, {"value": "Cost Of Goods Sold.Cost of Sales", "type": "String", "displayName": "Other", "required": false}]}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "Max length of 7 characters."}], "information": []}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true, "validation": {"warnings": [{"field": "Name", "details": "Max length of 31 characters."}], "information": []}}, "description": {"type": "String", "displayName": "Description", "description": "Description of the account", "required": false, "validation": {"warnings": [{"field": "Description", "details": "Max length of 200 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the account", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is 'Asset.AccountsReceivable','Liability.AccountsPayable' or 'Liability.CreditCard'"}, {"field": "Currency", "details": "Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company"}, {"field": "Currency", "details": "Can only be set if the QuickBooks Desktop company has Multicurrency enabled."}], "information": [{"field": "Currency", "details": "If not set, will default to the base currency of the QuickBooks Desktop company"}]}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "Asset.AccountsReceivable", "type": "String", "displayName": "Account Receivable", "required": false}, {"value": "Asset.FixedAsset", "type": "String", "displayName": "Fixed Asset", "required": false}, {"value": "Asset.OtherCurrentAsset", "type": "String", "displayName": "Other Current Asset", "required": false}, {"value": "Asset.OtherAsset", "type": "String", "displayName": "Other Asset", "required": false}, {"value": "Income.Income", "type": "String", "displayName": "Income", "required": false}, {"value": "Income.OtherIncome", "type": "String", "displayName": "Other Income", "required": false}, {"value": "Liability.AccountsPayable", "type": "String", "displayName": "Accounts Payable", "required": false}, {"value": "Liability.CreditCard", "type": "String", "displayName": "Credit Card", "required": false}, {"value": "Liability.LongTermLiability", "type": "String", "displayName": "Long Term Liability", "required": false}, {"value": "Liability.OtherCurrentLiability", "type": "String", "displayName": "Other Current Liability", "required": false}, {"value": "Liability.CostOfGoodsSold", "type": "String", "displayName": "Cost Of Goods Sold", "required": false}, {"value": "Equity.Equity", "type": "String", "displayName": "Equity", "required": false}, {"value": "Expense.Expense", "type": "String", "displayName": "Expense", "required": false}, {"value": "Expense.OtherExpense", "type": "String", "displayName": "Other Expense", "required": false}]}, "currentBalance": {"type": "Number", "displayName": "Current Balance", "description": "The current balance in the account", "required": false}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": false, "validation": {"warnings": [], "information": [{"field": "NominalCode", "details": "If included must have a length between 1 and 7 characters"}]}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true, "validation": {"warnings": [{"field": "Name", "details": "Must have a length between 1 and 100 characters"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the account", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "When not specified company base currency will be used"}]}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "Asset.Bank.CashOnHand", "type": "String", "displayName": "Cash On Hand", "required": false}, {"value": "Asset.Bank.Checking", "type": "String", "displayName": "Checking", "required": false}, {"value": "Asset.Bank.MoneyMarket", "type": "String", "displayName": "Money Market", "required": false}, {"value": "Asset.Bank.RentsHeldInTrust", "type": "String", "displayName": "Rents Held In Trust", "required": false}, {"value": "Asset.Bank.Savings", "type": "String", "displayName": "Savings", "required": false}, {"value": "Asset.Bank.TrustAccounts", "type": "String", "displayName": "Trust Accounts", "required": false}, {"value": "Asset.Bank.CashAndCashEquivalents", "type": "String", "displayName": "Cash And Cash Equivalents", "required": false}, {"value": "Asset.Bank.OtherEarmarkedBankAccounts", "type": "String", "displayName": "Other Earmarked Bank Accounts", "required": false}, {"value": "Asset.Other Current Asset.AllowanceForBadDebts", "type": "String", "displayName": "Allowance For Bad Debts", "required": false}, {"value": "Asset.Other Current Asset.DevelopmentCosts", "type": "String", "displayName": "Development Costs", "required": false}, {"value": "Asset.Other Current Asset.EmployeeCashAdvances", "type": "String", "displayName": "Employee Cash Advances", "required": false}, {"value": "Asset.Other Current Asset.OtherCurrentAssets", "type": "String", "displayName": "Other Current Assets", "required": false}, {"value": "Asset.Other Current Asset.Inventory", "type": "String", "displayName": "Inventory", "required": false}, {"value": "Asset.Other Current Asset.Investment_MortgageRealEstateLoans", "type": "String", "displayName": "Investment Mortgage Real Estate Loans", "required": false}, {"value": "Asset.Other Current Asset.Investment_Other", "type": "String", "displayName": "Investment Other", "required": false}, {"value": "Asset.Other Current Asset.Investment_TaxExemptSecurities", "type": "String", "displayName": "Investment Tax Exempt Securities", "required": false}, {"value": "Asset.Other Current Asset.Investment_USGovernmentObligations", "type": "String", "displayName": "Investment US Government Obligations", "required": false}, {"value": "Asset.Other Current Asset.LoansToOfficers", "type": "String", "displayName": "Loans To Officers", "required": false}, {"value": "Asset.Other Current Asset.LoansToOthers", "type": "String", "displayName": "Loans To Others", "required": false}, {"value": "Asset.Other Current Asset.LoansToStockholders", "type": "String", "displayName": "Loans To Stockholders", "required": false}, {"value": "Asset.Other Current Asset.PrepaidExpenses", "type": "String", "displayName": "Prepaid Expenses", "required": false}, {"value": "Asset.Other Current Asset.Retainage", "type": "String", "displayName": "Retainage", "required": false}, {"value": "Asset.Other Current Asset.UndepositedFunds", "type": "String", "displayName": "Undeposited Funds", "required": false}, {"value": "Asset.Other Current Asset.AssetsAvailableForSale", "type": "String", "displayName": "Assets Available For Sale", "required": false}, {"value": "Asset.Other Current Asset.BalWithGovtAuthorities", "type": "String", "displayName": "Balance With Govt Authorities", "required": false}, {"value": "Asset.Other Current Asset.CalledUpShareCapitalNotPaid", "type": "String", "displayName": "Called Up Share Capital Not Paid", "required": false}, {"value": "Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit", "type": "String", "displayName": "Expenditure Authorisations And Letters Of Credit", "required": false}, {"value": "Asset.Other Current Asset.GlobalTaxDeferred", "type": "String", "displayName": "Global Tax Deferred", "required": false}, {"value": "Asset.Other Current Asset.GlobalTaxRefund", "type": "String", "displayName": "Global Tax Refund", "required": false}, {"value": "Asset.Other Current Asset.InternalTransfers", "type": "String", "displayName": "Internal Transfers", "required": false}, {"value": "Asset.Other Current Asset.OtherConsumables", "type": "String", "displayName": "Other Consumables", "required": false}, {"value": "Asset.Other Current Asset.ProvisionsCurrentAssets", "type": "String", "displayName": "Provisions Current Assets", "required": false}, {"value": "Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties", "type": "String", "displayName": "Short Term Investments In Related Parties", "required": false}, {"value": "Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties", "type": "String", "displayName": "Short Term Loans And Advances To Related Parties", "required": false}, {"value": "Asset.Other Current Asset.TradeAndOtherReceivables", "type": "String", "displayName": "Trade And Other Receivables", "required": false}, {"value": "Asset.Fixed Asset.AccumulatedDepletion", "type": "String", "displayName": "Accumulated Depletion", "required": false}, {"value": "Asset.Fixed Asset.AccumulatedDepreciation", "type": "String", "displayName": "Accumulated Depreciation", "required": false}, {"value": "Asset.Fixed Asset.DepletableAssets", "type": "String", "displayName": "Depletable Assets", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetComputers", "type": "String", "displayName": "Fixed Asset Computers", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetCopiers", "type": "String", "displayName": "Fixed Asset Copiers", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetFurniture", "type": "String", "displayName": "Fixed Asset Furniture", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetPhone", "type": "String", "displayName": "Fixed Asset Phone", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetPhotoVideo", "type": "String", "displayName": "Fixed Asset Photo Video", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetSoftware", "type": "String", "displayName": "Fixed Asset Software", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetOtherToolsEquipment", "type": "String", "displayName": "Fixed Asset Other Tools Equipment", "required": false}, {"value": "Asset.Fixed Asset.FurnitureAndFixtures", "type": "String", "displayName": "Furniture And Fixtures", "required": false}, {"value": "Asset.Fixed Asset.Land", "type": "String", "displayName": "Land", "required": false}, {"value": "Asset.Fixed Asset.LeaseholdImprovements", "type": "String", "displayName": "Leasehold Improvements", "required": false}, {"value": "Asset.Fixed Asset.OtherFixedAssets", "type": "String", "displayName": "Other Fixed Assets", "required": false}, {"value": "Asset.Fixed Asset.AccumulatedAmortization", "type": "String", "displayName": "Accumulated Amortization", "required": false}, {"value": "Asset.Fixed Asset.Buildings", "type": "String", "displayName": "Buildings", "required": false}, {"value": "Asset.Fixed Asset.IntangibleAssets", "type": "String", "displayName": "Intangible Assets", "required": false}, {"value": "Asset.Fixed Asset.MachineryAndEquipment", "type": "String", "displayName": "Machinery And Equipment", "required": false}, {"value": "Asset.Fixed Asset.Vehicles", "type": "String", "displayName": "Vehicles", "required": false}, {"value": "Asset.Fixed Asset.AssetsInCourseOfConstruction", "type": "String", "displayName": "Assets In Course Of Construction", "required": false}, {"value": "Asset.Fixed Asset.CapitalWip", "type": "String", "displayName": "Capital Wip", "required": false}, {"value": "Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets", "type": "String", "displayName": "Cumulative Depreciation On Intangible Assets", "required": false}, {"value": "Asset.Fixed Asset.IntangibleAssetsUnderDevelopment", "type": "String", "displayName": "Intangible Assets Under Development", "required": false}, {"value": "Asset.Fixed Asset.LandAsset", "type": "String", "displayName": "Land Asset", "required": false}, {"value": "Asset.Fixed Asset.NonCurrentAssets", "type": "String", "displayName": "Non Current Assets", "required": false}, {"value": "Asset.Fixed Asset.ParticipatingInterests", "type": "String", "displayName": "Participating Interests", "required": false}, {"value": "Asset.Fixed Asset.ProvisionsFixedAssets", "type": "String", "displayName": "Provisions Fixed Assets", "required": false}, {"value": "Asset.Other Asset.LeaseBuyout", "type": "String", "displayName": "Lease Buyout", "required": false}, {"value": "Asset.Other Asset.OtherLongTermAssets", "type": "String", "displayName": "Other Long Term Assets", "required": false}, {"value": "Asset.Other Asset.SecurityDeposits", "type": "String", "displayName": "Security Deposits", "required": false}, {"value": "Asset.Other Asset.AccumulatedAmortizationOfOtherAssets", "type": "String", "displayName": "Accumulated Amortization Of Other Assets", "required": false}, {"value": "Asset.Other Asset.Goodwill", "type": "String", "displayName": "Goodwill", "required": false}, {"value": "Asset.Other Asset.Licenses", "type": "String", "displayName": "Licenses", "required": false}, {"value": "Asset.Other Asset.OrganizationalCosts", "type": "String", "displayName": "Organizational Costs", "required": false}, {"value": "Asset.Other Asset.AssetsHeldForSale", "type": "String", "displayName": "Assets Held For Sale", "required": false}, {"value": "Asset.Other Asset.AvailableForSaleFinancialAssets", "type": "String", "displayName": "Available For Sale Financial Assets", "required": false}, {"value": "Asset.Other Asset.DeferredTax", "type": "String", "displayName": "Deferred Tax", "required": false}, {"value": "Asset.Other Asset.Investments", "type": "String", "displayName": "Investments", "required": false}, {"value": "Asset.Other Asset.LongTermInvestments", "type": "String", "displayName": "Long Term Investments", "required": false}, {"value": "Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties", "type": "String", "displayName": "Long Term Loans And Advances To Related Parties", "required": false}, {"value": "Asset.Other Asset.OtherIntangibleAssets", "type": "String", "displayName": "Other Intangible Assets", "required": false}, {"value": "Asset.Other Asset.OtherLongTermInvestments", "type": "String", "displayName": "Other Long Term Investments", "required": false}, {"value": "Asset.Other Asset.OtherLongTermLoansAndAdvances", "type": "String", "displayName": "Other Long Term Loans And Advances", "required": false}, {"value": "Asset.Other Asset.PrepaymentsAndAccruedIncome", "type": "String", "displayName": "Prepayments And Accrued Income", "required": false}, {"value": "Asset.Other Asset.ProvisionsNonCurrentAssets", "type": "String", "displayName": "Provisions Non-Current Assets", "required": false}, {"value": "Asset.Accounts Receivable.AccountsReceivable", "type": "String", "displayName": "Accounts Receivable", "required": false}, {"value": "Expense.Expense.AdvertisingPromotional", "type": "String", "displayName": "Advertising/Promotional", "required": false}, {"value": "Expense.Expense.BadDebts", "type": "String", "displayName": "Bad Debts", "required": false}, {"value": "Expense.Expense.BankCharges", "type": "String", "displayName": "Bank Charges", "required": false}, {"value": "Expense.Expense.CharitableContributions", "type": "String", "displayName": "Charitable Contributions", "required": false}, {"value": "Expense.Expense.CommissionsAndFees", "type": "String", "displayName": "Commissions And Fees", "required": false}, {"value": "Expense.Expense.Entertainment", "type": "String", "displayName": "Entertainment", "required": false}, {"value": "Expense.Expense.EntertainmentMeals", "type": "String", "displayName": "Entertainment Meals", "required": false}, {"value": "Expense.Expense.EquipmentRental", "type": "String", "displayName": "Equipment Rental", "required": false}, {"value": "Expense.Expense.FinanceCosts", "type": "String", "displayName": "Finance Costs", "required": false}, {"value": "Expense.Expense.GlobalTaxExpense", "type": "String", "displayName": "Global Tax Expense", "required": false}, {"value": "Expense.Expense.Insurance", "type": "String", "displayName": "Insurance", "required": false}, {"value": "Expense.Expense.InterestPaid", "type": "String", "displayName": "Interest Paid", "required": false}, {"value": "Expense.Expense.LegalProfessionalFees", "type": "String", "displayName": "Legal And Professional Fees", "required": false}, {"value": "Expense.Expense.OfficeExpenses", "type": "String", "displayName": "Office Expenses", "required": false}, {"value": "Expense.Expense.OfficeGeneralAdministrativeExpenses", "type": "String", "displayName": "Office/General Administrative Expenses", "required": false}, {"value": "Expense.Expense.OtherBusinessExpenses", "type": "String", "displayName": "Other Business Expenses", "required": false}, {"value": "Expense.Expense.OtherMiscellaneousServiceCost", "type": "String", "displayName": "Other Miscellaneous Service Cost", "required": false}, {"value": "Expense.Expense.PromotionalMeals", "type": "String", "displayName": "Promotional Meals", "required": false}, {"value": "Expense.Expense.RentOrLeaseOfBuildings", "type": "String", "displayName": "Rent Or Lease Of Buildings", "required": false}, {"value": "Expense.Expense.RepairMaintenance", "type": "String", "displayName": "Repair And Maintenance", "required": false}, {"value": "Expense.Expense.ShippingFreightDelivery", "type": "String", "displayName": "Shipping, Freight And Delivery", "required": false}, {"value": "Expense.Expense.SuppliesMaterials", "type": "String", "displayName": "Supplies And Materials", "required": false}, {"value": "Expense.Expense.Travel", "type": "String", "displayName": "Travel", "required": false}, {"value": "Expense.Expense.TravelMeals", "type": "String", "displayName": "Travel Meals", "required": false}, {"value": "Expense.Expense.Utilities", "type": "String", "displayName": "Utilities", "required": false}, {"value": "Expense.Expense.Auto", "type": "String", "displayName": "Auto", "required": false}, {"value": "Expense.Expense.CostOfLabor", "type": "String", "displayName": "Cost Of Labor", "required": false}, {"value": "Expense.Expense.DuesSubscriptions", "type": "String", "displayName": "Dues And Subscriptions", "required": false}, {"value": "Expense.Expense.PayrollExpenses", "type": "String", "displayName": "Payroll Expenses", "required": false}, {"value": "Expense.Expense.TaxesPaid", "type": "String", "displayName": "Taxes Paid", "required": false}, {"value": "Expense.Expense.UnappliedCashBillPaymentExpense", "type": "String", "displayName": "Unapplied Cash Bill Payment Expense", "required": false}, {"value": "Expense.Expense.Utilities", "type": "String", "displayName": "Utilities", "required": false}, {"value": "Expense.Expense.AmortizationExpense", "type": "String", "displayName": "Amortization Expense", "required": false}, {"value": "Expense.Expense.AppropriationsToDepreciation", "type": "String", "displayName": "Appropriations To Depreciation", "required": false}, {"value": "Expense.Expense.BorrowingCost", "type": "String", "displayName": "Borrowing Cost", "required": false}, {"value": "Expense.Expense.CommissionsAndFees", "type": "String", "displayName": "Commissions And Fees", "required": false}, {"value": "Expense.Expense.DistributionCosts", "type": "String", "displayName": "Distribution Costs", "required": false}, {"value": "Expense.Expense.ExternalServices", "type": "String", "displayName": "External Services", "required": false}, {"value": "Expense.Expense.ExtraordinaryCharges", "type": "String", "displayName": "Extraordinary Charges", "required": false}, {"value": "Expense.Expense.IncomeTaxExpense", "type": "String", "displayName": "Income Tax Expense", "required": false}, {"value": "Expense.Expense.LossOnDiscontinuedOperationsNetOfTax", "type": "String", "displayName": "Loss On Discontinued Operations Net Of Tax", "required": false}, {"value": "Expense.Expense.ManagementCompensation", "type": "String", "displayName": "Management Compensation", "required": false}, {"value": "Expense.Expense.OtherCurrentOperatingCharges", "type": "String", "displayName": "Other Current Operating Charges", "required": false}, {"value": "Expense.Expense.OtherExternalServices", "type": "String", "displayName": "Other External Services", "required": false}, {"value": "Expense.Expense.OtherRentalCosts", "type": "String", "displayName": "Other Rental Costs", "required": false}, {"value": "Expense.Expense.OtherSellingExpenses", "type": "String", "displayName": "Other Selling Expenses", "required": false}, {"value": "Expense.Expense.ProjectStudiesSurveysAssessments", "type": "String", "displayName": "Project Studies Surveys Assessments", "required": false}, {"value": "Expense.Expense.PurchasesRebates", "type": "String", "displayName": "Purchases Rebates", "required": false}, {"value": "Expense.Expense.ShippingAndDeliveryExpense", "type": "String", "displayName": "Shipping And Delivery Expense", "required": false}, {"value": "Expense.Expense.StaffCosts", "type": "String", "displayName": "Staff Costs", "required": false}, {"value": "Expense.Expense.Sundry", "type": "String", "displayName": "Sundry", "required": false}, {"value": "Expense.Expense.TravelExpensesGeneralAndAdminExpenses", "type": "String", "displayName": "Travel Expenses General And Admin Expenses", "required": false}, {"value": "Expense.Expense.TravelExpensesSellingExpense", "type": "String", "displayName": "Travel Expenses Selling Expense", "required": false}, {"value": "Expense.Other Expense.Depreciation", "type": "String", "displayName": "Depreciation", "required": false}, {"value": "Expense.Other Expense.ExchangeGainOrLoss", "type": "String", "displayName": "Exchange Gain Or Loss", "required": false}, {"value": "Expense.Other Expense.OtherMiscellaneousExpense", "type": "String", "displayName": "Other Miscellaneous Expense", "required": false}, {"value": "Expense.Other Expense.PenaltiesSettlements", "type": "String", "displayName": "Penalties And Settlements", "required": false}, {"value": "Expense.Other Expense.Amortization", "type": "String", "displayName": "Amortization", "required": false}, {"value": "Expense.Other Expense.GasAndFuel", "type": "String", "displayName": "Gas And Fuel", "required": false}, {"value": "Expense.Other Expense.HomeOffice", "type": "String", "displayName": "Home Office", "required": false}, {"value": "Expense.Other Expense.HomeOwnerRentalInsurance", "type": "String", "displayName": "Home Owner Rental Insurance", "required": false}, {"value": "Expense.Other Expense.OtherHomeOfficeExpenses", "type": "String", "displayName": "Other Home Office Expenses", "required": false}, {"value": "Expense.Other Expense.MortgageInterest", "type": "String", "displayName": "Mortgage Interest", "required": false}, {"value": "Expense.Other Expense.RentAndLease", "type": "String", "displayName": "Rent And Lease", "required": false}, {"value": "Expense.Other Expense.RepairsAndMaintenance", "type": "String", "displayName": "Repairs And Maintenance", "required": false}, {"value": "Expense.Other Expense.ParkingAndTolls", "type": "String", "displayName": "Parking And Tolls", "required": false}, {"value": "Expense.Other Expense.Vehicle", "type": "String", "displayName": "Vehicle", "required": false}, {"value": "Expense.Other Expense.VehicleInsurance", "type": "String", "displayName": "Vehicle Insurance", "required": false}, {"value": "Expense.Other Expense.VehicleLease", "type": "String", "displayName": "Vehicle Lease", "required": false}, {"value": "Expense.Other Expense.VehicleLoanInterest", "type": "String", "displayName": "Vehicle Loan Interest", "required": false}, {"value": "Expense.Other Expense.VehicleLoan", "type": "String", "displayName": "Vehicle Loan", "required": false}, {"value": "Expense.Other Expense.VehicleRegistration", "type": "String", "displayName": "Vehicle Registration", "required": false}, {"value": "Expense.Other Expense.VehicleRepairs", "type": "String", "displayName": "Vehicle Repairs", "required": false}, {"value": "Expense.Other Expense.OtherVehicleExpenses", "type": "String", "displayName": "Other Vehicle Expenses", "required": false}, {"value": "Expense.Other Expense.Utilities", "type": "String", "displayName": "Utilities", "required": false}, {"value": "Expense.Other Expense.WashAndRoadServices", "type": "String", "displayName": "Wash And Road Services", "required": false}, {"value": "Expense.Other Expense.DeferredTaxExpense", "type": "String", "displayName": "Deferred Tax Expense", "required": false}, {"value": "Expense.Other Expense.Depletion", "type": "String", "displayName": "Depletion", "required": false}, {"value": "Expense.Other Expense.ExceptionalItems", "type": "String", "displayName": "Exceptional Items", "required": false}, {"value": "Expense.Other Expense.ExtraordinaryItems", "type": "String", "displayName": "Extraordinary Items", "required": false}, {"value": "Expense.Other Expense.IncomeTaxOtherExpense", "type": "String", "displayName": "Income Tax Other Expense", "required": false}, {"value": "Expense.Other Expense.MatCredit", "type": "String", "displayName": "Mat Credit", "required": false}, {"value": "Expense.Other Expense.PriorPeriodItems", "type": "String", "displayName": "Prior Period Items", "required": false}, {"value": "Expense.Other Expense.TaxRoundoffGainOrLoss", "type": "String", "displayName": "Tax Roundoff Gain Or Loss", "required": false}, {"value": "Expense.Cost of Goods Sold.EquipmentRentalCos", "type": "String", "displayName": "Equipment Rental - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.OtherCostsOfServiceCos", "type": "String", "displayName": "Other Costs Of Sales - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.ShippingFreightDeliveryCos", "type": "String", "displayName": "Shipping, Freight And Delivery - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.SuppliesMaterialsCogs", "type": "String", "displayName": "Supplies And Materials - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.CostOfLaborCos", "type": "String", "displayName": "Cost Of Labor - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.CostOfSales", "type": "String", "displayName": "Cost Of Sales", "required": false}, {"value": "Expense.Cost of Goods Sold.FreightAndDeliveryCost", "type": "String", "displayName": "Freight And Delivery Cost", "required": false}, {"value": "Income.Income.NonProfitIncome", "type": "String", "displayName": "Non Profit Income", "required": false}, {"value": "Income.Income.OtherPrimaryIncome", "type": "String", "displayName": "Other Primary Income", "required": false}, {"value": "Income.Income.SalesOfProductIncome", "type": "String", "displayName": "Sales Of ProductIncome", "required": false}, {"value": "Income.Income.ServiceFeeIncome", "type": "String", "displayName": "Service Fee Income", "required": false}, {"value": "Income.Income.DiscountsRefundsGiven", "type": "String", "displayName": "Discounts Refunds Given", "required": false}, {"value": "Income.Income.UnappliedCashPaymentIncome", "type": "String", "displayName": "Unapplied Cash Payment Income", "required": false}, {"value": "Income.Income.CashReceiptIncome", "type": "String", "displayName": "Cash Receipt Income", "required": false}, {"value": "Income.Income.OperatingGrants", "type": "String", "displayName": "Operating Grants", "required": false}, {"value": "Income.Income.OtherCurrentOperatingIncome", "type": "String", "displayName": "Other Current Operating Income", "required": false}, {"value": "Income.Income.OwnWorkCapitalized", "type": "String", "displayName": "Own Work Capitalized", "required": false}, {"value": "Income.Income.RevenueGeneral", "type": "String", "displayName": "Revenue General", "required": false}, {"value": "Income.Income.SalesRetail", "type": "String", "displayName": "Sales Retail", "required": false}, {"value": "Income.Income.SalesWholesale", "type": "String", "displayName": "Sales Wholesale", "required": false}, {"value": "Income.Income.SavingsByTaxScheme", "type": "String", "displayName": "Savings By Tax Scheme", "required": false}, {"value": "Income.Other Income.DividendIncome", "type": "String", "displayName": "Dividend Income", "required": false}, {"value": "Income.Other Income.InterestEarned", "type": "String", "displayName": "Interest Earned", "required": false}, {"value": "Income.Other Income.OtherInvestmentIncome", "type": "String", "displayName": "Other Investment Income", "required": false}, {"value": "Income.Other Income.OtherMiscellaneousIncome", "type": "String", "displayName": "Other Miscellaneous Income", "required": false}, {"value": "Income.Other Income.TaxExemptInterest", "type": "String", "displayName": "Tax Exempt Interest", "required": false}, {"value": "Income.Other Income.GainLossOnSaleOfFixedAssets", "type": "String", "displayName": "Gain Loss On Sale Of Fixed Assets", "required": false}, {"value": "Income.Other Income.GainLossOnSaleOfInvestments", "type": "String", "displayName": "Gain Loss On Sale Of Investments", "required": false}, {"value": "Income.Other Income.LossOnDisposalOfAssets", "type": "String", "displayName": "Loss On Disposal Of Assets", "required": false}, {"value": "Income.Other Income.OtherOperatingIncome", "type": "String", "displayName": "Other Operating Income", "required": false}, {"value": "Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax", "type": "String", "displayName": "Unrealised Loss On Securities Net Of Tax", "required": false}, {"value": "Liability.Accounts Payable.AccountsPayable", "type": "String", "displayName": "Accounts Payable", "required": false}, {"value": "Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise", "type": "String", "displayName": "Outstanding Dues Micro Small Enterprise", "required": false}, {"value": "Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise", "type": "String", "displayName": "Outstanding Dues Other Than Micro Small Enterprise", "required": false}, {"value": "Liability.Credit Card.CreditCard", "type": "String", "displayName": "Credit Card", "required": false}, {"value": "Liability.Long Term Liability.NotesPayable", "type": "String", "displayName": "Notes Payable", "required": false}, {"value": "Liability.Long Term Liability.OtherLongTermLiabilities", "type": "String", "displayName": "Other Long Term Liabilities", "required": false}, {"value": "Liability.Long Term Liability.ShareholderNotesPayable", "type": "String", "displayName": "Shareholder Notes Payable", "required": false}, {"value": "Liability.Long Term Liability.AccrualsAndDeferredIncome", "type": "String", "displayName": "Accruals And Deferred Income", "required": false}, {"value": "Liability.Long Term Liability.AccruedLongLermLiabilities", "type": "String", "displayName": "Accrued Long Lerm Liabilities", "required": false}, {"value": "Liability.Long Term Liability.AccruedVacationPayable", "type": "String", "displayName": "Accrued Vacation Payable", "required": false}, {"value": "Liability.Long Term Liability.BankLoans", "type": "String", "displayName": "Bank Loans", "required": false}, {"value": "Liability.Long Term Liability.DebtsRelatedToParticipatingInterests", "type": "String", "displayName": "Debts Related To Participating Interests", "required": false}, {"value": "Liability.Long Term Liability.DeferredTaxLiabilities", "type": "String", "displayName": "Deferred Tax Liabilities", "required": false}, {"value": "Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities", "type": "String", "displayName": "Government And Other Public Authorities", "required": false}, {"value": "Liability.Long Term Liability.GroupAndAssociates", "type": "String", "displayName": "Group And Associates", "required": false}, {"value": "Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale", "type": "String", "displayName": "Liabilities Related To Assets Held For Sale", "required": false}, {"value": "Liability.Long Term Liability.LongTermBorrowings", "type": "String", "displayName": "Long Term Borrowings", "required": false}, {"value": "Liability.Long Term Liability.LongTermDebit", "type": "String", "displayName": "Long Term Debit", "required": false}, {"value": "Liability.Long Term Liability.LongTermEmployeeBenefitObligations", "type": "String", "displayName": "Long Term Employee Benefit Obligations", "required": false}, {"value": "Liability.Long Term Liability.ObligationsUnderFinanceLeases", "type": "String", "displayName": "Obligations Under Finance Leases", "required": false}, {"value": "Liability.Long Term Liability.OtherLongTermProvisions", "type": "String", "displayName": "Other Long Term Provisions", "required": false}, {"value": "Liability.Long Term Liability.ProvisionForLiabilities", "type": "String", "displayName": "Provision For Liabilities", "required": false}, {"value": "Liability.Long Term Liability.ProvisionsNonCurrentLiabilities", "type": "String", "displayName": "Provisions Non Current Liabilities", "required": false}, {"value": "Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts", "type": "String", "displayName": "Staff And Related Long Term Liability Accounts", "required": false}, {"value": "Liability.Other Current Liability.DirectDepositPayable", "type": "String", "displayName": "Direct Deposit Payable", "required": false}, {"value": "Liability.Other Current Liability.LineOfCredit", "type": "String", "displayName": "Line Of Credit", "required": false}, {"value": "Liability.Other Current Liability.LoanPayable", "type": "String", "displayName": "Loan Payable", "required": false}, {"value": "Liability.Other Current Liability.GlobalTaxPayable", "type": "String", "displayName": "Global Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.GlobalTaxSuspense", "type": "String", "displayName": "Global Tax Suspense", "required": false}, {"value": "Liability.Other Current Liability.OtherCurrentLiabilities", "type": "String", "displayName": "Other Current Liabilities", "required": false}, {"value": "Liability.Other Current Liability.PayrollClearing", "type": "String", "displayName": "Payroll Clearing", "required": false}, {"value": "Liability.Other Current Liability.PayrollTaxPayable", "type": "String", "displayName": "Payroll Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.PrepaidExpensesPayable", "type": "String", "displayName": "Prepaid Expenses Payable", "required": false}, {"value": "Liability.Other Current Liability.RentsInTrustLiability", "type": "String", "displayName": "Rents In Trust Liability", "required": false}, {"value": "Liability.Other Current Liability.TrustAccountsLiabilities", "type": "String", "displayName": "Trust Accounts Liabilities", "required": false}, {"value": "Liability.Other Current Liability.FederalIncomeTaxPayable", "type": "String", "displayName": "Federal Income Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.InsurancePayable", "type": "String", "displayName": "Insurance Payable", "required": false}, {"value": "Liability.Other Current Liability.SalesTaxPayable", "type": "String", "displayName": "Sales Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.StateLocalIncomeTaxPayable", "type": "String", "displayName": "State Local Income Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.AccruedLiabilities", "type": "String", "displayName": "Accrued Liabilities", "required": false}, {"value": "Liability.Other Current Liability.CurrentLiabilities", "type": "String", "displayName": "Current Liabilities", "required": false}, {"value": "Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations", "type": "String", "displayName": "Current Portion EmployeeBenefits Obligations", "required": false}, {"value": "Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases", "type": "String", "displayName": "Current Portion Of Obligations Under Finance Leases", "required": false}, {"value": "Liability.Other Current Liability.CurrentTaxLiability", "type": "String", "displayName": "Current Tax Liability", "required": false}, {"value": "Liability.Other Current Liability.DividendsPayable", "type": "String", "displayName": "Dividends Payable", "required": false}, {"value": "Liability.Other Current Liability.DutiesAndTaxes", "type": "String", "displayName": "Duties And Taxes", "required": false}, {"value": "Liability.Other Current Liability.InterestPayables", "type": "String", "displayName": "Interest Payables", "required": false}, {"value": "Liability.Other Current Liability.ProvisionForWarrantyObligations", "type": "String", "displayName": "Provision For Warranty Obligations", "required": false}, {"value": "Liability.Other Current Liability.ProvisionsCurrentLiabilities", "type": "String", "displayName": "Provisions Current Liabilities", "required": false}, {"value": "Liability.Other Current Liability.ShortTermBorrowings", "type": "String", "displayName": "Short Term Borrowings", "required": false}, {"value": "Liability.Other Current Liability.SocialSecurityAgencies", "type": "String", "displayName": "Social Security Agencies", "required": false}, {"value": "Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts", "type": "String", "displayName": "Staff And Related Liability Accounts", "required": false}, {"value": "Liability.Other Current Liability.SundryDebtorsAndCreditors", "type": "String", "displayName": "Sundry Debtors And Creditors", "required": false}, {"value": "Liability.Other Current Liability.TradeAndOtherPayables", "type": "String", "displayName": "Trade And Other Payables", "required": false}, {"value": "Equity.Equity.OpeningBalanceEquity", "type": "String", "displayName": "Opening Balance Equity", "required": false}, {"value": "Equity.Equity.PartnersEquity", "type": "String", "displayName": "Partners Equity", "required": false}, {"value": "Equity.Equity.RetainedEarnings", "type": "String", "displayName": "Retained Earnings", "required": false}, {"value": "Equity.Equity.AccumulatedAdjustment", "type": "String", "displayName": "Accumulated Adjustment", "required": false}, {"value": "Equity.Equity.OwnersEquity", "type": "String", "displayName": "Owners Equity", "required": false}, {"value": "Equity.Equity.PaidInCapitalOrSurplus", "type": "String", "displayName": "Paid In Capital Or Surplus", "required": false}, {"value": "Equity.Equity.PartnerContributions", "type": "String", "displayName": "Partner Contributions", "required": false}, {"value": "Equity.Equity.PartnerDistributions", "type": "String", "displayName": "Partner Distributions", "required": false}, {"value": "Equity.Equity.PreferredStock", "type": "String", "displayName": "Preferred Stock", "required": false}, {"value": "Equity.Equity.CommonStock", "type": "String", "displayName": "Common Stock", "required": false}, {"value": "Equity.Equity.TreasuryStock", "type": "String", "displayName": "Treasury Stock", "required": false}, {"value": "Equity.Equity.EstimatedTaxes", "type": "String", "displayName": "Estimated Taxes", "required": false}, {"value": "Equity.Equity.Healthcare", "type": "String", "displayName": "Healthcare", "required": false}, {"value": "Equity.Equity.PersonalIncome", "type": "String", "displayName": "Personal Income", "required": false}, {"value": "Equity.Equity.PersonalExpense", "type": "String", "displayName": "Personal Expense", "required": false}, {"value": "Equity.Equity.AccumulatedOtherComprehensiveIncome", "type": "String", "displayName": "Accumulated Other Comprehensive Income", "required": false}, {"value": "Equity.Equity.CalledUpShareCapital", "type": "String", "displayName": "Called Up Share Capital", "required": false}, {"value": "Equity.Equity.CapitalReserves", "type": "String", "displayName": "Capital Reserves", "required": false}, {"value": "Equity.Equity.DividendDisbursed", "type": "String", "displayName": "Dividend Disbursed", "required": false}, {"value": "Equity.Equity.EquityInEarningsOfSubsiduaries", "type": "String", "displayName": "Equity In Earnings Of Subsiduaries", "required": false}, {"value": "Equity.Equity.InvestmentGrants", "type": "String", "displayName": "Investment Grants", "required": false}, {"value": "Equity.Equity.MoneyReceivedAgainstShareWarrants", "type": "String", "displayName": "Money Received Against Share Warrants", "required": false}, {"value": "Equity.Equity.OtherFreeReserves", "type": "String", "displayName": "Other Free Reserves", "required": false}, {"value": "Equity.Equity.ShareApplicationMoneyPendingAllotment", "type": "String", "displayName": "Share Application Money Pending Allotment", "required": false}, {"value": "Equity.Equity.ShareCapital", "type": "String", "displayName": "Share Capital", "required": false}, {"value": "Equity.Equity.Funds", "type": "String", "displayName": "Funds", "required": false}]}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": false, "validation": {"warnings": [], "information": [{"field": "NominalCode", "details": "If included must have a length between 1 and 7 characters"}]}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true, "validation": {"warnings": [{"field": "Name", "details": "Must have a length between 1 and 100 characters"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the account", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "When not specified company base currency will be used"}]}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "Asset.Bank.CashOnHand", "type": "String", "displayName": "Cash On Hand", "required": false}, {"value": "Asset.Bank.Checking", "type": "String", "displayName": "Checking", "required": false}, {"value": "Asset.Bank.MoneyMarket", "type": "String", "displayName": "Money Market", "required": false}, {"value": "Asset.Bank.RentsHeldInTrust", "type": "String", "displayName": "Rents Held In Trust", "required": false}, {"value": "Asset.Bank.Savings", "type": "String", "displayName": "Savings", "required": false}, {"value": "Asset.Bank.TrustAccounts", "type": "String", "displayName": "Trust Accounts", "required": false}, {"value": "Asset.Bank.CashAndCashEquivalents", "type": "String", "displayName": "Cash And Cash Equivalents", "required": false}, {"value": "Asset.Bank.OtherEarmarkedBankAccounts", "type": "String", "displayName": "Other Earmarked Bank Accounts", "required": false}, {"value": "Asset.Other Current Asset.AllowanceForBadDebts", "type": "String", "displayName": "Allowance For Bad Debts", "required": false}, {"value": "Asset.Other Current Asset.DevelopmentCosts", "type": "String", "displayName": "Development Costs", "required": false}, {"value": "Asset.Other Current Asset.EmployeeCashAdvances", "type": "String", "displayName": "Employee Cash Advances", "required": false}, {"value": "Asset.Other Current Asset.OtherCurrentAssets", "type": "String", "displayName": "Other Current Assets", "required": false}, {"value": "Asset.Other Current Asset.Inventory", "type": "String", "displayName": "Inventory", "required": false}, {"value": "Asset.Other Current Asset.Investment_MortgageRealEstateLoans", "type": "String", "displayName": "Investment Mortgage Real Estate Loans", "required": false}, {"value": "Asset.Other Current Asset.Investment_Other", "type": "String", "displayName": "Investment Other", "required": false}, {"value": "Asset.Other Current Asset.Investment_TaxExemptSecurities", "type": "String", "displayName": "Investment Tax Exempt Securities", "required": false}, {"value": "Asset.Other Current Asset.Investment_USGovernmentObligations", "type": "String", "displayName": "Investment US Government Obligations", "required": false}, {"value": "Asset.Other Current Asset.LoansToOfficers", "type": "String", "displayName": "Loans To Officers", "required": false}, {"value": "Asset.Other Current Asset.LoansToOthers", "type": "String", "displayName": "Loans To Others", "required": false}, {"value": "Asset.Other Current Asset.LoansToStockholders", "type": "String", "displayName": "Loans To Stockholders", "required": false}, {"value": "Asset.Other Current Asset.PrepaidExpenses", "type": "String", "displayName": "Prepaid Expenses", "required": false}, {"value": "Asset.Other Current Asset.Retainage", "type": "String", "displayName": "Retainage", "required": false}, {"value": "Asset.Other Current Asset.UndepositedFunds", "type": "String", "displayName": "Undeposited Funds", "required": false}, {"value": "Asset.Other Current Asset.AssetsAvailableForSale", "type": "String", "displayName": "Assets Available For Sale", "required": false}, {"value": "Asset.Other Current Asset.BalWithGovtAuthorities", "type": "String", "displayName": "Balance With Govt Authorities", "required": false}, {"value": "Asset.Other Current Asset.CalledUpShareCapitalNotPaid", "type": "String", "displayName": "Called Up Share Capital Not Paid", "required": false}, {"value": "Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit", "type": "String", "displayName": "Expenditure Authorisations And Letters Of Credit", "required": false}, {"value": "Asset.Other Current Asset.GlobalTaxDeferred", "type": "String", "displayName": "Global Tax Deferred", "required": false}, {"value": "Asset.Other Current Asset.GlobalTaxRefund", "type": "String", "displayName": "Global Tax Refund", "required": false}, {"value": "Asset.Other Current Asset.InternalTransfers", "type": "String", "displayName": "Internal Transfers", "required": false}, {"value": "Asset.Other Current Asset.OtherConsumables", "type": "String", "displayName": "Other Consumables", "required": false}, {"value": "Asset.Other Current Asset.ProvisionsCurrentAssets", "type": "String", "displayName": "Provisions Current Assets", "required": false}, {"value": "Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties", "type": "String", "displayName": "Short Term Investments In Related Parties", "required": false}, {"value": "Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties", "type": "String", "displayName": "Short Term Loans And Advances To Related Parties", "required": false}, {"value": "Asset.Other Current Asset.TradeAndOtherReceivables", "type": "String", "displayName": "Trade And Other Receivables", "required": false}, {"value": "Asset.Fixed Asset.AccumulatedDepletion", "type": "String", "displayName": "Accumulated Depletion", "required": false}, {"value": "Asset.Fixed Asset.AccumulatedDepreciation", "type": "String", "displayName": "Accumulated Depreciation", "required": false}, {"value": "Asset.Fixed Asset.DepletableAssets", "type": "String", "displayName": "Depletable Assets", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetComputers", "type": "String", "displayName": "Fixed Asset Computers", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetCopiers", "type": "String", "displayName": "Fixed Asset Copiers", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetFurniture", "type": "String", "displayName": "Fixed Asset Furniture", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetPhone", "type": "String", "displayName": "Fixed Asset Phone", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetPhotoVideo", "type": "String", "displayName": "Fixed Asset Photo Video", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetSoftware", "type": "String", "displayName": "Fixed Asset Software", "required": false}, {"value": "Asset.Fixed Asset.FixedAssetOtherToolsEquipment", "type": "String", "displayName": "Fixed Asset Other Tools Equipment", "required": false}, {"value": "Asset.Fixed Asset.FurnitureAndFixtures", "type": "String", "displayName": "Furniture And Fixtures", "required": false}, {"value": "Asset.Fixed Asset.Land", "type": "String", "displayName": "Land", "required": false}, {"value": "Asset.Fixed Asset.LeaseholdImprovements", "type": "String", "displayName": "Leasehold Improvements", "required": false}, {"value": "Asset.Fixed Asset.OtherFixedAssets", "type": "String", "displayName": "Other Fixed Assets", "required": false}, {"value": "Asset.Fixed Asset.AccumulatedAmortization", "type": "String", "displayName": "Accumulated Amortization", "required": false}, {"value": "Asset.Fixed Asset.Buildings", "type": "String", "displayName": "Buildings", "required": false}, {"value": "Asset.Fixed Asset.IntangibleAssets", "type": "String", "displayName": "Intangible Assets", "required": false}, {"value": "Asset.Fixed Asset.MachineryAndEquipment", "type": "String", "displayName": "Machinery And Equipment", "required": false}, {"value": "Asset.Fixed Asset.Vehicles", "type": "String", "displayName": "Vehicles", "required": false}, {"value": "Asset.Fixed Asset.AssetsInCourseOfConstruction", "type": "String", "displayName": "Assets In Course Of Construction", "required": false}, {"value": "Asset.Fixed Asset.CapitalWip", "type": "String", "displayName": "Capital Wip", "required": false}, {"value": "Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets", "type": "String", "displayName": "Cumulative Depreciation On Intangible Assets", "required": false}, {"value": "Asset.Fixed Asset.IntangibleAssetsUnderDevelopment", "type": "String", "displayName": "Intangible Assets Under Development", "required": false}, {"value": "Asset.Fixed Asset.LandAsset", "type": "String", "displayName": "Land Asset", "required": false}, {"value": "Asset.Fixed Asset.NonCurrentAssets", "type": "String", "displayName": "Non Current Assets", "required": false}, {"value": "Asset.Fixed Asset.ParticipatingInterests", "type": "String", "displayName": "Participating Interests", "required": false}, {"value": "Asset.Fixed Asset.ProvisionsFixedAssets", "type": "String", "displayName": "Provisions Fixed Assets", "required": false}, {"value": "Asset.Other Asset.LeaseBuyout", "type": "String", "displayName": "Lease Buyout", "required": false}, {"value": "Asset.Other Asset.OtherLongTermAssets", "type": "String", "displayName": "Other Long Term Assets", "required": false}, {"value": "Asset.Other Asset.SecurityDeposits", "type": "String", "displayName": "Security Deposits", "required": false}, {"value": "Asset.Other Asset.AccumulatedAmortizationOfOtherAssets", "type": "String", "displayName": "Accumulated Amortization Of Other Assets", "required": false}, {"value": "Asset.Other Asset.Goodwill", "type": "String", "displayName": "Goodwill", "required": false}, {"value": "Asset.Other Asset.Licenses", "type": "String", "displayName": "Licenses", "required": false}, {"value": "Asset.Other Asset.OrganizationalCosts", "type": "String", "displayName": "Organizational Costs", "required": false}, {"value": "Asset.Other Asset.AssetsHeldForSale", "type": "String", "displayName": "Assets Held For Sale", "required": false}, {"value": "Asset.Other Asset.AvailableForSaleFinancialAssets", "type": "String", "displayName": "Available For Sale Financial Assets", "required": false}, {"value": "Asset.Other Asset.DeferredTax", "type": "String", "displayName": "Deferred Tax", "required": false}, {"value": "Asset.Other Asset.Investments", "type": "String", "displayName": "Investments", "required": false}, {"value": "Asset.Other Asset.LongTermInvestments", "type": "String", "displayName": "Long Term Investments", "required": false}, {"value": "Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties", "type": "String", "displayName": "Long Term Loans And Advances To Related Parties", "required": false}, {"value": "Asset.Other Asset.OtherIntangibleAssets", "type": "String", "displayName": "Other Intangible Assets", "required": false}, {"value": "Asset.Other Asset.OtherLongTermInvestments", "type": "String", "displayName": "Other Long Term Investments", "required": false}, {"value": "Asset.Other Asset.OtherLongTermLoansAndAdvances", "type": "String", "displayName": "Other Long Term Loans And Advances", "required": false}, {"value": "Asset.Other Asset.PrepaymentsAndAccruedIncome", "type": "String", "displayName": "Prepayments And Accrued Income", "required": false}, {"value": "Asset.Other Asset.ProvisionsNonCurrentAssets", "type": "String", "displayName": "Provisions Non-Current Assets", "required": false}, {"value": "Asset.Accounts Receivable.AccountsReceivable", "type": "String", "displayName": "Accounts Receivable", "required": false}, {"value": "Expense.Expense.AdvertisingPromotional", "type": "String", "displayName": "Advertising/Promotional", "required": false}, {"value": "Expense.Expense.BadDebts", "type": "String", "displayName": "Bad Debts", "required": false}, {"value": "Expense.Expense.BankCharges", "type": "String", "displayName": "Bank Charges", "required": false}, {"value": "Expense.Expense.CharitableContributions", "type": "String", "displayName": "Charitable Contributions", "required": false}, {"value": "Expense.Expense.CommissionsAndFees", "type": "String", "displayName": "Commissions And Fees", "required": false}, {"value": "Expense.Expense.Entertainment", "type": "String", "displayName": "Entertainment", "required": false}, {"value": "Expense.Expense.EntertainmentMeals", "type": "String", "displayName": "Entertainment Meals", "required": false}, {"value": "Expense.Expense.EquipmentRental", "type": "String", "displayName": "Equipment Rental", "required": false}, {"value": "Expense.Expense.FinanceCosts", "type": "String", "displayName": "Finance Costs", "required": false}, {"value": "Expense.Expense.GlobalTaxExpense", "type": "String", "displayName": "Global Tax Expense", "required": false}, {"value": "Expense.Expense.Insurance", "type": "String", "displayName": "Insurance", "required": false}, {"value": "Expense.Expense.InterestPaid", "type": "String", "displayName": "Interest Paid", "required": false}, {"value": "Expense.Expense.LegalProfessionalFees", "type": "String", "displayName": "Legal And Professional Fees", "required": false}, {"value": "Expense.Expense.OfficeExpenses", "type": "String", "displayName": "Office Expenses", "required": false}, {"value": "Expense.Expense.OfficeGeneralAdministrativeExpenses", "type": "String", "displayName": "Office/General Administrative Expenses", "required": false}, {"value": "Expense.Expense.OtherBusinessExpenses", "type": "String", "displayName": "Other Business Expenses", "required": false}, {"value": "Expense.Expense.OtherMiscellaneousServiceCost", "type": "String", "displayName": "Other Miscellaneous Service Cost", "required": false}, {"value": "Expense.Expense.PromotionalMeals", "type": "String", "displayName": "Promotional Meals", "required": false}, {"value": "Expense.Expense.RentOrLeaseOfBuildings", "type": "String", "displayName": "Rent Or Lease Of Buildings", "required": false}, {"value": "Expense.Expense.RepairMaintenance", "type": "String", "displayName": "Repair And Maintenance", "required": false}, {"value": "Expense.Expense.ShippingFreightDelivery", "type": "String", "displayName": "Shipping, Freight And Delivery", "required": false}, {"value": "Expense.Expense.SuppliesMaterials", "type": "String", "displayName": "Supplies And Materials", "required": false}, {"value": "Expense.Expense.Travel", "type": "String", "displayName": "Travel", "required": false}, {"value": "Expense.Expense.TravelMeals", "type": "String", "displayName": "Travel Meals", "required": false}, {"value": "Expense.Expense.Utilities", "type": "String", "displayName": "Utilities", "required": false}, {"value": "Expense.Expense.Auto", "type": "String", "displayName": "Auto", "required": false}, {"value": "Expense.Expense.CostOfLabor", "type": "String", "displayName": "Cost Of Labor", "required": false}, {"value": "Expense.Expense.DuesSubscriptions", "type": "String", "displayName": "Dues And Subscriptions", "required": false}, {"value": "Expense.Expense.PayrollExpenses", "type": "String", "displayName": "Payroll Expenses", "required": false}, {"value": "Expense.Expense.TaxesPaid", "type": "String", "displayName": "Taxes Paid", "required": false}, {"value": "Expense.Expense.UnappliedCashBillPaymentExpense", "type": "String", "displayName": "Unapplied Cash Bill Payment Expense", "required": false}, {"value": "Expense.Expense.Utilities", "type": "String", "displayName": "Utilities", "required": false}, {"value": "Expense.Expense.AmortizationExpense", "type": "String", "displayName": "Amortization Expense", "required": false}, {"value": "Expense.Expense.AppropriationsToDepreciation", "type": "String", "displayName": "Appropriations To Depreciation", "required": false}, {"value": "Expense.Expense.BorrowingCost", "type": "String", "displayName": "Borrowing Cost", "required": false}, {"value": "Expense.Expense.CommissionsAndFees", "type": "String", "displayName": "Commissions And Fees", "required": false}, {"value": "Expense.Expense.DistributionCosts", "type": "String", "displayName": "Distribution Costs", "required": false}, {"value": "Expense.Expense.ExternalServices", "type": "String", "displayName": "External Services", "required": false}, {"value": "Expense.Expense.ExtraordinaryCharges", "type": "String", "displayName": "Extraordinary Charges", "required": false}, {"value": "Expense.Expense.IncomeTaxExpense", "type": "String", "displayName": "Income Tax Expense", "required": false}, {"value": "Expense.Expense.LossOnDiscontinuedOperationsNetOfTax", "type": "String", "displayName": "Loss On Discontinued Operations Net Of Tax", "required": false}, {"value": "Expense.Expense.ManagementCompensation", "type": "String", "displayName": "Management Compensation", "required": false}, {"value": "Expense.Expense.OtherCurrentOperatingCharges", "type": "String", "displayName": "Other Current Operating Charges", "required": false}, {"value": "Expense.Expense.OtherExternalServices", "type": "String", "displayName": "Other External Services", "required": false}, {"value": "Expense.Expense.OtherRentalCosts", "type": "String", "displayName": "Other Rental Costs", "required": false}, {"value": "Expense.Expense.OtherSellingExpenses", "type": "String", "displayName": "Other Selling Expenses", "required": false}, {"value": "Expense.Expense.ProjectStudiesSurveysAssessments", "type": "String", "displayName": "Project Studies Surveys Assessments", "required": false}, {"value": "Expense.Expense.PurchasesRebates", "type": "String", "displayName": "Purchases Rebates", "required": false}, {"value": "Expense.Expense.ShippingAndDeliveryExpense", "type": "String", "displayName": "Shipping And Delivery Expense", "required": false}, {"value": "Expense.Expense.StaffCosts", "type": "String", "displayName": "Staff Costs", "required": false}, {"value": "Expense.Expense.Sundry", "type": "String", "displayName": "Sundry", "required": false}, {"value": "Expense.Expense.TravelExpensesGeneralAndAdminExpenses", "type": "String", "displayName": "Travel Expenses General And Admin Expenses", "required": false}, {"value": "Expense.Expense.TravelExpensesSellingExpense", "type": "String", "displayName": "Travel Expenses Selling Expense", "required": false}, {"value": "Expense.Other Expense.Depreciation", "type": "String", "displayName": "Depreciation", "required": false}, {"value": "Expense.Other Expense.ExchangeGainOrLoss", "type": "String", "displayName": "Exchange Gain Or Loss", "required": false}, {"value": "Expense.Other Expense.OtherMiscellaneousExpense", "type": "String", "displayName": "Other Miscellaneous Expense", "required": false}, {"value": "Expense.Other Expense.PenaltiesSettlements", "type": "String", "displayName": "Penalties And Settlements", "required": false}, {"value": "Expense.Other Expense.Amortization", "type": "String", "displayName": "Amortization", "required": false}, {"value": "Expense.Other Expense.GasAndFuel", "type": "String", "displayName": "Gas And Fuel", "required": false}, {"value": "Expense.Other Expense.HomeOffice", "type": "String", "displayName": "Home Office", "required": false}, {"value": "Expense.Other Expense.HomeOwnerRentalInsurance", "type": "String", "displayName": "Home Owner Rental Insurance", "required": false}, {"value": "Expense.Other Expense.OtherHomeOfficeExpenses", "type": "String", "displayName": "Other Home Office Expenses", "required": false}, {"value": "Expense.Other Expense.MortgageInterest", "type": "String", "displayName": "Mortgage Interest", "required": false}, {"value": "Expense.Other Expense.RentAndLease", "type": "String", "displayName": "Rent And Lease", "required": false}, {"value": "Expense.Other Expense.RepairsAndMaintenance", "type": "String", "displayName": "Repairs And Maintenance", "required": false}, {"value": "Expense.Other Expense.ParkingAndTolls", "type": "String", "displayName": "Parking And Tolls", "required": false}, {"value": "Expense.Other Expense.Vehicle", "type": "String", "displayName": "Vehicle", "required": false}, {"value": "Expense.Other Expense.VehicleInsurance", "type": "String", "displayName": "Vehicle Insurance", "required": false}, {"value": "Expense.Other Expense.VehicleLease", "type": "String", "displayName": "Vehicle Lease", "required": false}, {"value": "Expense.Other Expense.VehicleLoanInterest", "type": "String", "displayName": "Vehicle Loan Interest", "required": false}, {"value": "Expense.Other Expense.VehicleLoan", "type": "String", "displayName": "Vehicle Loan", "required": false}, {"value": "Expense.Other Expense.VehicleRegistration", "type": "String", "displayName": "Vehicle Registration", "required": false}, {"value": "Expense.Other Expense.VehicleRepairs", "type": "String", "displayName": "Vehicle Repairs", "required": false}, {"value": "Expense.Other Expense.OtherVehicleExpenses", "type": "String", "displayName": "Other Vehicle Expenses", "required": false}, {"value": "Expense.Other Expense.Utilities", "type": "String", "displayName": "Utilities", "required": false}, {"value": "Expense.Other Expense.WashAndRoadServices", "type": "String", "displayName": "Wash And Road Services", "required": false}, {"value": "Expense.Other Expense.DeferredTaxExpense", "type": "String", "displayName": "Deferred Tax Expense", "required": false}, {"value": "Expense.Other Expense.Depletion", "type": "String", "displayName": "Depletion", "required": false}, {"value": "Expense.Other Expense.ExceptionalItems", "type": "String", "displayName": "Exceptional Items", "required": false}, {"value": "Expense.Other Expense.ExtraordinaryItems", "type": "String", "displayName": "Extraordinary Items", "required": false}, {"value": "Expense.Other Expense.IncomeTaxOtherExpense", "type": "String", "displayName": "Income Tax Other Expense", "required": false}, {"value": "Expense.Other Expense.MatCredit", "type": "String", "displayName": "Mat Credit", "required": false}, {"value": "Expense.Other Expense.PriorPeriodItems", "type": "String", "displayName": "Prior Period Items", "required": false}, {"value": "Expense.Other Expense.TaxRoundoffGainOrLoss", "type": "String", "displayName": "Tax Roundoff Gain Or Loss", "required": false}, {"value": "Expense.Cost of Goods Sold.EquipmentRentalCos", "type": "String", "displayName": "Equipment Rental - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.OtherCostsOfServiceCos", "type": "String", "displayName": "Other Costs Of Sales - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.ShippingFreightDeliveryCos", "type": "String", "displayName": "Shipping, Freight And Delivery - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.SuppliesMaterialsCogs", "type": "String", "displayName": "Supplies And Materials - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.CostOfLaborCos", "type": "String", "displayName": "Cost Of Labor - COS", "required": false}, {"value": "Expense.Cost of Goods Sold.CostOfSales", "type": "String", "displayName": "Cost Of Sales", "required": false}, {"value": "Expense.Cost of Goods Sold.FreightAndDeliveryCost", "type": "String", "displayName": "Freight And Delivery Cost", "required": false}, {"value": "Income.Income.NonProfitIncome", "type": "String", "displayName": "Non Profit Income", "required": false}, {"value": "Income.Income.OtherPrimaryIncome", "type": "String", "displayName": "Other Primary Income", "required": false}, {"value": "Income.Income.SalesOfProductIncome", "type": "String", "displayName": "Sales Of ProductIncome", "required": false}, {"value": "Income.Income.ServiceFeeIncome", "type": "String", "displayName": "Service Fee Income", "required": false}, {"value": "Income.Income.DiscountsRefundsGiven", "type": "String", "displayName": "Discounts Refunds Given", "required": false}, {"value": "Income.Income.UnappliedCashPaymentIncome", "type": "String", "displayName": "Unapplied Cash Payment Income", "required": false}, {"value": "Income.Income.CashReceiptIncome", "type": "String", "displayName": "Cash Receipt Income", "required": false}, {"value": "Income.Income.OperatingGrants", "type": "String", "displayName": "Operating Grants", "required": false}, {"value": "Income.Income.OtherCurrentOperatingIncome", "type": "String", "displayName": "Other Current Operating Income", "required": false}, {"value": "Income.Income.OwnWorkCapitalized", "type": "String", "displayName": "Own Work Capitalized", "required": false}, {"value": "Income.Income.RevenueGeneral", "type": "String", "displayName": "Revenue General", "required": false}, {"value": "Income.Income.SalesRetail", "type": "String", "displayName": "Sales Retail", "required": false}, {"value": "Income.Income.SalesWholesale", "type": "String", "displayName": "Sales Wholesale", "required": false}, {"value": "Income.Income.SavingsByTaxScheme", "type": "String", "displayName": "Savings By Tax Scheme", "required": false}, {"value": "Income.Other Income.DividendIncome", "type": "String", "displayName": "Dividend Income", "required": false}, {"value": "Income.Other Income.InterestEarned", "type": "String", "displayName": "Interest Earned", "required": false}, {"value": "Income.Other Income.OtherInvestmentIncome", "type": "String", "displayName": "Other Investment Income", "required": false}, {"value": "Income.Other Income.OtherMiscellaneousIncome", "type": "String", "displayName": "Other Miscellaneous Income", "required": false}, {"value": "Income.Other Income.TaxExemptInterest", "type": "String", "displayName": "Tax Exempt Interest", "required": false}, {"value": "Income.Other Income.GainLossOnSaleOfFixedAssets", "type": "String", "displayName": "Gain Loss On Sale Of Fixed Assets", "required": false}, {"value": "Income.Other Income.GainLossOnSaleOfInvestments", "type": "String", "displayName": "Gain Loss On Sale Of Investments", "required": false}, {"value": "Income.Other Income.LossOnDisposalOfAssets", "type": "String", "displayName": "Loss On Disposal Of Assets", "required": false}, {"value": "Income.Other Income.OtherOperatingIncome", "type": "String", "displayName": "Other Operating Income", "required": false}, {"value": "Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax", "type": "String", "displayName": "Unrealised Loss On Securities Net Of Tax", "required": false}, {"value": "Liability.Accounts Payable.AccountsPayable", "type": "String", "displayName": "Accounts Payable", "required": false}, {"value": "Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise", "type": "String", "displayName": "Outstanding Dues Micro Small Enterprise", "required": false}, {"value": "Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise", "type": "String", "displayName": "Outstanding Dues Other Than Micro Small Enterprise", "required": false}, {"value": "Liability.Credit Card.CreditCard", "type": "String", "displayName": "Credit Card", "required": false}, {"value": "Liability.Long Term Liability.NotesPayable", "type": "String", "displayName": "Notes Payable", "required": false}, {"value": "Liability.Long Term Liability.OtherLongTermLiabilities", "type": "String", "displayName": "Other Long Term Liabilities", "required": false}, {"value": "Liability.Long Term Liability.ShareholderNotesPayable", "type": "String", "displayName": "Shareholder Notes Payable", "required": false}, {"value": "Liability.Long Term Liability.AccrualsAndDeferredIncome", "type": "String", "displayName": "Accruals And Deferred Income", "required": false}, {"value": "Liability.Long Term Liability.AccruedLongLermLiabilities", "type": "String", "displayName": "Accrued Long Lerm Liabilities", "required": false}, {"value": "Liability.Long Term Liability.AccruedVacationPayable", "type": "String", "displayName": "Accrued Vacation Payable", "required": false}, {"value": "Liability.Long Term Liability.BankLoans", "type": "String", "displayName": "Bank Loans", "required": false}, {"value": "Liability.Long Term Liability.DebtsRelatedToParticipatingInterests", "type": "String", "displayName": "Debts Related To Participating Interests", "required": false}, {"value": "Liability.Long Term Liability.DeferredTaxLiabilities", "type": "String", "displayName": "Deferred Tax Liabilities", "required": false}, {"value": "Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities", "type": "String", "displayName": "Government And Other Public Authorities", "required": false}, {"value": "Liability.Long Term Liability.GroupAndAssociates", "type": "String", "displayName": "Group And Associates", "required": false}, {"value": "Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale", "type": "String", "displayName": "Liabilities Related To Assets Held For Sale", "required": false}, {"value": "Liability.Long Term Liability.LongTermBorrowings", "type": "String", "displayName": "Long Term Borrowings", "required": false}, {"value": "Liability.Long Term Liability.LongTermDebit", "type": "String", "displayName": "Long Term Debit", "required": false}, {"value": "Liability.Long Term Liability.LongTermEmployeeBenefitObligations", "type": "String", "displayName": "Long Term Employee Benefit Obligations", "required": false}, {"value": "Liability.Long Term Liability.ObligationsUnderFinanceLeases", "type": "String", "displayName": "Obligations Under Finance Leases", "required": false}, {"value": "Liability.Long Term Liability.OtherLongTermProvisions", "type": "String", "displayName": "Other Long Term Provisions", "required": false}, {"value": "Liability.Long Term Liability.ProvisionForLiabilities", "type": "String", "displayName": "Provision For Liabilities", "required": false}, {"value": "Liability.Long Term Liability.ProvisionsNonCurrentLiabilities", "type": "String", "displayName": "Provisions Non Current Liabilities", "required": false}, {"value": "Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts", "type": "String", "displayName": "Staff And Related Long Term Liability Accounts", "required": false}, {"value": "Liability.Other Current Liability.DirectDepositPayable", "type": "String", "displayName": "Direct Deposit Payable", "required": false}, {"value": "Liability.Other Current Liability.LineOfCredit", "type": "String", "displayName": "Line Of Credit", "required": false}, {"value": "Liability.Other Current Liability.LoanPayable", "type": "String", "displayName": "Loan Payable", "required": false}, {"value": "Liability.Other Current Liability.GlobalTaxPayable", "type": "String", "displayName": "Global Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.GlobalTaxSuspense", "type": "String", "displayName": "Global Tax Suspense", "required": false}, {"value": "Liability.Other Current Liability.OtherCurrentLiabilities", "type": "String", "displayName": "Other Current Liabilities", "required": false}, {"value": "Liability.Other Current Liability.PayrollClearing", "type": "String", "displayName": "Payroll Clearing", "required": false}, {"value": "Liability.Other Current Liability.PayrollTaxPayable", "type": "String", "displayName": "Payroll Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.PrepaidExpensesPayable", "type": "String", "displayName": "Prepaid Expenses Payable", "required": false}, {"value": "Liability.Other Current Liability.RentsInTrustLiability", "type": "String", "displayName": "Rents In Trust Liability", "required": false}, {"value": "Liability.Other Current Liability.TrustAccountsLiabilities", "type": "String", "displayName": "Trust Accounts Liabilities", "required": false}, {"value": "Liability.Other Current Liability.FederalIncomeTaxPayable", "type": "String", "displayName": "Federal Income Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.InsurancePayable", "type": "String", "displayName": "Insurance Payable", "required": false}, {"value": "Liability.Other Current Liability.SalesTaxPayable", "type": "String", "displayName": "Sales Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.StateLocalIncomeTaxPayable", "type": "String", "displayName": "State Local Income Tax Payable", "required": false}, {"value": "Liability.Other Current Liability.AccruedLiabilities", "type": "String", "displayName": "Accrued Liabilities", "required": false}, {"value": "Liability.Other Current Liability.CurrentLiabilities", "type": "String", "displayName": "Current Liabilities", "required": false}, {"value": "Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations", "type": "String", "displayName": "Current Portion EmployeeBenefits Obligations", "required": false}, {"value": "Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases", "type": "String", "displayName": "Current Portion Of Obligations Under Finance Leases", "required": false}, {"value": "Liability.Other Current Liability.CurrentTaxLiability", "type": "String", "displayName": "Current Tax Liability", "required": false}, {"value": "Liability.Other Current Liability.DividendsPayable", "type": "String", "displayName": "Dividends Payable", "required": false}, {"value": "Liability.Other Current Liability.DutiesAndTaxes", "type": "String", "displayName": "Duties And Taxes", "required": false}, {"value": "Liability.Other Current Liability.InterestPayables", "type": "String", "displayName": "Interest Payables", "required": false}, {"value": "Liability.Other Current Liability.ProvisionForWarrantyObligations", "type": "String", "displayName": "Provision For Warranty Obligations", "required": false}, {"value": "Liability.Other Current Liability.ProvisionsCurrentLiabilities", "type": "String", "displayName": "Provisions Current Liabilities", "required": false}, {"value": "Liability.Other Current Liability.ShortTermBorrowings", "type": "String", "displayName": "Short Term Borrowings", "required": false}, {"value": "Liability.Other Current Liability.SocialSecurityAgencies", "type": "String", "displayName": "Social Security Agencies", "required": false}, {"value": "Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts", "type": "String", "displayName": "Staff And Related Liability Accounts", "required": false}, {"value": "Liability.Other Current Liability.SundryDebtorsAndCreditors", "type": "String", "displayName": "Sundry Debtors And Creditors", "required": false}, {"value": "Liability.Other Current Liability.TradeAndOtherPayables", "type": "String", "displayName": "Trade And Other Payables", "required": false}, {"value": "Equity.Equity.OpeningBalanceEquity", "type": "String", "displayName": "Opening Balance Equity", "required": false}, {"value": "Equity.Equity.PartnersEquity", "type": "String", "displayName": "Partners Equity", "required": false}, {"value": "Equity.Equity.RetainedEarnings", "type": "String", "displayName": "Retained Earnings", "required": false}, {"value": "Equity.Equity.AccumulatedAdjustment", "type": "String", "displayName": "Accumulated Adjustment", "required": false}, {"value": "Equity.Equity.OwnersEquity", "type": "String", "displayName": "Owners Equity", "required": false}, {"value": "Equity.Equity.PaidInCapitalOrSurplus", "type": "String", "displayName": "Paid In Capital Or Surplus", "required": false}, {"value": "Equity.Equity.PartnerContributions", "type": "String", "displayName": "Partner Contributions", "required": false}, {"value": "Equity.Equity.PartnerDistributions", "type": "String", "displayName": "Partner Distributions", "required": false}, {"value": "Equity.Equity.PreferredStock", "type": "String", "displayName": "Preferred Stock", "required": false}, {"value": "Equity.Equity.CommonStock", "type": "String", "displayName": "Common Stock", "required": false}, {"value": "Equity.Equity.TreasuryStock", "type": "String", "displayName": "Treasury Stock", "required": false}, {"value": "Equity.Equity.EstimatedTaxes", "type": "String", "displayName": "Estimated Taxes", "required": false}, {"value": "Equity.Equity.Healthcare", "type": "String", "displayName": "Healthcare", "required": false}, {"value": "Equity.Equity.PersonalIncome", "type": "String", "displayName": "Personal Income", "required": false}, {"value": "Equity.Equity.PersonalExpense", "type": "String", "displayName": "Personal Expense", "required": false}, {"value": "Equity.Equity.AccumulatedOtherComprehensiveIncome", "type": "String", "displayName": "Accumulated Other Comprehensive Income", "required": false}, {"value": "Equity.Equity.CalledUpShareCapital", "type": "String", "displayName": "Called Up Share Capital", "required": false}, {"value": "Equity.Equity.CapitalReserves", "type": "String", "displayName": "Capital Reserves", "required": false}, {"value": "Equity.Equity.DividendDisbursed", "type": "String", "displayName": "Dividend Disbursed", "required": false}, {"value": "Equity.Equity.EquityInEarningsOfSubsiduaries", "type": "String", "displayName": "Equity In Earnings Of Subsiduaries", "required": false}, {"value": "Equity.Equity.InvestmentGrants", "type": "String", "displayName": "Investment Grants", "required": false}, {"value": "Equity.Equity.MoneyReceivedAgainstShareWarrants", "type": "String", "displayName": "Money Received Against Share Warrants", "required": false}, {"value": "Equity.Equity.OtherFreeReserves", "type": "String", "displayName": "Other Free Reserves", "required": false}, {"value": "Equity.Equity.ShareApplicationMoneyPendingAllotment", "type": "String", "displayName": "Share Application Money Pending Allotment", "required": false}, {"value": "Equity.Equity.ShareCapital", "type": "String", "displayName": "Share Capital", "required": false}, {"value": "Equity.Equity.Funds", "type": "String", "displayName": "Funds", "required": false}]}}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true, "validation": {"warnings": [], "information": [{"field": "Name", "details": "Should not be longer than 200 characters."}]}}, "nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [], "information": [{"field": "NominalCode", "details": "Should be a number between 1 and 99999999."}]}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "SALES", "type": "String", "displayName": "Sales", "required": false}, {"value": "OTHER_INCOME", "type": "String", "displayName": "Other Income", "required": false}, {"value": "DIRECT_EXPENSES", "type": "String", "displayName": "Direct Expenses", "required": false}, {"value": "OVERHEADS", "type": "String", "displayName": "Overheads", "required": false}, {"value": "DEPRECIATION", "type": "String", "displayName": "Depreciation", "required": false}, {"value": "CURRENT_ASSETS", "type": "String", "displayName": "Current Assets", "required": false}, {"value": "FIXED_ASSETS", "type": "String", "displayName": "Fixed Assets", "required": false}, {"value": "FUTURE_ASSETS", "type": "String", "displayName": "Future Assets", "required": false}, {"value": "BANK", "type": "String", "displayName": "Bank", "required": false}, {"value": "CURRENT_LIABILITY", "type": "String", "displayName": "Current Liability", "required": false}, {"value": "FUTURE_LIABILITY", "type": "String", "displayName": "Future Liability", "required": false}, {"value": "EQUITY", "type": "String", "displayName": "Equity", "required": false}, {"value": "LINE_OF_CREDIT", "type": "String", "displayName": "Credit Card / Loan", "required": false}]}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "Must be unique within the entity."}, {"field": "NominalCode", "details": "Must be at most 24 characters in length, although restrictions may vary between entities."}], "information": []}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "type": {"type": "String", "displayName": "Account Type", "description": "The type, or base category, of the account", "required": true, "options": [{"value": "Asset", "type": "String", "displayName": "Asset", "required": false}, {"value": "Equity", "type": "String", "displayName": "Equity", "required": false}, {"value": "Expense", "type": "String", "displayName": "Expense", "required": false}, {"value": "Income", "type": "String", "displayName": "Income", "required": false}, {"value": "Liability", "type": "String", "displayName": "Liability", "required": false}]}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "validation": {"warnings": [], "information": [{"field": "FullyQualifiedCategory", "details": "Any category that is part of the hierarchy of one of: 'Assets', 'Equity', 'Liabilities', 'Total Expenses' and 'Total Income' is permitted."}]}}}} - Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true}, "description": {"type": "String", "displayName": "Description", "description": "Description of the account", "required": true}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true}, "fullyQualifiedName": {"type": "String", "displayName": "Fully Qualified Name", "description": "The full name of the account e.g. Liability.Current.VAT or Income.Revenue.Sales", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the account", "required": true}, "currentBalance": {"type": "Number", "displayName": "Current Balance", "description": "The current balance in the account", "required": true}, "type": {"type": "String", "displayName": "Account Type", "description": "The type, or base category, of the account", "required": true}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true}, "isBankAccount": {"type": "Boolean", "displayName": "Is Bank Account?", "description": "Confirms whether the nominal account represents a bank account or not", "required": true}, "validDatatypeLinks": {"type": "Array", "displayName": "Valid Datatype Links", "description": "Describes which fields on other data types are valid links to this account in the originating system", "required": true, "properties": {"property": {"type": "String", "displayName": "Property", "description": "The field on the source data type that other data types can link to", "required": true}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of absolute names of fields from other data types, e.g. Invoice.LineItems.AccountRef.Id", "required": true}}}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true, "properties": {"isDeleted": {"type": "Boolean", "displayName": "IsDeleted", "description": "A boolean to indicate whether the object has been deleted", "required": true}}}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "Identifier for the nominal account.", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "Max length of 10 characters."}], "information": []}}, "name": {"type": "String", "displayName": "Name", "description": "Name of account as it appears in the chart of accounts or general ledger.", "required": true, "validation": {"warnings": [], "information": [{"field": "Name", "details": "Payments are enabled to this account if the name ends in .PaymentsEnabled."}]}}, "description": {"type": "String", "displayName": "Description", "description": "Description for the nominal account.", "required": false}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "Account type and category for nominal account.", "required": true, "options": [{"value": "Asset.Current", "type": "String", "displayName": "Current Asset", "required": false}, {"value": "Asset.Fixed", "type": "String", "displayName": "Fixed Asset", "required": false}, {"value": "Asset.Inventory", "type": "String", "displayName": "Inventory", "required": false}, {"value": "Asset.NonCurrent", "type": "String", "displayName": "Non-current Asset", "required": false}, {"value": "Asset.Prepayment", "type": "String", "displayName": "Prepayment", "required": false}, {"value": "Expense.DirectCosts", "type": "String", "displayName": "Direct Costs", "required": false}, {"value": "Expense.Expense", "type": "String", "displayName": "Expense", "required": false}, {"value": "Expense.Overhead", "type": "String", "displayName": "Overhead", "required": false}, {"value": "Expense.Superannuation", "type": "String", "displayName": "Superannuation", "required": false}, {"value": "Expense.Wages", "type": "String", "displayName": "Wages", "required": false}, {"value": "Income.Sales", "type": "String", "displayName": "Sales", "required": false}, {"value": "Income.Revenue", "type": "String", "displayName": "Revenue", "required": false}, {"value": "Income.Other", "type": "String", "displayName": "Other Income", "required": false}, {"value": "Liability.Current", "type": "String", "displayName": "Current Liability", "required": false}, {"value": "Liability.Depreciation", "type": "String", "displayName": "Depreciation", "required": false}, {"value": "Liability.Liability", "type": "String", "displayName": "Liability", "required": false}, {"value": "Liability.NonCurrent", "type": "String", "displayName": "Non Current Liability", "required": false}, {"value": "Liability.PayAsYouGo", "type": "String", "displayName": "Pay As You Go Liability", "required": false}, {"value": "Liability.Superannuation", "type": "String", "displayName": "Superannuation Liability", "required": false}, {"value": "Liability.WagesPayable", "type": "String", "displayName": "Wages Payable Liability", "required": false}, {"value": "Equity.Equity", "type": "String", "displayName": "Equity", "required": false}]}}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-account: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Cash On Hand", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active"} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-create-account: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Cash On Hand", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active"} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", "nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Cash On Hand", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active"}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "936358e8-4e4d-4663-93c0-e27c0d06dd56", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 239266} - "400": - application/json: {} - "500": - application/json: {} - create-source-account: - Version 2: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"id": "", "currency": "GBP", "modifiedDate": "2022-10-23T00:00:00Z"} - responses: - "200": - application/json: {"id": "acc-002", "accountName": "account-081", "accountType": "Credit", "accountNumber": "12345670", "sortCode": "123456", "currency": "GBP", "balance": 99.99, "modifiedDate": "2023-01-09T14:14:14.1057478Z", "status": "pending"} - "400": - application/json: {} - "500": - application/json: {} - Version 1: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"id": "acc-002", "accountName": "account-081", "accountType": "Credit", "accountNumber": "12345670", "sortCode": "123456", "currency": "GBP", "balance": 99.99, "modifiedDate": "2023-01-09T14:14:14.1057478Z"} - responses: - "200": - application/json: {"id": "acc-001", "accountName": "account-081", "accountType": "checking", "accountNumber": "12345670", "routingInfo": {"bankCode": "21001088", "type": "bankcode"}, "currency": "GBP", "balance": 99.99, "accountInfo": {"description": "account description 1", "nickname": "account 123", "accountOpenDate": "2023-05-06", "availableBalance": 10}, "modifiedDate": "2024-08-02T00:00:00.000Z", "status": "pending", "feedStartDate": "2024-05-01"} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"id": "", "currency": "GBP", "modifiedDate": "2022-10-23T00:00:00Z"} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-create-source-account: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"id": "", "accountName": "", "accountType": "prepaidCard", "accountNumber": "", "currency": "GBP", "balance": 9024.27, "modifiedDate": "2022-10-23T00:00:00Z", "accountInfo": {"accountOpenDate": "2022-10-23"}} - responses: - "200": - application/json: {"id": "acc-001", "accountName": "account-081", "accountType": "checking", "accountNumber": "12345670", "routingInfo": {"bankCode": "21001088", "type": "bankcode"}, "currency": "GBP", "balance": 99.99, "accountInfo": {"description": "account description 1", "nickname": "account 123", "accountOpenDate": "2023-05-06", "availableBalance": 10}, "modifiedDate": "2024-08-02T00:00:00.000Z", "status": "pending", "feedStartDate": "2024-05-01"} - "400": - application/json: {} - "500": - application/json: {} - get-bank-account-mapping: - Example: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: [{"sourceAccountId": "account-001", "sourceAccountName": "account-001", "sourceAccountNumber": "12345670", "sourceBalance": 99.99, "sourceCurrency": "GBP", "status": "pending", "targetAccountOptions": [{"id": "d21e25d6-98c5-4bfb-b469-105833bea3c8", "name": "Money Bank account", "sortCode": "123456", "accountNumber": "789"}, {"id": "d06ff4b2-e4f2-4681-9841-014bd008cdab", "name": "Bank of Dave account", "sortCode": "998866", "accountNumber": "99887766"}, {"id": "c8f252fc-84f3-4a8b-ace8-ae99f41a81ae", "name": "LuxLend account", "sortCode": "123456", "accountNumber": "123456789"}]}] - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-bank-account-mapping: - Example: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"sourceAccountId": "acc-002", "targetAccountId": "account-081"} - responses: - "200": - application/json: {"sourceAccountId": "acc-002", "targetAccountId": "account-081", "status": "Failed", "error": "A feed connection already exists to this account"} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"sourceAccountId": "acc-002", "targetAccountId": "account-081"} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-create-bank-account-mapping: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"sourceAccountId": "acc-002", "targetAccountId": "account-081"} - responses: - "200": - application/json: {"sourceAccountId": "acc-002", "targetAccountId": "account-081", "status": "Failed", "error": "A feed connection already exists to this account"} - "400": - application/json: {} - "500": - application/json: {} - get-create-update-suppliers-model: - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false, "validation": {"warnings": [{"field": "RegistrationNumber", "details": "Only for Exact Netherlands, if provided, must be exactly 20 characters in length"}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Country", "details": "Must be a 2-letter country code"}], "information": []}}, "line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": false}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false}}, "validation": {"warnings": [], "information": [{"field": "Addresses", "details": "Only the first address provided will be considered, all other entries will be not be recorded"}]}}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false, "validation": {"warnings": [{"field": "RegistrationNumber", "details": "Only for Exact Netherlands, if provided, must be exactly 20 characters in length"}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Country", "details": "Must be a 2-letter country code"}], "information": []}}, "line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": false}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false}}, "validation": {"warnings": [], "information": [{"field": "Addresses", "details": "Only the first address provided will be considered, all other entries will be not be recorded"}]}}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": true}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false}}, "validation": {"warnings": [], "information": [{"field": "Addresses", "details": "Only one address may be specified"}]}}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}}} - MYOB AccountRight and Essentials: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true, "validation": {"warnings": [{"field": "SupplierName", "details": "Must not have the part after the first name longer than 30 characters."}, {"field": "SupplierName", "details": "Must not have its first part (i.e. the first name) longer than 20 characters."}], "information": [{"field": "SupplierName", "details": "Must be provided and must contain a First and Last name separated by a ' '(space)."}]}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false, "validation": {"warnings": [], "information": [{"field": "EmailAddress", "details": "Must not be longer than 255 characters."}]}}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false, "validation": {"warnings": [], "information": [{"field": "Phone", "details": "Must not be longer than 21 characters."}]}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false, "validation": {"warnings": [], "information": [{"field": "TaxNumber", "details": "Must not be longer than 19 characters."}]}}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false, "validation": {"warnings": [], "information": [{"field": "RegistrationNumber", "details": "Must not be longer than 14 characters."}]}}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "required": false}, {"value": "Unknown", "type": "String", "required": false}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "Must be provided."}]}}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": true, "properties": {"line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses.Line1", "details": "Must not be longer than 127 characters."}]}}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses.Line2", "details": "Must not be longer than 127 characters."}]}}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses.City", "details": "Must not be longer than 255 characters."}]}}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses.Region", "details": "Must not be longer than 255 characters."}]}}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses.PostalCode", "details": "Must not be longer than 11 characters."}]}}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses.Country", "details": "Must not be longer than 255 characters."}]}}}, "validation": {"warnings": [{"field": "Addresses", "details": "Must only have 5 address entries at most."}], "information": [{"field": "Addresses", "details": "Must be provided."}]}}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"type": {"type": "String", "displayName": "Address Type", "description": "The type of the address", "required": true, "options": [{"value": "Billing", "type": "String", "displayName": "Billing", "required": false}, {"value": "Delivery", "type": "String", "displayName": "Delivery", "required": false}, {"value": "Unknown", "type": "String", "displayName": "Unknown", "required": false}]}, "line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": false}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": true, "validation": {"warnings": [{"field": "Addresses.Country", "details": "Must be a two letter Country ISO code"}], "information": []}}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false}}, "validation": {"warnings": [{"field": "Addresses", "details": "Only one each of Billing and Delivery addresses can be provided"}], "information": [{"field": "Addresses", "details": "Multiple addresses of Unknown type may be provided"}]}}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true, "validation": {"warnings": [{"field": "SupplierName", "details": "Max length of 41 characters."}], "information": []}}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false, "validation": {"warnings": [{"field": "ContactName", "details": "Max length of 25 characters for first and last names"}], "information": []}}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false, "validation": {"warnings": [{"field": "TaxNumber", "details": "Max length of 30 characters."}], "information": []}}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false, "validation": {"warnings": [{"field": "DefaultCurrency", "details": "Must be a three letter ISO code that matches an existing, active currency in the QuickBooks Desktop company"}, {"field": "DefaultCurrency", "details": "Can only be set if Multicurrency is enabled within the QuickBooks Desktop company"}], "information": [{"field": "DefaultCurrency", "details": "If not set, will default to the base currency of the QuickBooks Desktop company"}]}}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Line1", "details": "Max length of 41 characters."}], "information": []}}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Line2", "details": "Max length of 41 characters."}], "information": []}}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false, "validation": {"warnings": [{"field": "Addresses.City", "details": "Max length of 31 characters."}], "information": []}}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false, "validation": {"warnings": [{"field": "Addresses.Region", "details": "Max length of 21 characters."}], "information": []}}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Country", "details": "Max length of 31 characters."}], "information": []}}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.PostalCode", "details": "Max length of 13 characters."}], "information": []}}, "type": {"type": "String", "displayName": "Address Type", "description": "The type of the address", "required": true, "options": [{"value": "Billing", "type": "String", "displayName": "Billing Address", "required": false}, {"value": "Delivery", "type": "String", "displayName": "Delivery Address", "required": false}], "validation": {"warnings": [], "information": [{"field": "Addresses.Type", "details": "Only 1 address each of type(s) Billing/Delivery may be specified."}]}}}}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false, "validation": {"warnings": [{"field": "Phone", "details": "Country, area, and number are space separated"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Line1", "details": "Max length of 500 characters."}], "information": []}}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Line2", "details": "Max length of 500 characters."}], "information": []}}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false, "validation": {"warnings": [{"field": "Addresses.City", "details": "Max length of 255 characters."}], "information": []}}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false, "validation": {"warnings": [{"field": "Addresses.Region", "details": "Max length of 255 characters."}], "information": []}}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Country", "details": "Max length of 50 characters."}], "information": []}}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.PostalCode", "details": "Only English alphabet characters are permitted."}, {"field": "Addresses.PostalCode", "details": "Max length of 50 characters."}], "information": []}}, "type": {"type": "String", "displayName": "Address Type", "description": "The type of the address", "required": true, "options": [{"value": "Billing", "type": "String", "displayName": "Billing Address", "required": false}]}}}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false, "validation": {"warnings": [{"field": "Phone", "details": "Country, area, and number are space separated"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Line1", "details": "Max length of 500 characters."}], "information": []}}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Line2", "details": "Max length of 500 characters."}], "information": []}}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false, "validation": {"warnings": [{"field": "Addresses.City", "details": "Max length of 255 characters."}], "information": []}}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false, "validation": {"warnings": [{"field": "Addresses.Region", "details": "Max length of 255 characters."}], "information": []}}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Country", "details": "Max length of 50 characters."}], "information": []}}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.PostalCode", "details": "Only English alphabet characters are permitted."}, {"field": "Addresses.PostalCode", "details": "Max length of 50 characters."}], "information": []}}, "type": {"type": "String", "displayName": "Address Type", "description": "The type of the address", "required": true, "options": [{"value": "Billing", "type": "String", "displayName": "Billing Address", "required": false}]}}}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"id": {"type": "String", "displayName": "Id", "description": "ID of the supplier.", "required": true, "validation": {"warnings": [{"field": "id", "details": "The supplier ID must be unique, contain no spaces and have a maximum of 8 characters."}], "information": [{"field": "id", "details": "The supplier ID must be all Uppercase, if it is not, it will be converted to Uppercase before pushing."}]}}, "supplierName": {"type": "String", "displayName": "Name", "description": "Name of the supplier.", "required": true, "validation": {"warnings": [{"field": "supplierName", "details": "The supplier name can have a maximum of 60 characters"}], "information": []}}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier.", "required": false, "validation": {"warnings": [{"field": "contactName", "details": "The contact name can have a maximum of 30 characters"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The email address that the supplier may be contacted on.", "required": false}, "phone": {"type": "String", "displayName": "Telephone", "description": "The telephone number that the supplier may be contacted on.", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "If not provided, the currency will default to the company's base currency.", "required": false}, "status": {"type": "String", "displayName": "Status", "description": "The status of the supplier.", "required": false, "options": [{"value": "Active", "type": "String", "displayName": "Active Status", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "Contact addresses for the supplier.", "required": false, "properties": {"line1": {"type": "String", "displayName": "Line 1", "description": "Line 1 of the supplier address.", "required": true}, "line2": {"type": "String", "displayName": "Line 2", "description": "Line 2 of the supplier address.", "required": false}, "city": {"type": "String", "displayName": "City", "description": "The city of the supplier address.", "required": false}, "region": {"type": "String", "displayName": "Region", "description": "The region of the supplier address.", "required": false}, "postalCode": {"type": "String", "displayName": "Postal code", "description": "Post or Zip code for the address.", "required": false}, "type": {"type": "String", "displayName": "Type", "description": "The type of address as it related to the supplier.", "required": false, "options": [{"value": "Unknown", "type": "String", "displayName": "Unknown Address", "required": false}], "validation": {"warnings": [], "information": [{"field": "addresses.type", "details": "If Address type is not specified, it will default to type ''Unknown''"}]}}}, "validation": {"warnings": [{"field": "addresses", "details": "Only one address can be included in the Addresses array."}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "Legal company registration identifier.", "required": false}}, "validation": {"warnings": [], "information": [{"details": "Pushing to Sage 50 2015 (v21) or below is not supported. To enable push, please upgrade to at least Sage 50 2016 (v22) and re-sync the company."}]}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": true, "validation": {"warnings": [{"field": "Addresses.Line1", "details": "If you're adding an address for this Supplier, you must also include the first line"}], "information": []}}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false, "options": [{"value": "Afghanistan (AF)", "type": "String", "displayName": "Afghanistan (AF)", "required": false}, {"value": "Albania (AL)", "type": "String", "displayName": "Albania (AL)", "required": false}, {"value": "Algeria (DZ)", "type": "String", "displayName": "Algeria (DZ)", "required": false}, {"value": "Andorra (AD)", "type": "String", "displayName": "Andorra (AD)", "required": false}, {"value": "Angola (AO)", "type": "String", "displayName": "Angola (AO)", "required": false}, {"value": "Argentina (AR)", "type": "String", "displayName": "Argentina (AR)", "required": false}, {"value": "Armenia (AM)", "type": "String", "displayName": "Armenia (AM)", "required": false}, {"value": "Aruba (AW)", "type": "String", "displayName": "Aruba (AW)", "required": false}, {"value": "Australia (AU)", "type": "String", "displayName": "Australia (AU)", "required": false}, {"value": "Austria (AT)", "type": "String", "displayName": "Austria (AT)", "required": false}, {"value": "Azerbaijan (AZ)", "type": "String", "displayName": "Azerbaijan (AZ)", "required": false}, {"value": "Bahamas (BS)", "type": "String", "displayName": "Bahamas (BS)", "required": false}, {"value": "Bahrain (BH)", "type": "String", "displayName": "Bahrain (BH)", "required": false}, {"value": "Bangladesh (BD)", "type": "String", "displayName": "Bangladesh (BD)", "required": false}, {"value": "Barbados (BB)", "type": "String", "displayName": "Barbados (BB)", "required": false}, {"value": "Belarus (BY)", "type": "String", "displayName": "Belarus (BY)", "required": false}, {"value": "Belgium (BE)", "type": "String", "displayName": "Belgium (BE)", "required": false}, {"value": "Belize (BZ)", "type": "String", "displayName": "Belize (BZ)", "required": false}, {"value": "Benin (BJ)", "type": "String", "displayName": "Benin (BJ)", "required": false}, {"value": "Bermuda (BM)", "type": "String", "displayName": "Bermuda (BM)", "required": false}, {"value": "Bhutan (BT)", "type": "String", "displayName": "Bhutan (BT)", "required": false}, {"value": "Bolivia (BO)", "type": "String", "displayName": "Bolivia (BO)", "required": false}, {"value": "Bosnia and Herzegovina (BA)", "type": "String", "displayName": "Bosnia and Herzegovina (BA)", "required": false}, {"value": "Botswana (BW)", "type": "String", "displayName": "Botswana (BW)", "required": false}, {"value": "Brazil (BR)", "type": "String", "displayName": "Brazil (BR)", "required": false}, {"value": "British Virgin Islands (VG)", "type": "String", "displayName": "British Virgin Islands (VG)", "required": false}, {"value": "Brunei Darussalam (BN)", "type": "String", "displayName": "Brunei Darussalam (BN)", "required": false}, {"value": "Bulgaria (BG)", "type": "String", "displayName": "Bulgaria (BG)", "required": false}, {"value": "Burkina Faso (BF)", "type": "String", "displayName": "Burkina Faso (BF)", "required": false}, {"value": "Burundi (BI)", "type": "String", "displayName": "Burundi (BI)", "required": false}, {"value": "Cambodia (KH)", "type": "String", "displayName": "Cambodia (KH)", "required": false}, {"value": "Cameroon (CM)", "type": "String", "displayName": "Cameroon (CM)", "required": false}, {"value": "Canada (CA)", "type": "String", "displayName": "Canada (CA)", "required": false}, {"value": "Cape Verde (CV)", "type": "String", "displayName": "Cape Verde (CV)", "required": false}, {"value": "Cayman Islands (KY)", "type": "String", "displayName": "Cayman Islands (KY)", "required": false}, {"value": "Central African Republic (CF)", "type": "String", "displayName": "Central African Republic (CF)", "required": false}, {"value": "Chad (TD)", "type": "String", "displayName": "Chad (TD)", "required": false}, {"value": "Chile (CL)", "type": "String", "displayName": "Chile (CL)", "required": false}, {"value": "China (CN)", "type": "String", "displayName": "China (CN)", "required": false}, {"value": "Colombia (CO)", "type": "String", "displayName": "Colombia (CO)", "required": false}, {"value": "Comoros (KM)", "type": "String", "displayName": "Comoros (KM)", "required": false}, {"value": "Congo (CG)", "type": "String", "displayName": "Congo (CG)", "required": false}, {"value": "Costa Rica (CR)", "type": "String", "displayName": "Costa Rica (CR)", "required": false}, {"value": "Croatia (HR)", "type": "String", "displayName": "Croatia (HR)", "required": false}, {"value": "Cuba (CU)", "type": "String", "displayName": "Cuba (CU)", "required": false}, {"value": "Cura�ao (CW)", "type": "String", "displayName": "Cura�ao (CW)", "required": false}, {"value": "Cyprus (CY)", "type": "String", "displayName": "Cyprus (CY)", "required": false}, {"value": "Czech Republic (CZ)", "type": "String", "displayName": "Czech Republic (CZ)", "required": false}, {"value": "Democratic Republic of the Congo (CD)", "type": "String", "displayName": "Democratic Republic of the Congo (CD)", "required": false}, {"value": "Denmark (DK)", "type": "String", "displayName": "Denmark (DK)", "required": false}, {"value": "Djibouti (DJ)", "type": "String", "displayName": "Djibouti (DJ)", "required": false}, {"value": "Dominica (DM)", "type": "String", "displayName": "Dominica (DM)", "required": false}, {"value": "Dominican Republic (DO)", "type": "String", "displayName": "Dominican Republic (DO)", "required": false}, {"value": "East Timor (TP)", "type": "String", "displayName": "East Timor (TP)", "required": false}, {"value": "Ecuador (EC)", "type": "String", "displayName": "Ecuador (EC)", "required": false}, {"value": "Egypt (EG)", "type": "String", "displayName": "Egypt (EG)", "required": false}, {"value": "El Salvador (SV)", "type": "String", "displayName": "El Salvador (SV)", "required": false}, {"value": "Equatorial Guinea (GQ)", "type": "String", "displayName": "Equatorial Guinea (GQ)", "required": false}, {"value": "Eritrea (ER)", "type": "String", "displayName": "Eritrea (ER)", "required": false}, {"value": "Estonia (EE)", "type": "String", "displayName": "Estonia (EE)", "required": false}, {"value": "Ethiopia (ET)", "type": "String", "displayName": "Ethiopia (ET)", "required": false}, {"value": "Falkland Islands (Malvinas) (FK)", "type": "String", "displayName": "Falkland Islands (Malvinas) (FK)", "required": false}, {"value": "Federated States of Micronesia (FM)", "type": "String", "displayName": "Federated States of Micronesia (FM)", "required": false}, {"value": "Fiji (FJ)", "type": "String", "displayName": "Fiji (FJ)", "required": false}, {"value": "Finland (FI)", "type": "String", "displayName": "Finland (FI)", "required": false}, {"value": "France (FR)", "type": "String", "displayName": "France (FR)", "required": false}, {"value": "French Polynesia (PF)", "type": "String", "displayName": "French Polynesia (PF)", "required": false}, {"value": "Gabon (GA)", "type": "String", "displayName": "Gabon (GA)", "required": false}, {"value": "Gambia (GM)", "type": "String", "displayName": "Gambia (GM)", "required": false}, {"value": "Georgia (GE)", "type": "String", "displayName": "Georgia (GE)", "required": false}, {"value": "Germany (DE)", "type": "String", "displayName": "Germany (DE)", "required": false}, {"value": "Ghana (GH)", "type": "String", "displayName": "Ghana (GH)", "required": false}, {"value": "Gibraltar (GI)", "type": "String", "displayName": "Gibraltar (GI)", "required": false}, {"value": "Greece (GR)", "type": "String", "displayName": "Greece (GR)", "required": false}, {"value": "Greenland (GL)", "type": "String", "displayName": "Greenland (GL)", "required": false}, {"value": "Grenada (GD)", "type": "String", "displayName": "Grenada (GD)", "required": false}, {"value": "Guadaloupe (GP)", "type": "String", "displayName": "Guadaloupe (GP)", "required": false}, {"value": "Guam (GU)", "type": "String", "displayName": "Guam (GU)", "required": false}, {"value": "Guatemala (GT)", "type": "String", "displayName": "Guatemala (GT)", "required": false}, {"value": "Guernsey (GG)", "type": "String", "displayName": "Guernsey (GG)", "required": false}, {"value": "Guinea (GN)", "type": "String", "displayName": "Guinea (GN)", "required": false}, {"value": "Guinea-Bissau (GW)", "type": "String", "displayName": "Guinea-Bissau (GW)", "required": false}, {"value": "Guyana (GY)", "type": "String", "displayName": "Guyana (GY)", "required": false}, {"value": "Haiti (HT)", "type": "String", "displayName": "Haiti (HT)", "required": false}, {"value": "Honduras (HN)", "type": "String", "displayName": "Honduras (HN)", "required": false}, {"value": "Hong Kong (HK)", "type": "String", "displayName": "Hong Kong (HK)", "required": false}, {"value": "Hungary (HU)", "type": "String", "displayName": "Hungary (HU)", "required": false}, {"value": "Iceland (IS)", "type": "String", "displayName": "Iceland (IS)", "required": false}, {"value": "India (IN)", "type": "String", "displayName": "India (IN)", "required": false}, {"value": "Indonesia (ID)", "type": "String", "displayName": "Indonesia (ID)", "required": false}, {"value": "Iran (IR)", "type": "String", "displayName": "Iran (IR)", "required": false}, {"value": "Iraq (IQ)", "type": "String", "displayName": "Iraq (IQ)", "required": false}, {"value": "Ireland (IE)", "type": "String", "displayName": "Ireland (IE)", "required": false}, {"value": "Israel (IL)", "type": "String", "displayName": "Israel (IL)", "required": false}, {"value": "Italy (IT)", "type": "String", "displayName": "Italy (IT)", "required": false}, {"value": "Ivory Coast (CI)", "type": "String", "displayName": "Ivory Coast (CI)", "required": false}, {"value": "Jamaica (JM)", "type": "String", "displayName": "Jamaica (JM)", "required": false}, {"value": "Japan (JP)", "type": "String", "displayName": "Japan (JP)", "required": false}, {"value": "Jersey (JE)", "type": "String", "displayName": "Jersey (JE)", "required": false}, {"value": "Jordan (JO)", "type": "String", "displayName": "Jordan (JO)", "required": false}, {"value": "Kazakhstan (KZ)", "type": "String", "displayName": "Kazakhstan (KZ)", "required": false}, {"value": "Kenya (KE)", "type": "String", "displayName": "Kenya (KE)", "required": false}, {"value": "Kuwait (KW)", "type": "String", "displayName": "Kuwait (KW)", "required": false}, {"value": "Kyrgyzstan (KG)", "type": "String", "displayName": "Kyrgyzstan (KG)", "required": false}, {"value": "Laos (LA)", "type": "String", "displayName": "Laos (LA)", "required": false}, {"value": "Latvia (LV)", "type": "String", "displayName": "Latvia (LV)", "required": false}, {"value": "Lebanon (LB)", "type": "String", "displayName": "Lebanon (LB)", "required": false}, {"value": "Lesotho (LS)", "type": "String", "displayName": "Lesotho (LS)", "required": false}, {"value": "Liberia (LR)", "type": "String", "displayName": "Liberia (LR)", "required": false}, {"value": "Libya (LY)", "type": "String", "displayName": "Libya (LY)", "required": false}, {"value": "Liechtenstein (LI)", "type": "String", "displayName": "Liechtenstein (LI)", "required": false}, {"value": "Lithuania (LT)", "type": "String", "displayName": "Lithuania (LT)", "required": false}, {"value": "Luxembourg (LU)", "type": "String", "displayName": "Luxembourg (LU)", "required": false}, {"value": "Macau (MO)", "type": "String", "displayName": "Macau (MO)", "required": false}, {"value": "Macedonia (MK)", "type": "String", "displayName": "Macedonia (MK)", "required": false}, {"value": "Madagascar (MG)", "type": "String", "displayName": "Madagascar (MG)", "required": false}, {"value": "Malawi (MW)", "type": "String", "displayName": "Malawi (MW)", "required": false}, {"value": "Malaysia (MY)", "type": "String", "displayName": "Malaysia (MY)", "required": false}, {"value": "Maldives (MV)", "type": "String", "displayName": "Maldives (MV)", "required": false}, {"value": "Mali (ML)", "type": "String", "displayName": "Mali (ML)", "required": false}, {"value": "Malta (MT)", "type": "String", "displayName": "Malta (MT)", "required": false}, {"value": "Mauritania (MR)", "type": "String", "displayName": "Mauritania (MR)", "required": false}, {"value": "Mauritius (MU)", "type": "String", "displayName": "Mauritius (MU)", "required": false}, {"value": "Mexico (MX)", "type": "String", "displayName": "Mexico (MX)", "required": false}, {"value": "Moldova (MD)", "type": "String", "displayName": "Moldova (MD)", "required": false}, {"value": "Monaco (MC)", "type": "String", "displayName": "Monaco (MC)", "required": false}, {"value": "Mongolia (MN)", "type": "String", "displayName": "Mongolia (MN)", "required": false}, {"value": "Montenegro (ME)", "type": "String", "displayName": "Montenegro (ME)", "required": false}, {"value": "Morocco (MA)", "type": "String", "displayName": "Morocco (MA)", "required": false}, {"value": "Mozambique (MZ)", "type": "String", "displayName": "Mozambique (MZ)", "required": false}, {"value": "Myanmar (MM)", "type": "String", "displayName": "Myanmar (MM)", "required": false}, {"value": "Namibia (NA)", "type": "String", "displayName": "Namibia (NA)", "required": false}, {"value": "Nepal (NP)", "type": "String", "displayName": "Nepal (NP)", "required": false}, {"value": "Netherlands (NL)", "type": "String", "displayName": "Netherlands (NL)", "required": false}, {"value": "Netherlands Antilles (AN)", "type": "String", "displayName": "Netherlands Antilles (AN)", "required": false}, {"value": "New Caledonia (NC)", "type": "String", "displayName": "New Caledonia (NC)", "required": false}, {"value": "New Zealand (NZ)", "type": "String", "displayName": "New Zealand (NZ)", "required": false}, {"value": "Nicaragua (NI)", "type": "String", "displayName": "Nicaragua (NI)", "required": false}, {"value": "Niger (NE)", "type": "String", "displayName": "Niger (NE)", "required": false}, {"value": "Nigeria (NG)", "type": "String", "displayName": "Nigeria (NG)", "required": false}, {"value": "North Korea (KP)", "type": "String", "displayName": "North Korea (KP)", "required": false}, {"value": "Norway (NO)", "type": "String", "displayName": "Norway (NO)", "required": false}, {"value": "Oman (OM)", "type": "String", "displayName": "Oman (OM)", "required": false}, {"value": "Pakistan (PK)", "type": "String", "displayName": "Pakistan (PK)", "required": false}, {"value": "Panama (PA)", "type": "String", "displayName": "Panama (PA)", "required": false}, {"value": "Papua New Guinea (PG)", "type": "String", "displayName": "Papua New Guinea (PG)", "required": false}, {"value": "Paraguay (PY)", "type": "String", "displayName": "Paraguay (PY)", "required": false}, {"value": "Peru (PE)", "type": "String", "displayName": "Peru (PE)", "required": false}, {"value": "Philippines (PH)", "type": "String", "displayName": "Philippines (PH)", "required": false}, {"value": "Poland (PL)", "type": "String", "displayName": "Poland (PL)", "required": false}, {"value": "Portugal (PT)", "type": "String", "displayName": "Portugal (PT)", "required": false}, {"value": "Puerto Rico (PR)", "type": "String", "displayName": "Puerto Rico (PR)", "required": false}, {"value": "Qatar (QA)", "type": "String", "displayName": "Qatar (QA)", "required": false}, {"value": "Romania (RO)", "type": "String", "displayName": "Romania (RO)", "required": false}, {"value": "Russia (RU)", "type": "String", "displayName": "Russia (RU)", "required": false}, {"value": "Rwanda (RW)", "type": "String", "displayName": "Rwanda (RW)", "required": false}, {"value": "Saint Kitts and Nevis (KN)", "type": "String", "displayName": "Saint Kitts and Nevis (KN)", "required": false}, {"value": "Saint Pierre and Miquelon (PM)", "type": "String", "displayName": "Saint Pierre and Miquelon (PM)", "required": false}, {"value": "Samoa (WS)", "type": "String", "displayName": "Samoa (WS)", "required": false}, {"value": "San Marino (SM)", "type": "String", "displayName": "San Marino (SM)", "required": false}, {"value": "Sao Tome and Principe (ST)", "type": "String", "displayName": "Sao Tome and Principe (ST)", "required": false}, {"value": "Saudi Arabia (SA)", "type": "String", "displayName": "Saudi Arabia (SA)", "required": false}, {"value": "Senegal (SN)", "type": "String", "displayName": "Senegal (SN)", "required": false}, {"value": "Serbia (RS)", "type": "String", "displayName": "Serbia (RS)", "required": false}, {"value": "Seychelles (SC)", "type": "String", "displayName": "Seychelles (SC)", "required": false}, {"value": "Sierra Leone (SL)", "type": "String", "displayName": "Sierra Leone (SL)", "required": false}, {"value": "Singapore (SG)", "type": "String", "displayName": "Singapore (SG)", "required": false}, {"value": "Slovakia (SK)", "type": "String", "displayName": "Slovakia (SK)", "required": false}, {"value": "Slovenia (SI)", "type": "String", "displayName": "Slovenia (SI)", "required": false}, {"value": "Solomon Islands (SB)", "type": "String", "displayName": "Solomon Islands (SB)", "required": false}, {"value": "Somalia (SO)", "type": "String", "displayName": "Somalia (SO)", "required": false}, {"value": "South Africa (ZA)", "type": "String", "displayName": "South Africa (ZA)", "required": false}, {"value": "South Korea (KR)", "type": "String", "displayName": "South Korea (KR)", "required": false}, {"value": "Spain (ES)", "type": "String", "displayName": "Spain (ES)", "required": false}, {"value": "Sri Lanka (LK)", "type": "String", "displayName": "Sri Lanka (LK)", "required": false}, {"value": "St. Lucia (LC)", "type": "String", "displayName": "St. Lucia (LC)", "required": false}, {"value": "Sudan (SD)", "type": "String", "displayName": "Sudan (SD)", "required": false}, {"value": "Surinam (SR)", "type": "String", "displayName": "Surinam (SR)", "required": false}, {"value": "Swaziland (SZ)", "type": "String", "displayName": "Swaziland (SZ)", "required": false}, {"value": "Sweden (SE)", "type": "String", "displayName": "Sweden (SE)", "required": false}, {"value": "Switzerland (CH)", "type": "String", "displayName": "Switzerland (CH)", "required": false}, {"value": "Syria (SY)", "type": "String", "displayName": "Syria (SY)", "required": false}, {"value": "Taiwan (TW)", "type": "String", "displayName": "Taiwan (TW)", "required": false}, {"value": "Tajikistan (TJ)", "type": "String", "displayName": "Tajikistan (TJ)", "required": false}, {"value": "Tanzania (TZ)", "type": "String", "displayName": "Tanzania (TZ)", "required": false}, {"value": "Thailand (TH)", "type": "String", "displayName": "Thailand (TH)", "required": false}, {"value": "Togo (TG)", "type": "String", "displayName": "Togo (TG)", "required": false}, {"value": "Tonga (TO)", "type": "String", "displayName": "Tonga (TO)", "required": false}, {"value": "Trinidad and Tobago (TT)", "type": "String", "displayName": "Trinidad and Tobago (TT)", "required": false}, {"value": "Tunisia (TN)", "type": "String", "displayName": "Tunisia (TN)", "required": false}, {"value": "Turkey (TR)", "type": "String", "displayName": "Turkey (TR)", "required": false}, {"value": "Turkmenistan (TM)", "type": "String", "displayName": "Turkmenistan (TM)", "required": false}, {"value": "Tuvalu (TV)", "type": "String", "displayName": "Tuvalu (TV)", "required": false}, {"value": "Uganda (UG)", "type": "String", "displayName": "Uganda (UG)", "required": false}, {"value": "Ukraine (UA)", "type": "String", "displayName": "Ukraine (UA)", "required": false}, {"value": "United Arab Emirates (AE)", "type": "String", "displayName": "United Arab Emirates (AE)", "required": false}, {"value": "United Kingdom (GB)", "type": "String", "displayName": "United Kingdom (GB)", "required": false}, {"value": "United States (US)", "type": "String", "displayName": "United States (US)", "required": false}, {"value": "Uruguay (UY)", "type": "String", "displayName": "Uruguay (UY)", "required": false}, {"value": "Uzbekistan (UZ)", "type": "String", "displayName": "Uzbekistan (UZ)", "required": false}, {"value": "Vanuatu (VU)", "type": "String", "displayName": "Vanuatu (VU)", "required": false}, {"value": "Venezuela (VE)", "type": "String", "displayName": "Venezuela (VE)", "required": false}, {"value": "Vietnam (VN)", "type": "String", "displayName": "Vietnam (VN)", "required": false}, {"value": "Virgin Islands U.S. (VI)", "type": "String", "displayName": "Virgin Islands U.S. (VI)", "required": false}, {"value": "Western Sahara (EH)", "type": "String", "displayName": "Western Sahara (EH)", "required": false}, {"value": "Yemen (YE)", "type": "String", "displayName": "Yemen (YE)", "required": false}, {"value": "Zaire (ZR)", "type": "String", "displayName": "Zaire (ZR)", "required": false}, {"value": "Zambia (ZM)", "type": "String", "displayName": "Zambia (ZM)", "required": false}, {"value": "Zimbabwe (ZW)", "type": "String", "displayName": "Zimbabwe (ZW)", "required": false}]}}, "validation": {"warnings": [], "information": [{"field": "Addresses", "details": "Can contain a maximum of one address"}]}}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true, "validation": {"warnings": [{"field": "SupplierName", "details": "Must be between 1 and 100 characters"}], "information": []}}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": true, "validation": {"warnings": [{"field": "ContactName", "details": "Must be between 1 and 200 characters"}], "information": []}}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false, "validation": {"warnings": [{"field": "Phone", "details": "Must be no greater than 30 characters"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false, "validation": {"warnings": [{"field": "EmailAddress", "details": "Must be no greater than 200 characters"}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false, "validation": {"warnings": [{"field": "TaxNumber", "details": "Must be no greater than 20 characters"}], "information": []}}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false, "validation": {"warnings": [{"field": "RegistrationNumber", "details": "Must be no greater than 100 characters"}], "information": []}}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false, "options": [{"value": "AUD", "type": "String", "displayName": "Australian Dollar", "required": false}, {"value": "CAD", "type": "String", "displayName": "Canadian Dollar", "required": false}, {"value": "GBP", "type": "String", "displayName": "Pound Sterling", "required": false}, {"value": "USD", "type": "String", "displayName": "US Dollar", "required": false}, {"value": "ZAR", "type": "String", "displayName": "Rand", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "properties": {"line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Line1", "details": "Must be no greater than 200 characters"}], "information": []}}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": false, "validation": {"warnings": [{"field": "Addresses.Line2", "details": "Must be no greater than 200 characters"}], "information": []}}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": false, "validation": {"warnings": [{"field": "Addresses.City", "details": "Must be no greater than 80 characters"}], "information": []}}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": false, "validation": {"warnings": [{"field": "Addresses.Region", "details": "Must be no greater than 40 characters"}], "information": []}}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": false, "validation": {"warnings": [{"field": "Addresses.PostalCode", "details": "Must be no greater than 30 characters"}], "information": []}}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": false, "options": [{"value": "United States", "type": "String", "displayName": "United States", "required": false}, {"value": "Afghanistan", "type": "String", "displayName": "Afghanistan", "required": false}, {"value": "Aland Islands", "type": "String", "displayName": "Aland Islands", "required": false}, {"value": "Albania", "type": "String", "displayName": "Albania", "required": false}, {"value": "Algeria", "type": "String", "displayName": "Algeria", "required": false}, {"value": "American Samoa", "type": "String", "displayName": "American Samoa", "required": false}, {"value": "Andorra", "type": "String", "displayName": "Andorra", "required": false}, {"value": "Angola", "type": "String", "displayName": "Angola", "required": false}, {"value": "Anguilla", "type": "String", "displayName": "Anguilla", "required": false}, {"value": "Antarctica", "type": "String", "displayName": "Antarctica", "required": false}, {"value": "Antigua and Barbuda", "type": "String", "displayName": "Antigua and Barbuda", "required": false}, {"value": "Argentina", "type": "String", "displayName": "Argentina", "required": false}, {"value": "Armenia", "type": "String", "displayName": "Armenia", "required": false}, {"value": "Aruba", "type": "String", "displayName": "Aruba", "required": false}, {"value": "Australia", "type": "String", "displayName": "Australia", "required": false}, {"value": "Austria", "type": "String", "displayName": "Austria", "required": false}, {"value": "Azerbaijan", "type": "String", "displayName": "Azerbaijan", "required": false}, {"value": "Bahamas", "type": "String", "displayName": "Bahamas", "required": false}, {"value": "Bahrain", "type": "String", "displayName": "Bahrain", "required": false}, {"value": "Bangladesh", "type": "String", "displayName": "Bangladesh", "required": false}, {"value": "Barbados", "type": "String", "displayName": "Barbados", "required": false}, {"value": "Belarus", "type": "String", "displayName": "Belarus", "required": false}, {"value": "Belgium", "type": "String", "displayName": "Belgium", "required": false}, {"value": "Belize", "type": "String", "displayName": "Belize", "required": false}, {"value": "Benin", "type": "String", "displayName": "Benin", "required": false}, {"value": "Bermuda", "type": "String", "displayName": "Bermuda", "required": false}, {"value": "Bhutan", "type": "String", "displayName": "Bhutan", "required": false}, {"value": "Bolivia", "type": "String", "displayName": "Bolivia", "required": false}, {"value": "Bonaire, Sint Eustatius and Saba", "type": "String", "displayName": "Bonaire, Sint Eustatius and Saba", "required": false}, {"value": "Bosnia and Herzegovina", "type": "String", "displayName": "Bosnia and Herzegovina", "required": false}, {"value": "Botswana", "type": "String", "displayName": "Botswana", "required": false}, {"value": "Bouvet Island", "type": "String", "displayName": "Bouvet Island", "required": false}, {"value": "Brazil", "type": "String", "displayName": "Brazil", "required": false}, {"value": "British Indian Ocean Territory", "type": "String", "displayName": "British Indian Ocean Territory", "required": false}, {"value": "Brunei Darussalam", "type": "String", "displayName": "Brunei Darussalam", "required": false}, {"value": "Bulgaria", "type": "String", "displayName": "Bulgaria", "required": false}, {"value": "Burkina Faso", "type": "String", "displayName": "Burkina Faso", "required": false}, {"value": "Burundi", "type": "String", "displayName": "Burundi", "required": false}, {"value": "Cambodia", "type": "String", "displayName": "Cambodia", "required": false}, {"value": "Cameroon", "type": "String", "displayName": "Cameroon", "required": false}, {"value": "Canada", "type": "String", "displayName": "Canada", "required": false}, {"value": "Cape Verde", "type": "String", "displayName": "Cape Verde", "required": false}, {"value": "Cayman Islands", "type": "String", "displayName": "Cayman Islands", "required": false}, {"value": "Central African Republic", "type": "String", "displayName": "Central African Republic", "required": false}, {"value": "Chad", "type": "String", "displayName": "Chad", "required": false}, {"value": "Chile", "type": "String", "displayName": "Chile", "required": false}, {"value": "China", "type": "String", "displayName": "China", "required": false}, {"value": "Christmas Island", "type": "String", "displayName": "Christmas Island", "required": false}, {"value": "Cocos (Keeling) Islands", "type": "String", "displayName": "Cocos (Keeling) Islands", "required": false}, {"value": "Colombia", "type": "String", "displayName": "Colombia", "required": false}, {"value": "Comoros", "type": "String", "displayName": "Comoros", "required": false}, {"value": "Congo", "type": "String", "displayName": "Congo", "required": false}, {"value": "Congo, Democratic Republic", "type": "String", "displayName": "Congo, Democratic Republic", "required": false}, {"value": "Cook Islands", "type": "String", "displayName": "Cook Islands", "required": false}, {"value": "Costa Rica", "type": "String", "displayName": "Costa Rica", "required": false}, {"value": "C�te d'Ivoire", "type": "String", "displayName": "C�te d'Ivoire", "required": false}, {"value": "Croatia", "type": "String", "displayName": "Croatia", "required": false}, {"value": "Cuba", "type": "String", "displayName": "Cuba", "required": false}, {"value": "Cura�ao", "type": "String", "displayName": "Cura�ao", "required": false}, {"value": "Cyprus", "type": "String", "displayName": "Cyprus", "required": false}, {"value": "Czech Republic", "type": "String", "displayName": "Czech Republic", "required": false}, {"value": "Denmark", "type": "String", "displayName": "Denmark", "required": false}, {"value": "Djibouti", "type": "String", "displayName": "Djibouti", "required": false}, {"value": "Dominica", "type": "String", "displayName": "Dominica", "required": false}, {"value": "Dominican Republic", "type": "String", "displayName": "Dominican Republic", "required": false}, {"value": "Ecuador", "type": "String", "displayName": "Ecuador", "required": false}, {"value": "Egypt", "type": "String", "displayName": "Egypt", "required": false}, {"value": "El Salvador", "type": "String", "displayName": "El Salvador", "required": false}, {"value": "Equatorial Guinea", "type": "String", "displayName": "Equatorial Guinea", "required": false}, {"value": "Eritrea", "type": "String", "displayName": "Eritrea", "required": false}, {"value": "Estonia", "type": "String", "displayName": "Estonia", "required": false}, {"value": "Eswatini", "type": "String", "displayName": "Eswatini", "required": false}, {"value": "Ethiopia", "type": "String", "displayName": "Ethiopia", "required": false}, {"value": "Falkland Islands (Malvinas", "type": "String", "displayName": "Falkland Islands (Malvinas", "required": false}, {"value": "Faroe Islands", "type": "String", "displayName": "Faroe Islands", "required": false}, {"value": "Fiji", "type": "String", "displayName": "Fiji", "required": false}, {"value": "Finland", "type": "String", "displayName": "Finland", "required": false}, {"value": "France", "type": "String", "displayName": "France", "required": false}, {"value": "French Guiana", "type": "String", "displayName": "French Guiana", "required": false}, {"value": "French Polynesia", "type": "String", "displayName": "French Polynesia", "required": false}, {"value": "French Southern Territories", "type": "String", "displayName": "French Southern Territories", "required": false}, {"value": "Gabon", "type": "String", "displayName": "Gabon", "required": false}, {"value": "Gambia", "type": "String", "displayName": "Gambia", "required": false}, {"value": "Georgia", "type": "String", "displayName": "Georgia", "required": false}, {"value": "Germany", "type": "String", "displayName": "Germany", "required": false}, {"value": "Ghana", "type": "String", "displayName": "Ghana", "required": false}, {"value": "Gibraltar", "type": "String", "displayName": "Gibraltar", "required": false}, {"value": "Greece", "type": "String", "displayName": "Greece", "required": false}, {"value": "Greenland", "type": "String", "displayName": "Greenland", "required": false}, {"value": "Grenada", "type": "String", "displayName": "Grenada", "required": false}, {"value": "Guadeloupe", "type": "String", "displayName": "Guadeloupe", "required": false}, {"value": "Guam", "type": "String", "displayName": "Guam", "required": false}, {"value": "Guatemala", "type": "String", "displayName": "Guatemala", "required": false}, {"value": "Guernsey", "type": "String", "displayName": "Guernsey", "required": false}, {"value": "Guinea", "type": "String", "displayName": "Guinea", "required": false}, {"value": "Guinea-Bissau", "type": "String", "displayName": "Guinea-Bissau", "required": false}, {"value": "Guyana", "type": "String", "displayName": "Guyana", "required": false}, {"value": "Haiti", "type": "String", "displayName": "Haiti", "required": false}, {"value": "Heard Is. & Mcdonald Islands", "type": "String", "displayName": "Heard Is. & Mcdonald Islands", "required": false}, {"value": "Honduras", "type": "String", "displayName": "Honduras", "required": false}, {"value": "Hong Kong", "type": "String", "displayName": "Hong Kong", "required": false}, {"value": "Hungary", "type": "String", "displayName": "Hungary", "required": false}, {"value": "Iceland", "type": "String", "displayName": "Iceland", "required": false}, {"value": "India", "type": "String", "displayName": "India", "required": false}, {"value": "Indonesia", "type": "String", "displayName": "Indonesia", "required": false}, {"value": "Iran, Islamic Republic of", "type": "String", "displayName": "Iran, Islamic Republic of", "required": false}, {"value": "Iraq", "type": "String", "displayName": "Iraq", "required": false}, {"value": "Ireland", "type": "String", "displayName": "Ireland", "required": false}, {"value": "Isle of Man", "type": "String", "displayName": "Isle of Man", "required": false}, {"value": "Israel", "type": "String", "displayName": "Israel", "required": false}, {"value": "Italy", "type": "String", "displayName": "Italy", "required": false}, {"value": "Jamaica", "type": "String", "displayName": "Jamaica", "required": false}, {"value": "Japan", "type": "String", "displayName": "Japan", "required": false}, {"value": "Jersey", "type": "String", "displayName": "Jersey", "required": false}, {"value": "Jordan", "type": "String", "displayName": "Jordan", "required": false}, {"value": "Kazakhstan", "type": "String", "displayName": "Kazakhstan", "required": false}, {"value": "Kenya", "type": "String", "displayName": "Kenya", "required": false}, {"value": "Kiribati", "type": "String", "displayName": "Kiribati", "required": false}, {"value": "Korea, Republic of", "type": "String", "displayName": "Korea, Republic of", "required": false}, {"value": "Korea, Demo. People's Rep", "type": "String", "displayName": "Korea, Demo. People's Rep", "required": false}, {"value": "Kosovo", "type": "String", "displayName": "Kosovo", "required": false}, {"value": "Kuwait", "type": "String", "displayName": "Kuwait", "required": false}, {"value": "Kyrgyzstan", "type": "String", "displayName": "Kyrgyzstan", "required": false}, {"value": "Lao", "type": "String", "displayName": "Lao", "required": false}, {"value": "Latvia", "type": "String", "displayName": "Latvia", "required": false}, {"value": "Lebanon", "type": "String", "displayName": "Lebanon", "required": false}, {"value": "Lesotho", "type": "String", "displayName": "Lesotho", "required": false}, {"value": "Liberia", "type": "String", "displayName": "Liberia", "required": false}, {"value": "Libyan Arab Jamahiriya", "type": "String", "displayName": "Libyan Arab Jamahiriya", "required": false}, {"value": "Liechtenstein", "type": "String", "displayName": "Liechtenstein", "required": false}, {"value": "Lithuania", "type": "String", "displayName": "Lithuania", "required": false}, {"value": "Luxembourg", "type": "String", "displayName": "Luxembourg", "required": false}, {"value": "Macao", "type": "String", "displayName": "Macao", "required": false}, {"value": "Macedonia", "type": "String", "displayName": "Macedonia", "required": false}, {"value": "Madagascar", "type": "String", "displayName": "Madagascar", "required": false}, {"value": "Malawi", "type": "String", "displayName": "Malawi", "required": false}, {"value": "Malaysia", "type": "String", "displayName": "Malaysia", "required": false}, {"value": "Maldives", "type": "String", "displayName": "Maldives", "required": false}, {"value": "Mali", "type": "String", "displayName": "Mali", "required": false}, {"value": "Malta", "type": "String", "displayName": "Malta", "required": false}, {"value": "Marshall Islands", "type": "String", "displayName": "Marshall Islands", "required": false}, {"value": "Martinique", "type": "String", "displayName": "Martinique", "required": false}, {"value": "Mauritania", "type": "String", "displayName": "Mauritania", "required": false}, {"value": "Mauritius", "type": "String", "displayName": "Mauritius", "required": false}, {"value": "Mayotte", "type": "String", "displayName": "Mayotte", "required": false}, {"value": "Mexico", "type": "String", "displayName": "Mexico", "required": false}, {"value": "Micronesia", "type": "String", "displayName": "Micronesia", "required": false}, {"value": "Moldova, Republic of", "type": "String", "displayName": "Moldova, Republic of", "required": false}, {"value": "Monaco", "type": "String", "displayName": "Monaco", "required": false}, {"value": "Mongolia", "type": "String", "displayName": "Mongolia", "required": false}, {"value": "Montenegro", "type": "String", "displayName": "Montenegro", "required": false}, {"value": "Montserrat", "type": "String", "displayName": "Montserrat", "required": false}, {"value": "Morocco", "type": "String", "displayName": "Morocco", "required": false}, {"value": "Mozambique", "type": "String", "displayName": "Mozambique", "required": false}, {"value": "Myanmar", "type": "String", "displayName": "Myanmar", "required": false}, {"value": "Namibia", "type": "String", "displayName": "Namibia", "required": false}, {"value": "Nauru", "type": "String", "displayName": "Nauru", "required": false}, {"value": "Nepal", "type": "String", "displayName": "Nepal", "required": false}, {"value": "Netherlands", "type": "String", "displayName": "Netherlands", "required": false}, {"value": "Netherlands Antilles", "type": "String", "displayName": "Netherlands Antilles", "required": false}, {"value": "New Caledonia", "type": "String", "displayName": "New Caledonia", "required": false}, {"value": "New Zealand", "type": "String", "displayName": "New Zealand", "required": false}, {"value": "Nicaragua", "type": "String", "displayName": "Nicaragua", "required": false}, {"value": "Niger", "type": "String", "displayName": "Niger", "required": false}, {"value": "Nigeria", "type": "String", "displayName": "Nigeria", "required": false}, {"value": "Niue", "type": "String", "displayName": "Niue", "required": false}, {"value": "Norfolk Island", "type": "String", "displayName": "Norfolk Island", "required": false}, {"value": "Northern Mariana Islands", "type": "String", "displayName": "Northern Mariana Islands", "required": false}, {"value": "Norway", "type": "String", "displayName": "Norway", "required": false}, {"value": "Oman", "type": "String", "displayName": "Oman", "required": false}, {"value": "Pakistan", "type": "String", "displayName": "Pakistan", "required": false}, {"value": "Palau", "type": "String", "displayName": "Palau", "required": false}, {"value": "Palestinian Territory, Occupied", "type": "String", "displayName": "Palestinian Territory, Occupied", "required": false}, {"value": "Panama", "type": "String", "displayName": "Panama", "required": false}, {"value": "Papua New Guinea", "type": "String", "displayName": "Papua New Guinea", "required": false}, {"value": "Paraguay", "type": "String", "displayName": "Paraguay", "required": false}, {"value": "Peru", "type": "String", "displayName": "Peru", "required": false}, {"value": "Philippines", "type": "String", "displayName": "Philippines", "required": false}, {"value": "Pitcairn", "type": "String", "displayName": "Pitcairn", "required": false}, {"value": "Poland", "type": "String", "displayName": "Poland", "required": false}, {"value": "Portugal", "type": "String", "displayName": "Portugal", "required": false}, {"value": "Puerto Rico", "type": "String", "displayName": "Puerto Rico", "required": false}, {"value": "Qatar", "type": "String", "displayName": "Qatar", "required": false}, {"value": "Reunion", "type": "String", "displayName": "Reunion", "required": false}, {"value": "Romania", "type": "String", "displayName": "Romania", "required": false}, {"value": "Russian Federation", "type": "String", "displayName": "Russian Federation", "required": false}, {"value": "Rwanda", "type": "String", "displayName": "Rwanda", "required": false}, {"value": "Saint Barthelemy", "type": "String", "displayName": "Saint Barthelemy", "required": false}, {"value": "Saint Helena", "type": "String", "displayName": "Saint Helena", "required": false}, {"value": "Saint Kitts and Nevis", "type": "String", "displayName": "Saint Kitts and Nevis", "required": false}, {"value": "Saint Lucia", "type": "String", "displayName": "Saint Lucia", "required": false}, {"value": "Saint Martin", "type": "String", "displayName": "Saint Martin", "required": false}, {"value": "Saint Pierre and Miquelon", "type": "String", "displayName": "Saint Pierre and Miquelon", "required": false}, {"value": "Saint Vincent and the Grenadines", "type": "String", "displayName": "Saint Vincent and the Grenadines", "required": false}, {"value": "Samoa", "type": "String", "displayName": "Samoa", "required": false}, {"value": "San Marino", "type": "String", "displayName": "San Marino", "required": false}, {"value": "Sao Tome and Principe", "type": "String", "displayName": "Sao Tome and Principe", "required": false}, {"value": "Saudi Arabia", "type": "String", "displayName": "Saudi Arabia", "required": false}, {"value": "Senegal", "type": "String", "displayName": "Senegal", "required": false}, {"value": "Serbia", "type": "String", "displayName": "Serbia", "required": false}, {"value": "Seychelles", "type": "String", "displayName": "Seychelles", "required": false}, {"value": "Sierra Leone", "type": "String", "displayName": "Sierra Leone", "required": false}, {"value": "Singapore", "type": "String", "displayName": "Singapore", "required": false}, {"value": "Sint Maarten", "type": "String", "displayName": "Sint Maarten", "required": false}, {"value": "Slovakia", "type": "String", "displayName": "Slovakia", "required": false}, {"value": "Slovenia", "type": "String", "displayName": "Slovenia", "required": false}, {"value": "Solomon Islands", "type": "String", "displayName": "Solomon Islands", "required": false}, {"value": "Somalia", "type": "String", "displayName": "Somalia", "required": false}, {"value": "South Africa", "type": "String", "displayName": "South Africa", "required": false}, {"value": "S. Georgia & S. Sandwich Is", "type": "String", "displayName": "S. Georgia & S. Sandwich Is", "required": false}, {"value": "Spain", "type": "String", "displayName": "Spain", "required": false}, {"value": "Sri Lanka", "type": "String", "displayName": "Sri Lanka", "required": false}, {"value": "Sudan", "type": "String", "displayName": "Sudan", "required": false}, {"value": "South Sudan", "type": "String", "displayName": "South Sudan", "required": false}, {"value": "Suriname", "type": "String", "displayName": "Suriname", "required": false}, {"value": "Svalbard and Jan Mayen", "type": "String", "displayName": "Svalbard and Jan Mayen", "required": false}, {"value": "Sweden", "type": "String", "displayName": "Sweden", "required": false}, {"value": "Switzerland", "type": "String", "displayName": "Switzerland", "required": false}, {"value": "Syrian Arab Republic", "type": "String", "displayName": "Syrian Arab Republic", "required": false}, {"value": "Taiwan", "type": "String", "displayName": "Taiwan", "required": false}, {"value": "Tajikistan", "type": "String", "displayName": "Tajikistan", "required": false}, {"value": "Tanzania, United Republic of", "type": "String", "displayName": "Tanzania, United Republic of", "required": false}, {"value": "Thailand", "type": "String", "displayName": "Thailand", "required": false}, {"value": "Timor-Leste", "type": "String", "displayName": "Timor-Leste", "required": false}, {"value": "Togo", "type": "String", "displayName": "Togo", "required": false}, {"value": "Tokelau", "type": "String", "displayName": "Tokelau", "required": false}, {"value": "Tonga", "type": "String", "displayName": "Tonga", "required": false}, {"value": "Trinidad and Tobago", "type": "String", "displayName": "Trinidad and Tobago", "required": false}, {"value": "Tunisia", "type": "String", "displayName": "Tunisia", "required": false}, {"value": "Turkey", "type": "String", "displayName": "Turkey", "required": false}, {"value": "Turkmenistan", "type": "String", "displayName": "Turkmenistan", "required": false}, {"value": "Turks and Caicos Islands", "type": "String", "displayName": "Turks and Caicos Islands", "required": false}, {"value": "Tuvalu", "type": "String", "displayName": "Tuvalu", "required": false}, {"value": "Uganda", "type": "String", "displayName": "Uganda", "required": false}, {"value": "Ukraine", "type": "String", "displayName": "Ukraine", "required": false}, {"value": "United Arab Emirates", "type": "String", "displayName": "United Arab Emirates", "required": false}, {"value": "United Kingdom", "type": "String", "displayName": "United Kingdom", "required": false}, {"value": "US Minor Outlying Islands", "type": "String", "displayName": "US Minor Outlying Islands", "required": false}, {"value": "Uruguay", "type": "String", "displayName": "Uruguay", "required": false}, {"value": "Uzbekistan", "type": "String", "displayName": "Uzbekistan", "required": false}, {"value": "Vanuatu", "type": "String", "displayName": "Vanuatu", "required": false}, {"value": "Vatican City State", "type": "String", "displayName": "Vatican City State", "required": false}, {"value": "Venezuela", "type": "String", "displayName": "Venezuela", "required": false}, {"value": "Vietnam", "type": "String", "displayName": "Vietnam", "required": false}, {"value": "Virgin Islands, British", "type": "String", "displayName": "Virgin Islands, British", "required": false}, {"value": "Virgin Islands, U.S", "type": "String", "displayName": "Virgin Islands, U.S", "required": false}, {"value": "Wallis and Futuna", "type": "String", "displayName": "Wallis and Futuna", "required": false}, {"value": "Western Sahara", "type": "String", "displayName": "Western Sahara", "required": false}, {"value": "Yemen", "type": "String", "displayName": "Yemen", "required": false}, {"value": "Zambia", "type": "String", "displayName": "Zambia", "required": false}, {"value": "Zimbabwe", "type": "String", "displayName": "Zimbabwe", "required": false}], "validation": {"warnings": [{"field": "Addresses.Country", "details": "Required if TaxNumber is supplied"}], "information": []}}}, "validation": {"warnings": [{"field": "Addresses", "details": "If supplied, must contain only 1 address"}, {"field": "Addresses", "details": "If TaxNumber is supplied, an Address with a Country is required"}], "information": []}}}} - Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": true}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": true}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": true}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": true, "properties": {"type": {"type": "String", "displayName": "Address Type", "description": "The type of the address", "required": true}, "line1": {"type": "String", "displayName": "Line 1", "description": "The first line of the address", "required": true}, "line2": {"type": "String", "displayName": "Line 2", "description": "The second line of the address", "required": true}, "city": {"type": "String", "displayName": "City", "description": "The third line of the address, or city", "required": true}, "region": {"type": "String", "displayName": "Region", "description": "The fourth line of the address, or region", "required": true}, "country": {"type": "String", "displayName": "Country", "description": "The country for the address", "required": true}, "postalCode": {"type": "String", "displayName": "Postal/Zip Code", "description": "The postal (or zip) code for the address", "required": true}}}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": true}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": true}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true, "properties": {"isDeleted": {"type": "Boolean", "displayName": "IsDeleted", "description": "A boolean to indicate whether the object has been deleted", "required": true}}}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Suppliers", "description": "An accounts payable contact that supplies good or services, also referred to as a vendor.", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Name", "description": "Name of the supplier.", "required": true}, "phone": {"type": "String", "displayName": "Phone", "description": "Main contact phone number for the supplier.", "required": false, "validation": {"warnings": [{"field": "phone", "details": "Country, area, and number are space separated"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email", "description": "Main contact email for the supplier.", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "Legal company registration identifier.", "required": false, "validation": {"warnings": [{"field": "registrationNumber", "details": "Max length of 50 characters"}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "Legal tax registration identifier.", "required": false}, "status": {"type": "String", "displayName": "Status", "description": "Status of the supplier account.", "required": false, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "InActive", "type": "String", "displayName": "Inactive", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "Contact addresses for the supplier.", "required": false, "properties": {"line1": {"type": "String", "displayName": "Address Line 1", "description": "First line of the address.", "required": false, "validation": {"warnings": [{"field": "addresses.line1", "details": "Max length of 500 characters."}], "information": []}}, "line2": {"type": "String", "displayName": "Address Line 2", "description": "Second line of the address.", "required": false, "validation": {"warnings": [{"field": "addresses.line2", "details": "Max length of 500 characters."}], "information": []}}, "city": {"type": "String", "displayName": "City", "description": "Local city for the address.", "required": false, "validation": {"warnings": [{"field": "addresses.city", "details": "Max length of 255 characters."}], "information": []}}, "region": {"type": "String", "displayName": "Region", "description": "Region the address is located in.", "required": false, "validation": {"warnings": [{"field": "addresses.region", "details": "Max length of 255 characters."}], "information": []}}, "country": {"type": "String", "displayName": "Country", "description": "Country for the address.", "required": false, "validation": {"warnings": [{"field": "addresses.country", "details": "Max length of 50 characters."}], "information": []}}, "postalCode": {"type": "String", "displayName": "Postal code", "description": "Post or Zip code for the address.", "required": false, "validation": {"warnings": [{"field": "addresses.postalCode", "details": "Only English alphabet characters are permitted."}, {"field": "addresses.postalCode", "details": "Max length of 50 characters."}], "information": []}}, "type": {"type": "String", "displayName": "Type", "description": "The type of address as it related to the supplier.", "required": true, "options": [{"value": "Billing", "type": "String", "displayName": "Billing Address", "required": false}, {"value": "Delivery", "type": "String", "displayName": "Delivery Address", "required": false}], "validation": {"warnings": [{"field": "addresses.type", "details": "Billing = POBOX, Delivery/Unknown = DELIVERY"}], "information": []}}}}}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-supplier: - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"id": "73593", "supplierName": "test 20230420 1004", "contactName": "Joe Bloggs", "status": "Active"} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "a724c908-5d52-46dc-ac48-5fbb4ff4bff9", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 416715} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-create-supplier: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "a724c908-5d52-46dc-ac48-5fbb4ff4bff9", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 416715} - "400": - application/json: {} - "500": - application/json: {} - get-create-transfers-model: - Exact (Netherlands): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"description": {"type": "String", "displayName": "Transfer Description", "description": "The description of the transfer", "required": false}, "contactRef": {"type": "Object", "displayName": "Contact Reference", "description": "The customer or supplier for this transfer if known", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "ContactRef.Id", "details": "Must match the ID of an existing customer or supplier."}], "information": []}}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "customers", "type": "String", "displayName": "customers", "required": false}, {"value": "suppliers", "type": "String", "displayName": "suppliers", "required": false}]}}}, "date": {"type": "DateTime", "displayName": "Transfer Date", "description": "The date the transfer occurred", "required": true}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transfer", "required": false}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "From.Amount", "details": "Transfer Amount must be greater than zero."}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing bank or nominal account."}], "information": []}}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "chartOfAccounts", "type": "String", "displayName": "chartOfAccounts", "required": false}]}}, "validation": {"warnings": [{"field": "From.AccountRef", "details": "Transfers between two bank accounts must be handled with two separate transfers to/from an offset account (only balance sheet type nominal account)."}], "information": []}}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transfer", "required": false}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "To.Amount", "details": "Transfer Amount must be greater than zero."}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing bank or nominal account."}], "information": []}}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "chartOfAccounts", "type": "String", "displayName": "chartOfAccounts", "required": false}]}}, "validation": {"warnings": [{"field": "To.AccountRef", "details": "Transfers between two bank accounts must be handled with two separate transfers to/from an offset account (only balance sheet type nominal account)."}], "information": []}}}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this transfer is being tracked against", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": false}}}}} - Exact (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"description": {"type": "String", "displayName": "Transfer Description", "description": "The description of the transfer", "required": false}, "contactRef": {"type": "Object", "displayName": "Contact Reference", "description": "The customer or supplier for this transfer if known", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "ContactRef.Id", "details": "Must match the ID of an existing customer or supplier."}], "information": []}}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "customers", "type": "String", "displayName": "customers", "required": false}, {"value": "suppliers", "type": "String", "displayName": "suppliers", "required": false}]}}}, "date": {"type": "DateTime", "displayName": "Transfer Date", "description": "The date the transfer occurred", "required": true}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transfer", "required": false}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "From.Amount", "details": "Transfer Amount must be greater than zero."}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing bank or nominal account."}], "information": []}}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "chartOfAccounts", "type": "String", "displayName": "chartOfAccounts", "required": false}]}}, "validation": {"warnings": [{"field": "From.AccountRef", "details": "Transfers between two bank accounts must be handled with two separate transfers to/from an offset account (only balance sheet type nominal account)."}], "information": []}}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transfer", "required": false}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "To.Amount", "details": "Transfer Amount must be greater than zero."}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing bank or nominal account."}], "information": []}}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "chartOfAccounts", "type": "String", "displayName": "chartOfAccounts", "required": false}]}}, "validation": {"warnings": [{"field": "To.AccountRef", "details": "Transfers between two bank accounts must be handled with two separate transfers to/from an offset account (only balance sheet type nominal account)."}], "information": []}}}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this transfer is being tracked against", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": false}}}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"date": {"type": "DateTime", "displayName": "Transfer Date", "description": "The date the transfer occurred", "required": true}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing bank account."}], "information": []}}}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "From.Amount", "details": "Must be provided and be greater than zero."}], "information": []}}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing bank account."}], "information": []}}}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": false, "validation": {"warnings": [{"field": "To.Amount", "details": "If provided, must be greater than zero."}, {"field": "To.Amount", "details": "It will be taken into account just if the accounts are in different currencies and will override the automatic currency conversion."}], "information": []}}}}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"description": {"type": "String", "displayName": "Transfer Description", "description": "The description of the transfer", "required": false}, "date": {"type": "DateTime", "displayName": "Transfer Date", "description": "The date the transfer occurred", "required": false, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Will default to today's date if not provided"}]}}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Either the 'From' account or the 'To' account must be a bank account - the other must be an undeposited funds account"}], "information": []}}}}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Either the 'From' account or the 'To' account must be a bank account - the other must be an undeposited funds account"}], "information": []}}}}}}, "depositedRecordRefs": {"type": "Array", "displayName": "Deposited Record References", "description": "A collection of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the undeposited funds (or other holding) account within this transfer.", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this transfer is being tracked against", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": true, "validation": {"warnings": [{"field": "TrackingCategoryRefs.Id", "details": "One location, one department and one classification may be provided"}], "information": []}}}}}, "validation": {"warnings": [{"details": "Currently only transfers between bank accounts and undeposited funds accounts are supported"}], "information": []}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "From.Amount", "details": "Value should match To.Amount"}, {"field": "From.Amount", "details": "Value should be greater than zero"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transfer", "required": false, "validation": {"warnings": [{"field": "From.Currency", "details": "This value is not used in the push, and will be ignored."}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}}}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "To.Amount", "details": "Value should match To.Amount"}, {"field": "To.Amount", "details": "Value should be greater than zero"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transfer", "required": false, "validation": {"warnings": [{"field": "To.Currency", "details": "This value is not used in the push, and will be ignored."}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}}}}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this transfer is being tracked against", "required": false}, "description": {"type": "String", "displayName": "Transfer Description", "description": "The description of the transfer", "required": false, "validation": {"warnings": [{"field": "Description", "details": "Max length of 4096 characters."}], "information": []}}, "date": {"type": "DateTime", "displayName": "Transfer Date", "description": "The date the transfer occurred", "required": true}, "contactRef": {"type": "Object", "displayName": "Contact Reference", "description": "The customer or supplier for this transfer if known", "required": false, "validation": {"warnings": [{"field": "ContactRef", "details": "This value is not used in the push, and will be ignored."}], "information": []}}, "sourceModifiedDate": {"type": "DateTime", "displayName": "Source Modified Date", "description": "The date the record was last changed in the originating system", "required": true}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"description": {"type": "String", "displayName": "Transfer Description", "description": "The description of the transfer", "required": false}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}}}}}, "depositedRecordRefs": {"type": "Array", "displayName": "Deposited Record References", "description": "A collection of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the undeposited funds (or other holding) account within this transfer.", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "payments", "type": "String", "displayName": "Payments", "required": false}, {"value": "directIncomes", "type": "String", "displayName": "DirectIncomes", "required": false}, {"value": "journalEntries", "type": "String", "displayName": "JournalEntries", "required": false}]}}}}, "validation": {"warnings": [{"details": "When pushing a transfer using two different currencies, the exchange rate will be calculated and passed to QuickBooks, QuickBooks performs rounding on this value which may affect the values in the transfer"}, {"details": "Transfers between accounts in different currencies can only be made if multi-currency is enabled for company"}, {"details": "The currency of at least one of the accounts used must be the same as the company's currency"}], "information": []}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"description": {"type": "String", "displayName": "Transfer Description", "description": "The description of the transfer", "required": false}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}}}}}, "depositedRecordRefs": {"type": "Array", "displayName": "Deposited Record References", "description": "A collection of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the undeposited funds (or other holding) account within this transfer.", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "payments", "type": "String", "displayName": "Payments", "required": false}, {"value": "directIncomes", "type": "String", "displayName": "DirectIncomes", "required": false}, {"value": "journalEntries", "type": "String", "displayName": "JournalEntries", "required": false}]}}}}, "validation": {"warnings": [{"details": "When pushing a transfer using two different currencies, the exchange rate will be calculated and passed to QuickBooks, QuickBooks performs rounding on this value which may affect the values in the transfer"}, {"details": "Transfers between accounts in different currencies can only be made if multi-currency is enabled for company"}, {"details": "The currency of at least one of the accounts used must be the same as the company's currency"}], "information": []}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"description": {"type": "String", "displayName": "Transfer Description", "description": "The description of the transfer", "required": false, "validation": {"warnings": [{"field": "Description", "details": "Must be provided if pushing a bank deposit."}], "information": [{"field": "Description", "details": "Must not be longer than 2000 characters."}]}}, "date": {"type": "DateTime", "displayName": "Transfer Date", "description": "The date the transfer occurred", "required": true, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Must be provided."}]}}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountRef.Id", "details": "Must be different from To.AccountRef.Id."}, {"field": "AccountRef.Id", "details": "Must match the ID of an existing bank account in the company's base currency."}]}}}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [], "information": [{"field": "From.Amount", "details": "Must be equal to To.Amount."}, {"field": "From.Amount", "details": "Must be greater than zero."}]}}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountRef.Id", "details": "Must be different from From.AccountRef.Id."}, {"field": "AccountRef.Id", "details": "Must match the ID of an existing bank account in the company's base currency."}]}}}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [], "information": [{"field": "To.Amount", "details": "Must be equal to From.Amount."}, {"field": "To.Amount", "details": "Must be greater than zero."}]}}}}}} - Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"description": {"type": "String", "displayName": "Transfer Description", "description": "The description of the transfer", "required": true}, "contactRef": {"type": "Object", "displayName": "Contact Reference", "description": "The customer or supplier for this transfer if known", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true}}}, "date": {"type": "DateTime", "displayName": "Transfer Date", "description": "The date the transfer occurred", "required": true}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true}}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transfer", "required": true}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true}, "status": {"type": "String", "displayName": "Status", "description": "The status of the transfer in the account", "required": true}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true}}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transfer", "required": true}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true}, "status": {"type": "String", "displayName": "Status", "description": "The status of the transfer in the account", "required": true}}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this transfer is being tracked against", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": true}, "name": {"type": "String", "displayName": "Tracking Category Name", "description": "The name of the category referenced by the identifier", "required": true}}}, "depositedRecordRefs": {"type": "Array", "displayName": "Deposited Record References", "description": "A collection of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the undeposited funds (or other holding) account within this transfer.", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true}}}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true, "properties": {"isDeleted": {"type": "Boolean", "displayName": "IsDeleted", "description": "A boolean to indicate whether the object has been deleted", "required": true}}}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Transfer", "description": "Transfers to or from a bank account", "required": true, "properties": {"date": {"type": "DateTime", "displayName": "Transfer Date", "description": "The date the transfer occurred", "required": true}, "from": {"type": "Object", "displayName": "Transfered From", "description": "The account and amount that money was transfered from", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing bank account."}], "information": []}}}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "From.Amount", "details": "Must be equal to To.Amount."}, {"field": "From.Amount", "details": "Must be greater than zero."}], "information": []}}, "status": {"type": "String", "displayName": "Status", "description": "The status of the transfer in the account", "required": true, "options": [{"value": "Unknown", "type": "String", "displayName": "Unknown", "required": false}, {"value": "Unreconciled", "type": "String", "displayName": "Unreconciled", "required": false}, {"value": "Reconciled", "type": "String", "displayName": "Reconciled", "required": false}], "validation": {"warnings": [], "information": [{"field": "From.Status", "details": "Must be provided."}]}}}}, "to": {"type": "Object", "displayName": "Transfered To", "description": "The account and amount that money was transfered to", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the bank or nominal account", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing bank account."}], "information": []}}}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount transfered", "required": true, "validation": {"warnings": [{"field": "To.Amount", "details": "Must be equal to From.Amount."}, {"field": "To.Amount", "details": "Must be greater than zero."}], "information": []}}, "status": {"type": "String", "displayName": "Status", "description": "The status of the transfer in the account", "required": true, "options": [{"value": "Unknown", "type": "String", "displayName": "Unknown", "required": false}, {"value": "Unreconciled", "type": "String", "displayName": "Unreconciled", "required": false}, {"value": "Reconciled", "type": "String", "displayName": "Reconciled", "required": false}], "validation": {"warnings": [], "information": [{"field": "To.Status", "details": "Must be provided."}]}}}}}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-transfer: - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"description": "test transfers push 20230126 12.08", "contactRef": {"id": "80000028-167239230944", "dataType": "customers"}, "date": "2023-01-26T11:51:18.104Z", "from": {"accountRef": {"id": "80000028-1671794219", "dataType": "bankAccounts"}, "amount": 12}, "to": {"accountRef": {"id": "80000004-1671793811", "dataType": "bankAccounts"}, "amount": 12}, "status": "Unknown", "trackingCategoryRefs": [{"id": "80000001-1674553252", "name": "Class 1"}], "metadata": {"isDeleted": true}} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "date": "2022-10-23T00:00:00Z", "from": {"accountRef": {"dataType": "journalEntry"}, "currency": "GBP"}, "to": {"accountRef": {"dataType": "journalEntry"}, "currency": "GBP"}, "depositedRecordRefs": [{"dataType": "journalEntry"}]}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "8edbc81f-3f07-40f5-8c1e-5cf97ac512cb", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 357372} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "date": "2022-10-23T00:00:00Z", "from": {"accountRef": {"dataType": "journalEntry"}, "currency": "GBP"}, "to": {"accountRef": {"dataType": "journalEntry"}, "currency": "GBP"}, "depositedRecordRefs": [{"dataType": "journalEntry"}]} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-create-transfer: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "date": "2022-10-23T00:00:00Z", "from": {"accountRef": {"dataType": "journalEntry"}, "currency": "GBP"}, "to": {"accountRef": {"dataType": "journalEntry"}, "currency": "GBP"}, "depositedRecordRefs": [{"dataType": "journalEntry"}]} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "date": "2022-10-23T00:00:00Z", "from": {"accountRef": {"dataType": "journalEntry"}, "currency": "GBP"}, "to": {"accountRef": {"dataType": "journalEntry"}, "currency": "GBP"}, "depositedRecordRefs": [{"dataType": "journalEntry"}]}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "8edbc81f-3f07-40f5-8c1e-5cf97ac512cb", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 357372} - "400": - application/json: {} - "500": - application/json: {} - get-create-bank-transactions-model: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-create-bank-transactions-model: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - responses: - "200": - application/json: {"type": "Array", "displayName": "Brenden23", "required": false} - "401": - application/json: {} - "500": - application/json: {} - create-bank-transactions: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"accountId": "13d946f0-c5d5-42bc-b092-97ece17923ab", "transactions": [{"date": "2022-10-23T00:00:00Z"}]} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-create-bank-transactions: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"accountId": "13d946f0-c5d5-42bc-b092-97ece17923ab", "transactions": [{"date": "2022-10-23T00:00:00Z"}]} - responses: - "200": - application/json: {"data": {"accountId": "13d946f0-c5d5-42bc-b092-97ece17923ab", "transactions": [{"date": "2022-10-23T00:00:00Z"}]}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "a19a8e23-0a2e-4a04-bd20-73c44a3a3202", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 82259} - "400": - application/json: {} - "500": - application/json: {} - get-create-directCosts-model: - Dynamics 365 Business Central: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "", "required": true, "properties": {"reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": false}, "note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Note", "details": "is not supported and will be ignored"}]}}, "contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": false, "validation": {"warnings": [], "information": [{"field": "ContactRef", "details": "is not supported and will be ignored"}]}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "If unspecified, base currency is assumed. Must agree with the bank account in PaymentAllocations"}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "Required if the currency is not the base currency"}]}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The total amount of the direct transaction excluding any taxes", "required": false, "validation": {"warnings": [], "information": [{"field": "SubTotal", "details": "is not supported and will be ignored"}]}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the direct transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "TaxAmount", "details": "is not supported and will be ignored"}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the direct transaction, inclusive of tax", "required": false, "validation": {"warnings": [], "information": [{"field": "TotalAmount", "details": "is not supported and will be ignored"}]}}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": false}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.UnitAmount", "details": "is not supported and will be ignored"}]}}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "The number of units of goods or services purchased", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.Quantity", "details": "is not supported and will be ignored"}]}}, "discountAmount": {"type": "Number", "displayName": "Discount Amount", "description": "The value, in the given currency, of any discounts applied", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.DiscountAmount", "details": "is not supported and will be ignored"}]}}, "discountPercentage": {"type": "Number", "displayName": "Discount Percentage", "description": "The percentage rate of any discount that has been applied", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.DiscountPercentage", "details": "is not supported and will be ignored"}]}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the line, inclusive of discounts but exclusive of tax", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.SubTotal", "details": "Required if totalAmount is not specified"}]}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the line", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.TaxAmount", "details": "is not supported and will be ignored"}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the line, inclusive of discounts and tax", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.TotalAmount", "details": "Required if subTotal is not specified"}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": false, "validation": {"warnings": [], "information": [{"field": "AccountRef.Name", "details": "is not supported and will be ignored"}]}}}}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "The name of the tax rate referenced by the identifier", "required": false, "validation": {"warnings": [], "information": [{"field": "TaxRateRef.Name", "details": "is not supported and will be ignored"}]}}, "effectiveTaxRate": {"type": "Number", "displayName": "Effective Tax Rate", "description": "The total applied tax percentage, including compounding details", "required": false, "validation": {"warnings": [], "information": [{"field": "TaxRateRef.EffectiveTaxRate", "details": "is not supported and will be ignored"}]}}}}, "itemRef": {"type": "Object", "displayName": "Item Reference", "description": "Reference to the product or service type, or inventory item", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.ItemRef", "details": "is not supported and will be ignored"}]}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.TrackingCategoryRefs", "details": "is not supported and will be ignored"}]}}}, "validation": {"warnings": [{"field": "LineItems", "details": "Only one line is supported"}], "information": []}}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": false, "validation": {"warnings": [], "information": [{"field": "AccountRef.Name", "details": "is not supported and will be ignored"}]}}}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency for the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Payment.Currency", "details": "is not supported and will be ignored"}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the allocated payment and the currency of the base company", "required": false, "validation": {"warnings": [], "information": [{"field": "Payment.CurrencyRate", "details": "is not supported and will be ignored"}]}}, "paidOnDate": {"type": "DateTime", "displayName": "Paid On Date", "description": "The date the payment was paid", "required": false, "validation": {"warnings": [], "information": [{"field": "Payment.PaidOnDate", "details": "is not supported and will be ignored"}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been paid", "required": false, "validation": {"warnings": [], "information": [{"field": "Payment.TotalAmount", "details": "is not supported and will be ignored"}]}}}}, "allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": true, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Allocation.Currency", "details": "is not supported and will be ignored"}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the allocated payment and the currency of the transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Allocation.CurrencyRate", "details": "is not supported and will be ignored"}]}}, "allocatedOnDate": {"type": "DateTime", "displayName": "Allocated On Date", "description": "The date the payment was allocated", "required": false, "validation": {"warnings": [], "information": [{"field": "Allocation.AllocatedOnDate", "details": "is not supported and will be ignored"}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been allocated", "required": false, "validation": {"warnings": [], "information": [{"field": "Allocation.TotalAmount", "details": "is not supported and will be ignored"}]}}}}}, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "Only one line is supported"}], "information": []}}}} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "", "required": true, "properties": {"id": {"type": "String", "displayName": "Unique Direct Transaction ID", "description": "The identifier for the direct transaction, unique to the company", "required": false, "validation": {"warnings": [{"field": "Id", "details": "will be ignored on push. "}], "information": []}}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "is not supported by FreeAgent and will not be mapped. "}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": true, "validation": {"warnings": [], "information": [{"field": "Note", "details": "must be provided"}]}}, "contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": false, "validation": {"warnings": [{"field": "ContactRef.Id", "details": "is not supported by FreeAgent and will be ignored on push. "}], "information": []}}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": false, "validation": {"warnings": [{"field": "ContactRef.DataType", "details": "is not supported by FreeAgent and will be ignored on push. "}], "information": []}}}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": true, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "must be provided"}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": false}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": false, "validation": {"warnings": [{"field": "CurrencyRate", "details": "will be ignored on push. "}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": false, "validation": {"warnings": [{"field": "LineItems.Description", "details": "If a Note is provided, this field will be ignored on push. "}], "information": []}}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": false, "validation": {"warnings": [{"field": "LineItems.UnitAmount", "details": "will be ignored on push. "}], "information": []}}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "The number of units of goods or services purchased", "required": false, "validation": {"warnings": [{"field": "LineItems.Quantity", "details": "will be ignored on push. "}], "information": []}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the line, inclusive of discounts but exclusive of tax", "required": false}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the line", "required": false}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the line, inclusive of discounts and tax", "required": false}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountRef.Id", "details": "must be provided"}]}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": false, "validation": {"warnings": [{"field": "AccountRef.Name", "details": "will be ignored on push. "}], "information": []}}}}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": false, "validation": {"warnings": [{"field": "TaxRateRef.Id", "details": "will be ignored on push. "}], "information": []}}, "name": {"type": "String", "displayName": "Name", "description": "The name of the tax rate referenced by the identifier", "required": false, "validation": {"warnings": [{"field": "TaxRateRef.Name", "details": "will be ignored on push. "}], "information": []}}, "effectiveTaxRate": {"type": "Number", "displayName": "Effective Tax Rate", "description": "The total applied tax percentage, including compounding details", "required": false, "validation": {"warnings": [{"field": "TaxRateRef.EffectiveTaxRate", "details": "will be ignored on push. "}], "information": []}}}}}, "validation": {"warnings": [{"field": "LineItems", "details": "Exactly one line item must be specified"}], "information": []}}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the allocated payment", "required": false}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the allocated payment", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "Reference associated with the allocated payment", "required": false}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountRef.Id", "details": "must be provided"}]}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": false, "validation": {"warnings": [{"field": "AccountRef.Name", "details": "will be ignored on push. "}], "information": []}}}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency for the payment", "required": false}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the allocated payment and the currency of the base company", "required": false}, "paidOnDate": {"type": "DateTime", "displayName": "Paid On Date", "description": "The date the payment was paid", "required": false}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been paid", "required": false}}}, "allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": false, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transaction", "required": false}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the allocated payment and the currency of the transaction", "required": false}, "allocatedOnDate": {"type": "DateTime", "displayName": "Allocated On Date", "description": "The date the payment was allocated", "required": false}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been allocated", "required": false}}}}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The total amount of the direct transaction excluding any taxes", "required": false}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the direct transaction", "required": false}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the direct transaction, inclusive of tax", "required": false}, "modifiedDate": {"type": "DateTime", "displayName": "Modified Date", "description": "The date the record was last updated in the system cache", "required": false, "validation": {"warnings": [{"field": "ModifiedDate", "details": "will be ignored on push. "}], "information": []}}, "sourceModifiedDate": {"type": "DateTime", "displayName": "Source Modified Date", "description": "The date the record was last changed in the originating system", "required": false, "validation": {"warnings": [{"field": "SourceModifiedDate", "details": "will be ignored on push. "}], "information": []}}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": false}, "contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": true}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": false}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.UnitAmount", "details": "Should have the same sign across all line items"}]}}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "The number of units of goods or services purchased", "required": false}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}}, "validation": {"warnings": [{"field": "LineItems.AccountRef", "details": "Should not be a bank account"}, {"field": "LineItems.AccountRef", "details": "Should only be specified when pushing an expense"}], "information": []}}, "itemRef": {"type": "Object", "displayName": "Item Reference", "description": "Reference to the product or service type, or inventory item", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the item", "required": true}}, "validation": {"warnings": [{"field": "LineItems.ItemRef", "details": "Should only be specified when pushing an item (not an expense)"}], "information": []}}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": true}}, "validation": {"warnings": [{"field": "LineItems.TaxRateRef", "details": "Should be specified when item type is not 'Discount'"}], "information": []}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": true}}}}}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing account of type 'Bank' OR type 'Credit Card'"}], "information": []}}}}}}, "allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": true}}, "validation": {"warnings": [], "information": [{"field": "PaymentAllocations", "details": "Must contain a single allocation"}]}}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "Represents the check number"}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": false, "validation": {"warnings": [{"field": "Note", "details": "Max length of 4096 characters."}], "information": []}}, "contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "Must be a three letter ISO code"}, {"field": "Currency", "details": "Can only be set if the QuickBooks Desktop company has Multicurrency enabled."}], "information": [{"field": "Currency", "details": "If not set, will default to the default currency"}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "If not set, will default to the rate set within QuickBooks Desktop, if no rate is set in QuickBooks Desktop, it will default to 1."}, {"field": "CurrencyRate", "details": "Can only be set if the QuickBooks Desktop company has Multicurrency enabled."}]}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": true}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": true}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": true}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "The number of units of goods or services purchased", "required": true}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the line, inclusive of discounts but exclusive of tax", "required": false}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the line", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the line, inclusive of discounts and tax", "required": false}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": true}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": true}, "itemRef": {"type": "Object", "displayName": "Item Reference", "description": "Reference to the product or service type, or inventory item", "required": true}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": true}}}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the allocated payment", "required": true}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "validation": {"warnings": [], "information": [{"field": "Payment.AccountRef", "details": "The account in which to make the deposit"}]}}, "reference": {"type": "String", "displayName": "Reference", "description": "Reference associated with the allocated payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Payment.Reference", "details": "Use to reference the check number of this deposit."}]}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the allocated payment", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency for the payment", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the allocated payment and the currency of the base company", "required": true}, "paidOnDate": {"type": "DateTime", "displayName": "Paid On Date", "description": "The date the payment was paid", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been paid", "required": true}}}}, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "Must contain a single payment allocation"}], "information": []}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the direct transaction", "required": true}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The total amount of the direct transaction excluding any taxes", "required": false}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the direct transaction, inclusive of tax", "required": false}, "sourceModifiedDate": {"type": "DateTime", "displayName": "Source Modified Date", "description": "The date the record was last changed in the originating system", "required": false}, "modifiedDate": {"type": "DateTime", "displayName": "Modified Date", "description": "The date the record was last updated in the system cache", "required": false}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "Suppliers", "type": "String", "displayName": "Suppliers", "required": false}]}}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": false, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "If the issue date is not supplied, the current date on the server is used."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "Must be less than 22 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company."}]}}, "note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": false}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": false, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been allocated", "required": false, "validation": {"warnings": [{"field": "Allocation.TotalAmount", "details": "Must match the sum of the line items"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transaction", "required": false, "validation": {"warnings": [{"field": "Allocation.Currency", "details": "Must match the Currency of the company"}], "information": []}}}}, "payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been paid", "required": false, "validation": {"warnings": [{"field": "Payment.TotalAmount", "details": "Must match the sum of the line items"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency for the payment", "required": false, "validation": {"warnings": [{"field": "Payment.Currency", "details": "Must match the Currency of the company"}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountRef.Id", "details": "Must be Bank, Cash or Asset account"}]}}}}}}}, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "Must have exactly one payment allocation."}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": true, "validation": {"warnings": [{"field": "TrackingCategoryRefs.TrackingCategoryRefs", "details": "Must be a valid Id"}], "information": []}}}, "validation": {"warnings": [{"field": "LineItems.TrackingCategoryRefs", "details": "Only one tracking category of type CLASS can be provided per item."}, {"field": "LineItems.TrackingCategoryRefs", "details": "Only one tracking category of type DEPARTMENT can be provided per invoice."}, {"field": "LineItems.TrackingCategoryRefs", "details": "All DEPARTMENT tracking categories must be the same"}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must be an Expense or Income account"}], "information": []}}}, "validation": {"warnings": [{"field": "LineItems.AccountRef", "details": "Must be set if ItemRef is not"}], "information": []}}, "itemRef": {"type": "Object", "displayName": "Item Reference", "description": "Reference to the product or service type, or inventory item", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the item", "required": true}}, "validation": {"warnings": [{"field": "LineItems.ItemRef", "details": "Must be set if AccountRef is not"}], "information": []}}, "description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": false, "validation": {"warnings": [{"field": "LineItems.Description", "details": "Must be less than 4000 characters."}], "information": []}}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "The number of units of goods or services purchased", "required": true}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": true}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the line", "required": false, "validation": {"warnings": [{"field": "LineItems.TaxAmount", "details": "Must be specified on all line items or none. If specified will override QBO tax calculations."}], "information": []}}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": true, "validation": {"warnings": [], "information": [{"field": "TaxRateRef.Id", "details": "If an organisation has Automated Sales Tax enabled for US locales, then only 'TAX' (Automated Sales Tax) or 'NON' (no tax) can be used. If Automated Sales Tax is disabled for US locales then 'TAX' (Automated Sales Tax) will not be accepted and a different tax rate must be used."}]}}}, "validation": {"warnings": [{"field": "LineItems.TaxRateRef", "details": "Required for all companies except QuickBooks Online France companies."}], "information": []}}}}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true, "options": [{"value": "Suppliers", "type": "String", "displayName": "Suppliers", "required": false}]}}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": false, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "If the issue date is not supplied, the current date on the server is used."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "Must be less than 22 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company."}]}}, "note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": false}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": false, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been allocated", "required": false, "validation": {"warnings": [{"field": "Allocation.TotalAmount", "details": "Must match the sum of the line items"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transaction", "required": false, "validation": {"warnings": [{"field": "Allocation.Currency", "details": "Must match the Currency of the company"}], "information": []}}}}, "payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been paid", "required": false, "validation": {"warnings": [{"field": "Payment.TotalAmount", "details": "Must match the sum of the line items"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency for the payment", "required": false, "validation": {"warnings": [{"field": "Payment.Currency", "details": "Must match the Currency of the company"}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountRef.Id", "details": "Must be Bank, Cash or Asset account"}]}}}}}}}, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "Must have exactly one payment allocation."}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": true, "validation": {"warnings": [{"field": "TrackingCategoryRefs.TrackingCategoryRefs", "details": "Must be a valid Id"}], "information": []}}}, "validation": {"warnings": [{"field": "LineItems.TrackingCategoryRefs", "details": "Only one tracking category of type CLASS can be provided per item."}, {"field": "LineItems.TrackingCategoryRefs", "details": "Only one tracking category of type DEPARTMENT can be provided per invoice."}, {"field": "LineItems.TrackingCategoryRefs", "details": "All DEPARTMENT tracking categories must be the same"}], "information": []}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must be an Expense or Income account"}], "information": []}}}, "validation": {"warnings": [{"field": "LineItems.AccountRef", "details": "Must be set if ItemRef is not"}], "information": []}}, "itemRef": {"type": "Object", "displayName": "Item Reference", "description": "Reference to the product or service type, or inventory item", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the item", "required": true}}, "validation": {"warnings": [{"field": "LineItems.ItemRef", "details": "Must be set if AccountRef is not"}], "information": []}}, "description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": false, "validation": {"warnings": [{"field": "LineItems.Description", "details": "Must be less than 4000 characters."}], "information": []}}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "The number of units of goods or services purchased", "required": true}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": true}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the line", "required": false, "validation": {"warnings": [{"field": "LineItems.TaxAmount", "details": "Must be specified on all line items or none. If specified will override QBO tax calculations."}], "information": []}}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": true, "validation": {"warnings": [], "information": [{"field": "TaxRateRef.Id", "details": "If an organisation has Automated Sales Tax enabled for US locales, then only 'TAX' (Automated Sales Tax) or 'NON' (no tax) can be used. If Automated Sales Tax is disabled for US locales then 'TAX' (Automated Sales Tax) will not be accepted and a different tax rate must be used."}]}}}, "validation": {"warnings": [{"field": "LineItems.TaxRateRef", "details": "Required for all companies except QuickBooks Online France companies."}], "information": []}}}}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"reference": {"type": "String", "displayName": "Reference", "description": "The user reference for this direct cost.", "required": false}, "issueDate": {"type": "Number", "displayName": "Issue Date", "description": "The date this payment was issued.", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency in which the direct cost is issued in.", "required": true, "validation": {"warnings": [{"field": "currency", "details": "This must match the target account's default currency."}], "information": []}}, "currencyRate": {"type": "Number", "displayName": "Currency Rate", "description": "The currency rate associated with this transaction.", "required": true}, "accountRef": {"type": "Object", "displayName": "Bank Account", "description": "The bank account to pay this direct cost from.", "required": true, "properties": {"id": {"type": "String", "displayName": "Account Id", "description": "Nominal code of the bank account.", "required": true, "validation": {"warnings": [{"field": "accountRef.id", "details": "Must match the ID of an existing bank account and have a max length of 8 characters."}], "information": []}}}}, "subTotal": {"type": "Number", "displayName": "Sub Total", "description": "The net amount being paid in this direct cost.", "required": true, "validation": {"warnings": [], "information": [{"details": "This must equal the sum of the line net amounts"}]}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The tax amount being paid in this direct cost.", "required": true, "validation": {"warnings": [], "information": [{"details": "This must equal the sum of the line tax amounts"}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount being paid in this direct cost.", "required": true, "validation": {"warnings": [], "information": [{"details": "This must equal the sum of the line amounts"}]}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "Line items of the direct cost.", "required": true, "properties": {"description": {"type": "String", "displayName": "description", "description": "Description of the direct cost line item.", "required": false}, "accountRef": {"type": "Object", "displayName": "Nominal Code", "description": "Target bank account for the direct cost line item.", "required": true, "properties": {"id": {"type": "String", "displayName": "Id", "description": "The ID of the Account the line is linked to.", "required": true}}}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "Unit amount for the direct cost line item.", "required": true, "validation": {"warnings": [{"field": "LineItems.unitAmount", "details": "Cannot equal 0 and will be set to Net amount if not provided accordingly."}], "information": []}}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "Quantity for the direct cost line item.", "required": true, "validation": {"warnings": [{"field": "LineItems.quantity", "details": "Must be 1 or -1."}], "information": []}}, "subTotal": {"type": "Number", "displayName": "Net Amount", "description": "Amount for the direct cost line item. Debit entries are considered positive, and credit entries are considered negative.", "required": true, "validation": {"warnings": [{"field": "LineItems.subTotal", "details": "Cannot have both subtotal and tax amount as 0 for line item."}], "information": []}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "Tax amount for the direct cost line item.", "required": false, "validation": {"warnings": [{"field": "LineItems.taxAmount", "details": "Cannot have both tax amount and subtotal as 0 for line item."}], "information": []}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "Total amount for the direct cost line item.", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.totalAmount", "details": "Will be auto populated using tax amount and net amount."}]}}, "taxCode": {"type": "Number", "displayName": "Tax Code Id", "description": "The tax code ID associated with this transaction.", "required": true}, "trackingCategoryRefs": {"type": "Object", "displayName": "Tracking Category References", "description": "Tracking categories associated with this transaction.", "required": true, "properties": {"id": {"type": "String", "displayName": "Id", "description": "The ID of the tracking category associated with the transaction", "required": true, "validation": {"warnings": [{"field": "id", "details": "A department is required. If a project reference is provided, the cost code for that project must also be provided."}], "information": []}}}}}}}, "validation": {"warnings": [], "information": [{"details": "Pushing to Sage 50 2015 (v21) or below is not supported. To enable push, please upgrade to at least Sage 50 2016 (v22) and re-sync the company."}]}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": true, "validation": {"warnings": [], "information": [{"field": "Note", "details": "Must be used to provide payee's name and contain no more than 80 characters."}]}}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": true}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": true, "validation": {"warnings": [], "information": [{"field": "TaxRateRef.Id", "details": "Must be an existing tax rate in Sage Intacct."}]}}}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}}}, "description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.Description", "details": "Must not contain no more than 1000 characters."}]}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the line", "required": false}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the line, inclusive of discounts and tax", "required": false}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the line, inclusive of discounts but exclusive of tax", "required": false}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": false}, "name": {"type": "String", "displayName": "Tracking Category Name", "description": "The name of the category referenced by the identifier", "required": false}}}}, "validation": {"warnings": [], "information": [{"field": "LineItems", "details": "Must contain at least one line item."}]}}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"paidOnDate": {"type": "DateTime", "displayName": "Paid On Date", "description": "The date the payment was paid", "required": true}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been paid", "required": false, "validation": {"warnings": [], "information": [{"field": "Payment.TotalAmount", "details": "If provided, must match the sum of the line items."}]}}}}, "allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": true, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been allocated", "required": false, "validation": {"warnings": [], "information": [{"field": "Allocation.TotalAmount", "details": "If provided, must match the sum of the line items."}]}}}}}, "validation": {"warnings": [], "information": [{"field": "PaymentAllocations", "details": "Must contain a single allocation."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "When supplying a currency ensure that it exists in your Sage Intacct entity otherwise the request will fail."}], "information": []}}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Reference", "details": "Must not contain no more than 45 characters."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": false}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the direct transaction, inclusive of tax", "required": false, "validation": {"warnings": [], "information": [{"field": "TotalAmount", "details": "If provided, must match the sum of the line items."}]}}}} - Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": true}, "contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true}}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": true}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true}}}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "The name of the tax rate referenced by the identifier", "required": true}, "effectiveTaxRate": {"type": "Number", "displayName": "Effective Tax Rate", "description": "The total applied tax percentage, including compounding details", "required": true}}}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": true}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "The number of units of goods or services purchased", "required": true}, "discountAmount": {"type": "Number", "displayName": "Discount Amount", "description": "The value, in the given currency, of any discounts applied", "required": true}, "discountPercentage": {"type": "Number", "displayName": "Discount Percentage", "description": "The percentage rate of any discount that has been applied", "required": true}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the line, inclusive of discounts but exclusive of tax", "required": true}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the line", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the line, inclusive of discounts and tax", "required": true}, "itemRef": {"type": "Object", "displayName": "Item Reference", "description": "Reference to the product or service type, or inventory item", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the item", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "The name of the item referenced by the identifier", "required": true}}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": true}, "name": {"type": "String", "displayName": "Tracking Category Name", "description": "The name of the category referenced by the identifier", "required": true}}}, "tracking": {"type": "Object", "displayName": "Tracking", "description": "Information this item is being tracked against", "required": true, "properties": {"recordRefs": {"type": "Array", "displayName": "Record References", "description": "A collection of records this item is being tracked against", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true}}}, "invoiceTo": {"type": "Object", "displayName": "Invoice To", "description": "The entity the record should be invoiced to", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true}, "dataType": {"type": "String", "displayName": "DataType", "description": "The name of the data type for which the ID is valid.", "required": true}}}}}}}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the allocated payment", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the allocated payment", "required": true}, "reference": {"type": "String", "displayName": "Reference", "description": "Reference associated with the allocated payment", "required": true}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true}}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency for the payment", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the allocated payment and the currency of the base company", "required": true}, "paidOnDate": {"type": "DateTime", "displayName": "Paid On Date", "description": "The date the payment was paid", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been paid", "required": true}}}, "allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": true, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transaction", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the allocated payment and the currency of the transaction", "required": true}, "allocatedOnDate": {"type": "DateTime", "displayName": "Allocated On Date", "description": "The date the payment was allocated", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been allocated", "required": true}}}}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The total amount of the direct transaction excluding any taxes", "required": true}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the direct transaction", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the direct transaction, inclusive of tax", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true, "properties": {"isDeleted": {"type": "Boolean", "displayName": "IsDeleted", "description": "A boolean to indicate whether the object has been deleted", "required": true}}}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": true, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "Must be provided."}]}}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Reference", "details": "Must not exceed 255 characters."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": true, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Must be provided."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": false}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the direct transaction", "required": true, "validation": {"warnings": [], "information": [{"field": "TaxAmount", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the direct transaction, inclusive of tax", "required": true, "validation": {"warnings": [], "information": [{"field": "TotalAmount", "details": "Must be provided."}]}}, "contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": true, "validation": {"warnings": [{"field": "ContactRef.Id", "details": "Must be a valid GUID."}, {"field": "ContactRef.Id", "details": "Must match the ID of an existing contact."}], "information": [{"field": "ContactRef.Id", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "ContactRef", "details": "Must be provided."}]}}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must be a bank account."}, {"field": "AccountRef.Id", "details": "Must match the ID of an existing bank account."}], "information": [{"field": "AccountRef.Id", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "Payment.AccountRef", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "PaymentAllocations.Payment", "details": "Must be provided."}]}}, "allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": true, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount that has been allocated", "required": true, "validation": {"warnings": [{"field": "Allocation.TotalAmount", "details": "Must be equal to the sum of line items."}], "information": [{"field": "Allocation.TotalAmount", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "PaymentAllocations.Allocation", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "PaymentAllocations", "details": "Must be provided."}]}}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"description": {"type": "String", "displayName": "Description", "description": "Friendly name of the goods or services purchased", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems.Description", "details": "Must not be longer than 4000 characters long."}]}}, "quantity": {"type": "Number", "displayName": "Quantity", "description": "The number of units of goods or services purchased", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems.Quantity", "details": "Must be provided."}]}}, "unitAmount": {"type": "Number", "displayName": "Unit Amount", "description": "The price of each unit of goods or services", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems.UnitAmount", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the line, inclusive of discounts and tax", "required": false, "validation": {"warnings": [{"field": "LineItems.TotalAmount", "details": "When negative, the push item will be converted to a DirectIncome and will be pushed accordingly."}], "information": [{"field": "LineItems.TotalAmount", "details": "When one line is negative, all lines must be negative."}]}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the line", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems.TaxAmount", "details": "Must be provided."}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must be a valid GUID."}, {"field": "AccountRef.Id", "details": "Must match the ID of an existing account."}], "information": [{"field": "AccountRef.Id", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "LineItems.AccountRef", "details": "Must be provided."}]}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the item, unique per tracking category", "required": true, "validation": {"warnings": [], "information": [{"field": "TrackingCategoryRefs.Id", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "LineItems.TrackingCategoryRefs", "details": "Tracking categories must not have the same parent tracking category."}, {"field": "LineItems.TrackingCategoryRefs", "details": "Maximum of 2 Tracking Categories."}]}}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": false, "validation": {"warnings": [{"field": "TaxRateRef.Id", "details": "Must match the ID of an existing tax rate."}], "information": [{"field": "TaxRateRef.Id", "details": "If not provided, will be set to the default tax rate for the line's account."}]}}}}, "itemRef": {"type": "Object", "displayName": "Item Reference", "description": "Reference to the product or service type, or inventory item", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the item", "required": false, "validation": {"warnings": [{"field": "ItemRef.Id", "details": "Must be a valid GUID."}, {"field": "ItemRef.Id", "details": "Must match the ID of an existing item."}], "information": []}}}}}, "validation": {"warnings": [], "information": [{"field": "LineItems", "details": "Must be provided."}]}}}, "validation": {"warnings": [{"details": "When negative, the push item will be converted to a DirectIncome and will be pushed accordingly."}], "information": []}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Direct Cost", "description": "Direct Cost", "required": true, "properties": {"reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the direct transaction", "required": false}, "note": {"type": "String", "displayName": "Note", "description": "The note attached to the direct transaction", "required": false}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the direct transaction was issued", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the direct transaction and the base currency of the company", "required": false}, "contactRef": {"type": "Object", "displayName": "Contact Ref", "description": "The contact associated with the direct transaction, if known", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the record", "required": false}}, "validation": {"warnings": [], "information": [{"field": "ContactRef", "details": "Required when pushing a negative direct cost & should reference either a Customer or Supplier when provided"}]}}, "lineItems": {"type": "Array", "displayName": "Direct Transaction Lines", "description": "A collection of lines that detail items related to the direct transaction", "required": true, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the line, inclusive of discounts and tax", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.TotalAmount", "details": "Should be provided when SubTotal is not provided"}]}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the line, inclusive of discounts but exclusive of tax", "required": false, "validation": {"warnings": [], "information": [{"field": "LineItems.SubTotal", "details": "Should be provided when TotalAmount is not provided"}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the line item is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}}}, "taxRateRef": {"type": "Object", "displayName": "Tax Rate Reference", "description": "Reference to the tax rate code the line item is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the tax rate", "required": false}}}, "trackingCategoryRefs": {"type": "Array", "displayName": "Tracking Category References", "description": "A collection of categories this item is being tracked against", "required": false}}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the direct transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Is required when pushing a negative direct cost"}]}}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the direct transaction", "required": true, "properties": {"payment": {"type": "Object", "displayName": "Payment", "description": "The payment to be allocated", "required": true, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency for the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Payment.Currency", "details": "Is required when pushing a negative direct cost"}]}}, "accountRef": {"type": "Object", "displayName": "Account Reference", "description": "Reference to the account associated with the allocated payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}}}}}, "allocation": {"type": "Object", "displayName": "Allocation", "description": "The allocation information", "required": true, "properties": {"currency": {"type": "String", "displayName": "Currency", "description": "The currency of the transaction", "required": false, "validation": {"warnings": [], "information": [{"field": "Allocation.Currency", "details": "Is required when pushing a negative direct cost"}]}}}}}}}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-direct-cost: - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"reference": "test ref", "note": "directCost 21/03 09.20", "contactRef": {"id": "80000001-1671793885", "dataType": "suppliers"}, "issueDate": "2023-03-21T10:19:52.223Z", "currency": "USD", "lineItems": [{"description": "test description line 1", "unitAmount": 7, "quantity": 1, "discountAmount": 0, "discountPercentage": 0, "subTotal": 99, "taxAmount": 360, "totalAmount": 70, "accountRef": {"id": "8000000D-1671793811", "name": "Purchases - Hardware for Resale"}, "itemRef": {"id": "80000001-1674566705", "name": "item test"}, "trackingCategoryRefs": [{"id": "80000001-1674553252", "name": "Class 1"}]}], "paymentAllocations": [{"payment": {"note": "payment allocations note", "reference": "payment allocations reference", "accountRef": {"id": "80000028-1671794219", "name": "Bank Account 1"}, "paidOnDate": "2023-01-28T10:19:52.223Z", "totalAmount": 54}, "allocation": {"currencyRate": 0, "allocatedOnDate": "2023-01-29T10:19:52.223Z", "totalAmount": 88}}], "subTotal": 362, "taxAmount": 4, "totalAmount": 366} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "issueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "lineItems": [{"unitAmount": 2805.1, "quantity": 8357.67, "accountRef": {}, "tracking": {"recordRefs": [{"dataType": "trackingCategories"}], "invoiceTo": {"dataType": "journalEntry"}}}], "paymentAllocations": [], "subTotal": 3740.48, "taxAmount": 8101.43, "totalAmount": 3301.15}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "cb697b65-ce82-4e84-bf84-97eea82ac661", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 452447} - "400": - application/json: {} - "500": - application/json: {} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"reference": "Scenario One neg DC", "contactRef": {"id": "699f0091-b127-4796-9f15-41a2f42abeb2", "dataType": "suppliers"}, "issueDate": "2023-02-25", "currency": "GBP", "lineItems": [{"description": "negative direct cost", "unitAmount": 35, "quantity": -1, "subTotal": -35, "taxAmount": -7, "totalAmount": -42, "taxRateRef": {"id": "INPUT2"}, "itemRef": {"id": "965cfc0e-4d80-4059-9641-4a392f9ad549"}}], "paymentAllocations": [{"payment": {"accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4"}, "currency": "GBP"}, "allocation": {"totalAmount": -42}}], "subTotal": -35, "taxAmount": -7, "totalAmount": -42} - responses: - "200": - application/json: {"data": {"reference": "Scenario One neg DC", "contactRef": {"id": "699f0091-b127-4796-9f15-41a2f42abeb2", "dataType": "suppliers"}, "issueDate": "2023-02-25T00:00:00", "currency": "GBP", "lineItems": [{"description": "negative direct cost", "unitAmount": 35, "quantity": -1, "subTotal": -35, "taxAmount": -7, "totalAmount": -42, "taxRateRef": {"id": "INPUT2"}, "itemRef": {"id": "965cfc0e-4d80-4059-9641-4a392f9ad549"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4"}, "currency": "GBP", "paidOnDate": "0001-01-01T00:00:00", "totalAmount": 0}, "allocation": {"totalAmount": -42}}], "subTotal": 0, "taxAmount": -7, "totalAmount": -42}, "changes": [], "dataType": "directCosts", "companyId": "b5efee61-3fab-4a5d-9247-de03d6eda6db", "pushOperationKey": "33347930-fcc5-4f95-aa13-4a0f7291b559", "dataConnectionKey": "1e355304-4476-422e-95cb-fa2a6d47fab4", "requestedOnUtc": "2023-02-24T13:43:26.5109173Z", "status": "Pending", "validation": {"errors": [], "warnings": []}, "statusCode": 202} - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"issueDate": "2023-02-12", "currency": "GBP", "lineItems": [{"unitAmount": 15, "quantity": 1, "subTotal": 15, "accountRef": {"id": "288"}}], "paymentAllocations": [{"payment": {"accountRef": {"id": "750-1"}}, "allocation": {}}], "subTotal": 15, "taxAmount": 0, "totalAmount": 15} - responses: - "200": - application/json: {"data": {"sourceModifiedDate": "2023-02-12T15:15:53Z", "id": "372060709", "issueDate": "2023-02-12T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 15, "quantity": 1, "subTotal": 15, "taxAmount": 3, "totalAmount": 18, "accountRef": {"id": "288"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "372060709", "accountRef": {"id": "750-1"}, "currency": "GBP", "paidOnDate": "2023-02-12T00:00:00", "totalAmount": 18}, "allocation": {"currency": "GBP", "allocatedOnDate": "2023-02-12T00:00:00", "totalAmount": 18}}], "subTotal": 15, "taxAmount": 3, "totalAmount": 18}, "changes": [], "dataType": "directCosts", "companyId": "a23f79d6-7cc9-486c-b388-8ab88faea947", "pushOperationKey": "0659a24d-2b66-4979-971e-4b98c3ed7f61", "dataConnectionKey": "35e38cd5-66ea-41b8-b555-9efd5b792b68", "requestedOnUtc": "2023-02-12T15:15:51.1723204Z", "completedOnUtc": "2023-02-12T15:15:54.7161036Z", "status": "Success", "statusCode": 200} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"reference": "test ref", "note": "Test 1", "issueDate": "2023-03-31T00:00:00", "currency": "USD", "currencyRate": 0.5, "lineItems": [{"unitAmount": 9.99, "quantity": 1, "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99, "accountRef": {"id": "195"}}], "paymentAllocations": [{"payment": {"id": "4355", "note": "test note", "reference": "test reference", "accountRef": {"id": "348", "name": "CMRR Renewal"}, "currency": "USD", "paidOnDate": "2023-03-31T00:00:00", "totalAmount": 11.99}, "allocation": {"currency": "USD", "allocatedOnDate": "2023-03-31T00:00:00", "totalAmount": 11.99}}], "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99} - responses: - "200": - application/json: {"data": {"reference": "test ref", "note": "Test 1", "issueDate": "2023-03-31T00:00:00", "currency": "USD", "currencyRate": 0.5, "lineItems": [{"unitAmount": 9.99, "quantity": 1, "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99, "accountRef": {"id": "195"}, "taxRateRef": {"id": "95"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "4355", "note": "test note", "reference": "test reference", "accountRef": {"id": "348", "name": "CMRR Renewal"}, "currency": "USD", "paidOnDate": "2023-03-31T00:00:00", "totalAmount": 11.99}, "allocation": {"currency": "USD", "allocatedOnDate": "2023-03-31T00:00:00", "totalAmount": 11.99}}], "subTotal": 9.99, "taxAmount": 2, "totalAmount": 11.99}, "changes": [{"type": "Created", "recordRef": {"dataType": "directCosts"}}], "dataType": "directCosts", "companyId": "d7f743a9-1804-4116-8c8a-e606f7e2f66c", "pushOperationKey": "0d74c1ad-00ad-4731-9e6e-98a86056959a", "dataConnectionKey": "fa139396-523a-4a58-bf2b-8da82c8a673f", "requestedOnUtc": "2023-03-31T12:49:51.6503324Z", "status": "Pending", "statusCode": 202} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"issueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "lineItems": [], "paymentAllocations": [{"payment": {"accountRef": {}, "currency": "GBP", "paidOnDate": "2022-10-23T00:00:00Z"}, "allocation": {"currency": "GBP", "allocatedOnDate": "2022-10-23T00:00:00Z"}}], "subTotal": 3566.34, "taxAmount": 7664.68, "totalAmount": 208.93} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-create-payment-model: - FreeAgent: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing account."}], "information": []}}}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must match the sum of the line amounts."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": true}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true, "validation": {"warnings": [], "information": [{"field": "Lines.Amount", "details": "Must match the sum of the link amounts."}]}}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true}, "type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"value": "Invoice", "type": "String", "displayName": "Invoice", "required": false}, {"value": "CreditNote", "type": "String", "displayName": "CreditNote", "required": false}, {"value": "Other", "type": "String", "displayName": "Other", "required": false}]}}}}, "validation": {"warnings": [{"field": "Lines", "details": "Only one line may be specified"}], "information": []}}}} - FreshBooks: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true}, "type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true}}, "validation": {"warnings": [{"field": "Lines.Links", "details": "Payment Amount must not exceed Invoice Amount Due or available Customer Credit"}, {"field": "Lines.Links", "details": "Must be a Payment with one Invoice of PaymentOnAccount Link or two links of types Invoice and PaymentOnAccount"}], "information": []}}}, "validation": {"warnings": [{"field": "Lines", "details": "Only one line is supported"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "options": [{"value": "AED", "type": "Array", "displayName": "AED", "required": false}, {"value": "AFN", "type": "Array", "displayName": "AFN", "required": false}, {"value": "ALL", "type": "Array", "displayName": "ALL", "required": false}, {"value": "AMD", "type": "Array", "displayName": "AMD", "required": false}, {"value": "ANG", "type": "Array", "displayName": "ANG", "required": false}, {"value": "AOA", "type": "Array", "displayName": "AOA", "required": false}, {"value": "ARS", "type": "Array", "displayName": "ARS", "required": false}, {"value": "AUD", "type": "Array", "displayName": "AUD", "required": false}, {"value": "AWG", "type": "Array", "displayName": "AWG", "required": false}, {"value": "AZN", "type": "Array", "displayName": "AZN", "required": false}, {"value": "BAM", "type": "Array", "displayName": "BAM", "required": false}, {"value": "BBD", "type": "Array", "displayName": "BBD", "required": false}, {"value": "BDT", "type": "Array", "displayName": "BDT", "required": false}, {"value": "BGN", "type": "Array", "displayName": "BGN", "required": false}, {"value": "BHD", "type": "Array", "displayName": "BHD", "required": false}, {"value": "BIF", "type": "Array", "displayName": "BIF", "required": false}, {"value": "BMD", "type": "Array", "displayName": "BMD", "required": false}, {"value": "BND", "type": "Array", "displayName": "BND", "required": false}, {"value": "BOB", "type": "Array", "displayName": "BOB", "required": false}, {"value": "BRL", "type": "Array", "displayName": "BRL", "required": false}, {"value": "BSD", "type": "Array", "displayName": "BSD", "required": false}, {"value": "BTN", "type": "Array", "displayName": "BTN", "required": false}, {"value": "BWP", "type": "Array", "displayName": "BWP", "required": false}, {"value": "BYR", "type": "Array", "displayName": "BYR", "required": false}, {"value": "BZD", "type": "Array", "displayName": "BZD", "required": false}, {"value": "CAD", "type": "Array", "displayName": "CAD", "required": false}, {"value": "CDF", "type": "Array", "displayName": "CDF", "required": false}, {"value": "CHF", "type": "Array", "displayName": "CHF", "required": false}, {"value": "CLP", "type": "Array", "displayName": "CLP", "required": false}, {"value": "CNY", "type": "Array", "displayName": "CNY", "required": false}, {"value": "COP", "type": "Array", "displayName": "COP", "required": false}, {"value": "CRC", "type": "Array", "displayName": "CRC", "required": false}, {"value": "CUC", "type": "Array", "displayName": "CUC", "required": false}, {"value": "CUP", "type": "Array", "displayName": "CUP", "required": false}, {"value": "CVE", "type": "Array", "displayName": "CVE", "required": false}, {"value": "CZK", "type": "Array", "displayName": "CZK", "required": false}, {"value": "DJF", "type": "Array", "displayName": "DJF", "required": false}, {"value": "DKK", "type": "Array", "displayName": "DKK", "required": false}, {"value": "DOP", "type": "Array", "displayName": "DOP", "required": false}, {"value": "DZD", "type": "Array", "displayName": "DZD", "required": false}, {"value": "EGP", "type": "Array", "displayName": "EGP", "required": false}, {"value": "ERN", "type": "Array", "displayName": "ERN", "required": false}, {"value": "ETB", "type": "Array", "displayName": "ETB", "required": false}, {"value": "EUR", "type": "Array", "displayName": "EUR", "required": false}, {"value": "FJD", "type": "Array", "displayName": "FJD", "required": false}, {"value": "FKP", "type": "Array", "displayName": "FKP", "required": false}, {"value": "GBP", "type": "Array", "displayName": "GBP", "required": false}, {"value": "GEL", "type": "Array", "displayName": "GEL", "required": false}, {"value": "GGP", "type": "Array", "displayName": "GGP", "required": false}, {"value": "GHS", "type": "Array", "displayName": "GHS", "required": false}, {"value": "GIP", "type": "Array", "displayName": "GIP", "required": false}, {"value": "GMD", "type": "Array", "displayName": "GMD", "required": false}, {"value": "GNF", "type": "Array", "displayName": "GNF", "required": false}, {"value": "GTQ", "type": "Array", "displayName": "GTQ", "required": false}, {"value": "GYD", "type": "Array", "displayName": "GYD", "required": false}, {"value": "HKD", "type": "Array", "displayName": "HKD", "required": false}, {"value": "HNL", "type": "Array", "displayName": "HNL", "required": false}, {"value": "HRK", "type": "Array", "displayName": "HRK", "required": false}, {"value": "HTG", "type": "Array", "displayName": "HTG", "required": false}, {"value": "HUF", "type": "Array", "displayName": "HUF", "required": false}, {"value": "IDR", "type": "Array", "displayName": "IDR", "required": false}, {"value": "ILS", "type": "Array", "displayName": "ILS", "required": false}, {"value": "IMP", "type": "Array", "displayName": "IMP", "required": false}, {"value": "INR", "type": "Array", "displayName": "INR", "required": false}, {"value": "IQD", "type": "Array", "displayName": "IQD", "required": false}, {"value": "IRR", "type": "Array", "displayName": "IRR", "required": false}, {"value": "ISK", "type": "Array", "displayName": "ISK", "required": false}, {"value": "JEP", "type": "Array", "displayName": "JEP", "required": false}, {"value": "JMD", "type": "Array", "displayName": "JMD", "required": false}, {"value": "JOD", "type": "Array", "displayName": "JOD", "required": false}, {"value": "JPY", "type": "Array", "displayName": "JPY", "required": false}, {"value": "KES", "type": "Array", "displayName": "KES", "required": false}, {"value": "KGS", "type": "Array", "displayName": "KGS", "required": false}, {"value": "KHR", "type": "Array", "displayName": "KHR", "required": false}, {"value": "KMF", "type": "Array", "displayName": "KMF", "required": false}, {"value": "KPW", "type": "Array", "displayName": "KPW", "required": false}, {"value": "KRW", "type": "Array", "displayName": "KRW", "required": false}, {"value": "KWD", "type": "Array", "displayName": "KWD", "required": false}, {"value": "KYD", "type": "Array", "displayName": "KYD", "required": false}, {"value": "KZT", "type": "Array", "displayName": "KZT", "required": false}, {"value": "LAK", "type": "Array", "displayName": "LAK", "required": false}, {"value": "LBP", "type": "Array", "displayName": "LBP", "required": false}, {"value": "LKR", "type": "Array", "displayName": "LKR", "required": false}, {"value": "LRD", "type": "Array", "displayName": "LRD", "required": false}, {"value": "LSL", "type": "Array", "displayName": "LSL", "required": false}, {"value": "LYD", "type": "Array", "displayName": "LYD", "required": false}, {"value": "MAD", "type": "Array", "displayName": "MAD", "required": false}, {"value": "MDL", "type": "Array", "displayName": "MDL", "required": false}, {"value": "MGA", "type": "Array", "displayName": "MGA", "required": false}, {"value": "MKD", "type": "Array", "displayName": "MKD", "required": false}, {"value": "MMK", "type": "Array", "displayName": "MMK", "required": false}, {"value": "MNT", "type": "Array", "displayName": "MNT", "required": false}, {"value": "MOP", "type": "Array", "displayName": "MOP", "required": false}, {"value": "MRO", "type": "Array", "displayName": "MRO", "required": false}, {"value": "MUR", "type": "Array", "displayName": "MUR", "required": false}, {"value": "MVR", "type": "Array", "displayName": "MVR", "required": false}, {"value": "MWK", "type": "Array", "displayName": "MWK", "required": false}, {"value": "MXN", "type": "Array", "displayName": "MXN", "required": false}, {"value": "MYR", "type": "Array", "displayName": "MYR", "required": false}, {"value": "MZN", "type": "Array", "displayName": "MZN", "required": false}, {"value": "NAD", "type": "Array", "displayName": "NAD", "required": false}, {"value": "NGN", "type": "Array", "displayName": "NGN", "required": false}, {"value": "NIO", "type": "Array", "displayName": "NIO", "required": false}, {"value": "NOK", "type": "Array", "displayName": "NOK", "required": false}, {"value": "NPR", "type": "Array", "displayName": "NPR", "required": false}, {"value": "NZD", "type": "Array", "displayName": "NZD", "required": false}, {"value": "OMR", "type": "Array", "displayName": "OMR", "required": false}, {"value": "PAB", "type": "Array", "displayName": "PAB", "required": false}, {"value": "PEN", "type": "Array", "displayName": "PEN", "required": false}, {"value": "PGK", "type": "Array", "displayName": "PGK", "required": false}, {"value": "PHP", "type": "Array", "displayName": "PHP", "required": false}, {"value": "PKR", "type": "Array", "displayName": "PKR", "required": false}, {"value": "PLN", "type": "Array", "displayName": "PLN", "required": false}, {"value": "PYG", "type": "Array", "displayName": "PYG", "required": false}, {"value": "QAR", "type": "Array", "displayName": "QAR", "required": false}, {"value": "RON", "type": "Array", "displayName": "RON", "required": false}, {"value": "RSD", "type": "Array", "displayName": "RSD", "required": false}, {"value": "RUB", "type": "Array", "displayName": "RUB", "required": false}, {"value": "RWF", "type": "Array", "displayName": "RWF", "required": false}, {"value": "SAR", "type": "Array", "displayName": "SAR", "required": false}, {"value": "SBD", "type": "Array", "displayName": "SBD", "required": false}, {"value": "SCR", "type": "Array", "displayName": "SCR", "required": false}, {"value": "SDG", "type": "Array", "displayName": "SDG", "required": false}, {"value": "SEK", "type": "Array", "displayName": "SEK", "required": false}, {"value": "SGD", "type": "Array", "displayName": "SGD", "required": false}, {"value": "SHP", "type": "Array", "displayName": "SHP", "required": false}, {"value": "SLL", "type": "Array", "displayName": "SLL", "required": false}, {"value": "SOS", "type": "Array", "displayName": "SOS", "required": false}, {"value": "SPL", "type": "Array", "displayName": "SPL", "required": false}, {"value": "SRD", "type": "Array", "displayName": "SRD", "required": false}, {"value": "STD", "type": "Array", "displayName": "STD", "required": false}, {"value": "SVC", "type": "Array", "displayName": "SVC", "required": false}, {"value": "SYP", "type": "Array", "displayName": "SYP", "required": false}, {"value": "SZL", "type": "Array", "displayName": "SZL", "required": false}, {"value": "THB", "type": "Array", "displayName": "THB", "required": false}, {"value": "TJS", "type": "Array", "displayName": "TJS", "required": false}, {"value": "TMT", "type": "Array", "displayName": "TMT", "required": false}, {"value": "TND", "type": "Array", "displayName": "TND", "required": false}, {"value": "TOP", "type": "Array", "displayName": "TOP", "required": false}, {"value": "TRY", "type": "Array", "displayName": "TRY", "required": false}, {"value": "TTD", "type": "Array", "displayName": "TTD", "required": false}, {"value": "TVD", "type": "Array", "displayName": "TVD", "required": false}, {"value": "TWD", "type": "Array", "displayName": "TWD", "required": false}, {"value": "TZS", "type": "Array", "displayName": "TZS", "required": false}, {"value": "UAH", "type": "Array", "displayName": "UAH", "required": false}, {"value": "UGX", "type": "Array", "displayName": "UGX", "required": false}, {"value": "USD", "type": "Array", "displayName": "USD", "required": false}, {"value": "UYU", "type": "Array", "displayName": "UYU", "required": false}, {"value": "UZS", "type": "Array", "displayName": "UZS", "required": false}, {"value": "VEF", "type": "Array", "displayName": "VEF", "required": false}, {"value": "VND", "type": "Array", "displayName": "VND", "required": false}, {"value": "VUV", "type": "Array", "displayName": "VUV", "required": false}, {"value": "WST", "type": "Array", "displayName": "WST", "required": false}, {"value": "XAF", "type": "Array", "displayName": "XAF", "required": false}, {"value": "XCD", "type": "Array", "displayName": "XCD", "required": false}, {"value": "XDR", "type": "Array", "displayName": "XDR", "required": false}, {"value": "XOF", "type": "Array", "displayName": "XOF", "required": false}, {"value": "XPF", "type": "Array", "displayName": "XPF", "required": false}, {"value": "YER", "type": "Array", "displayName": "YER", "required": false}, {"value": "ZAR", "type": "Array", "displayName": "ZAR", "required": false}, {"value": "ZMW", "type": "Array", "displayName": "ZMW", "required": false}, {"value": "ZWD", "type": "Array", "displayName": "ZWD", "required": false}], "validation": {"warnings": [{"field": "Currency", "details": "Can be used for Payments on Account only"}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}}} - MYOB AccountRight and Essentials: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true, "validation": {"warnings": [{"field": "CustomerRef.Id", "details": "Must be a valid GUID."}, {"field": "CustomerRef.Id", "details": "Must match the ID of an existing customer."}], "information": [{"field": "CustomerRef.Id", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "CustomerRef", "details": "Must be provided."}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must be a valid GUID."}, {"field": "AccountRef.Id", "details": "Must match the ID of an existing account."}], "information": [{"field": "AccountRef.Id", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "AccountRef", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Precision must be maximum of two decimal places."}, {"field": "TotalAmount", "details": "Must be greater than zero."}], "information": [{"field": "TotalAmount", "details": "Must be provided and must equal the sum of the link items amount."}]}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Must be provided."}]}}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Reference", "details": "Must not be greater than 8 characters long."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "options": [{"value": "AUD", "type": "String", "displayName": "Australian Dollar", "required": false}], "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Must be provided."}]}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true, "validation": {"warnings": [], "information": [{"field": "Lines.Amount", "details": "Must be provided."}]}}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true, "validation": {"warnings": [], "information": [{"field": "Links.Id", "details": "Must be provided."}]}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true, "validation": {"warnings": [], "information": [{"field": "Links.Amount", "details": "Precision must be maximum of two decimal places."}, {"field": "Links.Amount", "details": "Must be provided."}]}}, "type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"value": "Invoice", "type": "String", "required": false}], "validation": {"warnings": [], "information": [{"field": "Links.Type", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "Lines.Links", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "Lines", "details": "Must be provided."}]}}}} - Oracle NetSuite: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true}}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing account of type 'Bank' OR type 'Asset' (with category 'FixedAsset'/'OthAsset'/'OthCurrAsset') OR type 'Liability' (with category 'LongTermLiab'/'OthCurrLiab') OR type 'Expense' (with category 'Expense'/'OthExpense')"}], "information": []}}}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must be greater than zero"}, {"field": "TotalAmount", "details": "Must be provided and must be equal to the sum of the lines amounts"}], "information": []}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "If the currency is set make sure it's the same as the 'Invoice' and/or 'CreditMemo' currency"}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "The id format should be 'location-'"}], "information": [{"field": "Reference", "details": "This field can be used to provide a tracking category id (Location only)"}]}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true, "validation": {"warnings": [{"field": "Links.Id", "details": "If the Link Type specified is an 'Invoice' or 'CreditNote' make sure the status is either 'PartiallyPaid' or 'Submitted'"}], "information": []}}, "type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"value": "Invoice", "type": "String", "displayName": "Invoice", "required": false}, {"value": "CreditNote", "type": "String", "displayName": "Credit Note", "required": false}, {"value": "PaymentOnAccount", "type": "String", "displayName": "Payment On Account", "required": false}]}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true}}}}}}} - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true, "validation": {"warnings": [{"field": "CustomerRef.Id", "details": "Must match the ID of an existing supplier."}], "information": []}}}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing 'Bank' or 'Other Current Asset' account."}], "information": [{"field": "AccountRef.Id", "details": "Not required if total amount of the payment is 0."}]}}}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "Max length of 20 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "Must be a three letter ISO code that matches the currency of the customer."}, {"field": "Currency", "details": "Can only be set if the QuickBooks Desktop company has Multicurrency enabled."}], "information": [{"field": "Currency", "details": "If not set, will default to the default currency of the customer."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "If not set, will default to the rate set within QuickBooks Desktop, if no rate is set in QuickBooks Desktop, it will default to 1."}, {"field": "CurrencyRate", "details": "Can only be set if the QuickBooks Desktop company has Multicurrency enabled."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must match the sum of amounts in the lines"}], "information": []}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true, "validation": {"warnings": [{"field": "Lines.Amount", "details": "Amount plus the sum of amounts in the links must equal 0"}], "information": []}}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"value": "Invoice", "type": "String", "displayName": "Invoice", "required": false}, {"value": "CreditNote", "type": "String", "displayName": "Credit Note", "required": false}, {"value": "PaymentOnAccount", "type": "String", "displayName": "Payment On Account", "required": false}], "validation": {"warnings": [{"field": "Links.Type", "details": "Only 1 link with type 'PaymentOnAccount' may be specified per line, this line may contain no other links"}, {"field": "Links.Type", "details": "Only 1 link with type 'Invoice' may be specified per line"}], "information": []}}, "id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true}}}}}}} - QuickBooks Online Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true}}, "validation": {"warnings": [], "information": [{"field": "CustomerRef", "details": "Must be the ID of the Customer associated with the Invoice, Credit Note or Payment On Account."}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}}, "validation": {"warnings": [], "information": [{"field": "AccountRef", "details": "Must match the ID of an existing Account."}]}}, "paymentMethodRef": {"type": "Object", "displayName": "Payment Method Reference", "description": "Reference to the method of this payment", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the payment method", "required": true}}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company"}]}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": false, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"value": "Invoice", "type": "String", "displayName": "Invoice", "required": false}, {"value": "CreditNote", "type": "String", "displayName": "Credit Note", "required": false}, {"value": "PaymentOnAccount", "type": "String", "displayName": "Payment On Account", "required": false}]}, "id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true}}}}}}} - QuickBooks Online: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true}}, "validation": {"warnings": [], "information": [{"field": "CustomerRef", "details": "Must be the ID of the Customer associated with the Invoice, Credit Note or Payment On Account."}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}}, "validation": {"warnings": [], "information": [{"field": "AccountRef", "details": "Must match the ID of an existing Account."}]}}, "paymentMethodRef": {"type": "Object", "displayName": "Payment Method Reference", "description": "Reference to the method of this payment", "required": false, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the payment method", "required": true}}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company"}]}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": false, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"value": "Invoice", "type": "String", "displayName": "Invoice", "required": false}, {"value": "CreditNote", "type": "String", "displayName": "Credit Note", "required": false}, {"value": "PaymentOnAccount", "type": "String", "displayName": "Payment On Account", "required": false}]}, "id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true}}}}}}} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Bank Account", "description": "The bank account to pay this invoice from.", "required": true, "properties": {"id": {"type": "String", "displayName": "Account Id", "description": "Nominal code of the bank account.", "required": true, "validation": {"warnings": [{"field": "accountRef.id", "details": "Must match the ID of an existing bank account and have a max length of 8 characters."}], "information": []}}}}, "customerRef": {"type": "Object", "displayName": "Customer", "description": "Customer to be paid.", "required": true, "properties": {"id": {"type": "String", "displayName": "Customer Id", "description": "Identifier of the customer.", "required": true, "validation": {"warnings": [{"field": "customerRef.id", "details": "Must match the ID of an existing customer and have a max length of 8 characters."}], "information": []}}}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount being paid to the customer.", "required": true, "validation": {"warnings": [], "information": [{"details": "This must equal the sum of the line amounts"}]}}, "reference": {"type": "Number", "displayName": "Reference", "description": "The user reference for this invoice payment.", "required": false}, "date": {"type": "Number", "displayName": "Issue Date", "description": "The date this payment was issued.", "required": true}, "note": {"type": "Number", "displayName": "Note", "description": "A description of the payment.", "required": false}, "lines": {"type": "Array", "displayName": "Line Items", "description": "Line items of the payment.", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The amount of this line item", "required": true, "validation": {"warnings": [], "information": [{"details": "this must equal the negative of the sum of the link amounts"}]}}, "links": {"type": "Array", "displayName": "Links", "description": "Links to the invoice being paid.", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The amount to be added to the value of the invoice", "required": true, "validation": {"warnings": [], "information": [{"details": "When paying off an invoice, this value will be negative"}]}}, "id": {"type": "String", "displayName": "Invoice Id", "description": "The ID of the invoice to pay", "required": true}, "type": {"type": "String", "displayName": "Payment Link Type", "description": "The type of the item to be paid", "required": true, "options": [{"value": "Invoice", "type": "String", "displayName": "Invoice", "required": false}, {"value": "PaymentOnAccount", "type": "String", "displayName": "Payment On Account", "required": false}, {"value": "Refund", "type": "String", "displayName": "Refund", "required": false}, {"value": "CreditNote", "type": "String", "displayName": "Credit Note", "required": false}, {"value": "Payment", "type": "String", "displayName": "Payment", "required": false}]}}}}, "validation": {"warnings": [], "information": [{"details": "Sage 50 only supports one line item per invoice payment so all lines will be merged together in the response."}]}}}, "validation": {"warnings": [], "information": [{"details": "Pushing to Sage 50 2015 (v21) or below is not supported. To enable push, please upgrade to at least Sage 50 2016 (v22) and re-sync the company."}]}} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must match the ID of an existing Account."}], "information": [{"field": "AccountRef.Id", "details": "Must be provided."}]}}}, "validation": {"warnings": [{"field": "AccountRef", "details": "Required unless the Payment is only allocating a Credit Note."}], "information": []}}, "customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true, "validation": {"warnings": [{"field": "CustomerRef.Id", "details": "Must match the ID of an existing Customer."}], "information": [{"field": "CustomerRef.Id", "details": "Must be provided."}]}}}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must be zero when allocating against Invoices using a Credit Note only."}, {"field": "TotalAmount", "details": "Must equal the sum of the link items amount."}], "information": [{"field": "TotalAmount", "details": "Must be provided."}]}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false, "validation": {"warnings": [{"field": "Note", "details": "Should not be longer than 25 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "If supplied, must match the currency of the customer."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true, "validation": {"warnings": [], "information": [{"field": "Links.Id", "details": "Must be provided."}]}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true, "validation": {"warnings": [{"field": "Links.Amount", "details": "Must be greater than zero except when Type is Invoice"}], "information": [{"field": "Links.Amount", "details": "Must be provided."}]}}, "type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"value": "Invoice", "type": "String", "displayName": "Invoice", "required": false}, {"value": "PaymentOnAccount", "type": "String", "displayName": "PaymentOnAccount", "required": false}, {"value": "Refund", "type": "String", "displayName": "Refund", "required": false}, {"value": "CreditNote", "type": "String", "displayName": "CreditNote", "required": false}], "validation": {"warnings": [], "information": [{"field": "Links.Type", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "Lines.Links", "details": "Must be provided."}]}}}}}} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [], "information": [{"field": "TotalAmount", "details": "Must equal the sum of Lines.Amount."}]}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Note", "details": "Must be less than 1000 characters."}]}}, "paymentMethodRef": {"type": "Object", "displayName": "Payment Method Reference", "description": "Reference to the method of this payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the payment method", "required": true, "options": [{"value": "1", "type": "String", "displayName": "Printed Check", "required": false}, {"value": "3", "type": "String", "displayName": "Credit Card", "required": false}, {"value": "5", "type": "String", "displayName": "EFT", "required": false}, {"value": "6", "type": "String", "displayName": "Cash", "required": false}]}}}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Reference", "details": "Can be used to set the Document/Check No. in Sage Intacct."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "Is required if currency is provided."}]}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Must occur after the date the invoice was created."}]}}, "customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true, "validation": {"warnings": [], "information": [{"field": "CustomerRef.Id", "details": "Must be an existing customer ID in Sage Intacct."}]}}}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountRef.Id", "details": "For undeposited payments use the GL account record number to charge."}, {"field": "AccountRef.Id", "details": "To charge either a savings, checking or credit card account use its associated GL account number."}]}}}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true, "validation": {"warnings": [], "information": [{"field": "Lines.Amount", "details": "When added together with the sum of the Links.Amount the total must be zero."}]}}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true, "validation": {"warnings": [], "information": [{"field": "Links.Id", "details": "Must be a valid Record No. from accounts receivable of either an invoice for an 'Invoice', adjustment for a 'CreditNote' or an advance for a 'PaymentOnAccount' in Sage Intacct."}, {"field": "Links.Id", "details": "Must be an integer."}, {"field": "Links.Id", "details": "Must related to CustomerRef.Id in Sage Intacct."}]}}, "type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "validation": {"warnings": [], "information": [{"field": "Links.Type", "details": "Must be one of Invoiceor CreditNoteor PaymentOnAccount."}]}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true, "validation": {"warnings": [], "information": [{"field": "Links.Amount", "details": "Must not be more than the total amount due for an invoice or the available funds in the account to be charged."}]}}}, "validation": {"warnings": [], "information": [{"field": "Lines.Links", "details": "No more than two links can exist when paying for an invoice via a CreditNoteor PaymentOnAccount."}, {"field": "Lines.Links", "details": "Must contain only one Invoice."}]}}}, "validation": {"warnings": [], "information": [{"field": "Lines", "details": "Must contain at least one payment line."}]}}}, "validation": {"warnings": [], "information": [{"details": "Sage Intacct handles allocated payments only."}]}} - Sandbox: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true}, "companyName": {"type": "String", "displayName": "Name", "description": "The name of the customer referenced by the identifier", "required": true}}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true}}}, "paymentMethodRef": {"type": "Object", "displayName": "Payment Method Reference", "description": "Reference to the method of this payment", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the payment method", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "The name of the payment method referenced by the identifier", "required": true}}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": true}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": true}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true}, "id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the currency of the linked transaction", "required": true}}}, "allocatedOnDate": {"type": "DateTime", "displayName": "Allocated On Date", "description": "The date the payment was allocated", "required": true}}}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true, "properties": {"isDeleted": {"type": "Boolean", "displayName": "IsDeleted", "description": "A boolean to indicate whether the object has been deleted", "required": true}}}}} - Xero: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true, "validation": {"warnings": [{"field": "CustomerRef.Id", "details": "Must be a valid GUID."}, {"field": "CustomerRef.Id", "details": "Must match the ID of an existing account."}], "information": [{"field": "CustomerRef.Id", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "CustomerRef", "details": "Must be provided."}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "Must be a valid GUID."}, {"field": "AccountRef.Id", "details": "Must match the ID of an existing account."}], "information": [{"field": "AccountRef.Id", "details": "Must be either a type of BANK account or enable payments must be switched on."}]}}}, "validation": {"warnings": [], "information": [{"field": "AccountRef", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must be greater than 0, unless the payment is a credit note allocation."}], "information": [{"field": "TotalAmount", "details": "Must be provided and must equal the sum of the link items amount."}]}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Must be provided."}]}}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": false}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Must be provided."}]}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The total amount for the line in the payment currency", "required": true, "validation": {"warnings": [], "information": [{"field": "Lines.Amount", "details": "Must be provided."}]}}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true, "validation": {"warnings": [{"field": "Links.Id", "details": "Must be a valid GUID."}], "information": [{"field": "Links.Id", "details": "Invoice and Credit Note ID must be provided in order to allocate a Credit Note to an Invoice."}, {"field": "Links.Id", "details": "Must be provided."}]}}, "amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true, "validation": {"warnings": [], "information": [{"field": "Links.Amount", "details": "Must be provided."}]}}, "type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"value": "Invoice", "type": "String", "displayName": "Invoice", "required": false}, {"value": "CreditNote", "type": "String", "displayName": "CreditNote", "required": false}, {"value": "Payment", "type": "String", "displayName": "Payment", "required": false}], "validation": {"warnings": [], "information": [{"field": "Links.Type", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "Lines.Links", "details": "Must be provided."}]}}}, "validation": {"warnings": [], "information": [{"field": "Lines", "details": "Must be provided."}]}}}} - Zoho Books: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"type": "Object", "displayName": "Payment", "description": "A payment represents an allocation of transactions across an 'accounts receivable' account (customer)", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true, "properties": {"id": {"type": "String", "displayName": "Account ID", "description": "The identifier for the account", "required": true, "validation": {"warnings": [{"field": "AccountRef.Id", "details": "AccountRef.ID is required when making a payment to an invoice and/or a payment on account"}], "information": []}}}}, "customerRef": {"type": "Object", "displayName": "Customer Reference", "description": "Reference to the customer the payment has been sent by", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The reference identifier for the customer", "required": true}}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "validation": {"warnings": [{"field": "Currency", "details": "must match the currency of any invoices or credit notes"}], "information": []}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "must be greater than or equal to 0"}], "information": []}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "properties": {"links": {"type": "Array", "displayName": "Links", "description": "A collection of linked transactions", "required": true, "properties": {"amount": {"type": "Number", "displayName": "Amount", "description": "The amount by which the balance of the linked entity is altered, in the currency of the linked entity", "required": true, "validation": {"warnings": [{"field": "Links.Amount", "details": "the sum of all link amounts must equal the negated total amount of the payment"}], "information": []}}, "id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the referenced transaction", "required": true}, "type": {"type": "String", "displayName": "Link Type", "description": "The type of transaction that is being linked", "required": true, "options": [{"type": "Array", "displayName": "Invoice", "required": false}, {"type": "Array", "displayName": "CreditNote", "required": false}, {"type": "Array", "displayName": "PaymentOnAccount", "required": false}]}}, "validation": {"warnings": [{"field": "Lines.Links", "details": "if a credit note link is provided, exactly one invoice link must be provided, otherwise unlimited invoice links and one payment on account link are allowed"}], "information": []}}}}}} - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-payment: - QuickBooks Desktop: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"customerRef": {"id": "80000002-1674552702", "companyName": "string"}, "accountRef": {"id": "8000002E-1675267199", "name": "Undeposited Funds"}, "paymentMethodRef": {"id": "string", "name": "string"}, "totalAmount": 28, "currency": "USD", "currencyRate": 1, "date": "2023-02-10T11:47:04.792Z", "note": "note 14/02 1147", "lines": [{"amount": 28, "links": [{"type": "Invoice", "id": "181-1676374586", "amount": -28, "currencyRate": 1}], "allocatedOnDate": "2023-02-11T11:47:04.792Z"}], "reference": "ref 14/02 1147"} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "accountRef": {}, "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "lines": [{"amount": 9098.82, "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "b5014a44-d349-4734-ba57-8bdacb12669d", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 396159} - "400": - application/json: {} - "500": - application/json: {} - Sage 50 (UK): - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"customerRef": {"id": "CUST1"}, "accountRef": {"id": "1200", "name": "Bank Current Account"}, "paymentMethodRef": {"id": "4405"}, "totalAmount": 4, "currency": "GBP", "currencyRate": 1, "date": "2023-03-17T11:47:04.792Z", "note": "note 07/03 14.31", "lines": [{"amount": 4, "links": [{"type": "Invoice", "id": "INV-31", "amount": -4, "currencyRate": 1}], "allocatedOnDate": "2023-02-11T11:47:04.792Z"}], "reference": "ref"} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "accountRef": {}, "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "lines": [{"amount": 9098.82, "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "b5014a44-d349-4734-ba57-8bdacb12669d", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 396159} - "400": - application/json: {} - "500": - application/json: {} - Sage Business Cloud Accounting: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"customerRef": {"id": "30444c5bd4964fd787c7f8e2e5301ce1", "companyName": "Stanley test customer"}, "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "totalAmount": 0.17, "currency": "GBP", "currencyRate": 1, "date": "2023-03-20T11:47:04.792Z", "note": "Need to send products asap.", "lines": [{"amount": 0.17, "links": [{"type": "Invoice", "id": "bb85db9226d7450fb99eb83e7fb37505", "amount": -0.17, "currencyRate": 1}], "allocatedOnDate": "2023-02-11T11:47:04.792Z"}], "reference": "normal payment 20/03 17.05"} - responses: - "200": - application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "accountRef": {}, "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "lines": [{"amount": 9098.82, "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "b5014a44-d349-4734-ba57-8bdacb12669d", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 396159} - "400": - application/json: {} - "500": - application/json: {} - Sage Intacct: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"customerRef": {"id": "19"}, "accountRef": {"id": "81"}, "totalAmount": 0, "date": "2022-03-12T00:00:00", "lines": [{"amount": 0, "links": [{"type": "Invoice", "id": "246", "amount": -1.1}, {"type": "CreditNote", "id": "280", "amount": 1.1}]}]} - responses: - "200": - application/json: {"data": {"customerRef": {"id": "19"}, "accountRef": {"id": "81"}, "totalAmount": 0, "date": "2022-03-12T00:00:00", "lines": [{"amount": 0, "links": [{"type": "Invoice", "id": "246", "amount": -1.1}, {"type": "CreditNote", "id": "280", "amount": 1.1}]}]}, "dataType": "payments", "companyId": "ffa6368e-fde4-4165-9a0a-4bda1a6f916e", "pushOperationKey": "673f5d97-1c53-41ef-b9c8-cc9a8415d17c", "dataConnectionKey": "bbecdbf3-913a-43ae-9c91-e830b3686657", "requestedOnUtc": "0001-01-01T00:00:00", "status": "Pending", "statusCode": 202} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: - allowSyncOnPushComplete: true - requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "accountRef": {}, "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "lines": [{"amount": 9098.82, "allocatedOnDate": "2022-10-23T00:00:00Z"}]} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-create-operation: - Unauthorized: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - pushOperationKey: "23a26d56-6e3d-4414-865c-4fa7ebbb43e3" - responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-get-create-operation: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - pushOperationKey: "197f974c-e0cb-4960-8815-8e12361fefbe" - responses: - "200": - application/json: {"changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "9f05beba-f0a7-475d-99a4-4221b3f2c954", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 52725} - "401": - application/json: {} - "500": - application/json: {} - list-create-operations: - speakeasy-default-list-create-operations: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - Unresolved property: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-bank-statement-upload-configuration: - Codat: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"source": "codat", "accountId": "abc123-ABC"} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - set-bank-statement-upload-configuration: - Codat: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - requestBody: - application/json: {"source": "codat", "accountId": "abc123-ABC"} - responses: - "200": - application/json: {"source": "codat", "accountId": "abc123-ABC"} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - start-bank-statement-upload-session: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-start-bank-statement-upload-session: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - responses: - "200": - application/json: {"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b", "companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5", "connectionId": "51baa045-4836-4317-a42e-3542e991e581", "dataType": "invoices", "status": "Initial", "statusDescription": "Paused until 2022-10-23T00:00:00.000Z", "requested": "2022-11-14T11:18:37.2798351Z", "progress": 10, "isCompleted": false, "isErrored": false} - "400": - application/json: {} - "500": - application/json: {} - upload-bank-statement-data: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - datasetId: "f0095e43-88a7-4395-9f2c-1d5226e1c9e5" - requestBody: - application/json: {"results": [{"id": "1703194f-7805-4da8-bac0-2ba5da4a4216", "name": "Business Current Account", "informalName": "Codat", "holder": "Codat Ltd", "type": "Debit", "balance": {"available": -459987.97, "current": -459964.9, "limit": 5000}, "identifiers": {"type": "Depository", "subtype": "checking", "number": "46762629", "bankCode": 9911, "iban": "GB29 LOYD 4773 2346 7626 29", "bic": "LOYDGB21006", "maskedAccountNumber": "LOYDGB21006"}, "currency": "GBP", "institution": {"id": "lloyds-bank", "name": "Lloyds Bank"}, "modifiedDate": "2022-05-23T16:32:50Z", "sourceModifiedDate": "2021-08-14T05:04:12"}]} - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-upload-bank-statement-data: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - datasetId: "d2745fa3-ad4b-4139-9f44-a83a8b039d96" - requestBody: - application/json: {"results": [{"id": "1703194f-7805-4da8-bac0-2ba5da4a4216", "name": "Business Current Account", "informalName": "Codat", "holder": "Codat Ltd", "type": "Debit", "balance": {"available": -459987.97, "current": -459964.9, "limit": 5000}, "identifiers": {"type": "Depository", "subtype": "checking", "number": "46762629", "bankCode": 9911, "iban": "GB29 LOYD 4773 2346 7626 29", "bic": "LOYDGB21006", "maskedAccountNumber": "LOYDGB21006"}, "currency": "GBP", "institution": {"id": "lloyds-bank", "name": "Lloyds Bank"}, "modifiedDate": "2022-05-23T16:32:50Z", "sourceModifiedDate": "2021-08-14T05:04:12"}]} - responses: - "400": - application/json: {} - "500": - application/json: {} - end-bank-statement-upload-session: - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - datasetId: "79c714cf-8643-4bc6-9b4e-8d1a971222b7" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - speakeasy-default-end-bank-statement-upload-session: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - datasetId: "536dd007-f6c9-4833-af37-165b564a1abb" - responses: - "400": - application/json: {} - "500": - application/json: {} - generate-report: - Report: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - reportType: "categorizedBankStatement" - responses: - "202": - application/json: {"id": "6e9bae88-72c9-45ae-abe8-41fbf2871458", "status": "InProgress", "type": "categorizedBankStatement", "requestedDate": "2024-09-27T04:43:41Z", "updatedDate": "2024-10-01T14:41:46Z"} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - reportType: "creditModel" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-reports: - speakeasy-default-list-reports: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "200": - application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": - application/json: {} - "500": - application/json: {} - Malformed query: - parameters: - path: - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - query: - page: 1 - pageSize: 100 - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" - orderBy: "-modifiedDate" - responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - "500": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} -examplesVersion: 1.0.2 -generatedTests: {} -releaseNotes: | - ## Typescript SDK Changes: - * `codatlending.companies.list()`: `response.results[].dataConnections[].integrationKey` **Changed** - * `codatlending.companies.create()`: `response.dataConnections[].integrationKey` **Changed** - * `codatlending.companies.replace()`: `response.dataConnections[].integrationKey` **Changed** - * `codatlending.companies.update()`: `response.dataConnections[].integrationKey` **Changed** - * `codatlending.companies.get()`: `response.dataConnections[].integrationKey` **Changed** - * `codatlending.connections.list()`: `response.results[].integrationKey` **Changed** - * `codatlending.connections.create()`: `response.integrationKey` **Changed** - * `codatlending.connections.get()`: `response.integrationKey` **Changed** - * `codatlending.connections.unlink()`: `response.integrationKey` **Changed** -generatedFiles: - - .gitattributes - - .npmignore - - FUNCTIONS.md - - RUNTIMES.md - - USAGE.md - - docs/lib/utils/retryconfig.md - - docs/sdk/models/errors/errormessage.md - - docs/sdk/models/operations/createaccountrequest.md - - docs/sdk/models/operations/createbankaccountmappingrequest.md - - docs/sdk/models/operations/createbankaccountrequest.md - - docs/sdk/models/operations/createbanktransactionsrequest.md - - docs/sdk/models/operations/createconnectionrequest.md - - docs/sdk/models/operations/createconnectionrequestbody.md - - docs/sdk/models/operations/createdirectcostrequest.md - - docs/sdk/models/operations/createpaymentrequest.md - - docs/sdk/models/operations/createsourceaccountrequest.md - - docs/sdk/models/operations/createsourceaccountrequestbody.md - - docs/sdk/models/operations/createsourceaccountresponsebody.md - - docs/sdk/models/operations/createsupplierrequest.md - - docs/sdk/models/operations/createtransferrequest.md - - docs/sdk/models/operations/deletecompanyrequest.md - - docs/sdk/models/operations/deleteconnectionrequest.md - - docs/sdk/models/operations/downloadaccountingbillattachmentrequest.md - - docs/sdk/models/operations/downloadaccountingcustomerattachmentrequest.md - - docs/sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md - - docs/sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md - - docs/sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md - - docs/sdk/models/operations/downloadaccountinginvoicepdfrequest.md - - docs/sdk/models/operations/downloadaccountingsupplierattachmentrequest.md - - docs/sdk/models/operations/downloadexcelreportrequest.md - - docs/sdk/models/operations/downloadfilesrequest.md - - docs/sdk/models/operations/endbankstatementuploadsessionrequest.md - - docs/sdk/models/operations/generateexcelreportrequest.md - - docs/sdk/models/operations/generateloansummaryqueryparamsourcetype.md - - docs/sdk/models/operations/generateloansummaryrequest.md - - docs/sdk/models/operations/generateloantransactionsrequest.md - - docs/sdk/models/operations/generatereportrequest.md - - docs/sdk/models/operations/getaccountingaccountrequest.md - - docs/sdk/models/operations/getaccountingaccounttransactionrequest.md - - docs/sdk/models/operations/getaccountingagedcreditorsreportrequest.md - - docs/sdk/models/operations/getaccountingageddebtorsreportrequest.md - - docs/sdk/models/operations/getaccountingbalancesheetrequest.md - - docs/sdk/models/operations/getaccountingbankaccountrequest.md - - docs/sdk/models/operations/getaccountingbillattachmentrequest.md - - docs/sdk/models/operations/getaccountingbillcreditnoterequest.md - - docs/sdk/models/operations/getaccountingbillpaymentrequest.md - - docs/sdk/models/operations/getaccountingbillrequest.md - - docs/sdk/models/operations/getaccountingcashflowstatementrequest.md - - docs/sdk/models/operations/getaccountingcreditnoterequest.md - - docs/sdk/models/operations/getaccountingcustomerattachmentrequest.md - - docs/sdk/models/operations/getaccountingcustomerrequest.md - - docs/sdk/models/operations/getaccountingdirectcostattachmentrequest.md - - docs/sdk/models/operations/getaccountingdirectcostrequest.md - - docs/sdk/models/operations/getaccountingdirectincomeattachmentrequest.md - - docs/sdk/models/operations/getaccountingdirectincomerequest.md - - docs/sdk/models/operations/getaccountinginvoiceattachmentrequest.md - - docs/sdk/models/operations/getaccountinginvoicerequest.md - - docs/sdk/models/operations/getaccountingjournalentryrequest.md - - docs/sdk/models/operations/getaccountingjournalrequest.md - - docs/sdk/models/operations/getaccountingpaymentrequest.md - - docs/sdk/models/operations/getaccountingprofilerequest.md - - docs/sdk/models/operations/getaccountingprofitandlossrequest.md - - docs/sdk/models/operations/getaccountingsupplierattachmentrequest.md - - docs/sdk/models/operations/getaccountingsupplierrequest.md - - docs/sdk/models/operations/getaccountingtransferrequest.md - - docs/sdk/models/operations/getbankaccountmappingrequest.md - - docs/sdk/models/operations/getbankingaccountrequest.md - - docs/sdk/models/operations/getbankingtransactioncategoryrequest.md - - docs/sdk/models/operations/getbankingtransactionrequest.md - - docs/sdk/models/operations/getbankstatementuploadconfigurationrequest.md - - docs/sdk/models/operations/getcategorizedbalancesheetstatementrequest.md - - docs/sdk/models/operations/getcategorizedbankstatementrequest.md - - docs/sdk/models/operations/getcategorizedprofitandlossstatementrequest.md - - docs/sdk/models/operations/getcommercecustomerrequest.md - - docs/sdk/models/operations/getcommercecustomerretentionmetricsrequest.md - - docs/sdk/models/operations/getcommercedisputerequest.md - - docs/sdk/models/operations/getcommercelifetimevaluemetricsrequest.md - - docs/sdk/models/operations/getcommercelocationrequest.md - - docs/sdk/models/operations/getcommerceorderrequest.md - - docs/sdk/models/operations/getcommerceordersreportrequest.md - - docs/sdk/models/operations/getcommercepaymentmethodrequest.md - - docs/sdk/models/operations/getcommercepaymentrequest.md - - docs/sdk/models/operations/getcommerceproductcategoryrequest.md - - docs/sdk/models/operations/getcommerceproductrequest.md - - docs/sdk/models/operations/getcommerceprofilerequest.md - - docs/sdk/models/operations/getcommercerefundsreportrequest.md - - docs/sdk/models/operations/getcommercerevenuemetricsrequest.md - - docs/sdk/models/operations/getcommercetransactionrequest.md - - docs/sdk/models/operations/getcompanyrequest.md - - docs/sdk/models/operations/getconnectionrequest.md - - docs/sdk/models/operations/getcreatebanktransactionsmodelrequest.md - - docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md - - docs/sdk/models/operations/getcreatedirectcostsmodelrequest.md - - docs/sdk/models/operations/getcreateoperationrequest.md - - docs/sdk/models/operations/getcreatepaymentmodelrequest.md - - docs/sdk/models/operations/getcreatetransfersmodelrequest.md - - docs/sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md - - docs/sdk/models/operations/getcreateupdatesuppliersmodelrequest.md - - docs/sdk/models/operations/getdataintegritystatusrequest.md - - docs/sdk/models/operations/getdataintegritysummariesrequest.md - - docs/sdk/models/operations/getdatastatusdatastatuses.md - - docs/sdk/models/operations/getdatastatusrequest.md - - docs/sdk/models/operations/getexcelreportgenerationstatusrequest.md - - docs/sdk/models/operations/getloansummaryqueryparamsourcetype.md - - docs/sdk/models/operations/getloansummaryrequest.md - - docs/sdk/models/operations/getpulloperationrequest.md - - docs/sdk/models/operations/isagedcreditorsreportavailablerequest.md - - docs/sdk/models/operations/isageddebtorsreportavailablerequest.md - - docs/sdk/models/operations/listaccountingaccountsrequest.md - - docs/sdk/models/operations/listaccountingaccounttransactionsrequest.md - - docs/sdk/models/operations/listaccountingbankaccountsrequest.md - - docs/sdk/models/operations/listaccountingbankaccounttransactionsrequest.md - - docs/sdk/models/operations/listaccountingbillattachmentsrequest.md - - docs/sdk/models/operations/listaccountingbillcreditnotesrequest.md - - docs/sdk/models/operations/listaccountingbillpaymentsrequest.md - - docs/sdk/models/operations/listaccountingbillsrequest.md - - docs/sdk/models/operations/listaccountingcreditnotesrequest.md - - docs/sdk/models/operations/listaccountingcustomerattachmentsrequest.md - - docs/sdk/models/operations/listaccountingcustomersrequest.md - - docs/sdk/models/operations/listaccountingdirectcostattachmentsrequest.md - - docs/sdk/models/operations/listaccountingdirectcostsrequest.md - - docs/sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md - - docs/sdk/models/operations/listaccountingdirectincomesrequest.md - - docs/sdk/models/operations/listaccountinginvoiceattachmentsrequest.md - - docs/sdk/models/operations/listaccountinginvoicesrequest.md - - docs/sdk/models/operations/listaccountingjournalentriesrequest.md - - docs/sdk/models/operations/listaccountingjournalsrequest.md - - docs/sdk/models/operations/listaccountingpaymentsrequest.md - - docs/sdk/models/operations/listaccountingsupplierattachmentsrequest.md - - docs/sdk/models/operations/listaccountingsuppliersrequest.md - - docs/sdk/models/operations/listaccountingtransfersrequest.md - - docs/sdk/models/operations/listbankingaccountbalancesrequest.md - - docs/sdk/models/operations/listbankingaccountsrequest.md - - docs/sdk/models/operations/listbankingtransactioncategoriesrequest.md - - docs/sdk/models/operations/listbankingtransactionsrequest.md - - docs/sdk/models/operations/listcommercecustomersrequest.md - - docs/sdk/models/operations/listcommercedisputesrequest.md - - docs/sdk/models/operations/listcommercelocationsrequest.md - - docs/sdk/models/operations/listcommerceordersrequest.md - - docs/sdk/models/operations/listcommercepaymentmethodsrequest.md - - docs/sdk/models/operations/listcommercepaymentsrequest.md - - docs/sdk/models/operations/listcommerceproductcategoriesrequest.md - - docs/sdk/models/operations/listcommerceproductsrequest.md - - docs/sdk/models/operations/listcommercetransactionsrequest.md - - docs/sdk/models/operations/listcompaniesrequest.md - - docs/sdk/models/operations/listconnectionsrequest.md - - docs/sdk/models/operations/listcreateoperationsrequest.md - - docs/sdk/models/operations/listdataintegritydetailsrequest.md - - docs/sdk/models/operations/listfilesrequest.md - - docs/sdk/models/operations/listloantransactionsrequest.md - - docs/sdk/models/operations/listpulloperationsrequest.md - - docs/sdk/models/operations/listreconciledinvoicesrequest.md - - docs/sdk/models/operations/listreportsrequest.md - - docs/sdk/models/operations/queryparamsourcetype.md - - docs/sdk/models/operations/refreshalldatatypesrequest.md - - docs/sdk/models/operations/refreshdatatyperequest.md - - docs/sdk/models/operations/replacecompanyrequest.md - - docs/sdk/models/operations/setbankstatementuploadconfigurationrequest.md - - docs/sdk/models/operations/sourcetype.md - - docs/sdk/models/operations/startbankstatementuploadsessionrequest.md - - docs/sdk/models/operations/unlinkconnectionrequest.md - - docs/sdk/models/operations/unlinkconnectionupdateconnection.md - - docs/sdk/models/operations/updatecompanyrequest.md - - docs/sdk/models/operations/uploadbankstatementdatarequest.md - - docs/sdk/models/operations/uploadbankstatementdatarequestbody.md - - docs/sdk/models/operations/uploadfilesrequest.md - - docs/sdk/models/shared/accountbalance.md - - docs/sdk/models/shared/accountbalanceamounts.md - - docs/sdk/models/shared/accountcategoriesupdatedwebhook.md - - docs/sdk/models/shared/accountcategoriesupdatedwebhookdata.md - - docs/sdk/models/shared/accountcategorylevel.md - - docs/sdk/models/shared/accountidentifiers.md - - docs/sdk/models/shared/accountidentifiertype.md - - docs/sdk/models/shared/accountinfo.md - - docs/sdk/models/shared/accountingaccount.md - - docs/sdk/models/shared/accountingaccounts.md - - docs/sdk/models/shared/accountingaccounttransaction.md - - docs/sdk/models/shared/accountingaccounttransactions.md - - docs/sdk/models/shared/accountingaccounttransactionstatus.md - - docs/sdk/models/shared/accountingaddress.md - - docs/sdk/models/shared/accountingaddresstype.md - - docs/sdk/models/shared/accountingagedcreditorreport.md - - docs/sdk/models/shared/accountingageddebtorreport.md - - docs/sdk/models/shared/accountingattachment.md - - docs/sdk/models/shared/accountingbalancesheet.md - - docs/sdk/models/shared/accountingbankaccount.md - - docs/sdk/models/shared/accountingbankaccounts.md - - docs/sdk/models/shared/accountingbankaccounttype.md - - docs/sdk/models/shared/accountingbanktransaction.md - - docs/sdk/models/shared/accountingbanktransactions.md - - docs/sdk/models/shared/accountingbill.md - - docs/sdk/models/shared/accountingbillcreditnote.md - - docs/sdk/models/shared/accountingbillcreditnotes.md - - docs/sdk/models/shared/accountingbillpayment.md - - docs/sdk/models/shared/accountingbillpayments.md - - docs/sdk/models/shared/accountingbills.md - - docs/sdk/models/shared/accountingcashflowstatement.md - - docs/sdk/models/shared/accountingcompanyinfo.md - - docs/sdk/models/shared/accountingcreateaccountresponse.md - - docs/sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md - - docs/sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.md - - docs/sdk/models/shared/accountingcreatebankaccountresponse.md - - docs/sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md - - docs/sdk/models/shared/accountingcreatebankaccounttransactions.md - - docs/sdk/models/shared/accountingcreatebanktransactions.md - - docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md - - docs/sdk/models/shared/accountingcreatedirectcostresponse.md - - docs/sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md - - docs/sdk/models/shared/accountingcreatepaymentresponse.md - - docs/sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md - - docs/sdk/models/shared/accountingcreatesupplierresponse.md - - docs/sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md - - docs/sdk/models/shared/accountingcreatetransferresponse.md - - docs/sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md - - docs/sdk/models/shared/accountingcreatetransferresponsestatus.md - - docs/sdk/models/shared/accountingcreditnote.md - - docs/sdk/models/shared/accountingcreditnotes.md - - docs/sdk/models/shared/accountingcustomer.md - - docs/sdk/models/shared/accountingcustomerref.md - - docs/sdk/models/shared/accountingcustomers.md - - docs/sdk/models/shared/accountingdirectcost.md - - docs/sdk/models/shared/accountingdirectcosts.md - - docs/sdk/models/shared/accountingdirectincome.md - - docs/sdk/models/shared/accountingdirectincomes.md - - docs/sdk/models/shared/accountinginvoice.md - - docs/sdk/models/shared/accountinginvoicedatatype.md - - docs/sdk/models/shared/accountinginvoices.md - - docs/sdk/models/shared/accountingjournal.md - - docs/sdk/models/shared/accountingjournalentries.md - - docs/sdk/models/shared/accountingjournalentry.md - - docs/sdk/models/shared/accountingjournals.md - - docs/sdk/models/shared/accountingpayment.md - - docs/sdk/models/shared/accountingpaymentallocation.md - - docs/sdk/models/shared/accountingpayments.md - - docs/sdk/models/shared/accountingprofitandlossreport.md - - docs/sdk/models/shared/accountingrecordref.md - - docs/sdk/models/shared/accountingsupplier.md - - docs/sdk/models/shared/accountingsuppliers.md - - docs/sdk/models/shared/accountingtransfer.md - - docs/sdk/models/shared/accountingtransfers.md - - docs/sdk/models/shared/accountingtransferstatus.md - - docs/sdk/models/shared/accountinstitution.md - - docs/sdk/models/shared/accountprototype.md - - docs/sdk/models/shared/accountprototypevaliddatatypelinks.md - - docs/sdk/models/shared/accountref.md - - docs/sdk/models/shared/accounts.md - - docs/sdk/models/shared/accountspayabletracking.md - - docs/sdk/models/shared/accountsreceivabletracking.md - - docs/sdk/models/shared/accountstatus.md - - docs/sdk/models/shared/accounttransactionline.md - - docs/sdk/models/shared/accounttransactionlinerecordref.md - - docs/sdk/models/shared/accounttransactionlinerecordrefdatatype.md - - docs/sdk/models/shared/accounttype.md - - docs/sdk/models/shared/agedcreditor.md - - docs/sdk/models/shared/agedcurrencyoutstanding.md - - docs/sdk/models/shared/ageddebtor.md - - docs/sdk/models/shared/agedoutstandingamount.md - - docs/sdk/models/shared/agedoutstandingamountdetail.md - - docs/sdk/models/shared/allocation.md - - docs/sdk/models/shared/attachments.md - - docs/sdk/models/shared/balancesheet.md - - docs/sdk/models/shared/bankaccountref.md - - docs/sdk/models/shared/bankaccountstatus.md - - docs/sdk/models/shared/bankfeedbankaccountmapping.md - - docs/sdk/models/shared/bankfeedbankaccountmappingresponse.md - - docs/sdk/models/shared/bankfeedmapping.md - - docs/sdk/models/shared/bankingaccount.md - - docs/sdk/models/shared/bankingaccountbalance.md - - docs/sdk/models/shared/bankingaccountbalances.md - - docs/sdk/models/shared/bankingaccounts.md - - docs/sdk/models/shared/bankingtransaction.md - - docs/sdk/models/shared/bankingtransactioncategories.md - - docs/sdk/models/shared/bankingtransactioncategory.md - - docs/sdk/models/shared/bankingtransactionref.md - - docs/sdk/models/shared/bankingtransactions.md - - docs/sdk/models/shared/bankstatementuploadconfiguration.md - - docs/sdk/models/shared/banktransactiontype.md - - docs/sdk/models/shared/billcreditnotelineitem.md - - docs/sdk/models/shared/billcreditnotestatus.md - - docs/sdk/models/shared/billedtotype.md - - docs/sdk/models/shared/billedtotype1.md - - docs/sdk/models/shared/billlineitem.md - - docs/sdk/models/shared/billlineitemdatatype.md - - docs/sdk/models/shared/billpaymentline.md - - docs/sdk/models/shared/billpaymentlinelink.md - - docs/sdk/models/shared/billpaymentlinelinktype.md - - docs/sdk/models/shared/billstatus.md - - docs/sdk/models/shared/cashflowstatement.md - - docs/sdk/models/shared/cashflowtransaction.md - - docs/sdk/models/shared/clientratelimitwebhook.md - - docs/sdk/models/shared/clientratelimitwebhookpayload.md - - docs/sdk/models/shared/codatfile.md - - docs/sdk/models/shared/commerceaddress.md - - docs/sdk/models/shared/commerceaddresstype.md - - docs/sdk/models/shared/commercecompanyinfo.md - - docs/sdk/models/shared/commercecustomer.md - - docs/sdk/models/shared/commercecustomerref.md - - docs/sdk/models/shared/commercecustomers.md - - docs/sdk/models/shared/commercedispute.md - - docs/sdk/models/shared/commercedisputes.md - - docs/sdk/models/shared/commercelocation.md - - docs/sdk/models/shared/commercelocations.md - - docs/sdk/models/shared/commerceorder.md - - docs/sdk/models/shared/commerceorders.md - - docs/sdk/models/shared/commercepayment.md - - docs/sdk/models/shared/commercepaymentmethod.md - - docs/sdk/models/shared/commercepaymentmethods.md - - docs/sdk/models/shared/commercepaymentmethodstatus.md - - docs/sdk/models/shared/commercepayments.md - - docs/sdk/models/shared/commerceproduct.md - - docs/sdk/models/shared/commerceproductcategories.md - - docs/sdk/models/shared/commerceproductcategory.md - - docs/sdk/models/shared/commerceproducts.md - - docs/sdk/models/shared/commercerecordref.md - - docs/sdk/models/shared/commercereport.md - - docs/sdk/models/shared/commercereportcomponent.md - - docs/sdk/models/shared/commercereportdimension.md - - docs/sdk/models/shared/commercereportdimensionitems.md - - docs/sdk/models/shared/commercereporterror.md - - docs/sdk/models/shared/commercereportmeasure.md - - docs/sdk/models/shared/commercetransaction.md - - docs/sdk/models/shared/commercetransactions.md - - docs/sdk/models/shared/companies.md - - docs/sdk/models/shared/company.md - - docs/sdk/models/shared/companyreference.md - - docs/sdk/models/shared/companyreferencelinks.md - - docs/sdk/models/shared/companyrequestbody.md - - docs/sdk/models/shared/companyupdaterequest.md - - docs/sdk/models/shared/connection.md - - docs/sdk/models/shared/connections.md - - docs/sdk/models/shared/contact.md - - docs/sdk/models/shared/contactref.md - - docs/sdk/models/shared/contactrefdatatype.md - - docs/sdk/models/shared/contactreference.md - - docs/sdk/models/shared/createbankaccounttransaction.md - - docs/sdk/models/shared/creditnotelineitem.md - - docs/sdk/models/shared/creditnotestatus.md - - docs/sdk/models/shared/customerstatus.md - - docs/sdk/models/shared/dataconnectionerror.md - - docs/sdk/models/shared/dataconnectionstatus.md - - docs/sdk/models/shared/dataintegrityamounts.md - - docs/sdk/models/shared/dataintegritybyamount.md - - docs/sdk/models/shared/dataintegritybycount.md - - docs/sdk/models/shared/dataintegrityconnectionid.md - - docs/sdk/models/shared/dataintegritydatatype.md - - docs/sdk/models/shared/dataintegritydates.md - - docs/sdk/models/shared/dataintegritydetail.md - - docs/sdk/models/shared/dataintegritydetails.md - - docs/sdk/models/shared/dataintegritymatch.md - - docs/sdk/models/shared/dataintegritystatus.md - - docs/sdk/models/shared/dataintegritystatuses.md - - docs/sdk/models/shared/dataintegritystatusinfo.md - - docs/sdk/models/shared/dataintegritysummaries.md - - docs/sdk/models/shared/dataintegritysummary.md - - docs/sdk/models/shared/datasetstatus.md - - docs/sdk/models/shared/datasource.md - - docs/sdk/models/shared/datastatus.md - - docs/sdk/models/shared/datatype.md - - docs/sdk/models/shared/datatypes.md - - docs/sdk/models/shared/directcostlineitem.md - - docs/sdk/models/shared/directcostprototype.md - - docs/sdk/models/shared/directincomelineitem.md - - docs/sdk/models/shared/disputestatus.md - - docs/sdk/models/shared/enduploadsessionrequest.md - - docs/sdk/models/shared/enduploadsessionrequeststatus.md - - docs/sdk/models/shared/enhancedcashflowitem.md - - docs/sdk/models/shared/enhancedcashflowtransactions.md - - docs/sdk/models/shared/enhancedfinancialreport.md - - docs/sdk/models/shared/enhancedinvoicereportitem.md - - docs/sdk/models/shared/enhancedinvoicesreport.md - - docs/sdk/models/shared/enhancedreportaccountcategory.md - - docs/sdk/models/shared/enhancedreportinfo.md - - docs/sdk/models/shared/errorstatus.md - - docs/sdk/models/shared/errorvalidation.md - - docs/sdk/models/shared/errorvalidationitem.md - - docs/sdk/models/shared/excelreporttypes.md - - docs/sdk/models/shared/excelstatus.md - - docs/sdk/models/shared/filet.md - - docs/sdk/models/shared/fileupload.md - - docs/sdk/models/shared/halref.md - - docs/sdk/models/shared/integritystatus.md - - docs/sdk/models/shared/invoicelineitem.md - - docs/sdk/models/shared/invoicestatus.md - - docs/sdk/models/shared/itemref.md - - docs/sdk/models/shared/itemreference.md - - docs/sdk/models/shared/items.md - - docs/sdk/models/shared/journalentryrecordref.md - - docs/sdk/models/shared/journalentryrecordrefdatatype.md - - docs/sdk/models/shared/journalline.md - - docs/sdk/models/shared/journallinedatatype.md - - docs/sdk/models/shared/journallinetracking.md - - docs/sdk/models/shared/journalref.md - - docs/sdk/models/shared/journalstatus.md - - docs/sdk/models/shared/lendingcustomerref.md - - docs/sdk/models/shared/links.md - - docs/sdk/models/shared/loanref.md - - docs/sdk/models/shared/loansummary.md - - docs/sdk/models/shared/loansummaryintegrationtype.md - - docs/sdk/models/shared/loansummaryrecordref.md - - docs/sdk/models/shared/loansummaryrecordreftype.md - - docs/sdk/models/shared/loansummaryreportinfo.md - - docs/sdk/models/shared/loansummaryreportitem.md - - docs/sdk/models/shared/loantransactions.md - - docs/sdk/models/shared/loantransactionsreportinfo.md - - docs/sdk/models/shared/loantransactiontype.md - - docs/sdk/models/shared/locationref.md - - docs/sdk/models/shared/metadata.md - - docs/sdk/models/shared/orderdiscountallocation.md - - docs/sdk/models/shared/orderlineitem.md - - docs/sdk/models/shared/path.md - - docs/sdk/models/shared/payment.md - - docs/sdk/models/shared/paymentallocationpayment.md - - docs/sdk/models/shared/paymentline.md - - docs/sdk/models/shared/paymentlinelink.md - - docs/sdk/models/shared/paymentlinktype.md - - docs/sdk/models/shared/paymentmethodref.md - - docs/sdk/models/shared/paymentref.md - - docs/sdk/models/shared/paymentstatus.md - - docs/sdk/models/shared/paymenttype.md - - docs/sdk/models/shared/periodunit.md - - docs/sdk/models/shared/phonenumber.md - - docs/sdk/models/shared/phonenumbertype.md - - docs/sdk/models/shared/productinventory.md - - docs/sdk/models/shared/productinventorylocation.md - - docs/sdk/models/shared/productprice.md - - docs/sdk/models/shared/productref.md - - docs/sdk/models/shared/productvariant.md - - docs/sdk/models/shared/productvariantref.md - - docs/sdk/models/shared/productvariantstatus.md - - docs/sdk/models/shared/profitandlossreport.md - - docs/sdk/models/shared/projectref.md - - docs/sdk/models/shared/propertieaccounttype.md - - docs/sdk/models/shared/propertiedatatype.md - - docs/sdk/models/shared/propertieitemref.md - - docs/sdk/models/shared/pulloperation.md - - docs/sdk/models/shared/pulloperations.md - - docs/sdk/models/shared/purchaseorderreference.md - - docs/sdk/models/shared/pushchangetype.md - - docs/sdk/models/shared/pushfieldvalidation.md - - docs/sdk/models/shared/pushoperation.md - - docs/sdk/models/shared/pushoperationchange.md - - docs/sdk/models/shared/pushoperationref.md - - docs/sdk/models/shared/pushoperations.md - - docs/sdk/models/shared/pushoperationstatus.md - - docs/sdk/models/shared/pushoption.md - - docs/sdk/models/shared/pushoptionchoice.md - - docs/sdk/models/shared/pushoptionproperty.md - - docs/sdk/models/shared/pushoptiontype.md - - docs/sdk/models/shared/pushvalidationinfo.md - - docs/sdk/models/shared/recordlinereference.md - - docs/sdk/models/shared/reportbasis.md - - docs/sdk/models/shared/reportcomponentmeasure.md - - docs/sdk/models/shared/reportgenerationpayload.md - - docs/sdk/models/shared/reportinfo.md - - docs/sdk/models/shared/reportinput.md - - docs/sdk/models/shared/reportitem.md - - docs/sdk/models/shared/reportitems.md - - docs/sdk/models/shared/reportline.md - - docs/sdk/models/shared/reportoperation.md - - docs/sdk/models/shared/reportoperationstatus.md - - docs/sdk/models/shared/reportoperationtype.md - - docs/sdk/models/shared/reports.md - - docs/sdk/models/shared/reportsourcereference.md - - docs/sdk/models/shared/reporttype.md - - docs/sdk/models/shared/routinginfo.md - - docs/sdk/models/shared/routinginfotype.md - - docs/sdk/models/shared/salesorderreference.md - - docs/sdk/models/shared/schema.md - - docs/sdk/models/shared/security.md - - docs/sdk/models/shared/servicecharge.md - - docs/sdk/models/shared/servicechargetype.md - - docs/sdk/models/shared/source.md - - docs/sdk/models/shared/sourceaccount.md - - docs/sdk/models/shared/sourceaccountprototype.md - - docs/sdk/models/shared/sourceaccountstatus.md - - docs/sdk/models/shared/sourceaccountv2.md - - docs/sdk/models/shared/sourceaccountv2accounttype.md - - docs/sdk/models/shared/sourceaccountv2prototype.md - - docs/sdk/models/shared/sourceaccountv2status.md - - docs/sdk/models/shared/sourceref.md - - docs/sdk/models/shared/sourcetype.md - - docs/sdk/models/shared/startuploadsessionrequest.md - - docs/sdk/models/shared/startuploadsessionrequestdatatype.md - - docs/sdk/models/shared/status.md - - docs/sdk/models/shared/supplementaldata.md - - docs/sdk/models/shared/supplierref.md - - docs/sdk/models/shared/supplierstatus.md - - docs/sdk/models/shared/targetaccountoption.md - - docs/sdk/models/shared/taxcomponentallocation.md - - docs/sdk/models/shared/taxcomponentref.md - - docs/sdk/models/shared/taxrateref.md - - docs/sdk/models/shared/taxratereference.md - - docs/sdk/models/shared/tracking.md - - docs/sdk/models/shared/trackingcategoryref.md - - docs/sdk/models/shared/trackingrecordref.md - - docs/sdk/models/shared/trackingrecordrefdatatype.md - - docs/sdk/models/shared/transactioncategory.md - - docs/sdk/models/shared/transactioncategoryref.md - - docs/sdk/models/shared/transactioncategorystatus.md - - docs/sdk/models/shared/transactioncode.md - - docs/sdk/models/shared/transactionsourceref.md - - docs/sdk/models/shared/transactionsourcetype.md - - docs/sdk/models/shared/transactiontype.md - - docs/sdk/models/shared/transferaccount.md - - docs/sdk/models/shared/type.md - - docs/sdk/models/shared/validation.md - - docs/sdk/models/shared/validationitem.md - - docs/sdk/models/shared/validdatatypelinks.md - - docs/sdk/models/shared/weblink.md - - docs/sdk/models/shared/withholdingtax.md - - docs/sdk/models/shared/zero.md - - docs/sdk/models/shared/zerodatatype.md - - docs/sdk/models/webhooks/reportscreditmodelgeneratesuccessfulreportgenerationwebhook.md - - docs/sdks/accountbalances/README.md - - docs/sdks/accountingbankdata/README.md - - docs/sdks/accounts/README.md - - docs/sdks/accountspayable/README.md - - docs/sdks/accountsreceivable/README.md - - docs/sdks/accounttransactions/README.md - - docs/sdks/balancesheet/README.md - - docs/sdks/bankaccounts/README.md - - docs/sdks/banking/README.md - - docs/sdks/bankstatements/README.md - - docs/sdks/banktransactions/README.md - - docs/sdks/billcreditnotes/README.md - - docs/sdks/billpayments/README.md - - docs/sdks/bills/README.md - - docs/sdks/cashflow/README.md - - docs/sdks/categorizedstatement/README.md - - docs/sdks/codatlending/README.md - - docs/sdks/codatlendingaccounts/README.md - - docs/sdks/codatlendingbankingaccounts/README.md - - docs/sdks/codatlendingcustomers/README.md - - docs/sdks/codatlendingdirectcosts/README.md - - docs/sdks/codatlendingloanwritebackaccounts/README.md - - docs/sdks/codatlendingloanwritebackpayments/README.md - - docs/sdks/codatlendingpayments/README.md - - docs/sdks/codatlendingreports/README.md - - docs/sdks/codatlendingsalestransactions/README.md - - docs/sdks/codatlendingsuppliers/README.md - - docs/sdks/codatlendingtransactions/README.md - - docs/sdks/codatlendingtransfers/README.md - - docs/sdks/companies/README.md - - docs/sdks/companyinfo/README.md - - docs/sdks/connections/README.md - - docs/sdks/createoperations/README.md - - docs/sdks/creditnotes/README.md - - docs/sdks/customers/README.md - - docs/sdks/dataintegrity/README.md - - docs/sdks/directcosts/README.md - - docs/sdks/directincomes/README.md - - docs/sdks/disputes/README.md - - docs/sdks/excelreports/README.md - - docs/sdks/fileupload/README.md - - docs/sdks/financialstatements/README.md - - docs/sdks/invoices/README.md - - docs/sdks/journalentries/README.md - - docs/sdks/journals/README.md - - docs/sdks/liabilities/README.md - - docs/sdks/loanwriteback/README.md - - docs/sdks/locations/README.md - - docs/sdks/managedata/README.md - - docs/sdks/managereports/README.md - - docs/sdks/metrics/README.md - - docs/sdks/orders/README.md - - docs/sdks/paymentmethods/README.md - - docs/sdks/payments/README.md - - docs/sdks/productcategories/README.md - - docs/sdks/products/README.md - - docs/sdks/profitandloss/README.md - - docs/sdks/pulloperations/README.md - - docs/sdks/refresh/README.md - - docs/sdks/reports/README.md - - docs/sdks/sales/README.md - - docs/sdks/sourceaccounts/README.md - - docs/sdks/suppliers/README.md - - docs/sdks/transactioncategories/README.md - - docs/sdks/transactions/README.md - - docs/sdks/transfers/README.md - - docs/types/rfcdate.md - - eslint.config.mjs - - jsr.json - - package.json - - src/core.ts - - src/funcs/accountingBankDataAccountsGet.ts - - src/funcs/accountingBankDataAccountsList.ts - - src/funcs/accountingBankDataListTransactions.ts - - src/funcs/accountsPayableBillCreditNotesGet.ts - - src/funcs/accountsPayableBillCreditNotesList.ts - - src/funcs/accountsPayableBillPaymentsGet.ts - - src/funcs/accountsPayableBillPaymentsList.ts - - src/funcs/accountsPayableBillsDownloadAttachment.ts - - src/funcs/accountsPayableBillsGet.ts - - src/funcs/accountsPayableBillsGetAttachment.ts - - src/funcs/accountsPayableBillsList.ts - - src/funcs/accountsPayableBillsListAttachments.ts - - src/funcs/accountsPayableSuppliersDownloadAttachment.ts - - src/funcs/accountsPayableSuppliersGet.ts - - src/funcs/accountsPayableSuppliersGetAttachment.ts - - src/funcs/accountsPayableSuppliersList.ts - - src/funcs/accountsPayableSuppliersListAttachments.ts - - src/funcs/accountsReceivableCreditNotesGet.ts - - src/funcs/accountsReceivableCreditNotesList.ts - - src/funcs/accountsReceivableCustomersDownloadAttachment.ts - - src/funcs/accountsReceivableCustomersGet.ts - - src/funcs/accountsReceivableCustomersGetAttachment.ts - - src/funcs/accountsReceivableCustomersList.ts - - src/funcs/accountsReceivableCustomersListAttachments.ts - - src/funcs/accountsReceivableDirectIncomesDownloadAttachment.ts - - src/funcs/accountsReceivableDirectIncomesGet.ts - - src/funcs/accountsReceivableDirectIncomesGetAttachment.ts - - src/funcs/accountsReceivableDirectIncomesList.ts - - src/funcs/accountsReceivableDirectIncomesListAttachments.ts - - src/funcs/accountsReceivableInvoicesDownloadAttachment.ts - - src/funcs/accountsReceivableInvoicesDownloadPdf.ts - - src/funcs/accountsReceivableInvoicesGet.ts - - src/funcs/accountsReceivableInvoicesGetAttachment.ts - - src/funcs/accountsReceivableInvoicesList.ts - - src/funcs/accountsReceivableInvoicesListAttachments.ts - - src/funcs/accountsReceivableInvoicesListReconciled.ts - - src/funcs/accountsReceivablePaymentsGet.ts - - src/funcs/accountsReceivablePaymentsList.ts - - src/funcs/accountsReceivableReportsGetAgedCreditors.ts - - src/funcs/accountsReceivableReportsGetAgedDebtors.ts - - src/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.ts - - src/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.ts - - src/funcs/bankStatementsEndUploadSession.ts - - src/funcs/bankStatementsGetUploadConfiguration.ts - - src/funcs/bankStatementsSetUploadConfiguration.ts - - src/funcs/bankStatementsStartUploadSession.ts - - src/funcs/bankStatementsUploadBankStatementData.ts - - src/funcs/bankingAccountBalancesList.ts - - src/funcs/bankingAccountsGet.ts - - src/funcs/bankingAccountsList.ts - - src/funcs/bankingCategorizedStatementGet.ts - - src/funcs/bankingTransactionCategoriesGet.ts - - src/funcs/bankingTransactionCategoriesList.ts - - src/funcs/bankingTransactionsGet.ts - - src/funcs/bankingTransactionsList.ts - - src/funcs/companiesCreate.ts - - src/funcs/companiesDelete.ts - - src/funcs/companiesGet.ts - - src/funcs/companiesList.ts - - src/funcs/companiesReplace.ts - - src/funcs/companiesUpdate.ts - - src/funcs/companyInfoGetAccountingProfile.ts - - src/funcs/companyInfoGetCommerceProfile.ts - - src/funcs/connectionsCreate.ts - - src/funcs/connectionsDelete.ts - - src/funcs/connectionsGet.ts - - src/funcs/connectionsList.ts - - src/funcs/connectionsUnlink.ts - - src/funcs/dataIntegrityDetails.ts - - src/funcs/dataIntegrityStatus.ts - - src/funcs/dataIntegritySummaries.ts - - src/funcs/excelReportsDownload.ts - - src/funcs/excelReportsGenerate.ts - - src/funcs/excelReportsGetStatus.ts - - src/funcs/fileUploadDownload.ts - - src/funcs/fileUploadListUploaded.ts - - src/funcs/fileUploadUpload.ts - - src/funcs/financialStatementsAccountsGet.ts - - src/funcs/financialStatementsAccountsList.ts - - src/funcs/financialStatementsBalanceSheetGet.ts - - src/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.ts - - src/funcs/financialStatementsCashFlowGet.ts - - src/funcs/financialStatementsProfitAndLossGet.ts - - src/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.ts - - src/funcs/liabilitiesGenerateLoanSummary.ts - - src/funcs/liabilitiesGenerateLoanTransactions.ts - - src/funcs/liabilitiesGetLoanSummary.ts - - src/funcs/liabilitiesListLoanTransactions.ts - - src/funcs/loanWritebackAccountsCreate.ts - - src/funcs/loanWritebackAccountsGetCreateModel.ts - - src/funcs/loanWritebackBankAccountsCreate.ts - - src/funcs/loanWritebackBankAccountsGetCreateUpdateModel.ts - - src/funcs/loanWritebackBankTransactionsCreate.ts - - src/funcs/loanWritebackBankTransactionsGetCreateModel.ts - - src/funcs/loanWritebackCreateOperationsGet.ts - - src/funcs/loanWritebackCreateOperationsList.ts - - src/funcs/loanWritebackDirectCostsCreate.ts - - src/funcs/loanWritebackDirectCostsGetCreateModel.ts - - src/funcs/loanWritebackPaymentsCreate.ts - - src/funcs/loanWritebackPaymentsGetCreateModel.ts - - src/funcs/loanWritebackSourceAccountsCreate.ts - - src/funcs/loanWritebackSourceAccountsCreateMapping.ts - - src/funcs/loanWritebackSourceAccountsListMappings.ts - - src/funcs/loanWritebackSuppliersCreate.ts - - src/funcs/loanWritebackSuppliersGetCreateUpdateModel.ts - - src/funcs/loanWritebackTransfersCreate.ts - - src/funcs/loanWritebackTransfersGetCreateModel.ts - - src/funcs/manageDataGetStatus.ts - - src/funcs/manageDataPullOperationsGet.ts - - src/funcs/manageDataPullOperationsList.ts - - src/funcs/manageDataRefreshAllDataTypes.ts - - src/funcs/manageDataRefreshDataType.ts - - src/funcs/manageReportsGenerateReport.ts - - src/funcs/manageReportsListReports.ts - - src/funcs/salesCustomersGet.ts - - src/funcs/salesCustomersList.ts - - src/funcs/salesDisputesGet.ts - - src/funcs/salesDisputesList.ts - - src/funcs/salesLocationsGet.ts - - src/funcs/salesLocationsList.ts - - src/funcs/salesMetricsGetCustomerRetention.ts - - src/funcs/salesMetricsGetLifetimeValue.ts - - src/funcs/salesMetricsGetRevenue.ts - - src/funcs/salesOrdersGet.ts - - src/funcs/salesOrdersList.ts - - src/funcs/salesPaymentMethodsGet.ts - - src/funcs/salesPaymentMethodsList.ts - - src/funcs/salesPaymentsGet.ts - - src/funcs/salesPaymentsList.ts - - src/funcs/salesProductCategoriesGet.ts - - src/funcs/salesProductCategoriesList.ts - - src/funcs/salesProductsGet.ts - - src/funcs/salesProductsList.ts - - src/funcs/salesReportsGetOrders.ts - - src/funcs/salesReportsGetRefunds.ts - - src/funcs/salesTransactionsGet.ts - - src/funcs/salesTransactionsList.ts - - src/funcs/transactionsAccountTransactionsGet.ts - - src/funcs/transactionsAccountTransactionsList.ts - - src/funcs/transactionsDirectCostsDownloadAttachment.ts - - src/funcs/transactionsDirectCostsGet.ts - - src/funcs/transactionsDirectCostsGetAttachment.ts - - src/funcs/transactionsDirectCostsList.ts - - src/funcs/transactionsDirectCostsListAttachments.ts - - src/funcs/transactionsJournalEntriesGet.ts - - src/funcs/transactionsJournalEntriesList.ts - - src/funcs/transactionsJournalsGet.ts - - src/funcs/transactionsJournalsList.ts - - src/funcs/transactionsTransfersGet.ts - - src/funcs/transactionsTransfersList.ts - - src/hooks/hooks.ts - - src/hooks/index.ts - - src/hooks/types.ts - - src/index.ts - - src/lib/base64.ts - - src/lib/config.ts - - src/lib/dlv.ts - - src/lib/encodings.ts - - src/lib/files.ts - - src/lib/http.ts - - src/lib/is-plain-object.ts - - src/lib/logger.ts - - src/lib/matchers.ts - - src/lib/primitives.ts - - src/lib/retries.ts - - src/lib/schemas.ts - - src/lib/sdks.ts - - src/lib/security.ts - - src/lib/url.ts - - src/mcp-server/build.mts - - src/mcp-server/cli.ts - - src/mcp-server/cli/start/command.ts - - src/mcp-server/cli/start/impl.ts - - src/mcp-server/console-logger.ts - - src/mcp-server/extensions.ts - - src/mcp-server/mcp-server.ts - - src/mcp-server/prompts.ts - - src/mcp-server/resources.ts - - src/mcp-server/scopes.ts - - src/mcp-server/server.ts - - src/mcp-server/shared.ts - - src/mcp-server/tools.ts - - src/mcp-server/tools/accountingBankDataAccountsGet.ts - - src/mcp-server/tools/accountingBankDataAccountsList.ts - - src/mcp-server/tools/accountingBankDataListTransactions.ts - - src/mcp-server/tools/accountsPayableBillCreditNotesGet.ts - - src/mcp-server/tools/accountsPayableBillCreditNotesList.ts - - src/mcp-server/tools/accountsPayableBillPaymentsGet.ts - - src/mcp-server/tools/accountsPayableBillPaymentsList.ts - - src/mcp-server/tools/accountsPayableBillsDownloadAttachment.ts - - src/mcp-server/tools/accountsPayableBillsGet.ts - - src/mcp-server/tools/accountsPayableBillsGetAttachment.ts - - src/mcp-server/tools/accountsPayableBillsList.ts - - src/mcp-server/tools/accountsPayableBillsListAttachments.ts - - src/mcp-server/tools/accountsPayableSuppliersDownloadAttachment.ts - - src/mcp-server/tools/accountsPayableSuppliersGet.ts - - src/mcp-server/tools/accountsPayableSuppliersGetAttachment.ts - - src/mcp-server/tools/accountsPayableSuppliersList.ts - - src/mcp-server/tools/accountsPayableSuppliersListAttachments.ts - - src/mcp-server/tools/accountsReceivableCreditNotesGet.ts - - src/mcp-server/tools/accountsReceivableCreditNotesList.ts - - src/mcp-server/tools/accountsReceivableCustomersDownloadAttachment.ts - - src/mcp-server/tools/accountsReceivableCustomersGet.ts - - src/mcp-server/tools/accountsReceivableCustomersGetAttachment.ts - - src/mcp-server/tools/accountsReceivableCustomersList.ts - - src/mcp-server/tools/accountsReceivableCustomersListAttachments.ts - - src/mcp-server/tools/accountsReceivableDirectIncomesDownloadAttachment.ts - - src/mcp-server/tools/accountsReceivableDirectIncomesGet.ts - - src/mcp-server/tools/accountsReceivableDirectIncomesGetAttachment.ts - - src/mcp-server/tools/accountsReceivableDirectIncomesList.ts - - src/mcp-server/tools/accountsReceivableDirectIncomesListAttachments.ts - - src/mcp-server/tools/accountsReceivableInvoicesDownloadAttachment.ts - - src/mcp-server/tools/accountsReceivableInvoicesDownloadPdf.ts - - src/mcp-server/tools/accountsReceivableInvoicesGet.ts - - src/mcp-server/tools/accountsReceivableInvoicesGetAttachment.ts - - src/mcp-server/tools/accountsReceivableInvoicesList.ts - - src/mcp-server/tools/accountsReceivableInvoicesListAttachments.ts - - src/mcp-server/tools/accountsReceivableInvoicesListReconciled.ts - - src/mcp-server/tools/accountsReceivablePaymentsGet.ts - - src/mcp-server/tools/accountsReceivablePaymentsList.ts - - src/mcp-server/tools/accountsReceivableReportsGetAgedCreditors.ts - - src/mcp-server/tools/accountsReceivableReportsGetAgedDebtors.ts - - src/mcp-server/tools/accountsReceivableReportsIsAgedCreditorsAvailable.ts - - src/mcp-server/tools/accountsReceivableReportsIsAgedDebtorsAvailable.ts - - src/mcp-server/tools/bankStatementsEndUploadSession.ts - - src/mcp-server/tools/bankStatementsGetUploadConfiguration.ts - - src/mcp-server/tools/bankStatementsSetUploadConfiguration.ts - - src/mcp-server/tools/bankStatementsStartUploadSession.ts - - src/mcp-server/tools/bankStatementsUploadBankStatementData.ts - - src/mcp-server/tools/bankingAccountBalancesList.ts - - src/mcp-server/tools/bankingAccountsGet.ts - - src/mcp-server/tools/bankingAccountsList.ts - - src/mcp-server/tools/bankingCategorizedStatementGet.ts - - src/mcp-server/tools/bankingTransactionCategoriesGet.ts - - src/mcp-server/tools/bankingTransactionCategoriesList.ts - - src/mcp-server/tools/bankingTransactionsGet.ts - - src/mcp-server/tools/bankingTransactionsList.ts - - src/mcp-server/tools/companiesCreate.ts - - src/mcp-server/tools/companiesDelete.ts - - src/mcp-server/tools/companiesGet.ts - - src/mcp-server/tools/companiesList.ts - - src/mcp-server/tools/companiesReplace.ts - - src/mcp-server/tools/companiesUpdate.ts - - src/mcp-server/tools/companyInfoGetAccountingProfile.ts - - src/mcp-server/tools/companyInfoGetCommerceProfile.ts - - src/mcp-server/tools/connectionsCreate.ts - - src/mcp-server/tools/connectionsDelete.ts - - src/mcp-server/tools/connectionsGet.ts - - src/mcp-server/tools/connectionsList.ts - - src/mcp-server/tools/connectionsUnlink.ts - - src/mcp-server/tools/dataIntegrityDetails.ts - - src/mcp-server/tools/dataIntegrityStatus.ts - - src/mcp-server/tools/dataIntegritySummaries.ts - - src/mcp-server/tools/excelReportsDownload.ts - - src/mcp-server/tools/excelReportsGenerate.ts - - src/mcp-server/tools/excelReportsGetStatus.ts - - src/mcp-server/tools/fileUploadDownload.ts - - src/mcp-server/tools/fileUploadListUploaded.ts - - src/mcp-server/tools/fileUploadUpload.ts - - src/mcp-server/tools/financialStatementsAccountsGet.ts - - src/mcp-server/tools/financialStatementsAccountsList.ts - - src/mcp-server/tools/financialStatementsBalanceSheetGet.ts - - src/mcp-server/tools/financialStatementsBalanceSheetGetCategorizedAccounts.ts - - src/mcp-server/tools/financialStatementsCashFlowGet.ts - - src/mcp-server/tools/financialStatementsProfitAndLossGet.ts - - src/mcp-server/tools/financialStatementsProfitAndLossGetCategorizedAccounts.ts - - src/mcp-server/tools/liabilitiesGenerateLoanSummary.ts - - src/mcp-server/tools/liabilitiesGenerateLoanTransactions.ts - - src/mcp-server/tools/liabilitiesGetLoanSummary.ts - - src/mcp-server/tools/liabilitiesListLoanTransactions.ts - - src/mcp-server/tools/loanWritebackAccountsCreate.ts - - src/mcp-server/tools/loanWritebackAccountsGetCreateModel.ts - - src/mcp-server/tools/loanWritebackBankAccountsCreate.ts - - src/mcp-server/tools/loanWritebackBankAccountsGetCreateUpdateModel.ts - - src/mcp-server/tools/loanWritebackBankTransactionsCreate.ts - - src/mcp-server/tools/loanWritebackBankTransactionsGetCreateModel.ts - - src/mcp-server/tools/loanWritebackCreateOperationsGet.ts - - src/mcp-server/tools/loanWritebackCreateOperationsList.ts - - src/mcp-server/tools/loanWritebackDirectCostsCreate.ts - - src/mcp-server/tools/loanWritebackDirectCostsGetCreateModel.ts - - src/mcp-server/tools/loanWritebackPaymentsCreate.ts - - src/mcp-server/tools/loanWritebackPaymentsGetCreateModel.ts - - src/mcp-server/tools/loanWritebackSourceAccountsCreate.ts - - src/mcp-server/tools/loanWritebackSourceAccountsCreateMapping.ts - - src/mcp-server/tools/loanWritebackSourceAccountsListMappings.ts - - src/mcp-server/tools/loanWritebackSuppliersCreate.ts - - src/mcp-server/tools/loanWritebackSuppliersGetCreateUpdateModel.ts - - src/mcp-server/tools/loanWritebackTransfersCreate.ts - - src/mcp-server/tools/loanWritebackTransfersGetCreateModel.ts - - src/mcp-server/tools/manageDataGetStatus.ts - - src/mcp-server/tools/manageDataPullOperationsGet.ts - - src/mcp-server/tools/manageDataPullOperationsList.ts - - src/mcp-server/tools/manageDataRefreshAllDataTypes.ts - - src/mcp-server/tools/manageDataRefreshDataType.ts - - src/mcp-server/tools/manageReportsGenerateReport.ts - - src/mcp-server/tools/manageReportsListReports.ts - - src/mcp-server/tools/salesCustomersGet.ts - - src/mcp-server/tools/salesCustomersList.ts - - src/mcp-server/tools/salesDisputesGet.ts - - src/mcp-server/tools/salesDisputesList.ts - - src/mcp-server/tools/salesLocationsGet.ts - - src/mcp-server/tools/salesLocationsList.ts - - src/mcp-server/tools/salesMetricsGetCustomerRetention.ts - - src/mcp-server/tools/salesMetricsGetLifetimeValue.ts - - src/mcp-server/tools/salesMetricsGetRevenue.ts - - src/mcp-server/tools/salesOrdersGet.ts - - src/mcp-server/tools/salesOrdersList.ts - - src/mcp-server/tools/salesPaymentMethodsGet.ts - - src/mcp-server/tools/salesPaymentMethodsList.ts - - src/mcp-server/tools/salesPaymentsGet.ts - - src/mcp-server/tools/salesPaymentsList.ts - - src/mcp-server/tools/salesProductCategoriesGet.ts - - src/mcp-server/tools/salesProductCategoriesList.ts - - src/mcp-server/tools/salesProductsGet.ts - - src/mcp-server/tools/salesProductsList.ts - - src/mcp-server/tools/salesReportsGetOrders.ts - - src/mcp-server/tools/salesReportsGetRefunds.ts - - src/mcp-server/tools/salesTransactionsGet.ts - - src/mcp-server/tools/salesTransactionsList.ts - - src/mcp-server/tools/transactionsAccountTransactionsGet.ts - - src/mcp-server/tools/transactionsAccountTransactionsList.ts - - src/mcp-server/tools/transactionsDirectCostsDownloadAttachment.ts - - src/mcp-server/tools/transactionsDirectCostsGet.ts - - src/mcp-server/tools/transactionsDirectCostsGetAttachment.ts - - src/mcp-server/tools/transactionsDirectCostsList.ts - - src/mcp-server/tools/transactionsDirectCostsListAttachments.ts - - src/mcp-server/tools/transactionsJournalEntriesGet.ts - - src/mcp-server/tools/transactionsJournalEntriesList.ts - - src/mcp-server/tools/transactionsJournalsGet.ts - - src/mcp-server/tools/transactionsJournalsList.ts - - src/mcp-server/tools/transactionsTransfersGet.ts - - src/mcp-server/tools/transactionsTransfersList.ts - - src/sdk/accountbalances.ts - - src/sdk/accountingbankdata.ts - - src/sdk/accounts.ts - - src/sdk/accountspayable.ts - - src/sdk/accountsreceivable.ts - - src/sdk/accounttransactions.ts - - src/sdk/balancesheet.ts - - src/sdk/bankaccounts.ts - - src/sdk/banking.ts - - src/sdk/bankstatements.ts - - src/sdk/banktransactions.ts - - src/sdk/billcreditnotes.ts - - src/sdk/billpayments.ts - - src/sdk/bills.ts - - src/sdk/cashflow.ts - - src/sdk/categorizedstatement.ts - - src/sdk/codatlendingaccounts.ts - - src/sdk/codatlendingbankingaccounts.ts - - src/sdk/codatlendingcustomers.ts - - src/sdk/codatlendingdirectcosts.ts - - src/sdk/codatlendingloanwritebackaccounts.ts - - src/sdk/codatlendingloanwritebackpayments.ts - - src/sdk/codatlendingpayments.ts - - src/sdk/codatlendingreports.ts - - src/sdk/codatlendingsalestransactions.ts - - src/sdk/codatlendingsuppliers.ts - - src/sdk/codatlendingtransactions.ts - - src/sdk/codatlendingtransfers.ts - - src/sdk/companies.ts - - src/sdk/companyinfo.ts - - src/sdk/connections.ts - - src/sdk/createoperations.ts - - src/sdk/creditnotes.ts - - src/sdk/customers.ts - - src/sdk/dataintegrity.ts - - src/sdk/directcosts.ts - - src/sdk/directincomes.ts - - src/sdk/disputes.ts - - src/sdk/excelreports.ts - - src/sdk/fileupload.ts - - src/sdk/financialstatements.ts - - src/sdk/index.ts - - src/sdk/invoices.ts - - src/sdk/journalentries.ts - - src/sdk/journals.ts - - src/sdk/liabilities.ts - - src/sdk/loanwriteback.ts - - src/sdk/locations.ts - - src/sdk/managedata.ts - - src/sdk/managereports.ts - - src/sdk/metrics.ts - - src/sdk/models/errors/errormessage.ts - - src/sdk/models/errors/httpclienterrors.ts - - src/sdk/models/errors/index.ts - - src/sdk/models/errors/sdkerror.ts - - src/sdk/models/errors/sdkvalidationerror.ts - - src/sdk/models/operations/createaccount.ts - - src/sdk/models/operations/createbankaccount.ts - - src/sdk/models/operations/createbankaccountmapping.ts - - src/sdk/models/operations/createbanktransactions.ts - - src/sdk/models/operations/createconnection.ts - - src/sdk/models/operations/createdirectcost.ts - - src/sdk/models/operations/createpayment.ts - - src/sdk/models/operations/createsourceaccount.ts - - src/sdk/models/operations/createsupplier.ts - - src/sdk/models/operations/createtransfer.ts - - src/sdk/models/operations/deletecompany.ts - - src/sdk/models/operations/deleteconnection.ts - - src/sdk/models/operations/downloadaccountingbillattachment.ts - - src/sdk/models/operations/downloadaccountingcustomerattachment.ts - - src/sdk/models/operations/downloadaccountingdirectcostattachment.ts - - src/sdk/models/operations/downloadaccountingdirectincomeattachment.ts - - src/sdk/models/operations/downloadaccountinginvoiceattachment.ts - - src/sdk/models/operations/downloadaccountinginvoicepdf.ts - - src/sdk/models/operations/downloadaccountingsupplierattachment.ts - - src/sdk/models/operations/downloadexcelreport.ts - - src/sdk/models/operations/downloadfiles.ts - - src/sdk/models/operations/endbankstatementuploadsession.ts - - src/sdk/models/operations/generateexcelreport.ts - - src/sdk/models/operations/generateloansummary.ts - - src/sdk/models/operations/generateloantransactions.ts - - src/sdk/models/operations/generatereport.ts - - src/sdk/models/operations/getaccountingaccount.ts - - src/sdk/models/operations/getaccountingaccounttransaction.ts - - src/sdk/models/operations/getaccountingagedcreditorsreport.ts - - src/sdk/models/operations/getaccountingageddebtorsreport.ts - - src/sdk/models/operations/getaccountingbalancesheet.ts - - src/sdk/models/operations/getaccountingbankaccount.ts - - src/sdk/models/operations/getaccountingbill.ts - - src/sdk/models/operations/getaccountingbillattachment.ts - - src/sdk/models/operations/getaccountingbillcreditnote.ts - - src/sdk/models/operations/getaccountingbillpayment.ts - - src/sdk/models/operations/getaccountingcashflowstatement.ts - - src/sdk/models/operations/getaccountingcreditnote.ts - - src/sdk/models/operations/getaccountingcustomer.ts - - src/sdk/models/operations/getaccountingcustomerattachment.ts - - src/sdk/models/operations/getaccountingdirectcost.ts - - src/sdk/models/operations/getaccountingdirectcostattachment.ts - - src/sdk/models/operations/getaccountingdirectincome.ts - - src/sdk/models/operations/getaccountingdirectincomeattachment.ts - - src/sdk/models/operations/getaccountinginvoice.ts - - src/sdk/models/operations/getaccountinginvoiceattachment.ts - - src/sdk/models/operations/getaccountingjournal.ts - - src/sdk/models/operations/getaccountingjournalentry.ts - - src/sdk/models/operations/getaccountingpayment.ts - - src/sdk/models/operations/getaccountingprofile.ts - - src/sdk/models/operations/getaccountingprofitandloss.ts - - src/sdk/models/operations/getaccountingsupplier.ts - - src/sdk/models/operations/getaccountingsupplierattachment.ts - - src/sdk/models/operations/getaccountingtransfer.ts - - src/sdk/models/operations/getbankaccountmapping.ts - - src/sdk/models/operations/getbankingaccount.ts - - src/sdk/models/operations/getbankingtransaction.ts - - src/sdk/models/operations/getbankingtransactioncategory.ts - - src/sdk/models/operations/getbankstatementuploadconfiguration.ts - - src/sdk/models/operations/getcategorizedbalancesheetstatement.ts - - src/sdk/models/operations/getcategorizedbankstatement.ts - - src/sdk/models/operations/getcategorizedprofitandlossstatement.ts - - src/sdk/models/operations/getcommercecustomer.ts - - src/sdk/models/operations/getcommercecustomerretentionmetrics.ts - - src/sdk/models/operations/getcommercedispute.ts - - src/sdk/models/operations/getcommercelifetimevaluemetrics.ts - - src/sdk/models/operations/getcommercelocation.ts - - src/sdk/models/operations/getcommerceorder.ts - - src/sdk/models/operations/getcommerceordersreport.ts - - src/sdk/models/operations/getcommercepayment.ts - - src/sdk/models/operations/getcommercepaymentmethod.ts - - src/sdk/models/operations/getcommerceproduct.ts - - src/sdk/models/operations/getcommerceproductcategory.ts - - src/sdk/models/operations/getcommerceprofile.ts - - src/sdk/models/operations/getcommercerefundsreport.ts - - src/sdk/models/operations/getcommercerevenuemetrics.ts - - src/sdk/models/operations/getcommercetransaction.ts - - src/sdk/models/operations/getcompany.ts - - src/sdk/models/operations/getconnection.ts - - src/sdk/models/operations/getcreatebanktransactionsmodel.ts - - src/sdk/models/operations/getcreatechartofaccountsmodel.ts - - src/sdk/models/operations/getcreatedirectcostsmodel.ts - - src/sdk/models/operations/getcreateoperation.ts - - src/sdk/models/operations/getcreatepaymentmodel.ts - - src/sdk/models/operations/getcreatetransfersmodel.ts - - src/sdk/models/operations/getcreateupdatebankaccountsmodel.ts - - src/sdk/models/operations/getcreateupdatesuppliersmodel.ts - - src/sdk/models/operations/getdataintegritystatus.ts - - src/sdk/models/operations/getdataintegritysummaries.ts - - src/sdk/models/operations/getdatastatus.ts - - src/sdk/models/operations/getexcelreportgenerationstatus.ts - - src/sdk/models/operations/getloansummary.ts - - src/sdk/models/operations/getpulloperation.ts - - src/sdk/models/operations/index.ts - - src/sdk/models/operations/isagedcreditorsreportavailable.ts - - src/sdk/models/operations/isageddebtorsreportavailable.ts - - src/sdk/models/operations/listaccountingaccounts.ts - - src/sdk/models/operations/listaccountingaccounttransactions.ts - - src/sdk/models/operations/listaccountingbankaccounts.ts - - src/sdk/models/operations/listaccountingbankaccounttransactions.ts - - src/sdk/models/operations/listaccountingbillattachments.ts - - src/sdk/models/operations/listaccountingbillcreditnotes.ts - - src/sdk/models/operations/listaccountingbillpayments.ts - - src/sdk/models/operations/listaccountingbills.ts - - src/sdk/models/operations/listaccountingcreditnotes.ts - - src/sdk/models/operations/listaccountingcustomerattachments.ts - - src/sdk/models/operations/listaccountingcustomers.ts - - src/sdk/models/operations/listaccountingdirectcostattachments.ts - - src/sdk/models/operations/listaccountingdirectcosts.ts - - src/sdk/models/operations/listaccountingdirectincomeattachments.ts - - src/sdk/models/operations/listaccountingdirectincomes.ts - - src/sdk/models/operations/listaccountinginvoiceattachments.ts - - src/sdk/models/operations/listaccountinginvoices.ts - - src/sdk/models/operations/listaccountingjournalentries.ts - - src/sdk/models/operations/listaccountingjournals.ts - - src/sdk/models/operations/listaccountingpayments.ts - - src/sdk/models/operations/listaccountingsupplierattachments.ts - - src/sdk/models/operations/listaccountingsuppliers.ts - - src/sdk/models/operations/listaccountingtransfers.ts - - src/sdk/models/operations/listbankingaccountbalances.ts - - src/sdk/models/operations/listbankingaccounts.ts - - src/sdk/models/operations/listbankingtransactioncategories.ts - - src/sdk/models/operations/listbankingtransactions.ts - - src/sdk/models/operations/listcommercecustomers.ts - - src/sdk/models/operations/listcommercedisputes.ts - - src/sdk/models/operations/listcommercelocations.ts - - src/sdk/models/operations/listcommerceorders.ts - - src/sdk/models/operations/listcommercepaymentmethods.ts - - src/sdk/models/operations/listcommercepayments.ts - - src/sdk/models/operations/listcommerceproductcategories.ts - - src/sdk/models/operations/listcommerceproducts.ts - - src/sdk/models/operations/listcommercetransactions.ts - - src/sdk/models/operations/listcompanies.ts - - src/sdk/models/operations/listconnections.ts - - src/sdk/models/operations/listcreateoperations.ts - - src/sdk/models/operations/listdataintegritydetails.ts - - src/sdk/models/operations/listfiles.ts - - src/sdk/models/operations/listloantransactions.ts - - src/sdk/models/operations/listpulloperations.ts - - src/sdk/models/operations/listreconciledinvoices.ts - - src/sdk/models/operations/listreports.ts - - src/sdk/models/operations/refreshalldatatypes.ts - - src/sdk/models/operations/refreshdatatype.ts - - src/sdk/models/operations/replacecompany.ts - - src/sdk/models/operations/setbankstatementuploadconfiguration.ts - - src/sdk/models/operations/startbankstatementuploadsession.ts - - src/sdk/models/operations/unlinkconnection.ts - - src/sdk/models/operations/updatecompany.ts - - src/sdk/models/operations/uploadbankstatementdata.ts - - src/sdk/models/operations/uploadfiles.ts - - src/sdk/models/shared/accountbalance.ts - - src/sdk/models/shared/accountbalanceamounts.ts - - src/sdk/models/shared/accountcategoriesupdatedwebhook.ts - - src/sdk/models/shared/accountcategoriesupdatedwebhookdata.ts - - src/sdk/models/shared/accountcategorylevel.ts - - src/sdk/models/shared/accountidentifiers.ts - - src/sdk/models/shared/accountidentifiertype.ts - - src/sdk/models/shared/accountinfo.ts - - src/sdk/models/shared/accountingaccount.ts - - src/sdk/models/shared/accountingaccounts.ts - - src/sdk/models/shared/accountingaccounttransaction.ts - - src/sdk/models/shared/accountingaccounttransactions.ts - - src/sdk/models/shared/accountingaddress.ts - - src/sdk/models/shared/accountingaddresstype.ts - - src/sdk/models/shared/accountingagedcreditorreport.ts - - src/sdk/models/shared/accountingageddebtorreport.ts - - src/sdk/models/shared/accountingattachment.ts - - src/sdk/models/shared/accountingbalancesheet.ts - - src/sdk/models/shared/accountingbankaccount.ts - - src/sdk/models/shared/accountingbankaccounts.ts - - src/sdk/models/shared/accountingbankaccounttype.ts - - src/sdk/models/shared/accountingbanktransaction.ts - - src/sdk/models/shared/accountingbanktransactions.ts - - src/sdk/models/shared/accountingbill.ts - - src/sdk/models/shared/accountingbillcreditnote.ts - - src/sdk/models/shared/accountingbillcreditnotes.ts - - src/sdk/models/shared/accountingbillpayment.ts - - src/sdk/models/shared/accountingbillpayments.ts - - src/sdk/models/shared/accountingbills.ts - - src/sdk/models/shared/accountingcashflowstatement.ts - - src/sdk/models/shared/accountingcompanyinfo.ts - - src/sdk/models/shared/accountingcreateaccountresponse.ts - - src/sdk/models/shared/accountingcreatebankaccountresponse.ts - - src/sdk/models/shared/accountingcreatebanktransactions.ts - - src/sdk/models/shared/accountingcreatebanktransactionsresponse.ts - - src/sdk/models/shared/accountingcreatedirectcostresponse.ts - - src/sdk/models/shared/accountingcreatepaymentresponse.ts - - src/sdk/models/shared/accountingcreatesupplierresponse.ts - - src/sdk/models/shared/accountingcreatetransferresponse.ts - - src/sdk/models/shared/accountingcreditnote.ts - - src/sdk/models/shared/accountingcreditnotes.ts - - src/sdk/models/shared/accountingcustomer.ts - - src/sdk/models/shared/accountingcustomerref.ts - - src/sdk/models/shared/accountingcustomers.ts - - src/sdk/models/shared/accountingdirectcost.ts - - src/sdk/models/shared/accountingdirectcosts.ts - - src/sdk/models/shared/accountingdirectincome.ts - - src/sdk/models/shared/accountingdirectincomes.ts - - src/sdk/models/shared/accountinginvoice.ts - - src/sdk/models/shared/accountinginvoices.ts - - src/sdk/models/shared/accountingjournal.ts - - src/sdk/models/shared/accountingjournalentries.ts - - src/sdk/models/shared/accountingjournalentry.ts - - src/sdk/models/shared/accountingjournals.ts - - src/sdk/models/shared/accountingpayment.ts - - src/sdk/models/shared/accountingpaymentallocation.ts - - src/sdk/models/shared/accountingpayments.ts - - src/sdk/models/shared/accountingprofitandlossreport.ts - - src/sdk/models/shared/accountingrecordref.ts - - src/sdk/models/shared/accountingsupplier.ts - - src/sdk/models/shared/accountingsuppliers.ts - - src/sdk/models/shared/accountingtransfer.ts - - src/sdk/models/shared/accountingtransfers.ts - - src/sdk/models/shared/accountinstitution.ts - - src/sdk/models/shared/accountprototype.ts - - src/sdk/models/shared/accountref.ts - - src/sdk/models/shared/accounts.ts - - src/sdk/models/shared/accountspayabletracking.ts - - src/sdk/models/shared/accountsreceivabletracking.ts - - src/sdk/models/shared/accountstatus.ts - - src/sdk/models/shared/accounttransactionline.ts - - src/sdk/models/shared/accounttransactionlinerecordref.ts - - src/sdk/models/shared/accounttype.ts - - src/sdk/models/shared/agedcreditor.ts - - src/sdk/models/shared/agedcurrencyoutstanding.ts - - src/sdk/models/shared/ageddebtor.ts - - src/sdk/models/shared/agedoutstandingamount.ts - - src/sdk/models/shared/agedoutstandingamountdetail.ts - - src/sdk/models/shared/attachments.ts - - src/sdk/models/shared/balancesheet.ts - - src/sdk/models/shared/bankaccountref.ts - - src/sdk/models/shared/bankaccountstatus.ts - - src/sdk/models/shared/bankfeedbankaccountmapping.ts - - src/sdk/models/shared/bankfeedbankaccountmappingresponse.ts - - src/sdk/models/shared/bankfeedmapping.ts - - src/sdk/models/shared/bankingaccount.ts - - src/sdk/models/shared/bankingaccountbalance.ts - - src/sdk/models/shared/bankingaccountbalances.ts - - src/sdk/models/shared/bankingaccounts.ts - - src/sdk/models/shared/bankingtransaction.ts - - src/sdk/models/shared/bankingtransactioncategories.ts - - src/sdk/models/shared/bankingtransactioncategory.ts - - src/sdk/models/shared/bankingtransactionref.ts - - src/sdk/models/shared/bankingtransactions.ts - - src/sdk/models/shared/bankstatementuploadconfiguration.ts - - src/sdk/models/shared/banktransactiontype.ts - - src/sdk/models/shared/billcreditnotelineitem.ts - - src/sdk/models/shared/billcreditnotestatus.ts - - src/sdk/models/shared/billedtotype.ts - - src/sdk/models/shared/billedtotype1.ts - - src/sdk/models/shared/billlineitem.ts - - src/sdk/models/shared/billpaymentline.ts - - src/sdk/models/shared/billpaymentlinelink.ts - - src/sdk/models/shared/billpaymentlinelinktype.ts - - src/sdk/models/shared/billstatus.ts - - src/sdk/models/shared/cashflowstatement.ts - - src/sdk/models/shared/clientratelimitwebhook.ts - - src/sdk/models/shared/clientratelimitwebhookpayload.ts - - src/sdk/models/shared/codatfile.ts - - src/sdk/models/shared/commerceaddress.ts - - src/sdk/models/shared/commerceaddresstype.ts - - src/sdk/models/shared/commercecompanyinfo.ts - - src/sdk/models/shared/commercecustomer.ts - - src/sdk/models/shared/commercecustomerref.ts - - src/sdk/models/shared/commercecustomers.ts - - src/sdk/models/shared/commercedispute.ts - - src/sdk/models/shared/commercedisputes.ts - - src/sdk/models/shared/commercelocation.ts - - src/sdk/models/shared/commercelocations.ts - - src/sdk/models/shared/commerceorder.ts - - src/sdk/models/shared/commerceorders.ts - - src/sdk/models/shared/commercepayment.ts - - src/sdk/models/shared/commercepaymentmethod.ts - - src/sdk/models/shared/commercepaymentmethods.ts - - src/sdk/models/shared/commercepayments.ts - - src/sdk/models/shared/commerceproduct.ts - - src/sdk/models/shared/commerceproductcategories.ts - - src/sdk/models/shared/commerceproductcategory.ts - - src/sdk/models/shared/commerceproducts.ts - - src/sdk/models/shared/commercerecordref.ts - - src/sdk/models/shared/commercereport.ts - - src/sdk/models/shared/commercereportcomponent.ts - - src/sdk/models/shared/commercereportdimension.ts - - src/sdk/models/shared/commercereporterror.ts - - src/sdk/models/shared/commercereportmeasure.ts - - src/sdk/models/shared/commercetransaction.ts - - src/sdk/models/shared/commercetransactions.ts - - src/sdk/models/shared/companies.ts - - src/sdk/models/shared/company.ts - - src/sdk/models/shared/companyreference.ts - - src/sdk/models/shared/companyrequestbody.ts - - src/sdk/models/shared/companyupdaterequest.ts - - src/sdk/models/shared/connection.ts - - src/sdk/models/shared/connections.ts - - src/sdk/models/shared/contact.ts - - src/sdk/models/shared/contactref.ts - - src/sdk/models/shared/createbankaccounttransaction.ts - - src/sdk/models/shared/creditnotelineitem.ts - - src/sdk/models/shared/creditnotestatus.ts - - src/sdk/models/shared/customerstatus.ts - - src/sdk/models/shared/dataconnectionerror.ts - - src/sdk/models/shared/dataconnectionstatus.ts - - src/sdk/models/shared/dataintegrityamounts.ts - - src/sdk/models/shared/dataintegritybyamount.ts - - src/sdk/models/shared/dataintegritybycount.ts - - src/sdk/models/shared/dataintegrityconnectionid.ts - - src/sdk/models/shared/dataintegritydatatype.ts - - src/sdk/models/shared/dataintegritydates.ts - - src/sdk/models/shared/dataintegritydetail.ts - - src/sdk/models/shared/dataintegritydetails.ts - - src/sdk/models/shared/dataintegritymatch.ts - - src/sdk/models/shared/dataintegritystatus.ts - - src/sdk/models/shared/dataintegritystatuses.ts - - src/sdk/models/shared/dataintegritystatusinfo.ts - - src/sdk/models/shared/dataintegritysummaries.ts - - src/sdk/models/shared/dataintegritysummary.ts - - src/sdk/models/shared/datasource.ts - - src/sdk/models/shared/datastatus.ts - - src/sdk/models/shared/datatype.ts - - src/sdk/models/shared/directcostlineitem.ts - - src/sdk/models/shared/directcostprototype.ts - - src/sdk/models/shared/directincomelineitem.ts - - src/sdk/models/shared/disputestatus.ts - - src/sdk/models/shared/enduploadsessionrequest.ts - - src/sdk/models/shared/enhancedcashflowitem.ts - - src/sdk/models/shared/enhancedcashflowtransactions.ts - - src/sdk/models/shared/enhancedfinancialreport.ts - - src/sdk/models/shared/enhancedinvoicereportitem.ts - - src/sdk/models/shared/enhancedinvoicesreport.ts - - src/sdk/models/shared/enhancedreportaccountcategory.ts - - src/sdk/models/shared/enhancedreportinfo.ts - - src/sdk/models/shared/errorvalidation.ts - - src/sdk/models/shared/errorvalidationitem.ts - - src/sdk/models/shared/excelreporttypes.ts - - src/sdk/models/shared/excelstatus.ts - - src/sdk/models/shared/file.ts - - src/sdk/models/shared/fileupload.ts - - src/sdk/models/shared/halref.ts - - src/sdk/models/shared/index.ts - - src/sdk/models/shared/integritystatus.ts - - src/sdk/models/shared/invoicelineitem.ts - - src/sdk/models/shared/invoicestatus.ts - - src/sdk/models/shared/itemref.ts - - src/sdk/models/shared/items.ts - - src/sdk/models/shared/journalentryrecordref.ts - - src/sdk/models/shared/journalline.ts - - src/sdk/models/shared/journalref.ts - - src/sdk/models/shared/journalstatus.ts - - src/sdk/models/shared/lendingcustomerref.ts - - src/sdk/models/shared/links.ts - - src/sdk/models/shared/loanref.ts - - src/sdk/models/shared/loansummary.ts - - src/sdk/models/shared/loansummaryintegrationtype.ts - - src/sdk/models/shared/loansummaryrecordref.ts - - src/sdk/models/shared/loansummaryrecordreftype.ts - - src/sdk/models/shared/loansummaryreportinfo.ts - - src/sdk/models/shared/loansummaryreportitem.ts - - src/sdk/models/shared/loantransactions.ts - - src/sdk/models/shared/loantransactionsreportinfo.ts - - src/sdk/models/shared/locationref.ts - - src/sdk/models/shared/metadata.ts - - src/sdk/models/shared/orderdiscountallocation.ts - - src/sdk/models/shared/orderlineitem.ts - - src/sdk/models/shared/path.ts - - src/sdk/models/shared/payment.ts - - src/sdk/models/shared/paymentallocationpayment.ts - - src/sdk/models/shared/paymentline.ts - - src/sdk/models/shared/paymentlinelink.ts - - src/sdk/models/shared/paymentlinktype.ts - - src/sdk/models/shared/paymentmethodref.ts - - src/sdk/models/shared/paymentref.ts - - src/sdk/models/shared/paymentstatus.ts - - src/sdk/models/shared/paymenttype.ts - - src/sdk/models/shared/periodunit.ts - - src/sdk/models/shared/phonenumber.ts - - src/sdk/models/shared/phonenumbertype.ts - - src/sdk/models/shared/productinventory.ts - - src/sdk/models/shared/productinventorylocation.ts - - src/sdk/models/shared/productprice.ts - - src/sdk/models/shared/productref.ts - - src/sdk/models/shared/productvariant.ts - - src/sdk/models/shared/productvariantref.ts - - src/sdk/models/shared/productvariantstatus.ts - - src/sdk/models/shared/profitandlossreport.ts - - src/sdk/models/shared/projectref.ts - - src/sdk/models/shared/propertieaccounttype.ts - - src/sdk/models/shared/propertiedatatype.ts - - src/sdk/models/shared/propertieitemref.ts - - src/sdk/models/shared/pulloperation.ts - - src/sdk/models/shared/pulloperations.ts - - src/sdk/models/shared/pushchangetype.ts - - src/sdk/models/shared/pushfieldvalidation.ts - - src/sdk/models/shared/pushoperation.ts - - src/sdk/models/shared/pushoperationchange.ts - - src/sdk/models/shared/pushoperationref.ts - - src/sdk/models/shared/pushoperations.ts - - src/sdk/models/shared/pushoperationstatus.ts - - src/sdk/models/shared/pushoption.ts - - src/sdk/models/shared/pushoptionchoice.ts - - src/sdk/models/shared/pushoptionproperty.ts - - src/sdk/models/shared/pushoptiontype.ts - - src/sdk/models/shared/pushvalidationinfo.ts - - src/sdk/models/shared/reportbasis.ts - - src/sdk/models/shared/reportcomponentmeasure.ts - - src/sdk/models/shared/reportgenerationpayload.ts - - src/sdk/models/shared/reportinfo.ts - - src/sdk/models/shared/reportinput.ts - - src/sdk/models/shared/reportitems.ts - - src/sdk/models/shared/reportline.ts - - src/sdk/models/shared/reportoperation.ts - - src/sdk/models/shared/reports.ts - - src/sdk/models/shared/reporttype.ts - - src/sdk/models/shared/routinginfo.ts - - src/sdk/models/shared/schema.ts - - src/sdk/models/shared/security.ts - - src/sdk/models/shared/servicecharge.ts - - src/sdk/models/shared/servicechargetype.ts - - src/sdk/models/shared/sourceaccount.ts - - src/sdk/models/shared/sourceaccountprototype.ts - - src/sdk/models/shared/sourceaccountv2.ts - - src/sdk/models/shared/sourceaccountv2prototype.ts - - src/sdk/models/shared/sourceref.ts - - src/sdk/models/shared/startuploadsessionrequest.ts - - src/sdk/models/shared/status.ts - - src/sdk/models/shared/supplementaldata.ts - - src/sdk/models/shared/supplierref.ts - - src/sdk/models/shared/supplierstatus.ts - - src/sdk/models/shared/targetaccountoption.ts - - src/sdk/models/shared/taxcomponentallocation.ts - - src/sdk/models/shared/taxcomponentref.ts - - src/sdk/models/shared/taxrateref.ts - - src/sdk/models/shared/tracking.ts - - src/sdk/models/shared/trackingcategoryref.ts - - src/sdk/models/shared/trackingrecordref.ts - - src/sdk/models/shared/transactioncategory.ts - - src/sdk/models/shared/transactioncategoryref.ts - - src/sdk/models/shared/transactioncategorystatus.ts - - src/sdk/models/shared/transactioncode.ts - - src/sdk/models/shared/transactionsourceref.ts - - src/sdk/models/shared/transactionsourcetype.ts - - src/sdk/models/shared/transactiontype.ts - - src/sdk/models/shared/transferaccount.ts - - src/sdk/models/shared/validation.ts - - src/sdk/models/shared/validationitem.ts - - src/sdk/models/shared/weblink.ts - - src/sdk/models/shared/zero.ts - - src/sdk/models/webhooks/index.ts - - src/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.ts - - src/sdk/orders.ts - - src/sdk/paymentmethods.ts - - src/sdk/payments.ts - - src/sdk/productcategories.ts - - src/sdk/products.ts - - src/sdk/profitandloss.ts - - src/sdk/pulloperations.ts - - src/sdk/refresh.ts - - src/sdk/reports.ts - - src/sdk/sales.ts - - src/sdk/sdk.ts - - src/sdk/sourceaccounts.ts - - src/sdk/suppliers.ts - - src/sdk/transactioncategories.ts - - src/sdk/transactions.ts - - src/sdk/transfers.ts - - src/sdk/types/async.ts - - src/sdk/types/blobs.ts - - src/sdk/types/constdatetime.ts - - src/sdk/types/decimal.ts - - src/sdk/types/enums.ts - - src/sdk/types/fp.ts - - src/sdk/types/index.ts - - src/sdk/types/operations.ts - - src/sdk/types/rfcdate.ts - - src/sdk/types/streams.ts - - src/sdk/types/webhooks.ts - - tsconfig.json diff --git a/lending/.speakeasy/gen.yaml b/lending/.speakeasy/gen.yaml deleted file mode 100644 index af59d13da..000000000 --- a/lending/.speakeasy/gen.yaml +++ /dev/null @@ -1,91 +0,0 @@ -configVersion: 2.0.0 -generation: - sdkClassName: CodatLending - maintainOpenAPIOrder: true - usageSnippets: - optionalPropertyRendering: withExample - sdkInitStyle: constructor - useClassNamesForArrayFields: true - fixes: - nameResolutionDec2023: true - nameResolutionFeb2025: false - parameterOrderingFeb2024: true - requestResponseComponentNamesFeb2024: true - securityFeb2025: false - sharedErrorComponentsApr2025: false - sharedNestedComponentsJan2026: false - nameOverrideFeb2026: false - auth: - oAuth2ClientCredentialsEnabled: false - oAuth2PasswordEnabled: false - hoistGlobalSecurity: true - schemas: - allOfMergeStrategy: shallowMerge - requestBodyFieldName: "" - versioningStrategy: automatic - persistentEdits: {} - tests: - generateTests: true - generateNewTests: false - skipResponseBodyAssertions: false - telemetryEnabled: true -typescript: - version: 7.6.0 - acceptHeaderEnum: true - additionalDependencies: - dependencies: {} - devDependencies: {} - peerDependencies: {} - additionalPackageJSON: {} - additionalScripts: {} - alwaysIncludeInboundAndOutbound: false - author: Codat - baseErrorName: CodatLendingError - clientServerStatusCodesAsErrors: true - constFieldsAlwaysOptional: false - defaultErrorName: SDKError - description: Make credit decisions backed by enhanced financials, metrics, reports, and data integrity features. - enableCustomCodeRegions: false - enableMCPServer: false - enableReactQuery: false - enumFormat: union - exportZodModelNamespace: false - fixEnumNameSanitization: false - flatAdditionalProperties: false - flattenGlobalSecurity: true - flatteningOrder: body-first - formStringArrayEncodeMode: encoded-string - forwardCompatibleEnumsByDefault: false - forwardCompatibleUnionsByDefault: "false" - generateExamples: true - imports: - option: openapi - paths: - callbacks: sdk/models/callbacks - errors: sdk/models/errors - operations: sdk/models/operations - shared: sdk/models/shared - webhooks: sdk/models/webhooks - inferUnionDiscriminators: true - inputModelSuffix: input - jsonpath: legacy - laxMode: strict - legacyFileNaming: true - maxMethodParams: 0 - methodArguments: infer-optional-args - modelPropertyCasing: camel - moduleFormat: commonjs - multipartArrayFormat: legacy - outputModelSuffix: output - packageName: '@codat/lending' - preApplyUnionDiscriminators: true - preserveModelFieldNames: false - responseFormat: flat - sseFlatResponse: false - templateVersion: v2 - unionStrategy: left-to-right - usageSDKInitImports: [] - useIndexModules: true - useOxlint: false - useTsgo: false - zodVersion: v3 diff --git a/lending/RELEASES.md b/lending/RELEASES.md index f1cc27d1a..6547bcfb3 100644 --- a/lending/RELEASES.md +++ b/lending/RELEASES.md @@ -198,4 +198,14 @@ Based on: ### Generated - [typescript v7.6.0] lending ### Releases -- [NPM v7.6.0] https://www.npmjs.com/package/@codat/lending/v/7.6.0 - lending \ No newline at end of file +- [NPM v7.6.0] https://www.npmjs.com/package/@codat/lending/v/7.6.0 - lending + +## 2026-08-05 19:30:17 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Lending.yaml +- codat sdk-codegen 1b5626f25df09d713121c5e8a048d9b44b3b7178 https://github.com/codat-spikes/sdk-codegen +### Generated +- [typescript v7.6.1] lending +### Releases +- [NPM v7.6.1] https://www.npmjs.com/package/@codat/lending/v/7.6.1 - lending diff --git a/lending/USAGE.md b/lending/USAGE.md index 46c7913ff..60057f3ba 100644 --- a/lending/USAGE.md +++ b/lending/USAGE.md @@ -1,22 +1,23 @@ - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.list({ - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - tags: "region=uk && team=invoice-finance", - }); - - console.log(result); -} - -run(); - -``` + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` \ No newline at end of file diff --git a/lending/docs/lib/utils/retryconfig.md b/lending/docs/lib/utils/retryconfig.md index 08f95f455..69da01b9f 100644 --- a/lending/docs/lib/utils/retryconfig.md +++ b/lending/docs/lib/utils/retryconfig.md @@ -1,24 +1,24 @@ -# RetryConfig - -Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies. - -## Fields - -| Name | Type | Description | Example | -| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- | -| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` | -| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | | -| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` | - -## BackoffStrategy - -The backoff strategy allows retrying a request with an exponential backoff between each retry. - -### Fields - -| Name | Type | Description | Example | -| ------------------ | ------------ | ----------------------------------------- | -------- | -| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` | -| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` | -| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` | +# RetryConfig + +Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies. + +## Fields + +| Name | Type | Description | Example | +| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- | +| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` | +| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | | +| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` | + +## BackoffStrategy + +The backoff strategy allows retrying a request with an exponential backoff between each retry. + +### Fields + +| Name | Type | Description | Example | +| ------------------ | ------------ | ----------------------------------------- | -------- | +| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` | +| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` | +| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` | | `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` | \ No newline at end of file diff --git a/lending/docs/sdk/models/errors/errormessage.md b/lending/docs/sdk/models/errors/errormessage.md index 3a90ff58c..5c435e852 100644 --- a/lending/docs/sdk/models/errors/errormessage.md +++ b/lending/docs/sdk/models/errors/errormessage.md @@ -1,23 +1,21 @@ -# ErrorMessage - -Your `query` parameter was not correctly formed - -## Example Usage - -```typescript -import { ErrorMessage } from "@codat/lending/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `statusCode` | *number* | :heavy_minus_sign: | The HTTP status code returned by the error. | -| `service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. | -| `error` | *string* | :heavy_minus_sign: | A brief description of the error. | -| `correlationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. | -| `validation` | [shared.ErrorValidation](../../../sdk/models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. | -| `canBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. | +# ErrorMessage + +## Example Usage + +```typescript +import { ErrorMessage } from "@codat/lending/sdk/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `statusCode` | *number* | :heavy_minus_sign: | The HTTP status code returned by the error. | +| `service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. | +| `error` | *string* | :heavy_minus_sign: | A brief description of the error. | +| `correlationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. | +| `validation` | [shared.ErrorValidation](../../../sdk/models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. | +| `canBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. | | `detailedErrorCode` | *number* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createaccountrequest.md b/lending/docs/sdk/models/operations/createaccountrequest.md index 8c145ebd6..b6305e428 100644 --- a/lending/docs/sdk/models/operations/createaccountrequest.md +++ b/lending/docs/sdk/models/operations/createaccountrequest.md @@ -1,22 +1,22 @@ -# CreateAccountRequest - -## Example Usage - -```typescript -import { CreateAccountRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateAccountRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | -| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | +# CreateAccountRequest + +## Example Usage + +```typescript +import { CreateAccountRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateAccountRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | | `accountPrototype` | [shared.AccountPrototype](../../../sdk/models/shared/accountprototype.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createbankaccountmappingrequest.md b/lending/docs/sdk/models/operations/createbankaccountmappingrequest.md index 15b674789..391ba9f7d 100644 --- a/lending/docs/sdk/models/operations/createbankaccountmappingrequest.md +++ b/lending/docs/sdk/models/operations/createbankaccountmappingrequest.md @@ -1,20 +1,20 @@ -# CreateBankAccountMappingRequest - -## Example Usage - -```typescript -import { CreateBankAccountMappingRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateBankAccountMappingRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# CreateBankAccountMappingRequest + +## Example Usage + +```typescript +import { CreateBankAccountMappingRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateBankAccountMappingRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `bankFeedBankAccountMapping` | [shared.BankFeedBankAccountMapping](../../../sdk/models/shared/bankfeedbankaccountmapping.md) | :heavy_minus_sign: | N/A | {
"sourceAccountId": "acc-002",
"targetAccountId": "account-081"
} | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createbankaccountrequest.md b/lending/docs/sdk/models/operations/createbankaccountrequest.md index 491c0ab76..945712079 100644 --- a/lending/docs/sdk/models/operations/createbankaccountrequest.md +++ b/lending/docs/sdk/models/operations/createbankaccountrequest.md @@ -1,22 +1,22 @@ -# CreateBankAccountRequest - -## Example Usage - -```typescript -import { CreateBankAccountRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateBankAccountRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | -| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | -| `accountingBankAccount` | [shared.AccountingBankAccount](../../../sdk/models/shared/accountingbankaccount.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# CreateBankAccountRequest + +## Example Usage + +```typescript +import { CreateBankAccountRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateBankAccountRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | +| `accountingBankAccount` | [shared.AccountingBankAccount](../../../sdk/models/shared/accountingbankaccount.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 [Banking: Account](https://docs.codat.io/lending-api#/schemas/Account) data type.

## 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 software.
* The currency and balance of the account.
* The sort code and account number. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createbanktransactionsrequest.md b/lending/docs/sdk/models/operations/createbanktransactionsrequest.md index 636f11b13..c9d5230b9 100644 --- a/lending/docs/sdk/models/operations/createbanktransactionsrequest.md +++ b/lending/docs/sdk/models/operations/createbanktransactionsrequest.md @@ -1,24 +1,24 @@ -# CreateBankTransactionsRequest - -## Example Usage - -```typescript -import { CreateBankTransactionsRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateBankTransactionsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | -| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | +# CreateBankTransactionsRequest + +## Example Usage + +```typescript +import { CreateBankTransactionsRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateBankTransactionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | | `accountingCreateBankTransactions` | [shared.AccountingCreateBankTransactions](../../../sdk/models/shared/accountingcreatebanktransactions.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createconnectionrequest.md b/lending/docs/sdk/models/operations/createconnectionrequest.md index 5a6f09064..b85c773cc 100644 --- a/lending/docs/sdk/models/operations/createconnectionrequest.md +++ b/lending/docs/sdk/models/operations/createconnectionrequest.md @@ -1,18 +1,18 @@ -# CreateConnectionRequest - -## Example Usage - -```typescript -import { CreateConnectionRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateConnectionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# CreateConnectionRequest + +## Example Usage + +```typescript +import { CreateConnectionRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateConnectionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `requestBody` | [operations.CreateConnectionRequestBody](../../../sdk/models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createconnectionrequestbody.md b/lending/docs/sdk/models/operations/createconnectionrequestbody.md index 4547edc80..4a18fdb3b 100644 --- a/lending/docs/sdk/models/operations/createconnectionrequestbody.md +++ b/lending/docs/sdk/models/operations/createconnectionrequestbody.md @@ -1,17 +1,17 @@ -# CreateConnectionRequestBody - -## Example Usage - -```typescript -import { CreateConnectionRequestBody } from "@codat/lending/sdk/models/operations"; - -let value: CreateConnectionRequestBody = { - platformKey: "gbol", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +# CreateConnectionRequestBody + +## Example Usage + +```typescript +import { CreateConnectionRequestBody } from "@codat/lending/sdk/models/operations"; + +let value: CreateConnectionRequestBody = { + platformKey: "gbol", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `platformKey` | *string* | :heavy_minus_sign: | A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys. | gbol | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createdirectcostrequest.md b/lending/docs/sdk/models/operations/createdirectcostrequest.md index 6ebe7f1d0..6ff24c466 100644 --- a/lending/docs/sdk/models/operations/createdirectcostrequest.md +++ b/lending/docs/sdk/models/operations/createdirectcostrequest.md @@ -1,22 +1,22 @@ -# CreateDirectCostRequest - -## Example Usage - -```typescript -import { CreateDirectCostRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateDirectCostRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | -| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | +# CreateDirectCostRequest + +## Example Usage + +```typescript +import { CreateDirectCostRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateDirectCostRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | | `directCostPrototype` | [shared.DirectCostPrototype](../../../sdk/models/shared/directcostprototype.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createpaymentrequest.md b/lending/docs/sdk/models/operations/createpaymentrequest.md index 2780b870f..d9875f33b 100644 --- a/lending/docs/sdk/models/operations/createpaymentrequest.md +++ b/lending/docs/sdk/models/operations/createpaymentrequest.md @@ -1,22 +1,22 @@ -# CreatePaymentRequest - -## Example Usage - -```typescript -import { CreatePaymentRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreatePaymentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | -| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | -| `accountingPayment` | [shared.AccountingPayment](../../../sdk/models/shared/accountingpayment.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# CreatePaymentRequest + +## Example Usage + +```typescript +import { CreatePaymentRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreatePaymentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | +| `accountingPayment` | [shared.AccountingPayment](../../../sdk/models/shared/accountingpayment.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/lending-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/lending-api#/schemas/Bill) and credit notes against bills.

## Overview

Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-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 software, 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/lending-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 software 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
}
]
}
]
}
``` | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createsourceaccountrequest.md b/lending/docs/sdk/models/operations/createsourceaccountrequest.md index 382b760ed..0abcf4dff 100644 --- a/lending/docs/sdk/models/operations/createsourceaccountrequest.md +++ b/lending/docs/sdk/models/operations/createsourceaccountrequest.md @@ -1,20 +1,20 @@ -# CreateSourceAccountRequest - -## Example Usage - -```typescript -import { CreateSourceAccountRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateSourceAccountRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestBody` | *operations.CreateSourceAccountRequestBody* | :heavy_minus_sign: | N/A | | \ No newline at end of file +# CreateSourceAccountRequest + +## Example Usage + +```typescript +import { CreateSourceAccountRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateSourceAccountRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestBody` | *CreateSourceAccountRequestBody* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createsourceaccountrequestbody.md b/lending/docs/sdk/models/operations/createsourceaccountrequestbody.md index 1d60d9d63..bf49b1f65 100644 --- a/lending/docs/sdk/models/operations/createsourceaccountrequestbody.md +++ b/lending/docs/sdk/models/operations/createsourceaccountrequestbody.md @@ -1,30 +1,16 @@ -# CreateSourceAccountRequestBody - - -## Supported Types - -### `shared.SourceAccountV2Prototype` - -```typescript -const value: shared.SourceAccountV2Prototype = { - id: "", - accountName: "", - accountType: "checking", - accountNumber: "", - currency: "GBP", - balance: new Decimal("9826.32"), - modifiedDate: "2022-10-23T00:00:00Z", - accountInfo: null, -}; -``` - -### `shared.SourceAccountPrototype` - -```typescript -const value: shared.SourceAccountPrototype = { - id: "", - currency: "GBP", - modifiedDate: "2022-10-23T00:00:00Z", -}; -``` - +# CreateSourceAccountRequestBody + + +## Supported Types + +### `shared.SourceAccountPrototype` + +```typescript +const value: shared.SourceAccountPrototype = {}; +``` + +### `shared.SourceAccountV2Prototype` + +```typescript +const value: shared.SourceAccountV2Prototype = {}; +``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createsourceaccountresponsebody.md b/lending/docs/sdk/models/operations/createsourceaccountresponsebody.md index 7fac96dbe..ccd872c96 100644 --- a/lending/docs/sdk/models/operations/createsourceaccountresponsebody.md +++ b/lending/docs/sdk/models/operations/createsourceaccountresponsebody.md @@ -1,48 +1,15 @@ -# CreateSourceAccountResponseBody - -Success - - -## Supported Types - -### `shared.SourceAccountV2` - -```typescript -const value: shared.SourceAccountV2 = { - id: "acc-001", - accountName: "account-081", - accountType: "checking", - accountNumber: "12345670", - routingInfo: { - bankCode: "21001088", - }, - currency: "GBP", - balance: new Decimal("99.99"), - accountInfo: { - description: "account description 1", - nickname: "account 123", - accountOpenDate: "2023-05-06", - availableBalance: new Decimal("10"), - }, - modifiedDate: "2024-08-02T00:00:00.000Z", - status: "pending", - feedStartDate: "2024-05-01", -}; -``` - -### `shared.SourceAccount` - -```typescript -const value: shared.SourceAccount = { - id: "acc-002", - accountName: "account-081", - accountType: "Credit", - accountNumber: "12345670", - sortCode: "123456", - currency: "GBP", - balance: new Decimal("99.99"), - modifiedDate: "2023-01-09T14:14:14.1057478Z", - status: "pending", -}; -``` - +# + +## Example Usage + +```typescript +import { } from "@codat/lending/sdk/models/operations"; + +let value: = ""; +``` + +## Values + +```typescript + +``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createsupplierrequest.md b/lending/docs/sdk/models/operations/createsupplierrequest.md index dd116aa26..5bd4feb69 100644 --- a/lending/docs/sdk/models/operations/createsupplierrequest.md +++ b/lending/docs/sdk/models/operations/createsupplierrequest.md @@ -1,22 +1,22 @@ -# CreateSupplierRequest - -## Example Usage - -```typescript -import { CreateSupplierRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateSupplierRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | -| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | -| `accountingSupplier` | [shared.AccountingSupplier](../../../sdk/models/shared/accountingsupplier.md) | :heavy_minus_sign: | N/A | {
"id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F",
"supplierName": "Kelly's Industrial Supplies",
"contactName": "Kelly's Industrial Supplies",
"emailAddress": "sales@kellysupplies.com",
"phone": "07999 999999",
"addresses": [
{
"type": "Billing",
"line1": "Unit 51",
"line2": "Bakersfield Industrial Estate",
"city": "Bakersfield",
"region": "California",
"country": "USA",
"postalcode": "93308"
}
],
"registrationNumber": "string",
"taxNumber": "string",
"status": "Unknown",
"defaultCurrency": "string",
"metadata": {
"isDeleted": true
},
"supplementalData": {
"content": {
"property1": {
"property1": null,
"property2": null
},
"property2": {
"property1": null,
"property2": null
}
}
},
"modifiedDate": "2022-10-23T00:00:00Z",
"sourceModifiedDate": "2022-10-23T00:00:00Z"
} | \ No newline at end of file +# CreateSupplierRequest + +## Example Usage + +```typescript +import { CreateSupplierRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateSupplierRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | +| `accountingSupplier` | [shared.AccountingSupplier](../../../sdk/models/shared/accountingsupplier.md) | :heavy_minus_sign: | ## Overview

From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/lending-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/lending-api#/schemas/Bill). | {
"id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F",
"supplierName": "Kelly's Industrial Supplies",
"contactName": "Kelly's Industrial Supplies",
"emailAddress": "sales@kellysupplies.com",
"phone": "07999 999999",
"addresses": [
{
"type": "Billing",
"line1": "Unit 51",
"line2": "Bakersfield Industrial Estate",
"city": "Bakersfield",
"region": "California",
"country": "USA",
"postalcode": "93308"
}
],
"registrationNumber": "string",
"taxNumber": "string",
"status": "Unknown",
"defaultCurrency": "string",
"metadata": {
"isDeleted": true
},
"supplementalData": {
"content": {
"property1": {
"property1": null,
"property2": null
},
"property2": {
"property1": null,
"property2": null
}
}
},
"modifiedDate": "2022-10-23T00:00:00Z",
"sourceModifiedDate": "2022-10-23T00:00:00Z"
} | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/createtransferrequest.md b/lending/docs/sdk/models/operations/createtransferrequest.md index d55670011..f9f89e93f 100644 --- a/lending/docs/sdk/models/operations/createtransferrequest.md +++ b/lending/docs/sdk/models/operations/createtransferrequest.md @@ -1,22 +1,22 @@ -# CreateTransferRequest - -## Example Usage - -```typescript -import { CreateTransferRequest } from "@codat/lending/sdk/models/operations"; - -let value: CreateTransferRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | -| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | -| `accountingTransfer` | [shared.AccountingTransfer](../../../sdk/models/shared/accountingtransfer.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# CreateTransferRequest + +## Example Usage + +```typescript +import { CreateTransferRequest } from "@codat/lending/sdk/models/operations"; + +let value: CreateTransferRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | +| `accountingTransfer` | [shared.AccountingTransfer](../../../sdk/models/shared/accountingtransfer.md) | :heavy_minus_sign: | 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/lending-api#/schemas/AccountTransaction). | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/deletecompanyrequest.md b/lending/docs/sdk/models/operations/deletecompanyrequest.md index 2c6a74747..9843408a3 100644 --- a/lending/docs/sdk/models/operations/deletecompanyrequest.md +++ b/lending/docs/sdk/models/operations/deletecompanyrequest.md @@ -1,17 +1,17 @@ -# DeleteCompanyRequest - -## Example Usage - -```typescript -import { DeleteCompanyRequest } from "@codat/lending/sdk/models/operations"; - -let value: DeleteCompanyRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +# DeleteCompanyRequest + +## Example Usage + +```typescript +import { DeleteCompanyRequest } from "@codat/lending/sdk/models/operations"; + +let value: DeleteCompanyRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/deleteconnectionrequest.md b/lending/docs/sdk/models/operations/deleteconnectionrequest.md index 12d87e313..3b6878ca1 100644 --- a/lending/docs/sdk/models/operations/deleteconnectionrequest.md +++ b/lending/docs/sdk/models/operations/deleteconnectionrequest.md @@ -1,19 +1,19 @@ -# DeleteConnectionRequest - -## Example Usage - -```typescript -import { DeleteConnectionRequest } from "@codat/lending/sdk/models/operations"; - -let value: DeleteConnectionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# DeleteConnectionRequest + +## Example Usage + +```typescript +import { DeleteConnectionRequest } from "@codat/lending/sdk/models/operations"; + +let value: DeleteConnectionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadaccountingbillattachmentrequest.md b/lending/docs/sdk/models/operations/downloadaccountingbillattachmentrequest.md index 87554ac8c..39961227f 100644 --- a/lending/docs/sdk/models/operations/downloadaccountingbillattachmentrequest.md +++ b/lending/docs/sdk/models/operations/downloadaccountingbillattachmentrequest.md @@ -1,23 +1,23 @@ -# DownloadAccountingBillAttachmentRequest - -## Example Usage - -```typescript -import { DownloadAccountingBillAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadAccountingBillAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# DownloadAccountingBillAttachmentRequest + +## Example Usage + +```typescript +import { DownloadAccountingBillAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadAccountingBillAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadaccountingcustomerattachmentrequest.md b/lending/docs/sdk/models/operations/downloadaccountingcustomerattachmentrequest.md index 272f510f0..565232236 100644 --- a/lending/docs/sdk/models/operations/downloadaccountingcustomerattachmentrequest.md +++ b/lending/docs/sdk/models/operations/downloadaccountingcustomerattachmentrequest.md @@ -1,23 +1,23 @@ -# DownloadAccountingCustomerAttachmentRequest - -## Example Usage - -```typescript -import { DownloadAccountingCustomerAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadAccountingCustomerAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# DownloadAccountingCustomerAttachmentRequest + +## Example Usage + +```typescript +import { DownloadAccountingCustomerAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadAccountingCustomerAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md b/lending/docs/sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md index 1d7d5519b..f101d5e80 100644 --- a/lending/docs/sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md +++ b/lending/docs/sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md @@ -1,23 +1,23 @@ -# DownloadAccountingDirectCostAttachmentRequest - -## Example Usage - -```typescript -import { DownloadAccountingDirectCostAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadAccountingDirectCostAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `directCostId` | *string* | :heavy_check_mark: | Unique identifier for a direct cost. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# DownloadAccountingDirectCostAttachmentRequest + +## Example Usage + +```typescript +import { DownloadAccountingDirectCostAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadAccountingDirectCostAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `directCostId` | *string* | :heavy_check_mark: | Unique identifier for a direct cost. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md b/lending/docs/sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md index b3743dc1f..84f759f4e 100644 --- a/lending/docs/sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md +++ b/lending/docs/sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md @@ -1,23 +1,23 @@ -# DownloadAccountingDirectIncomeAttachmentRequest - -## Example Usage - -```typescript -import { DownloadAccountingDirectIncomeAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadAccountingDirectIncomeAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `directIncomeId` | *string* | :heavy_check_mark: | Unique identifier for a direct income. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# DownloadAccountingDirectIncomeAttachmentRequest + +## Example Usage + +```typescript +import { DownloadAccountingDirectIncomeAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadAccountingDirectIncomeAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `directIncomeId` | *string* | :heavy_check_mark: | Unique identifier for a direct income. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md b/lending/docs/sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md index a25bda272..09914b681 100644 --- a/lending/docs/sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md +++ b/lending/docs/sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md @@ -1,23 +1,23 @@ -# DownloadAccountingInvoiceAttachmentRequest - -## Example Usage - -```typescript -import { DownloadAccountingInvoiceAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadAccountingInvoiceAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `invoiceId` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# DownloadAccountingInvoiceAttachmentRequest + +## Example Usage + +```typescript +import { DownloadAccountingInvoiceAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadAccountingInvoiceAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `invoiceId` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadaccountinginvoicepdfrequest.md b/lending/docs/sdk/models/operations/downloadaccountinginvoicepdfrequest.md index 3865d7dd6..03a111595 100644 --- a/lending/docs/sdk/models/operations/downloadaccountinginvoicepdfrequest.md +++ b/lending/docs/sdk/models/operations/downloadaccountinginvoicepdfrequest.md @@ -1,19 +1,19 @@ -# DownloadAccountingInvoicePdfRequest - -## Example Usage - -```typescript -import { DownloadAccountingInvoicePdfRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadAccountingInvoicePdfRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# DownloadAccountingInvoicePdfRequest + +## Example Usage + +```typescript +import { DownloadAccountingInvoicePdfRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadAccountingInvoicePdfRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `invoiceId` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadaccountingsupplierattachmentrequest.md b/lending/docs/sdk/models/operations/downloadaccountingsupplierattachmentrequest.md index 723476260..cb6264fb0 100644 --- a/lending/docs/sdk/models/operations/downloadaccountingsupplierattachmentrequest.md +++ b/lending/docs/sdk/models/operations/downloadaccountingsupplierattachmentrequest.md @@ -1,23 +1,23 @@ -# DownloadAccountingSupplierAttachmentRequest - -## Example Usage - -```typescript -import { DownloadAccountingSupplierAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadAccountingSupplierAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# DownloadAccountingSupplierAttachmentRequest + +## Example Usage + +```typescript +import { DownloadAccountingSupplierAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadAccountingSupplierAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadexcelreportrequest.md b/lending/docs/sdk/models/operations/downloadexcelreportrequest.md index 22ec7a520..db584c212 100644 --- a/lending/docs/sdk/models/operations/downloadexcelreportrequest.md +++ b/lending/docs/sdk/models/operations/downloadexcelreportrequest.md @@ -1,19 +1,18 @@ -# DownloadExcelReportRequest - -## Example Usage - -```typescript -import { DownloadExcelReportRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadExcelReportRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "enhancedFinancials", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# DownloadExcelReportRequest + +## Example Usage + +```typescript +import { DownloadExcelReportRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadExcelReportRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `reportType` | [shared.ExcelReportTypes](../../../sdk/models/shared/excelreporttypes.md) | :heavy_check_mark: | The type of report you want to generate and download. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/downloadfilesrequest.md b/lending/docs/sdk/models/operations/downloadfilesrequest.md index 6191d3a42..52780ff68 100644 --- a/lending/docs/sdk/models/operations/downloadfilesrequest.md +++ b/lending/docs/sdk/models/operations/downloadfilesrequest.md @@ -1,19 +1,19 @@ -# DownloadFilesRequest - -## Example Usage - -```typescript -import { DownloadFilesRequest } from "@codat/lending/sdk/models/operations"; - -let value: DownloadFilesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - date: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# DownloadFilesRequest + +## Example Usage + +```typescript +import { DownloadFilesRequest } from "@codat/lending/sdk/models/operations"; + +let value: DownloadFilesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + date: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `date` | *string* | :heavy_minus_sign: | Only download files uploaded on this date. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/endbankstatementuploadsessionrequest.md b/lending/docs/sdk/models/operations/endbankstatementuploadsessionrequest.md index 9cb1ffa17..2d5581fec 100644 --- a/lending/docs/sdk/models/operations/endbankstatementuploadsessionrequest.md +++ b/lending/docs/sdk/models/operations/endbankstatementuploadsessionrequest.md @@ -1,22 +1,21 @@ -# EndBankStatementUploadSessionRequest - -## Example Usage - -```typescript -import { EndBankStatementUploadSessionRequest } from "@codat/lending/sdk/models/operations"; - -let value: EndBankStatementUploadSessionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - datasetId: "b5ab275a-9f65-4593-901f-bf1bbc3292a7", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `datasetId` | *string* | :heavy_check_mark: | Unique identifier for the dataset that completed its sync. | | +# EndBankStatementUploadSessionRequest + +## Example Usage + +```typescript +import { EndBankStatementUploadSessionRequest } from "@codat/lending/sdk/models/operations"; + +let value: EndBankStatementUploadSessionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `datasetId` | *string* | :heavy_check_mark: | Unique identifier for the dataset that completed its sync. | | | `endUploadSessionRequest` | [shared.EndUploadSessionRequest](../../../sdk/models/shared/enduploadsessionrequest.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/generateexcelreportrequest.md b/lending/docs/sdk/models/operations/generateexcelreportrequest.md index 5296e9a95..cf20ca99f 100644 --- a/lending/docs/sdk/models/operations/generateexcelreportrequest.md +++ b/lending/docs/sdk/models/operations/generateexcelreportrequest.md @@ -1,19 +1,18 @@ -# GenerateExcelReportRequest - -## Example Usage - -```typescript -import { GenerateExcelReportRequest } from "@codat/lending/sdk/models/operations"; - -let value: GenerateExcelReportRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "audit", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GenerateExcelReportRequest + +## Example Usage + +```typescript +import { GenerateExcelReportRequest } from "@codat/lending/sdk/models/operations"; + +let value: GenerateExcelReportRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `reportType` | [shared.ExcelReportTypes](../../../sdk/models/shared/excelreporttypes.md) | :heavy_check_mark: | The type of report you want to generate and download. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/generateloansummaryqueryparamsourcetype.md b/lending/docs/sdk/models/operations/generateloansummaryqueryparamsourcetype.md index aa819bd7c..f5adedfd9 100644 --- a/lending/docs/sdk/models/operations/generateloansummaryqueryparamsourcetype.md +++ b/lending/docs/sdk/models/operations/generateloansummaryqueryparamsourcetype.md @@ -1,17 +1,15 @@ -# GenerateLoanSummaryQueryParamSourceType - -Data source type. - -## Example Usage - -```typescript -import { GenerateLoanSummaryQueryParamSourceType } from "@codat/lending/sdk/models/operations"; - -let value: GenerateLoanSummaryQueryParamSourceType = "commerce"; -``` - -## Values - -```typescript -"banking" | "commerce" | "accounting" +# GenerateLoanSummaryQueryParamSourceType + +## Example Usage + +```typescript +import { GenerateLoanSummaryQueryParamSourceType } from "@codat/lending/sdk/models/operations"; + +let value: GenerateLoanSummaryQueryParamSourceType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/generateloansummaryrequest.md b/lending/docs/sdk/models/operations/generateloansummaryrequest.md index 694b3410f..b7b027d07 100644 --- a/lending/docs/sdk/models/operations/generateloansummaryrequest.md +++ b/lending/docs/sdk/models/operations/generateloansummaryrequest.md @@ -1,19 +1,18 @@ -# GenerateLoanSummaryRequest - -## Example Usage - -```typescript -import { GenerateLoanSummaryRequest } from "@codat/lending/sdk/models/operations"; - -let value: GenerateLoanSummaryRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "commerce", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GenerateLoanSummaryRequest + +## Example Usage + +```typescript +import { GenerateLoanSummaryRequest } from "@codat/lending/sdk/models/operations"; + +let value: GenerateLoanSummaryRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `sourceType` | [operations.GenerateLoanSummaryQueryParamSourceType](../../../sdk/models/operations/generateloansummaryqueryparamsourcetype.md) | :heavy_check_mark: | Data source type. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/generateloantransactionsrequest.md b/lending/docs/sdk/models/operations/generateloantransactionsrequest.md index ea1c8d5b0..48de3ed86 100644 --- a/lending/docs/sdk/models/operations/generateloantransactionsrequest.md +++ b/lending/docs/sdk/models/operations/generateloantransactionsrequest.md @@ -1,19 +1,18 @@ -# GenerateLoanTransactionsRequest - -## Example Usage - -```typescript -import { GenerateLoanTransactionsRequest } from "@codat/lending/sdk/models/operations"; - -let value: GenerateLoanTransactionsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "commerce", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `sourceType` | [operations.SourceType](../../../sdk/models/operations/sourcetype.md) | :heavy_check_mark: | Data source type. | | \ No newline at end of file +# GenerateLoanTransactionsRequest + +## Example Usage + +```typescript +import { GenerateLoanTransactionsRequest } from "@codat/lending/sdk/models/operations"; + +let value: GenerateLoanTransactionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `sourceType` | [shared.SourceType](../../../sdk/models/shared/sourcetype.md) | :heavy_check_mark: | Data source type. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/generatereportrequest.md b/lending/docs/sdk/models/operations/generatereportrequest.md index bb4015bf2..8e3d4b162 100644 --- a/lending/docs/sdk/models/operations/generatereportrequest.md +++ b/lending/docs/sdk/models/operations/generatereportrequest.md @@ -1,19 +1,18 @@ -# GenerateReportRequest - -## Example Usage - -```typescript -import { GenerateReportRequest } from "@codat/lending/sdk/models/operations"; - -let value: GenerateReportRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "creditModel", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GenerateReportRequest + +## Example Usage + +```typescript +import { GenerateReportRequest } from "@codat/lending/sdk/models/operations"; + +let value: GenerateReportRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `reportType` | [shared.ReportType](../../../sdk/models/shared/reporttype.md) | :heavy_check_mark: | The type of the report | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingaccountrequest.md b/lending/docs/sdk/models/operations/getaccountingaccountrequest.md index 882f861d7..4c2ef33eb 100644 --- a/lending/docs/sdk/models/operations/getaccountingaccountrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingaccountrequest.md @@ -1,19 +1,19 @@ -# GetAccountingAccountRequest - -## Example Usage - -```typescript -import { GetAccountingAccountRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingAccountRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingAccountRequest + +## Example Usage + +```typescript +import { GetAccountingAccountRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingAccountRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingaccounttransactionrequest.md b/lending/docs/sdk/models/operations/getaccountingaccounttransactionrequest.md index c1e96ee8c..f7d916b9d 100644 --- a/lending/docs/sdk/models/operations/getaccountingaccounttransactionrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingaccounttransactionrequest.md @@ -1,21 +1,20 @@ -# GetAccountingAccountTransactionRequest - -## Example Usage - -```typescript -import { GetAccountingAccountTransactionRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingAccountTransactionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetAccountingAccountTransactionRequest + +## Example Usage + +```typescript +import { GetAccountingAccountTransactionRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingAccountTransactionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `accountTransactionId` | *string* | :heavy_check_mark: | Unique identifier for an account transaction. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingagedcreditorsreportrequest.md b/lending/docs/sdk/models/operations/getaccountingagedcreditorsreportrequest.md index 73b8e0929..0274a46cb 100644 --- a/lending/docs/sdk/models/operations/getaccountingagedcreditorsreportrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingagedcreditorsreportrequest.md @@ -1,24 +1,23 @@ -# GetAccountingAgedCreditorsReportRequest - -## Example Usage - -```typescript -import { GetAccountingAgedCreditorsReportRequest } from "@codat/lending/sdk/models/operations"; -import { RFCDate } from "@codat/lending/sdk/types"; - -let value: GetAccountingAgedCreditorsReportRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `reportDate` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | Date the report is generated up to. | 2022-12-31 | -| `numberOfPeriods` | *number* | :heavy_minus_sign: | Number of periods to include in the report. | 12 | +# GetAccountingAgedCreditorsReportRequest + +## Example Usage + +```typescript +import { GetAccountingAgedCreditorsReportRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingAgedCreditorsReportRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `reportDate` | *RFCDate* | :heavy_minus_sign: | Date the report is generated up to. | 2022-12-31 | +| `numberOfPeriods` | *number* | :heavy_minus_sign: | Number of periods to include in the report. | 12 | | `periodLengthDays` | *number* | :heavy_minus_sign: | The length of period in days. | 30 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingageddebtorsreportrequest.md b/lending/docs/sdk/models/operations/getaccountingageddebtorsreportrequest.md index cd11045b4..c344fb84f 100644 --- a/lending/docs/sdk/models/operations/getaccountingageddebtorsreportrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingageddebtorsreportrequest.md @@ -1,24 +1,23 @@ -# GetAccountingAgedDebtorsReportRequest - -## Example Usage - -```typescript -import { GetAccountingAgedDebtorsReportRequest } from "@codat/lending/sdk/models/operations"; -import { RFCDate } from "@codat/lending/sdk/types"; - -let value: GetAccountingAgedDebtorsReportRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `reportDate` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | Date the report is generated up to. | 2022-12-31 | -| `numberOfPeriods` | *number* | :heavy_minus_sign: | Number of periods to include in the report. | 12 | +# GetAccountingAgedDebtorsReportRequest + +## Example Usage + +```typescript +import { GetAccountingAgedDebtorsReportRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingAgedDebtorsReportRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `reportDate` | *RFCDate* | :heavy_minus_sign: | Date the report is generated up to. | 2022-12-31 | +| `numberOfPeriods` | *number* | :heavy_minus_sign: | Number of periods to include in the report. | 12 | | `periodLengthDays` | *number* | :heavy_minus_sign: | The length of period in days. | 30 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingbalancesheetrequest.md b/lending/docs/sdk/models/operations/getaccountingbalancesheetrequest.md index 1243f6dca..018373944 100644 --- a/lending/docs/sdk/models/operations/getaccountingbalancesheetrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingbalancesheetrequest.md @@ -1,23 +1,23 @@ -# GetAccountingBalanceSheetRequest - -## Example Usage - -```typescript -import { GetAccountingBalanceSheetRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingBalanceSheetRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `periodLength` | *number* | :heavy_check_mark: | Number of months defining the period of interest. | 4 | -| `periodsToCompare` | *number* | :heavy_check_mark: | Number of periods with `periodLength` to compare. | 20 | +# GetAccountingBalanceSheetRequest + +## Example Usage + +```typescript +import { GetAccountingBalanceSheetRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingBalanceSheetRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `periodLength` | *number* | :heavy_check_mark: | Number of months defining the period of interest. | 4 | +| `periodsToCompare` | *number* | :heavy_check_mark: | Number of periods with `periodLength` to compare. | 20 | | `startMonth` | *string* | :heavy_minus_sign: | The month the report starts from. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingbankaccountrequest.md b/lending/docs/sdk/models/operations/getaccountingbankaccountrequest.md index 8d100bcb1..57a4d4d95 100644 --- a/lending/docs/sdk/models/operations/getaccountingbankaccountrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingbankaccountrequest.md @@ -1,21 +1,21 @@ -# GetAccountingBankAccountRequest - -## Example Usage - -```typescript -import { GetAccountingBankAccountRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingBankAccountRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetAccountingBankAccountRequest + +## Example Usage + +```typescript +import { GetAccountingBankAccountRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingBankAccountRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingbillattachmentrequest.md b/lending/docs/sdk/models/operations/getaccountingbillattachmentrequest.md index 22e5e7cca..cf08bb446 100644 --- a/lending/docs/sdk/models/operations/getaccountingbillattachmentrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingbillattachmentrequest.md @@ -1,23 +1,23 @@ -# GetAccountingBillAttachmentRequest - -## Example Usage - -```typescript -import { GetAccountingBillAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingBillAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# GetAccountingBillAttachmentRequest + +## Example Usage + +```typescript +import { GetAccountingBillAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingBillAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingbillcreditnoterequest.md b/lending/docs/sdk/models/operations/getaccountingbillcreditnoterequest.md index c9d0d4ad6..bbbd3eff1 100644 --- a/lending/docs/sdk/models/operations/getaccountingbillcreditnoterequest.md +++ b/lending/docs/sdk/models/operations/getaccountingbillcreditnoterequest.md @@ -1,19 +1,19 @@ -# GetAccountingBillCreditNoteRequest - -## Example Usage - -```typescript -import { GetAccountingBillCreditNoteRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingBillCreditNoteRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingBillCreditNoteRequest + +## Example Usage + +```typescript +import { GetAccountingBillCreditNoteRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingBillCreditNoteRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `billCreditNoteId` | *string* | :heavy_check_mark: | Unique identifier for a bill credit note. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingbillpaymentrequest.md b/lending/docs/sdk/models/operations/getaccountingbillpaymentrequest.md index a76b6e54e..75962f5d5 100644 --- a/lending/docs/sdk/models/operations/getaccountingbillpaymentrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingbillpaymentrequest.md @@ -1,19 +1,19 @@ -# GetAccountingBillPaymentRequest - -## Example Usage - -```typescript -import { GetAccountingBillPaymentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingBillPaymentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingBillPaymentRequest + +## Example Usage + +```typescript +import { GetAccountingBillPaymentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingBillPaymentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `billPaymentId` | *string* | :heavy_check_mark: | Unique identifier for a bill payment. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingbillrequest.md b/lending/docs/sdk/models/operations/getaccountingbillrequest.md index 4c977eb9f..d66c6f781 100644 --- a/lending/docs/sdk/models/operations/getaccountingbillrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingbillrequest.md @@ -1,19 +1,19 @@ -# GetAccountingBillRequest - -## Example Usage - -```typescript -import { GetAccountingBillRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingBillRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingBillRequest + +## Example Usage + +```typescript +import { GetAccountingBillRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingBillRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingcashflowstatementrequest.md b/lending/docs/sdk/models/operations/getaccountingcashflowstatementrequest.md index 8124e2393..fff8d59bd 100644 --- a/lending/docs/sdk/models/operations/getaccountingcashflowstatementrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingcashflowstatementrequest.md @@ -1,23 +1,23 @@ -# GetAccountingCashFlowStatementRequest - -## Example Usage - -```typescript -import { GetAccountingCashFlowStatementRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingCashFlowStatementRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `periodLength` | *number* | :heavy_check_mark: | Number of months defining the period of interest. | 4 | -| `periodsToCompare` | *number* | :heavy_check_mark: | Number of periods with `periodLength` to compare. | 20 | +# GetAccountingCashFlowStatementRequest + +## Example Usage + +```typescript +import { GetAccountingCashFlowStatementRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingCashFlowStatementRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `periodLength` | *number* | :heavy_check_mark: | Number of months defining the period of interest. | 4 | +| `periodsToCompare` | *number* | :heavy_check_mark: | Number of periods with `periodLength` to compare. | 20 | | `startMonth` | *string* | :heavy_minus_sign: | The month the report starts from. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingcreditnoterequest.md b/lending/docs/sdk/models/operations/getaccountingcreditnoterequest.md index 999a0df17..399d935e6 100644 --- a/lending/docs/sdk/models/operations/getaccountingcreditnoterequest.md +++ b/lending/docs/sdk/models/operations/getaccountingcreditnoterequest.md @@ -1,19 +1,18 @@ -# GetAccountingCreditNoteRequest - -## Example Usage - -```typescript -import { GetAccountingCreditNoteRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingCreditNoteRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingCreditNoteRequest + +## Example Usage + +```typescript +import { GetAccountingCreditNoteRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingCreditNoteRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `creditNoteId` | *string* | :heavy_check_mark: | Unique identifier for a credit note. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingcustomerattachmentrequest.md b/lending/docs/sdk/models/operations/getaccountingcustomerattachmentrequest.md index d74aff60c..358a3043b 100644 --- a/lending/docs/sdk/models/operations/getaccountingcustomerattachmentrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingcustomerattachmentrequest.md @@ -1,23 +1,23 @@ -# GetAccountingCustomerAttachmentRequest - -## Example Usage - -```typescript -import { GetAccountingCustomerAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingCustomerAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# GetAccountingCustomerAttachmentRequest + +## Example Usage + +```typescript +import { GetAccountingCustomerAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingCustomerAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingcustomerrequest.md b/lending/docs/sdk/models/operations/getaccountingcustomerrequest.md index 12fdf6e8d..d6b5d65c8 100644 --- a/lending/docs/sdk/models/operations/getaccountingcustomerrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingcustomerrequest.md @@ -1,19 +1,19 @@ -# GetAccountingCustomerRequest - -## Example Usage - -```typescript -import { GetAccountingCustomerRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingCustomerRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingCustomerRequest + +## Example Usage + +```typescript +import { GetAccountingCustomerRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingCustomerRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingdirectcostattachmentrequest.md b/lending/docs/sdk/models/operations/getaccountingdirectcostattachmentrequest.md index 62a34179b..f4236120d 100644 --- a/lending/docs/sdk/models/operations/getaccountingdirectcostattachmentrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingdirectcostattachmentrequest.md @@ -1,23 +1,23 @@ -# GetAccountingDirectCostAttachmentRequest - -## Example Usage - -```typescript -import { GetAccountingDirectCostAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingDirectCostAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `directCostId` | *string* | :heavy_check_mark: | Unique identifier for a direct cost. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# GetAccountingDirectCostAttachmentRequest + +## Example Usage + +```typescript +import { GetAccountingDirectCostAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingDirectCostAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `directCostId` | *string* | :heavy_check_mark: | Unique identifier for a direct cost. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingdirectcostrequest.md b/lending/docs/sdk/models/operations/getaccountingdirectcostrequest.md index 9b5dbd190..b951f510b 100644 --- a/lending/docs/sdk/models/operations/getaccountingdirectcostrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingdirectcostrequest.md @@ -1,21 +1,21 @@ -# GetAccountingDirectCostRequest - -## Example Usage - -```typescript -import { GetAccountingDirectCostRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingDirectCostRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetAccountingDirectCostRequest + +## Example Usage + +```typescript +import { GetAccountingDirectCostRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingDirectCostRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `directCostId` | *string* | :heavy_check_mark: | Unique identifier for a direct cost. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingdirectincomeattachmentrequest.md b/lending/docs/sdk/models/operations/getaccountingdirectincomeattachmentrequest.md index b855324a2..d510ae1ab 100644 --- a/lending/docs/sdk/models/operations/getaccountingdirectincomeattachmentrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingdirectincomeattachmentrequest.md @@ -1,24 +1,24 @@ -# GetAccountingDirectIncomeAttachmentRequest - -## Example Usage - -```typescript -import { GetAccountingDirectIncomeAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingDirectIncomeAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `directIncomeId` | *string* | :heavy_check_mark: | Unique identifier for a direct income. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingDirectIncomeAttachmentRequest + +## Example Usage + +```typescript +import { GetAccountingDirectIncomeAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingDirectIncomeAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `directIncomeId` | *string* | :heavy_check_mark: | Unique identifier for a direct income. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingdirectincomerequest.md b/lending/docs/sdk/models/operations/getaccountingdirectincomerequest.md index 2c12b0716..169364ebd 100644 --- a/lending/docs/sdk/models/operations/getaccountingdirectincomerequest.md +++ b/lending/docs/sdk/models/operations/getaccountingdirectincomerequest.md @@ -1,21 +1,21 @@ -# GetAccountingDirectIncomeRequest - -## Example Usage - -```typescript -import { GetAccountingDirectIncomeRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingDirectIncomeRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetAccountingDirectIncomeRequest + +## Example Usage + +```typescript +import { GetAccountingDirectIncomeRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingDirectIncomeRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `directIncomeId` | *string* | :heavy_check_mark: | Unique identifier for a direct income. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountinginvoiceattachmentrequest.md b/lending/docs/sdk/models/operations/getaccountinginvoiceattachmentrequest.md index e04daf63c..249261802 100644 --- a/lending/docs/sdk/models/operations/getaccountinginvoiceattachmentrequest.md +++ b/lending/docs/sdk/models/operations/getaccountinginvoiceattachmentrequest.md @@ -1,23 +1,23 @@ -# GetAccountingInvoiceAttachmentRequest - -## Example Usage - -```typescript -import { GetAccountingInvoiceAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingInvoiceAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `invoiceId` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# GetAccountingInvoiceAttachmentRequest + +## Example Usage + +```typescript +import { GetAccountingInvoiceAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingInvoiceAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `invoiceId` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountinginvoicerequest.md b/lending/docs/sdk/models/operations/getaccountinginvoicerequest.md index c03945413..52ee82eed 100644 --- a/lending/docs/sdk/models/operations/getaccountinginvoicerequest.md +++ b/lending/docs/sdk/models/operations/getaccountinginvoicerequest.md @@ -1,19 +1,19 @@ -# GetAccountingInvoiceRequest - -## Example Usage - -```typescript -import { GetAccountingInvoiceRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingInvoiceRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingInvoiceRequest + +## Example Usage + +```typescript +import { GetAccountingInvoiceRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingInvoiceRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `invoiceId` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingjournalentryrequest.md b/lending/docs/sdk/models/operations/getaccountingjournalentryrequest.md index 849d8c627..b7c259a50 100644 --- a/lending/docs/sdk/models/operations/getaccountingjournalentryrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingjournalentryrequest.md @@ -1,19 +1,19 @@ -# GetAccountingJournalEntryRequest - -## Example Usage - -```typescript -import { GetAccountingJournalEntryRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingJournalEntryRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingJournalEntryRequest + +## Example Usage + +```typescript +import { GetAccountingJournalEntryRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingJournalEntryRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `journalEntryId` | *string* | :heavy_check_mark: | Unique identifier for a journal entry. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingjournalrequest.md b/lending/docs/sdk/models/operations/getaccountingjournalrequest.md index 55bc69de9..3e8a9a81c 100644 --- a/lending/docs/sdk/models/operations/getaccountingjournalrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingjournalrequest.md @@ -1,19 +1,18 @@ -# GetAccountingJournalRequest - -## Example Usage - -```typescript -import { GetAccountingJournalRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingJournalRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingJournalRequest + +## Example Usage + +```typescript +import { GetAccountingJournalRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingJournalRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `journalId` | *string* | :heavy_check_mark: | Unique identifier for a journal. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingpaymentrequest.md b/lending/docs/sdk/models/operations/getaccountingpaymentrequest.md index 9881baa1c..66c00a68f 100644 --- a/lending/docs/sdk/models/operations/getaccountingpaymentrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingpaymentrequest.md @@ -1,19 +1,19 @@ -# GetAccountingPaymentRequest - -## Example Usage - -```typescript -import { GetAccountingPaymentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingPaymentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingPaymentRequest + +## Example Usage + +```typescript +import { GetAccountingPaymentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingPaymentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `paymentId` | *string* | :heavy_check_mark: | Unique identifier for a payment. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingprofilerequest.md b/lending/docs/sdk/models/operations/getaccountingprofilerequest.md index 1fbbdb612..7e1ad9465 100644 --- a/lending/docs/sdk/models/operations/getaccountingprofilerequest.md +++ b/lending/docs/sdk/models/operations/getaccountingprofilerequest.md @@ -1,17 +1,17 @@ -# GetAccountingProfileRequest - -## Example Usage - -```typescript -import { GetAccountingProfileRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingProfileRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +# GetAccountingProfileRequest + +## Example Usage + +```typescript +import { GetAccountingProfileRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingProfileRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingprofitandlossrequest.md b/lending/docs/sdk/models/operations/getaccountingprofitandlossrequest.md index 3b3e330d7..00d1b5aa9 100644 --- a/lending/docs/sdk/models/operations/getaccountingprofitandlossrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingprofitandlossrequest.md @@ -1,23 +1,23 @@ -# GetAccountingProfitAndLossRequest - -## Example Usage - -```typescript -import { GetAccountingProfitAndLossRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingProfitAndLossRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `periodLength` | *number* | :heavy_check_mark: | Number of months defining the period of interest. | 4 | -| `periodsToCompare` | *number* | :heavy_check_mark: | Number of periods with `periodLength` to compare. | 20 | +# GetAccountingProfitAndLossRequest + +## Example Usage + +```typescript +import { GetAccountingProfitAndLossRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingProfitAndLossRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `periodLength` | *number* | :heavy_check_mark: | Number of months defining the period of interest. | 4 | +| `periodsToCompare` | *number* | :heavy_check_mark: | Number of periods with `periodLength` to compare. | 20 | | `startMonth` | *string* | :heavy_minus_sign: | The month the report starts from. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingsupplierattachmentrequest.md b/lending/docs/sdk/models/operations/getaccountingsupplierattachmentrequest.md index 2073c81a0..ef921b2ee 100644 --- a/lending/docs/sdk/models/operations/getaccountingsupplierattachmentrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingsupplierattachmentrequest.md @@ -1,23 +1,23 @@ -# GetAccountingSupplierAttachmentRequest - -## Example Usage - -```typescript -import { GetAccountingSupplierAttachmentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingSupplierAttachmentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# GetAccountingSupplierAttachmentRequest + +## Example Usage + +```typescript +import { GetAccountingSupplierAttachmentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingSupplierAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingsupplierrequest.md b/lending/docs/sdk/models/operations/getaccountingsupplierrequest.md index b9cbdadb3..fd16334aa 100644 --- a/lending/docs/sdk/models/operations/getaccountingsupplierrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingsupplierrequest.md @@ -1,19 +1,19 @@ -# GetAccountingSupplierRequest - -## Example Usage - -```typescript -import { GetAccountingSupplierRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingSupplierRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetAccountingSupplierRequest + +## Example Usage + +```typescript +import { GetAccountingSupplierRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingSupplierRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getaccountingtransferrequest.md b/lending/docs/sdk/models/operations/getaccountingtransferrequest.md index e69bd9194..a60ec981e 100644 --- a/lending/docs/sdk/models/operations/getaccountingtransferrequest.md +++ b/lending/docs/sdk/models/operations/getaccountingtransferrequest.md @@ -1,21 +1,21 @@ -# GetAccountingTransferRequest - -## Example Usage - -```typescript -import { GetAccountingTransferRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetAccountingTransferRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetAccountingTransferRequest + +## Example Usage + +```typescript +import { GetAccountingTransferRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetAccountingTransferRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `transferId` | *string* | :heavy_check_mark: | Unique identifier for a transfer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getbankaccountmappingrequest.md b/lending/docs/sdk/models/operations/getbankaccountmappingrequest.md index f16ece659..d65ad43f1 100644 --- a/lending/docs/sdk/models/operations/getbankaccountmappingrequest.md +++ b/lending/docs/sdk/models/operations/getbankaccountmappingrequest.md @@ -1,19 +1,19 @@ -# GetBankAccountMappingRequest - -## Example Usage - -```typescript -import { GetBankAccountMappingRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetBankAccountMappingRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetBankAccountMappingRequest + +## Example Usage + +```typescript +import { GetBankAccountMappingRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetBankAccountMappingRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getbankingaccountrequest.md b/lending/docs/sdk/models/operations/getbankingaccountrequest.md index 08739d048..c7ec3098d 100644 --- a/lending/docs/sdk/models/operations/getbankingaccountrequest.md +++ b/lending/docs/sdk/models/operations/getbankingaccountrequest.md @@ -1,21 +1,21 @@ -# GetBankingAccountRequest - -## Example Usage - -```typescript -import { GetBankingAccountRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetBankingAccountRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetBankingAccountRequest + +## Example Usage + +```typescript +import { GetBankingAccountRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetBankingAccountRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getbankingtransactioncategoryrequest.md b/lending/docs/sdk/models/operations/getbankingtransactioncategoryrequest.md index eccbc27c2..286133921 100644 --- a/lending/docs/sdk/models/operations/getbankingtransactioncategoryrequest.md +++ b/lending/docs/sdk/models/operations/getbankingtransactioncategoryrequest.md @@ -1,21 +1,20 @@ -# GetBankingTransactionCategoryRequest - -## Example Usage - -```typescript -import { GetBankingTransactionCategoryRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetBankingTransactionCategoryRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionCategoryId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetBankingTransactionCategoryRequest + +## Example Usage + +```typescript +import { GetBankingTransactionCategoryRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetBankingTransactionCategoryRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `transactionCategoryId` | *string* | :heavy_check_mark: | The unique identifier for a banking transaction category | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getbankingtransactionrequest.md b/lending/docs/sdk/models/operations/getbankingtransactionrequest.md index 5698812be..32f8e49e4 100644 --- a/lending/docs/sdk/models/operations/getbankingtransactionrequest.md +++ b/lending/docs/sdk/models/operations/getbankingtransactionrequest.md @@ -1,21 +1,20 @@ -# GetBankingTransactionRequest - -## Example Usage - -```typescript -import { GetBankingTransactionRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetBankingTransactionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetBankingTransactionRequest + +## Example Usage + +```typescript +import { GetBankingTransactionRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetBankingTransactionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `transactionId` | *string* | :heavy_check_mark: | The unique identifier for a transaction | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getbankstatementuploadconfigurationrequest.md b/lending/docs/sdk/models/operations/getbankstatementuploadconfigurationrequest.md index 63bbc37bd..4f7787422 100644 --- a/lending/docs/sdk/models/operations/getbankstatementuploadconfigurationrequest.md +++ b/lending/docs/sdk/models/operations/getbankstatementuploadconfigurationrequest.md @@ -1,19 +1,19 @@ -# GetBankStatementUploadConfigurationRequest - -## Example Usage - -```typescript -import { GetBankStatementUploadConfigurationRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetBankStatementUploadConfigurationRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetBankStatementUploadConfigurationRequest + +## Example Usage + +```typescript +import { GetBankStatementUploadConfigurationRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetBankStatementUploadConfigurationRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcategorizedbalancesheetstatementrequest.md b/lending/docs/sdk/models/operations/getcategorizedbalancesheetstatementrequest.md index 07e78ad41..5151b73a7 100644 --- a/lending/docs/sdk/models/operations/getcategorizedbalancesheetstatementrequest.md +++ b/lending/docs/sdk/models/operations/getcategorizedbalancesheetstatementrequest.md @@ -1,20 +1,20 @@ -# GetCategorizedBalanceSheetStatementRequest - -## Example Usage - -```typescript -import { GetCategorizedBalanceSheetStatementRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCategorizedBalanceSheetStatementRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: "29-09-2020", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | +# GetCategorizedBalanceSheetStatementRequest + +## Example Usage + +```typescript +import { GetCategorizedBalanceSheetStatementRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCategorizedBalanceSheetStatementRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "29-09-2020", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | | `numberOfPeriods` | *number* | :heavy_minus_sign: | The number of periods to return. If not provided, 12 periods will be used as the default value. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcategorizedbankstatementrequest.md b/lending/docs/sdk/models/operations/getcategorizedbankstatementrequest.md index 93cffaf76..ba26a87f3 100644 --- a/lending/docs/sdk/models/operations/getcategorizedbankstatementrequest.md +++ b/lending/docs/sdk/models/operations/getcategorizedbankstatementrequest.md @@ -1,21 +1,21 @@ -# GetCategorizedBankStatementRequest - -## Example Usage - -```typescript -import { GetCategorizedBankStatementRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCategorizedBankStatementRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +# GetCategorizedBankStatementRequest + +## Example Usage + +```typescript +import { GetCategorizedBankStatementRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCategorizedBankStatementRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | | `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcategorizedprofitandlossstatementrequest.md b/lending/docs/sdk/models/operations/getcategorizedprofitandlossstatementrequest.md index b834b191b..72c8f8f2c 100644 --- a/lending/docs/sdk/models/operations/getcategorizedprofitandlossstatementrequest.md +++ b/lending/docs/sdk/models/operations/getcategorizedprofitandlossstatementrequest.md @@ -1,20 +1,20 @@ -# GetCategorizedProfitAndLossStatementRequest - -## Example Usage - -```typescript -import { GetCategorizedProfitAndLossStatementRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCategorizedProfitAndLossStatementRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: "29-09-2020", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `reportDate` | *string* | :heavy_minus_sign: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | +# GetCategorizedProfitAndLossStatementRequest + +## Example Usage + +```typescript +import { GetCategorizedProfitAndLossStatementRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCategorizedProfitAndLossStatementRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "29-09-2020", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `reportDate` | *string* | :heavy_minus_sign: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | | `numberOfPeriods` | *number* | :heavy_minus_sign: | The number of periods to return. If not provided, 12 periods will be used as the default value. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercecustomerrequest.md b/lending/docs/sdk/models/operations/getcommercecustomerrequest.md index 3293769ab..c3e51d99b 100644 --- a/lending/docs/sdk/models/operations/getcommercecustomerrequest.md +++ b/lending/docs/sdk/models/operations/getcommercecustomerrequest.md @@ -1,21 +1,21 @@ -# GetCommerceCustomerRequest - -## Example Usage - -```typescript -import { GetCommerceCustomerRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceCustomerRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommerceCustomerRequest + +## Example Usage + +```typescript +import { GetCommerceCustomerRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceCustomerRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercecustomerretentionmetricsrequest.md b/lending/docs/sdk/models/operations/getcommercecustomerretentionmetricsrequest.md index cce579333..f7a84df99 100644 --- a/lending/docs/sdk/models/operations/getcommercecustomerretentionmetricsrequest.md +++ b/lending/docs/sdk/models/operations/getcommercecustomerretentionmetricsrequest.md @@ -1,28 +1,25 @@ -# GetCommerceCustomerRetentionMetricsRequest - -## Example Usage - -```typescript -import { GetCommerceCustomerRetentionMetricsRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceCustomerRetentionMetricsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 47504, - numberOfPeriods: 758135, - periodUnit: "Week", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | -| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | -| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | -| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | +# GetCommerceCustomerRetentionMetricsRequest + +## Example Usage + +```typescript +import { GetCommerceCustomerRetentionMetricsRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceCustomerRetentionMetricsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | +| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | +| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | +| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | | `includeDisplayNames` | *boolean* | :heavy_minus_sign: | Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercedisputerequest.md b/lending/docs/sdk/models/operations/getcommercedisputerequest.md index 1237ad52f..4ff35752c 100644 --- a/lending/docs/sdk/models/operations/getcommercedisputerequest.md +++ b/lending/docs/sdk/models/operations/getcommercedisputerequest.md @@ -1,21 +1,21 @@ -# GetCommerceDisputeRequest - -## Example Usage - -```typescript -import { GetCommerceDisputeRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceDisputeRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommerceDisputeRequest + +## Example Usage + +```typescript +import { GetCommerceDisputeRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceDisputeRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `disputeId` | *string* | :heavy_check_mark: | Unique identifier for a dispute. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercelifetimevaluemetricsrequest.md b/lending/docs/sdk/models/operations/getcommercelifetimevaluemetricsrequest.md index d13c6a688..3cae51a2c 100644 --- a/lending/docs/sdk/models/operations/getcommercelifetimevaluemetricsrequest.md +++ b/lending/docs/sdk/models/operations/getcommercelifetimevaluemetricsrequest.md @@ -1,28 +1,25 @@ -# GetCommerceLifetimeValueMetricsRequest - -## Example Usage - -```typescript -import { GetCommerceLifetimeValueMetricsRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceLifetimeValueMetricsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 532550, - numberOfPeriods: 530223, - periodUnit: "Month", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | -| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | -| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | -| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | +# GetCommerceLifetimeValueMetricsRequest + +## Example Usage + +```typescript +import { GetCommerceLifetimeValueMetricsRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceLifetimeValueMetricsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | +| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | +| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | +| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | | `includeDisplayNames` | *boolean* | :heavy_minus_sign: | Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercelocationrequest.md b/lending/docs/sdk/models/operations/getcommercelocationrequest.md index 5a3cc0bf8..7b8f10699 100644 --- a/lending/docs/sdk/models/operations/getcommercelocationrequest.md +++ b/lending/docs/sdk/models/operations/getcommercelocationrequest.md @@ -1,21 +1,21 @@ -# GetCommerceLocationRequest - -## Example Usage - -```typescript -import { GetCommerceLocationRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceLocationRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommerceLocationRequest + +## Example Usage + +```typescript +import { GetCommerceLocationRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceLocationRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `locationId` | *string* | :heavy_check_mark: | Unique identifier for a location. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommerceorderrequest.md b/lending/docs/sdk/models/operations/getcommerceorderrequest.md index d6953f870..293012461 100644 --- a/lending/docs/sdk/models/operations/getcommerceorderrequest.md +++ b/lending/docs/sdk/models/operations/getcommerceorderrequest.md @@ -1,21 +1,21 @@ -# GetCommerceOrderRequest - -## Example Usage - -```typescript -import { GetCommerceOrderRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceOrderRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommerceOrderRequest + +## Example Usage + +```typescript +import { GetCommerceOrderRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceOrderRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `orderId` | *string* | :heavy_check_mark: | Unique identifier for an order. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommerceordersreportrequest.md b/lending/docs/sdk/models/operations/getcommerceordersreportrequest.md index 1a3330348..33cfbf8e0 100644 --- a/lending/docs/sdk/models/operations/getcommerceordersreportrequest.md +++ b/lending/docs/sdk/models/operations/getcommerceordersreportrequest.md @@ -1,28 +1,25 @@ -# GetCommerceOrdersReportRequest - -## Example Usage - -```typescript -import { GetCommerceOrdersReportRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceOrdersReportRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 81301, - numberOfPeriods: 771117, - periodUnit: "Month", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | -| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | -| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | -| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | +# GetCommerceOrdersReportRequest + +## Example Usage + +```typescript +import { GetCommerceOrdersReportRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceOrdersReportRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | +| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | +| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | +| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | | `includeDisplayNames` | *boolean* | :heavy_minus_sign: | Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercepaymentmethodrequest.md b/lending/docs/sdk/models/operations/getcommercepaymentmethodrequest.md index 34e8a93b0..4346d0be5 100644 --- a/lending/docs/sdk/models/operations/getcommercepaymentmethodrequest.md +++ b/lending/docs/sdk/models/operations/getcommercepaymentmethodrequest.md @@ -1,21 +1,21 @@ -# GetCommercePaymentMethodRequest - -## Example Usage - -```typescript -import { GetCommercePaymentMethodRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommercePaymentMethodRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommercePaymentMethodRequest + +## Example Usage + +```typescript +import { GetCommercePaymentMethodRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommercePaymentMethodRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `paymentMethodId` | *string* | :heavy_check_mark: | Unique identifier for a payment method. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercepaymentrequest.md b/lending/docs/sdk/models/operations/getcommercepaymentrequest.md index 32e309be5..ac1ae9188 100644 --- a/lending/docs/sdk/models/operations/getcommercepaymentrequest.md +++ b/lending/docs/sdk/models/operations/getcommercepaymentrequest.md @@ -1,21 +1,21 @@ -# GetCommercePaymentRequest - -## Example Usage - -```typescript -import { GetCommercePaymentRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommercePaymentRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommercePaymentRequest + +## Example Usage + +```typescript +import { GetCommercePaymentRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommercePaymentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `paymentId` | *string* | :heavy_check_mark: | Unique identifier for a payment. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommerceproductcategoryrequest.md b/lending/docs/sdk/models/operations/getcommerceproductcategoryrequest.md index ae372abfe..e4c358920 100644 --- a/lending/docs/sdk/models/operations/getcommerceproductcategoryrequest.md +++ b/lending/docs/sdk/models/operations/getcommerceproductcategoryrequest.md @@ -1,21 +1,21 @@ -# GetCommerceProductCategoryRequest - -## Example Usage - -```typescript -import { GetCommerceProductCategoryRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceProductCategoryRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommerceProductCategoryRequest + +## Example Usage + +```typescript +import { GetCommerceProductCategoryRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceProductCategoryRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `productId` | *string* | :heavy_check_mark: | Unique identifier for a product. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommerceproductrequest.md b/lending/docs/sdk/models/operations/getcommerceproductrequest.md index 7227e0a3c..3b1bff1ec 100644 --- a/lending/docs/sdk/models/operations/getcommerceproductrequest.md +++ b/lending/docs/sdk/models/operations/getcommerceproductrequest.md @@ -1,21 +1,21 @@ -# GetCommerceProductRequest - -## Example Usage - -```typescript -import { GetCommerceProductRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceProductRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommerceProductRequest + +## Example Usage + +```typescript +import { GetCommerceProductRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceProductRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `productId` | *string* | :heavy_check_mark: | Unique identifier for a product. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommerceprofilerequest.md b/lending/docs/sdk/models/operations/getcommerceprofilerequest.md index 5988d56dd..0a731e57b 100644 --- a/lending/docs/sdk/models/operations/getcommerceprofilerequest.md +++ b/lending/docs/sdk/models/operations/getcommerceprofilerequest.md @@ -1,19 +1,19 @@ -# GetCommerceProfileRequest - -## Example Usage - -```typescript -import { GetCommerceProfileRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceProfileRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetCommerceProfileRequest + +## Example Usage + +```typescript +import { GetCommerceProfileRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceProfileRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercerefundsreportrequest.md b/lending/docs/sdk/models/operations/getcommercerefundsreportrequest.md index c4f3dd518..6f35fadce 100644 --- a/lending/docs/sdk/models/operations/getcommercerefundsreportrequest.md +++ b/lending/docs/sdk/models/operations/getcommercerefundsreportrequest.md @@ -1,28 +1,25 @@ -# GetCommerceRefundsReportRequest - -## Example Usage - -```typescript -import { GetCommerceRefundsReportRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceRefundsReportRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 262587, - numberOfPeriods: 784785, - periodUnit: "Year", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | -| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | -| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | -| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | +# GetCommerceRefundsReportRequest + +## Example Usage + +```typescript +import { GetCommerceRefundsReportRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceRefundsReportRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | +| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | +| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | +| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | | `includeDisplayNames` | *boolean* | :heavy_minus_sign: | Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercerevenuemetricsrequest.md b/lending/docs/sdk/models/operations/getcommercerevenuemetricsrequest.md index 0e18f3e85..c01f9754b 100644 --- a/lending/docs/sdk/models/operations/getcommercerevenuemetricsrequest.md +++ b/lending/docs/sdk/models/operations/getcommercerevenuemetricsrequest.md @@ -1,28 +1,25 @@ -# GetCommerceRevenueMetricsRequest - -## Example Usage - -```typescript -import { GetCommerceRevenueMetricsRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceRevenueMetricsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 342119, - numberOfPeriods: 208413, - periodUnit: "Day", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | -| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | -| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | -| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | +# GetCommerceRevenueMetricsRequest + +## Example Usage + +```typescript +import { GetCommerceRevenueMetricsRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceRevenueMetricsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `reportDate` | *string* | :heavy_check_mark: | The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. | 29-09-2020 | +| `periodLength` | *number* | :heavy_check_mark: | The number of months per period. E.g. 2 = 2 months per period. | | +| `numberOfPeriods` | *number* | :heavy_check_mark: | The number of periods to return. There will be no pagination as a query parameter. | | +| `periodUnit` | [shared.PeriodUnit](../../../sdk/models/shared/periodunit.md) | :heavy_check_mark: | The period unit of time returned. | | | `includeDisplayNames` | *boolean* | :heavy_minus_sign: | Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcommercetransactionrequest.md b/lending/docs/sdk/models/operations/getcommercetransactionrequest.md index 9257a4dc0..238db4601 100644 --- a/lending/docs/sdk/models/operations/getcommercetransactionrequest.md +++ b/lending/docs/sdk/models/operations/getcommercetransactionrequest.md @@ -1,21 +1,21 @@ -# GetCommerceTransactionRequest - -## Example Usage - -```typescript -import { GetCommerceTransactionRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCommerceTransactionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCommerceTransactionRequest + +## Example Usage + +```typescript +import { GetCommerceTransactionRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCommerceTransactionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `transactionId` | *string* | :heavy_check_mark: | Unique identifier for a transaction. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcompanyrequest.md b/lending/docs/sdk/models/operations/getcompanyrequest.md index 5ce1610fd..f7fa219fc 100644 --- a/lending/docs/sdk/models/operations/getcompanyrequest.md +++ b/lending/docs/sdk/models/operations/getcompanyrequest.md @@ -1,17 +1,17 @@ -# GetCompanyRequest - -## Example Usage - -```typescript -import { GetCompanyRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCompanyRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +# GetCompanyRequest + +## Example Usage + +```typescript +import { GetCompanyRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCompanyRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getconnectionrequest.md b/lending/docs/sdk/models/operations/getconnectionrequest.md index 6055cbd51..207dd090f 100644 --- a/lending/docs/sdk/models/operations/getconnectionrequest.md +++ b/lending/docs/sdk/models/operations/getconnectionrequest.md @@ -1,19 +1,19 @@ -# GetConnectionRequest - -## Example Usage - -```typescript -import { GetConnectionRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetConnectionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetConnectionRequest + +## Example Usage + +```typescript +import { GetConnectionRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetConnectionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcreatebanktransactionsmodelrequest.md b/lending/docs/sdk/models/operations/getcreatebanktransactionsmodelrequest.md index 781dde183..6a28f3ddf 100644 --- a/lending/docs/sdk/models/operations/getcreatebanktransactionsmodelrequest.md +++ b/lending/docs/sdk/models/operations/getcreatebanktransactionsmodelrequest.md @@ -1,21 +1,21 @@ -# GetCreateBankTransactionsModelRequest - -## Example Usage - -```typescript -import { GetCreateBankTransactionsModelRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCreateBankTransactionsModelRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# GetCreateBankTransactionsModelRequest + +## Example Usage + +```typescript +import { GetCreateBankTransactionsModelRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCreateBankTransactionsModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md b/lending/docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md index 2fe6d256f..bc817f03d 100644 --- a/lending/docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md +++ b/lending/docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md @@ -1,19 +1,19 @@ -# GetCreateChartOfAccountsModelRequest - -## Example Usage - -```typescript -import { GetCreateChartOfAccountsModelRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCreateChartOfAccountsModelRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetCreateChartOfAccountsModelRequest + +## Example Usage + +```typescript +import { GetCreateChartOfAccountsModelRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCreateChartOfAccountsModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcreatedirectcostsmodelrequest.md b/lending/docs/sdk/models/operations/getcreatedirectcostsmodelrequest.md index 19f424e3f..b2563aaab 100644 --- a/lending/docs/sdk/models/operations/getcreatedirectcostsmodelrequest.md +++ b/lending/docs/sdk/models/operations/getcreatedirectcostsmodelrequest.md @@ -1,19 +1,19 @@ -# GetCreateDirectCostsModelRequest - -## Example Usage - -```typescript -import { GetCreateDirectCostsModelRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCreateDirectCostsModelRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetCreateDirectCostsModelRequest + +## Example Usage + +```typescript +import { GetCreateDirectCostsModelRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCreateDirectCostsModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcreateoperationrequest.md b/lending/docs/sdk/models/operations/getcreateoperationrequest.md index a5c527f60..2553facf8 100644 --- a/lending/docs/sdk/models/operations/getcreateoperationrequest.md +++ b/lending/docs/sdk/models/operations/getcreateoperationrequest.md @@ -1,19 +1,18 @@ -# GetCreateOperationRequest - -## Example Usage - -```typescript -import { GetCreateOperationRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCreateOperationRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "ab6924f9-5f88-45a4-9930-c36dc0697c8a", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetCreateOperationRequest + +## Example Usage + +```typescript +import { GetCreateOperationRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCreateOperationRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `pushOperationKey` | *string* | :heavy_check_mark: | Unique identifier for the push operation. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcreatepaymentmodelrequest.md b/lending/docs/sdk/models/operations/getcreatepaymentmodelrequest.md index 2d6488444..caf497a1d 100644 --- a/lending/docs/sdk/models/operations/getcreatepaymentmodelrequest.md +++ b/lending/docs/sdk/models/operations/getcreatepaymentmodelrequest.md @@ -1,19 +1,19 @@ -# GetCreatePaymentModelRequest - -## Example Usage - -```typescript -import { GetCreatePaymentModelRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCreatePaymentModelRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetCreatePaymentModelRequest + +## Example Usage + +```typescript +import { GetCreatePaymentModelRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCreatePaymentModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcreatetransfersmodelrequest.md b/lending/docs/sdk/models/operations/getcreatetransfersmodelrequest.md index 335fb543e..ddd0748cf 100644 --- a/lending/docs/sdk/models/operations/getcreatetransfersmodelrequest.md +++ b/lending/docs/sdk/models/operations/getcreatetransfersmodelrequest.md @@ -1,19 +1,19 @@ -# GetCreateTransfersModelRequest - -## Example Usage - -```typescript -import { GetCreateTransfersModelRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCreateTransfersModelRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetCreateTransfersModelRequest + +## Example Usage + +```typescript +import { GetCreateTransfersModelRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCreateTransfersModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md b/lending/docs/sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md index b38d533c0..90b5f1bb4 100644 --- a/lending/docs/sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md +++ b/lending/docs/sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md @@ -1,19 +1,19 @@ -# GetCreateUpdateBankAccountsModelRequest - -## Example Usage - -```typescript -import { GetCreateUpdateBankAccountsModelRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCreateUpdateBankAccountsModelRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetCreateUpdateBankAccountsModelRequest + +## Example Usage + +```typescript +import { GetCreateUpdateBankAccountsModelRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCreateUpdateBankAccountsModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getcreateupdatesuppliersmodelrequest.md b/lending/docs/sdk/models/operations/getcreateupdatesuppliersmodelrequest.md index bf646650a..efb6e1271 100644 --- a/lending/docs/sdk/models/operations/getcreateupdatesuppliersmodelrequest.md +++ b/lending/docs/sdk/models/operations/getcreateupdatesuppliersmodelrequest.md @@ -1,19 +1,19 @@ -# GetCreateUpdateSuppliersModelRequest - -## Example Usage - -```typescript -import { GetCreateUpdateSuppliersModelRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetCreateUpdateSuppliersModelRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetCreateUpdateSuppliersModelRequest + +## Example Usage + +```typescript +import { GetCreateUpdateSuppliersModelRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetCreateUpdateSuppliersModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getdataintegritystatusrequest.md b/lending/docs/sdk/models/operations/getdataintegritystatusrequest.md index eb02611c4..fefa303e1 100644 --- a/lending/docs/sdk/models/operations/getdataintegritystatusrequest.md +++ b/lending/docs/sdk/models/operations/getdataintegritystatusrequest.md @@ -1,19 +1,19 @@ -# GetDataIntegrityStatusRequest - -## Example Usage - -```typescript -import { GetDataIntegrityStatusRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetDataIntegrityStatusRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetDataIntegrityStatusRequest + +## Example Usage + +```typescript +import { GetDataIntegrityStatusRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetDataIntegrityStatusRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `dataType` | [shared.DataIntegrityDataType](../../../sdk/models/shared/dataintegritydatatype.md) | :heavy_check_mark: | A key for a Codat data type. | banking-accounts | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getdataintegritysummariesrequest.md b/lending/docs/sdk/models/operations/getdataintegritysummariesrequest.md index 16ab17564..572fe1257 100644 --- a/lending/docs/sdk/models/operations/getdataintegritysummariesrequest.md +++ b/lending/docs/sdk/models/operations/getdataintegritysummariesrequest.md @@ -1,21 +1,21 @@ -# GetDataIntegritySummariesRequest - -## Example Usage - -```typescript -import { GetDataIntegritySummariesRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetDataIntegritySummariesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `dataType` | [shared.DataIntegrityDataType](../../../sdk/models/shared/dataintegritydatatype.md) | :heavy_check_mark: | A key for a Codat data type. | banking-accounts | +# GetDataIntegritySummariesRequest + +## Example Usage + +```typescript +import { GetDataIntegritySummariesRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetDataIntegritySummariesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `dataType` | [shared.DataIntegrityDataType](../../../sdk/models/shared/dataintegritydatatype.md) | :heavy_check_mark: | A key for a Codat data type. | banking-accounts | | `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getdatastatusdatastatuses.md b/lending/docs/sdk/models/operations/getdatastatusdatastatuses.md index b6de8bfb5..3ce2f139b 100644 --- a/lending/docs/sdk/models/operations/getdatastatusdatastatuses.md +++ b/lending/docs/sdk/models/operations/getdatastatusdatastatuses.md @@ -1,361 +1,15 @@ -# GetDataStatusDataStatuses - -OK - -## Example Usage - -```typescript -import { GetDataStatusDataStatuses } from "@codat/lending/sdk/models/operations"; - -let value: GetDataStatusDataStatuses = { - accountTransactions: { - dataType: "invoices", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - balanceSheet: { - dataType: "bankAccounts", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Queued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - bankAccounts: { - dataType: "chartOfAccounts", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "InternalError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - bankTransactions: { - dataType: "commerce-paymentMethods", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "FetchError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - billCreditNotes: { - dataType: "paymentMethods", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "MapError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - billPayments: { - dataType: "commerce-payments", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationQueued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - bills: { - dataType: "paymentMethods", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Validating", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - cashFlowStatement: { - dataType: "journals", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Initial", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - chartOfAccounts: { - dataType: "suppliers", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Queued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - company: { - dataType: "invoices", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "NotSupported", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - creditNotes: { - dataType: "journals", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Fetching", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - customers: { - dataType: "trackingCategories", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "AuthError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - directCosts: { - dataType: "billPayments", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Fetching", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - directIncomes: { - dataType: "purchaseOrders", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Queued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - invoices: { - dataType: "creditNotes", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "MapQueued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - itemReceipts: { - dataType: "bankTransactions", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "NotSupported", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - items: { - dataType: "commerce-products", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "InternalError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - journalEntries: { - dataType: "commerce-products", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "PrerequisiteNotMet", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - journals: { - dataType: "commerce-transactions", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Mapping", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - paymentMethods: { - dataType: "billPayments", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "MapQueued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - payments: { - dataType: "payments", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Validating", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - profitAndLoss: { - dataType: "directCosts", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationQueued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - purchaseOrders: { - dataType: "bills", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - salesOrders: { - dataType: "commerce-products", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Queued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - suppliers: { - dataType: "transfers", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "AuthError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - taxRates: { - dataType: "company", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Validating", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - trackingCategories: { - dataType: "bills", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "NotSupported", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - transfers: { - dataType: "commerce-payments", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Processing", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - bankingAccountBalances: { - dataType: "items", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "InternalError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - bankingAccounts: { - dataType: "trackingCategories", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "InternalError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - bankingTransactionCategories: { - dataType: "journals", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "InternalError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - bankingTransactions: { - dataType: "invoices", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "FetchError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceCompanyInfo: { - dataType: "billPayments", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceCustomers: { - dataType: "suppliers", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Initial", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceDisputes: { - dataType: "banking-transactions", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingQueued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceLocations: { - dataType: "transfers", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "PermissionsError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceOrders: { - dataType: "billPayments", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "FetchError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commercePaymentMethods: { - dataType: "trackingCategories", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "NotSupported", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commercePayments: { - dataType: "invoices", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingError", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceProductCategories: { - dataType: "bills", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "MapQueued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceProducts: { - dataType: "banking-accounts", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Validating", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceTaxComponents: { - dataType: "items", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "PrerequisiteNotMet", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, - commerceTransactions: { - dataType: "company", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "MapQueued", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `accountTransactions` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `balanceSheet` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `bankAccounts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `bankTransactions` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `billCreditNotes` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `billPayments` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `bills` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `cashFlowStatement` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `chartOfAccounts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `company` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `creditNotes` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `customers` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `directCosts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `directIncomes` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `invoices` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `itemReceipts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `items` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `journalEntries` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `journals` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `paymentMethods` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `payments` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `profitAndLoss` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `purchaseOrders` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `salesOrders` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `suppliers` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `taxRates` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `trackingCategories` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `transfers` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `bankingAccountBalances` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `bankingAccounts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `bankingTransactionCategories` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `bankingTransactions` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceCompanyInfo` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceCustomers` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceDisputes` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceLocations` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceOrders` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commercePaymentMethods` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commercePayments` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceProductCategories` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceProducts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceTaxComponents` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | -| `commerceTransactions` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | \ No newline at end of file +# GetDataStatusDataStatuses + +## Example Usage + +```typescript +import { GetDataStatusDataStatuses } from "@codat/lending/sdk/models/operations"; + +let value: GetDataStatusDataStatuses = ""; +``` + +## Values + +```typescript + +``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getdatastatusrequest.md b/lending/docs/sdk/models/operations/getdatastatusrequest.md index 061fb51f6..28f27d1d2 100644 --- a/lending/docs/sdk/models/operations/getdatastatusrequest.md +++ b/lending/docs/sdk/models/operations/getdatastatusrequest.md @@ -1,17 +1,17 @@ -# GetDataStatusRequest - -## Example Usage - -```typescript -import { GetDataStatusRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetDataStatusRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +# GetDataStatusRequest + +## Example Usage + +```typescript +import { GetDataStatusRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetDataStatusRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getexcelreportgenerationstatusrequest.md b/lending/docs/sdk/models/operations/getexcelreportgenerationstatusrequest.md index cbff356f1..87402eaef 100644 --- a/lending/docs/sdk/models/operations/getexcelreportgenerationstatusrequest.md +++ b/lending/docs/sdk/models/operations/getexcelreportgenerationstatusrequest.md @@ -1,19 +1,18 @@ -# GetExcelReportGenerationStatusRequest - -## Example Usage - -```typescript -import { GetExcelReportGenerationStatusRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetExcelReportGenerationStatusRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "audit", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetExcelReportGenerationStatusRequest + +## Example Usage + +```typescript +import { GetExcelReportGenerationStatusRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetExcelReportGenerationStatusRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `reportType` | [shared.ExcelReportTypes](../../../sdk/models/shared/excelreporttypes.md) | :heavy_check_mark: | The type of report you want to generate and download. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getloansummaryqueryparamsourcetype.md b/lending/docs/sdk/models/operations/getloansummaryqueryparamsourcetype.md index 2df85f6b7..3868cbca7 100644 --- a/lending/docs/sdk/models/operations/getloansummaryqueryparamsourcetype.md +++ b/lending/docs/sdk/models/operations/getloansummaryqueryparamsourcetype.md @@ -1,17 +1,15 @@ -# GetLoanSummaryQueryParamSourceType - -Data source type. - -## Example Usage - -```typescript -import { GetLoanSummaryQueryParamSourceType } from "@codat/lending/sdk/models/operations"; - -let value: GetLoanSummaryQueryParamSourceType = "commerce"; -``` - -## Values - -```typescript -"banking" | "commerce" | "accounting" +# GetLoanSummaryQueryParamSourceType + +## Example Usage + +```typescript +import { GetLoanSummaryQueryParamSourceType } from "@codat/lending/sdk/models/operations"; + +let value: GetLoanSummaryQueryParamSourceType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getloansummaryrequest.md b/lending/docs/sdk/models/operations/getloansummaryrequest.md index 0ccf0ab15..aaaa713bd 100644 --- a/lending/docs/sdk/models/operations/getloansummaryrequest.md +++ b/lending/docs/sdk/models/operations/getloansummaryrequest.md @@ -1,19 +1,18 @@ -# GetLoanSummaryRequest - -## Example Usage - -```typescript -import { GetLoanSummaryRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetLoanSummaryRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "accounting", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetLoanSummaryRequest + +## Example Usage + +```typescript +import { GetLoanSummaryRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetLoanSummaryRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `sourceType` | [operations.GetLoanSummaryQueryParamSourceType](../../../sdk/models/operations/getloansummaryqueryparamsourcetype.md) | :heavy_check_mark: | Data source type. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/getpulloperationrequest.md b/lending/docs/sdk/models/operations/getpulloperationrequest.md index 49e793358..e27a6ec94 100644 --- a/lending/docs/sdk/models/operations/getpulloperationrequest.md +++ b/lending/docs/sdk/models/operations/getpulloperationrequest.md @@ -1,19 +1,18 @@ -# GetPullOperationRequest - -## Example Usage - -```typescript -import { GetPullOperationRequest } from "@codat/lending/sdk/models/operations"; - -let value: GetPullOperationRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - datasetId: "2e524c49-3726-44e5-9563-576172cc15aa", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# GetPullOperationRequest + +## Example Usage + +```typescript +import { GetPullOperationRequest } from "@codat/lending/sdk/models/operations"; + +let value: GetPullOperationRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `datasetId` | *string* | :heavy_check_mark: | Unique identifier for the dataset that completed its sync. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/isagedcreditorsreportavailablerequest.md b/lending/docs/sdk/models/operations/isagedcreditorsreportavailablerequest.md index 01261053d..e448ef849 100644 --- a/lending/docs/sdk/models/operations/isagedcreditorsreportavailablerequest.md +++ b/lending/docs/sdk/models/operations/isagedcreditorsreportavailablerequest.md @@ -1,17 +1,17 @@ -# IsAgedCreditorsReportAvailableRequest - -## Example Usage - -```typescript -import { IsAgedCreditorsReportAvailableRequest } from "@codat/lending/sdk/models/operations"; - -let value: IsAgedCreditorsReportAvailableRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +# IsAgedCreditorsReportAvailableRequest + +## Example Usage + +```typescript +import { IsAgedCreditorsReportAvailableRequest } from "@codat/lending/sdk/models/operations"; + +let value: IsAgedCreditorsReportAvailableRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/isageddebtorsreportavailablerequest.md b/lending/docs/sdk/models/operations/isageddebtorsreportavailablerequest.md index a1f553b24..feb3440d3 100644 --- a/lending/docs/sdk/models/operations/isageddebtorsreportavailablerequest.md +++ b/lending/docs/sdk/models/operations/isageddebtorsreportavailablerequest.md @@ -1,17 +1,17 @@ -# IsAgedDebtorsReportAvailableRequest - -## Example Usage - -```typescript -import { IsAgedDebtorsReportAvailableRequest } from "@codat/lending/sdk/models/operations"; - -let value: IsAgedDebtorsReportAvailableRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +# IsAgedDebtorsReportAvailableRequest + +## Example Usage + +```typescript +import { IsAgedDebtorsReportAvailableRequest } from "@codat/lending/sdk/models/operations"; + +let value: IsAgedDebtorsReportAvailableRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingaccountsrequest.md b/lending/docs/sdk/models/operations/listaccountingaccountsrequest.md index 27300c189..8be48cb99 100644 --- a/lending/docs/sdk/models/operations/listaccountingaccountsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingaccountsrequest.md @@ -1,23 +1,23 @@ -# ListAccountingAccountsRequest - -## Example Usage - -```typescript -import { ListAccountingAccountsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingAccountsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingAccountsRequest + +## Example Usage + +```typescript +import { ListAccountingAccountsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingAccountsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingaccounttransactionsrequest.md b/lending/docs/sdk/models/operations/listaccountingaccounttransactionsrequest.md index e729ef32c..738be9062 100644 --- a/lending/docs/sdk/models/operations/listaccountingaccounttransactionsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingaccounttransactionsrequest.md @@ -1,25 +1,25 @@ -# ListAccountingAccountTransactionsRequest - -## Example Usage - -```typescript -import { ListAccountingAccountTransactionsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingAccountTransactionsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingAccountTransactionsRequest + +## Example Usage + +```typescript +import { ListAccountingAccountTransactionsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingAccountTransactionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingbankaccountsrequest.md b/lending/docs/sdk/models/operations/listaccountingbankaccountsrequest.md index 8088dd04b..45c89effe 100644 --- a/lending/docs/sdk/models/operations/listaccountingbankaccountsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingbankaccountsrequest.md @@ -1,25 +1,25 @@ -# ListAccountingBankAccountsRequest - -## Example Usage - -```typescript -import { ListAccountingBankAccountsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingBankAccountsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingBankAccountsRequest + +## Example Usage + +```typescript +import { ListAccountingBankAccountsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingBankAccountsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingbankaccounttransactionsrequest.md b/lending/docs/sdk/models/operations/listaccountingbankaccounttransactionsrequest.md index f9958d981..00e601cc7 100644 --- a/lending/docs/sdk/models/operations/listaccountingbankaccounttransactionsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingbankaccounttransactionsrequest.md @@ -1,27 +1,27 @@ -# ListAccountingBankAccountTransactionsRequest - -## Example Usage - -```typescript -import { ListAccountingBankAccountTransactionsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingBankAccountTransactionsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingBankAccountTransactionsRequest + +## Example Usage + +```typescript +import { ListAccountingBankAccountTransactionsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingBankAccountTransactionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingbillattachmentsrequest.md b/lending/docs/sdk/models/operations/listaccountingbillattachmentsrequest.md index 5dad398ac..83988c1c5 100644 --- a/lending/docs/sdk/models/operations/listaccountingbillattachmentsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingbillattachmentsrequest.md @@ -1,21 +1,21 @@ -# ListAccountingBillAttachmentsRequest - -## Example Usage - -```typescript -import { ListAccountingBillAttachmentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingBillAttachmentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# ListAccountingBillAttachmentsRequest + +## Example Usage + +```typescript +import { ListAccountingBillAttachmentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingBillAttachmentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingbillcreditnotesrequest.md b/lending/docs/sdk/models/operations/listaccountingbillcreditnotesrequest.md index 68094e793..bc34126d3 100644 --- a/lending/docs/sdk/models/operations/listaccountingbillcreditnotesrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingbillcreditnotesrequest.md @@ -1,23 +1,23 @@ -# ListAccountingBillCreditNotesRequest - -## Example Usage - -```typescript -import { ListAccountingBillCreditNotesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingBillCreditNotesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingBillCreditNotesRequest + +## Example Usage + +```typescript +import { ListAccountingBillCreditNotesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingBillCreditNotesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingbillpaymentsrequest.md b/lending/docs/sdk/models/operations/listaccountingbillpaymentsrequest.md index eecc5437e..d827526a3 100644 --- a/lending/docs/sdk/models/operations/listaccountingbillpaymentsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingbillpaymentsrequest.md @@ -1,23 +1,23 @@ -# ListAccountingBillPaymentsRequest - -## Example Usage - -```typescript -import { ListAccountingBillPaymentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingBillPaymentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingBillPaymentsRequest + +## Example Usage + +```typescript +import { ListAccountingBillPaymentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingBillPaymentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingbillsrequest.md b/lending/docs/sdk/models/operations/listaccountingbillsrequest.md index 6dcbec543..858a154ee 100644 --- a/lending/docs/sdk/models/operations/listaccountingbillsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingbillsrequest.md @@ -1,23 +1,23 @@ -# ListAccountingBillsRequest - -## Example Usage - -```typescript -import { ListAccountingBillsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingBillsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingBillsRequest + +## Example Usage + +```typescript +import { ListAccountingBillsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingBillsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingcreditnotesrequest.md b/lending/docs/sdk/models/operations/listaccountingcreditnotesrequest.md index 998633259..d7f27d3eb 100644 --- a/lending/docs/sdk/models/operations/listaccountingcreditnotesrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingcreditnotesrequest.md @@ -1,23 +1,23 @@ -# ListAccountingCreditNotesRequest - -## Example Usage - -```typescript -import { ListAccountingCreditNotesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingCreditNotesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingCreditNotesRequest + +## Example Usage + +```typescript +import { ListAccountingCreditNotesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingCreditNotesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingcustomerattachmentsrequest.md b/lending/docs/sdk/models/operations/listaccountingcustomerattachmentsrequest.md index 91f56851a..fff126890 100644 --- a/lending/docs/sdk/models/operations/listaccountingcustomerattachmentsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingcustomerattachmentsrequest.md @@ -1,21 +1,21 @@ -# ListAccountingCustomerAttachmentsRequest - -## Example Usage - -```typescript -import { ListAccountingCustomerAttachmentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingCustomerAttachmentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# ListAccountingCustomerAttachmentsRequest + +## Example Usage + +```typescript +import { ListAccountingCustomerAttachmentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingCustomerAttachmentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingcustomersrequest.md b/lending/docs/sdk/models/operations/listaccountingcustomersrequest.md index c5a1b9791..2d54d582e 100644 --- a/lending/docs/sdk/models/operations/listaccountingcustomersrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingcustomersrequest.md @@ -1,23 +1,23 @@ -# ListAccountingCustomersRequest - -## Example Usage - -```typescript -import { ListAccountingCustomersRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingCustomersRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingCustomersRequest + +## Example Usage + +```typescript +import { ListAccountingCustomersRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingCustomersRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingdirectcostattachmentsrequest.md b/lending/docs/sdk/models/operations/listaccountingdirectcostattachmentsrequest.md index 1f1e978d8..20b920bec 100644 --- a/lending/docs/sdk/models/operations/listaccountingdirectcostattachmentsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingdirectcostattachmentsrequest.md @@ -1,21 +1,21 @@ -# ListAccountingDirectCostAttachmentsRequest - -## Example Usage - -```typescript -import { ListAccountingDirectCostAttachmentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingDirectCostAttachmentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# ListAccountingDirectCostAttachmentsRequest + +## Example Usage + +```typescript +import { ListAccountingDirectCostAttachmentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingDirectCostAttachmentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `directCostId` | *string* | :heavy_check_mark: | Unique identifier for a direct cost. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingdirectcostsrequest.md b/lending/docs/sdk/models/operations/listaccountingdirectcostsrequest.md index db9882750..df11c4019 100644 --- a/lending/docs/sdk/models/operations/listaccountingdirectcostsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingdirectcostsrequest.md @@ -1,25 +1,25 @@ -# ListAccountingDirectCostsRequest - -## Example Usage - -```typescript -import { ListAccountingDirectCostsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingDirectCostsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingDirectCostsRequest + +## Example Usage + +```typescript +import { ListAccountingDirectCostsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingDirectCostsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md b/lending/docs/sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md index 184ae47c8..d955f9f94 100644 --- a/lending/docs/sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md @@ -1,21 +1,21 @@ -# ListAccountingDirectIncomeAttachmentsRequest - -## Example Usage - -```typescript -import { ListAccountingDirectIncomeAttachmentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingDirectIncomeAttachmentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# ListAccountingDirectIncomeAttachmentsRequest + +## Example Usage + +```typescript +import { ListAccountingDirectIncomeAttachmentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingDirectIncomeAttachmentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `directIncomeId` | *string* | :heavy_check_mark: | Unique identifier for a direct income. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingdirectincomesrequest.md b/lending/docs/sdk/models/operations/listaccountingdirectincomesrequest.md index 3a25b3395..7b92d0cd4 100644 --- a/lending/docs/sdk/models/operations/listaccountingdirectincomesrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingdirectincomesrequest.md @@ -1,25 +1,25 @@ -# ListAccountingDirectIncomesRequest - -## Example Usage - -```typescript -import { ListAccountingDirectIncomesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingDirectIncomesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingDirectIncomesRequest + +## Example Usage + +```typescript +import { ListAccountingDirectIncomesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingDirectIncomesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountinginvoiceattachmentsrequest.md b/lending/docs/sdk/models/operations/listaccountinginvoiceattachmentsrequest.md index 749f0aac7..bda298549 100644 --- a/lending/docs/sdk/models/operations/listaccountinginvoiceattachmentsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountinginvoiceattachmentsrequest.md @@ -1,21 +1,21 @@ -# ListAccountingInvoiceAttachmentsRequest - -## Example Usage - -```typescript -import { ListAccountingInvoiceAttachmentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingInvoiceAttachmentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# ListAccountingInvoiceAttachmentsRequest + +## Example Usage + +```typescript +import { ListAccountingInvoiceAttachmentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingInvoiceAttachmentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `invoiceId` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountinginvoicesrequest.md b/lending/docs/sdk/models/operations/listaccountinginvoicesrequest.md index 1c672ebf6..b47ceafe5 100644 --- a/lending/docs/sdk/models/operations/listaccountinginvoicesrequest.md +++ b/lending/docs/sdk/models/operations/listaccountinginvoicesrequest.md @@ -1,23 +1,23 @@ -# ListAccountingInvoicesRequest - -## Example Usage - -```typescript -import { ListAccountingInvoicesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingInvoicesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingInvoicesRequest + +## Example Usage + +```typescript +import { ListAccountingInvoicesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingInvoicesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingjournalentriesrequest.md b/lending/docs/sdk/models/operations/listaccountingjournalentriesrequest.md index 6496d300b..af45ee35b 100644 --- a/lending/docs/sdk/models/operations/listaccountingjournalentriesrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingjournalentriesrequest.md @@ -1,23 +1,23 @@ -# ListAccountingJournalEntriesRequest - -## Example Usage - -```typescript -import { ListAccountingJournalEntriesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingJournalEntriesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingJournalEntriesRequest + +## Example Usage + +```typescript +import { ListAccountingJournalEntriesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingJournalEntriesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingjournalsrequest.md b/lending/docs/sdk/models/operations/listaccountingjournalsrequest.md index 97857e8b9..e5f0347c7 100644 --- a/lending/docs/sdk/models/operations/listaccountingjournalsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingjournalsrequest.md @@ -1,23 +1,23 @@ -# ListAccountingJournalsRequest - -## Example Usage - -```typescript -import { ListAccountingJournalsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingJournalsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingJournalsRequest + +## Example Usage + +```typescript +import { ListAccountingJournalsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingJournalsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingpaymentsrequest.md b/lending/docs/sdk/models/operations/listaccountingpaymentsrequest.md index 2db33d46d..a5b76d13a 100644 --- a/lending/docs/sdk/models/operations/listaccountingpaymentsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingpaymentsrequest.md @@ -1,23 +1,23 @@ -# ListAccountingPaymentsRequest - -## Example Usage - -```typescript -import { ListAccountingPaymentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingPaymentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingPaymentsRequest + +## Example Usage + +```typescript +import { ListAccountingPaymentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingPaymentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingsupplierattachmentsrequest.md b/lending/docs/sdk/models/operations/listaccountingsupplierattachmentsrequest.md index 53ea28e96..6acdf4825 100644 --- a/lending/docs/sdk/models/operations/listaccountingsupplierattachmentsrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingsupplierattachmentsrequest.md @@ -1,21 +1,21 @@ -# ListAccountingSupplierAttachmentsRequest - -## Example Usage - -```typescript -import { ListAccountingSupplierAttachmentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingSupplierAttachmentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# ListAccountingSupplierAttachmentsRequest + +## Example Usage + +```typescript +import { ListAccountingSupplierAttachmentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingSupplierAttachmentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingsuppliersrequest.md b/lending/docs/sdk/models/operations/listaccountingsuppliersrequest.md index d3b3ecf7a..02c27ac8c 100644 --- a/lending/docs/sdk/models/operations/listaccountingsuppliersrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingsuppliersrequest.md @@ -1,23 +1,23 @@ -# ListAccountingSuppliersRequest - -## Example Usage - -```typescript -import { ListAccountingSuppliersRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingSuppliersRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingSuppliersRequest + +## Example Usage + +```typescript +import { ListAccountingSuppliersRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingSuppliersRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listaccountingtransfersrequest.md b/lending/docs/sdk/models/operations/listaccountingtransfersrequest.md index 9b2d8874a..dfeb44a8f 100644 --- a/lending/docs/sdk/models/operations/listaccountingtransfersrequest.md +++ b/lending/docs/sdk/models/operations/listaccountingtransfersrequest.md @@ -1,25 +1,25 @@ -# ListAccountingTransfersRequest - -## Example Usage - -```typescript -import { ListAccountingTransfersRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListAccountingTransfersRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListAccountingTransfersRequest + +## Example Usage + +```typescript +import { ListAccountingTransfersRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListAccountingTransfersRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listbankingaccountbalancesrequest.md b/lending/docs/sdk/models/operations/listbankingaccountbalancesrequest.md index 79bc4d4d7..02b79e4e2 100644 --- a/lending/docs/sdk/models/operations/listbankingaccountbalancesrequest.md +++ b/lending/docs/sdk/models/operations/listbankingaccountbalancesrequest.md @@ -1,25 +1,25 @@ -# ListBankingAccountBalancesRequest - -## Example Usage - -```typescript -import { ListBankingAccountBalancesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListBankingAccountBalancesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListBankingAccountBalancesRequest + +## Example Usage + +```typescript +import { ListBankingAccountBalancesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListBankingAccountBalancesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listbankingaccountsrequest.md b/lending/docs/sdk/models/operations/listbankingaccountsrequest.md index 2fa4c9b4e..d11d2f49f 100644 --- a/lending/docs/sdk/models/operations/listbankingaccountsrequest.md +++ b/lending/docs/sdk/models/operations/listbankingaccountsrequest.md @@ -1,25 +1,25 @@ -# ListBankingAccountsRequest - -## Example Usage - -```typescript -import { ListBankingAccountsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListBankingAccountsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListBankingAccountsRequest + +## Example Usage + +```typescript +import { ListBankingAccountsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListBankingAccountsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listbankingtransactioncategoriesrequest.md b/lending/docs/sdk/models/operations/listbankingtransactioncategoriesrequest.md index 6e2fc2640..595f94d42 100644 --- a/lending/docs/sdk/models/operations/listbankingtransactioncategoriesrequest.md +++ b/lending/docs/sdk/models/operations/listbankingtransactioncategoriesrequest.md @@ -1,25 +1,25 @@ -# ListBankingTransactionCategoriesRequest - -## Example Usage - -```typescript -import { ListBankingTransactionCategoriesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListBankingTransactionCategoriesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListBankingTransactionCategoriesRequest + +## Example Usage + +```typescript +import { ListBankingTransactionCategoriesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListBankingTransactionCategoriesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listbankingtransactionsrequest.md b/lending/docs/sdk/models/operations/listbankingtransactionsrequest.md index 4051b7c35..cb5a01fb9 100644 --- a/lending/docs/sdk/models/operations/listbankingtransactionsrequest.md +++ b/lending/docs/sdk/models/operations/listbankingtransactionsrequest.md @@ -1,25 +1,25 @@ -# ListBankingTransactionsRequest - -## Example Usage - -```typescript -import { ListBankingTransactionsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListBankingTransactionsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListBankingTransactionsRequest + +## Example Usage + +```typescript +import { ListBankingTransactionsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListBankingTransactionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommercecustomersrequest.md b/lending/docs/sdk/models/operations/listcommercecustomersrequest.md index 8542b7a1c..8d6a4c18a 100644 --- a/lending/docs/sdk/models/operations/listcommercecustomersrequest.md +++ b/lending/docs/sdk/models/operations/listcommercecustomersrequest.md @@ -1,25 +1,25 @@ -# ListCommerceCustomersRequest - -## Example Usage - -```typescript -import { ListCommerceCustomersRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommerceCustomersRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCommerceCustomersRequest + +## Example Usage + +```typescript +import { ListCommerceCustomersRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommerceCustomersRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommercedisputesrequest.md b/lending/docs/sdk/models/operations/listcommercedisputesrequest.md index 051346c9b..ce2bfe5c9 100644 --- a/lending/docs/sdk/models/operations/listcommercedisputesrequest.md +++ b/lending/docs/sdk/models/operations/listcommercedisputesrequest.md @@ -1,25 +1,25 @@ -# ListCommerceDisputesRequest - -## Example Usage - -```typescript -import { ListCommerceDisputesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommerceDisputesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCommerceDisputesRequest + +## Example Usage + +```typescript +import { ListCommerceDisputesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommerceDisputesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommercelocationsrequest.md b/lending/docs/sdk/models/operations/listcommercelocationsrequest.md index 641ee0c73..1cd5be6bc 100644 --- a/lending/docs/sdk/models/operations/listcommercelocationsrequest.md +++ b/lending/docs/sdk/models/operations/listcommercelocationsrequest.md @@ -1,19 +1,19 @@ -# ListCommerceLocationsRequest - -## Example Usage - -```typescript -import { ListCommerceLocationsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommerceLocationsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# ListCommerceLocationsRequest + +## Example Usage + +```typescript +import { ListCommerceLocationsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommerceLocationsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommerceordersrequest.md b/lending/docs/sdk/models/operations/listcommerceordersrequest.md index 8525384b4..3db8f4d2c 100644 --- a/lending/docs/sdk/models/operations/listcommerceordersrequest.md +++ b/lending/docs/sdk/models/operations/listcommerceordersrequest.md @@ -1,25 +1,25 @@ -# ListCommerceOrdersRequest - -## Example Usage - -```typescript -import { ListCommerceOrdersRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommerceOrdersRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCommerceOrdersRequest + +## Example Usage + +```typescript +import { ListCommerceOrdersRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommerceOrdersRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommercepaymentmethodsrequest.md b/lending/docs/sdk/models/operations/listcommercepaymentmethodsrequest.md index 0ee3bc86c..b0c729951 100644 --- a/lending/docs/sdk/models/operations/listcommercepaymentmethodsrequest.md +++ b/lending/docs/sdk/models/operations/listcommercepaymentmethodsrequest.md @@ -1,25 +1,25 @@ -# ListCommercePaymentMethodsRequest - -## Example Usage - -```typescript -import { ListCommercePaymentMethodsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommercePaymentMethodsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCommercePaymentMethodsRequest + +## Example Usage + +```typescript +import { ListCommercePaymentMethodsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommercePaymentMethodsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommercepaymentsrequest.md b/lending/docs/sdk/models/operations/listcommercepaymentsrequest.md index 4c234fa0d..71ad21130 100644 --- a/lending/docs/sdk/models/operations/listcommercepaymentsrequest.md +++ b/lending/docs/sdk/models/operations/listcommercepaymentsrequest.md @@ -1,25 +1,25 @@ -# ListCommercePaymentsRequest - -## Example Usage - -```typescript -import { ListCommercePaymentsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommercePaymentsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCommercePaymentsRequest + +## Example Usage + +```typescript +import { ListCommercePaymentsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommercePaymentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommerceproductcategoriesrequest.md b/lending/docs/sdk/models/operations/listcommerceproductcategoriesrequest.md index cae453da0..22d668484 100644 --- a/lending/docs/sdk/models/operations/listcommerceproductcategoriesrequest.md +++ b/lending/docs/sdk/models/operations/listcommerceproductcategoriesrequest.md @@ -1,25 +1,25 @@ -# ListCommerceProductCategoriesRequest - -## Example Usage - -```typescript -import { ListCommerceProductCategoriesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommerceProductCategoriesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCommerceProductCategoriesRequest + +## Example Usage + +```typescript +import { ListCommerceProductCategoriesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommerceProductCategoriesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommerceproductsrequest.md b/lending/docs/sdk/models/operations/listcommerceproductsrequest.md index fece82c5b..80d9d5ab4 100644 --- a/lending/docs/sdk/models/operations/listcommerceproductsrequest.md +++ b/lending/docs/sdk/models/operations/listcommerceproductsrequest.md @@ -1,25 +1,25 @@ -# ListCommerceProductsRequest - -## Example Usage - -```typescript -import { ListCommerceProductsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommerceProductsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCommerceProductsRequest + +## Example Usage + +```typescript +import { ListCommerceProductsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommerceProductsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcommercetransactionsrequest.md b/lending/docs/sdk/models/operations/listcommercetransactionsrequest.md index a693f8c9a..a502c9828 100644 --- a/lending/docs/sdk/models/operations/listcommercetransactionsrequest.md +++ b/lending/docs/sdk/models/operations/listcommercetransactionsrequest.md @@ -1,25 +1,25 @@ -# ListCommerceTransactionsRequest - -## Example Usage - -```typescript -import { ListCommerceTransactionsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCommerceTransactionsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCommerceTransactionsRequest + +## Example Usage + +```typescript +import { ListCommerceTransactionsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCommerceTransactionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcompaniesrequest.md b/lending/docs/sdk/models/operations/listcompaniesrequest.md index dd50057f1..06fc558ec 100644 --- a/lending/docs/sdk/models/operations/listcompaniesrequest.md +++ b/lending/docs/sdk/models/operations/listcompaniesrequest.md @@ -1,23 +1,23 @@ -# ListCompaniesRequest - -## Example Usage - -```typescript -import { ListCompaniesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCompaniesRequest = { - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - tags: "region=uk && team=invoice-finance", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | -| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | +# ListCompaniesRequest + +## Example Usage + +```typescript +import { ListCompaniesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCompaniesRequest = { + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | | `tags` | *string* | :heavy_minus_sign: | Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying). | region=uk && team=invoice-finance | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listconnectionsrequest.md b/lending/docs/sdk/models/operations/listconnectionsrequest.md index e15cc0294..3afcefa79 100644 --- a/lending/docs/sdk/models/operations/listconnectionsrequest.md +++ b/lending/docs/sdk/models/operations/listconnectionsrequest.md @@ -1,23 +1,23 @@ -# ListConnectionsRequest - -## Example Usage - -```typescript -import { ListConnectionsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListConnectionsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListConnectionsRequest + +## Example Usage + +```typescript +import { ListConnectionsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListConnectionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listcreateoperationsrequest.md b/lending/docs/sdk/models/operations/listcreateoperationsrequest.md index 0a36a2135..dfde835db 100644 --- a/lending/docs/sdk/models/operations/listcreateoperationsrequest.md +++ b/lending/docs/sdk/models/operations/listcreateoperationsrequest.md @@ -1,23 +1,23 @@ -# ListCreateOperationsRequest - -## Example Usage - -```typescript -import { ListCreateOperationsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListCreateOperationsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListCreateOperationsRequest + +## Example Usage + +```typescript +import { ListCreateOperationsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListCreateOperationsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listdataintegritydetailsrequest.md b/lending/docs/sdk/models/operations/listdataintegritydetailsrequest.md index 682326b05..e60a3ddc1 100644 --- a/lending/docs/sdk/models/operations/listdataintegritydetailsrequest.md +++ b/lending/docs/sdk/models/operations/listdataintegritydetailsrequest.md @@ -1,25 +1,25 @@ -# ListDataIntegrityDetailsRequest - -## Example Usage - -```typescript -import { ListDataIntegrityDetailsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListDataIntegrityDetailsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `dataType` | [shared.DataIntegrityDataType](../../../sdk/models/shared/dataintegritydatatype.md) | :heavy_check_mark: | A key for a Codat data type. | banking-accounts | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListDataIntegrityDetailsRequest + +## Example Usage + +```typescript +import { ListDataIntegrityDetailsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListDataIntegrityDetailsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `dataType` | [shared.DataIntegrityDataType](../../../sdk/models/shared/dataintegritydatatype.md) | :heavy_check_mark: | A key for a Codat data type. | banking-accounts | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listfilesrequest.md b/lending/docs/sdk/models/operations/listfilesrequest.md index a7c20b2be..051fad542 100644 --- a/lending/docs/sdk/models/operations/listfilesrequest.md +++ b/lending/docs/sdk/models/operations/listfilesrequest.md @@ -1,17 +1,17 @@ -# ListFilesRequest - -## Example Usage - -```typescript -import { ListFilesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListFilesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +# ListFilesRequest + +## Example Usage + +```typescript +import { ListFilesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListFilesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listloantransactionsrequest.md b/lending/docs/sdk/models/operations/listloantransactionsrequest.md index 937f8c39f..25f1044ed 100644 --- a/lending/docs/sdk/models/operations/listloantransactionsrequest.md +++ b/lending/docs/sdk/models/operations/listloantransactionsrequest.md @@ -1,19 +1,18 @@ -# ListLoanTransactionsRequest - -## Example Usage - -```typescript -import { ListLoanTransactionsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListLoanTransactionsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "commerce", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# ListLoanTransactionsRequest + +## Example Usage + +```typescript +import { ListLoanTransactionsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListLoanTransactionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `sourceType` | [operations.QueryParamSourceType](../../../sdk/models/operations/queryparamsourcetype.md) | :heavy_check_mark: | Data source type. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listpulloperationsrequest.md b/lending/docs/sdk/models/operations/listpulloperationsrequest.md index 2b0441a76..98adda875 100644 --- a/lending/docs/sdk/models/operations/listpulloperationsrequest.md +++ b/lending/docs/sdk/models/operations/listpulloperationsrequest.md @@ -1,23 +1,23 @@ -# ListPullOperationsRequest - -## Example Usage - -```typescript -import { ListPullOperationsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListPullOperationsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListPullOperationsRequest + +## Example Usage + +```typescript +import { ListPullOperationsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListPullOperationsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listreconciledinvoicesrequest.md b/lending/docs/sdk/models/operations/listreconciledinvoicesrequest.md index 88c39c550..f9960723a 100644 --- a/lending/docs/sdk/models/operations/listreconciledinvoicesrequest.md +++ b/lending/docs/sdk/models/operations/listreconciledinvoicesrequest.md @@ -1,21 +1,21 @@ -# ListReconciledInvoicesRequest - -## Example Usage - -```typescript -import { ListReconciledInvoicesRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListReconciledInvoicesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +# ListReconciledInvoicesRequest + +## Example Usage + +```typescript +import { ListReconciledInvoicesRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListReconciledInvoicesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | | `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/listreportsrequest.md b/lending/docs/sdk/models/operations/listreportsrequest.md index 2d0167ac1..394123c57 100644 --- a/lending/docs/sdk/models/operations/listreportsrequest.md +++ b/lending/docs/sdk/models/operations/listreportsrequest.md @@ -1,23 +1,23 @@ -# ListReportsRequest - -## Example Usage - -```typescript -import { ListReportsRequest } from "@codat/lending/sdk/models/operations"; - -let value: ListReportsRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +# ListReportsRequest + +## Example Usage + +```typescript +import { ListReportsRequest } from "@codat/lending/sdk/models/operations"; + +let value: ListReportsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | | `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/queryparamsourcetype.md b/lending/docs/sdk/models/operations/queryparamsourcetype.md index 960724231..5b360860e 100644 --- a/lending/docs/sdk/models/operations/queryparamsourcetype.md +++ b/lending/docs/sdk/models/operations/queryparamsourcetype.md @@ -1,17 +1,15 @@ -# QueryParamSourceType - -Data source type. - -## Example Usage - -```typescript -import { QueryParamSourceType } from "@codat/lending/sdk/models/operations"; - -let value: QueryParamSourceType = "banking"; -``` - -## Values - -```typescript -"banking" | "commerce" | "accounting" +# QueryParamSourceType + +## Example Usage + +```typescript +import { QueryParamSourceType } from "@codat/lending/sdk/models/operations"; + +let value: QueryParamSourceType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/refreshalldatatypesrequest.md b/lending/docs/sdk/models/operations/refreshalldatatypesrequest.md index d483d40dd..986afa2c2 100644 --- a/lending/docs/sdk/models/operations/refreshalldatatypesrequest.md +++ b/lending/docs/sdk/models/operations/refreshalldatatypesrequest.md @@ -1,17 +1,17 @@ -# RefreshAllDataTypesRequest - -## Example Usage - -```typescript -import { RefreshAllDataTypesRequest } from "@codat/lending/sdk/models/operations"; - -let value: RefreshAllDataTypesRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +# RefreshAllDataTypesRequest + +## Example Usage + +```typescript +import { RefreshAllDataTypesRequest } from "@codat/lending/sdk/models/operations"; + +let value: RefreshAllDataTypesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/refreshdatatyperequest.md b/lending/docs/sdk/models/operations/refreshdatatyperequest.md index 3fb7f519b..27c43ce61 100644 --- a/lending/docs/sdk/models/operations/refreshdatatyperequest.md +++ b/lending/docs/sdk/models/operations/refreshdatatyperequest.md @@ -1,20 +1,20 @@ -# RefreshDataTypeRequest - -## Example Usage - -```typescript -import { RefreshDataTypeRequest } from "@codat/lending/sdk/models/operations"; - -let value: RefreshDataTypeRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "invoices", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `dataType` | [shared.DataType](../../../sdk/models/shared/datatype.md) | :heavy_check_mark: | A key for a Codat data type. | invoices | +# RefreshDataTypeRequest + +## Example Usage + +```typescript +import { RefreshDataTypeRequest } from "@codat/lending/sdk/models/operations"; + +let value: RefreshDataTypeRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "invoices", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `dataType` | [shared.DataType](../../../sdk/models/shared/datatype.md) | :heavy_check_mark: | A key for a Codat data type. | invoices | | `connectionId` | *string* | :heavy_minus_sign: | Optionally, provide a data connection id to only queue pull operations on that connection. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/replacecompanyrequest.md b/lending/docs/sdk/models/operations/replacecompanyrequest.md index 98723a7b4..c484b8ec6 100644 --- a/lending/docs/sdk/models/operations/replacecompanyrequest.md +++ b/lending/docs/sdk/models/operations/replacecompanyrequest.md @@ -1,18 +1,18 @@ -# ReplaceCompanyRequest - -## Example Usage - -```typescript -import { ReplaceCompanyRequest } from "@codat/lending/sdk/models/operations"; - -let value: ReplaceCompanyRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# ReplaceCompanyRequest + +## Example Usage + +```typescript +import { ReplaceCompanyRequest } from "@codat/lending/sdk/models/operations"; + +let value: ReplaceCompanyRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `companyRequestBody` | [shared.CompanyRequestBody](../../../sdk/models/shared/companyrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/setbankstatementuploadconfigurationrequest.md b/lending/docs/sdk/models/operations/setbankstatementuploadconfigurationrequest.md index 1e0d7e0e8..ef1ee5a8f 100644 --- a/lending/docs/sdk/models/operations/setbankstatementuploadconfigurationrequest.md +++ b/lending/docs/sdk/models/operations/setbankstatementuploadconfigurationrequest.md @@ -1,20 +1,20 @@ -# SetBankStatementUploadConfigurationRequest - -## Example Usage - -```typescript -import { SetBankStatementUploadConfigurationRequest } from "@codat/lending/sdk/models/operations"; - -let value: SetBankStatementUploadConfigurationRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `bankStatementUploadConfiguration` | [shared.BankStatementUploadConfiguration](../../../sdk/models/shared/bankstatementuploadconfiguration.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# SetBankStatementUploadConfigurationRequest + +## Example Usage + +```typescript +import { SetBankStatementUploadConfigurationRequest } from "@codat/lending/sdk/models/operations"; + +let value: SetBankStatementUploadConfigurationRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `bankStatementUploadConfiguration` | [shared.BankStatementUploadConfiguration](../../../sdk/models/shared/bankstatementuploadconfiguration.md) | :heavy_minus_sign: | Configuration settings for uploading banking data to Codat | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/sourcetype.md b/lending/docs/sdk/models/operations/sourcetype.md index 02d682dbf..b510c639d 100644 --- a/lending/docs/sdk/models/operations/sourcetype.md +++ b/lending/docs/sdk/models/operations/sourcetype.md @@ -1,17 +1,15 @@ -# SourceType - -Data source type. - -## Example Usage - -```typescript -import { SourceType } from "@codat/lending/sdk/models/operations"; - -let value: SourceType = "banking"; -``` - -## Values - -```typescript -"banking" | "commerce" | "accounting" +# SourceType + +## Example Usage + +```typescript +import { SourceType } from "@codat/lending/sdk/models/operations"; + +let value: SourceType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/startbankstatementuploadsessionrequest.md b/lending/docs/sdk/models/operations/startbankstatementuploadsessionrequest.md index e06cd60b8..fc7cb0cd0 100644 --- a/lending/docs/sdk/models/operations/startbankstatementuploadsessionrequest.md +++ b/lending/docs/sdk/models/operations/startbankstatementuploadsessionrequest.md @@ -1,20 +1,20 @@ -# StartBankStatementUploadSessionRequest - -## Example Usage - -```typescript -import { StartBankStatementUploadSessionRequest } from "@codat/lending/sdk/models/operations"; - -let value: StartBankStatementUploadSessionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# StartBankStatementUploadSessionRequest + +## Example Usage + +```typescript +import { StartBankStatementUploadSessionRequest } from "@codat/lending/sdk/models/operations"; + +let value: StartBankStatementUploadSessionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `startUploadSessionRequest` | [shared.StartUploadSessionRequest](../../../sdk/models/shared/startuploadsessionrequest.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/unlinkconnectionrequest.md b/lending/docs/sdk/models/operations/unlinkconnectionrequest.md index cd70ca851..a387f6477 100644 --- a/lending/docs/sdk/models/operations/unlinkconnectionrequest.md +++ b/lending/docs/sdk/models/operations/unlinkconnectionrequest.md @@ -1,20 +1,20 @@ -# UnlinkConnectionRequest - -## Example Usage - -```typescript -import { UnlinkConnectionRequest } from "@codat/lending/sdk/models/operations"; - -let value: UnlinkConnectionRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# UnlinkConnectionRequest + +## Example Usage + +```typescript +import { UnlinkConnectionRequest } from "@codat/lending/sdk/models/operations"; + +let value: UnlinkConnectionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `requestBody` | [operations.UnlinkConnectionUpdateConnection](../../../sdk/models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/unlinkconnectionupdateconnection.md b/lending/docs/sdk/models/operations/unlinkconnectionupdateconnection.md index 9b9ddc89e..304889cc2 100644 --- a/lending/docs/sdk/models/operations/unlinkconnectionupdateconnection.md +++ b/lending/docs/sdk/models/operations/unlinkconnectionupdateconnection.md @@ -1,15 +1,15 @@ -# UnlinkConnectionUpdateConnection - -## Example Usage - -```typescript -import { UnlinkConnectionUpdateConnection } from "@codat/lending/sdk/models/operations"; - -let value: UnlinkConnectionUpdateConnection = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `status` | [shared.DataConnectionStatus](../../../sdk/models/shared/dataconnectionstatus.md) | :heavy_minus_sign: | The current authorization status of the data connection. | \ No newline at end of file +# UnlinkConnectionUpdateConnection + +## Example Usage + +```typescript +import { UnlinkConnectionUpdateConnection } from "@codat/lending/sdk/models/operations"; + +let value: UnlinkConnectionUpdateConnection = ""; +``` + +## Values + +```typescript + +``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/updatecompanyrequest.md b/lending/docs/sdk/models/operations/updatecompanyrequest.md index 030b15482..3c3cfc2be 100644 --- a/lending/docs/sdk/models/operations/updatecompanyrequest.md +++ b/lending/docs/sdk/models/operations/updatecompanyrequest.md @@ -1,18 +1,18 @@ -# UpdateCompanyRequest - -## Example Usage - -```typescript -import { UpdateCompanyRequest } from "@codat/lending/sdk/models/operations"; - -let value: UpdateCompanyRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +# UpdateCompanyRequest + +## Example Usage + +```typescript +import { UpdateCompanyRequest } from "@codat/lending/sdk/models/operations"; + +let value: UpdateCompanyRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `companyUpdateRequest` | [shared.CompanyUpdateRequest](../../../sdk/models/shared/companyupdaterequest.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/uploadbankstatementdatarequest.md b/lending/docs/sdk/models/operations/uploadbankstatementdatarequest.md index f0777c268..881f1a5b5 100644 --- a/lending/docs/sdk/models/operations/uploadbankstatementdatarequest.md +++ b/lending/docs/sdk/models/operations/uploadbankstatementdatarequest.md @@ -1,55 +1,22 @@ -# UploadBankStatementDataRequest - -## Example Usage - -```typescript -import { UploadBankStatementDataRequest } from "@codat/lending/sdk/models/operations"; - -let value: UploadBankStatementDataRequest = { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - datasetId: "b48991bc-5bf4-4cf4-8090-7c3419f0a6eb", - requestBody: { - "results": [ - { - "id": "1703194f-7805-4da8-bac0-2ba5da4a4216", - "name": "Business Current Account", - "informalName": "Codat", - "holder": "Codat Ltd", - "type": "Debit", - "balance": { - "available": -459987.97, - "current": -459964.9, - "limit": 5000, - }, - "identifiers": { - "type": "Depository", - "subtype": "checking", - "number": "46762629", - "bankCode": 9911, - "iban": "GB29 LOYD 4773 2346 7626 29", - "bic": "LOYDGB21006", - "maskedAccountNumber": "LOYDGB21006", - }, - "currency": "GBP", - "institution": { - "id": "lloyds-bank", - "name": "Lloyds Bank", - }, - "modifiedDate": "2022-05-23T16:32:50Z", - "sourceModifiedDate": "2021-08-14T05:04:12", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `datasetId` | *string* | :heavy_check_mark: | Unique identifier for the dataset that completed its sync. | | -| `path` | [shared.Path](../../../sdk/models/shared/path.md) | :heavy_minus_sign: | The endpoint path of the third-party banking service that the request body originates from. Only required if the source is not `codat`. | | -| `requestBody` | *operations.UploadBankStatementDataRequestBody* | :heavy_check_mark: | N/A | | \ No newline at end of file +# UploadBankStatementDataRequest + +## Example Usage + +```typescript +import { UploadBankStatementDataRequest } from "@codat/lending/sdk/models/operations"; + +let value: UploadBankStatementDataRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `datasetId` | *string* | :heavy_check_mark: | Unique identifier for the dataset that completed its sync. | | +| `path` | [shared.Path](../../../sdk/models/shared/path.md) | :heavy_minus_sign: | The endpoint path of the third-party banking service that the request body originates from. Only required if the source is not `codat`. | | +| `requestBody` | *UploadBankStatementDataRequestBody* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/uploadbankstatementdatarequestbody.md b/lending/docs/sdk/models/operations/uploadbankstatementdatarequestbody.md index e104e4932..a0238a854 100644 --- a/lending/docs/sdk/models/operations/uploadbankstatementdatarequestbody.md +++ b/lending/docs/sdk/models/operations/uploadbankstatementdatarequestbody.md @@ -1,45 +1,82 @@ -# UploadBankStatementDataRequestBody - - -## Supported Types - -### `shared.BankingAccount` - -```typescript -const value: shared.BankingAccount = { - id: "", - name: "", - type: "Debit", - balance: {}, - identifiers: { - type: "Card", - }, - currency: "Malaysian Ringgit", - institution: {}, -}; -``` - -### `shared.BankingTransactions` - -```typescript -const value: shared.BankingTransactions = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -### `any` - -```typescript -const value: any = ""; -``` - +# UploadBankStatementDataRequestBody + + +## Supported Types + +### `shared.BankingAccount` + +```typescript +const value: shared.BankingAccount = { + results: [ + { + id: "1703194f-7805-4da8-bac0-2ba5da4a4216", + name: "Business Current Account", + informalName: "Codat", + holder: "Codat Ltd", + type: "Debit", + balance: { + available: -459987.97, + current: -459964.9, + limit: 5000, + }, + identifiers: { + type: "Depository", + subtype: "checking", + number: "46762629", + bankCode: "009911", + iban: "GB29 LOYD 4773 2346 7626 29", + bic: "LOYDGB21006", + maskedAccountNumber: "LOYDGB21006", + }, + currency: "GBP", + institution: { + id: "lloyds-bank", + name: "Lloyds Bank", + }, + modifiedDate: "2022-05-23T16:32:50Z", + sourceModifiedDate: "2021-08-14T05:04:12", + }, + ], +}; +``` + +### `shared.BankingTransactions` + +```typescript +const value: shared.BankingTransactions = { + results: [ + { + id: "0130b5bb-1419-40f6-8a27-7362d0381229", + accountId: "1703194f-7805-4da8-bac0-2ba5da4a4216", + description: "Payments for direct income ce149943-c157-43fc-aac7-42a716b655b6", + amount: 5062.39, + currency: "GBP", + postedDate: "2021-07-06T00:00:00", + authorizedDate: "2021-07-06T00:00:00", + merchantName: "New Look", + transactionCategoryRef: { + id: "health-and-fitness-sports", + }, + modifiedDate: "2022-05-23T16:32:50Z", + sourceModifiedDate: "2021-06-28T10:48:12", + }, + ], + pageNumber: 0, + pageSize: 0, + totalResults: 0, + _links: { + self: { + href: "/companies", + }, + current: { + href: "/companies?page=1&pageSize=10", + }, + }, +}; +``` + +### `shared.object` + +```typescript +const value: shared.object = {}; +``` \ No newline at end of file diff --git a/lending/docs/sdk/models/operations/uploadfilesrequest.md b/lending/docs/sdk/models/operations/uploadfilesrequest.md index 67f5e9f03..6ff8a4749 100644 --- a/lending/docs/sdk/models/operations/uploadfilesrequest.md +++ b/lending/docs/sdk/models/operations/uploadfilesrequest.md @@ -1,17 +1,20 @@ -# UploadFilesRequest - -## Example Usage - -```typescript -import { UploadFilesRequest } from "@codat/lending/sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +# UploadFilesRequest + +## Example Usage + +```typescript +import { UploadFilesRequest } from "@codat/lending/sdk/models/operations"; + +let value: UploadFilesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `fileUpload` | [shared.FileUpload](../../../sdk/models/shared/fileupload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountbalance.md b/lending/docs/sdk/models/shared/accountbalance.md index d4c3a0e95..d71769202 100644 --- a/lending/docs/sdk/models/shared/accountbalance.md +++ b/lending/docs/sdk/models/shared/accountbalance.md @@ -1,20 +1,20 @@ -# AccountBalance - -## Example Usage - -```typescript -import { AccountBalance } from "@codat/lending/sdk/models/shared"; - -let value: AccountBalance = { - currency: "GBP", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `available` | *Decimal* | :heavy_minus_sign: | The account's current balance | | -| `pending` | *Decimal* | :heavy_minus_sign: | Funds that are not yet available in the balance | | -| `reserved` | *any* | :heavy_minus_sign: | Funds reserved as holdings | | +# AccountBalance + +## Example Usage + +```typescript +import { AccountBalance } from "@codat/lending/sdk/models/shared"; + +let value: AccountBalance = { + currency: "GBP", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `available` | *Decimal | number* | :heavy_minus_sign: | The account's current balance | | +| `pending` | *Decimal | number* | :heavy_minus_sign: | Funds that are not yet available in the balance | | +| `reserved` | *any* | :heavy_minus_sign: | Funds reserved as holdings | | | `currency` | *string* | :heavy_minus_sign: | The currency of the account | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountbalanceamounts.md b/lending/docs/sdk/models/shared/accountbalanceamounts.md index 913050160..40aa6ea67 100644 --- a/lending/docs/sdk/models/shared/accountbalanceamounts.md +++ b/lending/docs/sdk/models/shared/accountbalanceamounts.md @@ -1,19 +1,19 @@ -# AccountBalanceAmounts - -Depending on the data provided by the underlying bank, not all balances are always available. - -## Example Usage - -```typescript -import { AccountBalanceAmounts } from "@codat/lending/sdk/models/shared"; - -let value: AccountBalanceAmounts = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `available` | *Decimal* | :heavy_minus_sign: | The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. | -| `current` | *Decimal* | :heavy_minus_sign: | The balance of the account only including cleared transactions. | -| `limit` | *Decimal* | :heavy_minus_sign: | The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. | \ No newline at end of file +# AccountBalanceAmounts + +Depending on the data provided by the underlying bank, not all balances are always available. + +## Example Usage + +```typescript +import { AccountBalanceAmounts } from "@codat/lending/sdk/models/shared"; + +let value: AccountBalanceAmounts = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `available` | *Decimal | number* | :heavy_minus_sign: | The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. | +| `current` | *Decimal | number* | :heavy_minus_sign: | The balance of the account only including cleared transactions. | +| `limit` | *Decimal | number* | :heavy_minus_sign: | The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountcategoriesupdatedwebhook.md b/lending/docs/sdk/models/shared/accountcategoriesupdatedwebhook.md index bb7281aea..2f38e8b80 100644 --- a/lending/docs/sdk/models/shared/accountcategoriesupdatedwebhook.md +++ b/lending/docs/sdk/models/shared/accountcategoriesupdatedwebhook.md @@ -1,38 +1,25 @@ -# AccountCategoriesUpdatedWebhook - -Webhook request body for the "Account categories updated" event. - -## Example Usage - -```typescript -import { AccountCategoriesUpdatedWebhook } from "@codat/lending/sdk/models/shared"; - -let value: AccountCategoriesUpdatedWebhook = { - clientId: "bae71d36-ff47-420a-b4a6-f8c9ddf41140", - clientName: "Bank of Dave", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataConnectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - ruleId: "70af3071-65d9-4ec3-b3cb-5283e8d55dac", - ruleType: "Account Categories Updated", - alertId: "a9367074-b5c3-42c4-9be4-be129f43577e", - message: - "Account categories updated for company f1c35bdc-1546-41b9-baf4-3f31135af968.", - data: { - modifiedDate: "2019-08-24T14:15:22Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `companyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `dataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| ~~`ruleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `data` | [shared.AccountCategoriesUpdatedWebhookData](../../../sdk/models/shared/accountcategoriesupdatedwebhookdata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# AccountCategoriesUpdatedWebhook + +Webhook request body for the "Account categories updated" event. + +## Example Usage + +```typescript +import { AccountCategoriesUpdatedWebhook } from "@codat/lending/sdk/models/shared"; + +let value: AccountCategoriesUpdatedWebhook = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | +| `companyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | +| `dataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | +| `ruleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | +| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | +| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | +| `data` | [shared.AccountCategoriesUpdatedWebhookData](../../../sdk/models/shared/accountcategoriesupdatedwebhookdata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountcategoriesupdatedwebhookdata.md b/lending/docs/sdk/models/shared/accountcategoriesupdatedwebhookdata.md index bd0ed2995..cbaffa814 100644 --- a/lending/docs/sdk/models/shared/accountcategoriesupdatedwebhookdata.md +++ b/lending/docs/sdk/models/shared/accountcategoriesupdatedwebhookdata.md @@ -1,17 +1,17 @@ -# AccountCategoriesUpdatedWebhookData - -## Example Usage - -```typescript -import { AccountCategoriesUpdatedWebhookData } from "@codat/lending/sdk/models/shared"; - -let value: AccountCategoriesUpdatedWebhookData = { - modifiedDate: "2022-10-23", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +# AccountCategoriesUpdatedWebhookData + +## Example Usage + +```typescript +import { AccountCategoriesUpdatedWebhookData } from "@codat/lending/sdk/models/shared"; + +let value: AccountCategoriesUpdatedWebhookData = { + modifiedDate: "2022-10-23", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `modifiedDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
```
2020-10-08
``` | 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountcategorylevel.md b/lending/docs/sdk/models/shared/accountcategorylevel.md index 7d60b22f6..da0c42bc5 100644 --- a/lending/docs/sdk/models/shared/accountcategorylevel.md +++ b/lending/docs/sdk/models/shared/accountcategorylevel.md @@ -1,18 +1,18 @@ -# AccountCategoryLevel - -An object containing an ordered list of account category levels. - -## Example Usage - -```typescript -import { AccountCategoryLevel } from "@codat/lending/sdk/models/shared"; - -let value: AccountCategoryLevel = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `levelName` | *string* | :heavy_minus_sign: | Account category name. | -| `confidence` | *Decimal* | :heavy_minus_sign: | Confidence level of the category. This will only be populated where `status` is `Suggested`. | \ No newline at end of file +# AccountCategoryLevel + +An object containing an ordered list of account category levels. + +## Example Usage + +```typescript +import { AccountCategoryLevel } from "@codat/lending/sdk/models/shared"; + +let value: AccountCategoryLevel = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `levelName` | *string* | :heavy_minus_sign: | Account category name. | +| `confidence` | *Decimal | number* | :heavy_minus_sign: | Confidence level of the category. This will only be populated where `status` is `Suggested`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountidentifiers.md b/lending/docs/sdk/models/shared/accountidentifiers.md index abb0b1041..c7dad6f5f 100644 --- a/lending/docs/sdk/models/shared/accountidentifiers.md +++ b/lending/docs/sdk/models/shared/accountidentifiers.md @@ -1,25 +1,25 @@ -# AccountIdentifiers - -An object containing bank account identification information. - -## Example Usage - -```typescript -import { AccountIdentifiers } from "@codat/lending/sdk/models/shared"; - -let value: AccountIdentifiers = { - type: "Depository", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [shared.AccountIdentifierType](../../../sdk/models/shared/accountidentifiertype.md) | :heavy_check_mark: | Type of account | -| `subtype` | *string* | :heavy_minus_sign: | Detailed account category | -| `number` | *string* | :heavy_minus_sign: | The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. | -| `bankCode` | *string* | :heavy_minus_sign: | The local (usually national) routing number for the account.

This is known by different names in different countries:
* BSB code (Australia)
* routing number (Canada, USA)
* sort code (UK) | -| `iban` | *string* | :heavy_minus_sign: | The international bank account number (IBAN) for the account, if known. | -| `bic` | *string* | :heavy_minus_sign: | The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. | +# AccountIdentifiers + +An object containing bank account identification information. + +## Example Usage + +```typescript +import { AccountIdentifiers } from "@codat/lending/sdk/models/shared"; + +let value: AccountIdentifiers = { + type: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [shared.AccountIdentifierType](../../../sdk/models/shared/accountidentifiertype.md) | :heavy_check_mark: | Type of account | +| `subtype` | *string* | :heavy_minus_sign: | Detailed account category | +| `number` | *string* | :heavy_minus_sign: | The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. | +| `bankCode` | *string* | :heavy_minus_sign: | The local (usually national) routing number for the account.

This is known by different names in different countries:
* BSB code (Australia)
* routing number (Canada, USA)
* sort code (UK) | +| `iban` | *string* | :heavy_minus_sign: | The international bank account number (IBAN) for the account, if known. | +| `bic` | *string* | :heavy_minus_sign: | The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. | | `maskedAccountNumber` | *string* | :heavy_minus_sign: | A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountidentifiertype.md b/lending/docs/sdk/models/shared/accountidentifiertype.md index 8b742f21d..2068531d0 100644 --- a/lending/docs/sdk/models/shared/accountidentifiertype.md +++ b/lending/docs/sdk/models/shared/accountidentifiertype.md @@ -1,17 +1,17 @@ -# AccountIdentifierType - -Type of account - -## Example Usage - -```typescript -import { AccountIdentifierType } from "@codat/lending/sdk/models/shared"; - -let value: AccountIdentifierType = "Account"; -``` - -## Values - -```typescript -"Account" | "Card" | "Credit" | "Depository" | "Investment" | "Loan" | "Other" +# AccountIdentifierType + +Type of account + +## Example Usage + +```typescript +import { AccountIdentifierType } from "@codat/lending/sdk/models/shared"; + +let value: AccountIdentifierType = "Account"; +``` + +## Values + +```typescript +"Account" | "Card" | "Credit" | "Depository" | "Investment" | "Loan" | "Other" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountinfo.md b/lending/docs/sdk/models/shared/accountinfo.md index 3c1f177b8..93196c7b3 100644 --- a/lending/docs/sdk/models/shared/accountinfo.md +++ b/lending/docs/sdk/models/shared/accountinfo.md @@ -1,20 +1,20 @@ -# AccountInfo - -## Example Usage - -```typescript -import { AccountInfo } from "@codat/lending/sdk/models/shared"; - -let value: AccountInfo = { - accountOpenDate: "2022-10-23", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Description of the account. | | -| `nickname` | *string* | :heavy_minus_sign: | Name given to the account by the user. Used in UIs to assist in account selection. | | -| `accountOpenDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
```
2020-10-08
``` | 2022-10-23 | -| `availableBalance` | *Decimal* | :heavy_minus_sign: | Balance of funds available for use. This includes pending activity. | | \ No newline at end of file +# AccountInfo + +## Example Usage + +```typescript +import { AccountInfo } from "@codat/lending/sdk/models/shared"; + +let value: AccountInfo = { + accountOpenDate: "2022-10-23", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Description of the account. | | +| `nickname` | *string* | :heavy_minus_sign: | Name given to the account by the user. Used in UIs to assist in account selection. | | +| `accountOpenDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
```
2020-10-08
``` | 2022-10-23 | +| `availableBalance` | *Decimal | number* | :heavy_minus_sign: | Balance of funds available for use. This includes pending activity. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingaccount.md b/lending/docs/sdk/models/shared/accountingaccount.md index 08759445c..541c0a0ba 100644 --- a/lending/docs/sdk/models/shared/accountingaccount.md +++ b/lending/docs/sdk/models/shared/accountingaccount.md @@ -1,72 +1,70 @@ -# AccountingAccount - -> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. - -## 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/lending-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. - -## Example Usage - -```typescript -import { AccountingAccount } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingAccount = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", - nominalCode: "610", - name: "Accounts Receivable", - description: - "Invoices the business has issued but has not yet collected payment on.", - fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Cash On Hand", - currency: "GBP", - currentBalance: new Decimal("0"), - type: "Asset", - status: "Active", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company. | 1b6266d1-1e44-46c5-8eb5-a8f98e03124e | -| `nominalCode` | *string* | :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 | -| `name` | *string* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | -| `description` | *string* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | -| `fullyQualifiedCategory` | *string* | :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 | -| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | **Example 1:** Cash On Hand
**Example 2:** Fixed Asset | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currentBalance` | *Decimal* | :heavy_minus_sign: | Current balance in the account. | 0 | -| `type` | [shared.AccountType](../../../sdk/models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | -| `status` | [shared.AccountStatus](../../../sdk/models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | -| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | -| `validDatatypeLinks` | [shared.ValidDataTypeLinks](../../../sdk/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](/lending-api#/schemas/ValidDataTypeLinks). | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +# AccountingAccount + +> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. + +## 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/lending-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. + +## Example Usage + +```typescript +import { AccountingAccount } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAccount = { + nominalCode: "610", + name: "Accounts Receivable", + description: "Invoices the business has issued but has not yet collected payment on.", + fullyQualifiedCategory: "Asset.Current", + fullyQualifiedName: "Cash On Hand", + currency: "GBP", + currentBalance: 0, + type: "Asset", + status: "Active", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `nominalCode` | *string* | :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 | +| `name` | *string* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | +| `description` | *string* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | +| `fullyQualifiedCategory` | *string* | :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 | +| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | **Example 1:** Cash On Hand
**Example 2:** Fixed Asset | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currentBalance` | *Decimal | number* | :heavy_minus_sign: | Current balance in the account. | 0 | +| `type` | [shared.AccountType](../../../sdk/models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | +| `status` | [shared.AccountStatus](../../../sdk/models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | +| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | +| `validDatatypeLinks` | [shared.ValidDataTypeLinks](../../../sdk/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](/lending-api#/schemas/ValidDataTypeLinks). | | +| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company. | 1b6266d1-1e44-46c5-8eb5-a8f98e03124e | | `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingaccounts.md b/lending/docs/sdk/models/shared/accountingaccounts.md index 73f33d090..fae7b60d6 100644 --- a/lending/docs/sdk/models/shared/accountingaccounts.md +++ b/lending/docs/sdk/models/shared/accountingaccounts.md @@ -1,31 +1,23 @@ -# AccountingAccounts - -## Example Usage - -```typescript -import { AccountingAccounts } from "@codat/lending/sdk/models/shared"; - -let value: AccountingAccounts = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingAccount](../../../sdk/models/shared/accountingaccount.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingAccounts + +## Example Usage + +```typescript +import { AccountingAccounts } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAccounts = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingAccount](../../../sdk/models/shared/accountingaccount.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingaccounttransaction.md b/lending/docs/sdk/models/shared/accountingaccounttransaction.md index f009718da..79b86d320 100644 --- a/lending/docs/sdk/models/shared/accountingaccounttransaction.md +++ b/lending/docs/sdk/models/shared/accountingaccounttransaction.md @@ -1,55 +1,48 @@ -# AccountingAccountTransaction - -> **Language tip:** In Codat, account transactions represent all transactions posted to a bank account within an accounting software. For bank transactions posted within a banking platform, refer to [Banking transactions](https://docs.codat.io/lending-api#/operations/list-all-banking-transactions). - -## Overview - -In Codat’s data model, account transactions represent bank activity within an accounting software. 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/lending-api#/schemas/Payment), [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment), [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost), [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome), and [transfers](https://docs.codat.io/lending-api#/schemas/Transfer). - -## Example Usage - -```typescript -import { AccountingAccountTransaction } from "@codat/lending/sdk/models/shared"; - -let value: AccountingAccountTransaction = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - date: "2022-10-23T00:00:00Z", - currency: "GBP", - lines: [ - { - recordRef: { - dataType: "transfers", - }, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier of the direct cost (unique to the company). | | -| `transactionId` | *string* | :heavy_minus_sign: | Identifier of the transaction (unique to the company). | | -| `note` | *string* | :heavy_minus_sign: | Additional information about the account transaction, if available. | | -| `bankAccountRef` | [shared.BankAccountRef](../../../sdk/models/shared/bankaccountref.md) | :heavy_minus_sign: | Links to the Account transactions data type. | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `status` | [shared.AccountingAccountTransactionStatus](../../../sdk/models/shared/accountingaccounttransactionstatus.md) | :heavy_minus_sign: | The status of the account transaction. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lines` | [shared.AccountTransactionLine](../../../sdk/models/shared/accounttransactionline.md)[] | :heavy_minus_sign: | Array of account transaction lines. | | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the account transactions, inclusive of tax. | | +# AccountingAccountTransaction + +> **Language tip:** In Codat, account transactions represent all transactions posted to a bank account within an accounting software. For bank transactions posted within a banking platform, refer to [Banking transactions](https://docs.codat.io/lending-api#/operations/list-all-banking-transactions). + +## Overview + +In Codat’s data model, account transactions represent bank activity within an accounting software. 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/lending-api#/schemas/Payment), [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment), [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost), [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome), and [transfers](https://docs.codat.io/lending-api#/schemas/Transfer). + +## Example Usage + +```typescript +import { AccountingAccountTransaction } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAccountTransaction = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + date: "2022-10-23T00:00:00Z", + currency: "GBP", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier of the direct cost (unique to the company). | | +| `transactionId` | *string* | :heavy_minus_sign: | Identifier of the transaction (unique to the company). | | +| `note` | *string* | :heavy_minus_sign: | Additional information about the account transaction, if available. | | +| `bankAccountRef` | [shared.BankAccountRef](../../../sdk/models/shared/bankaccountref.md) | :heavy_minus_sign: | Links to the Account transactions data type. | | +| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `status` | [shared.AccountingAccountTransactionStatus](../../../sdk/models/shared/accountingaccounttransactionstatus.md) | :heavy_minus_sign: | The status of the account transaction. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `lines` | [shared.AccountTransactionLine](../../../sdk/models/shared/accounttransactionline.md)[] | :heavy_minus_sign: | Array of account transaction lines. | | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of the account transactions, inclusive of tax. | | | `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingaccounttransactions.md b/lending/docs/sdk/models/shared/accountingaccounttransactions.md index f5579ed87..59a9905c1 100644 --- a/lending/docs/sdk/models/shared/accountingaccounttransactions.md +++ b/lending/docs/sdk/models/shared/accountingaccounttransactions.md @@ -1,31 +1,23 @@ -# AccountingAccountTransactions - -## Example Usage - -```typescript -import { AccountingAccountTransactions } from "@codat/lending/sdk/models/shared"; - -let value: AccountingAccountTransactions = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingAccountTransaction](../../../sdk/models/shared/accountingaccounttransaction.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingAccountTransactions + +## Example Usage + +```typescript +import { AccountingAccountTransactions } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAccountTransactions = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingAccountTransaction](../../../sdk/models/shared/accountingaccounttransaction.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingaccounttransactionstatus.md b/lending/docs/sdk/models/shared/accountingaccounttransactionstatus.md index 61c2ee419..65704b03c 100644 --- a/lending/docs/sdk/models/shared/accountingaccounttransactionstatus.md +++ b/lending/docs/sdk/models/shared/accountingaccounttransactionstatus.md @@ -1,17 +1,15 @@ -# AccountingAccountTransactionStatus - -The status of the account transaction. - -## Example Usage - -```typescript -import { AccountingAccountTransactionStatus } from "@codat/lending/sdk/models/shared"; - -let value: AccountingAccountTransactionStatus = "Reconciled"; -``` - -## Values - -```typescript -"Unknown" | "Unreconciled" | "Reconciled" | "Void" +# AccountingAccountTransactionStatus + +## Example Usage + +```typescript +import { AccountingAccountTransactionStatus } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAccountTransactionStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingaddress.md b/lending/docs/sdk/models/shared/accountingaddress.md index 276b6e848..2caf38eba 100644 --- a/lending/docs/sdk/models/shared/accountingaddress.md +++ b/lending/docs/sdk/models/shared/accountingaddress.md @@ -1,23 +1,23 @@ -# AccountingAddress - -## Example Usage - -```typescript -import { AccountingAddress } from "@codat/lending/sdk/models/shared"; - -let value: AccountingAddress = { - type: "Unknown", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `type` | [shared.AccountingAddressType](../../../sdk/models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address | -| `line1` | *string* | :heavy_minus_sign: | Line 1 of the customer address. | -| `line2` | *string* | :heavy_minus_sign: | Line 2 of the customer address. | -| `city` | *string* | :heavy_minus_sign: | City of the customer address. | -| `region` | *string* | :heavy_minus_sign: | Region of the customer address. | -| `country` | *string* | :heavy_minus_sign: | Country of the customer address. | +# AccountingAddress + +## Example Usage + +```typescript +import { AccountingAddress } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAddress = { + type: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `type` | [shared.AccountingAddressType](../../../sdk/models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address | +| `line1` | *string* | :heavy_minus_sign: | Line 1 of the customer address. | +| `line2` | *string* | :heavy_minus_sign: | Line 2 of the customer address. | +| `city` | *string* | :heavy_minus_sign: | City of the customer address. | +| `region` | *string* | :heavy_minus_sign: | Region of the customer address. | +| `country` | *string* | :heavy_minus_sign: | Country of the customer address. | | `postalCode` | *string* | :heavy_minus_sign: | Postal code or zip code. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingaddresstype.md b/lending/docs/sdk/models/shared/accountingaddresstype.md index d0182fbb4..33bdbd108 100644 --- a/lending/docs/sdk/models/shared/accountingaddresstype.md +++ b/lending/docs/sdk/models/shared/accountingaddresstype.md @@ -1,17 +1,17 @@ -# AccountingAddressType - -The type of the address - -## Example Usage - -```typescript -import { AccountingAddressType } from "@codat/lending/sdk/models/shared"; - -let value: AccountingAddressType = "Unknown"; -``` - -## Values - -```typescript -"Unknown" | "Billing" | "Delivery" +# AccountingAddressType + +The type of the address + +## Example Usage + +```typescript +import { AccountingAddressType } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAddressType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Billing" | "Delivery" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingagedcreditorreport.md b/lending/docs/sdk/models/shared/accountingagedcreditorreport.md index fa633e03f..c9ca1a389 100644 --- a/lending/docs/sdk/models/shared/accountingagedcreditorreport.md +++ b/lending/docs/sdk/models/shared/accountingagedcreditorreport.md @@ -1,76 +1,77 @@ -# AccountingAgedCreditorReport - -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 software. 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/lending-api#/schemas/Supplier), [Bills](https://docs.codat.io/lending-api#/schemas/Bill), [Bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote), and [Bill payments](https://docs.codat.io/lending-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**. -4. Select **Aged Creditors**. -5. _(Optional)_ Edit the default reporting parameters. - a. You can change the report date in the **Date** box. By default, the report includes transactions that occurred up to, but not including, today's date. To include transactions for today, enter tomorrow's date. - b. In the **Period Length Days** box, select the default period length for each column (the default is 30 days). - 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. - -## Example Usage - -```typescript -import { AccountingAgedCreditorReport } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingAgedCreditorReport = { - generated: "2022-10-23T00:00:00Z", - reportDate: "2022-10-23T00:00:00Z", - data: [ - { - agedCurrencyOutstanding: [ - { - currency: "GBP", - agedOutstandingAmounts: [ - { - fromDate: "2022-10-01T00:00:00Z", - toDate: "2022-10-31T00:00:00Z", - amount: new Decimal("1547.5"), - details: [ - { - name: "Bills", - amount: new Decimal("1547.5"), - }, - ], - }, - ], - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `generated` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `reportDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# AccountingAgedCreditorReport + +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 software. 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/lending-api#/schemas/Supplier), [Bills](https://docs.codat.io/lending-api#/schemas/Bill), [Bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote), and [Bill payments](https://docs.codat.io/lending-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**. +4. Select **Aged Creditors**. +5. _(Optional)_ Edit the default reporting parameters. + a. You can change the report date in the **Date** box. By default, the report includes transactions that occurred up to, but not including, today's date. To include transactions for today, enter tomorrow's date. + b. In the **Period Length Days** box, select the default period length for each column (the default is 30 days). + 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. + +## Example Usage + +```typescript +import { AccountingAgedCreditorReport } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAgedCreditorReport = { + generated: "2022-10-23T00:00:00Z", + reportDate: "2022-10-23T00:00:00Z", + data: [ + { + agedCurrencyOutstanding: [ + { + currency: "GBP", + agedOutstandingAmounts: [ + { + fromDate: "2022-10-01T00:00:00Z", + toDate: "2022-10-31T00:00:00Z", + amount: 1547.5, + details: [ + { + name: "Bills", + amount: 1547.5, + }, + ], + }, + ], + }, + ], + customerId: "f594cefb-7750-4c3a-bab2-b5322026dee9", + customerName: "John Doe", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `generated` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `reportDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `data` | [shared.AgedCreditor](../../../sdk/models/shared/agedcreditor.md)[] | :heavy_minus_sign: | Array of aged creditor. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingageddebtorreport.md b/lending/docs/sdk/models/shared/accountingageddebtorreport.md index c5a757506..a4b9b70ba 100644 --- a/lending/docs/sdk/models/shared/accountingageddebtorreport.md +++ b/lending/docs/sdk/models/shared/accountingageddebtorreport.md @@ -1,78 +1,77 @@ -# AccountingAgedDebtorReport - -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 software. 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/lending-api#/schemas/Customer), [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice), [Credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote), and [Payments](https://docs.codat.io/lending-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**. -4. Select **Aged Debtors**. -5. _(Optional)_ Edit the default reporting parameters. - a. You can change the report date in the **Date** box. By default, the report includes transactions that occurred up to, but not including, today's date. To include transactions for today, enter tomorrow's date. - b. In the **Period Length Days** box, select the default period length for each column (the default is 30 days). - 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. - -## Example Usage - -```typescript -import { AccountingAgedDebtorReport } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingAgedDebtorReport = { - generated: "2022-10-23T00:00:00Z", - reportDate: "2022-10-23T00:00:00Z", - data: [ - { - customerId: "f594cefb-7750-4c3a-bab2-b5322026dee9", - customerName: "John Doe", - agedCurrencyOutstanding: [ - { - currency: "GBP", - agedOutstandingAmounts: [ - { - fromDate: "2022-10-01T00:00:00Z", - toDate: "2022-10-31T00:00:00Z", - amount: new Decimal("1547.5"), - details: [ - { - name: "Invoices", - amount: new Decimal("1547.5"), - }, - ], - }, - ], - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `generated` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `reportDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# AccountingAgedDebtorReport + +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 software. 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/lending-api#/schemas/Customer), [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice), [Credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote), and [Payments](https://docs.codat.io/lending-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**. +4. Select **Aged Debtors**. +5. _(Optional)_ Edit the default reporting parameters. + a. You can change the report date in the **Date** box. By default, the report includes transactions that occurred up to, but not including, today's date. To include transactions for today, enter tomorrow's date. + b. In the **Period Length Days** box, select the default period length for each column (the default is 30 days). + 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. + +## Example Usage + +```typescript +import { AccountingAgedDebtorReport } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAgedDebtorReport = { + generated: "2022-10-23T00:00:00Z", + reportDate: "2022-10-23T00:00:00Z", + data: [ + { + customerId: "f594cefb-7750-4c3a-bab2-b5322026dee9", + customerName: "John Doe", + agedCurrencyOutstanding: [ + { + currency: "GBP", + agedOutstandingAmounts: [ + { + fromDate: "2022-10-01T00:00:00Z", + toDate: "2022-10-31T00:00:00Z", + amount: 1547.5, + details: [ + { + name: "Invoices", + amount: 1547.5, + }, + ], + }, + ], + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `generated` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `reportDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `data` | [shared.AgedDebtor](../../../sdk/models/shared/ageddebtor.md)[] | :heavy_minus_sign: | Array of aged debtors. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingattachment.md b/lending/docs/sdk/models/shared/accountingattachment.md index 09977874a..ccbe2c052 100644 --- a/lending/docs/sdk/models/shared/accountingattachment.md +++ b/lending/docs/sdk/models/shared/accountingattachment.md @@ -1,44 +1,44 @@ -# AccountingAttachment - -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](https://docs.codat.io/knowledge-base/advanced-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 | -| Dynamics 365 Business Central | 350 MB | Dynamics do not explicitly outline which file types are supported but they do state here that "You can attach any type of file, such as text, image, or video files". | - - -## Example Usage - -```typescript -import { AccountingAttachment } from "@codat/lending/sdk/models/shared"; - -let value: AccountingAttachment = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - dateCreated: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the attachment, unique for the company in the accounting software. | | -| `name` | *string* | :heavy_minus_sign: | Name of the attachment file. | | -| `contentType` | *string* | :heavy_minus_sign: | 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. | | -| `dateCreated` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `fileSize` | *number* | :heavy_minus_sign: | File size in bytes. For example, if this reads **46153**, then the file size is 46kb. | | +# AccountingAttachment + +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](https://docs.codat.io/knowledge-base/advanced-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 | +| Dynamics 365 Business Central | 350 MB | Dynamics do not explicitly outline which file types are supported but they do state here that "You can attach any type of file, such as text, image, or video files". | + + +## Example Usage + +```typescript +import { AccountingAttachment } from "@codat/lending/sdk/models/shared"; + +let value: AccountingAttachment = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + dateCreated: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the attachment, unique for the company in the accounting software. | | +| `name` | *string* | :heavy_minus_sign: | Name of the attachment file. | | +| `contentType` | *string* | :heavy_minus_sign: | 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. | | +| `dateCreated` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `fileSize` | *number* | :heavy_minus_sign: | File size in bytes. For example, if this reads **46153**, then the file size is 46kb. | | | `includeWhenSent` | *boolean* | :heavy_minus_sign: | If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbalancesheet.md b/lending/docs/sdk/models/shared/accountingbalancesheet.md index a4b3234ea..130d6106d 100644 --- a/lending/docs/sdk/models/shared/accountingbalancesheet.md +++ b/lending/docs/sdk/models/shared/accountingbalancesheet.md @@ -1,46 +1,147 @@ -# AccountingBalanceSheet - -## 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 software. - -**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/lending-api#/operations/update-sync-settings). - -**Want to pull this in a standardised structure?** -Our [Enhanced Financials](https://docs.codat.io/lending/features/financial-statements-overview) endpoints provide the same report under standardized headings, allowing you to pull it in the same format for all of your business customers. - -## Example Usage - -```typescript -import { AccountingBalanceSheet } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingBalanceSheet = { - currency: "GBP", - reports: [ - { - date: "2022-10-23T00:00:00Z", - netAssets: new Decimal("5605.44"), - }, - ], - mostRecentAvailableMonth: "2022-10-23T00:00:00Z", - earliestAvailableMonth: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `reports` | [shared.BalanceSheet](../../../sdk/models/shared/balancesheet.md)[] | :heavy_check_mark: | An array of balance sheet reports. | | -| `mostRecentAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# AccountingBalanceSheet + +## 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 software. + +**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/lending-api#/operations/update-sync-settings). + +**Want to pull this in a standardised structure?** +Our [Enhanced Financials](https://docs.codat.io/lending/features/financial-statements-overview) endpoints provide the same report under standardized headings, allowing you to pull it in the same format for all of your business customers. + +## Example Usage + +```typescript +import { AccountingBalanceSheet } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBalanceSheet = { + currency: "GBP", + reports: [ + { + date: "2022-10-23T00:00:00Z", + assets: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + liabilities: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + netAssets: 0, + equity: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + }, + ], + mostRecentAvailableMonth: "2022-10-23T00:00:00Z", + earliestAvailableMonth: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `reports` | [shared.BalanceSheet](../../../sdk/models/shared/balancesheet.md)[] | :heavy_check_mark: | An array of balance sheet reports. | | +| `mostRecentAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `earliestAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbankaccount.md b/lending/docs/sdk/models/shared/accountingbankaccount.md index edb8baddb..47249b571 100644 --- a/lending/docs/sdk/models/shared/accountingbankaccount.md +++ b/lending/docs/sdk/models/shared/accountingbankaccount.md @@ -1,51 +1,51 @@ -# AccountingBankAccount - -> **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 [Banking: Account](https://docs.codat.io/lending-api#/schemas/Account) data type. - -## 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 software. -* The currency and balance of the account. -* The sort code and account number. - -## Example Usage - -```typescript -import { AccountingBankAccount } from "@codat/lending/sdk/models/shared"; - -let value: AccountingBankAccount = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - currency: "GBP", - status: "Active", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | | -| `accountName` | *string* | :heavy_minus_sign: | Name of the bank account in the accounting software. | | -| `accountType` | [shared.AccountingBankAccountType](../../../sdk/models/shared/accountingbankaccounttype.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. | | -| `nominalCode` | *string* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | | -| `sortCode` | *string* | :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. | | -| `accountNumber` | *string* | :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. | | -| `iBan` | *string* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `balance` | *Decimal* | :heavy_minus_sign: | Balance of the bank account. | | -| `institution` | *string* | :heavy_minus_sign: | The institution of the bank account. | | -| `availableBalance` | *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. | | -| `overdraftLimit` | *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`. | | -| `status` | [shared.BankAccountStatus](../../../sdk/models/shared/bankaccountstatus.md) | :heavy_minus_sign: | Status of the bank account. | Active | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingBankAccount + +> **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 [Banking: Account](https://docs.codat.io/lending-api#/schemas/Account) data type. + +## 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 software. +* The currency and balance of the account. +* The sort code and account number. + +## Example Usage + +```typescript +import { AccountingBankAccount } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBankAccount = { + currency: "GBP", + status: "Active", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accountName` | *string* | :heavy_minus_sign: | Name of the bank account in the accounting software. | | +| `accountType` | [shared.AccountingBankAccountType](../../../sdk/models/shared/accountingbankaccounttype.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. | | +| `nominalCode` | *string* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | | +| `sortCode` | *string* | :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. | | +| `accountNumber` | *string* | :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. | | +| `iBan` | *string* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `balance` | *Decimal | number* | :heavy_minus_sign: | Balance of the bank account. | | +| `institution` | *string* | :heavy_minus_sign: | The institution of the bank account. | | +| `availableBalance` | *Decimal | number* | :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. | | +| `overdraftLimit` | *Decimal | number* | :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`. | | +| `status` | [shared.BankAccountStatus](../../../sdk/models/shared/bankaccountstatus.md) | :heavy_minus_sign: | Status of the bank account. | Active | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbankaccounts.md b/lending/docs/sdk/models/shared/accountingbankaccounts.md index 424d485c7..67e94e874 100644 --- a/lending/docs/sdk/models/shared/accountingbankaccounts.md +++ b/lending/docs/sdk/models/shared/accountingbankaccounts.md @@ -1,31 +1,23 @@ -# AccountingBankAccounts - -## Example Usage - -```typescript -import { AccountingBankAccounts } from "@codat/lending/sdk/models/shared"; - -let value: AccountingBankAccounts = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingBankAccount](../../../sdk/models/shared/accountingbankaccount.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingBankAccounts + +## Example Usage + +```typescript +import { AccountingBankAccounts } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBankAccounts = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingBankAccount](../../../sdk/models/shared/accountingbankaccount.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbankaccounttype.md b/lending/docs/sdk/models/shared/accountingbankaccounttype.md index 6218a5522..0d660ba4c 100644 --- a/lending/docs/sdk/models/shared/accountingbankaccounttype.md +++ b/lending/docs/sdk/models/shared/accountingbankaccounttype.md @@ -1,19 +1,19 @@ -# AccountingBankAccountType - -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. - -## Example Usage - -```typescript -import { AccountingBankAccountType } from "@codat/lending/sdk/models/shared"; - -let value: AccountingBankAccountType = "Debit"; -``` - -## Values - -```typescript -"Unknown" | "Credit" | "Debit" +# AccountingBankAccountType + +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. + +## Example Usage + +```typescript +import { AccountingBankAccountType } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBankAccountType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Credit" | "Debit" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbanktransaction.md b/lending/docs/sdk/models/shared/accountingbanktransaction.md index 405d5fefa..096fcf214 100644 --- a/lending/docs/sdk/models/shared/accountingbanktransaction.md +++ b/lending/docs/sdk/models/shared/accountingbanktransaction.md @@ -1,43 +1,43 @@ -# AccountingBankTransaction - -> **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 [Banking: Transaction](https://docs.codat.io/lending-api#/operations/list-transactions) data type. - -## 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. - -## Example Usage - -```typescript -import { AccountingBankTransaction } from "@codat/lending/sdk/models/shared"; - -let value: AccountingBankTransaction = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - clearedOnDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the bank transaction, unique to the company in the accounting software. | | -| `accountId` | *string* | :heavy_minus_sign: | Unique identifier to the `accountId` the bank transactions originates from. | | -| `clearedOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `description` | *string* | :heavy_minus_sign: | Description of the bank transaction. | | -| `reconciled` | *boolean* | :heavy_minus_sign: | `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. | | -| `amount` | *Decimal* | :heavy_minus_sign: | The amount transacted in the bank transaction. | | -| `balance` | *Decimal* | :heavy_minus_sign: | The remaining balance in the account with ID `accountId`. | | +# AccountingBankTransaction + +> **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 [Banking: Transaction](https://docs.codat.io/lending-api#/operations/list-transactions) data type. + +## 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. + +## Example Usage + +```typescript +import { AccountingBankTransaction } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBankTransaction = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + clearedOnDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bank transaction, unique to the company in the accounting software. | | +| `accountId` | *string* | :heavy_minus_sign: | Unique identifier to the `accountId` the bank transactions originates from. | | +| `clearedOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `description` | *string* | :heavy_minus_sign: | Description of the bank transaction. | | +| `reconciled` | *boolean* | :heavy_minus_sign: | `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. | | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The amount transacted in the bank transaction. | | +| `balance` | *Decimal | number* | :heavy_minus_sign: | The remaining balance in the account with ID `accountId`. | | | `transactionType` | [shared.BankTransactionType](../../../sdk/models/shared/banktransactiontype.md) | :heavy_minus_sign: | Type of transaction for the bank statement line. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbanktransactions.md b/lending/docs/sdk/models/shared/accountingbanktransactions.md index a12e4e458..a8bf367ce 100644 --- a/lending/docs/sdk/models/shared/accountingbanktransactions.md +++ b/lending/docs/sdk/models/shared/accountingbanktransactions.md @@ -1,31 +1,23 @@ -# AccountingBankTransactions - -## Example Usage - -```typescript -import { AccountingBankTransactions } from "@codat/lending/sdk/models/shared"; - -let value: AccountingBankTransactions = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingBankTransaction](../../../sdk/models/shared/accountingbanktransaction.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingBankTransactions + +## Example Usage + +```typescript +import { AccountingBankTransactions } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBankTransactions = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingBankTransaction](../../../sdk/models/shared/accountingbanktransaction.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbill.md b/lending/docs/sdk/models/shared/accountingbill.md index c70454a3c..9c5fcd72f 100644 --- a/lending/docs/sdk/models/shared/accountingbill.md +++ b/lending/docs/sdk/models/shared/accountingbill.md @@ -1,78 +1,63 @@ -# AccountingBill - -> **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/lending-api#/schemas/Invoice) for the accounts receivable equivalent of bills. - -## 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 software 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/lending-api#/schemas/DirectCost) data model. - -## Example Usage - -```typescript -import { AccountingBill } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingBill = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - issueDate: "2022-10-23T00:00:00Z", - dueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: null, - status: "Void", - subTotal: new Decimal("3807.61"), - taxAmount: new Decimal("8805.36"), - totalAmount: new Decimal("1481.32"), - paymentAllocations: [ - { - payment: { - accountRef: {}, - currency: "GBP", - paidOnDate: "2022-10-23T00:00:00Z", - }, - allocation: { - currency: "GBP", - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the bill, unique for the company in the accounting software. | | -| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the bill. | | -| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | -| `purchaseOrderRefs` | [shared.PurchaseOrderReference](../../../sdk/models/shared/purchaseorderreference.md)[] | :heavy_minus_sign: | N/A | | -| `issueDate` | *string* | :heavy_check_mark: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `dueDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lineItems` | [shared.BillLineItem](../../../sdk/models/shared/billlineitem.md)[] | :heavy_minus_sign: | Array of Bill line items. | | -| `withholdingTax` | [shared.WithholdingTax](../../../sdk/models/shared/withholdingtax.md)[] | :heavy_minus_sign: | N/A | | -| `status` | [shared.BillStatus](../../../sdk/models/shared/billstatus.md) | :heavy_check_mark: | Current state of the bill. | | -| `subTotal` | *Decimal* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | | -| `taxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax on the bill. | | -| `totalAmount` | *Decimal* | :heavy_check_mark: | Amount of the bill, including tax. | | -| `amountDue` | *Decimal* | :heavy_minus_sign: | Amount outstanding on the bill. | | -| `note` | *string* | :heavy_minus_sign: | Any private, company notes about the bill, such as payment information. | | -| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingBill + +> **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/lending-api#/schemas/Invoice) for the accounts receivable equivalent of bills. + +## 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 software 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/lending-api#/schemas/DirectCost) data model. + +## Example Usage + +```typescript +import { AccountingBill } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBill = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "string", + subTotal: 0, + taxAmount: 0, + totalAmount: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill, unique for the company in the accounting software. | | +| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the bill. | | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | +| `purchaseOrderRefs` | [shared.PurchaseOrderReference](../../../sdk/models/shared/purchaseorderreference.md)[] | :heavy_minus_sign: | N/A | | +| `issueDate` | *string* | :heavy_check_mark: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `dueDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `lineItems` | [shared.BillLineItem](../../../sdk/models/shared/billlineitem.md)[] | :heavy_minus_sign: | Array of Bill line items. | | +| `withholdingTax` | [shared.WithholdingTax](../../../sdk/models/shared/withholdingtax.md)[] | :heavy_minus_sign: | N/A | | +| `status` | [shared.BillStatus](../../../sdk/models/shared/billstatus.md) | :heavy_check_mark: | Current state of the bill. | | +| `subTotal` | *Decimal | number* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | | +| `taxAmount` | *Decimal | number* | :heavy_check_mark: | Amount of tax on the bill. | | +| `totalAmount` | *Decimal | number* | :heavy_check_mark: | Amount of the bill, including tax. | | +| `amountDue` | *Decimal | number* | :heavy_minus_sign: | Amount outstanding on the bill. | | +| `note` | *string* | :heavy_minus_sign: | Any private, company notes about the bill, such as payment information. | | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbillcreditnote.md b/lending/docs/sdk/models/shared/accountingbillcreditnote.md index 469e4bfcc..d6c428bfe 100644 --- a/lending/docs/sdk/models/shared/accountingbillcreditnote.md +++ b/lending/docs/sdk/models/shared/accountingbillcreditnote.md @@ -1,155 +1,156 @@ -# AccountingBillCreditNote - -> **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/lending-api#/schemas/CreditNote). - -## 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/lending-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/lending-api#/schemas/Bill). -* The supplier that issued the bill credit note. - -## Example Usage - -```typescript -import { AccountingBillCreditNote } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingBillCreditNote = { - id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", - billCreditNoteNumber: "14763237", - supplierRef: { - id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", - supplierName: "Chin's Gas and Oil", - }, - totalAmount: new Decimal("693"), - totalDiscount: new Decimal("0"), - subTotal: new Decimal("805.78"), - totalTaxAmount: new Decimal("0"), - discountPercentage: new Decimal("0"), - remainingCredit: new Decimal("693"), - status: "Submitted", - issueDate: "2019-02-18T16:03:07.268Z", - currency: "USD", - lineItems: [ - { - description: "AcmeMagnet", - unitAmount: new Decimal("25"), - quantity: new Decimal("4"), - discountAmount: new Decimal("0"), - subTotal: new Decimal("100"), - taxAmount: new Decimal("10"), - totalAmount: new Decimal("110"), - accountRef: { - id: "3f267b10-757d-44c0-bef9-20f70cc8fbe3", - }, - taxRateRef: { - id: "6c88aff3-7cb9-4980-a3d3-443e72e02498", - }, - itemRef: { - id: "3", - }, - createdFromLineRef: {}, - trackingCategoryRefs: [ - { - id: "department_1", - name: "ACMERockets", - }, - { - id: "costcode_2", - name: "ACM2-ACMESigns", - }, - ], - }, - { - description: "ACMEDisintegratingPistol", - unitAmount: new Decimal("25"), - quantity: new Decimal("3"), - discountAmount: new Decimal("0"), - subTotal: new Decimal("75"), - taxAmount: new Decimal("7.5"), - totalAmount: new Decimal("82.5"), - accountRef: { - id: "3f267b10-757d-44c0-bef9-20f70cc8fbe3", - }, - taxRateRef: { - id: "6c88aff3-7cb9-4980-a3d3-443e72e02498", - }, - itemRef: { - id: "3abf0883-03f7-44c6-bc15-1372522d25e1", - }, - }, - { - description: "ACMEWhippedCreamDispenser", - unitAmount: new Decimal("52"), - quantity: new Decimal("6"), - discountAmount: new Decimal("0"), - subTotal: new Decimal("312"), - taxAmount: new Decimal("31.2"), - totalAmount: new Decimal("343.2"), - accountRef: { - id: "3f267b10-757d-44c0-bef9-20f70cc8fbe3", - }, - taxRateRef: { - id: "6c88aff3-7cb9-4980-a3d3-443e72e02498", - }, - itemRef: { - id: "3691f3d9-0ff7-4358-8a93-bed31c1b4b03", - }, - }, - { - description: "ACMEJetPropelledPogoStick", - unitAmount: new Decimal("130"), - quantity: new Decimal("1"), - discountAmount: new Decimal("0"), - subTotal: new Decimal("130"), - taxAmount: new Decimal("27.3"), - totalAmount: new Decimal("157.3"), - accountRef: { - id: "3f267b10-757d-44c0-bef9-20f70cc8fbe3", - }, - taxRateRef: { - id: "d606732b-db18-44d7-823b-7f15f42c32ea", - }, - itemRef: { - id: "075410d4-7edc-4936-ba52-9e1e43cbe300", - }, - }, - ], - note: "Track separately", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the bill credit note that is unique to a company in the accounting software. | 1509398f-98e2-436d-8a5d-c042e0c74ffc | -| `billCreditNoteNumber` | *string* | :heavy_minus_sign: | Friendly reference for the bill credit note. | 91fe2a83-e161-4c21-929d-c5c10c4b07e5 | -| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | -| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | -| `totalAmount` | *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 | -| `totalDiscount` | *Decimal* | :heavy_check_mark: | Total value of any discounts applied. | 0 | -| `subTotal` | *Decimal* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 | -| `totalTaxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 | -| `discountPercentage` | *Decimal* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 | -| `remainingCredit` | *Decimal* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 | -| `status` | [shared.BillCreditNoteStatus](../../../sdk/models/shared/billcreditnotestatus.md) | :heavy_check_mark: | Current state of the bill credit note | Paid | -| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `allocatedOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lineItems` | [shared.BillCreditNoteLineItem](../../../sdk/models/shared/billcreditnotelineitem.md)[] | :heavy_minus_sign: | An array of line | | -| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | -| `createdFromRefs` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.md)[] | :heavy_minus_sign: | An array of records the credit note was created from. | | -| `note` | *string* | :heavy_minus_sign: | Any additional information about the bill credit note. | Bill Credit Note with 1 line items, totaling 805.78 | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +# AccountingBillCreditNote + +> **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/lending-api#/schemas/CreditNote). + +## 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/lending-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/lending-api#/schemas/Bill). +* The supplier that issued the bill credit note. + +## Example Usage + +```typescript +import { AccountingBillCreditNote } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBillCreditNote = { + id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", + billCreditNoteNumber: "14763237", + supplierRef: { + id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", + supplierName: "Chin's Gas and Oil", + }, + totalAmount: 693, + remainingCredit: 693, + status: "Submitted", + issueDate: "2019-02-18T16:03:07.268Z", + currency: "USD", + lineItems: [ + { + description: "AcmeMagnet", + unitAmount: 25, + quantity: 4, + discountAmount: 0, + subTotal: 100, + taxAmount: 10, + totalAmount: 110, + accountRef: { + id: "3f267b10-757d-44c0-bef9-20f70cc8fbe3", + }, + taxRateRef: { + id: "6c88aff3-7cb9-4980-a3d3-443e72e02498", + }, + itemRef: { + id: "3", + }, + createdFromLineRef: [ + { + id: "8462", + dataType: "bill", + lineNumber: 1, + }, + ], + trackingCategoryRefs: [ + { + id: "department_1", + name: "ACMERockets", + }, + { + id: "costcode_2", + name: "ACM2-ACMESigns", + }, + ], + }, + { + description: "ACMEDisintegratingPistol", + unitAmount: 25, + quantity: 3, + discountAmount: 0, + subTotal: 75, + taxAmount: 7.5, + totalAmount: 82.5, + accountRef: { + id: "3f267b10-757d-44c0-bef9-20f70cc8fbe3", + }, + taxRateRef: { + id: "6c88aff3-7cb9-4980-a3d3-443e72e02498", + }, + itemRef: { + id: "3abf0883-03f7-44c6-bc15-1372522d25e1", + }, + }, + { + description: "ACMEWhippedCreamDispenser", + unitAmount: 52, + quantity: 6, + discountAmount: 0, + subTotal: 312, + taxAmount: 31.2, + totalAmount: 343.2, + accountRef: { + id: "3f267b10-757d-44c0-bef9-20f70cc8fbe3", + }, + taxRateRef: { + id: "6c88aff3-7cb9-4980-a3d3-443e72e02498", + }, + itemRef: { + id: "3691f3d9-0ff7-4358-8a93-bed31c1b4b03", + }, + }, + { + description: "ACMEJetPropelledPogoStick", + unitAmount: 130, + quantity: 1, + discountAmount: 0, + subTotal: 130, + taxAmount: 27.3, + totalAmount: 157.3, + accountRef: { + id: "3f267b10-757d-44c0-bef9-20f70cc8fbe3", + }, + taxRateRef: { + id: "d606732b-db18-44d7-823b-7f15f42c32ea", + }, + itemRef: { + id: "075410d4-7edc-4936-ba52-9e1e43cbe300", + }, + }, + ], + note: "Track separately", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill credit note that is unique to a company in the accounting software. | 1509398f-98e2-436d-8a5d-c042e0c74ffc | +| `billCreditNoteNumber` | *string* | :heavy_minus_sign: | Friendly reference for the bill credit note. | 91fe2a83-e161-4c21-929d-c5c10c4b07e5 | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | +| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | +| `totalAmount` | *Decimal | number* | :heavy_check_mark: | Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. | 805.78 | +| `totalDiscount` | *Decimal | number* | :heavy_check_mark: | Total value of any discounts applied. | 0 | +| `subTotal` | *Decimal | number* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 | +| `totalTaxAmount` | *Decimal | number* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 | +| `discountPercentage` | *Decimal | number* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 | +| `remainingCredit` | *Decimal | number* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 | +| `status` | [shared.BillCreditNoteStatus](../../../sdk/models/shared/billcreditnotestatus.md) | :heavy_check_mark: | Current state of the bill credit note | Paid | +| `issueDate` | *string* | :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-03-15T00:00:00 | +| `allocatedOnDate` | *string* | :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-09-15T16:35:00 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `lineItems` | [shared.BillCreditNoteLineItem](../../../sdk/models/shared/billcreditnotelineitem.md)[] | :heavy_minus_sign: | An array of line | | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `createdFromRefs` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.md)[] | :heavy_minus_sign: | An array of records the credit note was created from. | | +| `note` | *string* | :heavy_minus_sign: | Any additional information about the bill credit note. | Bill Credit Note with 1 line items, totaling 805.78 | +| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbillcreditnotes.md b/lending/docs/sdk/models/shared/accountingbillcreditnotes.md index 776052a96..9ca39aede 100644 --- a/lending/docs/sdk/models/shared/accountingbillcreditnotes.md +++ b/lending/docs/sdk/models/shared/accountingbillcreditnotes.md @@ -1,31 +1,23 @@ -# AccountingBillCreditNotes - -## Example Usage - -```typescript -import { AccountingBillCreditNotes } from "@codat/lending/sdk/models/shared"; - -let value: AccountingBillCreditNotes = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingBillCreditNote](../../../sdk/models/shared/accountingbillcreditnote.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingBillCreditNotes + +## Example Usage + +```typescript +import { AccountingBillCreditNotes } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBillCreditNotes = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingBillCreditNote](../../../sdk/models/shared/accountingbillcreditnote.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbillpayment.md b/lending/docs/sdk/models/shared/accountingbillpayment.md index 25f3f434a..1325277b2 100644 --- a/lending/docs/sdk/models/shared/accountingbillpayment.md +++ b/lending/docs/sdk/models/shared/accountingbillpayment.md @@ -1,195 +1,193 @@ -# AccountingBillPayment - -> **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/lending-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote). - -## Overview - -Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/lending-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/lending-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 software, 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 software 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/lending-api#/schemas/DirectCost) data model. - -Bill payments is a child data type of [account transactions](https://docs.codat.io/lending-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 software 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. - - -## Example Usage - -```typescript -import { AccountingBillPayment } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingBillPayment = { - totalAmount: new Decimal("1000"), - date: "2022-10-23T00:00:00Z", - lines: [ - { - amount: new Decimal("1000"), - links: [ - { - type: "Bill", - id: "x", - amount: new Decimal("-1000"), - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the bill payment, unique for the company in the accounting software. | 3d5a8e00-d108-4045-8823-7f342676cffa | -| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | N/A | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `totalAmount` | *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 | -| `currency` | *string* | :heavy_minus_sign: | N/A | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `date` | *string* | :heavy_check_mark: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `note` | *string* | :heavy_minus_sign: | Additional information associated with the payment. | Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44 | -| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | N/A | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | -| `lines` | [shared.BillPaymentLine](../../../sdk/models/shared/billpaymentline.md)[] | :heavy_minus_sign: | An array of bill payment lines. | | -| `reference` | *string* | :heavy_minus_sign: | Additional information associated with the payment. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingBillPayment + +> **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/lending-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote). + +## Overview + +Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/lending-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/lending-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 software, 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 software 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/lending-api#/schemas/DirectCost) data model. + +Bill payments is a child data type of [account transactions](https://docs.codat.io/lending-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 software 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. + + +## Example Usage + +```typescript +import { AccountingBillPayment } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBillPayment = { + totalAmount: 1000, + lines: [ + { + amount: 1000, + links: [ + { + type: "Bill", + id: "x", + amount: -1000, + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill payment, unique for the company in the accounting software. | 3d5a8e00-d108-4045-8823-7f342676cffa | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | N/A | | +| `accountRef` | [shared.AccountRef](../../../sdk/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. | | +| `totalAmount` | *Decimal | number* | :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 | +| `currency` | *string* | :heavy_minus_sign: | N/A | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `date` | *string* | :heavy_check_mark: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `note` | *string* | :heavy_minus_sign: | Additional information associated with the payment. | Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44 | +| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | N/A | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | +| `lines` | [shared.BillPaymentLine](../../../sdk/models/shared/billpaymentline.md)[] | :heavy_minus_sign: | An array of bill payment lines. | | +| `reference` | *string* | :heavy_minus_sign: | Additional information associated with the payment. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbillpayments.md b/lending/docs/sdk/models/shared/accountingbillpayments.md index fb0f9bb2a..86ed6c66a 100644 --- a/lending/docs/sdk/models/shared/accountingbillpayments.md +++ b/lending/docs/sdk/models/shared/accountingbillpayments.md @@ -1,31 +1,23 @@ -# AccountingBillPayments - -## Example Usage - -```typescript -import { AccountingBillPayments } from "@codat/lending/sdk/models/shared"; - -let value: AccountingBillPayments = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingBillPayment](../../../sdk/models/shared/accountingbillpayment.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingBillPayments + +## Example Usage + +```typescript +import { AccountingBillPayments } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBillPayments = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingBillPayment](../../../sdk/models/shared/accountingbillpayment.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingbills.md b/lending/docs/sdk/models/shared/accountingbills.md index 00ac15f82..b1b9c91d9 100644 --- a/lending/docs/sdk/models/shared/accountingbills.md +++ b/lending/docs/sdk/models/shared/accountingbills.md @@ -1,31 +1,23 @@ -# AccountingBills - -## Example Usage - -```typescript -import { AccountingBills } from "@codat/lending/sdk/models/shared"; - -let value: AccountingBills = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingBill](../../../sdk/models/shared/accountingbill.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingBills + +## Example Usage + +```typescript +import { AccountingBills } from "@codat/lending/sdk/models/shared"; + +let value: AccountingBills = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingBill](../../../sdk/models/shared/accountingbill.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcashflowstatement.md b/lending/docs/sdk/models/shared/accountingcashflowstatement.md index 43d19a5c1..207106f39 100644 --- a/lending/docs/sdk/models/shared/accountingcashflowstatement.md +++ b/lending/docs/sdk/models/shared/accountingcashflowstatement.md @@ -1,39 +1,112 @@ -# AccountingCashFlowStatement - -> **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. - -## Example Usage - -```typescript -import { AccountingCashFlowStatement } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCashFlowStatement = { - reports: [], - reportBasis: "Cash", - reportInput: "Unknown", - currency: "GBP", - mostRecentAvailableMonth: "2022-10-23T00:00:00Z", - earliestAvailableMonth: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `reports` | [shared.CashFlowStatement](../../../sdk/models/shared/cashflowstatement.md)[] | :heavy_check_mark: | Array of cash flow statements. | | -| `reportBasis` | [shared.ReportBasis](../../../sdk/models/shared/reportbasis.md) | :heavy_check_mark: | Accounting method used when aggregating the report data. In this case, `Cash`. | | -| `reportInput` | [shared.ReportInput](../../../sdk/models/shared/reportinput.md) | :heavy_check_mark: | Accounting method used to prepare the cash flow statement. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `mostRecentAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# AccountingCashFlowStatement + +> **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. + +## Example Usage + +```typescript +import { AccountingCashFlowStatement } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCashFlowStatement = { + reports: [ + { + fromDate: "2022-10-23T00:00:00Z", + toDate: "2022-10-23T00:00:00Z", + cashReceipts: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + cashPayments: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + }, + ], + reportBasis: "string", + reportInput: "string", + currency: "GBP", + mostRecentAvailableMonth: "2022-10-23T00:00:00Z", + earliestAvailableMonth: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `reports` | [shared.CashFlowStatement](../../../sdk/models/shared/cashflowstatement.md)[] | :heavy_check_mark: | Array of cash flow statements. | | +| `reportBasis` | [shared.ReportBasis](../../../sdk/models/shared/reportbasis.md) | :heavy_check_mark: | Accounting method used when aggregating the report data. In this case, `Cash`. | | +| `reportInput` | [shared.ReportInput](../../../sdk/models/shared/reportinput.md) | :heavy_check_mark: | Accounting method used to prepare the cash flow statement. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `mostRecentAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `earliestAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcompanyinfo.md b/lending/docs/sdk/models/shared/accountingcompanyinfo.md index 7934e6fa1..f23b1b629 100644 --- a/lending/docs/sdk/models/shared/accountingcompanyinfo.md +++ b/lending/docs/sdk/models/shared/accountingcompanyinfo.md @@ -1,80 +1,80 @@ -# AccountingCompanyInfo - -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 software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources. - -## Example Usage - -```typescript -import { AccountingCompanyInfo } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCompanyInfo = { - companyName: "ACME Corporation", - accountingPlatformRef: "4444e827-401b-4925-92cb-d79086bf3b6b", - companyLegalName: "ACME Corporation Ltd.", - addresses: [ - { - type: "Billing", - line1: "Warner House", - line2: "98 Theobald's Road", - city: "London", - region: "", - country: "United Kingdom", - }, - { - type: "Unknown", - line1: "123 Sierra Way", - line2: "", - city: "San Pablo", - region: "CA", - country: "", - postalCode: "87999", - }, - ], - phoneNumbers: [ - { - number: "010 1234 5678", - type: "Landline", - }, - ], - webLinks: [ - { - type: "Website", - url: "https://www.wbsl.com/", - }, - ], - ledgerLockDate: "2019-03-04T12:08:01.881Z", - registrationNumber: "1234567890", - taxNumber: "GB 123456789", - financialYearStartDate: "2019-04-01T00:00:00Z", - baseCurrency: "USD", - sourceUrls: { - "url1": - "https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q", - "url2": "https://reporting.xero.com/!rxs0Q", - }, - createdDate: "2020-02-03T16:42:02Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyName` | *string* | :heavy_minus_sign: | Name of the linked company. | | -| `accountingPlatformRef` | *string* | :heavy_minus_sign: | Identifier or reference for the company in the accounting software. | | -| `companyLegalName` | *string* | :heavy_minus_sign: | Registered legal name of the linked company. | | -| `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | | -| `phoneNumbers` | [shared.PhoneNumber](../../../sdk/models/shared/phonenumber.md)[] | :heavy_minus_sign: | An array of phone numbers. | | -| `webLinks` | [shared.WebLink](../../../sdk/models/shared/weblink.md)[] | :heavy_minus_sign: | An array of weblinks. | | -| `ledgerLockDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `registrationNumber` | *string* | :heavy_minus_sign: | Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. | | -| `taxNumber` | *string* | :heavy_minus_sign: | Company tax number. | | -| `financialYearStartDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `baseCurrency` | *string* | :heavy_minus_sign: | Currency set in the accounting software of the linked company. Used by the currency rate. | | -| `sourceUrls` | Record | :heavy_minus_sign: | URL addresses for the accounting source.

For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). | | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# AccountingCompanyInfo + +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 software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources. + +## Example Usage + +```typescript +import { AccountingCompanyInfo } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCompanyInfo = { + companyName: "ACME Corporation", + accountingPlatformRef: "4444e827-401b-4925-92cb-d79086bf3b6b", + companyLegalName: "ACME Corporation Ltd.", + addresses: [ + { + type: "Billing", + line1: "Warner House", + line2: "98 Theobald's Road", + city: "London", + region: "", + country: "United Kingdom", + postalcode: "WC1X 8WB", + }, + { + type: "Unknown", + line1: "123 Sierra Way", + line2: "", + city: "San Pablo", + region: "CA", + country: "", + postalCode: "87999", + }, + ], + phoneNumbers: [ + { + number: "010 1234 5678", + type: "Landline", + }, + ], + webLinks: [ + { + type: "Website", + url: "https://www.wbsl.com/", + }, + ], + ledgerLockDate: "2019-03-04T12:08:01.881Z", + registrationNumber: "1234567890", + taxNumber: "GB 123456789", + financialYearStartDate: "2019-04-01T00:00:00Z", + baseCurrency: "USD", + sourceUrls: { + "url1": "https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q", + "url2": "https://reporting.xero.com/!rxs0Q", + }, + createdDate: "2020-02-03T16:42:02Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyName` | *string* | :heavy_minus_sign: | Name of the linked company. | | +| `accountingPlatformRef` | *string* | :heavy_minus_sign: | Identifier or reference for the company in the accounting software. | | +| `companyLegalName` | *string* | :heavy_minus_sign: | Registered legal name of the linked company. | | +| `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | | +| `phoneNumbers` | [shared.PhoneNumber](../../../sdk/models/shared/phonenumber.md)[] | :heavy_minus_sign: | An array of phone numbers. | | +| `webLinks` | [shared.WebLink](../../../sdk/models/shared/weblink.md)[] | :heavy_minus_sign: | An array of weblinks. | | +| `ledgerLockDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `registrationNumber` | *string* | :heavy_minus_sign: | Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. | | +| `taxNumber` | *string* | :heavy_minus_sign: | Company tax number. | | +| `financialYearStartDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `baseCurrency` | *string* | :heavy_minus_sign: | Currency set in the accounting software of the linked company. Used by the currency rate. | | +| `sourceUrls` | Record | :heavy_minus_sign: | URL addresses for the accounting source.

For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). | | +| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreateaccountresponse.md b/lending/docs/sdk/models/shared/accountingcreateaccountresponse.md index 01dfa82b4..83729db70 100644 --- a/lending/docs/sdk/models/shared/accountingcreateaccountresponse.md +++ b/lending/docs/sdk/models/shared/accountingcreateaccountresponse.md @@ -1,60 +1,37 @@ -# AccountingCreateAccountResponse - -## Example Usage - -```typescript -import { AccountingCreateAccountResponse } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingCreateAccountResponse = { - data: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", - nominalCode: "610", - name: "Accounts Receivable", - description: - "Invoices the business has issued but has not yet collected payment on.", - fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Cash On Hand", - currency: "GBP", - currentBalance: new Decimal("0"), - type: "Asset", - status: "Active", - }, - changes: [ - { - recordRef: { - dataType: "invoices", - }, - }, - ], - dataType: "invoices", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "7ec8b5e7-67a6-48ba-8a7b-51f2b0645a2a", - dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestedOnUtc: "2022-10-23T00:00:00Z", - completedOnUtc: "2022-10-23T00:00:00Z", - status: "TimedOut", - statusCode: 652406, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [shared.AccountingCreateAccountResponseAccountingAccount](../../../sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md) | :heavy_minus_sign: | N/A | | -| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `pushOperationKey` | *string* | :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. | | -| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | -| `validation` | [shared.Validation](../../../sdk/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. | | -| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file +# AccountingCreateAccountResponse + +## Example Usage + +```typescript +import { AccountingCreateAccountResponse } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateAccountResponse = { + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "string", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "string", + statusCode: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :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. | | +| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/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. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | +| `data` | *AccountingCreateAccountResponseAccountingAccount* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md b/lending/docs/sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md index 1a91816cc..1f8782971 100644 --- a/lending/docs/sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md +++ b/lending/docs/sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md @@ -1,74 +1,30 @@ -# ~~AccountingCreateAccountResponseAccountingAccount~~ - -> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. - -## 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/lending-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. - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -## Example Usage - -```typescript -import { AccountingCreateAccountResponseAccountingAccount } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingCreateAccountResponseAccountingAccount = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", - nominalCode: "610", - name: "Accounts Receivable", - description: - "Invoices the business has issued but has not yet collected payment on.", - fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Cash On Hand", - currency: "GBP", - currentBalance: new Decimal("0"), - type: "Asset", - status: "Active", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company. | 1b6266d1-1e44-46c5-8eb5-a8f98e03124e | -| `nominalCode` | *string* | :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 | -| `name` | *string* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | -| `description` | *string* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | -| `fullyQualifiedCategory` | *string* | :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 | -| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | **Example 1:** Cash On Hand
**Example 2:** Fixed Asset | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currentBalance` | *Decimal* | :heavy_minus_sign: | Current balance in the account. | 0 | -| `type` | [shared.AccountType](../../../sdk/models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | -| `status` | [shared.AccountStatus](../../../sdk/models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | -| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | -| `validDatatypeLinks` | [shared.AccountingCreateAccountResponseValidDataTypeLinks](../../../sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.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](/lending-api#/schemas/ValidDataTypeLinks). | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# AccountingCreateAccountResponseAccountingAccount + +## Example Usage + +```typescript +import { AccountingCreateAccountResponseAccountingAccount } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateAccountResponseAccountingAccount = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `nominalCode` | *string* | :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. | +| `name` | *string* | :heavy_minus_sign: | Name of the account. | +| `description` | *string* | :heavy_minus_sign: | Description for the account. | +| `fullyQualifiedCategory` | *string* | :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. | +| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | +| `currency` | *string* | :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. | +| `currentBalance` | *Decimal | number* | :heavy_minus_sign: | Current balance in the account. | +| `type` | [shared.AccountType](../../../sdk/models/shared/accounttype.md) | :heavy_minus_sign: | The type of bank account e.g. Credit. | +| `status` | [shared.AccountStatus](../../../sdk/models/shared/accountstatus.md) | :heavy_minus_sign: | N/A | +| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | +| `validDatatypeLinks` | *AccountingCreateAccountResponseValidDataTypeLinks*[] | :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](/lending-api#/schemas/ValidDataTypeLinks). | +| `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | N/A | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company. | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.md b/lending/docs/sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.md index ab3bca74b..9ddbd0fb4 100644 --- a/lending/docs/sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.md +++ b/lending/docs/sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.md @@ -1,57 +1,16 @@ -# AccountingCreateAccountResponseValidDataTypeLinks - -When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. - -For example, `validDatatypeLinks` might indicate the following references: - -- Which tax rates are valid to use on the line item of a bill. -- Which items can be used when creating an invoice. - -You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. - -## `validDatatypeLinks` example - -The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. - -```json validDatatypeLinks for an account -{ - "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - "nominalCode": "090", - "name": "Business Bank Account", - #... - "validDatatypeLinks": [ - { - "property": "Id", - "links": [ - "Payment.AccountRef.Id", - "BillPayment.AccountRef.Id", - "DirectIncome.LineItems.AccountRef.Id", - "DirectCost.LineItems.AccountRef.Id" - ] - } - ] - } -``` - - - -## Support for `validDatatypeLinks` - -Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. - -If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. - -## Example Usage - -```typescript -import { AccountingCreateAccountResponseValidDataTypeLinks } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateAccountResponseValidDataTypeLinks = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | +# AccountingCreateAccountResponseValidDataTypeLinks + +## Example Usage + +```typescript +import { AccountingCreateAccountResponseValidDataTypeLinks } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateAccountResponseValidDataTypeLinks = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | | `links` | *string*[] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatebankaccountresponse.md b/lending/docs/sdk/models/shared/accountingcreatebankaccountresponse.md index 9d3d2cdaf..a4094cb52 100644 --- a/lending/docs/sdk/models/shared/accountingcreatebankaccountresponse.md +++ b/lending/docs/sdk/models/shared/accountingcreatebankaccountresponse.md @@ -1,50 +1,37 @@ -# AccountingCreateBankAccountResponse - -## Example Usage - -```typescript -import { AccountingCreateBankAccountResponse } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateBankAccountResponse = { - data: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - currency: "GBP", - status: "Active", - }, - changes: [ - { - recordRef: { - dataType: "invoices", - }, - }, - ], - dataType: "invoices", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "9515d4c2-ef40-4f1b-8e29-8c18a577b63a", - dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestedOnUtc: "2022-10-23T00:00:00Z", - completedOnUtc: "2022-10-23T00:00:00Z", - status: "Failed", - statusCode: 223932, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [shared.AccountingCreateBankAccountResponseAccountingBankAccount](../../../sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md) | :heavy_minus_sign: | N/A | | -| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `pushOperationKey` | *string* | :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. | | -| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | -| `validation` | [shared.Validation](../../../sdk/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. | | -| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file +# AccountingCreateBankAccountResponse + +## Example Usage + +```typescript +import { AccountingCreateBankAccountResponse } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateBankAccountResponse = { + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "string", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "string", + statusCode: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :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. | | +| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/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. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | +| `data` | *AccountingCreateBankAccountResponseAccountingBankAccount* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md b/lending/docs/sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md index 950e04f79..d1b4d75b3 100644 --- a/lending/docs/sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md +++ b/lending/docs/sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md @@ -1,53 +1,31 @@ -# ~~AccountingCreateBankAccountResponseAccountingBankAccount~~ - -> **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 [Banking: Account](https://docs.codat.io/lending-api#/schemas/Account) data type. - -## 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 software. -* The currency and balance of the account. -* The sort code and account number. - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -## Example Usage - -```typescript -import { AccountingCreateBankAccountResponseAccountingBankAccount } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateBankAccountResponseAccountingBankAccount = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - currency: "GBP", - status: "Active", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | | -| `accountName` | *string* | :heavy_minus_sign: | Name of the bank account in the accounting software. | | -| `accountType` | [shared.AccountingBankAccountType](../../../sdk/models/shared/accountingbankaccounttype.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. | | -| `nominalCode` | *string* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | | -| `sortCode` | *string* | :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. | | -| `accountNumber` | *string* | :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. | | -| `iBan` | *string* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `balance` | *Decimal* | :heavy_minus_sign: | Balance of the bank account. | | -| `institution` | *string* | :heavy_minus_sign: | The institution of the bank account. | | -| `availableBalance` | *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. | | -| `overdraftLimit` | *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`. | | -| `status` | [shared.BankAccountStatus](../../../sdk/models/shared/bankaccountstatus.md) | :heavy_minus_sign: | Status of the bank account. | Active | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file +# AccountingCreateBankAccountResponseAccountingBankAccount + +## Example Usage + +```typescript +import { AccountingCreateBankAccountResponseAccountingBankAccount } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateBankAccountResponseAccountingBankAccount = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accountName` | *string* | :heavy_minus_sign: | Name of the bank account in the accounting software. | +| `accountType` | [shared.AccountingBankAccountType](../../../sdk/models/shared/accountingbankaccounttype.md) | :heavy_minus_sign: | N/A | +| `nominalCode` | *string* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | +| `sortCode` | *string* | :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. | +| `accountNumber` | *string* | :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. | +| `iBan` | *string* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | +| `currency` | *string* | :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. | +| `balance` | *Decimal | number* | :heavy_minus_sign: | Balance of the bank account. | +| `institution` | *string* | :heavy_minus_sign: | The institution of the bank account. | +| `availableBalance` | *Decimal | number* | :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. | +| `overdraftLimit` | *Decimal | number* | :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`. | +| `status` | [shared.BankAccountStatus](../../../sdk/models/shared/bankaccountstatus.md) | :heavy_minus_sign: | N/A | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | +| `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatebankaccounttransactions.md b/lending/docs/sdk/models/shared/accountingcreatebankaccounttransactions.md index ab64c011f..f01bfa183 100644 --- a/lending/docs/sdk/models/shared/accountingcreatebankaccounttransactions.md +++ b/lending/docs/sdk/models/shared/accountingcreatebankaccounttransactions.md @@ -1,25 +1,18 @@ -# ~~AccountingCreateBankAccountTransactions~~ - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -## Example Usage - -```typescript -import { AccountingCreateBankAccountTransactions } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateBankAccountTransactions = { - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - transactions: [ - { - date: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `accountId` | *string* | :heavy_minus_sign: | Unique identifier for a bank account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ
**Example 5:** Checking 0202 | +# AccountingCreateBankAccountTransactions + +## Example Usage + +```typescript +import { AccountingCreateBankAccountTransactions } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateBankAccountTransactions = { + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accountId` | *string* | :heavy_minus_sign: | Unique identifier for a bank account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ
**Example 5:** Checking 0202 | | `transactions` | [shared.CreateBankAccountTransaction](../../../sdk/models/shared/createbankaccounttransaction.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatebanktransactions.md b/lending/docs/sdk/models/shared/accountingcreatebanktransactions.md index 36c96c08c..430bb7a14 100644 --- a/lending/docs/sdk/models/shared/accountingcreatebanktransactions.md +++ b/lending/docs/sdk/models/shared/accountingcreatebanktransactions.md @@ -1,23 +1,18 @@ -# AccountingCreateBankTransactions - -## Example Usage - -```typescript -import { AccountingCreateBankTransactions } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateBankTransactions = { - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - transactions: [ - { - date: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `accountId` | *string* | :heavy_minus_sign: | Unique identifier for a bank account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ
**Example 5:** Checking 0202 | +# AccountingCreateBankTransactions + +## Example Usage + +```typescript +import { AccountingCreateBankTransactions } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateBankTransactions = { + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accountId` | *string* | :heavy_minus_sign: | Unique identifier for a bank account. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ
**Example 5:** Checking 0202 | | `transactions` | [shared.CreateBankAccountTransaction](../../../sdk/models/shared/createbankaccounttransaction.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md b/lending/docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md index 2ae7af644..9f583e94f 100644 --- a/lending/docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md +++ b/lending/docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md @@ -1,52 +1,37 @@ -# AccountingCreateBankTransactionsResponse - -## Example Usage - -```typescript -import { AccountingCreateBankTransactionsResponse } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateBankTransactionsResponse = { - data: { - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - transactions: [ - { - date: "2022-10-23T00:00:00Z", - }, - ], - }, - changes: [ - { - recordRef: { - dataType: "invoices", - }, - }, - ], - dataType: "invoices", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "9d150b35-2f21-4152-b555-430d7da1e1c4", - dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestedOnUtc: "2022-10-23T00:00:00Z", - completedOnUtc: "2022-10-23T00:00:00Z", - status: "Success", - statusCode: 540340, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [shared.AccountingCreateBankAccountTransactions](../../../sdk/models/shared/accountingcreatebankaccounttransactions.md) | :heavy_minus_sign: | N/A | | -| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `pushOperationKey` | *string* | :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. | | -| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | -| `validation` | [shared.Validation](../../../sdk/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. | | -| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file +# AccountingCreateBankTransactionsResponse + +## Example Usage + +```typescript +import { AccountingCreateBankTransactionsResponse } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateBankTransactionsResponse = { + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "string", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "string", + statusCode: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :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. | | +| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/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. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | +| `data` | *AccountingCreateBankAccountTransactions* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatedirectcostresponse.md b/lending/docs/sdk/models/shared/accountingcreatedirectcostresponse.md index 61cdc8f27..7f6c69387 100644 --- a/lending/docs/sdk/models/shared/accountingcreatedirectcostresponse.md +++ b/lending/docs/sdk/models/shared/accountingcreatedirectcostresponse.md @@ -1,72 +1,37 @@ -# AccountingCreateDirectCostResponse - -## Example Usage - -```typescript -import { AccountingCreateDirectCostResponse } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingCreateDirectCostResponse = { - data: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - issueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [ - { - unitAmount: new Decimal("8829.23"), - quantity: new Decimal("6266.51"), - accountRef: {}, - tracking: { - recordRefs: [ - { - dataType: "trackingCategories", - }, - ], - invoiceTo: { - dataType: "journalEntry", - }, - }, - }, - ], - paymentAllocations: [], - subTotal: new Decimal("5999.15"), - taxAmount: new Decimal("3174.94"), - totalAmount: new Decimal("6777.69"), - }, - changes: [ - { - recordRef: { - dataType: "invoices", - }, - }, - ], - dataType: "invoices", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "69390f0f-e85a-4cb4-a26d-e69c774bafe9", - dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestedOnUtc: "2022-10-23T00:00:00Z", - completedOnUtc: "2022-10-23T00:00:00Z", - status: "Failed", - statusCode: 908691, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [shared.AccountingCreateDirectCostResponseAccountingDirectCost](../../../sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md) | :heavy_minus_sign: | N/A | | -| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `pushOperationKey` | *string* | :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. | | -| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | -| `validation` | [shared.Validation](../../../sdk/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. | | -| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file +# AccountingCreateDirectCostResponse + +## Example Usage + +```typescript +import { AccountingCreateDirectCostResponse } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateDirectCostResponse = { + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "string", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "string", + statusCode: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :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. | | +| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/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. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | +| `data` | *AccountingCreateDirectCostResponseAccountingDirectCost* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md b/lending/docs/sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md index 28b534f72..22f792d78 100644 --- a/lending/docs/sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md +++ b/lending/docs/sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md @@ -1,55 +1,30 @@ -# ~~AccountingCreateDirectCostResponseAccountingDirectCost~~ - -> **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting software. - -## Overview - -Direct costs are money that leave the business without impacting Accounts Payable, and refunds associated with such transactions. - -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 - -Direct costs is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction). - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -## Example Usage - -```typescript -import { AccountingCreateDirectCostResponseAccountingDirectCost } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingCreateDirectCostResponseAccountingDirectCost = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - issueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [], - paymentAllocations: [], - subTotal: new Decimal("3863.3"), - taxAmount: new Decimal("5053.06"), - totalAmount: new Decimal("1202.21"), -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier of the direct cost, unique for the company. | | -| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the direct cost. | | -| `note` | *string* | :heavy_minus_sign: | A note attached to the direct cost. | | -| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | N/A | | -| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lineItems` | [shared.DirectCostLineItem](../../../sdk/models/shared/directcostlineitem.md)[] | :heavy_check_mark: | An array of line items. | | -| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_check_mark: | An array of payment allocations. | | -| `subTotal` | *Decimal* | :heavy_check_mark: | The total amount of the direct costs, excluding any taxes. | | -| `taxAmount` | *Decimal* | :heavy_check_mark: | The total amount of tax on the direct costs. | | -| `totalAmount` | *Decimal* | :heavy_check_mark: | The amount of the direct costs, inclusive of tax. | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# AccountingCreateDirectCostResponseAccountingDirectCost + +## Example Usage + +```typescript +import { AccountingCreateDirectCostResponseAccountingDirectCost } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateDirectCostResponseAccountingDirectCost = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the direct cost. | +| `note` | *string* | :heavy_minus_sign: | A note attached to the direct cost. | +| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | A customer or supplier associated with the direct cost. | +| `issueDate` | *string* | :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. | +| `currency` | *string* | :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. | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | +| `lineItems` | [shared.DirectCostLineItem](../../../sdk/models/shared/directcostlineitem.md)[] | :heavy_check_mark: | An array of line items. | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_check_mark: | An array of payment allocations. | +| `subTotal` | *Decimal | number* | :heavy_check_mark: | The total amount of the direct costs, excluding any taxes. | +| `taxAmount` | *Decimal | number* | :heavy_check_mark: | The total amount of tax on the direct costs. | +| `totalAmount` | *Decimal | number* | :heavy_check_mark: | The amount of the direct costs, inclusive of tax. | +| `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | N/A | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `id` | *string* | :heavy_minus_sign: | Identifier of the direct cost, unique for the company. | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatepaymentresponse.md b/lending/docs/sdk/models/shared/accountingcreatepaymentresponse.md index c149effba..3f1f2ef8f 100644 --- a/lending/docs/sdk/models/shared/accountingcreatepaymentresponse.md +++ b/lending/docs/sdk/models/shared/accountingcreatepaymentresponse.md @@ -1,62 +1,37 @@ -# AccountingCreatePaymentResponse - -## Example Usage - -```typescript -import { AccountingCreatePaymentResponse } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingCreatePaymentResponse = { - data: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - accountRef: {}, - paymentMethodRef: { - id: "EILBDVJVNUAGVKRQ", - name: "AliPay", - }, - currency: "GBP", - date: "2022-10-23T00:00:00Z", - lines: [ - { - amount: new Decimal("1110.93"), - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - ], - }, - changes: [ - { - recordRef: { - dataType: "invoices", - }, - }, - ], - dataType: "invoices", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "f3293f5a-c343-4183-a475-1b0e4625eb59", - dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestedOnUtc: "2022-10-23T00:00:00Z", - completedOnUtc: "2022-10-23T00:00:00Z", - status: "Failed", - statusCode: 69976, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [shared.AccountingCreatePaymentResponseAccountingPayment](../../../sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md) | :heavy_minus_sign: | N/A | | -| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `pushOperationKey` | *string* | :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. | | -| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | -| `validation` | [shared.Validation](../../../sdk/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. | | -| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file +# AccountingCreatePaymentResponse + +## Example Usage + +```typescript +import { AccountingCreatePaymentResponse } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreatePaymentResponse = { + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "string", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "string", + statusCode: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :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. | | +| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/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. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | +| `data` | *AccountingCreatePaymentResponseAccountingPayment* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md b/lending/docs/sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md index 25092dc16..096db13a5 100644 --- a/lending/docs/sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md +++ b/lending/docs/sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md @@ -1,725 +1,29 @@ -# ~~AccountingCreatePaymentResponseAccountingPayment~~ - -> **Payments or bill payments?** -> -> In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/lending-api#/schemas/Bill) and credit notes against bills. - -## Overview - -Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-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 software, 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/lending-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 software 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 - } - ] - } - ] - } - ``` - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -## Example Usage - -```typescript -import { AccountingCreatePaymentResponseAccountingPayment } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingCreatePaymentResponseAccountingPayment = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - accountRef: {}, - paymentMethodRef: { - id: "EILBDVJVNUAGVKRQ", - name: "AliPay", - }, - currency: "GBP", - date: "2022-10-23T00:00:00Z", - lines: [ - { - amount: new Decimal("1110.93"), - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the payment, unique to the company in the accounting software. | | -| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | The payment method the record is linked to in the accounting or commerce software. | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | -| `totalAmount` | *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. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `note` | *string* | :heavy_minus_sign: | Any additional information associated with the payment. | | -| `lines` | [shared.PaymentLine](../../../sdk/models/shared/paymentline.md)[] | :heavy_minus_sign: | An array of payment lines. | | -| `reference` | *string* | :heavy_minus_sign: | Friendly reference for the payment. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file +# AccountingCreatePaymentResponseAccountingPayment + +## Example Usage + +```typescript +import { AccountingCreatePaymentResponseAccountingPayment } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreatePaymentResponseAccountingPayment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `id` | *string* | :heavy_minus_sign: | Identifier for the payment, unique to the company in the accounting software. | +| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | Customer the payment is recorded against in the accounting software. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | Account the payment is recorded against in the accounting software. | +| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | The Payment Method to which the payment is linked in the accounting software. | +| `totalAmount` | *Decimal | number* | :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. | +| `currency` | *string* | :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. | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | +| `date` | *string* | :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. | +| `note` | *string* | :heavy_minus_sign: | Any additional information associated with the payment. | +| `lines` | [shared.PaymentLine](../../../sdk/models/shared/paymentline.md)[] | :heavy_minus_sign: | An array of payment lines. | +| `reference` | *string* | :heavy_minus_sign: | Friendly reference for the payment. | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | +| `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatesupplierresponse.md b/lending/docs/sdk/models/shared/accountingcreatesupplierresponse.md index a67ded7c6..381061ca0 100644 --- a/lending/docs/sdk/models/shared/accountingcreatesupplierresponse.md +++ b/lending/docs/sdk/models/shared/accountingcreatesupplierresponse.md @@ -1,82 +1,76 @@ -# AccountingCreateSupplierResponse - -## Example Usage - -```typescript -import { AccountingCreateSupplierResponse } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateSupplierResponse = { - data: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", - supplierName: "Kelly's Industrial Supplies", - contactName: "Kelly's Industrial Supplies", - emailAddress: "sales@kellysupplies.com", - phone: "07999 999999", - addresses: [ - { - type: "Billing", - line1: "Unit 51", - line2: "Bakersfield Industrial Estate", - city: "Bakersfield", - region: "California", - country: "USA", - }, - ], - registrationNumber: "string", - taxNumber: "string", - status: "Unknown", - defaultCurrency: "string", - metadata: { - isDeleted: true, - }, - supplementalData: { - content: { - "property1": { - "property1": "", - "property2": "", - }, - "property2": { - "property1": "", - "property2": "", - }, - }, - }, - }, - changes: [ - { - recordRef: { - dataType: "invoices", - }, - }, - ], - dataType: "invoices", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "9852ade9-5f97-4ddd-9a84-19fae058a63e", - dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestedOnUtc: "2022-10-23T00:00:00Z", - completedOnUtc: "2022-10-23T00:00:00Z", - status: "Success", - statusCode: 876918, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [shared.AccountingCreateSupplierResponseAccountingSupplier](../../../sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md) | :heavy_minus_sign: | N/A | {
"id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F",
"supplierName": "Kelly's Industrial Supplies",
"contactName": "Kelly's Industrial Supplies",
"emailAddress": "sales@kellysupplies.com",
"phone": "07999 999999",
"addresses": [
{
"type": "Billing",
"line1": "Unit 51",
"line2": "Bakersfield Industrial Estate",
"city": "Bakersfield",
"region": "California",
"country": "USA",
"postalcode": "93308"
}
],
"registrationNumber": "string",
"taxNumber": "string",
"status": "Unknown",
"defaultCurrency": "string",
"metadata": {
"isDeleted": true
},
"supplementalData": {
"content": {
"property1": {
"property1": null,
"property2": null
},
"property2": {
"property1": null,
"property2": null
}
}
},
"modifiedDate": "2022-10-23T00:00:00Z",
"sourceModifiedDate": "2022-10-23T00:00:00Z"
} | -| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `pushOperationKey` | *string* | :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. | | -| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | -| `validation` | [shared.Validation](../../../sdk/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. | | -| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file +# AccountingCreateSupplierResponse + +## Example Usage + +```typescript +import { AccountingCreateSupplierResponse } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateSupplierResponse = { + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "string", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "string", + statusCode: 0, + data: { + id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + supplierName: "Kelly's Industrial Supplies", + contactName: "Kelly's Industrial Supplies", + emailAddress: "sales@kellysupplies.com", + phone: "07999 999999", + addresses: [ + { + type: "Billing", + line1: "Unit 51", + line2: "Bakersfield Industrial Estate", + city: "Bakersfield", + region: "California", + country: "USA", + postalcode: "93308", + }, + ], + registrationNumber: "string", + taxNumber: "string", + status: "Unknown", + defaultCurrency: "string", + metadata: { + isDeleted: true, + }, + supplementalData: { + content: { + "property1": { + "property1": "None", + "property2": "None", + }, + "property2": { + "property1": "None", + "property2": "None", + }, + }, + }, + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :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. | | +| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/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. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | +| `data` | *AccountingCreateSupplierResponseAccountingSupplier* | :heavy_minus_sign: | N/A | {
"id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F",
"supplierName": "Kelly's Industrial Supplies",
"contactName": "Kelly's Industrial Supplies",
"emailAddress": "sales@kellysupplies.com",
"phone": "07999 999999",
"addresses": [
{
"type": "Billing",
"line1": "Unit 51",
"line2": "Bakersfield Industrial Estate",
"city": "Bakersfield",
"region": "California",
"country": "USA",
"postalcode": "93308"
}
],
"registrationNumber": "string",
"taxNumber": "string",
"status": "Unknown",
"defaultCurrency": "string",
"metadata": {
"isDeleted": true
},
"supplementalData": {
"content": {
"property1": {
"property1": null,
"property2": null
},
"property2": {
"property1": null,
"property2": null
}
}
},
"modifiedDate": "2022-10-23T00:00:00Z",
"sourceModifiedDate": "2022-10-23T00:00:00Z"
} | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md b/lending/docs/sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md index 05254bee4..5cc4fafb3 100644 --- a/lending/docs/sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md +++ b/lending/docs/sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md @@ -1,71 +1,28 @@ -# ~~AccountingCreateSupplierResponseAccountingSupplier~~ - -## Overview - -From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/lending-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/lending-api#/schemas/Bill). - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -## Example Usage - -```typescript -import { AccountingCreateSupplierResponseAccountingSupplier } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateSupplierResponseAccountingSupplier = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", - supplierName: "Kelly's Industrial Supplies", - contactName: "Kelly's Industrial Supplies", - emailAddress: "sales@kellysupplies.com", - phone: "07999 999999", - addresses: [ - { - type: "Billing", - line1: "Unit 51", - line2: "Bakersfield Industrial Estate", - city: "Bakersfield", - region: "California", - country: "USA", - }, - ], - registrationNumber: "string", - taxNumber: "string", - status: "Unknown", - defaultCurrency: "string", - metadata: { - isDeleted: true, - }, - supplementalData: { - content: { - "property1": { - "property1": "", - "property2": "", - }, - "property2": { - "property1": "", - "property2": "", - }, - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting software. | | -| `supplierName` | *string* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | -| `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the supplier. | | -| `emailAddress` | *string* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | -| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | -| `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | | -| `registrationNumber` | *string* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | -| `taxNumber` | *string* | :heavy_minus_sign: | Supplier's company tax number. | | -| `status` | [shared.SupplierStatus](../../../sdk/models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | -| `defaultCurrency` | *string* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file +# AccountingCreateSupplierResponseAccountingSupplier + +## Example Usage + +```typescript +import { AccountingCreateSupplierResponseAccountingSupplier } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateSupplierResponseAccountingSupplier = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `id` | *string* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting software. | +| `supplierName` | *string* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | +| `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the supplier. | +| `emailAddress` | *string* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | +| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +| `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | +| `registrationNumber` | *string* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | +| `taxNumber` | *string* | :heavy_minus_sign: | Supplier's company tax number. | +| `status` | [shared.SupplierStatus](../../../sdk/models/shared/supplierstatus.md) | :heavy_check_mark: | N/A | +| `defaultCurrency` | *string* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | +| `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatetransferresponse.md b/lending/docs/sdk/models/shared/accountingcreatetransferresponse.md index 8965f85bf..bd34bc928 100644 --- a/lending/docs/sdk/models/shared/accountingcreatetransferresponse.md +++ b/lending/docs/sdk/models/shared/accountingcreatetransferresponse.md @@ -1,66 +1,37 @@ -# AccountingCreateTransferResponse - -## Example Usage - -```typescript -import { AccountingCreateTransferResponse } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateTransferResponse = { - data: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - date: "2022-10-23T00:00:00Z", - from: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - to: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - depositedRecordRefs: [ - { - dataType: "journalEntry", - }, - ], - }, - changes: [ - { - recordRef: { - dataType: "invoices", - }, - }, - ], - dataType: "invoices", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "5555d010-53d7-44e8-b492-d1aec6e6a46f", - dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestedOnUtc: "2022-10-23T00:00:00Z", - completedOnUtc: "2022-10-23T00:00:00Z", - status: "TimedOut", - statusCode: 499093, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [shared.AccountingCreateTransferResponseAccountingTransfer](../../../sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md) | :heavy_minus_sign: | N/A | | -| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `pushOperationKey` | *string* | :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. | | -| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | -| `validation` | [shared.Validation](../../../sdk/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. | | -| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file +# AccountingCreateTransferResponse + +## Example Usage + +```typescript +import { AccountingCreateTransferResponse } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateTransferResponse = { + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "string", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "string", + statusCode: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :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. | | +| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/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. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | +| `data` | *AccountingCreateTransferResponseAccountingTransfer* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md b/lending/docs/sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md index 72baf9e82..c52aacd1e 100644 --- a/lending/docs/sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md +++ b/lending/docs/sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md @@ -1,52 +1,27 @@ -# ~~AccountingCreateTransferResponseAccountingTransfer~~ - -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/lending-api#/schemas/AccountTransaction). - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -## Example Usage - -```typescript -import { AccountingCreateTransferResponseAccountingTransfer } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateTransferResponseAccountingTransfer = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - date: "2022-10-23T00:00:00Z", - from: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - to: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - depositedRecordRefs: [ - { - dataType: "journalEntry", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for the transfer. | | -| `description` | *string* | :heavy_minus_sign: | Description of the transfer. | | -| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | N/A | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `from` | [shared.TransferAccount](../../../sdk/models/shared/transferaccount.md) | :heavy_minus_sign: | Account details of the account sending or receiving the transfer. | | -| `to` | [shared.TransferAccount](../../../sdk/models/shared/transferaccount.md) | :heavy_minus_sign: | Account details of the account sending or receiving the transfer. | | -| `status` | [shared.AccountingCreateTransferResponseStatus](../../../sdk/models/shared/accountingcreatetransferresponsestatus.md) | :heavy_minus_sign: | The status of the transfer in the account | | -| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Reference to the tracking categories this transfer is being tracked against. | | -| `depositedRecordRefs` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.md)[] | :heavy_minus_sign: | List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file +# AccountingCreateTransferResponseAccountingTransfer + +## Example Usage + +```typescript +import { AccountingCreateTransferResponseAccountingTransfer } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateTransferResponseAccountingTransfer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the transfer. | +| `description` | *string* | :heavy_minus_sign: | Description of the transfer. | +| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | The customer or supplier for the transfer, if available. | +| `date` | *string* | :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. | +| `from` | [shared.TransferAccount](../../../sdk/models/shared/transferaccount.md) | :heavy_minus_sign: | The details of the accounts the transfer is moving from. | +| `to` | [shared.TransferAccount](../../../sdk/models/shared/transferaccount.md) | :heavy_minus_sign: | The details of the accounts the transfer is moving to. | +| `status` | [shared.AccountingCreateTransferResponseStatus](../../../sdk/models/shared/accountingcreatetransferresponsestatus.md) | :heavy_minus_sign: | The status of the transfer in the account | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Reference to the tracking categories this transfer is being tracked against. | +| `depositedRecordRefs` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.md)[] | :heavy_minus_sign: | List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | +| `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreatetransferresponsestatus.md b/lending/docs/sdk/models/shared/accountingcreatetransferresponsestatus.md index 8caf8eca7..f2456f1da 100644 --- a/lending/docs/sdk/models/shared/accountingcreatetransferresponsestatus.md +++ b/lending/docs/sdk/models/shared/accountingcreatetransferresponsestatus.md @@ -1,17 +1,15 @@ -# AccountingCreateTransferResponseStatus - -The status of the transfer in the account - -## Example Usage - -```typescript -import { AccountingCreateTransferResponseStatus } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreateTransferResponseStatus = "Unreconciled"; -``` - -## Values - -```typescript -"Unknown" | "Unreconciled" | "Reconciled" | "Void" +# AccountingCreateTransferResponseStatus + +## Example Usage + +```typescript +import { AccountingCreateTransferResponseStatus } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreateTransferResponseStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreditnote.md b/lending/docs/sdk/models/shared/accountingcreditnote.md index a22f76a92..b8a943036 100644 --- a/lending/docs/sdk/models/shared/accountingcreditnote.md +++ b/lending/docs/sdk/models/shared/accountingcreditnote.md @@ -1,91 +1,62 @@ -# AccountingCreditNote - -## 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/lending-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. - -## Example Usage - -```typescript -import { AccountingCreditNote } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingCreditNote = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - totalAmount: new Decimal("199.79"), - totalDiscount: new Decimal("8024.96"), - subTotal: new Decimal("946.69"), - totalTaxAmount: new Decimal("1168.92"), - discountPercentage: new Decimal("7202.97"), - remainingCredit: new Decimal("8058.3"), - status: "Draft", - issueDate: "2022-10-23T00:00:00Z", - allocatedOnDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [ - { - unitAmount: new Decimal("1872.58"), - quantity: new Decimal("8981.28"), - accountRef: {}, - tracking: { - categoryRefs: [], - isBilledTo: "Unknown", - isRebilledTo: "Unknown", - recordRef: { - dataType: "journalEntry", - }, - }, - }, - ], - paymentAllocations: [ - { - payment: { - accountRef: {}, - currency: "GBP", - paidOnDate: "2022-10-23T00:00:00Z", - }, - allocation: { - currency: "GBP", - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the credit note, unique to the company in the accounting software. | | -| `creditNoteNumber` | *string* | :heavy_minus_sign: | Friendly reference for the credit note. | | -| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | | -| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | -| `totalAmount` | *Decimal* | :heavy_check_mark: | Total amount of credit that has been applied to the customer's accounts receivable | | -| `totalDiscount` | *Decimal* | :heavy_check_mark: | Any discounts applied to the credit note amount. | | -| `subTotal` | *Decimal* | :heavy_check_mark: | Value of the credit note, including discounts and excluding tax. | | -| `additionalTaxAmount` | *Decimal* | :heavy_minus_sign: | Additional tax amount applied to credit note. | | -| `additionalTaxPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate of any additional tax applied to the credit note. | | -| `totalTaxAmount` | *Decimal* | :heavy_check_mark: | Any tax applied to the credit note amount. | | -| `discountPercentage` | *Decimal* | :heavy_check_mark: | Percentage rate (from 0 to 100) of discounts applied to the credit note. | | -| `remainingCredit` | *Decimal* | :heavy_check_mark: | Unused balance of totalAmount originally raised. | | -| `status` | [shared.CreditNoteStatus](../../../sdk/models/shared/creditnotestatus.md) | :heavy_check_mark: | Current state of the credit note. | | -| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `allocatedOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lineItems` | [shared.CreditNoteLineItem](../../../sdk/models/shared/creditnotelineitem.md)[] | :heavy_minus_sign: | N/A | | -| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | -| `note` | *string* | :heavy_minus_sign: | Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingCreditNote + +## 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/lending-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. + +## Example Usage + +```typescript +import { AccountingCreditNote } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreditNote = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + totalAmount: 0, + totalDiscount: 0, + subTotal: 0, + totalTaxAmount: 0, + discountPercentage: 0, + remainingCredit: 0, + status: "string", + issueDate: "2022-10-23T00:00:00Z", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "GBP", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the credit note, unique to the company in the accounting software. | | +| `creditNoteNumber` | *string* | :heavy_minus_sign: | Friendly reference for the credit note. | | +| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | Reference to the customer the credit note has been issued to. | | +| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | +| `totalAmount` | *Decimal | number* | :heavy_check_mark: | Total amount of credit that has been applied to the customer's accounts receivable | | +| `totalDiscount` | *Decimal | number* | :heavy_check_mark: | Any discounts applied to the credit note amount. | | +| `subTotal` | *Decimal | number* | :heavy_check_mark: | Value of the credit note, including discounts and excluding tax. | | +| `additionalTaxAmount` | *Decimal | number* | :heavy_minus_sign: | Additional tax amount applied to credit note. | | +| `additionalTaxPercentage` | *Decimal | number* | :heavy_minus_sign: | Percentage rate of any additional tax applied to the credit note. | | +| `totalTaxAmount` | *Decimal | number* | :heavy_check_mark: | Any tax applied to the credit note amount. | | +| `discountPercentage` | *Decimal | number* | :heavy_check_mark: | Percentage rate (from 0 to 100) of discounts applied to the credit note. | | +| `remainingCredit` | *Decimal | number* | :heavy_check_mark: | Unused balance of totalAmount originally raised. | | +| `status` | [shared.CreditNoteStatus](../../../sdk/models/shared/creditnotestatus.md) | :heavy_check_mark: | Current state of the credit note. | | +| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `allocatedOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `lineItems` | [shared.CreditNoteLineItem](../../../sdk/models/shared/creditnotelineitem.md)[] | :heavy_minus_sign: | N/A | | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `note` | *string* | :heavy_minus_sign: | Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcreditnotes.md b/lending/docs/sdk/models/shared/accountingcreditnotes.md index 37ff4a134..b4018ce03 100644 --- a/lending/docs/sdk/models/shared/accountingcreditnotes.md +++ b/lending/docs/sdk/models/shared/accountingcreditnotes.md @@ -1,31 +1,23 @@ -# AccountingCreditNotes - -## Example Usage - -```typescript -import { AccountingCreditNotes } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCreditNotes = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingCreditNote](../../../sdk/models/shared/accountingcreditnote.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingCreditNotes + +## Example Usage + +```typescript +import { AccountingCreditNotes } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCreditNotes = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingCreditNote](../../../sdk/models/shared/accountingcreditnote.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcustomer.md b/lending/docs/sdk/models/shared/accountingcustomer.md index 3763b94f8..664328e1d 100644 --- a/lending/docs/sdk/models/shared/accountingcustomer.md +++ b/lending/docs/sdk/models/shared/accountingcustomer.md @@ -1,53 +1,41 @@ -# AccountingCustomer - -## 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/lending-api#/schemas/Invoice). - - -## Example Usage - -```typescript -import { AccountingCustomer } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCustomer = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "GBP", - contacts: [ - { - phone: [ - { - number: "+44 25691 154789", - type: "Landline", - }, - ], - status: "Unknown", - modifiedDate: "2022-10-23T00:00:00Z", - }, - ], - status: "Archived", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the customer, unique to the company in the accounting software. | | -| `customerName` | *string* | :heavy_minus_sign: | Name of the customer as recorded in the accounting system, typically the company name. | | -| `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the identified customer. | | -| `emailAddress` | *string* | :heavy_minus_sign: | Email address the customer can be contacted by. | | -| `defaultCurrency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `phone` | *string* | :heavy_minus_sign: | Phone number the customer can be contacted by. | | -| `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | | -| `contacts` | [shared.Contact](../../../sdk/models/shared/contact.md)[] | :heavy_minus_sign: | An array of Contacts. | | -| `registrationNumber` | *string* | :heavy_minus_sign: | Company number. In the UK, this is typically the Companies House company registration number. | | -| `taxNumber` | *string* | :heavy_minus_sign: | Company tax number. | | -| `status` | [shared.CustomerStatus](../../../sdk/models/shared/customerstatus.md) | :heavy_check_mark: | Status of customer. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingCustomer + +## 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/lending-api#/schemas/Invoice). + + +## Example Usage + +```typescript +import { AccountingCustomer } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCustomer = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + defaultCurrency: "GBP", + status: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the customer, unique to the company in the accounting software. | | +| `customerName` | *string* | :heavy_minus_sign: | Name of the customer as recorded in the accounting system, typically the company name. | | +| `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the identified customer. | | +| `emailAddress` | *string* | :heavy_minus_sign: | Email address the customer can be contacted by. | | +| `defaultCurrency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `phone` | *string* | :heavy_minus_sign: | Phone number the customer can be contacted by. | | +| `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | | +| `contacts` | [shared.Contact](../../../sdk/models/shared/contact.md)[] | :heavy_minus_sign: | An array of Contacts. | | +| `registrationNumber` | *string* | :heavy_minus_sign: | Company number. In the UK, this is typically the Companies House company registration number. | | +| `taxNumber` | *string* | :heavy_minus_sign: | Company tax number. | | +| `status` | [shared.CustomerStatus](../../../sdk/models/shared/customerstatus.md) | :heavy_check_mark: | Status of customer. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcustomerref.md b/lending/docs/sdk/models/shared/accountingcustomerref.md index 7fc96841e..3235fc6c3 100644 --- a/lending/docs/sdk/models/shared/accountingcustomerref.md +++ b/lending/docs/sdk/models/shared/accountingcustomerref.md @@ -1,18 +1,16 @@ -# AccountingCustomerRef - -## Example Usage - -```typescript -import { AccountingCustomerRef } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCustomerRef = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | `id` from the Customers data type | +# AccountingCustomerRef + +## Example Usage + +```typescript +import { AccountingCustomerRef } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCustomerRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | `id` from the Customers data type | | `companyName` | *string* | :heavy_minus_sign: | `customerName` from the Customer data type | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingcustomers.md b/lending/docs/sdk/models/shared/accountingcustomers.md index 9f49aa4c0..3ce6446eb 100644 --- a/lending/docs/sdk/models/shared/accountingcustomers.md +++ b/lending/docs/sdk/models/shared/accountingcustomers.md @@ -1,31 +1,23 @@ -# AccountingCustomers - -## Example Usage - -```typescript -import { AccountingCustomers } from "@codat/lending/sdk/models/shared"; - -let value: AccountingCustomers = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingCustomer](../../../sdk/models/shared/accountingcustomer.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingCustomers + +## Example Usage + +```typescript +import { AccountingCustomers } from "@codat/lending/sdk/models/shared"; + +let value: AccountingCustomers = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingCustomer](../../../sdk/models/shared/accountingcustomer.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingdirectcost.md b/lending/docs/sdk/models/shared/accountingdirectcost.md index 9bd1aa57b..a84fcaa03 100644 --- a/lending/docs/sdk/models/shared/accountingdirectcost.md +++ b/lending/docs/sdk/models/shared/accountingdirectcost.md @@ -1,69 +1,116 @@ -# AccountingDirectCost - -> **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting software. - -## Overview - -Direct costs are money that leave the business without impacting Accounts Payable, and refunds associated with such transactions. - -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 - -Direct costs is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction). - -## Example Usage - -```typescript -import { AccountingDirectCost } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingDirectCost = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - issueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [ - { - unitAmount: new Decimal("8829.23"), - quantity: new Decimal("6266.51"), - accountRef: {}, - tracking: { - recordRefs: [ - { - dataType: "trackingCategories", - }, - ], - invoiceTo: { - dataType: "journalEntry", - }, - }, - }, - ], - paymentAllocations: [], - subTotal: new Decimal("9029.32"), - taxAmount: new Decimal("1250.36"), - totalAmount: new Decimal("3249.59"), -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier of the direct cost, unique for the company. | | -| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the direct cost. | | -| `note` | *string* | :heavy_minus_sign: | A note attached to the direct cost. | | -| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | N/A | | -| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lineItems` | [shared.DirectCostLineItem](../../../sdk/models/shared/directcostlineitem.md)[] | :heavy_check_mark: | An array of line items. | | -| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_check_mark: | An array of payment allocations. | | -| `subTotal` | *Decimal* | :heavy_check_mark: | The total amount of the direct costs, excluding any taxes. | | -| `taxAmount` | *Decimal* | :heavy_check_mark: | The total amount of tax on the direct costs. | | -| `totalAmount` | *Decimal* | :heavy_check_mark: | The amount of the direct costs, inclusive of tax. | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +# AccountingDirectCost + +> **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting software. + +## Overview + +Direct costs are money that leave the business without impacting Accounts Payable, and refunds associated with such transactions. + +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 + +Direct costs is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction). + +## Example Usage + +```typescript +import { AccountingDirectCost } from "@codat/lending/sdk/models/shared"; + +let value: AccountingDirectCost = { + issueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + lineItems: [ + { + description: "string", + unitAmount: 0, + quantity: 0, + discountAmount: 0, + discountPercentage: 0, + subTotal: 0, + taxAmount: 0, + totalAmount: 0, + accountRef: { + id: "string", + name: "string", + }, + taxRateRef: { + id: "string", + name: "string", + effectiveTaxRate: 0, + }, + itemRef: { + id: "string", + name: "string", + }, + trackingCategoryRefs: [ + { + id: "string", + name: "string", + }, + ], + tracking: { + recordRefs: [ + { + id: "string", + dataType: "trackingCategories", + }, + ], + invoiceTo: { + id: "string", + dataType: "journalEntry", + }, + }, + }, + ], + paymentAllocations: [ + { + payment: { + id: "string", + note: "string", + reference: "string", + accountRef: { + id: "string", + name: "string", + }, + currency: "GBP", + currencyRate: 0, + paidOnDate: "2022-10-23T00:00:00Z", + totalAmount: 0, + }, + allocation: { + currency: "GBP", + currencyRate: 0, + allocatedOnDate: "2022-10-23T00:00:00Z", + totalAmount: 0, + }, + }, + ], + subTotal: 0, + taxAmount: 0, + totalAmount: 0, + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the direct cost. | | +| `note` | *string* | :heavy_minus_sign: | A note attached to the direct cost. | | +| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | A customer or supplier associated with the direct cost. | | +| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `lineItems` | [shared.DirectCostLineItem](../../../sdk/models/shared/directcostlineitem.md)[] | :heavy_check_mark: | An array of line items. | | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_check_mark: | An array of payment allocations. | | +| `subTotal` | *Decimal | number* | :heavy_check_mark: | The total amount of the direct costs, excluding any taxes. | | +| `taxAmount` | *Decimal | number* | :heavy_check_mark: | The total amount of tax on the direct costs. | | +| `totalAmount` | *Decimal | number* | :heavy_check_mark: | The amount of the direct costs, inclusive of tax. | | +| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier of the direct cost, unique for the company. | | | `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingdirectcosts.md b/lending/docs/sdk/models/shared/accountingdirectcosts.md index 77553119f..5c9a10d25 100644 --- a/lending/docs/sdk/models/shared/accountingdirectcosts.md +++ b/lending/docs/sdk/models/shared/accountingdirectcosts.md @@ -1,31 +1,23 @@ -# AccountingDirectCosts - -## Example Usage - -```typescript -import { AccountingDirectCosts } from "@codat/lending/sdk/models/shared"; - -let value: AccountingDirectCosts = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingDirectCost](../../../sdk/models/shared/accountingdirectcost.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingDirectCosts + +## Example Usage + +```typescript +import { AccountingDirectCosts } from "@codat/lending/sdk/models/shared"; + +let value: AccountingDirectCosts = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingDirectCost](../../../sdk/models/shared/accountingdirectcost.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingdirectincome.md b/lending/docs/sdk/models/shared/accountingdirectincome.md index 87decb0a2..8c625a196 100644 --- a/lending/docs/sdk/models/shared/accountingdirectincome.md +++ b/lending/docs/sdk/models/shared/accountingdirectincome.md @@ -1,73 +1,106 @@ -# AccountingDirectIncome - -> **Language tip:** Direct incomes may also be referred to as **Receive transactions**, **Receive money transactions**, **Sales receipts**, or **Cash sales** in various accounting software. - -## 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 made at the point of sale. - -Direct incomes include: - -- Selling an item directly to a contact, and receiving payment at the point of the sale. -- Refunding an item sold at the point of sale in cash to a contact. - -Direct incomes is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction). - - -## Example Usage - -```typescript -import { AccountingDirectIncome } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingDirectIncome = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - issueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [ - { - unitAmount: new Decimal("8243.16"), - quantity: new Decimal("5231.87"), - accountRef: {}, - }, - ], - paymentAllocations: [ - { - payment: { - accountRef: {}, - currency: "GBP", - paidOnDate: "2022-10-23T00:00:00Z", - }, - allocation: { - currency: "GBP", - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - }, - ], - subTotal: new Decimal("4725.51"), - taxAmount: new Decimal("4701.76"), - totalAmount: new Decimal("6954.69"), -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier of the direct income, unique for the company. | | -| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the direct income. | | -| `note` | *string* | :heavy_minus_sign: | An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. | | -| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | N/A | | -| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lineItems` | [shared.DirectIncomeLineItem](../../../sdk/models/shared/directincomelineitem.md)[] | :heavy_check_mark: | An array of line items. | | -| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_check_mark: | N/A | | -| `subTotal` | *Decimal* | :heavy_check_mark: | The total amount of the direct incomes, excluding any taxes. | | -| `taxAmount` | *Decimal* | :heavy_check_mark: | The total amount of tax on the direct incomes. | | -| `totalAmount` | *Decimal* | :heavy_check_mark: | The amount of the direct incomes, inclusive of tax. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingDirectIncome + +> **Language tip:** Direct incomes may also be referred to as **Receive transactions**, **Receive money transactions**, **Sales receipts**, or **Cash sales** in various accounting software. + +## 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 made at the point of sale. + +Direct incomes include: + +- Selling an item directly to a contact, and receiving payment at the point of the sale. +- Refunding an item sold at the point of sale in cash to a contact. + +Direct incomes is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction). + + +## Example Usage + +```typescript +import { AccountingDirectIncome } from "@codat/lending/sdk/models/shared"; + +let value: AccountingDirectIncome = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + lineItems: [ + { + description: "string", + unitAmount: 0, + quantity: 0, + discountAmount: 0, + discountPercentage: 0, + subTotal: 0, + taxAmount: 0, + totalAmount: 0, + accountRef: { + id: "string", + name: "string", + }, + taxRateRef: { + id: "string", + name: "string", + effectiveTaxRate: 0, + }, + itemRef: { + id: "string", + name: "string", + }, + trackingCategoryRefs: [ + { + id: "string", + name: "string", + }, + ], + }, + ], + paymentAllocations: [ + { + payment: { + id: "string", + note: "string", + reference: "string", + accountRef: { + id: "string", + name: "string", + }, + currency: "GBP", + currencyRate: 0, + paidOnDate: "2022-10-23T00:00:00Z", + totalAmount: 0, + }, + allocation: { + currency: "GBP", + currencyRate: 0, + allocatedOnDate: "2022-10-23T00:00:00Z", + totalAmount: 0, + }, + }, + ], + subTotal: 0, + taxAmount: 0, + totalAmount: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier of the direct income, unique for the company. | | +| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the direct income. | | +| `note` | *string* | :heavy_minus_sign: | An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. | | +| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | A customer or supplier associated with the direct income. | | +| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `lineItems` | [shared.DirectIncomeLineItem](../../../sdk/models/shared/directincomelineitem.md)[] | :heavy_check_mark: | An array of line items. | | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_check_mark: | N/A | | +| `subTotal` | *Decimal | number* | :heavy_check_mark: | The total amount of the direct incomes, excluding any taxes. | | +| `taxAmount` | *Decimal | number* | :heavy_check_mark: | The total amount of tax on the direct incomes. | | +| `totalAmount` | *Decimal | number* | :heavy_check_mark: | The amount of the direct incomes, inclusive of tax. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingdirectincomes.md b/lending/docs/sdk/models/shared/accountingdirectincomes.md index 0afcbdad3..e281a838b 100644 --- a/lending/docs/sdk/models/shared/accountingdirectincomes.md +++ b/lending/docs/sdk/models/shared/accountingdirectincomes.md @@ -1,31 +1,23 @@ -# AccountingDirectIncomes - -## Example Usage - -```typescript -import { AccountingDirectIncomes } from "@codat/lending/sdk/models/shared"; - -let value: AccountingDirectIncomes = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingDirectIncome](../../../sdk/models/shared/accountingdirectincome.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingDirectIncomes + +## Example Usage + +```typescript +import { AccountingDirectIncomes } from "@codat/lending/sdk/models/shared"; + +let value: AccountingDirectIncomes = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingDirectIncome](../../../sdk/models/shared/accountingdirectincome.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountinginvoice.md b/lending/docs/sdk/models/shared/accountinginvoice.md index 3773b4e92..aab300201 100644 --- a/lending/docs/sdk/models/shared/accountinginvoice.md +++ b/lending/docs/sdk/models/shared/accountinginvoice.md @@ -1,108 +1,79 @@ -# AccountingInvoice - -> **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/lending-api#/schemas/Bill) for the accounts payable equivalent of bills. - -## Overview - -An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/lending-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/lending-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. - -## Example Usage - -```typescript -import { AccountingInvoice } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingInvoice = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - issueDate: "2022-10-23T00:00:00Z", - dueDate: "2022-10-23T00:00:00Z", - paidOnDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [ - { - unitAmount: new Decimal("4841.22"), - quantity: new Decimal("6798.34"), - accountRef: {}, - tracking: { - categoryRefs: [], - isBilledTo: "Unknown", - isRebilledTo: "Unknown", - recordRef: { - dataType: "journalEntry", - }, - }, - }, - ], - paymentAllocations: [ - { - payment: { - accountRef: {}, - currency: "GBP", - paidOnDate: "2022-10-23T00:00:00Z", - }, - allocation: { - currency: "GBP", - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - }, - ], - totalTaxAmount: new Decimal("5310.79"), - totalAmount: new Decimal("6998.66"), - amountDue: new Decimal("3615.85"), - status: "Submitted", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the invoice, unique to the company in the accounting software. | | -| `invoiceNumber` | *string* | :heavy_minus_sign: | Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. | | -| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | | -| `salesOrderRefs` | [shared.SalesOrderReference](../../../sdk/models/shared/salesorderreference.md)[] | :heavy_minus_sign: | List of references to related Sales orders. | | -| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `dueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `paidOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lineItems` | [shared.InvoiceLineItem](../../../sdk/models/shared/invoicelineitem.md)[] | :heavy_minus_sign: | An array of line items. | | -| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | -| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | -| `totalDiscount` | *Decimal* | :heavy_minus_sign: | Numerical value of discounts applied to the invoice. | | -| `subTotal` | *Decimal* | :heavy_minus_sign: | Total amount of the invoice excluding any taxes. | | -| `additionalTaxAmount` | *Decimal* | :heavy_minus_sign: | Additional tax amount applied to invoice. | | -| `additionalTaxPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate of any additional tax applied to the invoice. | | -| `totalTaxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax on the invoice. | | -| `totalAmount` | *Decimal* | :heavy_check_mark: | Amount of the invoice, inclusive of tax. | | -| `amountDue` | *Decimal* | :heavy_check_mark: | Amount outstanding on the invoice. | | -| `discountPercentage` | *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`. | | -| `status` | [shared.InvoiceStatus](../../../sdk/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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld).
- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`.
- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. | | -| `note` | *string* | :heavy_minus_sign: | Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingInvoice + +> **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/lending-api#/schemas/Bill) for the accounts payable equivalent of bills. + +## Overview + +An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/lending-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/lending-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. + +## Example Usage + +```typescript +import { AccountingInvoice } from "@codat/lending/sdk/models/shared"; + +let value: AccountingInvoice = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + paidOnDate: "2022-10-23T00:00:00Z", + currency: "GBP", + totalTaxAmount: 0, + totalAmount: 0, + amountDue: 0, + status: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the invoice, unique to the company in the accounting software. | | +| `invoiceNumber` | *string* | :heavy_minus_sign: | Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. | | +| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | Reference to the customer the invoice has been issued to. | | +| `salesOrderRefs` | [shared.SalesOrderReference](../../../sdk/models/shared/salesorderreference.md)[] | :heavy_minus_sign: | List of references to related Sales orders. | | +| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `dueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `paidOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `lineItems` | [shared.InvoiceLineItem](../../../sdk/models/shared/invoicelineitem.md)[] | :heavy_minus_sign: | An array of line items. | | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | +| `totalDiscount` | *Decimal | number* | :heavy_minus_sign: | Numerical value of discounts applied to the invoice. | | +| `subTotal` | *Decimal | number* | :heavy_minus_sign: | Total amount of the invoice excluding any taxes. | | +| `additionalTaxAmount` | *Decimal | number* | :heavy_minus_sign: | Additional tax amount applied to invoice. | | +| `additionalTaxPercentage` | *Decimal | number* | :heavy_minus_sign: | Percentage rate of any additional tax applied to the invoice. | | +| `totalTaxAmount` | *Decimal | number* | :heavy_check_mark: | Amount of tax on the invoice. | | +| `totalAmount` | *Decimal | number* | :heavy_check_mark: | Amount of the invoice, inclusive of tax. | | +| `amountDue` | *Decimal | number* | :heavy_check_mark: | Amount outstanding on the invoice. | | +| `discountPercentage` | *Decimal | number* | :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`. | | +| `status` | [shared.InvoiceStatus](../../../sdk/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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld).
- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`.
- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. | | +| `note` | *string* | :heavy_minus_sign: | Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountinginvoicedatatype.md b/lending/docs/sdk/models/shared/accountinginvoicedatatype.md index 850f773c8..07996bd58 100644 --- a/lending/docs/sdk/models/shared/accountinginvoicedatatype.md +++ b/lending/docs/sdk/models/shared/accountinginvoicedatatype.md @@ -1,17 +1,15 @@ -# AccountingInvoiceDataType - -The underlying data type associated to the reference `id`. - -## Example Usage - -```typescript -import { AccountingInvoiceDataType } from "@codat/lending/sdk/models/shared"; - -let value: AccountingInvoiceDataType = "salesOrders"; -``` - -## Values - -```typescript -"salesOrders" +# AccountingInvoiceDataType + +## Example Usage + +```typescript +import { AccountingInvoiceDataType } from "@codat/lending/sdk/models/shared"; + +let value: AccountingInvoiceDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountinginvoices.md b/lending/docs/sdk/models/shared/accountinginvoices.md index a286ee08e..c811284d8 100644 --- a/lending/docs/sdk/models/shared/accountinginvoices.md +++ b/lending/docs/sdk/models/shared/accountinginvoices.md @@ -1,31 +1,23 @@ -# AccountingInvoices - -## Example Usage - -```typescript -import { AccountingInvoices } from "@codat/lending/sdk/models/shared"; - -let value: AccountingInvoices = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingInvoice](../../../sdk/models/shared/accountinginvoice.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingInvoices + +## Example Usage + +```typescript +import { AccountingInvoices } from "@codat/lending/sdk/models/shared"; + +let value: AccountingInvoices = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingInvoice](../../../sdk/models/shared/accountinginvoice.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingjournal.md b/lending/docs/sdk/models/shared/accountingjournal.md index 9d4ff461e..2b4a70b02 100644 --- a/lending/docs/sdk/models/shared/accountingjournal.md +++ b/lending/docs/sdk/models/shared/accountingjournal.md @@ -1,51 +1,51 @@ -# AccountingJournal - -> **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) data type - -## 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/lending-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 software 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. - - -## Example Usage - -```typescript -import { AccountingJournal } from "@codat/lending/sdk/models/shared"; - -let value: AccountingJournal = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - createdOn: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Journal ID. | | -| `journalCode` | *string* | :heavy_minus_sign: | Native journal number or code. | | -| `name` | *string* | :heavy_minus_sign: | Journal name.
The maximum length for a journal name is 256 characters. All characters above that number will be truncated. | | -| `type` | *string* | :heavy_minus_sign: | The type of the journal. | | -| `parentId` | *string* | :heavy_minus_sign: | Parent journal ID.
If the journal is a parent journal, this value is not present. | | -| `hasChildren` | *boolean* | :heavy_minus_sign: | If the journal has child journals, this value is true. If it doesn’t, it is false. | | -| `createdOn` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `status` | [shared.JournalStatus](../../../sdk/models/shared/journalstatus.md) | :heavy_minus_sign: | Current journal status. | | +# AccountingJournal + +> **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) data type + +## 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/lending-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 software 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. + + +## Example Usage + +```typescript +import { AccountingJournal } from "@codat/lending/sdk/models/shared"; + +let value: AccountingJournal = { + createdOn: "2022-10-23T00:00:00Z", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `journalCode` | *string* | :heavy_minus_sign: | Native journal number or code. | | +| `name` | *string* | :heavy_minus_sign: | Journal name.
The maximum length for a journal name is 256 characters. All characters above that number will be truncated. | | +| `type` | *string* | :heavy_minus_sign: | The type of the journal. | | +| `parentId` | *string* | :heavy_minus_sign: | Parent journal ID.
If the journal is a parent journal, this value is not present. | | +| `hasChildren` | *boolean* | :heavy_minus_sign: | If the journal has child journals, this value is true. If it doesn’t, it is false. | | +| `createdOn` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `status` | [shared.JournalStatus](../../../sdk/models/shared/journalstatus.md) | :heavy_minus_sign: | Current journal status. | | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Journal ID. | | | `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingjournalentries.md b/lending/docs/sdk/models/shared/accountingjournalentries.md index 0eca2a6d7..a972aa7e2 100644 --- a/lending/docs/sdk/models/shared/accountingjournalentries.md +++ b/lending/docs/sdk/models/shared/accountingjournalentries.md @@ -1,31 +1,23 @@ -# AccountingJournalEntries - -## Example Usage - -```typescript -import { AccountingJournalEntries } from "@codat/lending/sdk/models/shared"; - -let value: AccountingJournalEntries = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingJournalEntry](../../../sdk/models/shared/accountingjournalentry.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingJournalEntries + +## Example Usage + +```typescript +import { AccountingJournalEntries } from "@codat/lending/sdk/models/shared"; + +let value: AccountingJournalEntries = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingJournalEntry](../../../sdk/models/shared/accountingjournalentry.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingjournalentry.md b/lending/docs/sdk/models/shared/accountingjournalentry.md index 3e9a0a23b..1f3993eb9 100644 --- a/lending/docs/sdk/models/shared/accountingjournalentry.md +++ b/lending/docs/sdk/models/shared/accountingjournalentry.md @@ -1,70 +1,53 @@ -# AccountingJournalEntry - -> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/lending-api#/schemas/Journal) data type - -## Overview - -A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/lending-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. - -## Example Usage - -```typescript -import { AccountingJournalEntry } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingJournalEntry = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - postedOn: "2022-10-23T00:00:00Z", - createdOn: "2022-10-23T00:00:00Z", - updatedOn: "2022-10-23T00:00:00Z", - journalLines: [ - { - netAmount: new Decimal("8534.44"), - accountRef: {}, - tracking: { - recordRefs: [ - { - dataType: "trackingCategories", - }, - ], - }, - }, - ], - recordRef: { - dataType: "transfers", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the journal entry for the company in the accounting software. | | -| `description` | *string* | :heavy_minus_sign: | Optional description of the journal entry. | | -| `postedOn` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `createdOn` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `updatedOn` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `journalRef` | [shared.JournalRef](../../../sdk/models/shared/journalref.md) | :heavy_minus_sign: | Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). | | -| `journalLines` | [shared.JournalLine](../../../sdk/models/shared/journalline.md)[] | :heavy_minus_sign: | An array of journal lines. | | -| `recordRef` | [shared.JournalEntryRecordRef](../../../sdk/models/shared/journalentryrecordref.md) | :heavy_minus_sign: | Links a journal entry to the underlying record that created it. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingJournalEntry + +> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/lending-api#/schemas/Journal) data type + +## Overview + +A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/lending-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. + +## Example Usage + +```typescript +import { AccountingJournalEntry } from "@codat/lending/sdk/models/shared"; + +let value: AccountingJournalEntry = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + postedOn: "2022-10-23T00:00:00Z", + createdOn: "2022-10-23T00:00:00Z", + updatedOn: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Unique identifier of the journal entry for the company in the accounting software. | | +| `description` | *string* | :heavy_minus_sign: | Optional description of the journal entry. | | +| `postedOn` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `createdOn` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `updatedOn` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `journalRef` | [shared.JournalRef](../../../sdk/models/shared/journalref.md) | :heavy_minus_sign: | Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). | | +| `journalLines` | [shared.JournalLine](../../../sdk/models/shared/journalline.md)[] | :heavy_minus_sign: | An array of journal lines. | | +| `recordRef` | [shared.JournalEntryRecordRef](../../../sdk/models/shared/journalentryrecordref.md) | :heavy_minus_sign: | Links a journal entry to the underlying record that created it. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingjournals.md b/lending/docs/sdk/models/shared/accountingjournals.md index 2e247e8ec..4ab328f49 100644 --- a/lending/docs/sdk/models/shared/accountingjournals.md +++ b/lending/docs/sdk/models/shared/accountingjournals.md @@ -1,31 +1,23 @@ -# AccountingJournals - -## Example Usage - -```typescript -import { AccountingJournals } from "@codat/lending/sdk/models/shared"; - -let value: AccountingJournals = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingJournal](../../../sdk/models/shared/accountingjournal.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingJournals + +## Example Usage + +```typescript +import { AccountingJournals } from "@codat/lending/sdk/models/shared"; + +let value: AccountingJournals = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingJournal](../../../sdk/models/shared/accountingjournal.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingpayment.md b/lending/docs/sdk/models/shared/accountingpayment.md index bb4ee32a6..39928f22f 100644 --- a/lending/docs/sdk/models/shared/accountingpayment.md +++ b/lending/docs/sdk/models/shared/accountingpayment.md @@ -1,723 +1,715 @@ -# AccountingPayment - -> **Payments or bill payments?** -> -> In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/lending-api#/schemas/Bill) and credit notes against bills. - -## Overview - -Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-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 software, 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/lending-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 software 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 - } - ] - } - ] - } - ``` - -## Example Usage - -```typescript -import { AccountingPayment } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingPayment = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - accountRef: {}, - paymentMethodRef: { - id: "EILBDVJVNUAGVKRQ", - name: "AliPay", - }, - currency: "GBP", - date: "2022-10-23T00:00:00Z", - lines: [ - { - amount: new Decimal("1110.93"), - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the payment, unique to the company in the accounting software. | | -| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | The payment method the record is linked to in the accounting or commerce software. | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | -| `totalAmount` | *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. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `note` | *string* | :heavy_minus_sign: | Any additional information associated with the payment. | | -| `lines` | [shared.PaymentLine](../../../sdk/models/shared/paymentline.md)[] | :heavy_minus_sign: | An array of payment lines. | | -| `reference` | *string* | :heavy_minus_sign: | Friendly reference for the payment. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingPayment + +> **Payments or bill payments?** +> +> In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/lending-api#/schemas/Bill) and credit notes against bills. + +## Overview + +Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-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 software, 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/lending-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 software 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 + } + ] + } + ] + } + ``` + +## Example Usage + +```typescript +import { AccountingPayment } from "@codat/lending/sdk/models/shared"; + +let value: AccountingPayment = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + currency: "GBP", + date: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the payment, unique to the company in the accounting software. | | +| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | Customer the payment is recorded against in the accounting software. | | +| `accountRef` | [shared.AccountRef](../../../sdk/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. | | +| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | The payment method the record is linked to in the accounting or commerce software. | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | +| `totalAmount` | *Decimal | number* | :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. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | +| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `note` | *string* | :heavy_minus_sign: | Any additional information associated with the payment. | | +| `lines` | [shared.PaymentLine](../../../sdk/models/shared/paymentline.md)[] | :heavy_minus_sign: | An array of payment lines. | | +| `reference` | *string* | :heavy_minus_sign: | Friendly reference for the payment. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingpaymentallocation.md b/lending/docs/sdk/models/shared/accountingpaymentallocation.md index 24f0cf9d9..f550489fd 100644 --- a/lending/docs/sdk/models/shared/accountingpaymentallocation.md +++ b/lending/docs/sdk/models/shared/accountingpaymentallocation.md @@ -1,26 +1,36 @@ -# AccountingPaymentAllocation - -## Example Usage - -```typescript -import { AccountingPaymentAllocation } from "@codat/lending/sdk/models/shared"; - -let value: AccountingPaymentAllocation = { - payment: { - accountRef: {}, - currency: "GBP", - paidOnDate: "2022-10-23T00:00:00Z", - }, - allocation: { - currency: "GBP", - allocatedOnDate: "2022-10-23T00:00:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `payment` | [shared.PaymentAllocationPayment](../../../sdk/models/shared/paymentallocationpayment.md) | :heavy_check_mark: | N/A | +# AccountingPaymentAllocation + +## Example Usage + +```typescript +import { AccountingPaymentAllocation } from "@codat/lending/sdk/models/shared"; + +let value: AccountingPaymentAllocation = { + payment: { + id: "string", + note: "string", + reference: "string", + accountRef: { + id: "string", + name: "string", + }, + currency: "GBP", + currencyRate: 0, + paidOnDate: "2022-10-23T00:00:00Z", + totalAmount: 0, + }, + allocation: { + currency: "GBP", + currencyRate: 0, + allocatedOnDate: "2022-10-23T00:00:00Z", + totalAmount: 0, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `payment` | [shared.PaymentAllocationPayment](../../../sdk/models/shared/paymentallocationpayment.md) | :heavy_check_mark: | N/A | | `allocation` | [shared.Allocation](../../../sdk/models/shared/allocation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingpayments.md b/lending/docs/sdk/models/shared/accountingpayments.md index f84d459fb..ef3afacd6 100644 --- a/lending/docs/sdk/models/shared/accountingpayments.md +++ b/lending/docs/sdk/models/shared/accountingpayments.md @@ -1,31 +1,23 @@ -# AccountingPayments - -## Example Usage - -```typescript -import { AccountingPayments } from "@codat/lending/sdk/models/shared"; - -let value: AccountingPayments = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingPayment](../../../sdk/models/shared/accountingpayment.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingPayments + +## Example Usage + +```typescript +import { AccountingPayments } from "@codat/lending/sdk/models/shared"; + +let value: AccountingPayments = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingPayment](../../../sdk/models/shared/accountingpayment.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingprofitandlossreport.md b/lending/docs/sdk/models/shared/accountingprofitandlossreport.md index 8361235b8..0f7297372 100644 --- a/lending/docs/sdk/models/shared/accountingprofitandlossreport.md +++ b/lending/docs/sdk/models/shared/accountingprofitandlossreport.md @@ -1,55 +1,224 @@ -# AccountingProfitAndLossReport - -> **Language tip:** Profit and loss statement is also referred to as **income statement** under US GAAP (Generally Accepted Accounting Principles). - -## 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 software. - -**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/lending-api#/operations/post-profile-syncSettings). - -**Want to pull this in a standardised structure?** -Our [Enhanced Financials](https://docs.codat.io/lending/features/financial-statements-overview) endpoints provide the same report under standardized headings, allowing you to pull it in the same format for all of your business customers. - -## Example Usage - -```typescript -import { AccountingProfitAndLossReport } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountingProfitAndLossReport = { - reports: [ - { - fromDate: "2022-10-23T00:00:00Z", - toDate: "2022-10-23T00:00:00Z", - grossProfit: new Decimal("3835.5"), - netOperatingProfit: new Decimal("2637.95"), - netOtherIncome: new Decimal("5247.66"), - netProfit: new Decimal("7952.54"), - }, - ], - reportBasis: "Unknown", - mostRecentAvailableMonth: "2022-10-23T00:00:00Z", - earliestAvailableMonth: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `reports` | [shared.ProfitAndLossReport](../../../sdk/models/shared/profitandlossreport.md)[] | :heavy_check_mark: | An array of profit and loss reports. | | -| `reportBasis` | [shared.ReportBasis](../../../sdk/models/shared/reportbasis.md) | :heavy_check_mark: | The basis of a report. | | -| `currency` | *string* | :heavy_minus_sign: | Base currency of the company in which the profit and loss report is presented. | | -| `mostRecentAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# AccountingProfitAndLossReport + +> **Language tip:** Profit and loss statement is also referred to as **income statement** under US GAAP (Generally Accepted Accounting Principles). + +## 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 software. + +**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/lending-api#/operations/post-profile-syncSettings). + +**Want to pull this in a standardised structure?** +Our [Enhanced Financials](https://docs.codat.io/lending/features/financial-statements-overview) endpoints provide the same report under standardized headings, allowing you to pull it in the same format for all of your business customers. + +## Example Usage + +```typescript +import { AccountingProfitAndLossReport } from "@codat/lending/sdk/models/shared"; + +let value: AccountingProfitAndLossReport = { + reports: [ + { + fromDate: "2022-10-23T00:00:00Z", + toDate: "2022-10-23T00:00:00Z", + income: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + costOfSales: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + grossProfit: 0, + expenses: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + netOperatingProfit: 0, + otherExpenses: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + otherIncome: { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [ + { + accountId: "string", + name: "string", + value: 0, + items: [], + }, + ], + }, + ], + }, + ], + }, + ], + }, + netOtherIncome: 0, + netProfit: 0, + }, + ], + reportBasis: "string", + mostRecentAvailableMonth: "2022-10-23T00:00:00Z", + earliestAvailableMonth: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `reports` | [shared.ProfitAndLossReport](../../../sdk/models/shared/profitandlossreport.md)[] | :heavy_check_mark: | An array of profit and loss reports. | | +| `reportBasis` | [shared.ReportBasis](../../../sdk/models/shared/reportbasis.md) | :heavy_check_mark: | The basis of a report. | | +| `currency` | *string* | :heavy_minus_sign: | Base currency of the company in which the profit and loss report is presented. | | +| `mostRecentAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `earliestAvailableMonth` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingrecordref.md b/lending/docs/sdk/models/shared/accountingrecordref.md index d6695813b..321d27b58 100644 --- a/lending/docs/sdk/models/shared/accountingrecordref.md +++ b/lending/docs/sdk/models/shared/accountingrecordref.md @@ -1,22 +1,22 @@ -# AccountingRecordRef - -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. - -## Example Usage - -```typescript -import { AccountingRecordRef } from "@codat/lending/sdk/models/shared"; - -let value: AccountingRecordRef = { - dataType: "journalEntry", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | +# AccountingRecordRef + +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. + +## Example Usage + +```typescript +import { AccountingRecordRef } from "@codat/lending/sdk/models/shared"; + +let value: AccountingRecordRef = { + dataType: "journalEntry", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | | `dataType` | *string* | :heavy_minus_sign: | Allowed name of the 'dataType'. | **Example 1:** journalEntry
**Example 2:** invoice
**Example 3:** accountTransaction
**Example 4:** transfer | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingsupplier.md b/lending/docs/sdk/models/shared/accountingsupplier.md index 78b21ff36..7d83e8663 100644 --- a/lending/docs/sdk/models/shared/accountingsupplier.md +++ b/lending/docs/sdk/models/shared/accountingsupplier.md @@ -1,69 +1,70 @@ -# AccountingSupplier - -## Overview - -From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/lending-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/lending-api#/schemas/Bill). - -## Example Usage - -```typescript -import { AccountingSupplier } from "@codat/lending/sdk/models/shared"; - -let value: AccountingSupplier = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", - supplierName: "Kelly's Industrial Supplies", - contactName: "Kelly's Industrial Supplies", - emailAddress: "sales@kellysupplies.com", - phone: "07999 999999", - addresses: [ - { - type: "Billing", - line1: "Unit 51", - line2: "Bakersfield Industrial Estate", - city: "Bakersfield", - region: "California", - country: "USA", - }, - ], - registrationNumber: "string", - taxNumber: "string", - status: "Unknown", - defaultCurrency: "string", - metadata: { - isDeleted: true, - }, - supplementalData: { - content: { - "property1": { - "property1": "", - "property2": "", - }, - "property2": { - "property1": "", - "property2": "", - }, - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting software. | | -| `supplierName` | *string* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | -| `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the supplier. | | -| `emailAddress` | *string* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | -| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | -| `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | | -| `registrationNumber` | *string* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | -| `taxNumber` | *string* | :heavy_minus_sign: | Supplier's company tax number. | | -| `status` | [shared.SupplierStatus](../../../sdk/models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | -| `defaultCurrency` | *string* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingSupplier + +## Overview + +From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/lending-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/lending-api#/schemas/Bill). + +## Example Usage + +```typescript +import { AccountingSupplier } from "@codat/lending/sdk/models/shared"; + +let value: AccountingSupplier = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + supplierName: "Kelly's Industrial Supplies", + contactName: "Kelly's Industrial Supplies", + emailAddress: "sales@kellysupplies.com", + phone: "07999 999999", + addresses: [ + { + type: "Billing", + line1: "Unit 51", + line2: "Bakersfield Industrial Estate", + city: "Bakersfield", + region: "California", + country: "USA", + postalcode: "93308", + }, + ], + registrationNumber: "string", + taxNumber: "string", + status: "Unknown", + defaultCurrency: "string", + metadata: { + isDeleted: true, + }, + supplementalData: { + content: { + "property1": { + "property1": "None", + "property2": "None", + }, + "property2": { + "property1": "None", + "property2": "None", + }, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting software. | | +| `supplierName` | *string* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | +| `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the supplier. | | +| `emailAddress` | *string* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | +| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | +| `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | | +| `registrationNumber` | *string* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | +| `taxNumber` | *string* | :heavy_minus_sign: | Supplier's company tax number. | | +| `status` | [shared.SupplierStatus](../../../sdk/models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | +| `defaultCurrency` | *string* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingsuppliers.md b/lending/docs/sdk/models/shared/accountingsuppliers.md index 20456b879..bfcd002ac 100644 --- a/lending/docs/sdk/models/shared/accountingsuppliers.md +++ b/lending/docs/sdk/models/shared/accountingsuppliers.md @@ -1,31 +1,23 @@ -# AccountingSuppliers - -## Example Usage - -```typescript -import { AccountingSuppliers } from "@codat/lending/sdk/models/shared"; - -let value: AccountingSuppliers = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingSupplier](../../../sdk/models/shared/accountingsupplier.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingSuppliers + +## Example Usage + +```typescript +import { AccountingSuppliers } from "@codat/lending/sdk/models/shared"; + +let value: AccountingSuppliers = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingSupplier](../../../sdk/models/shared/accountingsupplier.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingtransfer.md b/lending/docs/sdk/models/shared/accountingtransfer.md index 8e651d8b8..13494c1b4 100644 --- a/lending/docs/sdk/models/shared/accountingtransfer.md +++ b/lending/docs/sdk/models/shared/accountingtransfer.md @@ -1,50 +1,33 @@ -# AccountingTransfer - -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/lending-api#/schemas/AccountTransaction). - -## Example Usage - -```typescript -import { AccountingTransfer } from "@codat/lending/sdk/models/shared"; - -let value: AccountingTransfer = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - date: "2022-10-23T00:00:00Z", - from: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - to: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - depositedRecordRefs: [ - { - dataType: "journalEntry", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for the transfer. | | -| `description` | *string* | :heavy_minus_sign: | Description of the transfer. | | -| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | N/A | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `from` | [shared.TransferAccount](../../../sdk/models/shared/transferaccount.md) | :heavy_minus_sign: | Account details of the account sending or receiving the transfer. | | -| `to` | [shared.TransferAccount](../../../sdk/models/shared/transferaccount.md) | :heavy_minus_sign: | Account details of the account sending or receiving the transfer. | | -| `status` | [shared.AccountingTransferStatus](../../../sdk/models/shared/accountingtransferstatus.md) | :heavy_minus_sign: | The status of the transfer in the account | | -| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Reference to the tracking categories this transfer is being tracked against. | | -| `depositedRecordRefs` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.md)[] | :heavy_minus_sign: | List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. | | -| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +# AccountingTransfer + +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/lending-api#/schemas/AccountTransaction). + +## Example Usage + +```typescript +import { AccountingTransfer } from "@codat/lending/sdk/models/shared"; + +let value: AccountingTransfer = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + date: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the transfer. | | +| `description` | *string* | :heavy_minus_sign: | Description of the transfer. | | +| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | The customer or supplier for the transfer, if available. | | +| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `from` | [shared.TransferAccount](../../../sdk/models/shared/transferaccount.md) | :heavy_minus_sign: | Account details of the account sending or receiving the transfer. | | +| `to` | [shared.TransferAccount](../../../sdk/models/shared/transferaccount.md) | :heavy_minus_sign: | Account details of the account sending or receiving the transfer. | | +| `status` | [shared.AccountingTransferStatus](../../../sdk/models/shared/accountingtransferstatus.md) | :heavy_minus_sign: | The status of the transfer in the account | | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Reference to the tracking categories this transfer is being tracked against. | | +| `depositedRecordRefs` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.md)[] | :heavy_minus_sign: | List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingtransfers.md b/lending/docs/sdk/models/shared/accountingtransfers.md index 2ff0695fc..d3a9a14ea 100644 --- a/lending/docs/sdk/models/shared/accountingtransfers.md +++ b/lending/docs/sdk/models/shared/accountingtransfers.md @@ -1,31 +1,23 @@ -# AccountingTransfers - -## Example Usage - -```typescript -import { AccountingTransfers } from "@codat/lending/sdk/models/shared"; - -let value: AccountingTransfers = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.AccountingTransfer](../../../sdk/models/shared/accountingtransfer.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# AccountingTransfers + +## Example Usage + +```typescript +import { AccountingTransfers } from "@codat/lending/sdk/models/shared"; + +let value: AccountingTransfers = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.AccountingTransfer](../../../sdk/models/shared/accountingtransfer.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountingtransferstatus.md b/lending/docs/sdk/models/shared/accountingtransferstatus.md index 1e0d62d15..b717cd1d4 100644 --- a/lending/docs/sdk/models/shared/accountingtransferstatus.md +++ b/lending/docs/sdk/models/shared/accountingtransferstatus.md @@ -1,17 +1,15 @@ -# AccountingTransferStatus - -The status of the transfer in the account - -## Example Usage - -```typescript -import { AccountingTransferStatus } from "@codat/lending/sdk/models/shared"; - -let value: AccountingTransferStatus = "Reconciled"; -``` - -## Values - -```typescript -"Unknown" | "Unreconciled" | "Reconciled" | "Void" +# AccountingTransferStatus + +## Example Usage + +```typescript +import { AccountingTransferStatus } from "@codat/lending/sdk/models/shared"; + +let value: AccountingTransferStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountinstitution.md b/lending/docs/sdk/models/shared/accountinstitution.md index 51995f6e9..31fc71603 100644 --- a/lending/docs/sdk/models/shared/accountinstitution.md +++ b/lending/docs/sdk/models/shared/accountinstitution.md @@ -1,18 +1,18 @@ -# AccountInstitution - -The bank or other financial institution providing the account. - -## Example Usage - -```typescript -import { AccountInstitution } from "@codat/lending/sdk/models/shared"; - -let value: AccountInstitution = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | The institution's ID, according to the provider. | +# AccountInstitution + +The bank or other financial institution providing the account. + +## Example Usage + +```typescript +import { AccountInstitution } from "@codat/lending/sdk/models/shared"; + +let value: AccountInstitution = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | The institution's ID, according to the provider. | | `name` | *string* | :heavy_minus_sign: | The institution's name, according to the underlying provider. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountprototype.md b/lending/docs/sdk/models/shared/accountprototype.md index d8bdb08a4..981edf21b 100644 --- a/lending/docs/sdk/models/shared/accountprototype.md +++ b/lending/docs/sdk/models/shared/accountprototype.md @@ -1,38 +1,36 @@ -# AccountPrototype - -## Example Usage - -```typescript -import { AccountPrototype } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: AccountPrototype = { - nominalCode: "610", - name: "Accounts Receivable", - description: - "Invoices the business has issued but has not yet collected payment on.", - fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Cash On Hand", - currency: "GBP", - currentBalance: new Decimal("0"), - type: "Asset", - status: "Active", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `nominalCode` | *string* | :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 | -| `name` | *string* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | -| `description` | *string* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | -| `fullyQualifiedCategory` | *string* | :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 | -| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | **Example 1:** Cash On Hand
**Example 2:** Fixed Asset | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currentBalance` | *Decimal* | :heavy_minus_sign: | Current balance in the account. | 0 | -| `type` | [shared.AccountType](../../../sdk/models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | -| `status` | [shared.AccountStatus](../../../sdk/models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | -| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | -| `validDatatypeLinks` | [shared.AccountPrototypeValidDataTypeLinks](../../../sdk/models/shared/accountprototypevaliddatatypelinks.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](/lending-api#/schemas/ValidDataTypeLinks). | | +# AccountPrototype + +## Example Usage + +```typescript +import { AccountPrototype } from "@codat/lending/sdk/models/shared"; + +let value: AccountPrototype = { + nominalCode: "610", + name: "Accounts Receivable", + description: "Invoices the business has issued but has not yet collected payment on.", + fullyQualifiedCategory: "Asset.Current", + fullyQualifiedName: "Cash On Hand", + currency: "GBP", + currentBalance: 0, + type: "Asset", + status: "Active", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `nominalCode` | *string* | :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 | +| `name` | *string* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | +| `description` | *string* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | +| `fullyQualifiedCategory` | *string* | :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 | +| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | **Example 1:** Cash On Hand
**Example 2:** Fixed Asset | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currentBalance` | *Decimal | number* | :heavy_minus_sign: | Current balance in the account. | 0 | +| `type` | [shared.AccountType](../../../sdk/models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | +| `status` | [shared.AccountStatus](../../../sdk/models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | +| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | +| `validDatatypeLinks` | [shared.AccountPrototypeValidDataTypeLinks](../../../sdk/models/shared/accountprototypevaliddatatypelinks.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](/lending-api#/schemas/ValidDataTypeLinks). | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountprototypevaliddatatypelinks.md b/lending/docs/sdk/models/shared/accountprototypevaliddatatypelinks.md index 77fb9e705..e8bb325da 100644 --- a/lending/docs/sdk/models/shared/accountprototypevaliddatatypelinks.md +++ b/lending/docs/sdk/models/shared/accountprototypevaliddatatypelinks.md @@ -1,57 +1,16 @@ -# AccountPrototypeValidDataTypeLinks - -When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. - -For example, `validDatatypeLinks` might indicate the following references: - -- Which tax rates are valid to use on the line item of a bill. -- Which items can be used when creating an invoice. - -You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. - -## `validDatatypeLinks` example - -The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. - -```json validDatatypeLinks for an account -{ - "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - "nominalCode": "090", - "name": "Business Bank Account", - #... - "validDatatypeLinks": [ - { - "property": "Id", - "links": [ - "Payment.AccountRef.Id", - "BillPayment.AccountRef.Id", - "DirectIncome.LineItems.AccountRef.Id", - "DirectCost.LineItems.AccountRef.Id" - ] - } - ] - } -``` - - - -## Support for `validDatatypeLinks` - -Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. - -If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. - -## Example Usage - -```typescript -import { AccountPrototypeValidDataTypeLinks } from "@codat/lending/sdk/models/shared"; - -let value: AccountPrototypeValidDataTypeLinks = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | -| `links` | *string*[] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. | \ No newline at end of file +# AccountPrototypeValidDataTypeLinks + +## Example Usage + +```typescript +import { AccountPrototypeValidDataTypeLinks } from "@codat/lending/sdk/models/shared"; + +let value: AccountPrototypeValidDataTypeLinks = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `links` | *string*[] | :heavy_minus_sign: | N/A | +| `property` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountref.md b/lending/docs/sdk/models/shared/accountref.md index 29dbaa11c..01c6890a4 100644 --- a/lending/docs/sdk/models/shared/accountref.md +++ b/lending/docs/sdk/models/shared/accountref.md @@ -1,18 +1,18 @@ -# AccountRef - -An account reference containing the account id and name. - -## Example Usage - -```typescript -import { AccountRef } from "@codat/lending/sdk/models/shared"; - -let value: AccountRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `id` | *string* | :heavy_minus_sign: | The id of the account. | -| `name` | *string* | :heavy_minus_sign: | The name of the account. | \ No newline at end of file +# AccountRef + +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. + +## Example Usage + +```typescript +import { AccountRef } from "@codat/lending/sdk/models/shared"; + +let value: AccountRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' from the Accounts data type. | +| `name` | *string* | :heavy_minus_sign: | 'name' from the Accounts data type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accounts.md b/lending/docs/sdk/models/shared/accounts.md index 0cc12bb61..aa52ca016 100644 --- a/lending/docs/sdk/models/shared/accounts.md +++ b/lending/docs/sdk/models/shared/accounts.md @@ -1,24 +1,32 @@ -# Accounts - -## Example Usage - -```typescript -import { Accounts } from "@codat/lending/sdk/models/shared"; - -let value: Accounts = { - sourceRef: {}, - currency: "GBP", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sourceRef` | [shared.ReportSourceReference](../../../sdk/models/shared/reportsourcereference.md) | :heavy_minus_sign: | A source reference containing the `sourceType` object "Banking". | {
"Example": {
"value": {
"sourceRef": {
"sourceType": "Banking"
}
}
}
} | -| `platformName` | *string* | :heavy_minus_sign: | Name of the banking data source, e.g. "Plaid". | | -| `accountProvider` | *string* | :heavy_minus_sign: | The bank or other financial institution providing the account. | | -| `accountName` | *string* | :heavy_minus_sign: | The name of the account according to the provider. | | -| `accountType` | *string* | :heavy_minus_sign: | The type of banking account, e.g. credit or debit. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currentBalance` | *Decimal* | :heavy_minus_sign: | The balance of the bank account. | | \ No newline at end of file +# Accounts + +## Example Usage + +```typescript +import { Accounts } from "@codat/lending/sdk/models/shared"; + +let value: Accounts = { + sourceRef: { + Example: { + value: { + sourceRef: { + sourceType: "Banking", + }, + }, + }, + }, + currency: "GBP", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sourceRef` | [shared.ReportSourceReference](../../../sdk/models/shared/reportsourcereference.md) | :heavy_minus_sign: | A source reference containing the `sourceType` object "Banking". | {
"Example": {
"value": {
"sourceRef": {
"sourceType": "Banking"
}
}
}
} | +| `platformName` | *string* | :heavy_minus_sign: | Name of the banking data source, e.g. "Plaid". | | +| `accountProvider` | *string* | :heavy_minus_sign: | The bank or other financial institution providing the account. | | +| `accountName` | *string* | :heavy_minus_sign: | The name of the account according to the provider. | | +| `accountType` | *string* | :heavy_minus_sign: | The type of banking account, e.g. credit or debit. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `currentBalance` | *Decimal | number* | :heavy_minus_sign: | The balance of the bank account. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountspayabletracking.md b/lending/docs/sdk/models/shared/accountspayabletracking.md index 06ba2963b..f878254da 100644 --- a/lending/docs/sdk/models/shared/accountspayabletracking.md +++ b/lending/docs/sdk/models/shared/accountspayabletracking.md @@ -1,29 +1,30 @@ -# AccountsPayableTracking - -Categories, and a project and customer, against which the item is tracked. - -## Example Usage - -```typescript -import { AccountsPayableTracking } from "@codat/lending/sdk/models/shared"; - -let value: AccountsPayableTracking = { - categoryRefs: [ - { - id: "", - }, - ], - isBilledTo: "Project", - isRebilledTo: "Customer", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `categoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_check_mark: | N/A | -| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | -| `projectRef` | [shared.ProjectRef](../../../sdk/models/shared/projectref.md) | :heavy_minus_sign: | N/A | -| `isBilledTo` | [shared.BilledToType](../../../sdk/models/shared/billedtotype.md) | :heavy_check_mark: | Defines if the invoice or credit note is billed/rebilled to a project or customer. | +# AccountsPayableTracking + +Categories, and a project and customer, against which the item is tracked. + +## Example Usage + +```typescript +import { AccountsPayableTracking } from "@codat/lending/sdk/models/shared"; + +let value: AccountsPayableTracking = { + categoryRefs: [ + { + id: "string", + name: "string", + }, + ], + isBilledTo: "string", + isRebilledTo: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `categoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_check_mark: | N/A | +| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | +| `projectRef` | [shared.ProjectRef](../../../sdk/models/shared/projectref.md) | :heavy_minus_sign: | N/A | +| `isBilledTo` | [shared.BilledToType](../../../sdk/models/shared/billedtotype.md) | :heavy_check_mark: | Defines if the invoice or credit note is billed/rebilled to a project or customer. | | `isRebilledTo` | [shared.BilledToType](../../../sdk/models/shared/billedtotype.md) | :heavy_check_mark: | Defines if the invoice or credit note is billed/rebilled to a project or customer. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accountsreceivabletracking.md b/lending/docs/sdk/models/shared/accountsreceivabletracking.md index 77c1bcff4..3f59a5d81 100644 --- a/lending/docs/sdk/models/shared/accountsreceivabletracking.md +++ b/lending/docs/sdk/models/shared/accountsreceivabletracking.md @@ -1,29 +1,31 @@ -# AccountsReceivableTracking - -Categories, and a project and customer, against which the item is tracked. - -## Example Usage - -```typescript -import { AccountsReceivableTracking } from "@codat/lending/sdk/models/shared"; - -let value: AccountsReceivableTracking = { - categoryRefs: [], - isBilledTo: "Unknown", - isRebilledTo: "Project", - recordRef: { - dataType: "journalEntry", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `categoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_check_mark: | N/A | -| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | -| `projectRef` | [shared.ProjectRef](../../../sdk/models/shared/projectref.md) | :heavy_minus_sign: | N/A | -| `isBilledTo` | [shared.BilledToType1](../../../sdk/models/shared/billedtotype1.md) | :heavy_check_mark: | Defines if the bill or bill credit note is billed/rebilled to a project. | -| `isRebilledTo` | [shared.BilledToType1](../../../sdk/models/shared/billedtotype1.md) | :heavy_check_mark: | Defines if the bill or bill credit note is billed/rebilled to a project. | +# AccountsReceivableTracking + +Categories, and a project and customer, against which the item is tracked. + +## Example Usage + +```typescript +import { AccountsReceivableTracking } from "@codat/lending/sdk/models/shared"; + +let value: AccountsReceivableTracking = { + categoryRefs: [ + { + id: "string", + name: "string", + }, + ], + isBilledTo: "string", + isRebilledTo: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `categoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_check_mark: | N/A | +| `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | +| `projectRef` | [shared.ProjectRef](../../../sdk/models/shared/projectref.md) | :heavy_minus_sign: | N/A | +| `isBilledTo` | [shared.BilledToType1](../../../sdk/models/shared/billedtotype1.md) | :heavy_check_mark: | Defines if the bill or bill credit note is billed/rebilled to a project. | +| `isRebilledTo` | [shared.BilledToType1](../../../sdk/models/shared/billedtotype1.md) | :heavy_check_mark: | Defines if the bill or bill credit note is billed/rebilled to a project. | | `recordRef` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.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/lending/docs/sdk/models/shared/accountstatus.md b/lending/docs/sdk/models/shared/accountstatus.md index 8ef5a6e28..9297b9da1 100644 --- a/lending/docs/sdk/models/shared/accountstatus.md +++ b/lending/docs/sdk/models/shared/accountstatus.md @@ -1,17 +1,17 @@ -# AccountStatus - -Status of the account - -## Example Usage - -```typescript -import { AccountStatus } from "@codat/lending/sdk/models/shared"; - -let value: AccountStatus = "Active"; -``` - -## Values - -```typescript -"Unknown" | "Active" | "Archived" | "Pending" +# AccountStatus + +Status of the account + +## Example Usage + +```typescript +import { AccountStatus } from "@codat/lending/sdk/models/shared"; + +let value: AccountStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" | "Pending" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accounttransactionline.md b/lending/docs/sdk/models/shared/accounttransactionline.md index 528bca44a..dd277e91b 100644 --- a/lending/docs/sdk/models/shared/accounttransactionline.md +++ b/lending/docs/sdk/models/shared/accounttransactionline.md @@ -1,21 +1,17 @@ -# AccountTransactionLine - -## Example Usage - -```typescript -import { AccountTransactionLine } from "@codat/lending/sdk/models/shared"; - -let value: AccountTransactionLine = { - recordRef: { - dataType: "transfers", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Description of the account transaction. | -| `recordRef` | [shared.AccountTransactionLineRecordRef](../../../sdk/models/shared/accounttransactionlinerecordref.md) | :heavy_minus_sign: | Links an account transaction line to the underlying record that created it. | -| `amount` | *Decimal* | :heavy_minus_sign: | Amount in the bill payment currency. | \ No newline at end of file +# AccountTransactionLine + +## Example Usage + +```typescript +import { AccountTransactionLine } from "@codat/lending/sdk/models/shared"; + +let value: AccountTransactionLine = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Description of the account transaction. | +| `recordRef` | [shared.AccountTransactionLineRecordRef](../../../sdk/models/shared/accounttransactionlinerecordref.md) | :heavy_minus_sign: | N/A | +| `amount` | *Decimal | number* | :heavy_minus_sign: | Amount in the bill payment currency. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accounttransactionlinerecordref.md b/lending/docs/sdk/models/shared/accounttransactionlinerecordref.md index 7a5055879..7a70e3839 100644 --- a/lending/docs/sdk/models/shared/accounttransactionlinerecordref.md +++ b/lending/docs/sdk/models/shared/accounttransactionlinerecordref.md @@ -1,20 +1,18 @@ -# AccountTransactionLineRecordRef - -Links an account transaction line to the underlying record that created it. - -## Example Usage - -```typescript -import { AccountTransactionLineRecordRef } from "@codat/lending/sdk/models/shared"; - -let value: AccountTransactionLineRecordRef = { - dataType: "transfers", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | -| `dataType` | [shared.AccountTransactionLineRecordRefDataType](../../../sdk/models/shared/accounttransactionlinerecordrefdatatype.md) | :heavy_minus_sign: | Name of underlying data type. | transfers | \ No newline at end of file +# AccountTransactionLineRecordRef + +Links an account transaction line to the underlying record that created it. + +## Example Usage + +```typescript +import { AccountTransactionLineRecordRef } from "@codat/lending/sdk/models/shared"; + +let value: AccountTransactionLineRecordRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | +| `dataType` | [shared.AccountTransactionLineRecordRefDataType](../../../sdk/models/shared/accounttransactionlinerecordrefdatatype.md) | :heavy_minus_sign: | Name of underlying data type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accounttransactionlinerecordrefdatatype.md b/lending/docs/sdk/models/shared/accounttransactionlinerecordrefdatatype.md index d4d785f35..ec2d08f87 100644 --- a/lending/docs/sdk/models/shared/accounttransactionlinerecordrefdatatype.md +++ b/lending/docs/sdk/models/shared/accounttransactionlinerecordrefdatatype.md @@ -1,17 +1,15 @@ -# AccountTransactionLineRecordRefDataType - -Name of underlying data type. - -## Example Usage - -```typescript -import { AccountTransactionLineRecordRefDataType } from "@codat/lending/sdk/models/shared"; - -let value: AccountTransactionLineRecordRefDataType = "transfers"; -``` - -## Values - -```typescript -"bankTransactions" | "billCreditNotes" | "billPayments" | "bills" | "creditNotes" | "directCosts" | "directIncomes" | "invoices" | "journalEntries" | "payments" | "transfers" +# AccountTransactionLineRecordRefDataType + +## Example Usage + +```typescript +import { AccountTransactionLineRecordRefDataType } from "@codat/lending/sdk/models/shared"; + +let value: AccountTransactionLineRecordRefDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/accounttype.md b/lending/docs/sdk/models/shared/accounttype.md index 3eac52c24..24b489ca5 100644 --- a/lending/docs/sdk/models/shared/accounttype.md +++ b/lending/docs/sdk/models/shared/accounttype.md @@ -1,17 +1,17 @@ -# AccountType - -Type of account - -## Example Usage - -```typescript -import { AccountType } from "@codat/lending/sdk/models/shared"; - -let value: AccountType = "Asset"; -``` - -## Values - -```typescript -"Unknown" | "Asset" | "Expense" | "Income" | "Liability" | "Equity" +# AccountType + +Type of account + +## Example Usage + +```typescript +import { AccountType } from "@codat/lending/sdk/models/shared"; + +let value: AccountType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/agedcreditor.md b/lending/docs/sdk/models/shared/agedcreditor.md index df881a5ab..9e7bb9858 100644 --- a/lending/docs/sdk/models/shared/agedcreditor.md +++ b/lending/docs/sdk/models/shared/agedcreditor.md @@ -1,31 +1,20 @@ -# AgedCreditor - -## Example Usage - -```typescript -import { AgedCreditor } from "@codat/lending/sdk/models/shared"; - -let value: AgedCreditor = { - supplierId: "f594cefb-7750-4c3a-bab2-b5322026dee9", - supplierName: "John Doe", - agedCurrencyOutstanding: [ - { - currency: "GBP", - agedOutstandingAmounts: [ - { - fromDate: "2022-10-23T00:00:00Z", - toDate: "2022-10-23T00:00:00Z", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `supplierId` | *string* | :heavy_minus_sign: | Supplier ID of the aged creditor. | f594cefb-7750-4c3a-bab2-b5322026dee9 | -| `supplierName` | *string* | :heavy_minus_sign: | Supplier name of the aged creditor. | John Doe | +# AgedCreditor + +## Example Usage + +```typescript +import { AgedCreditor } from "@codat/lending/sdk/models/shared"; + +let value: AgedCreditor = { + supplierId: "f594cefb-7750-4c3a-bab2-b5322026dee9", + supplierName: "John Doe", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `supplierId` | *string* | :heavy_minus_sign: | Supplier ID of the aged creditor. | f594cefb-7750-4c3a-bab2-b5322026dee9 | +| `supplierName` | *string* | :heavy_minus_sign: | Supplier name of the aged creditor. | John Doe | | `agedCurrencyOutstanding` | [shared.AgedCurrencyOutstanding](../../../sdk/models/shared/agedcurrencyoutstanding.md)[] | :heavy_minus_sign: | Array of aged creditors by currency. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/agedcurrencyoutstanding.md b/lending/docs/sdk/models/shared/agedcurrencyoutstanding.md index ac06a1422..ea57b9ce2 100644 --- a/lending/docs/sdk/models/shared/agedcurrencyoutstanding.md +++ b/lending/docs/sdk/models/shared/agedcurrencyoutstanding.md @@ -1,24 +1,18 @@ -# AgedCurrencyOutstanding - -## Example Usage - -```typescript -import { AgedCurrencyOutstanding } from "@codat/lending/sdk/models/shared"; - -let value: AgedCurrencyOutstanding = { - currency: "GBP", - agedOutstandingAmounts: [ - { - fromDate: "2022-10-23T00:00:00Z", - toDate: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +# AgedCurrencyOutstanding + +## Example Usage + +```typescript +import { AgedCurrencyOutstanding } from "@codat/lending/sdk/models/shared"; + +let value: AgedCurrencyOutstanding = { + currency: "GBP", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `agedOutstandingAmounts` | [shared.AgedOutstandingAmount](../../../sdk/models/shared/agedoutstandingamount.md)[] | :heavy_minus_sign: | Array of outstanding amounts by period. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/ageddebtor.md b/lending/docs/sdk/models/shared/ageddebtor.md index 5a77ab2b0..71242eda5 100644 --- a/lending/docs/sdk/models/shared/ageddebtor.md +++ b/lending/docs/sdk/models/shared/ageddebtor.md @@ -1,31 +1,20 @@ -# AgedDebtor - -## Example Usage - -```typescript -import { AgedDebtor } from "@codat/lending/sdk/models/shared"; - -let value: AgedDebtor = { - customerId: "f594cefb-7750-4c3a-bab2-b5322026dee9", - customerName: "John Doe", - agedCurrencyOutstanding: [ - { - currency: "GBP", - agedOutstandingAmounts: [ - { - fromDate: "2022-10-23T00:00:00Z", - toDate: "2022-10-23T00:00:00Z", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `customerId` | *string* | :heavy_minus_sign: | Customer ID of the aged debtor. | f594cefb-7750-4c3a-bab2-b5322026dee9 | -| `customerName` | *string* | :heavy_minus_sign: | Customer name of the aged debtor. | John Doe | +# AgedDebtor + +## Example Usage + +```typescript +import { AgedDebtor } from "@codat/lending/sdk/models/shared"; + +let value: AgedDebtor = { + customerId: "f594cefb-7750-4c3a-bab2-b5322026dee9", + customerName: "John Doe", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `customerId` | *string* | :heavy_minus_sign: | Customer ID of the aged debtor. | f594cefb-7750-4c3a-bab2-b5322026dee9 | +| `customerName` | *string* | :heavy_minus_sign: | Customer name of the aged debtor. | John Doe | | `agedCurrencyOutstanding` | [shared.AgedCurrencyOutstanding](../../../sdk/models/shared/agedcurrencyoutstanding.md)[] | :heavy_minus_sign: | Array of aged debtors by currency. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/agedoutstandingamount.md b/lending/docs/sdk/models/shared/agedoutstandingamount.md index 21e9c955f..a69c4f364 100644 --- a/lending/docs/sdk/models/shared/agedoutstandingamount.md +++ b/lending/docs/sdk/models/shared/agedoutstandingamount.md @@ -1,21 +1,21 @@ -# AgedOutstandingAmount - -## Example Usage - -```typescript -import { AgedOutstandingAmount } from "@codat/lending/sdk/models/shared"; - -let value: AgedOutstandingAmount = { - fromDate: "2022-10-23T00:00:00Z", - toDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fromDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `toDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `amount` | *Decimal* | :heavy_minus_sign: | The amount outstanding. | | +# AgedOutstandingAmount + +## Example Usage + +```typescript +import { AgedOutstandingAmount } from "@codat/lending/sdk/models/shared"; + +let value: AgedOutstandingAmount = { + fromDate: "2022-10-23T00:00:00Z", + toDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `fromDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `toDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The amount outstanding. | | | `details` | [shared.AgedOutstandingAmountDetail](../../../sdk/models/shared/agedoutstandingamountdetail.md)[] | :heavy_minus_sign: | Array of details. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/agedoutstandingamountdetail.md b/lending/docs/sdk/models/shared/agedoutstandingamountdetail.md index dd9542606..dba0387b2 100644 --- a/lending/docs/sdk/models/shared/agedoutstandingamountdetail.md +++ b/lending/docs/sdk/models/shared/agedoutstandingamountdetail.md @@ -1,16 +1,16 @@ -# AgedOutstandingAmountDetail - -## Example Usage - -```typescript -import { AgedOutstandingAmountDetail } from "@codat/lending/sdk/models/shared"; - -let value: AgedOutstandingAmountDetail = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | Name of data type with outstanding amount for given period. | -| `amount` | *Decimal* | :heavy_minus_sign: | The amount outstanding. | \ No newline at end of file +# AgedOutstandingAmountDetail + +## Example Usage + +```typescript +import { AgedOutstandingAmountDetail } from "@codat/lending/sdk/models/shared"; + +let value: AgedOutstandingAmountDetail = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | Name of data type with outstanding amount for given period. | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The amount outstanding. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/allocation.md b/lending/docs/sdk/models/shared/allocation.md index 141cb9a5f..e132923f0 100644 --- a/lending/docs/sdk/models/shared/allocation.md +++ b/lending/docs/sdk/models/shared/allocation.md @@ -1,21 +1,18 @@ -# Allocation - -## Example Usage - -```typescript -import { Allocation } from "@codat/lending/sdk/models/shared"; - -let value: Allocation = { - currency: "GBP", - allocatedOnDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `allocatedOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file +# Allocation + +## Example Usage + +```typescript +import { Allocation } from "@codat/lending/sdk/models/shared"; + +let value: Allocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `currency` | *string* | :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. | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | +| `allocatedOnDate` | *string* | :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. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | The total amount that has been allocated. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/attachments.md b/lending/docs/sdk/models/shared/attachments.md index edd9312ea..4daf81ba1 100644 --- a/lending/docs/sdk/models/shared/attachments.md +++ b/lending/docs/sdk/models/shared/attachments.md @@ -1,23 +1,15 @@ -# Attachments - -## Example Usage - -```typescript -import { Attachments } from "@codat/lending/sdk/models/shared"; - -let value: Attachments = { - attachments: [ - { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - dateCreated: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +# Attachments + +## Example Usage + +```typescript +import { Attachments } from "@codat/lending/sdk/models/shared"; + +let value: Attachments = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | `attachments` | [shared.AccountingAttachment](../../../sdk/models/shared/accountingattachment.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/balancesheet.md b/lending/docs/sdk/models/shared/balancesheet.md index b5c956051..72572016c 100644 --- a/lending/docs/sdk/models/shared/balancesheet.md +++ b/lending/docs/sdk/models/shared/balancesheet.md @@ -1,23 +1,19 @@ -# BalanceSheet - -## Example Usage - -```typescript -import { BalanceSheet } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: BalanceSheet = { - date: "2022-10-23T00:00:00Z", - netAssets: new Decimal("6387.85"), -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `assets` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `liabilities` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `netAssets` | *Decimal* | :heavy_check_mark: | Value of net assets for a company in their base currency. | | -| `equity` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# BalanceSheet + +## Example Usage + +```typescript +import { BalanceSheet } from "@codat/lending/sdk/models/shared"; + +let value: BalanceSheet = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `date` | *string* | :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. | +| `assets` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLines for assets. For example, fixed and current assets. | +| `liabilities` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLines for liabilities. For example, current liabilities. | +| `netAssets` | *Decimal | number* | :heavy_check_mark: | Value of net assets for a company in their base currency. | +| `equity` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLines for equities. For example, retained and current year earnings. See below. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankaccountref.md b/lending/docs/sdk/models/shared/bankaccountref.md index ceff227b2..b9f978a05 100644 --- a/lending/docs/sdk/models/shared/bankaccountref.md +++ b/lending/docs/sdk/models/shared/bankaccountref.md @@ -1,18 +1,18 @@ -# BankAccountRef - -Links to the Account transactions data type. - -## Example Usage - -```typescript -import { BankAccountRef } from "@codat/lending/sdk/models/shared"; - -let value: BankAccountRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | Bank account 'id' for the account transaction. | +# BankAccountRef + +Links to the Account transactions data type. + +## Example Usage + +```typescript +import { BankAccountRef } from "@codat/lending/sdk/models/shared"; + +let value: BankAccountRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | Bank account 'id' for the account transaction. | | `name` | *string* | :heavy_minus_sign: | bank account 'name' for the account transaction. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankaccountstatus.md b/lending/docs/sdk/models/shared/bankaccountstatus.md index 0efa709b1..4a310333b 100644 --- a/lending/docs/sdk/models/shared/bankaccountstatus.md +++ b/lending/docs/sdk/models/shared/bankaccountstatus.md @@ -1,17 +1,17 @@ -# BankAccountStatus - -Status of the bank account. - -## Example Usage - -```typescript -import { BankAccountStatus } from "@codat/lending/sdk/models/shared"; - -let value: BankAccountStatus = "Active"; -``` - -## Values - -```typescript -"Unknown" | "Active" | "Archived" | "Pending" +# BankAccountStatus + +Status of the bank account. + +## Example Usage + +```typescript +import { BankAccountStatus } from "@codat/lending/sdk/models/shared"; + +let value: BankAccountStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" | "Pending" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankfeedbankaccountmapping.md b/lending/docs/sdk/models/shared/bankfeedbankaccountmapping.md index 5dac2e88f..074c0fdb6 100644 --- a/lending/docs/sdk/models/shared/bankfeedbankaccountmapping.md +++ b/lending/docs/sdk/models/shared/bankfeedbankaccountmapping.md @@ -1,20 +1,20 @@ -# BankFeedBankAccountMapping - -## Example Usage - -```typescript -import { BankFeedBankAccountMapping } from "@codat/lending/sdk/models/shared"; - -let value: BankFeedBankAccountMapping = { - sourceAccountId: "acc-002", - targetAccountId: "account-081", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sourceAccountId` | *string* | :heavy_check_mark: | Unique ID for the source account | | -| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account | | +# BankFeedBankAccountMapping + +## Example Usage + +```typescript +import { BankFeedBankAccountMapping } from "@codat/lending/sdk/models/shared"; + +let value: BankFeedBankAccountMapping = { + sourceAccountId: "acc-002", + targetAccountId: "account-081", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sourceAccountId` | *string* | :heavy_check_mark: | Unique ID for the source account | | +| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account | | | `feedStartDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankfeedbankaccountmappingresponse.md b/lending/docs/sdk/models/shared/bankfeedbankaccountmappingresponse.md index aba817643..de8eb19b8 100644 --- a/lending/docs/sdk/models/shared/bankfeedbankaccountmappingresponse.md +++ b/lending/docs/sdk/models/shared/bankfeedbankaccountmappingresponse.md @@ -1,23 +1,23 @@ -# BankFeedBankAccountMappingResponse - -## Example Usage - -```typescript -import { BankFeedBankAccountMappingResponse } from "@codat/lending/sdk/models/shared"; - -let value: BankFeedBankAccountMappingResponse = { - sourceAccountId: "acc-002", - targetAccountId: "account-081", - status: "Failed", - error: "A feed connection already exists to this account", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `sourceAccountId` | *string* | :heavy_minus_sign: | Unique ID for the source account. | -| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account. | -| `status` | *string* | :heavy_minus_sign: | Status of the POST request. | +# BankFeedBankAccountMappingResponse + +## Example Usage + +```typescript +import { BankFeedBankAccountMappingResponse } from "@codat/lending/sdk/models/shared"; + +let value: BankFeedBankAccountMappingResponse = { + sourceAccountId: "acc-002", + targetAccountId: "account-081", + status: "Failed", + error: "A feed connection already exists to this account", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `sourceAccountId` | *string* | :heavy_minus_sign: | Unique ID for the source account. | +| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account. | +| `status` | *string* | :heavy_minus_sign: | Status of the POST request. | | `error` | *string* | :heavy_minus_sign: | Error returned during the post request | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankfeedmapping.md b/lending/docs/sdk/models/shared/bankfeedmapping.md index e23513990..9cb2cb305 100644 --- a/lending/docs/sdk/models/shared/bankfeedmapping.md +++ b/lending/docs/sdk/models/shared/bankfeedmapping.md @@ -1,37 +1,36 @@ -# BankFeedMapping - -A bank feed connection between a source account and a target account, including potential target accounts. - -## Example Usage - -```typescript -import { BankFeedMapping } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: BankFeedMapping = { - sourceAccountId: "acc-002", - sourceAccountName: "ACME Bank", - sourceAccountNumber: "1234-5678", - sourceBalance: new Decimal("500"), - sourceCurrency: "USD", - targetAccountId: "account-081", - targetAccountName: "ACME Bank", - status: "Success", - feedStartDate: "2023-01-09T14:14:14.1057478Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sourceAccountId` | *string* | :heavy_minus_sign: | Unique ID for the source account. | | -| `sourceAccountName` | *string* | :heavy_minus_sign: | Name for the source account. | | -| `sourceAccountNumber` | *string* | :heavy_minus_sign: | Account number for the source account. | | -| `sourceBalance` | *Decimal* | :heavy_minus_sign: | Balance for the source account. | | -| `sourceCurrency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account in the accounting software. | | -| `targetAccountName` | *string* | :heavy_minus_sign: | Name for the target account in the accounting software. | | -| `status` | *string* | :heavy_minus_sign: | The status. | | -| `targetAccountOptions` | [shared.TargetAccountOption](../../../sdk/models/shared/targetaccountoption.md)[] | :heavy_minus_sign: | An array of potential target accounts. | | +# BankFeedMapping + +A bank feed connection between a source account and a target account, including potential target accounts. + +## Example Usage + +```typescript +import { BankFeedMapping } from "@codat/lending/sdk/models/shared"; + +let value: BankFeedMapping = { + sourceAccountId: "acc-002", + sourceAccountName: "ACME Bank", + sourceAccountNumber: "1234-5678", + sourceBalance: 500, + sourceCurrency: "USD", + targetAccountId: "account-081", + targetAccountName: "ACME Bank", + status: "Success", + feedStartDate: "2023-01-09T14:14:14.1057478Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sourceAccountId` | *string* | :heavy_minus_sign: | Unique ID for the source account. | | +| `sourceAccountName` | *string* | :heavy_minus_sign: | Name for the source account. | | +| `sourceAccountNumber` | *string* | :heavy_minus_sign: | Account number for the source account. | | +| `sourceBalance` | *Decimal | number* | :heavy_minus_sign: | Balance for the source account. | | +| `sourceCurrency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account in the accounting software. | | +| `targetAccountName` | *string* | :heavy_minus_sign: | Name for the target account in the accounting software. | | +| `status` | *string* | :heavy_minus_sign: | The status. | | +| `targetAccountOptions` | [shared.TargetAccountOption](../../../sdk/models/shared/targetaccountoption.md)[] | :heavy_minus_sign: | An array of potential target accounts. | | | `feedStartDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingaccount.md b/lending/docs/sdk/models/shared/bankingaccount.md index 336971f80..a715662f4 100644 --- a/lending/docs/sdk/models/shared/bankingaccount.md +++ b/lending/docs/sdk/models/shared/bankingaccount.md @@ -1,39 +1,29 @@ -# BankingAccount - -This data type provides a list of all the SMB's bank accounts, with rich data like balances, account numbers, and institutions holding the accounts. - -Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. - -## Example Usage - -```typescript -import { BankingAccount } from "@codat/lending/sdk/models/shared"; - -let value: BankingAccount = { - id: "", - name: "", - type: "Unknown", - balance: {}, - identifiers: { - type: "Card", - }, - currency: "Sri Lanka Rupee", - institution: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | The ID of the account from the provider. | | -| `name` | *string* | :heavy_check_mark: | The name of the account according to the provider. | | -| `informalName` | *string* | :heavy_minus_sign: | The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. | | -| `holder` | *string* | :heavy_minus_sign: | The name of the person or company who holds the account. | | -| `type` | [shared.AccountingBankAccountType](../../../sdk/models/shared/accountingbankaccounttype.md) | :heavy_check_mark: | 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. | | -| `balance` | [shared.AccountBalanceAmounts](../../../sdk/models/shared/accountbalanceamounts.md) | :heavy_check_mark: | Depending on the data provided by the underlying bank, not all balances are always available. | | -| `identifiers` | [shared.AccountIdentifiers](../../../sdk/models/shared/accountidentifiers.md) | :heavy_check_mark: | An object containing bank account identification information. | | -| `currency` | *string* | :heavy_check_mark: | The currency code for the account. | | +# BankingAccount + +This data type provides a list of all the SMB's bank accounts, with rich data like balances, account numbers, and institutions holding the accounts. + +Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. + +## Example Usage + +```typescript +import { BankingAccount } from "@codat/lending/sdk/models/shared"; + +let value: BankingAccount = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_check_mark: | The ID of the account from the provider. | | +| `name` | *string* | :heavy_check_mark: | The name of the account according to the provider. | | +| `informalName` | *string* | :heavy_minus_sign: | The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. | | +| `holder` | *string* | :heavy_minus_sign: | The name of the person or company who holds the account. | | +| `type` | [shared.AccountingBankAccountType](../../../sdk/models/shared/accountingbankaccounttype.md) | :heavy_check_mark: | 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. | | +| `balance` | [shared.AccountBalanceAmounts](../../../sdk/models/shared/accountbalanceamounts.md) | :heavy_check_mark: | Depending on the data provided by the underlying bank, not all balances are always available. | | +| `identifiers` | [shared.AccountIdentifiers](../../../sdk/models/shared/accountidentifiers.md) | :heavy_check_mark: | An object containing bank account identification information. | | +| `currency` | *string* | :heavy_check_mark: | The currency code for the account. | | | `institution` | [shared.AccountInstitution](../../../sdk/models/shared/accountinstitution.md) | :heavy_check_mark: | The bank or other financial institution providing the account. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingaccountbalance.md b/lending/docs/sdk/models/shared/bankingaccountbalance.md index 32fd75f39..91f3356d2 100644 --- a/lending/docs/sdk/models/shared/bankingaccountbalance.md +++ b/lending/docs/sdk/models/shared/bankingaccountbalance.md @@ -1,33 +1,29 @@ -# BankingAccountBalance - -The Banking Account Balances data type provides a list of balances for a bank account including end-of-day batch balance or running balances per transaction. - -Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. - -> **How often should I pull Account Balances?** -> -> Because these balances are closing balances, we recommend you pull Account Balance no more frequently than daily. If you require a live intraday balance, this can be found for each account on the [Account](https://docs.codat.io/lending-api#/schemas/Account) data type. -> -> Whilst you can choose to sync hourly, this may incur usage charges from Plaid or TrueLayer. - -## Example Usage - -```typescript -import { BankingAccountBalance } from "@codat/lending/sdk/models/shared"; - -let value: BankingAccountBalance = { - accountId: "", - balance: {}, - date: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `accountId` | *string* | :heavy_check_mark: | The unique identifier of the account. | | -| `balance` | [shared.AccountBalanceAmounts](../../../sdk/models/shared/accountbalanceamounts.md) | :heavy_check_mark: | Depending on the data provided by the underlying bank, not all balances are always available. | | +# BankingAccountBalance + +The Banking Account Balances data type provides a list of balances for a bank account including end-of-day batch balance or running balances per transaction. + +Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. + +> **How often should I pull Account Balances?** +> +> Because these balances are closing balances, we recommend you pull Account Balance no more frequently than daily. If you require a live intraday balance, this can be found for each account on the [Account](https://docs.codat.io/lending-api#/schemas/Account) data type. +> +> Whilst you can choose to sync hourly, this may incur usage charges from Plaid or TrueLayer. + +## Example Usage + +```typescript +import { BankingAccountBalance } from "@codat/lending/sdk/models/shared"; + +let value: BankingAccountBalance = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `accountId` | *string* | :heavy_check_mark: | The unique identifier of the account. | | +| `balance` | [shared.AccountBalanceAmounts](../../../sdk/models/shared/accountbalanceamounts.md) | :heavy_check_mark: | Depending on the data provided by the underlying bank, not all balances are always available. | | | `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingaccountbalances.md b/lending/docs/sdk/models/shared/bankingaccountbalances.md index e524d1e70..c33ca8a73 100644 --- a/lending/docs/sdk/models/shared/bankingaccountbalances.md +++ b/lending/docs/sdk/models/shared/bankingaccountbalances.md @@ -1,31 +1,23 @@ -# BankingAccountBalances - -## Example Usage - -```typescript -import { BankingAccountBalances } from "@codat/lending/sdk/models/shared"; - -let value: BankingAccountBalances = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.BankingAccountBalance](../../../sdk/models/shared/bankingaccountbalance.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# BankingAccountBalances + +## Example Usage + +```typescript +import { BankingAccountBalances } from "@codat/lending/sdk/models/shared"; + +let value: BankingAccountBalances = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.BankingAccountBalance](../../../sdk/models/shared/bankingaccountbalance.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingaccounts.md b/lending/docs/sdk/models/shared/bankingaccounts.md index b287b1c8c..1163eb7bf 100644 --- a/lending/docs/sdk/models/shared/bankingaccounts.md +++ b/lending/docs/sdk/models/shared/bankingaccounts.md @@ -1,31 +1,23 @@ -# BankingAccounts - -## Example Usage - -```typescript -import { BankingAccounts } from "@codat/lending/sdk/models/shared"; - -let value: BankingAccounts = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.BankingAccount](../../../sdk/models/shared/bankingaccount.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# BankingAccounts + +## Example Usage + +```typescript +import { BankingAccounts } from "@codat/lending/sdk/models/shared"; + +let value: BankingAccounts = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.BankingAccount](../../../sdk/models/shared/bankingaccount.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingtransaction.md b/lending/docs/sdk/models/shared/bankingtransaction.md index 8a462ed79..06d888520 100644 --- a/lending/docs/sdk/models/shared/bankingtransaction.md +++ b/lending/docs/sdk/models/shared/bankingtransaction.md @@ -1,46 +1,44 @@ -# BankingTransaction - -The Banking Transactions data type provides an immutable source of up-to-date information on income and expenditure. - -Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. - -## Example Usage - -```typescript -import { BankingTransaction } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: BankingTransaction = { - modifiedDate: "2022-05-23T16:32:50Z", - sourceModifiedDate: "2021-06-28T10:48:12", - id: "0130b5bb-1419-40f6-8a27-7362d0381229", - accountId: "1703194f-7805-4da8-bac0-2ba5da4a4216", - description: - "Payments for direct income ce149943-c157-43fc-aac7-42a716b655b6", - amount: new Decimal("5062.39"), - currency: "GBP", - postedDate: "2021-07-06T00:00:00", - authorizedDate: "2021-07-06T00:00:00", - merchantName: "New Look", - transactionCategoryRef: { - id: "health-and-fitness-sports", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | The unique identifier of the bank transaction. | | -| `accountId` | *string* | :heavy_check_mark: | The unique identifier of the bank account. | | -| `description` | *string* | :heavy_minus_sign: | The description of the bank transaction. | | -| `amount` | *Decimal* | :heavy_minus_sign: | The amount of the bank transaction. | | -| `currency` | *string* | :heavy_check_mark: | The currency of the bank transaction. | | -| `postedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `authorizedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `code` | [shared.TransactionCode](../../../sdk/models/shared/transactioncode.md) | :heavy_minus_sign: | Code to identify the underlying transaction. | | -| `merchantName` | *string* | :heavy_minus_sign: | The name of the merchant. | | +# BankingTransaction + +The Banking Transactions data type provides an immutable source of up-to-date information on income and expenditure. + +Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. + +## Example Usage + +```typescript +import { BankingTransaction } from "@codat/lending/sdk/models/shared"; + +let value: BankingTransaction = { + modifiedDate: "2022-05-23T16:32:50Z", + sourceModifiedDate: "2021-06-28T10:48:12", + id: "0130b5bb-1419-40f6-8a27-7362d0381229", + accountId: "1703194f-7805-4da8-bac0-2ba5da4a4216", + description: "Payments for direct income ce149943-c157-43fc-aac7-42a716b655b6", + amount: 5062.39, + currency: "GBP", + postedDate: "2021-07-06T00:00:00", + authorizedDate: "2021-07-06T00:00:00", + merchantName: "New Look", + transactionCategoryRef: { + id: "health-and-fitness-sports", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the bank transaction. | | +| `accountId` | *string* | :heavy_check_mark: | The unique identifier of the bank account. | | +| `description` | *string* | :heavy_minus_sign: | The description of the bank transaction. | | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The amount of the bank transaction. | | +| `currency` | *string* | :heavy_check_mark: | The currency of the bank transaction. | | +| `postedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `authorizedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `code` | [shared.TransactionCode](../../../sdk/models/shared/transactioncode.md) | :heavy_minus_sign: | Code to identify the underlying transaction. | | +| `merchantName` | *string* | :heavy_minus_sign: | The name of the merchant. | | | `transactionCategoryRef` | [shared.TransactionCategoryRef](../../../sdk/models/shared/transactioncategoryref.md) | :heavy_minus_sign: | An object of bank transaction category reference data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingtransactioncategories.md b/lending/docs/sdk/models/shared/bankingtransactioncategories.md index 396f358a7..1c3167048 100644 --- a/lending/docs/sdk/models/shared/bankingtransactioncategories.md +++ b/lending/docs/sdk/models/shared/bankingtransactioncategories.md @@ -1,31 +1,23 @@ -# BankingTransactionCategories - -## Example Usage - -```typescript -import { BankingTransactionCategories } from "@codat/lending/sdk/models/shared"; - -let value: BankingTransactionCategories = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.BankingTransactionCategory](../../../sdk/models/shared/bankingtransactioncategory.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# BankingTransactionCategories + +## Example Usage + +```typescript +import { BankingTransactionCategories } from "@codat/lending/sdk/models/shared"; + +let value: BankingTransactionCategories = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.BankingTransactionCategory](../../../sdk/models/shared/bankingtransactioncategory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingtransactioncategory.md b/lending/docs/sdk/models/shared/bankingtransactioncategory.md index 76b0649d9..e3ac516bf 100644 --- a/lending/docs/sdk/models/shared/bankingtransactioncategory.md +++ b/lending/docs/sdk/models/shared/bankingtransactioncategory.md @@ -1,32 +1,32 @@ -# BankingTransactionCategory - -The Banking Transaction Categories data type provides a list of hierarchical categories associated with a transaction for greater contextual meaning to transaction activity. - -Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. - -## Example Usage - -```typescript -import { BankingTransactionCategory } from "@codat/lending/sdk/models/shared"; - -let value: BankingTransactionCategory = { - modifiedDate: "2022-05-23T16:32:50", - sourceModifiedDate: "2021-04-24T07:59:10", - id: "auto-and-transport", - name: "Auto & Transport", - hasChildren: true, - status: "Active", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | The unique identifier of the bank transaction category. | | -| `name` | *string* | :heavy_check_mark: | The name of the bank transaction category. | | -| `parentId` | *string* | :heavy_minus_sign: | The unique identifier of the parent bank transaction category. | | -| `hasChildren` | *boolean* | :heavy_minus_sign: | A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. | | +# BankingTransactionCategory + +The Banking Transaction Categories data type provides a list of hierarchical categories associated with a transaction for greater contextual meaning to transaction activity. + +Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. + +## Example Usage + +```typescript +import { BankingTransactionCategory } from "@codat/lending/sdk/models/shared"; + +let value: BankingTransactionCategory = { + modifiedDate: "2022-05-23T16:32:50", + sourceModifiedDate: "2021-04-24T07:59:10", + id: "auto-and-transport", + name: "Auto & Transport", + hasChildren: true, + status: "Active", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the bank transaction category. | | +| `name` | *string* | :heavy_check_mark: | The name of the bank transaction category. | | +| `parentId` | *string* | :heavy_minus_sign: | The unique identifier of the parent bank transaction category. | | +| `hasChildren` | *boolean* | :heavy_minus_sign: | A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. | | | `status` | [shared.TransactionCategoryStatus](../../../sdk/models/shared/transactioncategorystatus.md) | :heavy_minus_sign: | The status of the transaction category. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingtransactionref.md b/lending/docs/sdk/models/shared/bankingtransactionref.md index 2f743705a..02247ed9b 100644 --- a/lending/docs/sdk/models/shared/bankingtransactionref.md +++ b/lending/docs/sdk/models/shared/bankingtransactionref.md @@ -1,23 +1,21 @@ -# BankingTransactionRef - -## Example Usage - -```typescript -import { BankingTransactionRef } from "@codat/lending/sdk/models/shared"; - -let value: BankingTransactionRef = { - date: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for the bank transaction. | | -| `dataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier of the bank transaction's connection. | | -| `accountId` | *string* | :heavy_minus_sign: | Unique identifier of the bank transaction's account. | | -| `accountName` | *string* | :heavy_minus_sign: | Name given to account. | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `description` | *string* | :heavy_minus_sign: | Description given to bank transaction. | | -| `amount` | *Decimal* | :heavy_minus_sign: | Bank transaction amount. | | \ No newline at end of file +# BankingTransactionRef + +## Example Usage + +```typescript +import { BankingTransactionRef } from "@codat/lending/sdk/models/shared"; + +let value: BankingTransactionRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the bank transaction. | +| `dataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier of the bank transaction's connection. | +| `accountId` | *string* | :heavy_minus_sign: | Unique identifier of the bank transaction's account. | +| `accountName` | *string* | :heavy_minus_sign: | Name given to account. | +| `date` | *string* | :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. | +| `description` | *string* | :heavy_minus_sign: | Description given to bank transaction. | +| `amount` | *Decimal | number* | :heavy_minus_sign: | Bank transaction amount. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankingtransactions.md b/lending/docs/sdk/models/shared/bankingtransactions.md index 6297ed384..bf23f58b3 100644 --- a/lending/docs/sdk/models/shared/bankingtransactions.md +++ b/lending/docs/sdk/models/shared/bankingtransactions.md @@ -1,31 +1,23 @@ -# BankingTransactions - -## Example Usage - -```typescript -import { BankingTransactions } from "@codat/lending/sdk/models/shared"; - -let value: BankingTransactions = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.BankingTransaction](../../../sdk/models/shared/bankingtransaction.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# BankingTransactions + +## Example Usage + +```typescript +import { BankingTransactions } from "@codat/lending/sdk/models/shared"; + +let value: BankingTransactions = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.BankingTransaction](../../../sdk/models/shared/bankingtransaction.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/bankstatementuploadconfiguration.md b/lending/docs/sdk/models/shared/bankstatementuploadconfiguration.md index 1d19b3da8..a20a0b3c6 100644 --- a/lending/docs/sdk/models/shared/bankstatementuploadconfiguration.md +++ b/lending/docs/sdk/models/shared/bankstatementuploadconfiguration.md @@ -1,19 +1,19 @@ -# BankStatementUploadConfiguration - -Configuration settings for uploading banking data to Codat - -## Example Usage - -```typescript -import { BankStatementUploadConfiguration } from "@codat/lending/sdk/models/shared"; - -let value: BankStatementUploadConfiguration = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `source` | [shared.Source](../../../sdk/models/shared/source.md) | :heavy_minus_sign: | The source of the banking data that determines its format | -| `accountId` | *string* | :heavy_minus_sign: | The ID of the account in the third-party platform | +# BankStatementUploadConfiguration + +Configuration settings for uploading banking data to Codat + +## Example Usage + +```typescript +import { BankStatementUploadConfiguration } from "@codat/lending/sdk/models/shared"; + +let value: BankStatementUploadConfiguration = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `source` | [shared.Source](../../../sdk/models/shared/source.md) | :heavy_minus_sign: | The source of the banking data that determines its format | +| `accountId` | *string* | :heavy_minus_sign: | The ID of the account in the third-party platform | | `providerId` | *string* | :heavy_minus_sign: | TrueLayer provider ID (only required if source is TrueLayer) | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/banktransactiontype.md b/lending/docs/sdk/models/shared/banktransactiontype.md index 7e2191dd2..dded8d136 100644 --- a/lending/docs/sdk/models/shared/banktransactiontype.md +++ b/lending/docs/sdk/models/shared/banktransactiontype.md @@ -1,17 +1,17 @@ -# BankTransactionType - -Type of transaction for the bank statement line. - -## Example Usage - -```typescript -import { BankTransactionType } from "@codat/lending/sdk/models/shared"; - -let value: BankTransactionType = "RepeatPmt"; -``` - -## Values - -```typescript -"Unknown" | "Credit" | "Debit" | "Int" | "Div" | "Fee" | "SerChg" | "Dep" | "Atm" | "Pos" | "Xfer" | "Check" | "Payment" | "Cash" | "DirectDep" | "DirectDebit" | "RepeatPmt" | "Other" +# BankTransactionType + +Type of transaction for the bank statement line. + +## Example Usage + +```typescript +import { BankTransactionType } from "@codat/lending/sdk/models/shared"; + +let value: BankTransactionType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Credit" | "Debit" | "Int" | "Div" | "Fee" | "SerChg" | "Dep" | "Atm" | "Pos" | "Xfer" | "Check" | "Payment" | "Cash" | "DirectDep" | "DirectDebit" | "RepeatPmt" | "Other" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billcreditnotelineitem.md b/lending/docs/sdk/models/shared/billcreditnotelineitem.md index 85365d3f7..a5ce39975 100644 --- a/lending/docs/sdk/models/shared/billcreditnotelineitem.md +++ b/lending/docs/sdk/models/shared/billcreditnotelineitem.md @@ -1,34 +1,29 @@ -# BillCreditNoteLineItem - -## Example Usage - -```typescript -import { BillCreditNoteLineItem } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: BillCreditNoteLineItem = { - unitAmount: new Decimal("6195.07"), - quantity: new Decimal("2177.71"), - accountRef: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Friendly name of each line item. For example, the goods or service for which credit has been received. | | -| `unitAmount` | *Decimal* | :heavy_check_mark: | Unit price of the goods or service. | | -| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of the goods or service for which credit has been received. | | -| `unitOfMeasurement` | *string* | :heavy_minus_sign: | The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). | | -| `discountAmount` | *Decimal* | :heavy_minus_sign: | Value of any discounts applied. | | -| `subTotal` | *Decimal* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | | -| `taxAmount` | *Decimal* | :heavy_minus_sign: | Amount of tax associated with the line item. | | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `discountPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | | -| `taxRateRef` | [shared.TaxRateReference](../../../sdk/models/shared/taxratereference.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 | | -| `itemRef` | [shared.ItemReference](../../../sdk/models/shared/itemreference.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | | -| `createdFromLineRef` | [shared.Zero](../../../sdk/models/shared/zero.md) | :heavy_minus_sign: | Links the current record line to the underlying record line that created it.

For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. | | -| ~~`trackingCategoryRefs`~~ | [shared.TrackingCategoryRef](../../../sdk/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. | | -| `tracking` | [shared.AccountsPayableTracking](../../../sdk/models/shared/accountspayabletracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | | \ No newline at end of file +# BillCreditNoteLineItem + +## Example Usage + +```typescript +import { BillCreditNoteLineItem } from "@codat/lending/sdk/models/shared"; + +let value: BillCreditNoteLineItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `description` | *string* | :heavy_minus_sign: | Friendly name of each line item. For example, the goods or service for which credit has been received. | +| `unitAmount` | *Decimal | number* | :heavy_check_mark: | Unit price of the goods or service. | +| `quantity` | *Decimal | number* | :heavy_check_mark: | Number of units of the goods or service for which credit has been received. | +| `unitOfMeasurement` | *string* | :heavy_minus_sign: | The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). | +| `discountAmount` | *Decimal | number* | :heavy_minus_sign: | Value of any discounts applied. | +| `subTotal` | *Decimal | number* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | +| `taxAmount` | *Decimal | number* | :heavy_minus_sign: | Amount of tax associated with the line item. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | N/A | +| `discountPercentage` | *Decimal | number* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | +| `taxRateRef` | [shared.TaxRateReference](../../../sdk/models/shared/taxratereference.md) | :heavy_minus_sign: | N/A | +| `itemRef` | [shared.ItemReference](../../../sdk/models/shared/itemreference.md) | :heavy_minus_sign: | N/A | +| `createdFromLineRef` | [shared.Zero](../../../sdk/models/shared/zero.md) | :heavy_minus_sign: | Reference to the line of the item that the current line was created from. | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Reference to the tracking categories to which the line item is linked. | +| `tracking` | [shared.AccountsPayableTracking](../../../sdk/models/shared/accountspayabletracking.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billcreditnotestatus.md b/lending/docs/sdk/models/shared/billcreditnotestatus.md index 0eba074ea..02178191c 100644 --- a/lending/docs/sdk/models/shared/billcreditnotestatus.md +++ b/lending/docs/sdk/models/shared/billcreditnotestatus.md @@ -1,17 +1,17 @@ -# BillCreditNoteStatus - -Current state of the bill credit note - -## Example Usage - -```typescript -import { BillCreditNoteStatus } from "@codat/lending/sdk/models/shared"; - -let value: BillCreditNoteStatus = "Paid"; -``` - -## Values - -```typescript -"Unknown" | "Draft" | "Submitted" | "Paid" | "Void" | "PartiallyPaid" +# BillCreditNoteStatus + +Current state of the bill credit note + +## Example Usage + +```typescript +import { BillCreditNoteStatus } from "@codat/lending/sdk/models/shared"; + +let value: BillCreditNoteStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Draft" | "Submitted" | "Paid" | "Void" | "PartiallyPaid" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billedtotype.md b/lending/docs/sdk/models/shared/billedtotype.md index 38915c431..7927df79f 100644 --- a/lending/docs/sdk/models/shared/billedtotype.md +++ b/lending/docs/sdk/models/shared/billedtotype.md @@ -1,17 +1,17 @@ -# BilledToType - -Defines if the invoice or credit note is billed/rebilled to a project or customer. - -## Example Usage - -```typescript -import { BilledToType } from "@codat/lending/sdk/models/shared"; - -let value: BilledToType = "Project"; -``` - -## Values - -```typescript -"Unknown" | "NotApplicable" | "Customer" | "Project" +# BilledToType + +Defines if the invoice or credit note is billed/rebilled to a project or customer. + +## Example Usage + +```typescript +import { BilledToType } from "@codat/lending/sdk/models/shared"; + +let value: BilledToType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "NotApplicable" | "Customer" | "Project" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billedtotype1.md b/lending/docs/sdk/models/shared/billedtotype1.md index 72f136eae..b15fe8ce6 100644 --- a/lending/docs/sdk/models/shared/billedtotype1.md +++ b/lending/docs/sdk/models/shared/billedtotype1.md @@ -1,17 +1,17 @@ -# BilledToType1 - -Defines if the bill or bill credit note is billed/rebilled to a project. - -## Example Usage - -```typescript -import { BilledToType1 } from "@codat/lending/sdk/models/shared"; - -let value: BilledToType1 = "Project"; -``` - -## Values - -```typescript -"Unknown" | "NotApplicable" | "Project" +# BilledToType1 + +Defines if the bill or bill credit note is billed/rebilled to a project. + +## Example Usage + +```typescript +import { BilledToType1 } from "@codat/lending/sdk/models/shared"; + +let value: BilledToType1 = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "NotApplicable" | "Project" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billlineitem.md b/lending/docs/sdk/models/shared/billlineitem.md index 7445f7931..f3e5d7ce7 100644 --- a/lending/docs/sdk/models/shared/billlineitem.md +++ b/lending/docs/sdk/models/shared/billlineitem.md @@ -1,33 +1,31 @@ -# BillLineItem - -## Example Usage - -```typescript -import { BillLineItem } from "@codat/lending/sdk/models/shared"; - -let value: BillLineItem = { - accountRef: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `lineNumber` | *string* | :heavy_minus_sign: | The bill line's number. | | -| `description` | *string* | :heavy_minus_sign: | Friendly name of the goods or services received. | | -| `unitAmount` | *Decimal* | :heavy_minus_sign: | Price of each unit of goods or services. | | -| `quantity` | *Decimal* | :heavy_minus_sign: | Number of units of goods or services received. | | -| `unitOfMeasurement` | *string* | :heavy_minus_sign: | The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). | | -| `discountAmount` | *Decimal* | :heavy_minus_sign: | Numerical value of any discounts applied.

Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. | | -| `subTotal` | *Decimal* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | | -| `taxAmount` | *Decimal* | :heavy_minus_sign: | Amount of tax for the line. | | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the line, including tax. | | -| `discountPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate of any discount applied to the bill. | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `taxRateRef` | [shared.TaxRateRef](../../../sdk/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 | | -| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | | -| `purchaseOrderLineRef` | [shared.RecordLineReference](../../../sdk/models/shared/recordlinereference.md) | :heavy_minus_sign: | N/A | | -| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Collection of categories against which this item is tracked. | | -| `tracking` | [shared.AccountsPayableTracking](../../../sdk/models/shared/accountspayabletracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | | -| `isDirectCost` | *boolean* | :heavy_minus_sign: | The bill is a direct cost if `True`. | | \ No newline at end of file +# BillLineItem + +## Example Usage + +```typescript +import { BillLineItem } from "@codat/lending/sdk/models/shared"; + +let value: BillLineItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `lineNumber` | *string* | :heavy_minus_sign: | The bill line's number. | +| `description` | *string* | :heavy_minus_sign: | Friendly name of the goods or services received. | +| `unitAmount` | *Decimal | number* | :heavy_minus_sign: | Price of each unit of goods or services. | +| `quantity` | *Decimal | number* | :heavy_minus_sign: | Number of units of goods or services received. | +| `unitOfMeasurement` | *string* | :heavy_minus_sign: | The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). | +| `discountAmount` | *Decimal | number* | :heavy_minus_sign: | Numerical value of any discounts applied.

Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. | +| `subTotal` | *Decimal | number* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `taxAmount` | *Decimal | number* | :heavy_minus_sign: | Amount of tax for the line. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of the line, including tax. | +| `discountPercentage` | *Decimal | number* | :heavy_minus_sign: | Percentage rate of any discount applied to the bill. | +| `accountRef` | [shared.AccountRef](../../../sdk/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. | +| `taxRateRef` | [shared.TaxRateRef](../../../sdk/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 | +| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | +| `purchaseOrderLineRef` | [shared.RecordLineReference](../../../sdk/models/shared/recordlinereference.md) | :heavy_minus_sign: | N/A | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Collection of categories against which this item is tracked. | +| `tracking` | [shared.AccountsPayableTracking](../../../sdk/models/shared/accountspayabletracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | +| `isDirectCost` | *boolean* | :heavy_minus_sign: | The bill is a direct cost if `True`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billlineitemdatatype.md b/lending/docs/sdk/models/shared/billlineitemdatatype.md index 804e0926d..aeb5d91d2 100644 --- a/lending/docs/sdk/models/shared/billlineitemdatatype.md +++ b/lending/docs/sdk/models/shared/billlineitemdatatype.md @@ -1,17 +1,15 @@ -# BillLineItemDataType - -Allowed name of the 'dataType'. - -## Example Usage - -```typescript -import { BillLineItemDataType } from "@codat/lending/sdk/models/shared"; - -let value: BillLineItemDataType = "bills"; -``` - -## Values - -```typescript -"purchaseOrders" | "bills" +# BillLineItemDataType + +## Example Usage + +```typescript +import { BillLineItemDataType } from "@codat/lending/sdk/models/shared"; + +let value: BillLineItemDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billpaymentline.md b/lending/docs/sdk/models/shared/billpaymentline.md index d4eb171a6..e29e54a42 100644 --- a/lending/docs/sdk/models/shared/billpaymentline.md +++ b/lending/docs/sdk/models/shared/billpaymentline.md @@ -1,21 +1,17 @@ -# BillPaymentLine - -## Example Usage - -```typescript -import { BillPaymentLine } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: BillPaymentLine = { - amount: new Decimal("4948.27"), - allocatedOnDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | *Decimal* | :heavy_check_mark: | Amount in the bill payment currency. | | -| `links` | [shared.BillPaymentLineLink](../../../sdk/models/shared/billpaymentlinelink.md)[] | :heavy_minus_sign: | N/A | | -| `allocatedOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# BillPaymentLine + +## Example Usage + +```typescript +import { BillPaymentLine } from "@codat/lending/sdk/models/shared"; + +let value: BillPaymentLine = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `amount` | *Decimal | number* | :heavy_check_mark: | Amount in the bill payment currency. | +| `links` | [shared.BillPaymentLineLink](../../../sdk/models/shared/billpaymentlinelink.md)[] | :heavy_minus_sign: | N/A | +| `allocatedOnDate` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billpaymentlinelink.md b/lending/docs/sdk/models/shared/billpaymentlinelink.md index 9505e7ca2..891043784 100644 --- a/lending/docs/sdk/models/shared/billpaymentlinelink.md +++ b/lending/docs/sdk/models/shared/billpaymentlinelink.md @@ -1,20 +1,18 @@ -# BillPaymentLineLink - -## Example Usage - -```typescript -import { BillPaymentLineLink } from "@codat/lending/sdk/models/shared"; - -let value: BillPaymentLineLink = { - type: "BillPayment", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [shared.BillPaymentLineLinkType](../../../sdk/models/shared/billpaymentlinelinktype.md) | :heavy_check_mark: | Types of links to bill payment lines. | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the transaction represented by the link. | -| `amount` | *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. | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | \ No newline at end of file +# BillPaymentLineLink + +## Example Usage + +```typescript +import { BillPaymentLineLink } from "@codat/lending/sdk/models/shared"; + +let value: BillPaymentLineLink = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `type` | [shared.BillPaymentLineLinkType](../../../sdk/models/shared/billpaymentlinelinktype.md) | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_minus_sign: | Unique identifier of the transaction represented by the link. | +| `amount` | *Decimal | number* | :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. | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billpaymentlinelinktype.md b/lending/docs/sdk/models/shared/billpaymentlinelinktype.md index c8d7b6dad..276a64d3a 100644 --- a/lending/docs/sdk/models/shared/billpaymentlinelinktype.md +++ b/lending/docs/sdk/models/shared/billpaymentlinelinktype.md @@ -1,17 +1,17 @@ -# BillPaymentLineLinkType - -Types of links to bill payment lines. - -## Example Usage - -```typescript -import { BillPaymentLineLinkType } from "@codat/lending/sdk/models/shared"; - -let value: BillPaymentLineLinkType = "Other"; -``` - -## Values - -```typescript -"Unknown" | "Unlinked" | "Bill" | "Other" | "CreditNote" | "BillPayment" | "PaymentOnAccount" | "Refund" | "ManualJournal" | "Discount" +# BillPaymentLineLinkType + +Types of links to bill payment lines. + +## Example Usage + +```typescript +import { BillPaymentLineLinkType } from "@codat/lending/sdk/models/shared"; + +let value: BillPaymentLineLinkType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Unlinked" | "Bill" | "Other" | "CreditNote" | "BillPayment" | "PaymentOnAccount" | "Refund" | "ManualJournal" | "Discount" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/billstatus.md b/lending/docs/sdk/models/shared/billstatus.md index 772a8e672..c960218bb 100644 --- a/lending/docs/sdk/models/shared/billstatus.md +++ b/lending/docs/sdk/models/shared/billstatus.md @@ -1,17 +1,17 @@ -# BillStatus - -Current state of the bill. - -## Example Usage - -```typescript -import { BillStatus } from "@codat/lending/sdk/models/shared"; - -let value: BillStatus = "Open"; -``` - -## Values - -```typescript -"Unknown" | "Open" | "PartiallyPaid" | "Paid" | "Void" | "Draft" +# BillStatus + +Current state of the bill. + +## Example Usage + +```typescript +import { BillStatus } from "@codat/lending/sdk/models/shared"; + +let value: BillStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Open" | "PartiallyPaid" | "Paid" | "Void" | "Draft" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/cashflowstatement.md b/lending/docs/sdk/models/shared/cashflowstatement.md index 8c74f63b1..64e129a42 100644 --- a/lending/docs/sdk/models/shared/cashflowstatement.md +++ b/lending/docs/sdk/models/shared/cashflowstatement.md @@ -1,21 +1,21 @@ -# CashFlowStatement - -## Example Usage - -```typescript -import { CashFlowStatement } from "@codat/lending/sdk/models/shared"; - -let value: CashFlowStatement = { - fromDate: "2022-10-23T00:00:00Z", - toDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fromDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `toDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `cashReceipts` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `cashPayments` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# CashFlowStatement + +## Example Usage + +```typescript +import { CashFlowStatement } from "@codat/lending/sdk/models/shared"; + +let value: CashFlowStatement = { + fromDate: "2022-10-23T00:00:00Z", + toDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `fromDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `toDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `cashReceipts` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLines for cash receipts from the sale of goods. | | +| `cashPayments` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLines for cash payments to suppliers for the purchase of goods or services. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/cashflowtransaction.md b/lending/docs/sdk/models/shared/cashflowtransaction.md index 8badee451..474cc767f 100644 --- a/lending/docs/sdk/models/shared/cashflowtransaction.md +++ b/lending/docs/sdk/models/shared/cashflowtransaction.md @@ -1,33 +1,72 @@ -# CashFlowTransaction - -## Example Usage - -```typescript -import { CashFlowTransaction } from "@codat/lending/sdk/models/shared"; - -let value: CashFlowTransaction = { - date: "2022-10-23T00:00:00Z", - currency: "GBP", - transactionCategory: {}, - sourceRef: {}, - accountRef: {}, - modifiedDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | The unique identifier of the bank transaction. | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `description` | *string* | :heavy_minus_sign: | The description of the bank transaction. | | -| `amount` | *Decimal* | :heavy_minus_sign: | The bank transaction amount. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `transactionCategory` | [shared.TransactionCategory](../../../sdk/models/shared/transactioncategory.md) | :heavy_minus_sign: | N/A | {
"Example": {
"value": {
"transactionCategory": {
"confidence": 92.7,
"levels": [
"Asset",
"Current",
"Bank",
"BankTransfers",
"ShareholderTransfers"
],
"confidences": [
92.7,
95,
96,
97.5,
100
]
}
}
}
} | -| `platformName` | *string* | :heavy_minus_sign: | Returns the payment processor responsible for the transaction. | | -| `counterpartyNames` | *string*[] | :heavy_minus_sign: | An array of counterparty names involved in the transaction. | | -| `sourceRef` | [shared.SourceRef](../../../sdk/models/shared/sourceref.md) | :heavy_minus_sign: | A source reference containing the `sourceType` object "Banking". | {
"Example": {
"value": {
"sourceRef": {
"sourceType": "Banking"
}
}
}
} | -| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | An account reference containing the account id and name. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# CashFlowTransaction + +## Example Usage + +```typescript +import { CashFlowTransaction } from "@codat/lending/sdk/models/shared"; + +let value: CashFlowTransaction = { + date: "2022-10-23T00:00:00Z", + currency: "GBP", + transactionCategory: { + Example: { + value: { + transactionCategory: { + confidence: 92.7, + levels: [ + "Asset", + "Current", + "Bank", + "BankTransfers", + "ShareholderTransfers", + ], + confidences: [ + 92.7, + 95, + 96, + 97.5, + 100, + ], + }, + }, + }, + }, + sourceRef: { + Example: { + value: { + sourceRef: { + sourceType: "Banking", + }, + }, + }, + }, + accountRef: { + Example: { + value: { + accountRef: { + id: "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", + name: "Business Current Account", + }, + }, + }, + }, + modifiedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | The unique identifier of the bank transaction. | | +| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `description` | *string* | :heavy_minus_sign: | The description of the bank transaction. | | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The bank transaction amount. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `transactionCategory` | [shared.TransactionCategory](../../../sdk/models/shared/transactioncategory.md) | :heavy_minus_sign: | Contains an array of category levels. | {
"Example": {
"value": {
"transactionCategory": {
"confidence": 92.7,
"levels": [
"Asset",
"Current",
"Bank",
"BankTransfers",
"ShareholderTransfers"
],
"confidences": [
92.7,
95,
96,
97.5,
100
]
}
}
}
} | +| `platformName` | *string* | :heavy_minus_sign: | Returns the payment processor responsible for the transaction. | | +| `counterpartyNames` | *string*[] | :heavy_minus_sign: | An array of counterparty names involved in the transaction. | | +| `sourceRef` | [shared.SourceRef](../../../sdk/models/shared/sourceref.md) | :heavy_minus_sign: | A source reference containing the `sourceType` object "Banking". | {
"Example": {
"value": {
"sourceRef": {
"sourceType": "Banking"
}
}
}
} | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | An account reference containing the account id and name. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | +| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `isRecurring` | *boolean* | :heavy_minus_sign: | Indicates if the transaction is classified as recurring by Codat's categorization engine. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/clientratelimitwebhook.md b/lending/docs/sdk/models/shared/clientratelimitwebhook.md index 48c4614e8..f635d678c 100644 --- a/lending/docs/sdk/models/shared/clientratelimitwebhook.md +++ b/lending/docs/sdk/models/shared/clientratelimitwebhook.md @@ -1,25 +1,22 @@ -# ClientRateLimitWebhook - -## Example Usage - -```typescript -import { ClientRateLimitWebhook } from "@codat/lending/sdk/models/shared"; - -let value: ClientRateLimitWebhook = { - id: "743ec94a-8aa4-44bb-8bd4-e1855ee0e74b", - eventType: "client.rateLimit.reset", - generatedDate: "2022-10-23T00:00:00Z", - payload: { - expiryDate: "2022-10-23T00:00:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the event. | 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b | -| `eventType` | *string* | :heavy_minus_sign: | The type of event. | **Example 1:** client.rateLimit.reset
**Example 2:** client.rateLimit.reached | -| `generatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# ClientRateLimitWebhook + +## Example Usage + +```typescript +import { ClientRateLimitWebhook } from "@codat/lending/sdk/models/shared"; + +let value: ClientRateLimitWebhook = { + id: "743ec94a-8aa4-44bb-8bd4-e1855ee0e74b", + eventType: "client.rateLimit.reset", + generatedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier of the event. | 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b | +| `eventType` | *string* | :heavy_minus_sign: | The type of event. | **Example 1:** client.rateLimit.reset
**Example 2:** client.rateLimit.reached | +| `generatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `payload` | [shared.ClientRateLimitWebhookPayload](../../../sdk/models/shared/clientratelimitwebhookpayload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/clientratelimitwebhookpayload.md b/lending/docs/sdk/models/shared/clientratelimitwebhookpayload.md index 4b75cc8d5..01d3de62a 100644 --- a/lending/docs/sdk/models/shared/clientratelimitwebhookpayload.md +++ b/lending/docs/sdk/models/shared/clientratelimitwebhookpayload.md @@ -1,19 +1,19 @@ -# ClientRateLimitWebhookPayload - -## Example Usage - -```typescript -import { ClientRateLimitWebhookPayload } from "@codat/lending/sdk/models/shared"; - -let value: ClientRateLimitWebhookPayload = { - expiryDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `dailyQuota` | *number* | :heavy_minus_sign: | The number of available requests per day. | | -| `quotaRemaining` | *number* | :heavy_minus_sign: | Total number of requests remaining for your client. | | +# ClientRateLimitWebhookPayload + +## Example Usage + +```typescript +import { ClientRateLimitWebhookPayload } from "@codat/lending/sdk/models/shared"; + +let value: ClientRateLimitWebhookPayload = { + expiryDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dailyQuota` | *number* | :heavy_minus_sign: | The number of available requests per day. | | +| `quotaRemaining` | *number* | :heavy_minus_sign: | Total number of requests remaining for your client. | | | `expiryDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/codatfile.md b/lending/docs/sdk/models/shared/codatfile.md index ba864c136..07337da78 100644 --- a/lending/docs/sdk/models/shared/codatfile.md +++ b/lending/docs/sdk/models/shared/codatfile.md @@ -1,16 +1,16 @@ -# CodatFile - -## Example Usage - -```typescript -import { CodatFile } from "@codat/lending/sdk/models/shared"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `fileName` | *string* | :heavy_check_mark: | N/A | -| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file +# CodatFile + +## Example Usage + +```typescript +import { CodatFile } from "@codat/lending/sdk/models/shared"; + +let value: CodatFile = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `content` | *ReadableStream | Blob | ArrayBuffer | Uint8Array* | :heavy_check_mark: | N/A | +| `fileName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commerceaddress.md b/lending/docs/sdk/models/shared/commerceaddress.md index cd13b42b0..77b2b4db0 100644 --- a/lending/docs/sdk/models/shared/commerceaddress.md +++ b/lending/docs/sdk/models/shared/commerceaddress.md @@ -1,21 +1,21 @@ -# CommerceAddress - -## Example Usage - -```typescript -import { CommerceAddress } from "@codat/lending/sdk/models/shared"; - -let value: CommerceAddress = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `type` | [shared.CommerceAddressType](../../../sdk/models/shared/commerceaddresstype.md) | :heavy_minus_sign: | The type of the address | -| `line1` | *string* | :heavy_minus_sign: | The first line of the address | -| `line2` | *string* | :heavy_minus_sign: | The second line of the address | -| `city` | *string* | :heavy_minus_sign: | The third line of the address, or city | -| `region` | *string* | :heavy_minus_sign: | The fourth line of the address, or region | -| `country` | *string* | :heavy_minus_sign: | The country for the address | +# CommerceAddress + +## Example Usage + +```typescript +import { CommerceAddress } from "@codat/lending/sdk/models/shared"; + +let value: CommerceAddress = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `type` | [shared.CommerceAddressType](../../../sdk/models/shared/commerceaddresstype.md) | :heavy_minus_sign: | The type of the address | +| `line1` | *string* | :heavy_minus_sign: | The first line of the address | +| `line2` | *string* | :heavy_minus_sign: | The second line of the address | +| `city` | *string* | :heavy_minus_sign: | The third line of the address, or city | +| `region` | *string* | :heavy_minus_sign: | The fourth line of the address, or region | +| `country` | *string* | :heavy_minus_sign: | The country for the address | | `postalCode` | *string* | :heavy_minus_sign: | The postal (or zip) code for the address | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commerceaddresstype.md b/lending/docs/sdk/models/shared/commerceaddresstype.md index 17b4fde5d..5d511ab9e 100644 --- a/lending/docs/sdk/models/shared/commerceaddresstype.md +++ b/lending/docs/sdk/models/shared/commerceaddresstype.md @@ -1,17 +1,17 @@ -# CommerceAddressType - -The type of the address - -## Example Usage - -```typescript -import { CommerceAddressType } from "@codat/lending/sdk/models/shared"; - -let value: CommerceAddressType = "Unknown"; -``` - -## Values - -```typescript -"Billing" | "Delivery" | "Order" | "Inventory" | "Unknown" +# CommerceAddressType + +The type of the address + +## Example Usage + +```typescript +import { CommerceAddressType } from "@codat/lending/sdk/models/shared"; + +let value: CommerceAddressType = "Billing"; +``` + +## Values + +```typescript +"Billing" | "Delivery" | "Order" | "Inventory" | "Unknown" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercecompanyinfo.md b/lending/docs/sdk/models/shared/commercecompanyinfo.md index 0dec229aa..02e504719 100644 --- a/lending/docs/sdk/models/shared/commercecompanyinfo.md +++ b/lending/docs/sdk/models/shared/commercecompanyinfo.md @@ -1,60 +1,43 @@ -# CommerceCompanyInfo - -In the Codat system, company profile includes standard commercial details about -a linked company, such as their address, phone number, and company registration. - - -## Example Usage - -```typescript -import { CommerceCompanyInfo } from "@codat/lending/sdk/models/shared"; - -let value: CommerceCompanyInfo = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - companyName: "Codat", - companyLegalName: "Codat Limited", - phoneNumbers: [ - { - number: "+44 25691 154789", - type: "Primary", - }, - ], - webLinks: [ - { - type: "Website", - url: "https://codat.io", - }, - ], - registrationNumber: "10480375", - baseCurrency: "GBP", - accountBalances: [ - { - currency: "GBP", - }, - ], - sourceUrls: { - "url1": "https://connect.sandbox.com/v2/customers", - "url2": "https://connect.sandbox.com/v2/disputes", - }, - createdDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `companyName` | *string* | :heavy_minus_sign: | The name of the company | Codat | -| `commercePlatformRef` | *string* | :heavy_minus_sign: | Identifier or reference for the company in the commerce software | | -| `companyLegalName` | *string* | :heavy_minus_sign: | The full legal name of the company | Codat Limited | -| `addresses` | [shared.CommerceAddress](../../../sdk/models/shared/commerceaddress.md)[] | :heavy_minus_sign: | Addresses associated with the company | | -| `phoneNumbers` | [shared.PhoneNumber](../../../sdk/models/shared/phonenumber.md)[] | :heavy_minus_sign: | Phone numbers associated with the company | | -| `webLinks` | [shared.WebLink](../../../sdk/models/shared/weblink.md)[] | :heavy_minus_sign: | Weblinks associated with the company | | -| `registrationNumber` | *string* | :heavy_minus_sign: | The registration number of the company | 10480375 | -| `baseCurrency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `accountBalances` | [shared.AccountBalance](../../../sdk/models/shared/accountbalance.md)[] | :heavy_minus_sign: | The available and current cash balances for the company's accounts | | -| `sourceUrls` | Record | :heavy_minus_sign: | URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system | {
"url1": "https://connect.sandbox.com/v2/customers",
"url2": "https://connect.sandbox.com/v2/disputes"
} | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# CommerceCompanyInfo + +In the Codat system, company profile includes standard commercial details about +a linked company, such as their address, phone number, and company registration. + + +## Example Usage + +```typescript +import { CommerceCompanyInfo } from "@codat/lending/sdk/models/shared"; + +let value: CommerceCompanyInfo = { + createdDate: "2022-10-23T00:00:00Z", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + companyName: "Codat", + companyLegalName: "Codat Limited", + registrationNumber: 10480375, + baseCurrency: "GBP", + sourceUrls: { + "url1": "https://connect.sandbox.com/v2/customers", + "url2": "https://connect.sandbox.com/v2/disputes", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `companyName` | *string* | :heavy_minus_sign: | The name of the company | Codat | +| `commercePlatformRef` | *string* | :heavy_minus_sign: | Identifier or reference for the company in the commerce software | | +| `companyLegalName` | *string* | :heavy_minus_sign: | The full legal name of the company | Codat Limited | +| `addresses` | [shared.CommerceAddress](../../../sdk/models/shared/commerceaddress.md)[] | :heavy_minus_sign: | Addresses associated with the company | | +| `phoneNumbers` | [shared.PhoneNumber](../../../sdk/models/shared/phonenumber.md)[] | :heavy_minus_sign: | Phone numbers associated with the company | | +| `webLinks` | [shared.WebLink](../../../sdk/models/shared/weblink.md)[] | :heavy_minus_sign: | Weblinks associated with the company | | +| `registrationNumber` | *string* | :heavy_minus_sign: | The registration number of the company | 10480375 | +| `baseCurrency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `accountBalances` | [shared.AccountBalance](../../../sdk/models/shared/accountbalance.md)[] | :heavy_minus_sign: | The available and current cash balances for the company's accounts | | +| `sourceUrls` | Record | :heavy_minus_sign: | URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system | {
"url1": "https://connect.sandbox.com/v2/customers",
"url2": "https://connect.sandbox.com/v2/disputes"
} | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercecustomer.md b/lending/docs/sdk/models/shared/commercecustomer.md index 9387b4c06..6bebf639a 100644 --- a/lending/docs/sdk/models/shared/commercecustomer.md +++ b/lending/docs/sdk/models/shared/commercecustomer.md @@ -1,28 +1,26 @@ -# CommerceCustomer - -When a customer places an order with the connected commerce store their details are added to the Customers dataset. You can use the data from the Customers endpoints to calculate key metrics, such as customer churn. - -## Example Usage - -```typescript -import { CommerceCustomer } from "@codat/lending/sdk/models/shared"; - -let value: CommerceCustomer = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `customerName` | *string* | :heavy_minus_sign: | Name of the customer | Fred Smith | -| `emailAddress` | *string* | :heavy_minus_sign: | Email address of the customer | fred.smith@myCompany.com | -| `phone` | *string* | :heavy_minus_sign: | A phone number. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | -| `defaultCurrency` | *string* | :heavy_minus_sign: | N/A | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `addresses` | [shared.CommerceAddress](../../../sdk/models/shared/commerceaddress.md)[] | :heavy_minus_sign: | Addresses of the customer | | -| `note` | *string* | :heavy_minus_sign: | Any additional information about the customer | | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# CommerceCustomer + +When a customer places an order with the connected commerce store their details are added to the Customers dataset. You can use the data from the Customers endpoints to calculate key metrics, such as customer churn. + +## Example Usage + +```typescript +import { CommerceCustomer } from "@codat/lending/sdk/models/shared"; + +let value: CommerceCustomer = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `customerName` | *string* | :heavy_minus_sign: | Name of the customer | Fred Smith | +| `emailAddress` | *string* | :heavy_minus_sign: | Email address of the customer | fred.smith@myCompany.com | +| `phone` | *string* | :heavy_minus_sign: | A phone number. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | +| `defaultCurrency` | *string* | :heavy_minus_sign: | N/A | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `addresses` | [shared.CommerceAddress](../../../sdk/models/shared/commerceaddress.md)[] | :heavy_minus_sign: | Addresses of the customer | | +| `note` | *string* | :heavy_minus_sign: | Any additional information about the customer | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercecustomerref.md b/lending/docs/sdk/models/shared/commercecustomerref.md index 966a195d3..edd1b30e4 100644 --- a/lending/docs/sdk/models/shared/commercecustomerref.md +++ b/lending/docs/sdk/models/shared/commercecustomerref.md @@ -1,20 +1,18 @@ -# CommerceCustomerRef - -Reference to the customer that placed the order. - -## Example Usage - -```typescript -import { CommerceCustomerRef } from "@codat/lending/sdk/models/shared"; - -let value: CommerceCustomerRef = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identitifer of the customer being referenced | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_minus_sign: | Name of the customer being referenced. | | \ No newline at end of file +# CommerceCustomerRef + +Reference to the customer that placed the order. + +## Example Usage + +```typescript +import { CommerceCustomerRef } from "@codat/lending/sdk/models/shared"; + +let value: CommerceCustomerRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identitifer of the customer being referenced | +| `name` | *string* | :heavy_minus_sign: | Name of the customer being referenced. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercecustomers.md b/lending/docs/sdk/models/shared/commercecustomers.md index 4d5e5d572..168e7a015 100644 --- a/lending/docs/sdk/models/shared/commercecustomers.md +++ b/lending/docs/sdk/models/shared/commercecustomers.md @@ -1,31 +1,23 @@ -# CommerceCustomers - -## Example Usage - -```typescript -import { CommerceCustomers } from "@codat/lending/sdk/models/shared"; - -let value: CommerceCustomers = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommerceCustomer](../../../sdk/models/shared/commercecustomer.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommerceCustomers + +## Example Usage + +```typescript +import { CommerceCustomers } from "@codat/lending/sdk/models/shared"; + +let value: CommerceCustomers = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommerceCustomer](../../../sdk/models/shared/commercecustomer.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercedispute.md b/lending/docs/sdk/models/shared/commercedispute.md index 695aba75c..6b5fd1b31 100644 --- a/lending/docs/sdk/models/shared/commercedispute.md +++ b/lending/docs/sdk/models/shared/commercedispute.md @@ -1,47 +1,47 @@ -# CommerceDispute - -A customer may file a payment dispute with their bank or other card issuer when they're unsatisfied with their purchase or believe they have been charged incorrectly. For example: -- They didn't receive an order. -- The product they received was different to the commerce store's description. -- They've been the victim of online fraud. - -You can use data from the Disputes endpoints to calculate key metrics, such as the number of chargebacks. - -## Example Usage - -```typescript -import { CommerceDispute } from "@codat/lending/sdk/models/shared"; - -let value: CommerceDispute = { - modifiedDate: "2022-02-02T11:02:45Z", - sourceModifiedDate: "2021-03-22T14:39:55", - id: "03e608e3-bd1c-454f-8c2b-fb0133e43b95", - disputedTransactions: [ - { - id: "e63ad857-7e12-4e64-9185-cdfd7c45d09d", - type: "Order", - }, - ], - totalAmount: -47.66, - currency: "GBP", - status: "InquiryEvidenceRequired", - reason: "Unhappy with product", - dueDate: "2021-03-29T14:39:55", - createdDate: "2021-03-22T14:39:55", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `disputedTransactions` | [shared.TransactionSourceRef](../../../sdk/models/shared/transactionsourceref.md)[] | :heavy_minus_sign: | Link to the source event(s) which triggered this transaction. | | -| `totalAmount` | *any* | :heavy_minus_sign: | Total transaction amount that is under dispute. | **Example 1:** 194.12
**Example 2:** -283.56
**Example 3:** 0 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `status` | [shared.DisputeStatus](../../../sdk/models/shared/disputestatus.md) | :heavy_minus_sign: | Current status of the dispute | EvidenceRequired | -| `reason` | *string* | :heavy_minus_sign: | Reason for the dispute | Unhappy with product | -| `dueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# CommerceDispute + +A customer may file a payment dispute with their bank or other card issuer when they're unsatisfied with their purchase or believe they have been charged incorrectly. For example: +- They didn't receive an order. +- The product they received was different to the commerce store's description. +- They've been the victim of online fraud. + +You can use data from the Disputes endpoints to calculate key metrics, such as the number of chargebacks. + +## Example Usage + +```typescript +import { CommerceDispute } from "@codat/lending/sdk/models/shared"; + +let value: CommerceDispute = { + id: "03e608e3-bd1c-454f-8c2b-fb0133e43b95", + createdDate: "2021-03-22T14:39:55", + modifiedDate: "2022-02-02T11:02:45Z", + sourceModifiedDate: "2021-03-22T14:39:55", + disputedTransactions: [ + { + id: "e63ad857-7e12-4e64-9185-cdfd7c45d09d", + type: "Order", + }, + ], + totalAmount: -47.66, + currency: "GBP", + status: "InquiryEvidenceRequired", + reason: "Unhappy with product", + dueDate: "2021-03-29T14:39:55", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `disputedTransactions` | [shared.TransactionSourceRef](../../../sdk/models/shared/transactionsourceref.md)[] | :heavy_minus_sign: | Link to the source event(s) which triggered this transaction. | | +| `totalAmount` | *any* | :heavy_minus_sign: | Total transaction amount that is under dispute. | **Example 1:** 194.12
**Example 2:** -283.56
**Example 3:** 0 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `status` | [shared.DisputeStatus](../../../sdk/models/shared/disputestatus.md) | :heavy_minus_sign: | Current status of the dispute | EvidenceRequired | +| `reason` | *string* | :heavy_minus_sign: | Reason for the dispute | Unhappy with product | +| `dueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercedisputes.md b/lending/docs/sdk/models/shared/commercedisputes.md index 310623dd8..e386b7c7b 100644 --- a/lending/docs/sdk/models/shared/commercedisputes.md +++ b/lending/docs/sdk/models/shared/commercedisputes.md @@ -1,31 +1,23 @@ -# CommerceDisputes - -## Example Usage - -```typescript -import { CommerceDisputes } from "@codat/lending/sdk/models/shared"; - -let value: CommerceDisputes = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommerceDispute](../../../sdk/models/shared/commercedispute.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommerceDisputes + +## Example Usage + +```typescript +import { CommerceDisputes } from "@codat/lending/sdk/models/shared"; + +let value: CommerceDisputes = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommerceDispute](../../../sdk/models/shared/commercedispute.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercelocation.md b/lending/docs/sdk/models/shared/commercelocation.md index 9af5e8714..05936f38c 100644 --- a/lending/docs/sdk/models/shared/commercelocation.md +++ b/lending/docs/sdk/models/shared/commercelocation.md @@ -1,37 +1,37 @@ -# CommerceLocation - -The Location datatype holds information on the geographic location at which stocks of products may be held, as referenced in the Products data type. - -A Location also holds information on geographic locations where orders were placed, as referenced in the Orders data type. - -## Example Usage - -```typescript -import { CommerceLocation } from "@codat/lending/sdk/models/shared"; - -let value: CommerceLocation = { - modifiedDate: "2020-08-12T14:37:37", - sourceModifiedDate: "2020-08-12T14:37:37", - id: "15", - name: "London Warehouse", - address: { - type: "Inventory", - line1: "Warner House", - line2: "98 Theobald's Road", - city: "London", - region: "", - country: "United Kingdom", - postalCode: "WC1X 8WB", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_minus_sign: | Name of this location | | -| `address` | [shared.CommerceAddress](../../../sdk/models/shared/commerceaddress.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# CommerceLocation + +The Location datatype holds information on the geographic location at which stocks of products may be held, as referenced in the Products data type. + +A Location also holds information on geographic locations where orders were placed, as referenced in the Orders data type. + +## Example Usage + +```typescript +import { CommerceLocation } from "@codat/lending/sdk/models/shared"; + +let value: CommerceLocation = { + id: "15", + modifiedDate: "2020-08-12T14:37:37", + sourceModifiedDate: "2020-08-12T14:37:37", + name: "London Warehouse", + address: { + type: "Inventory", + line1: "Warner House", + line2: "98 Theobald's Road", + city: "London", + region: "", + country: "United Kingdom", + postalCode: "WC1X 8WB", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `name` | *string* | :heavy_minus_sign: | Name of this location | | +| `address` | [shared.CommerceAddress](../../../sdk/models/shared/commerceaddress.md) | :heavy_minus_sign: | Address associated with the location | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercelocations.md b/lending/docs/sdk/models/shared/commercelocations.md index daf41b284..d81b2d5c1 100644 --- a/lending/docs/sdk/models/shared/commercelocations.md +++ b/lending/docs/sdk/models/shared/commercelocations.md @@ -1,31 +1,23 @@ -# CommerceLocations - -## Example Usage - -```typescript -import { CommerceLocations } from "@codat/lending/sdk/models/shared"; - -let value: CommerceLocations = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommerceLocation](../../../sdk/models/shared/commercelocation.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommerceLocations + +## Example Usage + +```typescript +import { CommerceLocations } from "@codat/lending/sdk/models/shared"; + +let value: CommerceLocations = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommerceLocation](../../../sdk/models/shared/commercelocation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commerceorder.md b/lending/docs/sdk/models/shared/commerceorder.md index b2ce60c9a..2a9d124bb 100644 --- a/lending/docs/sdk/models/shared/commerceorder.md +++ b/lending/docs/sdk/models/shared/commerceorder.md @@ -1,120 +1,122 @@ -# CommerceOrder - -Orders contain the transaction details for all products sold by the company, and include details of any payments, service charges, or refunds related to each order. You can use data from the Orders endpoints to calculate key metrics, such as gross sales values and monthly recurring revenue (MRR). - - -## Example Usage - -```typescript -import { CommerceOrder } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: CommerceOrder = { - modifiedDate: "2022-02-02T11:02:45Z", - sourceModifiedDate: "2021-03-28T03:00:14", - id: "01e63721-1205-478e-8503-9d8bf8a93f44", - orderNumber: "99123956", - country: "CAN", - currency: "CAD", - totalAmount: new Decimal("12"), - totalRefund: new Decimal("0"), - totalTaxAmount: new Decimal("2"), - totalDiscount: new Decimal("0"), - totalGratuity: new Decimal("1"), - orderLineItems: [ - { - id: "116113a6-54d3-4624-ba73-26a77a5ffd51", - quantity: new Decimal("1"), - taxPercentage: new Decimal("20"), - totalAmount: new Decimal("12"), - totalTaxAmount: new Decimal("2"), - unitPrice: new Decimal("10"), - taxes: [ - { - taxComponentRef: { - id: "72", - name: "Sales Tax", - }, - }, - { - taxComponentRef: { - id: "72", - name: "City Tax", - }, - }, - ], - productRef: { - id: "ac186646-41f2-4280-afea-1012c59459ab", - name: "Intelligent Concrete Salad", - }, - productVariantRef: { - id: "f9ca9de5-9e31-460d-ac81-368f4e7c8fc0", - name: "Small Incredible Wooden Soap", - }, - discountAllocations: [], - }, - ], - payments: [ - { - modifiedDate: "2022-02-02T11:02:45", - id: "defdceb6-83a3-4b7d-a74e-e9ef947d5f48", - amount: new Decimal("12"), - currency: "CAD", - type: "Paypal", - status: "Unknown", - dueDate: "2021-04-04T03:00:14", - createdDate: "2021-03-28T03:00:14", - }, - ], - serviceCharges: [ - { - description: "Service Charge", - totalAmount: new Decimal("1.2"), - taxPercentage: new Decimal("20"), - taxAmount: new Decimal("0.2"), - taxes: [ - { - taxComponentRef: { - id: "72", - name: "Service Tax", - }, - }, - ], - quantity: 1, - type: "Generic", - }, - ], - locationRef: { - id: "47bbffc7-c045-4b0f-a3bb-ecf1f669edfa", - }, - customerRef: { - id: "2634d180-7205-43f0-a73d-84af6443a005", - name: "Emmy Roberts", - }, - createdDate: "2021-03-28T03:00:14", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `orderNumber` | *string* | :heavy_minus_sign: | Friendly reference for the order in the commerce or point of sale platform. | | -| `country` | *string* | :heavy_minus_sign: | The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part.

Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model.

For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. | **Example 1:** GBR
**Example 2:** USA
**Example 3:** ABW | -| `currency` | *string* | :heavy_minus_sign: | N/A | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `closedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. | | -| `totalRefund` | *Decimal* | :heavy_minus_sign: | Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. | | -| `totalTaxAmount` | *Decimal* | :heavy_minus_sign: | Total amount of tax applied to the order. | | -| `totalDiscount` | *Decimal* | :heavy_minus_sign: | Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). | | -| `totalGratuity` | *Decimal* | :heavy_minus_sign: | Extra amount added to the order. | | -| `orderLineItems` | [shared.OrderLineItem](../../../sdk/models/shared/orderlineitem.md)[] | :heavy_minus_sign: | N/A | | -| `payments` | [shared.PaymentRef](../../../sdk/models/shared/paymentref.md)[] | :heavy_minus_sign: | N/A | | -| `serviceCharges` | [shared.ServiceCharge](../../../sdk/models/shared/servicecharge.md)[] | :heavy_minus_sign: | N/A | | -| `locationRef` | [shared.LocationRef](../../../sdk/models/shared/locationref.md) | :heavy_minus_sign: | Reference to the geographic location where the order was placed. | | -| `customerRef` | [shared.CommerceCustomerRef](../../../sdk/models/shared/commercecustomerref.md) | :heavy_minus_sign: | Reference to the customer that placed the order. | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# CommerceOrder + +Orders contain the transaction details for all products sold by the company, and include details of any payments, service charges, or refunds related to each order. You can use data from the Orders endpoints to calculate key metrics, such as gross sales values and monthly recurring revenue (MRR). + + +## Example Usage + +```typescript +import { CommerceOrder } from "@codat/lending/sdk/models/shared"; + +let value: CommerceOrder = { + createdDate: "2021-03-28T03:00:14", + id: "01e63721-1205-478e-8503-9d8bf8a93f44", + orderNumber: "99123956", + country: "CAN", + currency: "CAD", + totalAmount: 12, + totalRefund: 0, + totalTaxAmount: 2, + totalDiscount: 0, + totalGratuity: 1, + orderLineItems: [ + { + id: "116113a6-54d3-4624-ba73-26a77a5ffd51", + quantity: 1, + taxPercentage: 20, + totalAmount: 12, + totalTaxAmount: 2, + unitPrice: 10, + taxes: [ + { + taxComponentRef: { + id: "72", + name: "Sales Tax", + }, + taxAmount: "", + }, + { + taxComponentRef: { + id: "72", + name: "City Tax", + }, + taxAmount: "", + }, + ], + productRef: { + id: "ac186646-41f2-4280-afea-1012c59459ab", + name: "Intelligent Concrete Salad", + }, + productVariantRef: { + id: "f9ca9de5-9e31-460d-ac81-368f4e7c8fc0", + name: "Small Incredible Wooden Soap", + }, + discountAllocations: [], + }, + ], + payments: [ + { + id: "defdceb6-83a3-4b7d-a74e-e9ef947d5f48", + amount: 12, + currency: "CAD", + type: "Paypal", + status: "Unknown", + dueDate: "2021-04-04T03:00:14", + createdDate: "2021-03-28T03:00:14", + modifiedDate: "2022-02-02T11:02:45", + }, + ], + serviceCharges: [ + { + description: "Service Charge", + totalAmount: 1.2, + taxPercentage: 20, + taxAmount: 0.2, + taxes: [ + { + taxComponentRef: { + id: "72", + name: "Service Tax", + }, + taxAmount: "", + }, + ], + quantity: 1, + type: "Generic", + }, + ], + locationRef: { + id: "47bbffc7-c045-4b0f-a3bb-ecf1f669edfa", + }, + customerRef: { + id: "2634d180-7205-43f0-a73d-84af6443a005", + name: "Emmy Roberts", + }, + modifiedDate: "2022-02-02T11:02:45Z", + sourceModifiedDate: "2021-03-28T03:00:14", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `orderNumber` | *string* | :heavy_minus_sign: | Friendly reference for the order in the commerce or point of sale platform. | | +| `country` | *string* | :heavy_minus_sign: | The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part.

Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model.

For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. | **Example 1:** GBR
**Example 2:** USA
**Example 3:** ABW | +| `currency` | *string* | :heavy_minus_sign: | N/A | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `closedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. | | +| `totalRefund` | *Decimal | number* | :heavy_minus_sign: | Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. | | +| `totalTaxAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of tax applied to the order. | | +| `totalDiscount` | *Decimal | number* | :heavy_minus_sign: | Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). | | +| `totalGratuity` | *Decimal | number* | :heavy_minus_sign: | Extra amount added to the order. | | +| `orderLineItems` | [shared.OrderLineItem](../../../sdk/models/shared/orderlineitem.md)[] | :heavy_minus_sign: | N/A | | +| `payments` | [shared.PaymentRef](../../../sdk/models/shared/paymentref.md)[] | :heavy_minus_sign: | N/A | | +| `serviceCharges` | [shared.ServiceCharge](../../../sdk/models/shared/servicecharge.md)[] | :heavy_minus_sign: | N/A | | +| `locationRef` | [shared.LocationRef](../../../sdk/models/shared/locationref.md) | :heavy_minus_sign: | Reference to the geographic location where the order was placed. | | +| `customerRef` | [shared.CommerceCustomerRef](../../../sdk/models/shared/commercecustomerref.md) | :heavy_minus_sign: | Reference to the customer that placed the order. | | +| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commerceorders.md b/lending/docs/sdk/models/shared/commerceorders.md index 8257e6f1f..16e430d37 100644 --- a/lending/docs/sdk/models/shared/commerceorders.md +++ b/lending/docs/sdk/models/shared/commerceorders.md @@ -1,31 +1,23 @@ -# CommerceOrders - -## Example Usage - -```typescript -import { CommerceOrders } from "@codat/lending/sdk/models/shared"; - -let value: CommerceOrders = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommerceOrder](../../../sdk/models/shared/commerceorder.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommerceOrders + +## Example Usage + +```typescript +import { CommerceOrders } from "@codat/lending/sdk/models/shared"; + +let value: CommerceOrders = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommerceOrder](../../../sdk/models/shared/commerceorder.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercepayment.md b/lending/docs/sdk/models/shared/commercepayment.md index d3f17a6aa..0abc4e3b8 100644 --- a/lending/docs/sdk/models/shared/commercepayment.md +++ b/lending/docs/sdk/models/shared/commercepayment.md @@ -1,45 +1,44 @@ -# CommercePayment - -Payments contain details of all payments made by customers to a company, including: amounts, currency used, payment method, payment provider, and payment status. - -Refunds are recorded as separate, negative payments. Note that a refund can only occur in relation to a payment that has been completed (i.e. has a status of `Paid`). When a customer cancels an order _before_ a payment has been completed, the payment shows as `Cancelled`. - -You can use data from the Payments endpoints to calculate key metrics, such as gross sales and monthly recurring revenue (MRR). - -## Example Usage - -```typescript -import { CommercePayment } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: CommercePayment = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - amount: new Decimal("194.12"), - currency: "GBP", - paymentMethodRef: { - id: "EILBDVJVNUAGVKRQ", - name: "AliPay", - }, - paymentProvider: "Amazon Pay", - dueDate: "2022-10-23T00:00:00Z", - createdDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `amount` | *Decimal* | :heavy_minus_sign: | Payment Amount (including gratuity) | **Example 1:** 194.12
**Example 2:** -283.56
**Example 3:** 0 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | The payment method the record is linked to in the accounting or commerce software. | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | -| `status` | [shared.PaymentStatus](../../../sdk/models/shared/paymentstatus.md) | :heavy_minus_sign: | Status of the payment. | | -| `paymentProvider` | *string* | :heavy_minus_sign: | Service provider of the payment, if applicable. | **Example 1:** Amazon Pay
**Example 2:** Checkout.com
**Example 3:** SagePay | -| `dueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# CommercePayment + +Payments contain details of all payments made by customers to a company, including: amounts, currency used, payment method, payment provider, and payment status. + +Refunds are recorded as separate, negative payments. Note that a refund can only occur in relation to a payment that has been completed (i.e. has a status of `Paid`). When a customer cancels an order _before_ a payment has been completed, the payment shows as `Cancelled`. + +You can use data from the Payments endpoints to calculate key metrics, such as gross sales and monthly recurring revenue (MRR). + +## Example Usage + +```typescript +import { CommercePayment } from "@codat/lending/sdk/models/shared"; + +let value: CommercePayment = { + id: "13d946f0-c5d5-42bc-b092-97ece17923ab", + createdDate: "2022-10-23T00:00:00Z", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + amount: 194.12, + currency: "GBP", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + paymentProvider: "Amazon Pay", + dueDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `amount` | *Decimal | number* | :heavy_minus_sign: | Payment Amount (including gratuity) | **Example 1:** 194.12
**Example 2:** -283.56
**Example 3:** 0 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | The payment method the record is linked to in the accounting or commerce software. | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | +| `status` | [shared.PaymentStatus](../../../sdk/models/shared/paymentstatus.md) | :heavy_minus_sign: | Status of the payment. | | +| `paymentProvider` | *string* | :heavy_minus_sign: | Service provider of the payment, if applicable. | **Example 1:** Amazon Pay
**Example 2:** Checkout.com
**Example 3:** SagePay | +| `dueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercepaymentmethod.md b/lending/docs/sdk/models/shared/commercepaymentmethod.md index e1bde87da..881d411c7 100644 --- a/lending/docs/sdk/models/shared/commercepaymentmethod.md +++ b/lending/docs/sdk/models/shared/commercepaymentmethod.md @@ -1,26 +1,26 @@ -# CommercePaymentMethod - -A Payment Method represents the payment method(s) used to make payments. - -## Example Usage - -```typescript -import { CommercePaymentMethod } from "@codat/lending/sdk/models/shared"; - -let value: CommercePaymentMethod = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - name: "Alipay", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_minus_sign: | The name of the PaymentMethod | Alipay | +# CommercePaymentMethod + +A Payment Method represents the payment method(s) used to make payments. + +## Example Usage + +```typescript +import { CommercePaymentMethod } from "@codat/lending/sdk/models/shared"; + +let value: CommercePaymentMethod = { + id: "13d946f0-c5d5-42bc-b092-97ece17923ab", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + name: "Alipay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `name` | *string* | :heavy_minus_sign: | The name of the PaymentMethod | Alipay | | `status` | [shared.CommercePaymentMethodStatus](../../../sdk/models/shared/commercepaymentmethodstatus.md) | :heavy_minus_sign: | Status of the Payment Method. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercepaymentmethods.md b/lending/docs/sdk/models/shared/commercepaymentmethods.md index 405f48b78..db4bc33f1 100644 --- a/lending/docs/sdk/models/shared/commercepaymentmethods.md +++ b/lending/docs/sdk/models/shared/commercepaymentmethods.md @@ -1,31 +1,23 @@ -# CommercePaymentMethods - -## Example Usage - -```typescript -import { CommercePaymentMethods } from "@codat/lending/sdk/models/shared"; - -let value: CommercePaymentMethods = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommercePaymentMethod](../../../sdk/models/shared/commercepaymentmethod.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommercePaymentMethods + +## Example Usage + +```typescript +import { CommercePaymentMethods } from "@codat/lending/sdk/models/shared"; + +let value: CommercePaymentMethods = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommercePaymentMethod](../../../sdk/models/shared/commercepaymentmethod.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercepaymentmethodstatus.md b/lending/docs/sdk/models/shared/commercepaymentmethodstatus.md index 92e18c75b..a091cb513 100644 --- a/lending/docs/sdk/models/shared/commercepaymentmethodstatus.md +++ b/lending/docs/sdk/models/shared/commercepaymentmethodstatus.md @@ -1,17 +1,15 @@ -# CommercePaymentMethodStatus - -Status of the Payment Method. - -## Example Usage - -```typescript -import { CommercePaymentMethodStatus } from "@codat/lending/sdk/models/shared"; - -let value: CommercePaymentMethodStatus = "Unknown"; -``` - -## Values - -```typescript -"Unknown" | "Active" | "Archived" +# CommercePaymentMethodStatus + +## Example Usage + +```typescript +import { CommercePaymentMethodStatus } from "@codat/lending/sdk/models/shared"; + +let value: CommercePaymentMethodStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercepayments.md b/lending/docs/sdk/models/shared/commercepayments.md index 0fdd3b673..e4064a1e6 100644 --- a/lending/docs/sdk/models/shared/commercepayments.md +++ b/lending/docs/sdk/models/shared/commercepayments.md @@ -1,31 +1,23 @@ -# CommercePayments - -## Example Usage - -```typescript -import { CommercePayments } from "@codat/lending/sdk/models/shared"; - -let value: CommercePayments = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommercePayment](../../../sdk/models/shared/commercepayment.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommercePayments + +## Example Usage + +```typescript +import { CommercePayments } from "@codat/lending/sdk/models/shared"; + +let value: CommercePayments = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommercePayment](../../../sdk/models/shared/commercepayment.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commerceproduct.md b/lending/docs/sdk/models/shared/commerceproduct.md index 2b3884b2f..c1f294225 100644 --- a/lending/docs/sdk/models/shared/commerceproduct.md +++ b/lending/docs/sdk/models/shared/commerceproduct.md @@ -1,57 +1,29 @@ -# CommerceProduct - -A Product is an item in the company's inventory, and includes information about the price and quantity of all products, and variants thereof, available for sale. - - -## Example Usage - -```typescript -import { CommerceProduct } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: CommerceProduct = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - name: "Hard Drive", - description: "1tb Western Digital Hard Drive", - categorization: "Hardware", - variants: [ - { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - name: "Red Coat", - sku: "Coat-Red-Lrg", - barcode: "564158468416486458646886484", - unitOfMeasure: "kg", - vatPercentage: new Decimal("12.5"), - prices: [ - { - currency: "GBP", - }, - ], - inventory: { - locations: [ - { - locationRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }, - }, - ], - }, - createdDate: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_minus_sign: | Name of the product in the commerce or POS system | **Example 1:** Hard Drive
**Example 2:** Windows Installation
**Example 3:** Software Support (Hourly) | -| `description` | *string* | :heavy_minus_sign: | Description of the product recorded in the commerce or point of sale platform. | **Example 1:** 1tb Western Digital Hard Drive
**Example 2:** Install of Windows 11 (Professional Edition)
**Example 3:** 1 hour of support from an agent (phone or remote) | -| `categorization` | *string* | :heavy_minus_sign: | Retail category that the product is assigned to e.g. `Hardware`. | **Example 1:** Hardware
**Example 2:** Software
**Example 3:** Support Services | -| `isGiftCard` | *boolean* | :heavy_minus_sign: | Whether the product represents a gift card or voucher that
can be redeemed in the commerce or POS platform.
| | -| `variants` | [shared.ProductVariant](../../../sdk/models/shared/productvariant.md)[] | :heavy_minus_sign: | N/A | | +# CommerceProduct + +A Product is an item in the company's inventory, and includes information about the price and quantity of all products, and variants thereof, available for sale. + + +## Example Usage + +```typescript +import { CommerceProduct } from "@codat/lending/sdk/models/shared"; + +let value: CommerceProduct = { + id: "13d946f0-c5d5-42bc-b092-97ece17923ab", + name: "Hard Drive", + description: "1tb Western Digital Hard Drive", + categorization: "Hardware", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `name` | *string* | :heavy_minus_sign: | Name of the product in the commerce or POS system | **Example 1:** Hard Drive
**Example 2:** Windows Installation
**Example 3:** Software Support (Hourly) | +| `description` | *string* | :heavy_minus_sign: | Description of the product recorded in the commerce or point of sale platform. | **Example 1:** 1tb Western Digital Hard Drive
**Example 2:** Install of Windows 11 (Professional Edition)
**Example 3:** 1 hour of support from an agent (phone or remote) | +| `categorization` | *string* | :heavy_minus_sign: | Retail category that the product is assigned to e.g. `Hardware`. | **Example 1:** Hardware
**Example 2:** Software
**Example 3:** Support Services | +| `isGiftCard` | *boolean* | :heavy_minus_sign: | Whether the product represents a gift card or voucher that
can be redeemed in the commerce or POS platform.
| | +| `variants` | [shared.ProductVariant](../../../sdk/models/shared/productvariant.md)[] | :heavy_minus_sign: | N/A | | | `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commerceproductcategories.md b/lending/docs/sdk/models/shared/commerceproductcategories.md index cb4ea309d..c953dddff 100644 --- a/lending/docs/sdk/models/shared/commerceproductcategories.md +++ b/lending/docs/sdk/models/shared/commerceproductcategories.md @@ -1,31 +1,23 @@ -# CommerceProductCategories - -## Example Usage - -```typescript -import { CommerceProductCategories } from "@codat/lending/sdk/models/shared"; - -let value: CommerceProductCategories = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommerceProductCategory](../../../sdk/models/shared/commerceproductcategory.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommerceProductCategories + +## Example Usage + +```typescript +import { CommerceProductCategories } from "@codat/lending/sdk/models/shared"; + +let value: CommerceProductCategories = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommerceProductCategory](../../../sdk/models/shared/commerceproductcategory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commerceproductcategory.md b/lending/docs/sdk/models/shared/commerceproductcategory.md index 531d8f3fc..42a147cdd 100644 --- a/lending/docs/sdk/models/shared/commerceproductcategory.md +++ b/lending/docs/sdk/models/shared/commerceproductcategory.md @@ -1,22 +1,22 @@ -# CommerceProductCategory - -Product categories are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. - -## Example Usage - -```typescript -import { CommerceProductCategory } from "@codat/lending/sdk/models/shared"; - -let value: CommerceProductCategory = {}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | The unique identifier of the product category | "102" | -| `name` | *string* | :heavy_minus_sign: | The name of the product category | Entertainment | -| `ancestorRefs` | [shared.CommerceRecordRef](../../../sdk/models/shared/commercerecordref.md)[] | :heavy_minus_sign: | A collection of parent product categories implicitly ordered with the immediate parent last in the list. | | +# CommerceProductCategory + +Product categories are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. + +## Example Usage + +```typescript +import { CommerceProductCategory } from "@codat/lending/sdk/models/shared"; + +let value: CommerceProductCategory = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `id` | *string* | :heavy_minus_sign: | The unique identifier of the product category | "102" | +| `name` | *string* | :heavy_minus_sign: | The name of the product category | Entertainment | +| `ancestorRefs` | [shared.CommerceRecordRef](../../../sdk/models/shared/commercerecordref.md)[] | :heavy_minus_sign: | A collection of parent product categories implicitly ordered with the immediate parent last in the list. | | | `hasChildren` | *boolean* | :heavy_minus_sign: | A boolean indicating whether there are other product categories beneath this one in the hierarchy. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commerceproducts.md b/lending/docs/sdk/models/shared/commerceproducts.md index da1e90620..593546d2c 100644 --- a/lending/docs/sdk/models/shared/commerceproducts.md +++ b/lending/docs/sdk/models/shared/commerceproducts.md @@ -1,31 +1,23 @@ -# CommerceProducts - -## Example Usage - -```typescript -import { CommerceProducts } from "@codat/lending/sdk/models/shared"; - -let value: CommerceProducts = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommerceProduct](../../../sdk/models/shared/commerceproduct.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommerceProducts + +## Example Usage + +```typescript +import { CommerceProducts } from "@codat/lending/sdk/models/shared"; + +let value: CommerceProducts = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommerceProduct](../../../sdk/models/shared/commerceproduct.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercerecordref.md b/lending/docs/sdk/models/shared/commercerecordref.md index 0f7ae3f1b..04ce2eebb 100644 --- a/lending/docs/sdk/models/shared/commercerecordref.md +++ b/lending/docs/sdk/models/shared/commercerecordref.md @@ -1,19 +1,19 @@ -# CommerceRecordRef - -## Example Usage - -```typescript -import { CommerceRecordRef } from "@codat/lending/sdk/models/shared"; - -let value: CommerceRecordRef = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - type: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identitifer of the record being referenced | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +# CommerceRecordRef + +## Example Usage + +```typescript +import { CommerceRecordRef } from "@codat/lending/sdk/models/shared"; + +let value: CommerceRecordRef = { + id: "13d946f0-c5d5-42bc-b092-97ece17923ab", + type: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identitifer of the record being referenced | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `type` | *string* | :heavy_check_mark: | The type of record being referenced. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercereport.md b/lending/docs/sdk/models/shared/commercereport.md index 564acdb64..662c7507e 100644 --- a/lending/docs/sdk/models/shared/commercereport.md +++ b/lending/docs/sdk/models/shared/commercereport.md @@ -1,61 +1,61 @@ -# CommerceReport - -## Structure - -Assess reports follow a consistent structure. Reports contain four sections of information: - -### 1. Report definition - -Information such as: - - 1. The report info (e.g. enhanced_profit_and_loss). - 2. The display name of the report (e.g. Enhanced Profit and Loss). - -### 2. Dimension info - -Information about the dimension contained in the reports such as: - - 1. The type of dimension (e.g. datetime, recordRef). - 2. The display name of the dimension (e.g. Period, Category type, Category sub type). - 3. The details about each item within the dimension (e.g. displayName:"Jan 2022", start:"...", end:"...", id:"...", name:"..."). - -### 3. Measure info - -Information about the measures contained in the report such as: - - 1. The display name of the measure (e.g. value of account, percentage change). - 2. The type of the measure (e.g. currency, percentage). - 3. The unit of the measure (e.g. %, GBP). - -### 4. The data for the report - -When the *includeDisplayName* parameter is set to *true*, it shows the *dimensionDisplayName* and *itemDisplayName* to make the data human-readable. The default setting for *includeDisplayName* is *false*. - - -## Displaying the report - -Reports can be rendered as follows (ordering is implicit rather than explicit): - -![A table showing an example of how a report can be rendered](https://files.readme.io/1fa20ca-Report1.png) - -# Data model - -## Dimensions - -## Example Usage - -```typescript -import { CommerceReport } from "@codat/lending/sdk/models/shared"; - -let value: CommerceReport = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `reportInfo` | Record | :heavy_minus_sign: | N/A | -| `dimensions` | [shared.CommerceReportDimension](../../../sdk/models/shared/commercereportdimension.md)[] | :heavy_minus_sign: | N/A | -| `measures` | [shared.CommerceReportMeasure](../../../sdk/models/shared/commercereportmeasure.md)[] | :heavy_minus_sign: | N/A | -| `reportData` | [shared.CommerceReportComponent](../../../sdk/models/shared/commercereportcomponent.md)[] | :heavy_minus_sign: | N/A | +# CommerceReport + +## Structure + +Assess reports follow a consistent structure. Reports contain four sections of information: + +### 1. Report definition + +Information such as: + + 1. The report info (e.g. enhanced_profit_and_loss). + 2. The display name of the report (e.g. Enhanced Profit and Loss). + +### 2. Dimension info + +Information about the dimension contained in the reports such as: + + 1. The type of dimension (e.g. datetime, recordRef). + 2. The display name of the dimension (e.g. Period, Category type, Category sub type). + 3. The details about each item within the dimension (e.g. displayName:"Jan 2022", start:"...", end:"...", id:"...", name:"..."). + +### 3. Measure info + +Information about the measures contained in the report such as: + + 1. The display name of the measure (e.g. value of account, percentage change). + 2. The type of the measure (e.g. currency, percentage). + 3. The unit of the measure (e.g. %, GBP). + +### 4. The data for the report + +When the *includeDisplayName* parameter is set to *true*, it shows the *dimensionDisplayName* and *itemDisplayName* to make the data human-readable. The default setting for *includeDisplayName* is *false*. + + +## Displaying the report + +Reports can be rendered as follows (ordering is implicit rather than explicit): + +![A table showing an example of how a report can be rendered](https://files.readme.io/1fa20ca-Report1.png) + +# Data model + +## Dimensions + +## Example Usage + +```typescript +import { CommerceReport } from "@codat/lending/sdk/models/shared"; + +let value: CommerceReport = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `reportInfo` | Record | :heavy_minus_sign: | N/A | +| `dimensions` | [shared.CommerceReportDimension](../../../sdk/models/shared/commercereportdimension.md)[] | :heavy_minus_sign: | N/A | +| `measures` | [shared.CommerceReportMeasure](../../../sdk/models/shared/commercereportmeasure.md)[] | :heavy_minus_sign: | N/A | +| `reportData` | [shared.CommerceReportComponent](../../../sdk/models/shared/commercereportcomponent.md)[] | :heavy_minus_sign: | N/A | | `errors` | [shared.CommerceReportError](../../../sdk/models/shared/commercereporterror.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercereportcomponent.md b/lending/docs/sdk/models/shared/commercereportcomponent.md index 740e28fef..11e4931d1 100644 --- a/lending/docs/sdk/models/shared/commercereportcomponent.md +++ b/lending/docs/sdk/models/shared/commercereportcomponent.md @@ -1,20 +1,20 @@ -# CommerceReportComponent - -## Example Usage - -```typescript -import { CommerceReportComponent } from "@codat/lending/sdk/models/shared"; - -let value: CommerceReportComponent = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `dimension` | *number* | :heavy_minus_sign: | The component's dimension. | -| `dimensionDisplayName` | *string* | :heavy_minus_sign: | The component's display name. | -| `item` | *number* | :heavy_minus_sign: | The component's item number. | -| `itemDisplayName` | *string* | :heavy_minus_sign: | The component's item display name. | -| `measures` | [shared.ReportComponentMeasure](../../../sdk/models/shared/reportcomponentmeasure.md)[] | :heavy_minus_sign: | N/A | +# CommerceReportComponent + +## Example Usage + +```typescript +import { CommerceReportComponent } from "@codat/lending/sdk/models/shared"; + +let value: CommerceReportComponent = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `dimension` | *number* | :heavy_minus_sign: | The component's dimension. | +| `dimensionDisplayName` | *string* | :heavy_minus_sign: | The component's display name. | +| `item` | *number* | :heavy_minus_sign: | The component's item number. | +| `itemDisplayName` | *string* | :heavy_minus_sign: | The component's item display name. | +| `measures` | [shared.ReportComponentMeasure](../../../sdk/models/shared/reportcomponentmeasure.md)[] | :heavy_minus_sign: | N/A | | `components` | [shared.CommerceReportComponent](../../../sdk/models/shared/commercereportcomponent.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercereportdimension.md b/lending/docs/sdk/models/shared/commercereportdimension.md index cfc6088e8..f65d5e2ab 100644 --- a/lending/docs/sdk/models/shared/commercereportdimension.md +++ b/lending/docs/sdk/models/shared/commercereportdimension.md @@ -1,18 +1,18 @@ -# CommerceReportDimension - -## Example Usage - -```typescript -import { CommerceReportDimension } from "@codat/lending/sdk/models/shared"; - -let value: CommerceReportDimension = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `index` | *number* | :heavy_minus_sign: | The dimension's index. | -| `displayName` | *string* | :heavy_minus_sign: | The dimension's display name. | -| `type` | *string* | :heavy_minus_sign: | The dimension's type. | +# CommerceReportDimension + +## Example Usage + +```typescript +import { CommerceReportDimension } from "@codat/lending/sdk/models/shared"; + +let value: CommerceReportDimension = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `index` | *number* | :heavy_minus_sign: | The dimension's index. | +| `displayName` | *string* | :heavy_minus_sign: | The dimension's display name. | +| `type` | *string* | :heavy_minus_sign: | The dimension's type. | | `items` | [shared.CommerceReportDimensionItems](../../../sdk/models/shared/commercereportdimensionitems.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercereportdimensionitems.md b/lending/docs/sdk/models/shared/commercereportdimensionitems.md index 18c3a52cb..7369737b6 100644 --- a/lending/docs/sdk/models/shared/commercereportdimensionitems.md +++ b/lending/docs/sdk/models/shared/commercereportdimensionitems.md @@ -1,15 +1,15 @@ -# CommerceReportDimensionItems - -## Example Usage - -```typescript -import { CommerceReportDimensionItems } from "@codat/lending/sdk/models/shared"; - -let value: CommerceReportDimensionItems = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +# CommerceReportDimensionItems + +## Example Usage + +```typescript +import { CommerceReportDimensionItems } from "@codat/lending/sdk/models/shared"; + +let value: CommerceReportDimensionItems = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | | `index` | *number* | :heavy_minus_sign: | The dimension's items index. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercereporterror.md b/lending/docs/sdk/models/shared/commercereporterror.md index d89fadaf8..99b93316e 100644 --- a/lending/docs/sdk/models/shared/commercereporterror.md +++ b/lending/docs/sdk/models/shared/commercereporterror.md @@ -1,17 +1,17 @@ -# CommerceReportError - -## Example Usage - -```typescript -import { CommerceReportError } from "@codat/lending/sdk/models/shared"; - -let value: CommerceReportError = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `message` | *string* | :heavy_minus_sign: | Message returned by error. | -| `type` | *string* | :heavy_minus_sign: | The type of error. | +# CommerceReportError + +## Example Usage + +```typescript +import { CommerceReportError } from "@codat/lending/sdk/models/shared"; + +let value: CommerceReportError = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `message` | *string* | :heavy_minus_sign: | Message returned by error. | +| `type` | *string* | :heavy_minus_sign: | The type of error. | | `details` | Record | :heavy_minus_sign: | Additional details on the error. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercereportmeasure.md b/lending/docs/sdk/models/shared/commercereportmeasure.md index 8dac4174d..dd86686b3 100644 --- a/lending/docs/sdk/models/shared/commercereportmeasure.md +++ b/lending/docs/sdk/models/shared/commercereportmeasure.md @@ -1,18 +1,18 @@ -# CommerceReportMeasure - -## Example Usage - -```typescript -import { CommerceReportMeasure } from "@codat/lending/sdk/models/shared"; - -let value: CommerceReportMeasure = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `displayName` | *string* | :heavy_minus_sign: | The measure's display name. | -| `units` | *string* | :heavy_minus_sign: | The measure's units e.g. percentage (%). | -| `index` | *number* | :heavy_minus_sign: | The measure's index. | +# CommerceReportMeasure + +## Example Usage + +```typescript +import { CommerceReportMeasure } from "@codat/lending/sdk/models/shared"; + +let value: CommerceReportMeasure = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `displayName` | *string* | :heavy_minus_sign: | The measure's display name. | +| `units` | *string* | :heavy_minus_sign: | The measure's units e.g. percentage (%). | +| `index` | *number* | :heavy_minus_sign: | The measure's index. | | `type` | *string* | :heavy_minus_sign: | The measure's type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercetransaction.md b/lending/docs/sdk/models/shared/commercetransaction.md index c62547c69..f44ffee7e 100644 --- a/lending/docs/sdk/models/shared/commercetransaction.md +++ b/lending/docs/sdk/models/shared/commercetransaction.md @@ -1,48 +1,43 @@ -# CommerceTransaction - -Details of all financial transactions recorded in the commerce or point of sale system are added to the Transactions data type. For example, payments, service charges, and fees. - -You can use data from the Transactions endpoints to calculate key metrics, such as: -- Transaction volumes -- Average transaction volume -- Average transaction value -- Returns -- Payouts - -## Example Usage - -```typescript -import { CommerceTransaction } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: CommerceTransaction = { - createdDate: "2022-10-23T00:00:00Z", - sourceCreatedDate: "2022-10-23T00:00:00Z", - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - totalAmount: new Decimal("194.12"), - currency: "GBP", - subType: "CardPayment", - transactionSourceRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - type: "Payment", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceCreatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | The total transaction amount | **Example 1:** 194.12
**Example 2:** -283.56
**Example 3:** 0 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `type` | [shared.TransactionType](../../../sdk/models/shared/transactiontype.md) | :heavy_minus_sign: | The type of the platform transaction:
- `Unknown`
- `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account.
- `Payment` — Credit and debit card payments.
- `PaymentFee` — Payment provider's fee on each card payment.
- `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller.
- `Payout` — Transfer of funds from the seller's merchant account to their bank account.
- `Refund` — Refunds to a customer's credit or debit card.
- `Transfer` — Secure transfer of funds to the seller's bank account. | | -| `subType` | *string* | :heavy_minus_sign: | Non-standardised transaction type data from the commerce software | **Example 1:** CardPayment
**Example 2:** Invoice payment | -| `transactionSourceRef` | [shared.TransactionSourceRef](../../../sdk/models/shared/transactionsourceref.md) | :heavy_minus_sign: | Link to the source event which triggered this transaction | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file +# CommerceTransaction + +Details of all financial transactions recorded in the commerce or point of sale system are added to the Transactions data type. For example, payments, service charges, and fees. + +You can use data from the Transactions endpoints to calculate key metrics, such as: +- Transaction volumes +- Average transaction volume +- Average transaction value +- Returns +- Payouts + +## Example Usage + +```typescript +import { CommerceTransaction } from "@codat/lending/sdk/models/shared"; + +let value: CommerceTransaction = { + id: "13d946f0-c5d5-42bc-b092-97ece17923ab", + totalAmount: 194.12, + currency: "GBP", + subType: "CardPayment", + createdDate: "2022-10-23T00:00:00Z", + sourceCreatedDate: "2022-10-23T00:00:00Z", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | The total transaction amount | **Example 1:** 194.12
**Example 2:** -283.56
**Example 3:** 0 | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `type` | [shared.TransactionType](../../../sdk/models/shared/transactiontype.md) | :heavy_minus_sign: | The type of the platform transaction:
- `Unknown`
- `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account.
- `Payment` — Credit and debit card payments.
- `PaymentFee` — Payment provider's fee on each card payment.
- `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller.
- `Payout` — Transfer of funds from the seller's merchant account to their bank account.
- `Refund` — Refunds to a customer's credit or debit card.
- `Transfer` — Secure transfer of funds to the seller's bank account. | | +| `subType` | *string* | :heavy_minus_sign: | Non-standardised transaction type data from the commerce software | **Example 1:** CardPayment
**Example 2:** Invoice payment | +| `transactionSourceRef` | [shared.TransactionSourceRef](../../../sdk/models/shared/transactionsourceref.md) | :heavy_minus_sign: | Link to the source event which triggered this transaction | | +| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceCreatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/commercetransactions.md b/lending/docs/sdk/models/shared/commercetransactions.md index 08637b950..8d89998e1 100644 --- a/lending/docs/sdk/models/shared/commercetransactions.md +++ b/lending/docs/sdk/models/shared/commercetransactions.md @@ -1,31 +1,23 @@ -# CommerceTransactions - -## Example Usage - -```typescript -import { CommerceTransactions } from "@codat/lending/sdk/models/shared"; - -let value: CommerceTransactions = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.CommerceTransaction](../../../sdk/models/shared/commercetransaction.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# CommerceTransactions + +## Example Usage + +```typescript +import { CommerceTransactions } from "@codat/lending/sdk/models/shared"; + +let value: CommerceTransactions = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.CommerceTransaction](../../../sdk/models/shared/commercetransaction.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/companies.md b/lending/docs/sdk/models/shared/companies.md index 13f3c02f3..9ba71a12b 100644 --- a/lending/docs/sdk/models/shared/companies.md +++ b/lending/docs/sdk/models/shared/companies.md @@ -1,31 +1,23 @@ -# Companies - -## Example Usage - -```typescript -import { Companies } from "@codat/lending/sdk/models/shared"; - -let value: Companies = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.Company](../../../sdk/models/shared/company.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# Companies + +## Example Usage + +```typescript +import { Companies } from "@codat/lending/sdk/models/shared"; + +let value: Companies = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.Company](../../../sdk/models/shared/company.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/company.md b/lending/docs/sdk/models/shared/company.md index 15671506c..7162a341b 100644 --- a/lending/docs/sdk/models/shared/company.md +++ b/lending/docs/sdk/models/shared/company.md @@ -1,63 +1,61 @@ -# Company - -In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data. - -Typically each company is one of your customers. - -When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company. - -## Example Usage - -```typescript -import { Company } from "@codat/lending/sdk/models/shared"; - -let value: Company = { - id: "0498e921-9b53-4396-a412-4f2f5983b0a2", - name: "string", - redirect: - "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", - lastSync: "2022-01-01T12:00:00.000Z", - created: "2022-01-01T12:00:00.000Z", - createdByUserName: "string", - products: [ - "spend-insights", - "lending", - ], - tags: { - "region": "us", - "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c", - }, - dataConnections: [ - { - id: "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", - integrationId: "bf083d72-62c7-493e-aec9-81b4dbba7e2c", - integrationKey: "dfxm", - sourceId: "bdd831ce-eebd-4896-89a7-20e5ee8989ee", - sourceType: "Banking", - platformName: "Basiq", - linkUrl: - "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", - status: "Linked", - lastSync: "2022-10-27T10:22:43.6464237Z", - created: "2022-10-27T09:53:29Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `name` | *string* | :heavy_check_mark: | The name of the company | Codat Ltd. | -| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | -| `redirect` | *string* | :heavy_check_mark: | The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. | https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739 | -| `lastSync` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `created` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `createdByUserName` | *string* | :heavy_minus_sign: | Name of user that created the company in Codat. | | -| `products` | *string*[] | :heavy_minus_sign: | An array of products that are currently enabled for the company. | | -| `tags` | Record | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | -| `referenceParentCompany` | [shared.CompanyReference](../../../sdk/models/shared/companyreference.md) | :heavy_minus_sign: | N/A | | -| `referenceSubsidiaryCompanies` | [shared.CompanyReference](../../../sdk/models/shared/companyreference.md)[] | :heavy_minus_sign: | A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. | | +# Company + +In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data. + +Typically each company is one of your customers. + +When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company. + +## Example Usage + +```typescript +import { Company } from "@codat/lending/sdk/models/shared"; + +let value: Company = { + id: "0498e921-9b53-4396-a412-4f2f5983b0a2", + name: "string", + redirect: "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", + lastSync: "2022-01-01T12:00:00.000Z", + created: "2022-01-01T12:00:00.000Z", + createdByUserName: "string", + products: [ + "spend-insights", + "lending", + ], + tags: { + "region": "us", + "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c", + }, + dataConnections: [ + { + id: "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", + integrationId: "bf083d72-62c7-493e-aec9-81b4dbba7e2c", + integrationKey: "dfxm", + sourceId: "bdd831ce-eebd-4896-89a7-20e5ee8989ee", + sourceType: "Banking", + platformName: "Basiq", + linkUrl: "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", + status: "Linked", + lastSync: "2022-10-27T10:22:43.6464237Z", + created: "2022-10-27T09:53:29Z", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `name` | *string* | :heavy_check_mark: | The name of the company | Codat Ltd. | +| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +| `redirect` | *string* | :heavy_check_mark: | The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. | https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739 | +| `lastSync` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `created` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `createdByUserName` | *string* | :heavy_minus_sign: | Name of user that created the company in Codat. | | +| `products` | *string*[] | :heavy_minus_sign: | An array of products that are currently enabled for the company. | | +| `tags` | Record | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | +| `referenceParentCompany` | [shared.CompanyReference](../../../sdk/models/shared/companyreference.md) | :heavy_minus_sign: | The parent entity or controlling organization of this company. Null if the company has no parent. | | +| `referenceSubsidiaryCompanies` | [shared.CompanyReference](../../../sdk/models/shared/companyreference.md)[] | :heavy_minus_sign: | A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. | | | `dataConnections` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/companyreference.md b/lending/docs/sdk/models/shared/companyreference.md index 3672f8693..794486a6c 100644 --- a/lending/docs/sdk/models/shared/companyreference.md +++ b/lending/docs/sdk/models/shared/companyreference.md @@ -1,23 +1,23 @@ -# CompanyReference - -## Example Usage - -```typescript -import { CompanyReference } from "@codat/lending/sdk/models/shared"; - -let value: CompanyReference = { - id: "8a210b68-6988-11ed-a1eb-0242ac120002", - name: "Codat Ltd.", - description: "Requested early access to the new financing scheme.", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `name` | *string* | :heavy_minus_sign: | The name of the company | Codat Ltd. | -| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | -| `links` | [shared.CompanyReferenceLinks](../../../sdk/models/shared/companyreferencelinks.md) | :heavy_minus_sign: | A collection of links for the company. | | +# CompanyReference + +## Example Usage + +```typescript +import { CompanyReference } from "@codat/lending/sdk/models/shared"; + +let value: CompanyReference = { + id: "8a210b68-6988-11ed-a1eb-0242ac120002", + name: "Codat Ltd.", + description: "Requested early access to the new financing scheme.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `name` | *string* | :heavy_minus_sign: | The name of the company | Codat Ltd. | +| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +| `links` | [shared.CompanyReferenceLinks](../../../sdk/models/shared/companyreferencelinks.md) | :heavy_minus_sign: | A collection of links for the company. | | | `tags` | Record | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/companyreferencelinks.md b/lending/docs/sdk/models/shared/companyreferencelinks.md index 9572994e5..3d9dc2cf1 100644 --- a/lending/docs/sdk/models/shared/companyreferencelinks.md +++ b/lending/docs/sdk/models/shared/companyreferencelinks.md @@ -1,17 +1,17 @@ -# CompanyReferenceLinks - -A collection of links for the company. - -## Example Usage - -```typescript -import { CompanyReferenceLinks } from "@codat/lending/sdk/models/shared"; - -let value: CompanyReferenceLinks = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +# CompanyReferenceLinks + +A collection of links for the company. + +## Example Usage + +```typescript +import { CompanyReferenceLinks } from "@codat/lending/sdk/models/shared"; + +let value: CompanyReferenceLinks = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | | `portal` | *string* | :heavy_minus_sign: | Link to the company page in the portal. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/companyrequestbody.md b/lending/docs/sdk/models/shared/companyrequestbody.md index 47d671965..799f9516a 100644 --- a/lending/docs/sdk/models/shared/companyrequestbody.md +++ b/lending/docs/sdk/models/shared/companyrequestbody.md @@ -1,20 +1,20 @@ -# CompanyRequestBody - -## Example Usage - -```typescript -import { CompanyRequestBody } from "@codat/lending/sdk/models/shared"; - -let value: CompanyRequestBody = { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name of company being connected. | Bank of Dave | -| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +# CompanyRequestBody + +## Example Usage + +```typescript +import { CompanyRequestBody } from "@codat/lending/sdk/models/shared"; + +let value: CompanyRequestBody = { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Name of company being connected. | Bank of Dave | +| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | | `tags` | Record | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/companyupdaterequest.md b/lending/docs/sdk/models/shared/companyupdaterequest.md index 73b259b44..db5948600 100644 --- a/lending/docs/sdk/models/shared/companyupdaterequest.md +++ b/lending/docs/sdk/models/shared/companyupdaterequest.md @@ -1,20 +1,20 @@ -# CompanyUpdateRequest - -## Example Usage - -```typescript -import { CompanyUpdateRequest } from "@codat/lending/sdk/models/shared"; - -let value: CompanyUpdateRequest = { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | Name of company being connected. | Bank of Dave | -| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +# CompanyUpdateRequest + +## Example Usage + +```typescript +import { CompanyUpdateRequest } from "@codat/lending/sdk/models/shared"; + +let value: CompanyUpdateRequest = { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | Name of company being connected. | Bank of Dave | +| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | | `tags` | Record | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/connection.md b/lending/docs/sdk/models/shared/connection.md index 08ef3ab94..ed348a865 100644 --- a/lending/docs/sdk/models/shared/connection.md +++ b/lending/docs/sdk/models/shared/connection.md @@ -1,49 +1,48 @@ -# Connection - -A connection represents a [company's](https://docs.codat.io/lending-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. - -A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: - -- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. -- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. -- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. -Any combination of accounting, banking, and commerce data connections is allowed. - -Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). - -## Example Usage - -```typescript -import { Connection } from "@codat/lending/sdk/models/shared"; - -let value: Connection = { - id: "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", - integrationId: "bf083d72-62c7-493e-aec9-81b4dbba7e2c", - integrationKey: "dfxm", - sourceId: "bdd831ce-eebd-4896-89a7-20e5ee8989ee", - sourceType: "Banking", - platformName: "Basiq", - linkUrl: - "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", - status: "Linked", - lastSync: "2022-10-27T10:22:43.6464237Z", - created: "2022-10-27T09:53:29Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `integrationId` | *string* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | -| `integrationKey` | *string* | :heavy_minus_sign: | A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. | | -| `sourceId` | *string* | :heavy_check_mark: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | -| `sourceType` | [shared.SourceType](../../../sdk/models/shared/sourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | -| `platformName` | *string* | :heavy_check_mark: | Name of integration connected to company. | | -| `linkUrl` | *string* | :heavy_check_mark: | The link URL your customers can use to authorize access to their business application. | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | -| `status` | [shared.DataConnectionStatus](../../../sdk/models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | -| `lastSync` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `created` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `dataConnectionErrors` | [shared.DataConnectionError](../../../sdk/models/shared/dataconnectionerror.md)[] | :heavy_minus_sign: | N/A | | +# Connection + +A connection represents a [company's](https://docs.codat.io/lending-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + +A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + +- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. +- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. +- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. +Any combination of accounting, banking, and commerce data connections is allowed. + +Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + +## Example Usage + +```typescript +import { Connection } from "@codat/lending/sdk/models/shared"; + +let value: Connection = { + id: "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", + integrationId: "bf083d72-62c7-493e-aec9-81b4dbba7e2c", + integrationKey: "dfxm", + sourceId: "bdd831ce-eebd-4896-89a7-20e5ee8989ee", + sourceType: "Banking", + platformName: "Basiq", + linkUrl: "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", + status: "Linked", + lastSync: "2022-10-27T10:22:43.6464237Z", + created: "2022-10-27T09:53:29Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `integrationId` | *string* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | +| `integrationKey` | *string* | :heavy_minus_sign: | A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. | | +| `sourceId` | *string* | :heavy_check_mark: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | +| `sourceType` | [shared.SourceType](../../../sdk/models/shared/sourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | +| `platformName` | *string* | :heavy_check_mark: | Name of integration connected to company. | | +| `linkUrl` | *string* | :heavy_check_mark: | The link URL your customers can use to authorize access to their business application. | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | +| `status` | [shared.DataConnectionStatus](../../../sdk/models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | +| `lastSync` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `created` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `dataConnectionErrors` | [shared.DataConnectionError](../../../sdk/models/shared/dataconnectionerror.md)[] | :heavy_minus_sign: | N/A | | | `connectionInfo` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/connections.md b/lending/docs/sdk/models/shared/connections.md index ec305971d..d42127242 100644 --- a/lending/docs/sdk/models/shared/connections.md +++ b/lending/docs/sdk/models/shared/connections.md @@ -1,31 +1,23 @@ -# Connections - -## Example Usage - -```typescript -import { Connections } from "@codat/lending/sdk/models/shared"; - -let value: Connections = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# Connections + +## Example Usage + +```typescript +import { Connections } from "@codat/lending/sdk/models/shared"; + +let value: Connections = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/contact.md b/lending/docs/sdk/models/shared/contact.md index 877a7fdb4..f53b04fc5 100644 --- a/lending/docs/sdk/models/shared/contact.md +++ b/lending/docs/sdk/models/shared/contact.md @@ -1,29 +1,20 @@ -# Contact - -## Example Usage - -```typescript -import { Contact } from "@codat/lending/sdk/models/shared"; - -let value: Contact = { - phone: [ - { - number: "+44 25691 154789", - type: "Landline", - }, - ], - status: "Unknown", - modifiedDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | Name of a contact for a customer. | | -| `email` | *string* | :heavy_minus_sign: | Email of a contact for a customer. | | -| `phone` | [shared.PhoneNumber](../../../sdk/models/shared/phonenumber.md)[] | :heavy_minus_sign: | An array of Phone numbers. | | -| `address` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md) | :heavy_minus_sign: | N/A | | -| `status` | [shared.CustomerStatus](../../../sdk/models/shared/customerstatus.md) | :heavy_check_mark: | Status of customer. | | -| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# Contact + +## Example Usage + +```typescript +import { Contact } from "@codat/lending/sdk/models/shared"; + +let value: Contact = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | Name of a contact for a customer. | +| `email` | *string* | :heavy_minus_sign: | Email of a contact for a customer. | +| `phone` | [shared.PhoneNumber](../../../sdk/models/shared/phonenumber.md)[] | :heavy_minus_sign: | An array of Phone numbers. | +| `address` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md) | :heavy_minus_sign: | An object of Address information. | +| `status` | [shared.CustomerStatus](../../../sdk/models/shared/customerstatus.md) | :heavy_check_mark: | N/A | +| `modifiedDate` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/contactref.md b/lending/docs/sdk/models/shared/contactref.md index 54b847e33..6940173f8 100644 --- a/lending/docs/sdk/models/shared/contactref.md +++ b/lending/docs/sdk/models/shared/contactref.md @@ -1,18 +1,16 @@ -# ContactRef - -## Example Usage - -```typescript -import { ContactRef } from "@codat/lending/sdk/models/shared"; - -let value: ContactRef = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for a customer or supplier. | +# ContactRef + +## Example Usage + +```typescript +import { ContactRef } from "@codat/lending/sdk/models/shared"; + +let value: ContactRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for a customer or supplier. | | `dataType` | [shared.ContactRefDataType](../../../sdk/models/shared/contactrefdatatype.md) | :heavy_minus_sign: | Allowed name of the 'dataType'. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/contactrefdatatype.md b/lending/docs/sdk/models/shared/contactrefdatatype.md index 23bbd1caa..906a1b9b7 100644 --- a/lending/docs/sdk/models/shared/contactrefdatatype.md +++ b/lending/docs/sdk/models/shared/contactrefdatatype.md @@ -1,17 +1,15 @@ -# ContactRefDataType - -Allowed name of the 'dataType'. - -## Example Usage - -```typescript -import { ContactRefDataType } from "@codat/lending/sdk/models/shared"; - -let value: ContactRefDataType = "suppliers"; -``` - -## Values - -```typescript -"customers" | "suppliers" +# ContactRefDataType + +## Example Usage + +```typescript +import { ContactRefDataType } from "@codat/lending/sdk/models/shared"; + +let value: ContactRefDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/contactreference.md b/lending/docs/sdk/models/shared/contactreference.md index 011c2b9a3..fde47d4e8 100644 --- a/lending/docs/sdk/models/shared/contactreference.md +++ b/lending/docs/sdk/models/shared/contactreference.md @@ -1,18 +1,18 @@ -# ContactReference - -## Example Usage - -```typescript -import { ContactReference } from "@codat/lending/sdk/models/shared"; - -let value: ContactReference = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for a customer or supplier. | +# ContactReference + +## Example Usage + +```typescript +import { ContactReference } from "@codat/lending/sdk/models/shared"; + +let value: ContactReference = { + id: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for a customer or supplier. | | `dataType` | [shared.JournalLineDataType](../../../sdk/models/shared/journallinedatatype.md) | :heavy_minus_sign: | Allowed name of the 'dataType'. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/createbankaccounttransaction.md b/lending/docs/sdk/models/shared/createbankaccounttransaction.md index 8dd3ef0ef..5c4a914d5 100644 --- a/lending/docs/sdk/models/shared/createbankaccounttransaction.md +++ b/lending/docs/sdk/models/shared/createbankaccounttransaction.md @@ -1,21 +1,19 @@ -# CreateBankAccountTransaction - -## Example Usage - -```typescript -import { CreateBankAccountTransaction } from "@codat/lending/sdk/models/shared"; - -let value: CreateBankAccountTransaction = { - date: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Identifier for the bank account transaction, unique for the company in the accounting software. | | -| `amount` | *Decimal* | :heavy_minus_sign: | The amount transacted in the bank transaction. | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `description` | *string* | :heavy_minus_sign: | Description of the bank transaction. | | -| `balance` | *Decimal* | :heavy_minus_sign: | The remaining balance in the account with ID `accountId`. | | \ No newline at end of file +# CreateBankAccountTransaction + +## Example Usage + +```typescript +import { CreateBankAccountTransaction } from "@codat/lending/sdk/models/shared"; + +let value: CreateBankAccountTransaction = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bank account transaction, unique for the company in the accounting software. | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The amount transacted in the bank transaction. | +| `date` | *string* | :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. | +| `description` | *string* | :heavy_minus_sign: | Description of the bank transaction. | +| `balance` | *Decimal | number* | :heavy_minus_sign: | The remaining balance in the account with ID `accountId`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/creditnotelineitem.md b/lending/docs/sdk/models/shared/creditnotelineitem.md index b3d622bc9..b66b992c3 100644 --- a/lending/docs/sdk/models/shared/creditnotelineitem.md +++ b/lending/docs/sdk/models/shared/creditnotelineitem.md @@ -1,41 +1,28 @@ -# CreditNoteLineItem - -## Example Usage - -```typescript -import { CreditNoteLineItem } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: CreditNoteLineItem = { - unitAmount: new Decimal("1030.96"), - quantity: new Decimal("8246.29"), - accountRef: {}, - tracking: { - categoryRefs: [], - isBilledTo: "Unknown", - isRebilledTo: "Unknown", - recordRef: { - dataType: "journalEntry", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Friendly name of each line item. For example, the goods or service for which credit has been issued. | | -| `unitAmount` | *Decimal* | :heavy_check_mark: | Unit price of the goods or service. | | -| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of the goods or service for which credit has been issued. | | -| `discountAmount` | *Decimal* | :heavy_minus_sign: | Value of any discounts applied. | | -| `subTotal` | *Decimal* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | | -| `taxAmount` | *Decimal* | :heavy_minus_sign: | Amount of tax associated with the line item. | | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `discountPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | | -| `taxRateRef` | [shared.TaxRateRef](../../../sdk/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 | | -| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | | -| ~~`trackingCategoryRefs`~~ | [shared.TrackingCategoryRef](../../../sdk/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. | | -| `tracking` | [shared.AccountsReceivableTracking](../../../sdk/models/shared/accountsreceivabletracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | | -| `isDirectIncome` | *boolean* | :heavy_minus_sign: | The credit note is a direct income if `True`. | | \ No newline at end of file +# CreditNoteLineItem + +## Example Usage + +```typescript +import { CreditNoteLineItem } from "@codat/lending/sdk/models/shared"; + +let value: CreditNoteLineItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Friendly name of each line item. For example, the goods or service for which credit has been issued. | +| `unitAmount` | *Decimal | number* | :heavy_check_mark: | Unit price of the goods or service. | +| `quantity` | *Decimal | number* | :heavy_check_mark: | Number of units of the goods or service for which credit has been issued. | +| `discountAmount` | *Decimal | number* | :heavy_minus_sign: | Value of any discounts applied. | +| `subTotal` | *Decimal | number* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | +| `taxAmount` | *Decimal | number* | :heavy_minus_sign: | Amount of tax associated with the line item. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | Reference to the account to which the line item is linked. | +| `discountPercentage` | *Decimal | number* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | +| `taxRateRef` | [shared.TaxRateRef](../../../sdk/models/shared/taxrateref.md) | :heavy_minus_sign: | Reference to the tax rate to which the line item is linked. | +| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Reference to the tracking categories to which the line item is linked. | +| `tracking` | [shared.AccountsReceivableTracking](../../../sdk/models/shared/accountsreceivabletracking.md) | :heavy_minus_sign: | N/A | +| `isDirectIncome` | *boolean* | :heavy_minus_sign: | The credit note is a direct income if `True`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/creditnotestatus.md b/lending/docs/sdk/models/shared/creditnotestatus.md index cf728eedd..65de9dc9e 100644 --- a/lending/docs/sdk/models/shared/creditnotestatus.md +++ b/lending/docs/sdk/models/shared/creditnotestatus.md @@ -1,17 +1,17 @@ -# CreditNoteStatus - -Current state of the credit note. - -## Example Usage - -```typescript -import { CreditNoteStatus } from "@codat/lending/sdk/models/shared"; - -let value: CreditNoteStatus = "Draft"; -``` - -## Values - -```typescript -"Unknown" | "Draft" | "Submitted" | "Paid" | "Void" | "PartiallyPaid" +# CreditNoteStatus + +Current state of the credit note. + +## Example Usage + +```typescript +import { CreditNoteStatus } from "@codat/lending/sdk/models/shared"; + +let value: CreditNoteStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Draft" | "Submitted" | "Paid" | "Void" | "PartiallyPaid" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/customerstatus.md b/lending/docs/sdk/models/shared/customerstatus.md index 5488c0cbb..84af442d9 100644 --- a/lending/docs/sdk/models/shared/customerstatus.md +++ b/lending/docs/sdk/models/shared/customerstatus.md @@ -1,17 +1,17 @@ -# CustomerStatus - -Status of customer. - -## Example Usage - -```typescript -import { CustomerStatus } from "@codat/lending/sdk/models/shared"; - -let value: CustomerStatus = "Unknown"; -``` - -## Values - -```typescript -"Unknown" | "Active" | "Archived" +# CustomerStatus + +Status of customer. + +## Example Usage + +```typescript +import { CustomerStatus } from "@codat/lending/sdk/models/shared"; + +let value: CustomerStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataconnectionerror.md b/lending/docs/sdk/models/shared/dataconnectionerror.md index 8c85db0d6..b148e1f9d 100644 --- a/lending/docs/sdk/models/shared/dataconnectionerror.md +++ b/lending/docs/sdk/models/shared/dataconnectionerror.md @@ -1,23 +1,23 @@ -# DataConnectionError - -## Example Usage - -```typescript -import { DataConnectionError } from "@codat/lending/sdk/models/shared"; - -let value: DataConnectionError = { - erroredOnUtc: "2022-10-23T00:00:00Z", - resolvedOnUtc: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `statusCode` | *string* | :heavy_minus_sign: | The HTTP status code returned by the source platform when the error occurred. | | -| `statusText` | *string* | :heavy_minus_sign: | A non-numeric status code/text returned by the source platform when the error occurred. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about a error returned by Codat. | | -| `erroredOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `status` | [shared.ErrorStatus](../../../sdk/models/shared/errorstatus.md) | :heavy_minus_sign: | The current status of a transient error. Null statuses indicate that the error is not transient. | | +# DataConnectionError + +## Example Usage + +```typescript +import { DataConnectionError } from "@codat/lending/sdk/models/shared"; + +let value: DataConnectionError = { + erroredOnUtc: "2022-10-23T00:00:00Z", + resolvedOnUtc: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `statusCode` | *string* | :heavy_minus_sign: | The HTTP status code returned by the source platform when the error occurred. | | +| `statusText` | *string* | :heavy_minus_sign: | A non-numeric status code/text returned by the source platform when the error occurred. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about a error returned by Codat. | | +| `erroredOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `status` | [shared.ErrorStatus](../../../sdk/models/shared/errorstatus.md) | :heavy_minus_sign: | The current status of a transient error. Null statuses indicate that the error is not transient. | | | `resolvedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataconnectionstatus.md b/lending/docs/sdk/models/shared/dataconnectionstatus.md index 9afc43bf7..1543cf32a 100644 --- a/lending/docs/sdk/models/shared/dataconnectionstatus.md +++ b/lending/docs/sdk/models/shared/dataconnectionstatus.md @@ -1,17 +1,17 @@ -# DataConnectionStatus - -The current authorization status of the data connection. - -## Example Usage - -```typescript -import { DataConnectionStatus } from "@codat/lending/sdk/models/shared"; - -let value: DataConnectionStatus = "Deauthorized"; -``` - -## Values - -```typescript -"PendingAuth" | "Linked" | "Unlinked" | "Deauthorized" +# DataConnectionStatus + +The current authorization status of the data connection. + +## Example Usage + +```typescript +import { DataConnectionStatus } from "@codat/lending/sdk/models/shared"; + +let value: DataConnectionStatus = "PendingAuth"; +``` + +## Values + +```typescript +"PendingAuth" | "Linked" | "Unlinked" | "Deauthorized" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegrityamounts.md b/lending/docs/sdk/models/shared/dataintegrityamounts.md index 818a1fb6c..0a519ebf6 100644 --- a/lending/docs/sdk/models/shared/dataintegrityamounts.md +++ b/lending/docs/sdk/models/shared/dataintegrityamounts.md @@ -1,21 +1,19 @@ -# DataIntegrityAmounts - -Only returned for transactions. For accounts, there is nothing returned. - -## Example Usage - -```typescript -import { DataIntegrityAmounts } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityAmounts = { - currency: "GBP", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `min` | *Decimal* | :heavy_minus_sign: | Lowest value of transaction set. | | -| `max` | *Decimal* | :heavy_minus_sign: | Highest value of transaction set. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | \ No newline at end of file +# DataIntegrityAmounts + +Only returned for transactions. For accounts, there is nothing returned. + +## Example Usage + +```typescript +import { DataIntegrityAmounts } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityAmounts = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min` | *Decimal | number* | :heavy_minus_sign: | Lowest value of transaction set. | +| `max` | *Decimal | number* | :heavy_minus_sign: | Highest value of transaction set. | +| `currency` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritybyamount.md b/lending/docs/sdk/models/shared/dataintegritybyamount.md index 81786bc89..98360866a 100644 --- a/lending/docs/sdk/models/shared/dataintegritybyamount.md +++ b/lending/docs/sdk/models/shared/dataintegritybyamount.md @@ -1,21 +1,21 @@ -# DataIntegrityByAmount - -## Example Usage - -```typescript -import { DataIntegrityByAmount } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityByAmount = { - currency: "GBP", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `matchPercentage` | *Decimal* | :heavy_minus_sign: | The percentage of the absolute value of transactions of the type specified in the route which have a match. | | -| `unmatched` | *Decimal* | :heavy_minus_sign: | The sum of the absolute value of transactions of the type specified in the route which don't have a match. | | -| `matched` | *Decimal* | :heavy_minus_sign: | The sum of the absolute value of transactions of the type specified in the route which have a match. | | -| `total` | *Decimal* | :heavy_minus_sign: | The total of unmatched and matched. | | +# DataIntegrityByAmount + +## Example Usage + +```typescript +import { DataIntegrityByAmount } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityByAmount = { + currency: "GBP", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `matchPercentage` | *Decimal | number* | :heavy_minus_sign: | The percentage of the absolute value of transactions of the type specified in the route which have a match. | | +| `unmatched` | *Decimal | number* | :heavy_minus_sign: | The sum of the absolute value of transactions of the type specified in the route which don't have a match. | | +| `matched` | *Decimal | number* | :heavy_minus_sign: | The sum of the absolute value of transactions of the type specified in the route which have a match. | | +| `total` | *Decimal | number* | :heavy_minus_sign: | The total of unmatched and matched. | | | `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritybycount.md b/lending/docs/sdk/models/shared/dataintegritybycount.md index 8ce8e58fc..37c7a40f3 100644 --- a/lending/docs/sdk/models/shared/dataintegritybycount.md +++ b/lending/docs/sdk/models/shared/dataintegritybycount.md @@ -1,18 +1,18 @@ -# DataIntegrityByCount - -## Example Usage - -```typescript -import { DataIntegrityByCount } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityByCount = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `matchPercentage` | *Decimal* | :heavy_minus_sign: | The percentage of records of the type specified in the route which have a match. | -| `unmatched` | *Decimal* | :heavy_minus_sign: | The number of records of the type specified in the route which don't have a match. | -| `matched` | *Decimal* | :heavy_minus_sign: | The number of records of the type specified in the route which do have a match. | -| `total` | *Decimal* | :heavy_minus_sign: | The total of unmatched and matched. | \ No newline at end of file +# DataIntegrityByCount + +## Example Usage + +```typescript +import { DataIntegrityByCount } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityByCount = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `matchPercentage` | *Decimal | number* | :heavy_minus_sign: | The percentage of records of the type specified in the route which have a match. | +| `unmatched` | *Decimal | number* | :heavy_minus_sign: | The number of records of the type specified in the route which don't have a match. | +| `matched` | *Decimal | number* | :heavy_minus_sign: | The number of records of the type specified in the route which do have a match. | +| `total` | *Decimal | number* | :heavy_minus_sign: | The total of unmatched and matched. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegrityconnectionid.md b/lending/docs/sdk/models/shared/dataintegrityconnectionid.md index d7007bee8..174528f0b 100644 --- a/lending/docs/sdk/models/shared/dataintegrityconnectionid.md +++ b/lending/docs/sdk/models/shared/dataintegrityconnectionid.md @@ -1,16 +1,16 @@ -# DataIntegrityConnectionId - -## Example Usage - -```typescript -import { DataIntegrityConnectionId } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityConnectionId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `source` | *string*[] | :heavy_minus_sign: | An array of strings. The connection IDs for the type specified in the url. | +# DataIntegrityConnectionId + +## Example Usage + +```typescript +import { DataIntegrityConnectionId } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityConnectionId = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `source` | *string*[] | :heavy_minus_sign: | An array of strings. The connection IDs for the type specified in the url. | | `target` | *string*[] | :heavy_minus_sign: | An array of strings. The connection IDs for the type being matched to. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritydatatype.md b/lending/docs/sdk/models/shared/dataintegritydatatype.md index 0baabb3bb..697d176d2 100644 --- a/lending/docs/sdk/models/shared/dataintegritydatatype.md +++ b/lending/docs/sdk/models/shared/dataintegritydatatype.md @@ -1,15 +1,15 @@ -# DataIntegrityDataType - -## Example Usage - -```typescript -import { DataIntegrityDataType } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityDataType = "banking-accounts"; -``` - -## Values - -```typescript -"banking-accounts" | "banking-transactions" | "bankAccounts" | "accountTransactions" +# DataIntegrityDataType + +## Example Usage + +```typescript +import { DataIntegrityDataType } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritydates.md b/lending/docs/sdk/models/shared/dataintegritydates.md index ac88ae6b3..45820a36b 100644 --- a/lending/docs/sdk/models/shared/dataintegritydates.md +++ b/lending/docs/sdk/models/shared/dataintegritydates.md @@ -1,25 +1,20 @@ -# DataIntegrityDates - -Only returned for transactions. For accounts, there is nothing returned. - -## Example Usage - -```typescript -import { DataIntegrityDates } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityDates = { - minDate: "2022-10-23T00:00:00Z", - maxDate: "2022-10-23T00:00:00Z", - minOverlappingDate: "2022-10-23T00:00:00Z", - maxOverlappingDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `minDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `maxDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `minOverlappingDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `maxOverlappingDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# DataIntegrityDates + +Only returned for transactions. For accounts, there is nothing returned. + +## Example Usage + +```typescript +import { DataIntegrityDates } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityDates = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `minDate` | *string* | :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. | +| `maxDate` | *string* | :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. | +| `minOverlappingDate` | *string* | :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. | +| `maxOverlappingDate` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritydetail.md b/lending/docs/sdk/models/shared/dataintegritydetail.md index 214ac023f..b8028d4e5 100644 --- a/lending/docs/sdk/models/shared/dataintegritydetail.md +++ b/lending/docs/sdk/models/shared/dataintegritydetail.md @@ -1,30 +1,24 @@ -# DataIntegrityDetail - -## Example Usage - -```typescript -import { DataIntegrityDetail } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityDetail = { - date: "2022-10-23T00:00:00Z", - currency: "GBP", - matches: [ - { - currency: "GBP", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | ID GUID of the transaction. | | -| `type` | *string* | :heavy_minus_sign: | The data type of the record. | | -| `connectionId` | *string* | :heavy_minus_sign: | ID GUID representing the connection of the accounting or banking platform. | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `description` | *string* | :heavy_minus_sign: | The transaction description. | | -| `amount` | *Decimal* | :heavy_minus_sign: | The transaction value. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +# DataIntegrityDetail + +## Example Usage + +```typescript +import { DataIntegrityDetail } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityDetail = { + date: "2022-10-23T00:00:00Z", + currency: "GBP", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | ID GUID of the transaction. | | +| `type` | *string* | :heavy_minus_sign: | The data type of the record. | | +| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `description` | *string* | :heavy_minus_sign: | The transaction description. | | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The transaction value. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `matches` | [shared.DataIntegrityMatch](../../../sdk/models/shared/dataintegritymatch.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritydetails.md b/lending/docs/sdk/models/shared/dataintegritydetails.md index e23970a63..d43a10d12 100644 --- a/lending/docs/sdk/models/shared/dataintegritydetails.md +++ b/lending/docs/sdk/models/shared/dataintegritydetails.md @@ -1,31 +1,23 @@ -# DataIntegrityDetails - -## Example Usage - -```typescript -import { DataIntegrityDetails } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityDetails = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.DataIntegrityDetail](../../../sdk/models/shared/dataintegritydetail.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# DataIntegrityDetails + +## Example Usage + +```typescript +import { DataIntegrityDetails } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityDetails = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.DataIntegrityDetail](../../../sdk/models/shared/dataintegritydetail.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritymatch.md b/lending/docs/sdk/models/shared/dataintegritymatch.md index e9ef227d7..8b3beca94 100644 --- a/lending/docs/sdk/models/shared/dataintegritymatch.md +++ b/lending/docs/sdk/models/shared/dataintegritymatch.md @@ -1,23 +1,21 @@ -# DataIntegrityMatch - -## Example Usage - -```typescript -import { DataIntegrityMatch } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityMatch = { - currency: "GBP", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | ID GUID of the transaction. | | -| `type` | *string* | :heavy_minus_sign: | The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. | | -| `connectionId` | *string* | :heavy_minus_sign: | ID GUID representing the connection of the accounting or banking platform. | | -| `date` | *string* | :heavy_minus_sign: | The date of the transaction. | | -| `description` | *string* | :heavy_minus_sign: | The transaction description. | | -| `amount` | *string* | :heavy_minus_sign: | The transaction value. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | \ No newline at end of file +# DataIntegrityMatch + +## Example Usage + +```typescript +import { DataIntegrityMatch } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityMatch = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | ID GUID of the transaction. | +| `type` | *string* | :heavy_minus_sign: | The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. | +| `connectionId` | *string* | :heavy_minus_sign: | ID GUID representing the connection of the accounting or banking platform. | +| `date` | *string* | :heavy_minus_sign: | The date of the transaction. | +| `description` | *string* | :heavy_minus_sign: | The transaction description. | +| `amount` | *string* | :heavy_minus_sign: | The transaction value. | +| `currency` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritystatus.md b/lending/docs/sdk/models/shared/dataintegritystatus.md index 66651ac33..dad76c0c5 100644 --- a/lending/docs/sdk/models/shared/dataintegritystatus.md +++ b/lending/docs/sdk/models/shared/dataintegritystatus.md @@ -1,48 +1,47 @@ -# DataIntegrityStatus - -## Example Usage - -```typescript -import { DataIntegrityStatus } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: DataIntegrityStatus = { - type: "string", - statusInfo: { - lastMatched: "2021-10-24T14:15:22Z", - currentStatus: "Unknown", - statusMessage: "string", - }, - connectionIds: { - source: [ - "d5a8d1b2-b38a-4e44-8641-548ad43be6bb", - "da8c9f39-8af9-4a98-964b-f1e207942837", - ], - target: [ - "3d7ce25a-c107-44bc-8e0c-36c10bdd14e0", - "a5300eac-01fa-4a77-b5b0-ea0b86a3be69", - ], - }, - amounts: { - min: new Decimal("130"), - max: new Decimal("2450"), - currency: "GBP", - }, - dates: { - minDate: "2021-09-17T12:09:33.441Z", - maxDate: "2021-12-16T12:12:53.441Z", - minOverlappingDate: "2021-09-30T12:09:13.441Z", - maxOverlappingDate: "2021-11-27T12:19:33.441Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_minus_sign: | The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. | -| `statusInfo` | [shared.DataIntegrityStatusInfo](../../../sdk/models/shared/dataintegritystatusinfo.md) | :heavy_minus_sign: | N/A | -| `connectionIds` | [shared.DataIntegrityConnectionId](../../../sdk/models/shared/dataintegrityconnectionid.md) | :heavy_minus_sign: | N/A | -| `amounts` | [shared.DataIntegrityAmounts](../../../sdk/models/shared/dataintegrityamounts.md) | :heavy_minus_sign: | Only returned for transactions. For accounts, there is nothing returned. | +# DataIntegrityStatus + +## Example Usage + +```typescript +import { DataIntegrityStatus } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityStatus = { + type: "string", + statusInfo: { + lastMatched: "2021-10-24T14:15:22Z", + currentStatus: "Unknown", + statusMessage: "string", + }, + connectionIds: { + source: [ + "d5a8d1b2-b38a-4e44-8641-548ad43be6bb", + "da8c9f39-8af9-4a98-964b-f1e207942837", + ], + target: [ + "3d7ce25a-c107-44bc-8e0c-36c10bdd14e0", + "a5300eac-01fa-4a77-b5b0-ea0b86a3be69", + ], + }, + amounts: { + min: 130, + max: 2450, + currency: "GBP", + }, + dates: { + minDate: "2021-09-17T12:09:33.441Z", + maxDate: "2021-12-16T12:12:53.441Z", + minOverlappingDate: "2021-09-30T12:09:13.441Z", + maxOverlappingDate: "2021-11-27T12:19:33.441Z", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_minus_sign: | The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. | +| `statusInfo` | [shared.DataIntegrityStatusInfo](../../../sdk/models/shared/dataintegritystatusinfo.md) | :heavy_minus_sign: | N/A | +| `connectionIds` | [shared.DataIntegrityConnectionId](../../../sdk/models/shared/dataintegrityconnectionid.md) | :heavy_minus_sign: | N/A | +| `amounts` | [shared.DataIntegrityAmounts](../../../sdk/models/shared/dataintegrityamounts.md) | :heavy_minus_sign: | Only returned for transactions. For accounts, there is nothing returned. | | `dates` | [shared.DataIntegrityDates](../../../sdk/models/shared/dataintegritydates.md) | :heavy_minus_sign: | Only returned for transactions. For accounts, there is nothing returned. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritystatuses.md b/lending/docs/sdk/models/shared/dataintegritystatuses.md index b13e7573a..78bf2f0a3 100644 --- a/lending/docs/sdk/models/shared/dataintegritystatuses.md +++ b/lending/docs/sdk/models/shared/dataintegritystatuses.md @@ -1,48 +1,15 @@ -# DataIntegrityStatuses - -## Example Usage - -```typescript -import { DataIntegrityStatuses } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: DataIntegrityStatuses = { - metadata: [ - { - type: "string", - statusInfo: { - lastMatched: "2021-10-24T14:15:22Z", - currentStatus: "Unknown", - statusMessage: "string", - }, - connectionIds: { - source: [ - "d5a8d1b2-b38a-4e44-8641-548ad43be6bb", - "da8c9f39-8af9-4a98-964b-f1e207942837", - ], - target: [ - "3d7ce25a-c107-44bc-8e0c-36c10bdd14e0", - "a5300eac-01fa-4a77-b5b0-ea0b86a3be69", - ], - }, - amounts: { - min: new Decimal("130"), - max: new Decimal("2450"), - currency: "GBP", - }, - dates: { - minDate: "2021-09-17T12:09:33.441Z", - maxDate: "2021-12-16T12:12:53.441Z", - minOverlappingDate: "2021-09-30T12:09:13.441Z", - maxOverlappingDate: "2021-11-27T12:19:33.441Z", - }, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +# DataIntegrityStatuses + +## Example Usage + +```typescript +import { DataIntegrityStatuses } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityStatuses = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `metadata` | [shared.DataIntegrityStatus](../../../sdk/models/shared/dataintegritystatus.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritystatusinfo.md b/lending/docs/sdk/models/shared/dataintegritystatusinfo.md index af4d91c71..35c9f76e1 100644 --- a/lending/docs/sdk/models/shared/dataintegritystatusinfo.md +++ b/lending/docs/sdk/models/shared/dataintegritystatusinfo.md @@ -1,19 +1,17 @@ -# DataIntegrityStatusInfo - -## Example Usage - -```typescript -import { DataIntegrityStatusInfo } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegrityStatusInfo = { - lastMatched: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `lastMatched` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currentStatus` | [shared.IntegrityStatus](../../../sdk/models/shared/integritystatus.md) | :heavy_minus_sign: | The current status of the most recently run matching algorithm. | | -| `statusMessage` | *string* | :heavy_minus_sign: | Detailed explanation supporting the status value. | | \ No newline at end of file +# DataIntegrityStatusInfo + +## Example Usage + +```typescript +import { DataIntegrityStatusInfo } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegrityStatusInfo = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `lastMatched` | *string* | :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. | +| `currentStatus` | [shared.IntegrityStatus](../../../sdk/models/shared/integritystatus.md) | :heavy_minus_sign: | N/A | +| `statusMessage` | *string* | :heavy_minus_sign: | Detailed explanation supporting the status value. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritysummaries.md b/lending/docs/sdk/models/shared/dataintegritysummaries.md index fe47022e3..abe166de3 100644 --- a/lending/docs/sdk/models/shared/dataintegritysummaries.md +++ b/lending/docs/sdk/models/shared/dataintegritysummaries.md @@ -1,23 +1,15 @@ -# DataIntegritySummaries - -## Example Usage - -```typescript -import { DataIntegritySummaries } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegritySummaries = { - summaries: [ - { - byAmount: { - currency: "GBP", - }, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +# DataIntegritySummaries + +## Example Usage + +```typescript +import { DataIntegritySummaries } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegritySummaries = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | `summaries` | [shared.DataIntegritySummary](../../../sdk/models/shared/dataintegritysummary.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/dataintegritysummary.md b/lending/docs/sdk/models/shared/dataintegritysummary.md index 1f0d17edd..252a5ae2e 100644 --- a/lending/docs/sdk/models/shared/dataintegritysummary.md +++ b/lending/docs/sdk/models/shared/dataintegritysummary.md @@ -1,21 +1,17 @@ -# DataIntegritySummary - -## Example Usage - -```typescript -import { DataIntegritySummary } from "@codat/lending/sdk/models/shared"; - -let value: DataIntegritySummary = { - byAmount: { - currency: "GBP", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_minus_sign: | The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. | -| `byAmount` | [shared.DataIntegrityByAmount](../../../sdk/models/shared/dataintegritybyamount.md) | :heavy_minus_sign: | N/A | +# DataIntegritySummary + +## Example Usage + +```typescript +import { DataIntegritySummary } from "@codat/lending/sdk/models/shared"; + +let value: DataIntegritySummary = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_minus_sign: | The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. | +| `byAmount` | [shared.DataIntegrityByAmount](../../../sdk/models/shared/dataintegritybyamount.md) | :heavy_minus_sign: | N/A | | `byCount` | [shared.DataIntegrityByCount](../../../sdk/models/shared/dataintegritybycount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/datasetstatus.md b/lending/docs/sdk/models/shared/datasetstatus.md index 74a540f7d..31c909f43 100644 --- a/lending/docs/sdk/models/shared/datasetstatus.md +++ b/lending/docs/sdk/models/shared/datasetstatus.md @@ -1,17 +1,17 @@ -# DatasetStatus - -The current status of the dataset. - -## Example Usage - -```typescript -import { DatasetStatus } from "@codat/lending/sdk/models/shared"; - -let value: DatasetStatus = "RateLimitError"; -``` - -## Values - -```typescript -"Initial" | "Queued" | "Fetching" | "MapQueued" | "Mapping" | "Complete" | "FetchError" | "MapError" | "InternalError" | "ProcessingQueued" | "Processing" | "ProcessingError" | "ValidationQueued" | "Validating" | "ValidationError" | "AuthError" | "Cancelled" | "NotSupported" | "RateLimitError" | "PermissionsError" | "PrerequisiteNotMet" +# DatasetStatus + +The current status of the dataset. + +## Example Usage + +```typescript +import { DatasetStatus } from "@codat/lending/sdk/models/shared"; + +let value: DatasetStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/datasource.md b/lending/docs/sdk/models/shared/datasource.md index 6d9a151b8..0c9a34b7c 100644 --- a/lending/docs/sdk/models/shared/datasource.md +++ b/lending/docs/sdk/models/shared/datasource.md @@ -1,22 +1,15 @@ -# DataSource - -## Example Usage - -```typescript -import { DataSource } from "@codat/lending/sdk/models/shared"; - -let value: DataSource = { - accounts: [ - { - sourceRef: {}, - currency: "GBP", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +# DataSource + +## Example Usage + +```typescript +import { DataSource } from "@codat/lending/sdk/models/shared"; + +let value: DataSource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `accounts` | [shared.Accounts](../../../sdk/models/shared/accounts.md)[] | :heavy_minus_sign: | An array containing bank account data for each connected banking data source that have the following data types enabled: `banking-accounts`, `banking-transactions`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/datastatus.md b/lending/docs/sdk/models/shared/datastatus.md index 17799437e..52e6cc848 100644 --- a/lending/docs/sdk/models/shared/datastatus.md +++ b/lending/docs/sdk/models/shared/datastatus.md @@ -1,27 +1,27 @@ -# DataStatus - -Describes the state of data in the Codat cache for a company and data type - -## Example Usage - -```typescript -import { DataStatus } from "@codat/lending/sdk/models/shared"; - -let value: DataStatus = { - dataType: "itemReceipts", - lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Processing", - latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", - latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `dataType` | [shared.DataTypes](../../../sdk/models/shared/datatypes.md) | :heavy_check_mark: | Available data types | invoices | -| `lastSuccessfulSync` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currentStatus` | [shared.Status](../../../sdk/models/shared/status.md) | :heavy_check_mark: | The current status of the dataset. | | -| `latestSyncId` | *string* | :heavy_minus_sign: | Unique identifier for most recent sync of data type. | ad474a37-2003-478e-baee-9af9f1ec2fe3 | +# DataStatus + +Describes the state of data in the Codat cache for a company and data type + +## Example Usage + +```typescript +import { DataStatus } from "@codat/lending/sdk/models/shared"; + +let value: DataStatus = { + dataType: "string", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "string", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataType` | [shared.DataTypes](../../../sdk/models/shared/datatypes.md) | :heavy_check_mark: | Available data types | invoices | +| `lastSuccessfulSync` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `currentStatus` | [shared.Status](../../../sdk/models/shared/status.md) | :heavy_check_mark: | The current status of the dataset. | | +| `latestSyncId` | *string* | :heavy_minus_sign: | Unique identifier for most recent sync of data type. | ad474a37-2003-478e-baee-9af9f1ec2fe3 | | `latestSuccessfulSyncId` | *string* | :heavy_minus_sign: | Unique identifier for the most recent successful sync of data type. | 8220fc90-55b6-47bc-9417-48ac6ea93101 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/datatype.md b/lending/docs/sdk/models/shared/datatype.md index 657734b90..aa2cfe4f8 100644 --- a/lending/docs/sdk/models/shared/datatype.md +++ b/lending/docs/sdk/models/shared/datatype.md @@ -1,17 +1,17 @@ -# DataType - -Available data types - -## Example Usage - -```typescript -import { DataType } from "@codat/lending/sdk/models/shared"; - -let value: DataType = "invoices"; -``` - -## Values - -```typescript -"accountTransactions" | "balanceSheet" | "bankAccounts" | "bankTransactions" | "billCreditNotes" | "billPayments" | "bills" | "cashFlowStatement" | "chartOfAccounts" | "company" | "creditNotes" | "customers" | "directCosts" | "directIncomes" | "invoices" | "itemReceipts" | "items" | "journalEntries" | "journals" | "paymentMethods" | "payments" | "profitAndLoss" | "purchaseOrders" | "salesOrders" | "suppliers" | "taxRates" | "trackingCategories" | "transfers" | "banking-accountBalances" | "banking-accounts" | "banking-transactionCategories" | "banking-transactions" | "commerce-companyInfo" | "commerce-customers" | "commerce-disputes" | "commerce-locations" | "commerce-orders" | "commerce-paymentMethods" | "commerce-payments" | "commerce-productCategories" | "commerce-products" | "commerce-taxComponents" | "commerce-transactions" +# DataType + +Available data types + +## Example Usage + +```typescript +import { DataType } from "@codat/lending/sdk/models/shared"; + +let value: DataType = "accountTransactions"; +``` + +## Values + +```typescript +"accountTransactions" | "balanceSheet" | "bankAccounts" | "bankTransactions" | "billCreditNotes" | "billPayments" | "bills" | "cashFlowStatement" | "chartOfAccounts" | "company" | "creditNotes" | "customers" | "directCosts" | "directIncomes" | "invoices" | "itemReceipts" | "items" | "journalEntries" | "journals" | "paymentMethods" | "payments" | "profitAndLoss" | "purchaseOrders" | "salesOrders" | "suppliers" | "taxRates" | "trackingCategories" | "transfers" | "banking-accountBalances" | "banking-accounts" | "banking-transactionCategories" | "banking-transactions" | "commerce-companyInfo" | "commerce-customers" | "commerce-disputes" | "commerce-locations" | "commerce-orders" | "commerce-paymentMethods" | "commerce-payments" | "commerce-productCategories" | "commerce-products" | "commerce-taxComponents" | "commerce-transactions" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/datatypes.md b/lending/docs/sdk/models/shared/datatypes.md index 2e9880028..16deff04c 100644 --- a/lending/docs/sdk/models/shared/datatypes.md +++ b/lending/docs/sdk/models/shared/datatypes.md @@ -1,17 +1,17 @@ -# DataTypes - -Available data types - -## Example Usage - -```typescript -import { DataTypes } from "@codat/lending/sdk/models/shared"; - -let value: DataTypes = "invoices"; -``` - -## Values - -```typescript -"accountTransactions" | "balanceSheet" | "bankAccounts" | "bankTransactions" | "billCreditNotes" | "billPayments" | "bills" | "cashFlowStatement" | "chartOfAccounts" | "company" | "creditNotes" | "customers" | "directCosts" | "directIncomes" | "invoices" | "itemReceipts" | "items" | "journalEntries" | "journals" | "paymentMethods" | "payments" | "profitAndLoss" | "purchaseOrders" | "salesOrders" | "suppliers" | "taxRates" | "trackingCategories" | "transfers" | "banking-accountBalances" | "banking-accounts" | "banking-transactionCategories" | "banking-transactions" | "commerce-companyInfo" | "commerce-customers" | "commerce-disputes" | "commerce-locations" | "commerce-orders" | "commerce-paymentMethods" | "commerce-payments" | "commerce-productCategories" | "commerce-products" | "commerce-taxComponents" | "commerce-transactions" +# DataTypes + +Available data types + +## Example Usage + +```typescript +import { DataTypes } from "@codat/lending/sdk/models/shared"; + +let value: DataTypes = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/directcostlineitem.md b/lending/docs/sdk/models/shared/directcostlineitem.md index 555bf63d8..e7225579b 100644 --- a/lending/docs/sdk/models/shared/directcostlineitem.md +++ b/lending/docs/sdk/models/shared/directcostlineitem.md @@ -1,42 +1,27 @@ -# DirectCostLineItem - -## Example Usage - -```typescript -import { DirectCostLineItem } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: DirectCostLineItem = { - unitAmount: new Decimal("2352.33"), - quantity: new Decimal("5634.1"), - accountRef: {}, - tracking: { - recordRefs: [ - { - dataType: "trackingCategories", - }, - ], - invoiceTo: { - dataType: "journalEntry", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Friendly name of the goods or services. | | -| `unitAmount` | *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. | | -| `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. | | -| `discountAmount` | *Decimal* | :heavy_minus_sign: | Discount amount for the line before tax. | | -| `discountPercentage` | *Decimal* | :heavy_minus_sign: | Discount percentage for the line before tax. | | -| `subTotal` | *Decimal* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | | -| `taxAmount` | *Decimal* | :heavy_minus_sign: | Amount of tax for the line. | | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the line, including tax. | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `taxRateRef` | [shared.TaxRateRef](../../../sdk/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 | | -| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | | -| ~~`trackingCategoryRefs`~~ | [shared.TrackingCategoryRef](../../../sdk/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. | | -| `tracking` | [shared.Tracking](../../../sdk/models/shared/tracking.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# DirectCostLineItem + +## Example Usage + +```typescript +import { DirectCostLineItem } from "@codat/lending/sdk/models/shared"; + +let value: DirectCostLineItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Friendly name of the goods or services. | +| `unitAmount` | *Decimal | number* | :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. | +| `quantity` | *Decimal | number* | :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. | +| `discountAmount` | *Decimal | number* | :heavy_minus_sign: | Discount amount for the line before tax. | +| `discountPercentage` | *Decimal | number* | :heavy_minus_sign: | Discount percentage for the line before tax. | +| `subTotal` | *Decimal | number* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `taxAmount` | *Decimal | number* | :heavy_minus_sign: | Amount of tax for the line. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of the line, including tax. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | Reference to the account to which the line item is linked. | +| `taxRateRef` | [shared.TaxRateRef](../../../sdk/models/shared/taxrateref.md) | :heavy_minus_sign: | Reference to the tax rate to which the the line item is linked. | +| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the product, service type, or inventory item to which the direct cost is linked. | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Collection of categories against which this direct cost is tracked. | +| `tracking` | [shared.Tracking](../../../sdk/models/shared/tracking.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/directcostprototype.md b/lending/docs/sdk/models/shared/directcostprototype.md index 2193a3acb..ac5fb0bfd 100644 --- a/lending/docs/sdk/models/shared/directcostprototype.md +++ b/lending/docs/sdk/models/shared/directcostprototype.md @@ -1,51 +1,26 @@ -# DirectCostPrototype - -## Example Usage - -```typescript -import { DirectCostPrototype } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: DirectCostPrototype = { - issueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [ - { - unitAmount: new Decimal("8829.23"), - quantity: new Decimal("6266.51"), - accountRef: {}, - tracking: { - recordRefs: [ - { - dataType: "trackingCategories", - }, - ], - invoiceTo: { - dataType: "journalEntry", - }, - }, - }, - ], - paymentAllocations: [], - subTotal: new Decimal("2394.27"), - taxAmount: new Decimal("7916.26"), - totalAmount: new Decimal("2215.31"), -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the direct cost. | | -| `note` | *string* | :heavy_minus_sign: | A note attached to the direct cost. | | -| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | N/A | | -| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `lineItems` | [shared.DirectCostLineItem](../../../sdk/models/shared/directcostlineitem.md)[] | :heavy_check_mark: | An array of line items. | | -| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_check_mark: | An array of payment allocations. | | -| `subTotal` | *Decimal* | :heavy_check_mark: | The total amount of the direct costs, excluding any taxes. | | -| `taxAmount` | *Decimal* | :heavy_check_mark: | The total amount of tax on the direct costs. | | -| `totalAmount` | *Decimal* | :heavy_check_mark: | The amount of the direct costs, inclusive of tax. | | -| `supplementalData` | [shared.SupplementalData](../../../sdk/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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file +# DirectCostPrototype + +## Example Usage + +```typescript +import { DirectCostPrototype } from "@codat/lending/sdk/models/shared"; + +let value: DirectCostPrototype = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the direct cost. | +| `note` | *string* | :heavy_minus_sign: | A note attached to the direct cost. | +| `contactRef` | [shared.ContactRef](../../../sdk/models/shared/contactref.md) | :heavy_minus_sign: | A customer or supplier associated with the direct cost. | +| `issueDate` | *string* | :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. | +| `currency` | *string* | :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. | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | +| `lineItems` | [shared.DirectCostLineItem](../../../sdk/models/shared/directcostlineitem.md)[] | :heavy_check_mark: | An array of line items. | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_check_mark: | An array of payment allocations. | +| `subTotal` | *Decimal | number* | :heavy_check_mark: | The total amount of the direct costs, excluding any taxes. | +| `taxAmount` | *Decimal | number* | :heavy_check_mark: | The total amount of tax on the direct costs. | +| `totalAmount` | *Decimal | number* | :heavy_check_mark: | The amount of the direct costs, inclusive of tax. | +| `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/directincomelineitem.md b/lending/docs/sdk/models/shared/directincomelineitem.md index 1ac70e37b..7ebbcc7ea 100644 --- a/lending/docs/sdk/models/shared/directincomelineitem.md +++ b/lending/docs/sdk/models/shared/directincomelineitem.md @@ -1,31 +1,26 @@ -# DirectIncomeLineItem - -## Example Usage - -```typescript -import { DirectIncomeLineItem } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: DirectIncomeLineItem = { - unitAmount: new Decimal("9753.42"), - quantity: new Decimal("1311.96"), - accountRef: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | A user-friendly name of the goods or services. | | -| `unitAmount` | *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. | | -| `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. | | -| `discountAmount` | *Decimal* | :heavy_minus_sign: | Discount amount for the line before tax. | | -| `discountPercentage` | *Decimal* | :heavy_minus_sign: | Discount percentage for the line before tax. | | -| `subTotal` | *Decimal* | :heavy_minus_sign: | The amount of the line, inclusive of discounts, but exclusive of tax. | | -| `taxAmount` | *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. | | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | The total amount of the line, including tax. | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `taxRateRef` | [shared.TaxRateRef](../../../sdk/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 | | -| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | | -| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | An array of categories against which this direct cost is tracked. | | \ No newline at end of file +# DirectIncomeLineItem + +## Example Usage + +```typescript +import { DirectIncomeLineItem } from "@codat/lending/sdk/models/shared"; + +let value: DirectIncomeLineItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | A user-friendly name of the goods or services. | +| `unitAmount` | *Decimal | number* | :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. | +| `quantity` | *Decimal | number* | :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. | +| `discountAmount` | *Decimal | number* | :heavy_minus_sign: | Discount amount for the line before tax. | +| `discountPercentage` | *Decimal | number* | :heavy_minus_sign: | Discount percentage for the line before tax. | +| `subTotal` | *Decimal | number* | :heavy_minus_sign: | The amount of the line, inclusive of discounts, but exclusive of tax. | +| `taxAmount` | *Decimal | number* | :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. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | The total amount of the line, including tax. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | Reference to the account to which the line item is linked. | +| `taxRateRef` | [shared.TaxRateRef](../../../sdk/models/shared/taxrateref.md) | :heavy_minus_sign: | Reference to the tax rate to which the line item is linked. | +| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the product, service type, or inventory item to which the direct cost is linked. | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | An array of categories against which this direct cost is tracked. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/disputestatus.md b/lending/docs/sdk/models/shared/disputestatus.md index 11f271c89..58eae0500 100644 --- a/lending/docs/sdk/models/shared/disputestatus.md +++ b/lending/docs/sdk/models/shared/disputestatus.md @@ -1,17 +1,17 @@ -# DisputeStatus - -Current status of the dispute - -## Example Usage - -```typescript -import { DisputeStatus } from "@codat/lending/sdk/models/shared"; - -let value: DisputeStatus = "EvidenceRequired"; -``` - -## Values - -```typescript -"Won" | "Lost" | "Accepted" | "Processing" | "ChargeRefunded" | "EvidenceRequired" | "InquiryEvidenceRequired" | "InquiryProcessing" | "InquiryClosed" | "WaitingThirdParty" | "Unknown" +# DisputeStatus + +Current status of the dispute + +## Example Usage + +```typescript +import { DisputeStatus } from "@codat/lending/sdk/models/shared"; + +let value: DisputeStatus = "Won"; +``` + +## Values + +```typescript +"Won" | "Lost" | "Accepted" | "Processing" | "ChargeRefunded" | "EvidenceRequired" | "InquiryEvidenceRequired" | "InquiryProcessing" | "InquiryClosed" | "WaitingThirdParty" | "Unknown" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enduploadsessionrequest.md b/lending/docs/sdk/models/shared/enduploadsessionrequest.md index 413e65a37..8a4f63e15 100644 --- a/lending/docs/sdk/models/shared/enduploadsessionrequest.md +++ b/lending/docs/sdk/models/shared/enduploadsessionrequest.md @@ -1,15 +1,15 @@ -# EndUploadSessionRequest - -## Example Usage - -```typescript -import { EndUploadSessionRequest } from "@codat/lending/sdk/models/shared"; - -let value: EndUploadSessionRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +# EndUploadSessionRequest + +## Example Usage + +```typescript +import { EndUploadSessionRequest } from "@codat/lending/sdk/models/shared"; + +let value: EndUploadSessionRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | `status` | [shared.EndUploadSessionRequestStatus](../../../sdk/models/shared/enduploadsessionrequeststatus.md) | :heavy_minus_sign: | An indicator to cancel the dataset processing or trigger ingestion and enrichment of data. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enduploadsessionrequeststatus.md b/lending/docs/sdk/models/shared/enduploadsessionrequeststatus.md index 7d4f730cb..12101320c 100644 --- a/lending/docs/sdk/models/shared/enduploadsessionrequeststatus.md +++ b/lending/docs/sdk/models/shared/enduploadsessionrequeststatus.md @@ -1,17 +1,15 @@ -# EndUploadSessionRequestStatus - -An indicator to cancel the dataset processing or trigger ingestion and enrichment of data. - -## Example Usage - -```typescript -import { EndUploadSessionRequestStatus } from "@codat/lending/sdk/models/shared"; - -let value: EndUploadSessionRequestStatus = "Cancel"; -``` - -## Values - -```typescript -"Cancel" | "Process" +# EndUploadSessionRequestStatus + +## Example Usage + +```typescript +import { EndUploadSessionRequestStatus } from "@codat/lending/sdk/models/shared"; + +let value: EndUploadSessionRequestStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enhancedcashflowitem.md b/lending/docs/sdk/models/shared/enhancedcashflowitem.md index 89ddc7c45..e2af16bd7 100644 --- a/lending/docs/sdk/models/shared/enhancedcashflowitem.md +++ b/lending/docs/sdk/models/shared/enhancedcashflowitem.md @@ -1,26 +1,15 @@ -# EnhancedCashFlowItem - -## Example Usage - -```typescript -import { EnhancedCashFlowItem } from "@codat/lending/sdk/models/shared"; - -let value: EnhancedCashFlowItem = { - transactions: [ - { - date: "2022-10-23T00:00:00Z", - currency: "GBP", - transactionCategory: {}, - sourceRef: {}, - accountRef: {}, - modifiedDate: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +# EnhancedCashFlowItem + +## Example Usage + +```typescript +import { EnhancedCashFlowItem } from "@codat/lending/sdk/models/shared"; + +let value: EnhancedCashFlowItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `transactions` | [shared.CashFlowTransaction](../../../sdk/models/shared/cashflowtransaction.md)[] | :heavy_minus_sign: | An array of transaction data. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enhancedcashflowtransactions.md b/lending/docs/sdk/models/shared/enhancedcashflowtransactions.md index a8eb0abe1..037805155 100644 --- a/lending/docs/sdk/models/shared/enhancedcashflowtransactions.md +++ b/lending/docs/sdk/models/shared/enhancedcashflowtransactions.md @@ -1,121 +1,153 @@ -# EnhancedCashFlowTransactions - -> **Categorization engine** -> -> The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. - -The Enhanced Cash Flow Transactions endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources. - -## Example Usage - -```typescript -import { EnhancedCashFlowTransactions } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: EnhancedCashFlowTransactions = { - reportInfo: { - pageNumber: 1, - pageSize: 100, - totalResults: 2401, - reportName: "Cash Flow transactions report", - companyName: "Example Company", - generatedDate: "2023-01-25T22:36:05.125Z", - }, - dataSources: [ - { - accounts: [ - { - sourceRef: { - sourceType: "Banking", - }, - platformName: "Plaid", - accountProvider: "Bank of Sandbox", - accountName: "Business Current Account", - accountType: "Debit", - currency: "USD", - currentBalance: new Decimal("1000"), - }, - { - sourceRef: { - sourceType: "Banking", - }, - platformName: "Plaid", - accountProvider: "Bank of Sandbox", - accountName: "Business Saving Account", - accountType: "Debit", - currency: "USD", - currentBalance: new Decimal("5321"), - }, - ], - }, - ], - reportItems: [ - { - transactions: [ - { - sourceRef: { - sourceType: "Banking", - }, - }, - { - id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", - date: "2023-01-25", - description: "Payment to supplier", - amount: new Decimal("100"), - currency: "USD", - transactionCategory: { - confidence: new Decimal("92.7"), - confidences: [ - new Decimal("92.7"), - new Decimal("95"), - new Decimal("96"), - ], - levels: [ - "Asset", - "Current", - "Bank", - ], - }, - platformName: "Plaid", - counterpartyNames: [ - "Counterparty", - ], - accountRef: { - id: "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", - name: "Business Current Account", - }, - modifiedDate: "2023-01-25T22:36:05.125Z", - }, - { - sourceRef: { - sourceType: "Banking", - }, - }, - { - id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", - date: "2023-01-25", - description: "Payment to supplier", - amount: new Decimal("100"), - currency: "USD", - transactionCategory: {}, - platformName: "Plaid", - counterpartyNames: [], - accountRef: { - id: "12345678-1234-1234-1234-123456789012", - name: "Business Saving Account", - }, - modifiedDate: "2023-01-25T22:36:05.125Z", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `reportInfo` | [shared.ReportInfo](../../../sdk/models/shared/reportinfo.md) | :heavy_minus_sign: | Report additional information, which is specific to Lending reports. | {
"Example 1": {
"value": {
"pageNumber": 0,
"pageSize": 0,
"totalResults": 0,
"reportName": "string",
"companyName": "string",
"generatedDate": "2023-01-26T07:36:40.487Z"
}
}
} | -| `dataSources` | [shared.DataSource](../../../sdk/models/shared/datasource.md)[] | :heavy_minus_sign: | N/A | | +# EnhancedCashFlowTransactions + +> **Categorization engine** +> +> The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. + +The Enhanced Cash Flow Transactions endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources. + +## Example Usage + +```typescript +import { EnhancedCashFlowTransactions } from "@codat/lending/sdk/models/shared"; + +let value: EnhancedCashFlowTransactions = { + reportInfo: { + pageNumber: 1, + pageSize: 100, + totalResults: 2401, + reportName: "Cash Flow transactions report", + companyName: "Example Company", + generatedDate: "2023-01-25T22:36:05.125Z", + }, + dataSources: [ + { + accounts: [ + { + sourceRef: { + sourceType: "Banking", + }, + platformName: "Plaid", + accountProvider: "Bank of Sandbox", + accountName: "Business Current Account", + accountType: "Debit", + currency: "USD", + currentBalance: 1000, + id: "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", + identifiers: [ + { + type: "Debit", + subType: "Current", + number: 12345678, + bankCode: 123456, + iban: "US123456789", + bic: "US123456789", + maskedAccountNumber: 1234, + }, + ], + }, + { + sourceRef: { + sourceType: "Banking", + }, + platformName: "Plaid", + accountProvider: "Bank of Sandbox", + accountName: "Business Saving Account", + accountType: "Debit", + currency: "USD", + currentBalance: 5321, + id: "12345678-1234-1234-1234-123456789012", + identifiers: [ + { + type: "Debit", + subType: "Saving", + number: 87654321, + bankCode: 654321, + iban: "US987654321", + bic: "US987654321", + maskedAccountNumber: 4321, + }, + ], + }, + ], + }, + ], + reportItems: [ + { + transactions: [ + { + sourceRef: { + sourceType: "Banking", + }, + }, + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + date: "2023-01-25", + description: "Payment to supplier", + amount: 100, + currency: "USD", + transactionCategory: { + confidence: 92.7, + confidences: [ + 92.7, + 95, + 96, + ], + levels: [ + "Asset", + "Current", + "Bank", + ], + }, + platformName: "Plaid", + counterpartyNames: [ + "Counterparty", + ], + accountRef: { + id: "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a", + name: "Business Current Account", + }, + modifiedDate: "2023-01-25T22:36:05.125Z", + }, + { + sourceRef: { + sourceType: "Banking", + }, + }, + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + date: "2023-01-25", + description: "Payment to supplier", + amount: 100, + currency: "USD", + transactionCategory: "None", + platformName: "Plaid", + counterpartyNames: [], + accountRef: { + id: "12345678-1234-1234-1234-123456789012", + name: "Business Saving Account", + }, + modifiedDate: "2023-01-25T22:36:05.125Z", + confidence: 92.7, + levels: [ + "Expense", + "Operating", + ], + confidences: [ + 92.7, + 95, + ], + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `reportInfo` | [shared.ReportInfo](../../../sdk/models/shared/reportinfo.md) | :heavy_minus_sign: | Report additional information, which is specific to Lending reports. | {
"Example 1": {
"value": {
"pageNumber": 0,
"pageSize": 0,
"totalResults": 0,
"reportName": "string",
"companyName": "string",
"generatedDate": "2023-01-26T07:36:40.487Z"
}
}
} | +| `dataSources` | [shared.DataSource](../../../sdk/models/shared/datasource.md)[] | :heavy_minus_sign: | N/A | | | `reportItems` | [shared.EnhancedCashFlowItem](../../../sdk/models/shared/enhancedcashflowitem.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enhancedfinancialreport.md b/lending/docs/sdk/models/shared/enhancedfinancialreport.md index 2cbbe77e6..f10131937 100644 --- a/lending/docs/sdk/models/shared/enhancedfinancialreport.md +++ b/lending/docs/sdk/models/shared/enhancedfinancialreport.md @@ -1,86 +1,87 @@ -# EnhancedFinancialReport - -## Example Usage - -```typescript -import { EnhancedFinancialReport } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: EnhancedFinancialReport = { - reportInfo: { - reportName: "EnhancedProfitAndLossAccounts", - companyName: "ABC LTD", - generatedDate: "2022-01-01", - }, - reportItems: [ - { - date: "2022-01-01", - balance: new Decimal("70"), - accountName: "Sales UK", - accountId: "13931cbf-ea06-4d6e-9538-a8457fa66011", - accountCategory: { - status: "Suggested", - levels: [ - { - levelName: "Income", - confidence: new Decimal("0.95"), - }, - { - levelName: "Revenue", - confidence: new Decimal("0.9"), - }, - ], - }, - }, - { - date: "2022-01-01", - balance: new Decimal("30"), - accountName: "Sales US", - accountId: "13931cbf-ea06-4d6e-9538-a8457fa66011", - accountCategory: { - status: "Suggested", - levels: [ - { - levelName: "Income", - confidence: new Decimal("0.95"), - }, - { - levelName: "Revenue", - confidence: new Decimal("0.9"), - }, - ], - }, - }, - { - date: "2022-01-01", - balance: new Decimal("70"), - accountName: "Amazon", - accountId: "13931cbf-ea06-4d6e-9538-a8457fa66011", - accountCategory: { - status: "Suggested", - levels: [ - { - levelName: "Income", - confidence: new Decimal("0.95"), - }, - { - levelName: "Revenue", - confidence: new Decimal("0.95"), - }, - { - levelName: "Online", - confidence: new Decimal("0.8"), - }, - ], - }, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `reportInfo` | [shared.EnhancedReportInfo](../../../sdk/models/shared/enhancedreportinfo.md) | :heavy_minus_sign: | N/A | +# EnhancedFinancialReport + +## Example Usage + +```typescript +import { EnhancedFinancialReport } from "@codat/lending/sdk/models/shared"; + +let value: EnhancedFinancialReport = { + reportInfo: { + reportName: "EnhancedProfitAndLossAccounts", + companyName: "ABC LTD", + generatedDate: "2022-01-01", + }, + reportItems: [ + { + date: "2022-01-01", + balance: 70, + accountName: "Sales UK", + accountId: "13931cbf-ea06-4d6e-9538-a8457fa66011", + accountCategory: { + status: "Suggested", + levels: [ + { + levelName: "Income", + confidence: 0.95, + }, + { + levelName: "Revenue", + confidence: 0.9, + }, + ], + }, + }, + { + date: "2022-01-01", + balance: 30, + accountName: "Sales US", + accountId: "13931cbf-ea06-4d6e-9538-a8457fa66011", + accountCategory: { + status: "Suggested", + levels: [ + { + levelName: "Income", + confidence: 0.95, + }, + { + levelName: "Revenue", + confidence: 0.9, + }, + ], + lastUpdated: "2022-01-02", + }, + }, + { + date: "2022-01-01", + balance: 70, + accountName: "Amazon", + accountId: "13931cbf-ea06-4d6e-9538-a8457fa66011", + accountCategory: { + status: "Suggested", + levels: [ + { + levelName: "Income", + confidence: 0.95, + }, + { + levelName: "Revenue", + confidence: 0.95, + }, + { + levelName: "Online", + confidence: 0.8, + }, + ], + lastUpdated: "2022-01-02", + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `reportInfo` | [shared.EnhancedReportInfo](../../../sdk/models/shared/enhancedreportinfo.md) | :heavy_minus_sign: | N/A | | `reportItems` | [shared.ReportItem](../../../sdk/models/shared/reportitem.md)[] | :heavy_minus_sign: | An array of report items. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enhancedinvoicereportitem.md b/lending/docs/sdk/models/shared/enhancedinvoicereportitem.md index 060759bfa..1667c4ec2 100644 --- a/lending/docs/sdk/models/shared/enhancedinvoicereportitem.md +++ b/lending/docs/sdk/models/shared/enhancedinvoicereportitem.md @@ -1,45 +1,27 @@ -# EnhancedInvoiceReportItem - -## Example Usage - -```typescript -import { EnhancedInvoiceReportItem } from "@codat/lending/sdk/models/shared"; - -let value: EnhancedInvoiceReportItem = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - issueDate: "2022-10-23T00:00:00Z", - dueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - payments: [ - { - date: "2022-10-23T00:00:00Z", - currency: "GBP", - bankingTransactionRefs: [ - { - date: "2022-10-23T00:00:00Z", - }, - ], - }, - ], - paidOnDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_minus_sign: | ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. | | -| `invoiceNumber` | *string* | :heavy_minus_sign: | Invoice number. | | -| `customerRef` | [shared.LendingCustomerRef](../../../sdk/models/shared/lendingcustomerref.md) | :heavy_minus_sign: | N/A | | -| `issueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `dueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `status` | [shared.InvoiceStatus](../../../sdk/models/shared/invoicestatus.md) | :heavy_minus_sign: | 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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld).
- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`.
- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Invoice's total amount. | | -| `amountDue` | *Decimal* | :heavy_minus_sign: | Invoice's total amount due. | | -| `payments` | [shared.Payment](../../../sdk/models/shared/payment.md)[] | :heavy_minus_sign: | N/A | | -| `paidOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# EnhancedInvoiceReportItem + +## Example Usage + +```typescript +import { EnhancedInvoiceReportItem } from "@codat/lending/sdk/models/shared"; + +let value: EnhancedInvoiceReportItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `id` | *string* | :heavy_minus_sign: | ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. | +| `invoiceNumber` | *string* | :heavy_minus_sign: | Invoice number. | +| `customerRef` | [shared.LendingCustomerRef](../../../sdk/models/shared/lendingcustomerref.md) | :heavy_minus_sign: | N/A | +| `issueDate` | *string* | :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. | +| `dueDate` | *string* | :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. | +| `status` | [shared.InvoiceStatus](../../../sdk/models/shared/invoicestatus.md) | :heavy_minus_sign: | N/A | +| `currency` | *string* | :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. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Invoice's total amount. | +| `amountDue` | *Decimal | number* | :heavy_minus_sign: | Invoice's total amount due. | +| `payments` | [shared.Payment](../../../sdk/models/shared/payment.md)[] | :heavy_minus_sign: | N/A | +| `paidOnDate` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enhancedinvoicesreport.md b/lending/docs/sdk/models/shared/enhancedinvoicesreport.md index 3b78e6c37..fdf60e2e7 100644 --- a/lending/docs/sdk/models/shared/enhancedinvoicesreport.md +++ b/lending/docs/sdk/models/shared/enhancedinvoicesreport.md @@ -1,41 +1,31 @@ -# EnhancedInvoicesReport - -The enhanced invoices report takes the key elements of the Invoices report verifying those marked as paid in the accounting software have actually been paid by matching with the bank statement. - -## Example Usage - -```typescript -import { EnhancedInvoicesReport } from "@codat/lending/sdk/models/shared"; - -let value: EnhancedInvoicesReport = { - reportInfo: {}, - reportItems: [ - { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - issueDate: "2022-10-23T00:00:00Z", - dueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - payments: [ - { - date: "2022-10-23T00:00:00Z", - currency: "GBP", - bankingTransactionRefs: [ - { - date: "2022-10-23T00:00:00Z", - }, - ], - }, - ], - paidOnDate: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `reportInfo` | [shared.ReportInfo](../../../sdk/models/shared/reportinfo.md) | :heavy_minus_sign: | Report additional information, which is specific to Lending reports. | {
"Example 1": {
"value": {
"pageNumber": 0,
"pageSize": 0,
"totalResults": 0,
"reportName": "string",
"companyName": "string",
"generatedDate": "2023-01-26T07:36:40.487Z"
}
}
} | +# EnhancedInvoicesReport + +The enhanced invoices report takes the key elements of the Invoices report verifying those marked as paid in the accounting software have actually been paid by matching with the bank statement. + +## Example Usage + +```typescript +import { EnhancedInvoicesReport } from "@codat/lending/sdk/models/shared"; + +let value: EnhancedInvoicesReport = { + reportInfo: { + Example 1: { + value: { + pageNumber: 0, + pageSize: 0, + totalResults: 0, + reportName: "string", + companyName: "string", + generatedDate: "2023-01-26T07:36:40.487Z", + }, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `reportInfo` | [shared.ReportInfo](../../../sdk/models/shared/reportinfo.md) | :heavy_minus_sign: | Report additional information, which is specific to Lending reports. | {
"Example 1": {
"value": {
"pageNumber": 0,
"pageSize": 0,
"totalResults": 0,
"reportName": "string",
"companyName": "string",
"generatedDate": "2023-01-26T07:36:40.487Z"
}
}
} | | `reportItems` | [shared.EnhancedInvoiceReportItem](../../../sdk/models/shared/enhancedinvoicereportitem.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enhancedreportaccountcategory.md b/lending/docs/sdk/models/shared/enhancedreportaccountcategory.md index 485291024..6e30e2a14 100644 --- a/lending/docs/sdk/models/shared/enhancedreportaccountcategory.md +++ b/lending/docs/sdk/models/shared/enhancedreportaccountcategory.md @@ -1,16 +1,16 @@ -# EnhancedReportAccountCategory - -## Example Usage - -```typescript -import { EnhancedReportAccountCategory } from "@codat/lending/sdk/models/shared"; - -let value: EnhancedReportAccountCategory = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `status` | *string* | :heavy_minus_sign: | Returns a status of "Suggested" or "Confirmed". If an account has a confirmed category, it will replace any suggested category returned. | +# EnhancedReportAccountCategory + +## Example Usage + +```typescript +import { EnhancedReportAccountCategory } from "@codat/lending/sdk/models/shared"; + +let value: EnhancedReportAccountCategory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `status` | *string* | :heavy_minus_sign: | Returns a status of "Suggested" or "Confirmed". If an account has a confirmed category, it will replace any suggested category returned. | | `levels` | [shared.AccountCategoryLevel](../../../sdk/models/shared/accountcategorylevel.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/enhancedreportinfo.md b/lending/docs/sdk/models/shared/enhancedreportinfo.md index 4d6035f9e..a249568f0 100644 --- a/lending/docs/sdk/models/shared/enhancedreportinfo.md +++ b/lending/docs/sdk/models/shared/enhancedreportinfo.md @@ -1,21 +1,18 @@ -# EnhancedReportInfo - -## Example Usage - -```typescript -import { EnhancedReportInfo } from "@codat/lending/sdk/models/shared"; - -let value: EnhancedReportInfo = { - currency: "GBP", - generatedDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `reportName` | *string* | :heavy_minus_sign: | The name of the report. | | -| `companyName` | *string* | :heavy_minus_sign: | Name of the company queried. | | -| `generatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# EnhancedReportInfo + +## Example Usage + +```typescript +import { EnhancedReportInfo } from "@codat/lending/sdk/models/shared"; + +let value: EnhancedReportInfo = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currency` | *string* | :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. | +| `reportName` | *string* | :heavy_minus_sign: | The name of the report. | +| `companyName` | *string* | :heavy_minus_sign: | Name of the company queried. | +| `generatedDate` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/errorstatus.md b/lending/docs/sdk/models/shared/errorstatus.md index 46e4b0c78..54ca8c5f6 100644 --- a/lending/docs/sdk/models/shared/errorstatus.md +++ b/lending/docs/sdk/models/shared/errorstatus.md @@ -1,17 +1,17 @@ -# ErrorStatus - -The current status of a transient error. Null statuses indicate that the error is not transient. - -## Example Usage - -```typescript -import { ErrorStatus } from "@codat/lending/sdk/models/shared"; - -let value: ErrorStatus = "Resolved"; -``` - -## Values - -```typescript -"Active" | "Resolved" +# ErrorStatus + +The current status of a transient error. Null statuses indicate that the error is not transient. + +## Example Usage + +```typescript +import { ErrorStatus } from "@codat/lending/sdk/models/shared"; + +let value: ErrorStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/errorvalidation.md b/lending/docs/sdk/models/shared/errorvalidation.md index 4068080a1..0759db89b 100644 --- a/lending/docs/sdk/models/shared/errorvalidation.md +++ b/lending/docs/sdk/models/shared/errorvalidation.md @@ -1,18 +1,18 @@ -# ErrorValidation - -A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. - -## Example Usage - -```typescript -import { ErrorValidation } from "@codat/lending/sdk/models/shared"; - -let value: ErrorValidation = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [shared.ErrorValidationItem](../../../sdk/models/shared/errorvalidationitem.md)[] | :heavy_minus_sign: | N/A | +# ErrorValidation + +A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. + +## Example Usage + +```typescript +import { ErrorValidation } from "@codat/lending/sdk/models/shared"; + +let value: ErrorValidation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `errors` | [shared.ErrorValidationItem](../../../sdk/models/shared/errorvalidationitem.md)[] | :heavy_minus_sign: | N/A | | `warnings` | [shared.ErrorValidationItem](../../../sdk/models/shared/errorvalidationitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/errorvalidationitem.md b/lending/docs/sdk/models/shared/errorvalidationitem.md index bd2167efe..11d495561 100644 --- a/lending/docs/sdk/models/shared/errorvalidationitem.md +++ b/lending/docs/sdk/models/shared/errorvalidationitem.md @@ -1,17 +1,17 @@ -# ErrorValidationItem - -## Example Usage - -```typescript -import { ErrorValidationItem } from "@codat/lending/sdk/models/shared"; - -let value: ErrorValidationItem = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `itemId` | *string* | :heavy_minus_sign: | Unique identifier for a validation item. | -| `message` | *string* | :heavy_minus_sign: | A message outlining validation item's issue. | +# ErrorValidationItem + +## Example Usage + +```typescript +import { ErrorValidationItem } from "@codat/lending/sdk/models/shared"; + +let value: ErrorValidationItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `itemId` | *string* | :heavy_minus_sign: | Unique identifier for a validation item. | +| `message` | *string* | :heavy_minus_sign: | A message outlining validation item's issue. | | `validatorName` | *string* | :heavy_minus_sign: | Name of validator. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/excelreporttypes.md b/lending/docs/sdk/models/shared/excelreporttypes.md index 6ed859f89..987130a5b 100644 --- a/lending/docs/sdk/models/shared/excelreporttypes.md +++ b/lending/docs/sdk/models/shared/excelreporttypes.md @@ -1,17 +1,17 @@ -# ExcelReportTypes - -The type of the report requested in the query string. - -## Example Usage - -```typescript -import { ExcelReportTypes } from "@codat/lending/sdk/models/shared"; - -let value: ExcelReportTypes = "audit"; -``` - -## Values - -```typescript -"audit" | "enhancedFinancials" | "enhancedInvoices" | "enhancedCashFlow" +# ExcelReportTypes + +The type of the report requested in the query string. + +## Example Usage + +```typescript +import { ExcelReportTypes } from "@codat/lending/sdk/models/shared"; + +let value: ExcelReportTypes = "audit"; +``` + +## Values + +```typescript +"audit" | "enhancedFinancials" | "enhancedInvoices" | "enhancedCashFlow" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/excelstatus.md b/lending/docs/sdk/models/shared/excelstatus.md index ccbb1aac2..963a7cf61 100644 --- a/lending/docs/sdk/models/shared/excelstatus.md +++ b/lending/docs/sdk/models/shared/excelstatus.md @@ -1,31 +1,31 @@ -# ExcelStatus - -## Example Usage - -```typescript -import { ExcelStatus } from "@codat/lending/sdk/models/shared"; - -let value: ExcelStatus = { - lastGenerated: "2023-01-25T22:36:05.125Z", - inProgress: true, - queued: "2023-01-25T22:36:05.125Z", - success: true, - errorMessage: "string", - lastInvocationId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", - reportType: "enhancedInvoices", - fileSize: 0, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `lastGenerated` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `inProgress` | *boolean* | :heavy_minus_sign: | When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated. | | -| `queued` | *string* | :heavy_minus_sign: | The date and time of when a successful request was queued for the most recent report. | | -| `success` | *boolean* | :heavy_minus_sign: | True if the requested report was successfully queued and false if the requested report was not able to be queued. | | -| `errorMessage` | *string* | :heavy_minus_sign: | Error details in case the report generation request was unsuccessful. | | -| `lastInvocationId` | *string* | :heavy_minus_sign: | A unique ID generated for this request. | | -| `reportType` | [shared.ExcelReportTypes](../../../sdk/models/shared/excelreporttypes.md) | :heavy_minus_sign: | The type of the report requested in the query string. | | +# ExcelStatus + +## Example Usage + +```typescript +import { ExcelStatus } from "@codat/lending/sdk/models/shared"; + +let value: ExcelStatus = { + lastGenerated: "2023-01-25T22:36:05.125Z", + inProgress: true, + queued: "2023-01-25T22:36:05.125Z", + success: true, + errorMessage: "string", + lastInvocationId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + reportType: "string", + fileSize: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `lastGenerated` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `inProgress` | *boolean* | :heavy_minus_sign: | When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated. | | +| `queued` | *string* | :heavy_minus_sign: | The date and time of when a successful request was queued for the most recent report. | | +| `success` | *boolean* | :heavy_minus_sign: | True if the requested report was successfully queued and false if the requested report was not able to be queued. | | +| `errorMessage` | *string* | :heavy_minus_sign: | Error details in case the report generation request was unsuccessful. | | +| `lastInvocationId` | *string* | :heavy_minus_sign: | A unique ID generated for this request. | | +| `reportType` | [shared.ExcelReportTypes](../../../sdk/models/shared/excelreporttypes.md) | :heavy_minus_sign: | The type of the report requested in the query string. | | | `fileSize` | *number* | :heavy_minus_sign: | The file size in Bytes is populated upon successful generation of the report. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/filet.md b/lending/docs/sdk/models/shared/filet.md index 023063b3a..6c90b4e11 100644 --- a/lending/docs/sdk/models/shared/filet.md +++ b/lending/docs/sdk/models/shared/filet.md @@ -1,20 +1,18 @@ -# FileT - -## Example Usage - -```typescript -import { FileT } from "@codat/lending/sdk/models/shared"; - -let value: FileT = { - uploaded: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fileName` | *string* | :heavy_minus_sign: | The file's name. | | -| `displayName` | *string* | :heavy_minus_sign: | An optional display name for the file. | | -| `sourceType` | *string* | :heavy_minus_sign: | The source of the file uploaded. | | -| `uploaded` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# FileT + +## Example Usage + +```typescript +import { FileT } from "@codat/lending/sdk/models/shared"; + +let value: FileT = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `fileName` | *string* | :heavy_minus_sign: | The file's name. | +| `displayName` | *string* | :heavy_minus_sign: | An optional display name for the file. | +| `sourceType` | *string* | :heavy_minus_sign: | The source of the file uploaded. | +| `uploaded` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/fileupload.md b/lending/docs/sdk/models/shared/fileupload.md index e91529c08..8796f0ab1 100644 --- a/lending/docs/sdk/models/shared/fileupload.md +++ b/lending/docs/sdk/models/shared/fileupload.md @@ -1,15 +1,17 @@ -# FileUpload - -## Example Usage - -```typescript -import { FileUpload } from "@codat/lending/sdk/models/shared"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [shared.CodatFile](../../../sdk/models/shared/codatfile.md) | :heavy_check_mark: | The file to be uploaded as an attachment. | \ No newline at end of file +# FileUpload + +## Example Usage + +```typescript +import { FileUpload } from "@codat/lending/sdk/models/shared"; + +let value: FileUpload = { + file: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `file` | *CodatFile | Blob* | :heavy_check_mark: | The file to be uploaded as an attachment. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/halref.md b/lending/docs/sdk/models/shared/halref.md index 861ce2336..abc4c3fbc 100644 --- a/lending/docs/sdk/models/shared/halref.md +++ b/lending/docs/sdk/models/shared/halref.md @@ -1,15 +1,15 @@ -# HalRef - -## Example Usage - -```typescript -import { HalRef } from "@codat/lending/sdk/models/shared"; - -let value: HalRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +# HalRef + +## Example Usage + +```typescript +import { HalRef } from "@codat/lending/sdk/models/shared"; + +let value: HalRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | | `href` | *string* | :heavy_minus_sign: | Uri hypertext reference. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/integritystatus.md b/lending/docs/sdk/models/shared/integritystatus.md index 2dbad5687..15c7f3934 100644 --- a/lending/docs/sdk/models/shared/integritystatus.md +++ b/lending/docs/sdk/models/shared/integritystatus.md @@ -1,17 +1,17 @@ -# IntegrityStatus - -The current status of the most recently run matching algorithm. - -## Example Usage - -```typescript -import { IntegrityStatus } from "@codat/lending/sdk/models/shared"; - -let value: IntegrityStatus = "Error"; -``` - -## Values - -```typescript -"Unknown" | "DoesNotExist" | "Error" | "Complete" +# IntegrityStatus + +The current status of the most recently run matching algorithm. + +## Example Usage + +```typescript +import { IntegrityStatus } from "@codat/lending/sdk/models/shared"; + +let value: IntegrityStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "DoesNotExist" | "Error" | "Complete" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/invoicelineitem.md b/lending/docs/sdk/models/shared/invoicelineitem.md index 374c92b0f..e6eca37f4 100644 --- a/lending/docs/sdk/models/shared/invoicelineitem.md +++ b/lending/docs/sdk/models/shared/invoicelineitem.md @@ -1,41 +1,28 @@ -# InvoiceLineItem - -## Example Usage - -```typescript -import { InvoiceLineItem } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: InvoiceLineItem = { - unitAmount: new Decimal("7963.79"), - quantity: new Decimal("4184.77"), - accountRef: {}, - tracking: { - categoryRefs: [], - isBilledTo: "Unknown", - isRebilledTo: "Unknown", - recordRef: { - dataType: "journalEntry", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Friendly name of the goods or services provided. | | -| `unitAmount` | *Decimal* | :heavy_check_mark: | Price of each unit of goods or services. | | -| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of goods or services provided. | | -| `discountAmount` | *Decimal* | :heavy_minus_sign: | Numerical value of any discounts applied. | | -| `subTotal` | *Decimal* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | | -| `taxAmount` | *Decimal* | :heavy_minus_sign: | Amount of tax for the line. | | -| `totalAmount` | *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. | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `discountPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any discounts applied to the unit amount. | | -| `taxRateRef` | [shared.TaxRateRef](../../../sdk/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 | | -| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | | -| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Reference to the tracking categories to which the line item is linked. | | -| `tracking` | [shared.AccountsReceivableTracking](../../../sdk/models/shared/accountsreceivabletracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | | -| `isDirectIncome` | *boolean* | :heavy_minus_sign: | The invoice is a direct income if `True`. | | \ No newline at end of file +# InvoiceLineItem + +## Example Usage + +```typescript +import { InvoiceLineItem } from "@codat/lending/sdk/models/shared"; + +let value: InvoiceLineItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `description` | *string* | :heavy_minus_sign: | Friendly name of the goods or services provided. | +| `unitAmount` | *Decimal | number* | :heavy_check_mark: | Price of each unit of goods or services. | +| `quantity` | *Decimal | number* | :heavy_check_mark: | Number of units of goods or services provided. | +| `discountAmount` | *Decimal | number* | :heavy_minus_sign: | Numerical value of any discounts applied. | +| `subTotal` | *Decimal | number* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `taxAmount` | *Decimal | number* | :heavy_minus_sign: | Amount of tax for the line. | +| `totalAmount` | *Decimal | number* | :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. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | Reference to the account to which the line item is linked. | +| `discountPercentage` | *Decimal | number* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any discounts applied to the unit amount. | +| `taxRateRef` | [shared.TaxRateRef](../../../sdk/models/shared/taxrateref.md) | :heavy_minus_sign: | Reference to the tax rate to which the line item is linked. | +| `itemRef` | [shared.PropertieItemRef](../../../sdk/models/shared/propertieitemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Reference to the tracking categories to which the line item is linked. | +| `tracking` | [shared.AccountsReceivableTracking](../../../sdk/models/shared/accountsreceivabletracking.md) | :heavy_minus_sign: | N/A | +| `isDirectIncome` | *boolean* | :heavy_minus_sign: | The invoice is a direct income if `True`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/invoicestatus.md b/lending/docs/sdk/models/shared/invoicestatus.md index 8c9b49a54..84a6372a5 100644 --- a/lending/docs/sdk/models/shared/invoicestatus.md +++ b/lending/docs/sdk/models/shared/invoicestatus.md @@ -1,23 +1,23 @@ -# InvoiceStatus - -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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld). -- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`. -- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. - -## Example Usage - -```typescript -import { InvoiceStatus } from "@codat/lending/sdk/models/shared"; - -let value: InvoiceStatus = "Submitted"; -``` - -## Values - -```typescript -"Unknown" | "Draft" | "Submitted" | "PartiallyPaid" | "Paid" | "Void" +# InvoiceStatus + +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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld). +- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`. +- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. + +## Example Usage + +```typescript +import { InvoiceStatus } from "@codat/lending/sdk/models/shared"; + +let value: InvoiceStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Draft" | "Submitted" | "PartiallyPaid" | "Paid" | "Void" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/itemref.md b/lending/docs/sdk/models/shared/itemref.md index 95485bcd6..333214c7f 100644 --- a/lending/docs/sdk/models/shared/itemref.md +++ b/lending/docs/sdk/models/shared/itemref.md @@ -1,17 +1,17 @@ -# ItemRef - -## Example Usage - -```typescript -import { ItemRef } from "@codat/lending/sdk/models/shared"; - -let value: ItemRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | The id of the object, e.g. the Journal entry. | -| `dataConnectionId` | *string* | :heavy_minus_sign: | The data connection id being referenced. | +# ItemRef + +## Example Usage + +```typescript +import { ItemRef } from "@codat/lending/sdk/models/shared"; + +let value: ItemRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | The id of the object, e.g. the Journal entry. | +| `dataConnectionId` | *string* | :heavy_minus_sign: | The data connection id being referenced. | | `type` | *string* | :heavy_minus_sign: | The data type the loan transaction entry was extracted from. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/itemreference.md b/lending/docs/sdk/models/shared/itemreference.md index ed73c916b..537fa7519 100644 --- a/lending/docs/sdk/models/shared/itemreference.md +++ b/lending/docs/sdk/models/shared/itemreference.md @@ -1,20 +1,20 @@ -# ItemReference - -Reference to the item the line is linked to. - -## Example Usage - -```typescript -import { ItemReference } from "@codat/lending/sdk/models/shared"; - -let value: ItemReference = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the item in the accounting software. | +# ItemReference + +Reference to the item the line is linked to. + +## Example Usage + +```typescript +import { ItemReference } from "@codat/lending/sdk/models/shared"; + +let value: ItemReference = { + id: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for the item in the accounting software. | | `name` | *string* | :heavy_minus_sign: | Name of the item in the accounting software. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/items.md b/lending/docs/sdk/models/shared/items.md index 9f605bcf2..ce08d2884 100644 --- a/lending/docs/sdk/models/shared/items.md +++ b/lending/docs/sdk/models/shared/items.md @@ -1,20 +1,19 @@ -# Items - -## Example Usage - -```typescript -import { Items } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: Items = { - name: "", - amount: new Decimal("6638.92"), -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `name` | *string* | :heavy_check_mark: | Name assigned to withheld tax. | -| `amount` | *Decimal* | :heavy_check_mark: | Amount of tax withheld. | \ No newline at end of file +# Items + +## Example Usage + +```typescript +import { Items } from "@codat/lending/sdk/models/shared"; + +let value: Items = { + name: "string", + amount: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `name` | *string* | :heavy_check_mark: | Name assigned to withheld tax. | +| `amount` | *Decimal | number* | :heavy_check_mark: | Amount of tax withheld. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/journalentryrecordref.md b/lending/docs/sdk/models/shared/journalentryrecordref.md index ca0209b24..98439b71e 100644 --- a/lending/docs/sdk/models/shared/journalentryrecordref.md +++ b/lending/docs/sdk/models/shared/journalentryrecordref.md @@ -1,20 +1,18 @@ -# JournalEntryRecordRef - -Links a journal entry to the underlying record that created it. - -## Example Usage - -```typescript -import { JournalEntryRecordRef } from "@codat/lending/sdk/models/shared"; - -let value: JournalEntryRecordRef = { - dataType: "transfers", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | -| `dataType` | [shared.JournalEntryRecordRefDataType](../../../sdk/models/shared/journalentryrecordrefdatatype.md) | :heavy_minus_sign: | Name of underlying data type. | transfers | \ No newline at end of file +# JournalEntryRecordRef + +Links a journal entry to the underlying record that created it. + +## Example Usage + +```typescript +import { JournalEntryRecordRef } from "@codat/lending/sdk/models/shared"; + +let value: JournalEntryRecordRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | +| `dataType` | [shared.JournalEntryRecordRefDataType](../../../sdk/models/shared/journalentryrecordrefdatatype.md) | :heavy_minus_sign: | Name of underlying data type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/journalentryrecordrefdatatype.md b/lending/docs/sdk/models/shared/journalentryrecordrefdatatype.md index 9403f888b..e236d1fa8 100644 --- a/lending/docs/sdk/models/shared/journalentryrecordrefdatatype.md +++ b/lending/docs/sdk/models/shared/journalentryrecordrefdatatype.md @@ -1,17 +1,15 @@ -# JournalEntryRecordRefDataType - -Name of underlying data type. - -## Example Usage - -```typescript -import { JournalEntryRecordRefDataType } from "@codat/lending/sdk/models/shared"; - -let value: JournalEntryRecordRefDataType = "transfers"; -``` - -## Values - -```typescript -"bankTransactions" | "billCreditNotes" | "billPayments" | "bills" | "creditNotes" | "directCosts" | "directIncomes" | "invoices" | "journalEntries" | "payments" | "transfers" +# JournalEntryRecordRefDataType + +## Example Usage + +```typescript +import { JournalEntryRecordRefDataType } from "@codat/lending/sdk/models/shared"; + +let value: JournalEntryRecordRefDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/journalline.md b/lending/docs/sdk/models/shared/journalline.md index 0be7fe960..fa8e09794 100644 --- a/lending/docs/sdk/models/shared/journalline.md +++ b/lending/docs/sdk/models/shared/journalline.md @@ -1,33 +1,22 @@ -# JournalLine - -## Example Usage - -```typescript -import { JournalLine } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: JournalLine = { - netAmount: new Decimal("8686.19"), - accountRef: {}, - tracking: { - recordRefs: [ - { - dataType: "trackingCategories", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Description of the journal line item. | | -| `netAmount` | *Decimal* | :heavy_check_mark: | Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. | | -| `transactionAmount` | *Decimal* | :heavy_minus_sign: | The amount in the original transaction currency. | | -| `currency` | *string* | :heavy_minus_sign: | Currency for the journal line item. | | -| `transactionCurrency` | *string* | :heavy_minus_sign: | Currency of the original transaction. | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `tracking` | [shared.JournalLineTracking](../../../sdk/models/shared/journallinetracking.md) | :heavy_minus_sign: | List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) | | -| `contactRef` | [shared.ContactReference](../../../sdk/models/shared/contactreference.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# JournalLine + +## Example Usage + +```typescript +import { JournalLine } from "@codat/lending/sdk/models/shared"; + +let value: JournalLine = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Description of the journal line item. | +| `netAmount` | *Decimal | number* | :heavy_check_mark: | Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. | +| `transactionAmount` | *Decimal | number* | :heavy_minus_sign: | The amount in the original transaction currency. | +| `currency` | *string* | :heavy_minus_sign: | Currency for the journal line item. | +| `transactionCurrency` | *string* | :heavy_minus_sign: | Currency of the original transaction. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | N/A | +| `tracking` | [shared.JournalLineTracking](../../../sdk/models/shared/journallinetracking.md) | :heavy_minus_sign: | N/A | +| `contactRef` | [shared.ContactReference](../../../sdk/models/shared/contactreference.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/journallinedatatype.md b/lending/docs/sdk/models/shared/journallinedatatype.md index af9b7f562..d49755c1b 100644 --- a/lending/docs/sdk/models/shared/journallinedatatype.md +++ b/lending/docs/sdk/models/shared/journallinedatatype.md @@ -1,17 +1,15 @@ -# JournalLineDataType - -Allowed name of the 'dataType'. - -## Example Usage - -```typescript -import { JournalLineDataType } from "@codat/lending/sdk/models/shared"; - -let value: JournalLineDataType = "customers"; -``` - -## Values - -```typescript -"customers" | "suppliers" +# JournalLineDataType + +## Example Usage + +```typescript +import { JournalLineDataType } from "@codat/lending/sdk/models/shared"; + +let value: JournalLineDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/journallinetracking.md b/lending/docs/sdk/models/shared/journallinetracking.md index cd40d31a5..e9f829098 100644 --- a/lending/docs/sdk/models/shared/journallinetracking.md +++ b/lending/docs/sdk/models/shared/journallinetracking.md @@ -1,23 +1,17 @@ -# JournalLineTracking - -List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) - -## Example Usage - -```typescript -import { JournalLineTracking } from "@codat/lending/sdk/models/shared"; - -let value: JournalLineTracking = { - recordRefs: [ - { - dataType: "trackingCategories", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +# JournalLineTracking + +List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) + +## Example Usage + +```typescript +import { JournalLineTracking } from "@codat/lending/sdk/models/shared"; + +let value: JournalLineTracking = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | | `recordRefs` | [shared.TrackingRecordRef](../../../sdk/models/shared/trackingrecordref.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/journalref.md b/lending/docs/sdk/models/shared/journalref.md index 7d4e581e3..ec39ab947 100644 --- a/lending/docs/sdk/models/shared/journalref.md +++ b/lending/docs/sdk/models/shared/journalref.md @@ -1,20 +1,18 @@ -# JournalRef - -Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). - -## Example Usage - -```typescript -import { JournalRef } from "@codat/lending/sdk/models/shared"; - -let value: JournalRef = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `id` | *string* | :heavy_check_mark: | GUID of the underlying journal. | +# JournalRef + +Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). + +## Example Usage + +```typescript +import { JournalRef } from "@codat/lending/sdk/models/shared"; + +let value: JournalRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `id` | *string* | :heavy_check_mark: | GUID of the underlying journal. | | `name` | *string* | :heavy_minus_sign: | Name of journal | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/journalstatus.md b/lending/docs/sdk/models/shared/journalstatus.md index c86b9eb5d..b2d430c27 100644 --- a/lending/docs/sdk/models/shared/journalstatus.md +++ b/lending/docs/sdk/models/shared/journalstatus.md @@ -1,17 +1,17 @@ -# JournalStatus - -Current journal status. - -## Example Usage - -```typescript -import { JournalStatus } from "@codat/lending/sdk/models/shared"; - -let value: JournalStatus = "Active"; -``` - -## Values - -```typescript -"Unknown" | "Active" | "Archived" +# JournalStatus + +Current journal status. + +## Example Usage + +```typescript +import { JournalStatus } from "@codat/lending/sdk/models/shared"; + +let value: JournalStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/lendingcustomerref.md b/lending/docs/sdk/models/shared/lendingcustomerref.md index 2d4a00fff..3123feca8 100644 --- a/lending/docs/sdk/models/shared/lendingcustomerref.md +++ b/lending/docs/sdk/models/shared/lendingcustomerref.md @@ -1,16 +1,16 @@ -# LendingCustomerRef - -## Example Usage - -```typescript -import { LendingCustomerRef } from "@codat/lending/sdk/models/shared"; - -let value: LendingCustomerRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | `id` from the Customers data type. | +# LendingCustomerRef + +## Example Usage + +```typescript +import { LendingCustomerRef } from "@codat/lending/sdk/models/shared"; + +let value: LendingCustomerRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | `id` from the Customers data type. | | `customerName` | *string* | :heavy_minus_sign: | `customerName` from the Customer data type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/links.md b/lending/docs/sdk/models/shared/links.md index 064627848..90b187bc3 100644 --- a/lending/docs/sdk/models/shared/links.md +++ b/lending/docs/sdk/models/shared/links.md @@ -1,25 +1,18 @@ -# Links - -## Example Usage - -```typescript -import { Links } from "@codat/lending/sdk/models/shared"; - -let value: Links = { - self: { - href: "/companies", - }, - current: { - href: "/companies?page=1&pageSize=10", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `self` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | -| `current` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | -| `next` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_minus_sign: | N/A | +# Links + +## Example Usage + +```typescript +import { Links } from "@codat/lending/sdk/models/shared"; + +let value: Links = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `self` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | +| `current` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | +| `next` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_minus_sign: | N/A | | `previous` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loanref.md b/lending/docs/sdk/models/shared/loanref.md index 1af7b95e2..1f7f820d7 100644 --- a/lending/docs/sdk/models/shared/loanref.md +++ b/lending/docs/sdk/models/shared/loanref.md @@ -1,17 +1,17 @@ -# LoanRef - -## Example Usage - -```typescript -import { LoanRef } from "@codat/lending/sdk/models/shared"; - -let value: LoanRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | The id of the object being referred to. | -| `dataConnectionId` | *string* | :heavy_minus_sign: | The dataConnectionId the object being referred to is associated with. | +# LoanRef + +## Example Usage + +```typescript +import { LoanRef } from "@codat/lending/sdk/models/shared"; + +let value: LoanRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | The id of the object being referred to. | +| `dataConnectionId` | *string* | :heavy_minus_sign: | The dataConnectionId the object being referred to is associated with. | | `type` | *string* | :heavy_minus_sign: | The object type data is referring to, e.g. Account. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loansummary.md b/lending/docs/sdk/models/shared/loansummary.md index 13af96cc1..4f78fae70 100644 --- a/lending/docs/sdk/models/shared/loansummary.md +++ b/lending/docs/sdk/models/shared/loansummary.md @@ -1,38 +1,38 @@ -# LoanSummary - -## Example Usage - -```typescript -import { LoanSummary } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: LoanSummary = { - reportInfo: { - reportName: "LoanSummaryReport", - companyName: "The Coffee shop", - generatedDate: "2022-10-23T00:00:00Z", - }, - reportItems: [ - { - recordRef: { - id: "string", - dataConnectionId: "DE34E8E3-089F-4DF4-89E9-F7C43618FCAAA", - integrationType: "Accounting", - recordRefType: "accounts", - }, - description: "string", - startDate: "2021-01-01", - totalRepayments: new Decimal("83481.72"), - balance: new Decimal("42513.18"), - lender: "Barclays Bank", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `reportInfo` | [shared.LoanSummaryReportInfo](../../../sdk/models/shared/loansummaryreportinfo.md) | :heavy_minus_sign: | N/A | +# LoanSummary + +## Example Usage + +```typescript +import { LoanSummary } from "@codat/lending/sdk/models/shared"; + +let value: LoanSummary = { + reportInfo: { + reportName: "LoanSummaryReport", + companyName: "The Coffee shop", + generatedDate: "2022-10-23T00:00:00Z", + }, + reportItems: [ + { + recordRef: { + id: "string", + dataConnectionId: "DE34E8E3-089F-4DF4-89E9-F7C43618FCAAA", + integrationType: "Accounting", + recordRefType: "accounts", + }, + description: "string", + startDate: "2021-01-01", + totalRepayments: 83481.72, + balance: 42513.18, + lender: "Barclays Bank", + totalInvestments: 100000, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `reportInfo` | [shared.LoanSummaryReportInfo](../../../sdk/models/shared/loansummaryreportinfo.md) | :heavy_minus_sign: | N/A | | `reportItems` | [shared.LoanSummaryReportItem](../../../sdk/models/shared/loansummaryreportitem.md)[] | :heavy_minus_sign: | Returns a summary of all loan activity for that integration type | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loansummaryintegrationtype.md b/lending/docs/sdk/models/shared/loansummaryintegrationtype.md index 6f9be0723..8482a5863 100644 --- a/lending/docs/sdk/models/shared/loansummaryintegrationtype.md +++ b/lending/docs/sdk/models/shared/loansummaryintegrationtype.md @@ -1,17 +1,17 @@ -# LoanSummaryIntegrationType - -The integration type begin referred to. - -## Example Usage - -```typescript -import { LoanSummaryIntegrationType } from "@codat/lending/sdk/models/shared"; - -let value: LoanSummaryIntegrationType = "Commerce"; -``` - -## Values - -```typescript -"Accounting" | "Banking" | "Commerce" +# LoanSummaryIntegrationType + +The integration type begin referred to. + +## Example Usage + +```typescript +import { LoanSummaryIntegrationType } from "@codat/lending/sdk/models/shared"; + +let value: LoanSummaryIntegrationType = "Accounting"; +``` + +## Values + +```typescript +"Accounting" | "Banking" | "Commerce" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loansummaryrecordref.md b/lending/docs/sdk/models/shared/loansummaryrecordref.md index 496f0dc96..4ca8de47f 100644 --- a/lending/docs/sdk/models/shared/loansummaryrecordref.md +++ b/lending/docs/sdk/models/shared/loansummaryrecordref.md @@ -1,18 +1,18 @@ -# LoanSummaryRecordRef - -## Example Usage - -```typescript -import { LoanSummaryRecordRef } from "@codat/lending/sdk/models/shared"; - -let value: LoanSummaryRecordRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | The id of the object being referred to. | -| `dataConnectionId` | *string* | :heavy_minus_sign: | The dataConnectionId the object being referred to is associated with. | -| `integrationType` | [shared.LoanSummaryIntegrationType](../../../sdk/models/shared/loansummaryintegrationtype.md) | :heavy_minus_sign: | The integration type begin referred to. | -| `recordRefType` | [shared.LoanSummaryRecordRefType](../../../sdk/models/shared/loansummaryrecordreftype.md) | :heavy_minus_sign: | The datatype being referred to. | \ No newline at end of file +# LoanSummaryRecordRef + +## Example Usage + +```typescript +import { LoanSummaryRecordRef } from "@codat/lending/sdk/models/shared"; + +let value: LoanSummaryRecordRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | The id of the object being referred to. | +| `dataConnectionId` | *string* | :heavy_minus_sign: | The dataConnectionId the object being referred to is associated with. | +| `integrationType` | [shared.LoanSummaryIntegrationType](../../../sdk/models/shared/loansummaryintegrationtype.md) | :heavy_minus_sign: | N/A | +| `recordRefType` | [shared.LoanSummaryRecordRefType](../../../sdk/models/shared/loansummaryrecordreftype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loansummaryrecordreftype.md b/lending/docs/sdk/models/shared/loansummaryrecordreftype.md index b06198b22..4e81879de 100644 --- a/lending/docs/sdk/models/shared/loansummaryrecordreftype.md +++ b/lending/docs/sdk/models/shared/loansummaryrecordreftype.md @@ -1,17 +1,17 @@ -# LoanSummaryRecordRefType - -The datatype being referred to. - -## Example Usage - -```typescript -import { LoanSummaryRecordRefType } from "@codat/lending/sdk/models/shared"; - -let value: LoanSummaryRecordRefType = "commerce-transactions"; -``` - -## Values - -```typescript -"accounts" | "banking-accounts" | "commerce-transactions" +# LoanSummaryRecordRefType + +The datatype being referred to. + +## Example Usage + +```typescript +import { LoanSummaryRecordRefType } from "@codat/lending/sdk/models/shared"; + +let value: LoanSummaryRecordRefType = "accounts"; +``` + +## Values + +```typescript +"accounts" | "banking-accounts" | "commerce-transactions" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loansummaryreportinfo.md b/lending/docs/sdk/models/shared/loansummaryreportinfo.md index af750a2ae..e904b323a 100644 --- a/lending/docs/sdk/models/shared/loansummaryreportinfo.md +++ b/lending/docs/sdk/models/shared/loansummaryreportinfo.md @@ -1,19 +1,19 @@ -# LoanSummaryReportInfo - -## Example Usage - -```typescript -import { LoanSummaryReportInfo } from "@codat/lending/sdk/models/shared"; - -let value: LoanSummaryReportInfo = { - generatedDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `reportName` | *string* | :heavy_minus_sign: | The name of the report. | | -| `companyName` | *string* | :heavy_minus_sign: | Name of the company queried. | | +# LoanSummaryReportInfo + +## Example Usage + +```typescript +import { LoanSummaryReportInfo } from "@codat/lending/sdk/models/shared"; + +let value: LoanSummaryReportInfo = { + generatedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `reportName` | *string* | :heavy_minus_sign: | The name of the report. | | +| `companyName` | *string* | :heavy_minus_sign: | Name of the company queried. | | | `generatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loansummaryreportitem.md b/lending/docs/sdk/models/shared/loansummaryreportitem.md index d93e129ca..3dbcaca87 100644 --- a/lending/docs/sdk/models/shared/loansummaryreportitem.md +++ b/lending/docs/sdk/models/shared/loansummaryreportitem.md @@ -1,23 +1,21 @@ -# LoanSummaryReportItem - -## Example Usage - -```typescript -import { LoanSummaryReportItem } from "@codat/lending/sdk/models/shared"; - -let value: LoanSummaryReportItem = { - startDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `recordRef` | [shared.LoanSummaryRecordRef](../../../sdk/models/shared/loansummaryrecordref.md) | :heavy_minus_sign: | N/A | | -| `description` | *string* | :heavy_minus_sign: | The description of the object being referred to. E.g. the account. | | -| `startDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `totalDrawdowns` | *Decimal* | :heavy_minus_sign: | The total loan drawdowns. | | -| `totalRepayments` | *Decimal* | :heavy_minus_sign: | The total loan repayments which includes capital plus any interest. | | -| `balance` | *Decimal* | :heavy_minus_sign: | The loan outstanding balance. This may not equal totalDrawdowns - totalRepayments due to interest which has been accrued. | | -| `lender` | *string* | :heavy_minus_sign: | The name of lender providing the loan. | | \ No newline at end of file +# LoanSummaryReportItem + +## Example Usage + +```typescript +import { LoanSummaryReportItem } from "@codat/lending/sdk/models/shared"; + +let value: LoanSummaryReportItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `recordRef` | [shared.LoanSummaryRecordRef](../../../sdk/models/shared/loansummaryrecordref.md) | :heavy_minus_sign: | Contains object that contains a summary of all loan transactions for that integration type. | +| `description` | *string* | :heavy_minus_sign: | The description of the object being referred to. E.g. the account. | +| `startDate` | *string* | :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. | +| `totalDrawdowns` | *Decimal | number* | :heavy_minus_sign: | The total loan drawdowns. | +| `totalRepayments` | *Decimal | number* | :heavy_minus_sign: | The total loan repayments which includes capital plus any interest. | +| `balance` | *Decimal | number* | :heavy_minus_sign: | The loan outstanding balance. This may not equal totalDrawdowns - totalRepayments due to interest which has been accrued. | +| `lender` | *string* | :heavy_minus_sign: | The name of lender providing the loan. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loantransactions.md b/lending/docs/sdk/models/shared/loantransactions.md index 7ac995e00..4718746a3 100644 --- a/lending/docs/sdk/models/shared/loantransactions.md +++ b/lending/docs/sdk/models/shared/loantransactions.md @@ -1,43 +1,43 @@ -# LoanTransactions - -## Example Usage - -```typescript -import { LoanTransactions } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: LoanTransactions = { - reportInfo: { - pageNumber: 1, - pageSize: 1000, - totalResults: 1, - reportName: "AccountingLoanTransactions", - companyName: "Supermarket store", - generatedDate: "2022-10-23T00:00:00Z", - }, - reportItems: [ - { - loanRef: { - id: "332", - dataConnectionId: "ecd2d6be-5194-40a1-838f-5577a4881aaa", - type: "chartOfAccount", - }, - itemRef: { - id: "755488", - dataConnectionId: "ecd2d6be-5194-40a1-838f-5577a4881aaa", - type: "journalEntry", - }, - date: "2020-08-02", - amount: new Decimal("-455"), - lender: "Barclays Bank", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `reportInfo` | [shared.LoanTransactionsReportInfo](../../../sdk/models/shared/loantransactionsreportinfo.md) | :heavy_minus_sign: | N/A | +# LoanTransactions + +## Example Usage + +```typescript +import { LoanTransactions } from "@codat/lending/sdk/models/shared"; + +let value: LoanTransactions = { + reportInfo: { + pageNumber: 1, + pageSize: 1000, + totalResults: 1, + reportName: "AccountingLoanTransactions", + companyName: "Supermarket store", + generatedDate: "2022-10-23T00:00:00Z", + }, + reportItems: [ + { + loanRef: { + id: "332", + dataConnectionId: "ecd2d6be-5194-40a1-838f-5577a4881aaa", + type: "chartOfAccount", + }, + itemRef: { + id: "755488", + dataConnectionId: "ecd2d6be-5194-40a1-838f-5577a4881aaa", + type: "journalEntry", + }, + date: "2020-08-02", + amount: -455, + lender: "Barclays Bank", + transactionType: "Repayment", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `reportInfo` | [shared.LoanTransactionsReportInfo](../../../sdk/models/shared/loantransactionsreportinfo.md) | :heavy_minus_sign: | N/A | | `reportItems` | [shared.ReportItems](../../../sdk/models/shared/reportitems.md)[] | :heavy_minus_sign: | Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loantransactionsreportinfo.md b/lending/docs/sdk/models/shared/loantransactionsreportinfo.md index ea83d1313..15ea359b0 100644 --- a/lending/docs/sdk/models/shared/loantransactionsreportinfo.md +++ b/lending/docs/sdk/models/shared/loantransactionsreportinfo.md @@ -1,22 +1,22 @@ -# LoanTransactionsReportInfo - -## Example Usage - -```typescript -import { LoanTransactionsReportInfo } from "@codat/lending/sdk/models/shared"; - -let value: LoanTransactionsReportInfo = { - generatedDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pageNumber` | *number* | :heavy_minus_sign: | The page number. | | -| `pageSize` | *number* | :heavy_minus_sign: | Queried page size. | | -| `totalResults` | *number* | :heavy_minus_sign: | The total number of transactions returned. | | -| `reportName` | *string* | :heavy_minus_sign: | The name of the report. | | -| `companyName` | *string* | :heavy_minus_sign: | Name of the company queried. | | +# LoanTransactionsReportInfo + +## Example Usage + +```typescript +import { LoanTransactionsReportInfo } from "@codat/lending/sdk/models/shared"; + +let value: LoanTransactionsReportInfo = { + generatedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_minus_sign: | The page number. | | +| `pageSize` | *number* | :heavy_minus_sign: | Queried page size. | | +| `totalResults` | *number* | :heavy_minus_sign: | The total number of transactions returned. | | +| `reportName` | *string* | :heavy_minus_sign: | The name of the report. | | +| `companyName` | *string* | :heavy_minus_sign: | Name of the company queried. | | | `generatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/loantransactiontype.md b/lending/docs/sdk/models/shared/loantransactiontype.md index b6e765fb8..6225c9dce 100644 --- a/lending/docs/sdk/models/shared/loantransactiontype.md +++ b/lending/docs/sdk/models/shared/loantransactiontype.md @@ -1,17 +1,15 @@ -# LoanTransactionType - -The type of loan transaction. - -## Example Usage - -```typescript -import { LoanTransactionType } from "@codat/lending/sdk/models/shared"; - -let value: LoanTransactionType = "Repayment"; -``` - -## Values - -```typescript -"Investment" | "Repayment" | "Interest" | "AccuredInterest" +# LoanTransactionType + +## Example Usage + +```typescript +import { LoanTransactionType } from "@codat/lending/sdk/models/shared"; + +let value: LoanTransactionType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/locationref.md b/lending/docs/sdk/models/shared/locationref.md index 26e24ad7c..3ba70c619 100644 --- a/lending/docs/sdk/models/shared/locationref.md +++ b/lending/docs/sdk/models/shared/locationref.md @@ -1,20 +1,18 @@ -# LocationRef - -Reference to the geographic location where the order was placed. - -## Example Usage - -```typescript -import { LocationRef } from "@codat/lending/sdk/models/shared"; - -let value: LocationRef = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identitifer of the location being referenced. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_minus_sign: | Name of the location being referenced. | | \ No newline at end of file +# LocationRef + +Reference to the geographic location where the order was placed. + +## Example Usage + +```typescript +import { LocationRef } from "@codat/lending/sdk/models/shared"; + +let value: LocationRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identitifer of the location being referenced. | +| `name` | *string* | :heavy_minus_sign: | Name of the location being referenced. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/metadata.md b/lending/docs/sdk/models/shared/metadata.md index 53c0fab7b..376b55b48 100644 --- a/lending/docs/sdk/models/shared/metadata.md +++ b/lending/docs/sdk/models/shared/metadata.md @@ -1,15 +1,15 @@ -# Metadata - -## Example Usage - -```typescript -import { Metadata } from "@codat/lending/sdk/models/shared"; - -let value: Metadata = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +# Metadata + +## Example Usage + +```typescript +import { Metadata } from "@codat/lending/sdk/models/shared"; + +let value: Metadata = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `isDeleted` | *boolean* | :heavy_minus_sign: | Indicates whether the record has been deleted in the third-party system this record originated from. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/orderdiscountallocation.md b/lending/docs/sdk/models/shared/orderdiscountallocation.md index 7c88b8fe4..5ec4cfa61 100644 --- a/lending/docs/sdk/models/shared/orderdiscountallocation.md +++ b/lending/docs/sdk/models/shared/orderdiscountallocation.md @@ -1,20 +1,16 @@ -# OrderDiscountAllocation - -## Example Usage - -```typescript -import { OrderDiscountAllocation } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: OrderDiscountAllocation = { - name: "Promotional Discount", - totalAmount: new Decimal("15.25"), -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_minus_sign: | Name of the discount in the commerce or point of sale platform. | Promotional Discount | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of discount applied, excluding tax. This is typically positive (for discounts which decrease the amount of the order line), but can also be negative (for discounts which increase the amount of the order line). | 15.25 | \ No newline at end of file +# OrderDiscountAllocation + +## Example Usage + +```typescript +import { OrderDiscountAllocation } from "@codat/lending/sdk/models/shared"; + +let value: OrderDiscountAllocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | Name of the discount in the commerce or point of sale platform. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of discount applied, excluding tax. This is typically positive (for discounts which decrease the amount of the order line), but can also be negative (for discounts which increase the amount of the order line). | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/orderlineitem.md b/lending/docs/sdk/models/shared/orderlineitem.md index d3eec3000..31e9f83c8 100644 --- a/lending/docs/sdk/models/shared/orderlineitem.md +++ b/lending/docs/sdk/models/shared/orderlineitem.md @@ -1,48 +1,24 @@ -# OrderLineItem - -## Example Usage - -```typescript -import { OrderLineItem } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: OrderLineItem = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - taxPercentage: new Decimal("0"), - taxes: [ - { - taxComponentRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - name: "", - }, - }, - ], - productRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }, - productVariantRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }, - discountAllocations: [ - { - name: "Promotional Discount", - totalAmount: new Decimal("15.25"), - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `quantity` | *Decimal* | :heavy_minus_sign: | Number of units of the product sold.
For refunds, quantity is negative.
| | -| `taxPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any sales tax applied to the unit price. | **Example 1:** 0
**Example 2:** 12.5
**Example 3:** 45.00 | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | | -| `totalTaxAmount` | *Decimal* | :heavy_minus_sign: | Total amount of tax applied to the line item, factoring in any discounts. | | -| `unitPrice` | *Decimal* | :heavy_minus_sign: | Price per unit of goods or services, excluding discounts and tax. | | -| `taxes` | [shared.TaxComponentAllocation](../../../sdk/models/shared/taxcomponentallocation.md)[] | :heavy_minus_sign: | Taxes breakdown as applied to order lines. | | -| `productRef` | [shared.ProductRef](../../../sdk/models/shared/productref.md) | :heavy_minus_sign: | Reference that links the line item to the correct product details. | | -| `productVariantRef` | [shared.ProductVariantRef](../../../sdk/models/shared/productvariantref.md) | :heavy_minus_sign: | Reference that links the line item to the specific version of product that has been ordered. | | -| `discountAllocations` | [shared.OrderDiscountAllocation](../../../sdk/models/shared/orderdiscountallocation.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file +# OrderLineItem + +## Example Usage + +```typescript +import { OrderLineItem } from "@codat/lending/sdk/models/shared"; + +let value: OrderLineItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | +| `quantity` | *Decimal | number* | :heavy_minus_sign: | Number of units of the product sold.
For refunds, quantity is negative. | +| `taxPercentage` | *Decimal | number* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any sales tax applied to the unit price. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | +| `totalTaxAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of tax applied to the line item, factoring in any discounts. | +| `unitPrice` | *Decimal | number* | :heavy_minus_sign: | Price per unit of goods or services, excluding discounts and tax. | +| `taxes` | [shared.TaxComponentAllocation](../../../sdk/models/shared/taxcomponentallocation.md)[] | :heavy_minus_sign: | Taxes breakdown as applied to order lines. | +| `productRef` | [shared.ProductRef](../../../sdk/models/shared/productref.md) | :heavy_minus_sign: | N/A | +| `productVariantRef` | [shared.ProductVariantRef](../../../sdk/models/shared/productvariantref.md) | :heavy_minus_sign: | N/A | +| `discountAllocations` | [shared.OrderDiscountAllocation](../../../sdk/models/shared/orderdiscountallocation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/path.md b/lending/docs/sdk/models/shared/path.md index 51c23afe6..c43f4521e 100644 --- a/lending/docs/sdk/models/shared/path.md +++ b/lending/docs/sdk/models/shared/path.md @@ -1,15 +1,15 @@ -# Path - -## Example Usage - -```typescript -import { Path } from "@codat/lending/sdk/models/shared"; - -let value: Path = "auth/get"; -``` - -## Values - -```typescript -"auth/get" +# Path + +## Example Usage + +```typescript +import { Path } from "@codat/lending/sdk/models/shared"; + +let value: Path = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/payment.md b/lending/docs/sdk/models/shared/payment.md index cc461c5f1..85d13918e 100644 --- a/lending/docs/sdk/models/shared/payment.md +++ b/lending/docs/sdk/models/shared/payment.md @@ -1,29 +1,21 @@ -# Payment - -## Example Usage - -```typescript -import { Payment } from "@codat/lending/sdk/models/shared"; - -let value: Payment = { - date: "2022-10-23T00:00:00Z", - currency: "GBP", - bankingTransactionRefs: [ - { - date: "2022-10-23T00:00:00Z", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `paymentType` | *string* | :heavy_minus_sign: | The type of payment. | | -| `amount` | *Decimal* | :heavy_minus_sign: | Payment amount. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `bankingTransactionRefs` | [shared.BankingTransactionRef](../../../sdk/models/shared/bankingtransactionref.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file +# Payment + +## Example Usage + +```typescript +import { Payment } from "@codat/lending/sdk/models/shared"; + +let value: Payment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. | +| `date` | *string* | :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. | +| `paymentType` | *string* | :heavy_minus_sign: | The type of payment. | +| `amount` | *Decimal | number* | :heavy_minus_sign: | Payment amount. | +| `currency` | *string* | :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. | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | +| `bankingTransactionRefs` | [shared.BankingTransactionRef](../../../sdk/models/shared/bankingtransactionref.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/paymentallocationpayment.md b/lending/docs/sdk/models/shared/paymentallocationpayment.md index 962c0b526..4e3aa6c0a 100644 --- a/lending/docs/sdk/models/shared/paymentallocationpayment.md +++ b/lending/docs/sdk/models/shared/paymentallocationpayment.md @@ -1,26 +1,22 @@ -# PaymentAllocationPayment - -## Example Usage - -```typescript -import { PaymentAllocationPayment } from "@codat/lending/sdk/models/shared"; - -let value: PaymentAllocationPayment = { - accountRef: {}, - currency: "GBP", - paidOnDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Identifier of the allocated payment. | | -| `note` | *string* | :heavy_minus_sign: | Notes attached to the allocated payment. | | -| `reference` | *string* | :heavy_minus_sign: | Reference to the allocated payment. | | -| `accountRef` | [shared.AccountRef](../../../sdk/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. | {
"Example": {
"value": {
"accountRef": {
"id": "4f78a6b0-e9bb-40f2-82fd-f3a2daa1fd0a",
"name": "Business Current Account"
}
}
}
} | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | -| `paidOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount that was paid. | | \ No newline at end of file +# PaymentAllocationPayment + +## Example Usage + +```typescript +import { PaymentAllocationPayment } from "@codat/lending/sdk/models/shared"; + +let value: PaymentAllocationPayment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | Identifier of the allocated payment. | +| `note` | *string* | :heavy_minus_sign: | Notes attached to the allocated payment. | +| `reference` | *string* | :heavy_minus_sign: | Reference to the allocated payment. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | The account that the allocated payment is made from or to. | +| `currency` | *string* | :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. | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | +| `paidOnDate` | *string* | :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. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount that was paid. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/paymentline.md b/lending/docs/sdk/models/shared/paymentline.md index 490ee529a..141b61544 100644 --- a/lending/docs/sdk/models/shared/paymentline.md +++ b/lending/docs/sdk/models/shared/paymentline.md @@ -1,21 +1,20 @@ -# PaymentLine - -## Example Usage - -```typescript -import { PaymentLine } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: PaymentLine = { - amount: new Decimal("8757.3"), - allocatedOnDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | *Decimal* | :heavy_check_mark: | Amount in the payment currency. | | -| `links` | [shared.PaymentLineLink](../../../sdk/models/shared/paymentlinelink.md)[] | :heavy_minus_sign: | N/A | | +# PaymentLine + +## Example Usage + +```typescript +import { PaymentLine } from "@codat/lending/sdk/models/shared"; + +let value: PaymentLine = { + amount: 0, + allocatedOnDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `amount` | *Decimal | number* | :heavy_check_mark: | Amount in the payment currency. | | +| `links` | [shared.PaymentLineLink](../../../sdk/models/shared/paymentlinelink.md)[] | :heavy_minus_sign: | N/A | | | `allocatedOnDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/paymentlinelink.md b/lending/docs/sdk/models/shared/paymentlinelink.md index 58f9428d3..f105ae4f7 100644 --- a/lending/docs/sdk/models/shared/paymentlinelink.md +++ b/lending/docs/sdk/models/shared/paymentlinelink.md @@ -1,20 +1,20 @@ -# PaymentLineLink - -## Example Usage - -```typescript -import { PaymentLineLink } from "@codat/lending/sdk/models/shared"; - -let value: PaymentLineLink = { - type: "Unlinked", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [shared.PaymentLinkType](../../../sdk/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 | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the transaction represented by the link. | -| `amount` | *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. | -| `currencyRate` | *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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | \ No newline at end of file +# PaymentLineLink + +## Example Usage + +```typescript +import { PaymentLineLink } from "@codat/lending/sdk/models/shared"; + +let value: PaymentLineLink = { + type: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [shared.PaymentLinkType](../../../sdk/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 | +| `id` | *string* | :heavy_minus_sign: | Unique identifier of the transaction represented by the link. | +| `amount` | *Decimal | number* | :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. | +| `currencyRate` | *Decimal | number* | :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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

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


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/paymentlinktype.md b/lending/docs/sdk/models/shared/paymentlinktype.md index 34230b497..1dcaf062d 100644 --- a/lending/docs/sdk/models/shared/paymentlinktype.md +++ b/lending/docs/sdk/models/shared/paymentlinktype.md @@ -1,27 +1,27 @@ -# PaymentLinkType - -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 - -## Example Usage - -```typescript -import { PaymentLinkType } from "@codat/lending/sdk/models/shared"; - -let value: PaymentLinkType = "CreditNote"; -``` - -## Values - -```typescript -"Unknown" | "Unlinked" | "Invoice" | "CreditNote" | "Other" | "Refund" | "Payment" | "PaymentOnAccount" | "ManualJournal" | "Discount" +# PaymentLinkType + +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 + +## Example Usage + +```typescript +import { PaymentLinkType } from "@codat/lending/sdk/models/shared"; + +let value: PaymentLinkType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Unlinked" | "Invoice" | "CreditNote" | "Other" | "Refund" | "Payment" | "PaymentOnAccount" | "ManualJournal" | "Discount" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/paymentmethodref.md b/lending/docs/sdk/models/shared/paymentmethodref.md index f3215064b..ee1550ef3 100644 --- a/lending/docs/sdk/models/shared/paymentmethodref.md +++ b/lending/docs/sdk/models/shared/paymentmethodref.md @@ -1,21 +1,21 @@ -# PaymentMethodRef - -The Payment Method to which the payment is linked in the accounting software. - -## Example Usage - -```typescript -import { PaymentMethodRef } from "@codat/lending/sdk/models/shared"; - -let value: PaymentMethodRef = { - id: "EILBDVJVNUAGVKRQ", - name: "AliPay", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier of the location being referenced. | +# PaymentMethodRef + +The payment method the record is linked to in the accounting or commerce software. + +## Example Usage + +```typescript +import { PaymentMethodRef } from "@codat/lending/sdk/models/shared"; + +let value: PaymentMethodRef = { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the location being referenced. | | `name` | *string* | :heavy_minus_sign: | Name of the location being referenced. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/paymentref.md b/lending/docs/sdk/models/shared/paymentref.md index a5d9aa546..300e32bca 100644 --- a/lending/docs/sdk/models/shared/paymentref.md +++ b/lending/docs/sdk/models/shared/paymentref.md @@ -1,35 +1,24 @@ -# PaymentRef - -## Example Usage - -```typescript -import { PaymentRef } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: PaymentRef = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - amount: new Decimal("194.12"), - currency: "GBP", - type: "Cash", - paymentProvider: "Amazon Pay", - dueDate: "2022-10-23T00:00:00Z", - createdDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `amount` | *Decimal* | :heavy_minus_sign: | Payment Amount (including gratuity). | **Example 1:** 194.12
**Example 2:** -283.56
**Example 3:** 0 | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `type` | [shared.PaymentType](../../../sdk/models/shared/paymenttype.md) | :heavy_minus_sign: | Type of payment. | Cash | -| `status` | [shared.PaymentStatus](../../../sdk/models/shared/paymentstatus.md) | :heavy_minus_sign: | Status of the payment. | | -| `paymentProvider` | *string* | :heavy_minus_sign: | Service provider of the payment, if applicable. | **Example 1:** Amazon Pay
**Example 2:** Checkout.com
**Example 3:** SagePay | -| `dueDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# PaymentRef + +## Example Usage + +```typescript +import { PaymentRef } from "@codat/lending/sdk/models/shared"; + +let value: PaymentRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | +| `createdDate` | *string* | :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. | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `amount` | *Decimal | number* | :heavy_minus_sign: | Payment Amount (including gratuity). | +| `currency` | *string* | :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. | +| `type` | [shared.PaymentType](../../../sdk/models/shared/paymenttype.md) | :heavy_minus_sign: | N/A | +| `status` | [shared.PaymentStatus](../../../sdk/models/shared/paymentstatus.md) | :heavy_minus_sign: | N/A | +| `paymentProvider` | *string* | :heavy_minus_sign: | Service provider of the payment, if applicable. | +| `dueDate` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/paymentstatus.md b/lending/docs/sdk/models/shared/paymentstatus.md index 1edfc15ef..133c836b6 100644 --- a/lending/docs/sdk/models/shared/paymentstatus.md +++ b/lending/docs/sdk/models/shared/paymentstatus.md @@ -1,17 +1,17 @@ -# PaymentStatus - -Status of the payment. - -## Example Usage - -```typescript -import { PaymentStatus } from "@codat/lending/sdk/models/shared"; - -let value: PaymentStatus = "Failed"; -``` - -## Values - -```typescript -"Pending" | "Authorized" | "Paid" | "Failed" | "Cancelled" | "Unknown" +# PaymentStatus + +Status of the payment. + +## Example Usage + +```typescript +import { PaymentStatus } from "@codat/lending/sdk/models/shared"; + +let value: PaymentStatus = "Pending"; +``` + +## Values + +```typescript +"Pending" | "Authorized" | "Paid" | "Failed" | "Cancelled" | "Unknown" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/paymenttype.md b/lending/docs/sdk/models/shared/paymenttype.md index 1d1196dd1..0a4ab9e84 100644 --- a/lending/docs/sdk/models/shared/paymenttype.md +++ b/lending/docs/sdk/models/shared/paymenttype.md @@ -1,17 +1,17 @@ -# PaymentType - -Type of payment. - -## Example Usage - -```typescript -import { PaymentType } from "@codat/lending/sdk/models/shared"; - -let value: PaymentType = "Cash"; -``` - -## Values - -```typescript -"Cash" | "Card" | "Invoice" | "OnlineCard" | "Swish" | "Vipps" | "Mobile" | "StoreCredit" | "Paypal" | "Custom" | "Prepaid" | "Unknown" +# PaymentType + +Type of payment. + +## Example Usage + +```typescript +import { PaymentType } from "@codat/lending/sdk/models/shared"; + +let value: PaymentType = "Cash"; +``` + +## Values + +```typescript +"Cash" | "Card" | "Invoice" | "OnlineCard" | "Swish" | "Vipps" | "Mobile" | "StoreCredit" | "Paypal" | "Custom" | "Prepaid" | "Unknown" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/periodunit.md b/lending/docs/sdk/models/shared/periodunit.md index 49a6a721e..21f853072 100644 --- a/lending/docs/sdk/models/shared/periodunit.md +++ b/lending/docs/sdk/models/shared/periodunit.md @@ -1,15 +1,15 @@ -# PeriodUnit - -## Example Usage - -```typescript -import { PeriodUnit } from "@codat/lending/sdk/models/shared"; - -let value: PeriodUnit = "Year"; -``` - -## Values - -```typescript -"Day" | "Week" | "Month" | "Year" +# PeriodUnit + +## Example Usage + +```typescript +import { PeriodUnit } from "@codat/lending/sdk/models/shared"; + +let value: PeriodUnit = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/phonenumber.md b/lending/docs/sdk/models/shared/phonenumber.md index a4bc66c25..098f359b3 100644 --- a/lending/docs/sdk/models/shared/phonenumber.md +++ b/lending/docs/sdk/models/shared/phonenumber.md @@ -1,19 +1,19 @@ -# PhoneNumber - -## Example Usage - -```typescript -import { PhoneNumber } from "@codat/lending/sdk/models/shared"; - -let value: PhoneNumber = { - number: "+44 25691 154789", - type: "Mobile", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `number` | *string* | :heavy_minus_sign: | A phone number. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | +# PhoneNumber + +## Example Usage + +```typescript +import { PhoneNumber } from "@codat/lending/sdk/models/shared"; + +let value: PhoneNumber = { + number: "+44 25691 154789", + type: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `number` | *string* | :heavy_minus_sign: | A phone number. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | | `type` | [shared.Type](../../../sdk/models/shared/type.md) | :heavy_check_mark: | The type of phone number | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/productinventory.md b/lending/docs/sdk/models/shared/productinventory.md index 1b8e64ad1..87a0ea0cf 100644 --- a/lending/docs/sdk/models/shared/productinventory.md +++ b/lending/docs/sdk/models/shared/productinventory.md @@ -1,26 +1,18 @@ -# ProductInventory - -Information about the total inventory as well as the locations inventory is in. - -## Example Usage - -```typescript -import { ProductInventory } from "@codat/lending/sdk/models/shared"; - -let value: ProductInventory = { - locations: [ - { - locationRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `totalQuantity` | *Decimal* | :heavy_minus_sign: | The total quantity of stock remaining across locations. | +# ProductInventory + +Information about the total inventory as well as the locations inventory is in. + +## Example Usage + +```typescript +import { ProductInventory } from "@codat/lending/sdk/models/shared"; + +let value: ProductInventory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `totalQuantity` | *Decimal | number* | :heavy_minus_sign: | The total quantity of stock remaining across locations. | | `locations` | [shared.ProductInventoryLocation](../../../sdk/models/shared/productinventorylocation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/productinventorylocation.md b/lending/docs/sdk/models/shared/productinventorylocation.md index ff235666d..261f348c4 100644 --- a/lending/docs/sdk/models/shared/productinventorylocation.md +++ b/lending/docs/sdk/models/shared/productinventorylocation.md @@ -1,20 +1,16 @@ -# ProductInventoryLocation - -## Example Usage - -```typescript -import { ProductInventoryLocation } from "@codat/lending/sdk/models/shared"; - -let value: ProductInventoryLocation = { - locationRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `quantity` | *Decimal* | :heavy_minus_sign: | The quantity of stock remaining at location. | +# ProductInventoryLocation + +## Example Usage + +```typescript +import { ProductInventoryLocation } from "@codat/lending/sdk/models/shared"; + +let value: ProductInventoryLocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `quantity` | *Decimal | number* | :heavy_minus_sign: | The quantity of stock remaining at location. | | `locationRef` | [shared.LocationRef](../../../sdk/models/shared/locationref.md) | :heavy_minus_sign: | Reference to the geographic location where the order was placed. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/productprice.md b/lending/docs/sdk/models/shared/productprice.md index 493d0a43f..5b6405705 100644 --- a/lending/docs/sdk/models/shared/productprice.md +++ b/lending/docs/sdk/models/shared/productprice.md @@ -1,18 +1,16 @@ -# ProductPrice - -## Example Usage - -```typescript -import { ProductPrice } from "@codat/lending/sdk/models/shared"; - -let value: ProductPrice = { - currency: "GBP", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `unitPrice` | *Decimal* | :heavy_minus_sign: | The product variant's unit price. | | \ No newline at end of file +# ProductPrice + +## Example Usage + +```typescript +import { ProductPrice } from "@codat/lending/sdk/models/shared"; + +let value: ProductPrice = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currency` | *string* | :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. | +| `unitPrice` | *Decimal | number* | :heavy_minus_sign: | The product variant's unit price. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/productref.md b/lending/docs/sdk/models/shared/productref.md index c2d3d09ea..62df0e8c6 100644 --- a/lending/docs/sdk/models/shared/productref.md +++ b/lending/docs/sdk/models/shared/productref.md @@ -1,20 +1,18 @@ -# ProductRef - -Reference that links the line item to the correct product details. - -## Example Usage - -```typescript -import { ProductRef } from "@codat/lending/sdk/models/shared"; - -let value: ProductRef = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier of the product being referenced. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_minus_sign: | Name of the product being referenced. | | \ No newline at end of file +# ProductRef + +Reference that links the line item to the correct product details. + +## Example Usage + +```typescript +import { ProductRef } from "@codat/lending/sdk/models/shared"; + +let value: ProductRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the product being referenced. | +| `name` | *string* | :heavy_minus_sign: | Name of the product being referenced. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/productvariant.md b/lending/docs/sdk/models/shared/productvariant.md index 2a331748e..1fe4a5c34 100644 --- a/lending/docs/sdk/models/shared/productvariant.md +++ b/lending/docs/sdk/models/shared/productvariant.md @@ -1,56 +1,30 @@ -# ProductVariant - -Represents a variation of a product available for sale, for example an item of clothing that may be available for sale in multiple sizes and colors. - - -## Example Usage - -```typescript -import { ProductVariant } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: ProductVariant = { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - name: "Red Coat", - sku: "Coat-Red-Lrg", - barcode: "564158468416486458646886484", - unitOfMeasure: "kg", - vatPercentage: new Decimal("12.5"), - prices: [ - { - currency: "GBP", - }, - ], - inventory: { - locations: [ - { - locationRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }, - }, - ], - }, - createdDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_minus_sign: | Name of the product recorded in the commerce or point of sale platform. | **Example 1:** Red Coat
**Example 2:** Black Coat
**Example 3:** Large Brown Hat | -| `isTaxEnabled` | *boolean* | :heavy_minus_sign: | Whether sales taxes are enabled for this product variant. | | -| `sku` | *string* | :heavy_minus_sign: | SKU (stock keeping unit) of the variant, as defined by the merchant. | **Example 1:** Coat-Red-Lrg
**Example 2:** Coat-Black-Md
**Example 3:** LargeBrownHat
**Example 4:** A725BA2 | -| `barcode` | *string* | :heavy_minus_sign: | Unique product number of the variant. This might be a barcode, UPC, ISBN, etc. | **Example 1:** 564158468416486458646886484
**Example 2:** CSE370 | -| `unitOfMeasure` | *string* | :heavy_minus_sign: | Unit of measure for the variant, such as `kg` or `meters`. | **Example 1:** kg
**Example 2:** m
**Example 3:** meters | -| `vatPercentage` | *Decimal* | :heavy_minus_sign: | VAT rate for the product variant if sales taxes are enabled. | **Example 1:** 12.5
**Example 2:** 0
**Example 3:** 20 | -| `prices` | [shared.ProductPrice](../../../sdk/models/shared/productprice.md)[] | :heavy_minus_sign: | Prices for the product variants in different currencies. | | -| `inventory` | [shared.ProductInventory](../../../sdk/models/shared/productinventory.md) | :heavy_minus_sign: | Information about the total inventory as well as the locations inventory is in. | | -| `shippingRequired` | *boolean* | :heavy_minus_sign: | Indicates whether or not the product requires physical delivery. | | -| `status` | [shared.ProductVariantStatus](../../../sdk/models/shared/productvariantstatus.md) | :heavy_minus_sign: | The status of the product variant. | | -| `createdDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# ProductVariant + +Represents a variation of a product available for sale, for example an item of clothing that may be available for sale in multiple sizes and colors. + +## Example Usage + +```typescript +import { ProductVariant } from "@codat/lending/sdk/models/shared"; + +let value: ProductVariant = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | A unique, persistent identifier for this record | +| `createdDate` | *string* | :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. | +| `modifiedDate` | *string* | :heavy_minus_sign: | The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The accounting software does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records

In Codat's data model, dates and times are represented using the ISO 8601 standard. | +| `name` | *string* | :heavy_minus_sign: | Name of the product recorded in the commerce or point of sale platform. | +| `isTaxEnabled` | *boolean* | :heavy_minus_sign: | Whether sales taxes are enabled for this product variant. | +| `sku` | *string* | :heavy_minus_sign: | SKU (stock keeping unit) of the variant, as defined by the merchant. | +| `barcode` | *string* | :heavy_minus_sign: | Unique product number of the variant. This might be a barcode, UPC, ISBN, etc. | +| `unitOfMeasure` | *string* | :heavy_minus_sign: | Unit of measure for the variant, such as `kg` or `meters`. | +| `vatPercentage` | *Decimal | number* | :heavy_minus_sign: | VAT rate for the product variant if sales taxes are enabled. | +| `prices` | [shared.ProductPrice](../../../sdk/models/shared/productprice.md)[] | :heavy_minus_sign: | Prices for the product variants in different currencies. | +| `inventory` | [shared.ProductInventory](../../../sdk/models/shared/productinventory.md) | :heavy_minus_sign: | N/A | +| `shippingRequired` | *boolean* | :heavy_minus_sign: | Indicates whether or not the product requires physical delivery. | +| `status` | [shared.ProductVariantStatus](../../../sdk/models/shared/productvariantstatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/productvariantref.md b/lending/docs/sdk/models/shared/productvariantref.md index 40e3d1673..b05bdd191 100644 --- a/lending/docs/sdk/models/shared/productvariantref.md +++ b/lending/docs/sdk/models/shared/productvariantref.md @@ -1,20 +1,18 @@ -# ProductVariantRef - -Reference that links the line item to the specific version of product that has been ordered. - -## Example Usage - -```typescript -import { ProductVariantRef } from "@codat/lending/sdk/models/shared"; - -let value: ProductVariantRef = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier of the product variant being referenced. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_minus_sign: | Name of the product variant being referenced. | | \ No newline at end of file +# ProductVariantRef + +Reference that links the line item to the specific version of product that has been ordered. + +## Example Usage + +```typescript +import { ProductVariantRef } from "@codat/lending/sdk/models/shared"; + +let value: ProductVariantRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the product variant being referenced. | +| `name` | *string* | :heavy_minus_sign: | Name of the product variant being referenced. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/productvariantstatus.md b/lending/docs/sdk/models/shared/productvariantstatus.md index 0f1412a51..53e53cbab 100644 --- a/lending/docs/sdk/models/shared/productvariantstatus.md +++ b/lending/docs/sdk/models/shared/productvariantstatus.md @@ -1,17 +1,17 @@ -# ProductVariantStatus - -The status of the product variant. - -## Example Usage - -```typescript -import { ProductVariantStatus } from "@codat/lending/sdk/models/shared"; - -let value: ProductVariantStatus = "Unknown"; -``` - -## Values - -```typescript -"Unknown" | "Published" | "Unpublished" +# ProductVariantStatus + +The status of the product variant. + +## Example Usage + +```typescript +import { ProductVariantStatus } from "@codat/lending/sdk/models/shared"; + +let value: ProductVariantStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Published" | "Unpublished" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/profitandlossreport.md b/lending/docs/sdk/models/shared/profitandlossreport.md index 9cfd49686..b3c10a405 100644 --- a/lending/docs/sdk/models/shared/profitandlossreport.md +++ b/lending/docs/sdk/models/shared/profitandlossreport.md @@ -1,33 +1,25 @@ -# ProfitAndLossReport - -## Example Usage - -```typescript -import { ProfitAndLossReport } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: ProfitAndLossReport = { - fromDate: "2022-10-23T00:00:00Z", - toDate: "2022-10-23T00:00:00Z", - grossProfit: new Decimal("3249.39"), - netOperatingProfit: new Decimal("4663.39"), - netOtherIncome: new Decimal("2825.57"), - netProfit: new Decimal("6242.2"), -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fromDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `toDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `income` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `costOfSales` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `grossProfit` | *Decimal* | :heavy_check_mark: | Gross profit of the company in the given date range. | | -| `expenses` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `netOperatingProfit` | *Decimal* | :heavy_check_mark: | Net operating profit of the company in the given date range. | | -| `otherExpenses` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `otherIncome` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `netOtherIncome` | *Decimal* | :heavy_check_mark: | Net other income of the company in the given date range. | | -| `netProfit` | *Decimal* | :heavy_check_mark: | Net profit of the company in the given date range. | | \ No newline at end of file +# ProfitAndLossReport + +## Example Usage + +```typescript +import { ProfitAndLossReport } from "@codat/lending/sdk/models/shared"; + +let value: ProfitAndLossReport = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `fromDate` | *string* | :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. | +| `toDate` | *string* | :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. | +| `income` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLine items for income in the given date range. | +| `costOfSales` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLine items for cost of sales in the given date range. | +| `grossProfit` | *Decimal | number* | :heavy_check_mark: | Gross profit of the company in the given date range. | +| `expenses` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLine items for expenses in the given date range. | +| `netOperatingProfit` | *Decimal | number* | :heavy_check_mark: | Net operating profit of the company in the given date range. | +| `otherExpenses` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLine items for other expenses in the given date range. | +| `otherIncome` | [shared.ReportLine](../../../sdk/models/shared/reportline.md) | :heavy_minus_sign: | ReportLine items for other income in the given date range. | +| `netOtherIncome` | *Decimal | number* | :heavy_check_mark: | Net other income of the company in the given date range. | +| `netProfit` | *Decimal | number* | :heavy_check_mark: | Net profit of the company in the given date range. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/projectref.md b/lending/docs/sdk/models/shared/projectref.md index c7e3be4b1..c49039e2d 100644 --- a/lending/docs/sdk/models/shared/projectref.md +++ b/lending/docs/sdk/models/shared/projectref.md @@ -1,18 +1,18 @@ -# ProjectRef - -## Example Usage - -```typescript -import { ProjectRef } from "@codat/lending/sdk/models/shared"; - -let value: ProjectRef = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier to the project reference. | +# ProjectRef + +## Example Usage + +```typescript +import { ProjectRef } from "@codat/lending/sdk/models/shared"; + +let value: ProjectRef = { + id: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier to the project reference. | | `name` | *string* | :heavy_minus_sign: | The project's name. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/propertieaccounttype.md b/lending/docs/sdk/models/shared/propertieaccounttype.md index 7ebe4fda3..2d89d6394 100644 --- a/lending/docs/sdk/models/shared/propertieaccounttype.md +++ b/lending/docs/sdk/models/shared/propertieaccounttype.md @@ -1,17 +1,15 @@ -# PropertieAccountType - -The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. - -## Example Usage - -```typescript -import { PropertieAccountType } from "@codat/lending/sdk/models/shared"; - -let value: PropertieAccountType = "checking"; -``` - -## Values - -```typescript -"checking" | "savings" | "loan" | "creditCard" | "prepaidCard" +# PropertieAccountType + +## Example Usage + +```typescript +import { PropertieAccountType } from "@codat/lending/sdk/models/shared"; + +let value: PropertieAccountType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/propertiedatatype.md b/lending/docs/sdk/models/shared/propertiedatatype.md index f699ea9a2..147399f66 100644 --- a/lending/docs/sdk/models/shared/propertiedatatype.md +++ b/lending/docs/sdk/models/shared/propertiedatatype.md @@ -1,17 +1,15 @@ -# PropertieDataType - -Available data types - -## Example Usage - -```typescript -import { PropertieDataType } from "@codat/lending/sdk/models/shared"; - -let value: PropertieDataType = "invoices"; -``` - -## Values - -```typescript -"accountTransactions" | "balanceSheet" | "bankAccounts" | "bankTransactions" | "billCreditNotes" | "billPayments" | "bills" | "cashFlowStatement" | "chartOfAccounts" | "company" | "creditNotes" | "customers" | "directCosts" | "directIncomes" | "invoices" | "itemReceipts" | "items" | "journalEntries" | "journals" | "paymentMethods" | "payments" | "profitAndLoss" | "purchaseOrders" | "salesOrders" | "suppliers" | "taxRates" | "trackingCategories" | "transfers" | "banking-accountBalances" | "banking-accounts" | "banking-transactionCategories" | "banking-transactions" | "commerce-companyInfo" | "commerce-customers" | "commerce-disputes" | "commerce-locations" | "commerce-orders" | "commerce-paymentMethods" | "commerce-payments" | "commerce-productCategories" | "commerce-products" | "commerce-taxComponents" | "commerce-transactions" +# PropertieDataType + +## Example Usage + +```typescript +import { PropertieDataType } from "@codat/lending/sdk/models/shared"; + +let value: PropertieDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/propertieitemref.md b/lending/docs/sdk/models/shared/propertieitemref.md index 9c73211fc..ee8635e59 100644 --- a/lending/docs/sdk/models/shared/propertieitemref.md +++ b/lending/docs/sdk/models/shared/propertieitemref.md @@ -1,20 +1,16 @@ -# PropertieItemRef - -Reference to the item the line is linked to. - -## Example Usage - -```typescript -import { PropertieItemRef } from "@codat/lending/sdk/models/shared"; - -let value: PropertieItemRef = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the item in the accounting software. | -| `name` | *string* | :heavy_minus_sign: | Name of the item in the accounting software. | \ No newline at end of file +# PropertieItemRef + +## Example Usage + +```typescript +import { PropertieItemRef } from "@codat/lending/sdk/models/shared"; + +let value: PropertieItemRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pulloperation.md b/lending/docs/sdk/models/shared/pulloperation.md index 729f7da81..b204df6c2 100644 --- a/lending/docs/sdk/models/shared/pulloperation.md +++ b/lending/docs/sdk/models/shared/pulloperation.md @@ -1,40 +1,40 @@ -# PullOperation - -Information about a queued, in progress or completed pull operation. -*Formally called `dataset`* - -## Example Usage - -```typescript -import { PullOperation } from "@codat/lending/sdk/models/shared"; - -let value: PullOperation = { - id: "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b", - companyId: "4645bd78-8988-45bc-ac9e-67ba5df6e4e5", - connectionId: "51baa045-4836-4317-a42e-3542e991e581", - dataType: "invoices", - status: "Initial", - statusDescription: "Paused until 2022-10-23T00:00:00.000Z", - requested: "2022-11-14T11:18:37.2798351Z", - progress: 10, - isCompleted: false, - isErrored: false, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier of the pull operation. | 943accd0-4247-42d8-865b-363c8629e1da | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier of the company associated to this pull operation. | 22ece347-e5f6-4896-95e0-35a4c7f17023 | -| `connectionId` | *string* | :heavy_check_mark: | Unique identifier of the connection associated to this pull operation. | 50830828-7d39-4367-b0eb-5ddb2de5faa5 | -| `dataType` | *string* | :heavy_check_mark: | The data type you are requesting in a pull operation. | | -| `status` | [shared.DatasetStatus](../../../sdk/models/shared/datasetstatus.md) | :heavy_check_mark: | The current status of the dataset. | | -| `statusDescription` | *string* | :heavy_minus_sign: | Additional information about the dataset status. | Paused until 2022-10-23T00:00:00.000Z | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about a transient or persistent error returned by Codat or the source platform. | | -| `requested` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completed` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `progress` | *number* | :heavy_check_mark: | An integer signifying the progress of the pull operation. | | -| `isCompleted` | *boolean* | :heavy_check_mark: | `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. | | +# PullOperation + +Information about a queued, in progress or completed pull operation. +*Formally called `dataset`* + +## Example Usage + +```typescript +import { PullOperation } from "@codat/lending/sdk/models/shared"; + +let value: PullOperation = { + id: "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b", + companyId: "4645bd78-8988-45bc-ac9e-67ba5df6e4e5", + connectionId: "51baa045-4836-4317-a42e-3542e991e581", + dataType: "invoices", + status: "Initial", + statusDescription: "Paused until 2022-10-23T00:00:00.000Z", + requested: "2022-11-14T11:18:37.2798351Z", + progress: 10, + isCompleted: false, + isErrored: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier of the pull operation. | 943accd0-4247-42d8-865b-363c8629e1da | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier of the company associated to this pull operation. | 22ece347-e5f6-4896-95e0-35a4c7f17023 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier of the connection associated to this pull operation. | 50830828-7d39-4367-b0eb-5ddb2de5faa5 | +| `dataType` | *string* | :heavy_check_mark: | The data type you are requesting in a pull operation. | | +| `status` | [shared.DatasetStatus](../../../sdk/models/shared/datasetstatus.md) | :heavy_check_mark: | The current status of the dataset. | | +| `statusDescription` | *string* | :heavy_minus_sign: | Additional information about the dataset status. | Paused until 2022-10-23T00:00:00.000Z | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about a transient or persistent error returned by Codat or the source platform. | | +| `requested` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completed` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `progress` | *number* | :heavy_check_mark: | An integer signifying the progress of the pull operation. | | +| `isCompleted` | *boolean* | :heavy_check_mark: | `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. | | | `isErrored` | *boolean* | :heavy_check_mark: | `True` if the pull operation entered an error state. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pulloperations.md b/lending/docs/sdk/models/shared/pulloperations.md index c93472070..f7568a232 100644 --- a/lending/docs/sdk/models/shared/pulloperations.md +++ b/lending/docs/sdk/models/shared/pulloperations.md @@ -1,31 +1,23 @@ -# PullOperations - -## Example Usage - -```typescript -import { PullOperations } from "@codat/lending/sdk/models/shared"; - -let value: PullOperations = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.PullOperation](../../../sdk/models/shared/pulloperation.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# PullOperations + +## Example Usage + +```typescript +import { PullOperations } from "@codat/lending/sdk/models/shared"; + +let value: PullOperations = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.PullOperation](../../../sdk/models/shared/pulloperation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/purchaseorderreference.md b/lending/docs/sdk/models/shared/purchaseorderreference.md index 288a9eb7b..2678b35ad 100644 --- a/lending/docs/sdk/models/shared/purchaseorderreference.md +++ b/lending/docs/sdk/models/shared/purchaseorderreference.md @@ -1,16 +1,16 @@ -# PurchaseOrderReference - -## Example Usage - -```typescript -import { PurchaseOrderReference } from "@codat/lending/sdk/models/shared"; - -let value: PurchaseOrderReference = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Identifier for the purchase order, unique for the company in the accounting software. | +# PurchaseOrderReference + +## Example Usage + +```typescript +import { PurchaseOrderReference } from "@codat/lending/sdk/models/shared"; + +let value: PurchaseOrderReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Identifier for the purchase order, unique for the company in the accounting software. | | `purchaseOrderNumber` | *string* | :heavy_minus_sign: | Friendly reference for the purchase order, commonly generated by the accounting software. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushchangetype.md b/lending/docs/sdk/models/shared/pushchangetype.md index ac21ca3ce..b93fe7459 100644 --- a/lending/docs/sdk/models/shared/pushchangetype.md +++ b/lending/docs/sdk/models/shared/pushchangetype.md @@ -1,17 +1,17 @@ -# PushChangeType - -Type of change being applied to record in third party platform. - -## Example Usage - -```typescript -import { PushChangeType } from "@codat/lending/sdk/models/shared"; - -let value: PushChangeType = "Created"; -``` - -## Values - -```typescript -"Unknown" | "Created" | "Modified" | "Deleted" | "AttachmentUploaded" +# PushChangeType + +Type of change being applied to record in third party platform. + +## Example Usage + +```typescript +import { PushChangeType } from "@codat/lending/sdk/models/shared"; + +let value: PushChangeType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Created" | "Modified" | "Deleted" | "AttachmentUploaded" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushfieldvalidation.md b/lending/docs/sdk/models/shared/pushfieldvalidation.md index ed2349630..cd714b6a7 100644 --- a/lending/docs/sdk/models/shared/pushfieldvalidation.md +++ b/lending/docs/sdk/models/shared/pushfieldvalidation.md @@ -1,19 +1,19 @@ -# PushFieldValidation - -## Example Usage - -```typescript -import { PushFieldValidation } from "@codat/lending/sdk/models/shared"; - -let value: PushFieldValidation = { - details: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `field` | *string* | :heavy_minus_sign: | Field name that resulted in the validation issue. | -| `details` | *string* | :heavy_check_mark: | Details on the validation issue. | +# PushFieldValidation + +## Example Usage + +```typescript +import { PushFieldValidation } from "@codat/lending/sdk/models/shared"; + +let value: PushFieldValidation = { + details: "string", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `field` | *string* | :heavy_minus_sign: | Field name that resulted in the validation issue. | +| `details` | *string* | :heavy_check_mark: | Details on the validation issue. | | `ref` | *string* | :heavy_minus_sign: | Unique reference identifier for the validation issue. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoperation.md b/lending/docs/sdk/models/shared/pushoperation.md index dbe5dc5ce..73d6ec3c2 100644 --- a/lending/docs/sdk/models/shared/pushoperation.md +++ b/lending/docs/sdk/models/shared/pushoperation.md @@ -1,37 +1,36 @@ -# PushOperation - -## Example Usage - -```typescript -import { PushOperation } from "@codat/lending/sdk/models/shared"; - -let value: PushOperation = { - changes: null, - dataType: "invoices", - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "9c39f707-db6c-421b-b270-d82fde811810", - dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestedOnUtc: "2022-10-23T00:00:00Z", - completedOnUtc: "2022-10-23T00:00:00Z", - status: "Failed", - statusCode: 143409, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `pushOperationKey` | *string* | :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. | | -| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | -| `validation` | [shared.Validation](../../../sdk/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. | | +# PushOperation + +## Example Usage + +```typescript +import { PushOperation } from "@codat/lending/sdk/models/shared"; + +let value: PushOperation = { + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "string", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "string", + statusCode: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :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. | | +| `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/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. | | | `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoperationchange.md b/lending/docs/sdk/models/shared/pushoperationchange.md index ebdfc13f9..a9d756ac3 100644 --- a/lending/docs/sdk/models/shared/pushoperationchange.md +++ b/lending/docs/sdk/models/shared/pushoperationchange.md @@ -1,21 +1,17 @@ -# PushOperationChange - -## Example Usage - -```typescript -import { PushOperationChange } from "@codat/lending/sdk/models/shared"; - -let value: PushOperationChange = { - recordRef: { - dataType: "invoices", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `type` | [shared.PushChangeType](../../../sdk/models/shared/pushchangetype.md) | :heavy_minus_sign: | Type of change being applied to record in third party platform. | -| `recordRef` | [shared.PushOperationRef](../../../sdk/models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A | +# PushOperationChange + +## Example Usage + +```typescript +import { PushOperationChange } from "@codat/lending/sdk/models/shared"; + +let value: PushOperationChange = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `type` | [shared.PushChangeType](../../../sdk/models/shared/pushchangetype.md) | :heavy_minus_sign: | N/A | +| `recordRef` | [shared.PushOperationRef](../../../sdk/models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A | | `attachmentId` | *string* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoperationref.md b/lending/docs/sdk/models/shared/pushoperationref.md index 2d78c7e12..581a97f6e 100644 --- a/lending/docs/sdk/models/shared/pushoperationref.md +++ b/lending/docs/sdk/models/shared/pushoperationref.md @@ -1,18 +1,16 @@ -# PushOperationRef - -## Example Usage - -```typescript -import { PushOperationRef } from "@codat/lending/sdk/models/shared"; - -let value: PushOperationRef = { - dataType: "invoices", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for a push operation. | | -| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | \ No newline at end of file +# PushOperationRef + +## Example Usage + +```typescript +import { PushOperationRef } from "@codat/lending/sdk/models/shared"; + +let value: PushOperationRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for a push operation. | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoperations.md b/lending/docs/sdk/models/shared/pushoperations.md index f2e0fdb77..022351e04 100644 --- a/lending/docs/sdk/models/shared/pushoperations.md +++ b/lending/docs/sdk/models/shared/pushoperations.md @@ -1,31 +1,23 @@ -# PushOperations - -## Example Usage - -```typescript -import { PushOperations } from "@codat/lending/sdk/models/shared"; - -let value: PushOperations = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.PushOperation](../../../sdk/models/shared/pushoperation.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# PushOperations + +## Example Usage + +```typescript +import { PushOperations } from "@codat/lending/sdk/models/shared"; + +let value: PushOperations = { + pageNumber: 0, + pageSize: 0, + totalResults: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.PushOperation](../../../sdk/models/shared/pushoperation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoperationstatus.md b/lending/docs/sdk/models/shared/pushoperationstatus.md index 1d66b4c51..71b47253b 100644 --- a/lending/docs/sdk/models/shared/pushoperationstatus.md +++ b/lending/docs/sdk/models/shared/pushoperationstatus.md @@ -1,17 +1,17 @@ -# PushOperationStatus - -The current status of the push operation. - -## Example Usage - -```typescript -import { PushOperationStatus } from "@codat/lending/sdk/models/shared"; - -let value: PushOperationStatus = "Failed"; -``` - -## Values - -```typescript -"Pending" | "Failed" | "Success" | "TimedOut" +# PushOperationStatus + +The current status of the push operation. + +## Example Usage + +```typescript +import { PushOperationStatus } from "@codat/lending/sdk/models/shared"; + +let value: PushOperationStatus = "Pending"; +``` + +## Values + +```typescript +"Pending" | "Failed" | "Success" | "TimedOut" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoption.md b/lending/docs/sdk/models/shared/pushoption.md index f15b51b8f..9d47db8ef 100644 --- a/lending/docs/sdk/models/shared/pushoption.md +++ b/lending/docs/sdk/models/shared/pushoption.md @@ -1,25 +1,25 @@ -# PushOption - -## Example Usage - -```typescript -import { PushOption } from "@codat/lending/sdk/models/shared"; - -let value: PushOption = { - type: "MultiPart", - displayName: "Travis.Ebert-Fahey", - required: false, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | -| `displayName` | *string* | :heavy_check_mark: | The property's display name. | -| `description` | *string* | :heavy_minus_sign: | A description of the property. | -| `required` | *boolean* | :heavy_check_mark: | The property is required if `True`. | -| `properties` | Record | :heavy_minus_sign: | N/A | -| `options` | [shared.PushOptionChoice](../../../sdk/models/shared/pushoptionchoice.md)[] | :heavy_minus_sign: | N/A | +# PushOption + +## Example Usage + +```typescript +import { PushOption } from "@codat/lending/sdk/models/shared"; + +let value: PushOption = { + type: "string", + displayName: "string", + required: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | +| `displayName` | *string* | :heavy_check_mark: | The property's display name. | +| `description` | *string* | :heavy_minus_sign: | A description of the property. | +| `required` | *boolean* | :heavy_check_mark: | The property is required if `True`. | +| `properties` | Record | :heavy_minus_sign: | N/A | +| `options` | [shared.PushOptionChoice](../../../sdk/models/shared/pushoptionchoice.md)[] | :heavy_minus_sign: | N/A | | `validation` | [shared.PushValidationInfo](../../../sdk/models/shared/pushvalidationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoptionchoice.md b/lending/docs/sdk/models/shared/pushoptionchoice.md index 5c77d3bec..1b7bc0013 100644 --- a/lending/docs/sdk/models/shared/pushoptionchoice.md +++ b/lending/docs/sdk/models/shared/pushoptionchoice.md @@ -1,19 +1,19 @@ -# PushOptionChoice - -## Example Usage - -```typescript -import { PushOptionChoice } from "@codat/lending/sdk/models/shared"; - -let value: PushOptionChoice = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `value` | *string* | :heavy_minus_sign: | Allowed value for field. | -| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_minus_sign: | The option type. | -| `displayName` | *string* | :heavy_minus_sign: | The property's display name. | -| `description` | *string* | :heavy_minus_sign: | A description of the property. | +# PushOptionChoice + +## Example Usage + +```typescript +import { PushOptionChoice } from "@codat/lending/sdk/models/shared"; + +let value: PushOptionChoice = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `value` | *string* | :heavy_minus_sign: | Allowed value for field. | +| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_minus_sign: | The option type. | +| `displayName` | *string* | :heavy_minus_sign: | The property's display name. | +| `description` | *string* | :heavy_minus_sign: | A description of the property. | | `required` | *boolean* | :heavy_minus_sign: | The property is required if `True`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoptionproperty.md b/lending/docs/sdk/models/shared/pushoptionproperty.md index 34f23ec21..d8ac260cb 100644 --- a/lending/docs/sdk/models/shared/pushoptionproperty.md +++ b/lending/docs/sdk/models/shared/pushoptionproperty.md @@ -1,27 +1,26 @@ -# PushOptionProperty - -## Example Usage - -```typescript -import { PushOptionProperty } from "@codat/lending/sdk/models/shared"; - -let value: PushOptionProperty = { - type: "Array", - displayName: "Fannie10", - description: - "sonar very sympathetically notwithstanding alarmed modulo grizzled", - required: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | -| `displayName` | *string* | :heavy_check_mark: | The property's display name. | -| `description` | *string* | :heavy_check_mark: | A description of the property. | -| `required` | *boolean* | :heavy_check_mark: | The property is required if `True`. | -| `properties` | Record | :heavy_minus_sign: | N/A | -| `options` | [shared.PushOptionChoice](../../../sdk/models/shared/pushoptionchoice.md)[] | :heavy_minus_sign: | N/A | +# PushOptionProperty + +## Example Usage + +```typescript +import { PushOptionProperty } from "@codat/lending/sdk/models/shared"; + +let value: PushOptionProperty = { + type: "string", + displayName: "string", + description: "string", + required: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | +| `displayName` | *string* | :heavy_check_mark: | The property's display name. | +| `description` | *string* | :heavy_check_mark: | A description of the property. | +| `required` | *boolean* | :heavy_check_mark: | The property is required if `True`. | +| `properties` | Record | :heavy_minus_sign: | N/A | +| `options` | [shared.PushOptionChoice](../../../sdk/models/shared/pushoptionchoice.md)[] | :heavy_minus_sign: | N/A | | `validation` | [shared.PushValidationInfo](../../../sdk/models/shared/pushvalidationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushoptiontype.md b/lending/docs/sdk/models/shared/pushoptiontype.md index 36de13745..d79823194 100644 --- a/lending/docs/sdk/models/shared/pushoptiontype.md +++ b/lending/docs/sdk/models/shared/pushoptiontype.md @@ -1,17 +1,17 @@ -# PushOptionType - -The option type. - -## Example Usage - -```typescript -import { PushOptionType } from "@codat/lending/sdk/models/shared"; - -let value: PushOptionType = "DateTime"; -``` - -## Values - -```typescript -"Array" | "Object" | "String" | "Number" | "Boolean" | "DateTime" | "File" | "MultiPart" +# PushOptionType + +The option type. + +## Example Usage + +```typescript +import { PushOptionType } from "@codat/lending/sdk/models/shared"; + +let value: PushOptionType = "Array"; +``` + +## Values + +```typescript +"Array" | "Object" | "String" | "Number" | "Boolean" | "DateTime" | "File" | "MultiPart" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/pushvalidationinfo.md b/lending/docs/sdk/models/shared/pushvalidationinfo.md index 3901ee394..6c2a50d99 100644 --- a/lending/docs/sdk/models/shared/pushvalidationinfo.md +++ b/lending/docs/sdk/models/shared/pushvalidationinfo.md @@ -1,16 +1,16 @@ -# PushValidationInfo - -## Example Usage - -```typescript -import { PushValidationInfo } from "@codat/lending/sdk/models/shared"; - -let value: PushValidationInfo = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `warnings` | [shared.PushFieldValidation](../../../sdk/models/shared/pushfieldvalidation.md)[] | :heavy_minus_sign: | N/A | +# PushValidationInfo + +## Example Usage + +```typescript +import { PushValidationInfo } from "@codat/lending/sdk/models/shared"; + +let value: PushValidationInfo = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `warnings` | [shared.PushFieldValidation](../../../sdk/models/shared/pushfieldvalidation.md)[] | :heavy_minus_sign: | N/A | | `information` | [shared.PushFieldValidation](../../../sdk/models/shared/pushfieldvalidation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/recordlinereference.md b/lending/docs/sdk/models/shared/recordlinereference.md index 4d470eaa6..adaaec5b7 100644 --- a/lending/docs/sdk/models/shared/recordlinereference.md +++ b/lending/docs/sdk/models/shared/recordlinereference.md @@ -1,19 +1,21 @@ -# RecordLineReference - -Reference to the purchase order line this line was generated from. - -## Example Usage - -```typescript -import { RecordLineReference } from "@codat/lending/sdk/models/shared"; - -let value: RecordLineReference = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record. | -| `dataType` | [shared.BillLineItemDataType](../../../sdk/models/shared/billlineitemdatatype.md) | :heavy_minus_sign: | Allowed name of the 'dataType'. | +# RecordLineReference + +Links the current record line to the underlying record line that created it. + +For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. + +## Example Usage + +```typescript +import { RecordLineReference } from "@codat/lending/sdk/models/shared"; + +let value: RecordLineReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record. | +| `dataType` | [shared.BillLineItemDataType](../../../sdk/models/shared/billlineitemdatatype.md) | :heavy_minus_sign: | Allowed name of the 'dataType'. | | `lineNumber` | *string* | :heavy_minus_sign: | Line number of the underlying record. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportbasis.md b/lending/docs/sdk/models/shared/reportbasis.md index dbb866584..f4feaba3f 100644 --- a/lending/docs/sdk/models/shared/reportbasis.md +++ b/lending/docs/sdk/models/shared/reportbasis.md @@ -1,17 +1,17 @@ -# ReportBasis - -The basis of a report. - -## Example Usage - -```typescript -import { ReportBasis } from "@codat/lending/sdk/models/shared"; - -let value: ReportBasis = "Cash"; -``` - -## Values - -```typescript -"Unknown" | "Accrual" | "Cash" +# ReportBasis + +Accounting method used when aggregating the report data. In this case, `Cash`. + +## Example Usage + +```typescript +import { ReportBasis } from "@codat/lending/sdk/models/shared"; + +let value: ReportBasis = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Accrual" | "Cash" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportcomponentmeasure.md b/lending/docs/sdk/models/shared/reportcomponentmeasure.md index 192c4551b..a346cf1de 100644 --- a/lending/docs/sdk/models/shared/reportcomponentmeasure.md +++ b/lending/docs/sdk/models/shared/reportcomponentmeasure.md @@ -1,17 +1,17 @@ -# ReportComponentMeasure - -## Example Usage - -```typescript -import { ReportComponentMeasure } from "@codat/lending/sdk/models/shared"; - -let value: ReportComponentMeasure = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `index` | *number* | :heavy_minus_sign: | The measure's index. | -| `measureDisplayName` | *string* | :heavy_minus_sign: | The measure's display name. | -| `value` | *Decimal* | :heavy_minus_sign: | The measure's value. | \ No newline at end of file +# ReportComponentMeasure + +## Example Usage + +```typescript +import { ReportComponentMeasure } from "@codat/lending/sdk/models/shared"; + +let value: ReportComponentMeasure = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `index` | *number* | :heavy_minus_sign: | The measure's index. | +| `measureDisplayName` | *string* | :heavy_minus_sign: | The measure's display name. | +| `value` | *Decimal | number* | :heavy_minus_sign: | The measure's value. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportgenerationpayload.md b/lending/docs/sdk/models/shared/reportgenerationpayload.md index 451f9f6cf..902eed93f 100644 --- a/lending/docs/sdk/models/shared/reportgenerationpayload.md +++ b/lending/docs/sdk/models/shared/reportgenerationpayload.md @@ -1,23 +1,16 @@ -# ReportGenerationPayload - -## Example Usage - -```typescript -import { ReportGenerationPayload } from "@codat/lending/sdk/models/shared"; - -let value: ReportGenerationPayload = { - id: "a78e2625-7190-4d94-ae3b-071320451026", - referenceCompany: { - id: "8a210b68-6988-11ed-a1eb-0242ac120002", - name: "Codat Ltd.", - description: "Requested early access to the new financing scheme.", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the report. | a78e2625-7190-4d94-ae3b-071320451026 | -| `referenceCompany` | [shared.CompanyReference](../../../sdk/models/shared/companyreference.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# ReportGenerationPayload + +## Example Usage + +```typescript +import { ReportGenerationPayload } from "@codat/lending/sdk/models/shared"; + +let value: ReportGenerationPayload = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `referenceCompany` | [shared.CompanyReference](../../../sdk/models/shared/companyreference.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportinfo.md b/lending/docs/sdk/models/shared/reportinfo.md index 6ce2d7a22..455f97f85 100644 --- a/lending/docs/sdk/models/shared/reportinfo.md +++ b/lending/docs/sdk/models/shared/reportinfo.md @@ -1,22 +1,22 @@ -# ReportInfo - -Report additional information, which is specific to Lending reports. - -## Example Usage - -```typescript -import { ReportInfo } from "@codat/lending/sdk/models/shared"; - -let value: ReportInfo = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `pageNumber` | *number* | :heavy_minus_sign: | The number of the page queried. | -| `pageSize` | *number* | :heavy_minus_sign: | The number of transactions returned per page. | -| `totalResults` | *number* | :heavy_minus_sign: | The total number of transactions available for a company for the period specified in the query string. | -| `reportName` | *string* | :heavy_minus_sign: | Name of the report. | -| `companyName` | *string* | :heavy_minus_sign: | The name of the company being queried. | +# ReportInfo + +Report additional information, which is specific to Lending reports. + +## Example Usage + +```typescript +import { ReportInfo } from "@codat/lending/sdk/models/shared"; + +let value: ReportInfo = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `pageNumber` | *number* | :heavy_minus_sign: | The number of the page queried. | +| `pageSize` | *number* | :heavy_minus_sign: | The number of transactions returned per page. | +| `totalResults` | *number* | :heavy_minus_sign: | The total number of transactions available for a company for the period specified in the query string. | +| `reportName` | *string* | :heavy_minus_sign: | Name of the report. | +| `companyName` | *string* | :heavy_minus_sign: | The name of the company being queried. | | `generatedDate` | *string* | :heavy_minus_sign: | Date the report was generated. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportinput.md b/lending/docs/sdk/models/shared/reportinput.md index d2252b2cc..c57fc5fea 100644 --- a/lending/docs/sdk/models/shared/reportinput.md +++ b/lending/docs/sdk/models/shared/reportinput.md @@ -1,17 +1,17 @@ -# ReportInput - -Accounting method used to prepare the cash flow statement. - -## Example Usage - -```typescript -import { ReportInput } from "@codat/lending/sdk/models/shared"; - -let value: ReportInput = "Indirect"; -``` - -## Values - -```typescript -"Unknown" | "Indirect" | "Direct" +# ReportInput + +Accounting method used to prepare the cash flow statement. + +## Example Usage + +```typescript +import { ReportInput } from "@codat/lending/sdk/models/shared"; + +let value: ReportInput = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Indirect" | "Direct" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportitem.md b/lending/docs/sdk/models/shared/reportitem.md index 4d594bfd5..f734bd72b 100644 --- a/lending/docs/sdk/models/shared/reportitem.md +++ b/lending/docs/sdk/models/shared/reportitem.md @@ -1,21 +1,21 @@ -# ReportItem - -## Example Usage - -```typescript -import { ReportItem } from "@codat/lending/sdk/models/shared"; - -let value: ReportItem = { - date: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `balance` | *Decimal* | :heavy_minus_sign: | Balance of the account as reported on the profit and loss or Balance sheet. | | -| `accountName` | *string* | :heavy_minus_sign: | Name of the account. | | -| `accountId` | *string* | :heavy_minus_sign: | The unique account ID. | | +# ReportItem + +## Example Usage + +```typescript +import { ReportItem } from "@codat/lending/sdk/models/shared"; + +let value: ReportItem = { + date: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `balance` | *Decimal | number* | :heavy_minus_sign: | Balance of the account as reported on the profit and loss or Balance sheet. | | +| `accountName` | *string* | :heavy_minus_sign: | Name of the account. | | +| `accountId` | *string* | :heavy_minus_sign: | The unique account ID. | | | `accountCategory` | [shared.EnhancedReportAccountCategory](../../../sdk/models/shared/enhancedreportaccountcategory.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportitems.md b/lending/docs/sdk/models/shared/reportitems.md index 0c2d69d8e..eee28be4e 100644 --- a/lending/docs/sdk/models/shared/reportitems.md +++ b/lending/docs/sdk/models/shared/reportitems.md @@ -1,22 +1,20 @@ -# ReportItems - -## Example Usage - -```typescript -import { ReportItems } from "@codat/lending/sdk/models/shared"; - -let value: ReportItems = { - date: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `loanRef` | [shared.LoanRef](../../../sdk/models/shared/loanref.md) | :heavy_minus_sign: | N/A | | -| `itemRef` | [shared.ItemRef](../../../sdk/models/shared/itemref.md) | :heavy_minus_sign: | N/A | | -| `date` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `amount` | *Decimal* | :heavy_minus_sign: | The loan transaction amount. | | -| `loanTransactionType` | [shared.LoanTransactionType](../../../sdk/models/shared/loantransactiontype.md) | :heavy_minus_sign: | The type of loan transaction. | | -| `lender` | *string* | :heavy_minus_sign: | The name of lender providing the loan. | | \ No newline at end of file +# ReportItems + +## Example Usage + +```typescript +import { ReportItems } from "@codat/lending/sdk/models/shared"; + +let value: ReportItems = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `loanRef` | [shared.LoanRef](../../../sdk/models/shared/loanref.md) | :heavy_minus_sign: | Contains object that contains all the Loan transactions for that integration type. | +| `itemRef` | [shared.ItemRef](../../../sdk/models/shared/itemref.md) | :heavy_minus_sign: | Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. | +| `date` | *string* | :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. | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The loan transaction amount. | +| `loanTransactionType` | [shared.LoanTransactionType](../../../sdk/models/shared/loantransactiontype.md) | :heavy_minus_sign: | The type of loan transaction. | +| `lender` | *string* | :heavy_minus_sign: | The name of lender providing the loan. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportline.md b/lending/docs/sdk/models/shared/reportline.md index 82332cb17..636318ec6 100644 --- a/lending/docs/sdk/models/shared/reportline.md +++ b/lending/docs/sdk/models/shared/reportline.md @@ -1,21 +1,20 @@ -# ReportLine - -## Example Usage - -```typescript -import { ReportLine } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: ReportLine = { - value: new Decimal("9745.89"), -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `accountId` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | -| `name` | *string* | :heavy_minus_sign: | Name of the report line item. | -| `value` | *Decimal* | :heavy_check_mark: | Numerical value of the line item. | +# ReportLine + +## Example Usage + +```typescript +import { ReportLine } from "@codat/lending/sdk/models/shared"; + +let value: ReportLine = { + value: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `accountId` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | +| `name` | *string* | :heavy_minus_sign: | Name of the report line item. | +| `value` | *Decimal | number* | :heavy_check_mark: | Numerical value of the line item. | | `items` | [shared.ReportLine](../../../sdk/models/shared/reportline.md)[] | :heavy_minus_sign: | An array of ReportLine items. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportoperation.md b/lending/docs/sdk/models/shared/reportoperation.md index 1a39130d1..af32bdd81 100644 --- a/lending/docs/sdk/models/shared/reportoperation.md +++ b/lending/docs/sdk/models/shared/reportoperation.md @@ -1,26 +1,26 @@ -# ReportOperation - -Information about report generation. - -## Example Usage - -```typescript -import { ReportOperation } from "@codat/lending/sdk/models/shared"; - -let value: ReportOperation = { - id: "52c0f26b-051a-43ff-b02a-258eec67f5ef", - requestedDate: "2022-10-23T00:00:00Z", - updatedDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the report | 52c0f26b-051a-43ff-b02a-258eec67f5ef | -| `status` | [shared.ReportOperationStatus](../../../sdk/models/shared/reportoperationstatus.md) | :heavy_minus_sign: | The status of the report generation. | | -| `type` | [shared.ReportOperationType](../../../sdk/models/shared/reportoperationtype.md) | :heavy_minus_sign: | The name of the generated report. | | -| `requestedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `updatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +# ReportOperation + +Information about report generation. + +## Example Usage + +```typescript +import { ReportOperation } from "@codat/lending/sdk/models/shared"; + +let value: ReportOperation = { + id: "52c0f26b-051a-43ff-b02a-258eec67f5ef", + requestedDate: "2022-10-23T00:00:00Z", + updatedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier of the report | 52c0f26b-051a-43ff-b02a-258eec67f5ef | +| `status` | [shared.ReportOperationStatus](../../../sdk/models/shared/reportoperationstatus.md) | :heavy_minus_sign: | The status of the report generation. | | +| `type` | [shared.ReportOperationType](../../../sdk/models/shared/reportoperationtype.md) | :heavy_minus_sign: | The name of the generated report. | | +| `requestedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `updatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `errorMessage` | *string* | :heavy_minus_sign: | A short message describing any errors that occurred while generating the report. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportoperationstatus.md b/lending/docs/sdk/models/shared/reportoperationstatus.md index 175ea401b..0880e8873 100644 --- a/lending/docs/sdk/models/shared/reportoperationstatus.md +++ b/lending/docs/sdk/models/shared/reportoperationstatus.md @@ -1,17 +1,15 @@ -# ReportOperationStatus - -The status of the report generation. - -## Example Usage - -```typescript -import { ReportOperationStatus } from "@codat/lending/sdk/models/shared"; - -let value: ReportOperationStatus = "Complete"; -``` - -## Values - -```typescript -"InProgress" | "Complete" | "Error" +# ReportOperationStatus + +## Example Usage + +```typescript +import { ReportOperationStatus } from "@codat/lending/sdk/models/shared"; + +let value: ReportOperationStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportoperationtype.md b/lending/docs/sdk/models/shared/reportoperationtype.md index 43a427cf2..6e57ffdbd 100644 --- a/lending/docs/sdk/models/shared/reportoperationtype.md +++ b/lending/docs/sdk/models/shared/reportoperationtype.md @@ -1,17 +1,15 @@ -# ReportOperationType - -The name of the generated report. - -## Example Usage - -```typescript -import { ReportOperationType } from "@codat/lending/sdk/models/shared"; - -let value: ReportOperationType = "spendAnalysis"; -``` - -## Values - -```typescript -"categorizedBankStatement" | "creditModel" | "spendAnalysis" +# ReportOperationType + +## Example Usage + +```typescript +import { ReportOperationType } from "@codat/lending/sdk/models/shared"; + +let value: ReportOperationType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reports.md b/lending/docs/sdk/models/shared/reports.md index da564d172..13ec5c4b8 100644 --- a/lending/docs/sdk/models/shared/reports.md +++ b/lending/docs/sdk/models/shared/reports.md @@ -1,31 +1,19 @@ -# Reports - -## Example Usage - -```typescript -import { Reports } from "@codat/lending/sdk/models/shared"; - -let value: Reports = { - pageNumber: 1, - pageSize: 10, - totalResults: 1, - links: { - self: { - href: "/companies/{id}/data/{dataType}", - }, - current: { - href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `results` | [shared.ReportOperation](../../../sdk/models/shared/reportoperation.md)[] | :heavy_minus_sign: | N/A | | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file +# Reports + +## Example Usage + +```typescript +import { Reports } from "@codat/lending/sdk/models/shared"; + +let value: Reports = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `results` | [shared.ReportOperation](../../../sdk/models/shared/reportoperation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reportsourcereference.md b/lending/docs/sdk/models/shared/reportsourcereference.md index 8e730427b..a606fdbac 100644 --- a/lending/docs/sdk/models/shared/reportsourcereference.md +++ b/lending/docs/sdk/models/shared/reportsourcereference.md @@ -1,17 +1,17 @@ -# ReportSourceReference - -A source reference containing the `sourceType` object "Banking". - -## Example Usage - -```typescript -import { ReportSourceReference } from "@codat/lending/sdk/models/shared"; - -let value: ReportSourceReference = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | +# ReportSourceReference + +A source reference containing the `sourceType` object "Banking". + +## Example Usage + +```typescript +import { ReportSourceReference } from "@codat/lending/sdk/models/shared"; + +let value: ReportSourceReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | | `sourceType` | *string* | :heavy_minus_sign: | The data source type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/reporttype.md b/lending/docs/sdk/models/shared/reporttype.md index ebcf017f5..8879341c9 100644 --- a/lending/docs/sdk/models/shared/reporttype.md +++ b/lending/docs/sdk/models/shared/reporttype.md @@ -1,15 +1,15 @@ -# ReportType - -## Example Usage - -```typescript -import { ReportType } from "@codat/lending/sdk/models/shared"; - -let value: ReportType = "creditModel"; -``` - -## Values - -```typescript -"categorizedBankStatement" | "creditModel" +# ReportType + +## Example Usage + +```typescript +import { ReportType } from "@codat/lending/sdk/models/shared"; + +let value: ReportType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/routinginfo.md b/lending/docs/sdk/models/shared/routinginfo.md index c2e306b27..43e325d30 100644 --- a/lending/docs/sdk/models/shared/routinginfo.md +++ b/lending/docs/sdk/models/shared/routinginfo.md @@ -1,18 +1,18 @@ -# RoutingInfo - -Routing information for the bank. This does not include account number. - -## Example Usage - -```typescript -import { RoutingInfo } from "@codat/lending/sdk/models/shared"; - -let value: RoutingInfo = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `bankCode` | *string* | :heavy_minus_sign: | The numeric identifier of the routing number | +# RoutingInfo + +Routing information for the bank. This does not include account number. + +## Example Usage + +```typescript +import { RoutingInfo } from "@codat/lending/sdk/models/shared"; + +let value: RoutingInfo = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `bankCode` | *string* | :heavy_minus_sign: | The numeric identifier of the routing number | | `type` | [shared.RoutingInfoType](../../../sdk/models/shared/routinginfotype.md) | :heavy_minus_sign: | The type of routing number. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/routinginfotype.md b/lending/docs/sdk/models/shared/routinginfotype.md index 1756a871b..9e95144d3 100644 --- a/lending/docs/sdk/models/shared/routinginfotype.md +++ b/lending/docs/sdk/models/shared/routinginfotype.md @@ -1,17 +1,15 @@ -# RoutingInfoType - -The type of routing number. - -## Example Usage - -```typescript -import { RoutingInfoType } from "@codat/lending/sdk/models/shared"; - -let value: RoutingInfoType = "ifsc"; -``` - -## Values - -```typescript -"rtn" | "aba" | "swift" | "bsb" | "iban" | "nz2" | "trno" | "sortcode" | "blz" | "ifsc" | "bankcode" | "apca" | "clabe" +# RoutingInfoType + +## Example Usage + +```typescript +import { RoutingInfoType } from "@codat/lending/sdk/models/shared"; + +let value: RoutingInfoType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/salesorderreference.md b/lending/docs/sdk/models/shared/salesorderreference.md index e499d82b7..15af09e62 100644 --- a/lending/docs/sdk/models/shared/salesorderreference.md +++ b/lending/docs/sdk/models/shared/salesorderreference.md @@ -1,16 +1,16 @@ -# SalesOrderReference - -## Example Usage - -```typescript -import { SalesOrderReference } from "@codat/lending/sdk/models/shared"; - -let value: SalesOrderReference = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier to a record in `dataType`. | +# SalesOrderReference + +## Example Usage + +```typescript +import { SalesOrderReference } from "@codat/lending/sdk/models/shared"; + +let value: SalesOrderReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier to a record in `dataType`. | | `dataType` | [shared.AccountingInvoiceDataType](../../../sdk/models/shared/accountinginvoicedatatype.md) | :heavy_minus_sign: | The underlying data type associated to the reference `id`. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/schema.md b/lending/docs/sdk/models/shared/schema.md index cbb919ddf..8e8e982bd 100644 --- a/lending/docs/sdk/models/shared/schema.md +++ b/lending/docs/sdk/models/shared/schema.md @@ -1,30 +1,18 @@ -# Schema - -## Example Usage - -```typescript -import { Schema } from "@codat/lending/sdk/models/shared"; - -let value: Schema = { - id: "ba29118f-5406-4e59-b05c-ba307ca38d01", - eventType: "reports.categorizedBankStatement.generate.successful", - generatedDate: "2022-10-23T00:00:00Z", - payload: { - id: "a78e2625-7190-4d94-ae3b-071320451026", - referenceCompany: { - id: "8a210b68-6988-11ed-a1eb-0242ac120002", - name: "Codat Ltd.", - description: "Requested early access to the new financing scheme.", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the event. | ba29118f-5406-4e59-b05c-ba307ca38d01 | -| `eventType` | *string* | :heavy_minus_sign: | The type of event. | **Example 1:** reports.categorizedBankStatement.generate.successful
**Example 2:** reports.creditModel.generate.successful | -| `generatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `payload` | [shared.ReportGenerationPayload](../../../sdk/models/shared/reportgenerationpayload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# Schema + +## Example Usage + +```typescript +import { Schema } from "@codat/lending/sdk/models/shared"; + +let value: Schema = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `eventType` | *string* | :heavy_minus_sign: | N/A | +| `generatedDate` | *string* | :heavy_minus_sign: | N/A | +| `payload` | [shared.ReportGenerationPayload](../../../sdk/models/shared/reportgenerationpayload.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/security.md b/lending/docs/sdk/models/shared/security.md index ca7d23c39..e0386c038 100644 --- a/lending/docs/sdk/models/shared/security.md +++ b/lending/docs/sdk/models/shared/security.md @@ -1,17 +1,15 @@ -# Security - -## Example Usage - -```typescript -import { Security } from "@codat/lending/sdk/models/shared"; - -let value: Security = { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `authHeader` | *string* | :heavy_check_mark: | N/A | Basic BASE_64_ENCODED(API_KEY) | \ No newline at end of file +# Security + +## Example Usage + +```typescript +import { Security } from "@codat/lending/sdk/models/shared"; + +let value: Security = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `authHeader` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/servicecharge.md b/lending/docs/sdk/models/shared/servicecharge.md index 9b0ea2515..05aea01f8 100644 --- a/lending/docs/sdk/models/shared/servicecharge.md +++ b/lending/docs/sdk/models/shared/servicecharge.md @@ -1,37 +1,21 @@ -# ServiceCharge - -## Example Usage - -```typescript -import { ServiceCharge } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: ServiceCharge = { - description: "A service charge", - totalAmount: new Decimal("0"), - taxPercentage: new Decimal("0"), - taxAmount: new Decimal("0"), - taxes: [ - { - taxComponentRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - name: "", - }, - }, - ], - quantity: 1, - type: "Overpayment", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Service charges for this order. | A service charge | -| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the service charge, including tax. | **Example 1:** 0
**Example 2:** 12.5
**Example 3:** 45 | -| `taxPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any tax applied to the service charge. | **Example 1:** 0
**Example 2:** 12.5
**Example 3:** 45 | -| `taxAmount` | *Decimal* | :heavy_minus_sign: | Amount of the service charge that is tax. | **Example 1:** 0
**Example 2:** 12.5
**Example 3:** 45 | -| `taxes` | [shared.TaxComponentAllocation](../../../sdk/models/shared/taxcomponentallocation.md)[] | :heavy_minus_sign: | Taxes breakdown as applied to service charges. | | -| `quantity` | *number* | :heavy_minus_sign: | The number of times the charge is charged. | **Example 1:** 1
**Example 2:** 12
**Example 3:** 45 | -| `type` | [shared.ServiceChargeType](../../../sdk/models/shared/servicechargetype.md) | :heavy_minus_sign: | The type of the service charge. | Overpayment | \ No newline at end of file +# ServiceCharge + +## Example Usage + +```typescript +import { ServiceCharge } from "@codat/lending/sdk/models/shared"; + +let value: ServiceCharge = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Service charges for this order. | +| `totalAmount` | *Decimal | number* | :heavy_minus_sign: | Total amount of the service charge, including tax. | +| `taxPercentage` | *Decimal | number* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any tax applied to the service charge. | +| `taxAmount` | *Decimal | number* | :heavy_minus_sign: | Amount of the service charge that is tax. | +| `taxes` | [shared.TaxComponentAllocation](../../../sdk/models/shared/taxcomponentallocation.md)[] | :heavy_minus_sign: | Taxes breakdown as applied to service charges. | +| `quantity` | *number* | :heavy_minus_sign: | The number of times the charge is charged. | +| `type` | [shared.ServiceChargeType](../../../sdk/models/shared/servicechargetype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/servicechargetype.md b/lending/docs/sdk/models/shared/servicechargetype.md index 559028686..624de9c9c 100644 --- a/lending/docs/sdk/models/shared/servicechargetype.md +++ b/lending/docs/sdk/models/shared/servicechargetype.md @@ -1,17 +1,17 @@ -# ServiceChargeType - -The type of the service charge. - -## Example Usage - -```typescript -import { ServiceChargeType } from "@codat/lending/sdk/models/shared"; - -let value: ServiceChargeType = "Overpayment"; -``` - -## Values - -```typescript -"Generic" | "Shipping" | "Overpayment" | "Unknown" +# ServiceChargeType + +The type of the service charge. + +## Example Usage + +```typescript +import { ServiceChargeType } from "@codat/lending/sdk/models/shared"; + +let value: ServiceChargeType = "Generic"; +``` + +## Values + +```typescript +"Generic" | "Shipping" | "Overpayment" | "Unknown" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/source.md b/lending/docs/sdk/models/shared/source.md index c6f1ad991..0dcffbb4c 100644 --- a/lending/docs/sdk/models/shared/source.md +++ b/lending/docs/sdk/models/shared/source.md @@ -1,17 +1,15 @@ -# Source - -The source of the banking data that determines its format - -## Example Usage - -```typescript -import { Source } from "@codat/lending/sdk/models/shared"; - -let value: Source = "codat"; -``` - -## Values - -```typescript -"codat" +# Source + +## Example Usage + +```typescript +import { Source } from "@codat/lending/sdk/models/shared"; + +let value: Source = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourceaccount.md b/lending/docs/sdk/models/shared/sourceaccount.md index 6d1dc566e..69746ed48 100644 --- a/lending/docs/sdk/models/shared/sourceaccount.md +++ b/lending/docs/sdk/models/shared/sourceaccount.md @@ -1,37 +1,36 @@ -# SourceAccount - -The target bank account in a supported accounting software for ingestion into a bank feed. - -## Example Usage - -```typescript -import { SourceAccount } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: SourceAccount = { - id: "acc-002", - accountName: "account-081", - accountType: "Credit", - accountNumber: "12345670", - sortCode: "123456", - currency: "GBP", - balance: new Decimal("99.99"), - modifiedDate: "2023-01-09T14:14:14.1057478Z", - status: "pending", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique ID for the bank account. | | -| `accountName` | *string* | :heavy_minus_sign: | The bank account name. | | -| `accountType` | *string* | :heavy_minus_sign: | The type of bank account e.g. Credit. | | -| `accountNumber` | *string* | :heavy_minus_sign: | The account number. | | -| `sortCode` | *string* | :heavy_minus_sign: | The sort code. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `balance` | *Decimal* | :heavy_minus_sign: | The latest balance for the bank account. | | -| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `status` | [shared.SourceAccountStatus](../../../sdk/models/shared/sourceaccountstatus.md) | :heavy_minus_sign: | Status of the source account. | | +# SourceAccount + +The target bank account in a supported accounting software for ingestion into a bank feed. + +## Example Usage + +```typescript +import { SourceAccount } from "@codat/lending/sdk/models/shared"; + +let value: SourceAccount = { + id: "acc-002", + accountName: "account-081", + accountType: "Credit", + accountNumber: "12345670", + sortCode: "123456", + currency: "GBP", + balance: 99.99, + modifiedDate: "2023-01-09T14:14:14.1057478Z", + status: "pending", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique ID for the bank account. | | +| `accountName` | *string* | :heavy_minus_sign: | The bank account name. | | +| `accountType` | *string* | :heavy_minus_sign: | The type of bank account e.g. Credit. | | +| `accountNumber` | *string* | :heavy_minus_sign: | The account number. | | +| `sortCode` | *string* | :heavy_minus_sign: | The sort code. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `balance` | *Decimal | number* | :heavy_minus_sign: | The latest balance for the bank account. | | +| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `status` | [shared.SourceAccountStatus](../../../sdk/models/shared/sourceaccountstatus.md) | :heavy_minus_sign: | Status of the source account. | | | `feedStartDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourceaccountprototype.md b/lending/docs/sdk/models/shared/sourceaccountprototype.md index 7b2cf557c..88b9cbc7e 100644 --- a/lending/docs/sdk/models/shared/sourceaccountprototype.md +++ b/lending/docs/sdk/models/shared/sourceaccountprototype.md @@ -1,26 +1,22 @@ -# SourceAccountPrototype - -## Example Usage - -```typescript -import { SourceAccountPrototype } from "@codat/lending/sdk/models/shared"; - -let value: SourceAccountPrototype = { - id: "", - currency: "GBP", - modifiedDate: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique ID for the bank account. | | -| `accountName` | *string* | :heavy_minus_sign: | The bank account name. | | -| `accountType` | *string* | :heavy_minus_sign: | The type of bank account e.g. Credit. | | -| `accountNumber` | *string* | :heavy_minus_sign: | The account number. | | -| `sortCode` | *string* | :heavy_minus_sign: | The sort code. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `balance` | *Decimal* | :heavy_minus_sign: | The latest balance for the bank account. | | -| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file +# SourceAccountPrototype + +## Example Usage + +```typescript +import { SourceAccountPrototype } from "@codat/lending/sdk/models/shared"; + +let value: SourceAccountPrototype = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique ID for the bank account. | +| `accountName` | *string* | :heavy_minus_sign: | The bank account name. | +| `accountType` | *string* | :heavy_minus_sign: | The type of bank account e.g. Credit. | +| `accountNumber` | *string* | :heavy_minus_sign: | The account number. | +| `sortCode` | *string* | :heavy_minus_sign: | The sort code. | +| `currency` | *string* | :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. | +| `balance` | *Decimal | number* | :heavy_minus_sign: | The latest balance for the bank account. | +| `modifiedDate` | *string* | :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. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourceaccountstatus.md b/lending/docs/sdk/models/shared/sourceaccountstatus.md index 40739c052..551e51c59 100644 --- a/lending/docs/sdk/models/shared/sourceaccountstatus.md +++ b/lending/docs/sdk/models/shared/sourceaccountstatus.md @@ -1,17 +1,15 @@ -# SourceAccountStatus - -Status of the source account. - -## Example Usage - -```typescript -import { SourceAccountStatus } from "@codat/lending/sdk/models/shared"; - -let value: SourceAccountStatus = "pending"; -``` - -## Values - -```typescript -"pending" | "connected" | "connecting" | "disconnected" | "unknown" +# SourceAccountStatus + +## Example Usage + +```typescript +import { SourceAccountStatus } from "@codat/lending/sdk/models/shared"; + +let value: SourceAccountStatus = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourceaccountv2.md b/lending/docs/sdk/models/shared/sourceaccountv2.md index 97a80867e..437b04b44 100644 --- a/lending/docs/sdk/models/shared/sourceaccountv2.md +++ b/lending/docs/sdk/models/shared/sourceaccountv2.md @@ -1,48 +1,48 @@ -# SourceAccountV2 - -The target bank account in a supported accounting software for ingestion into a bank feed. - -## Example Usage - -```typescript -import { SourceAccountV2 } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: SourceAccountV2 = { - id: "acc-001", - accountName: "account-081", - accountType: "checking", - accountNumber: "12345670", - routingInfo: { - bankCode: "21001088", - }, - currency: "GBP", - balance: new Decimal("99.99"), - accountInfo: { - description: "account description 1", - nickname: "account 123", - accountOpenDate: "2023-05-06", - availableBalance: new Decimal("10"), - }, - modifiedDate: "2024-08-02T00:00:00.000Z", - status: "pending", - feedStartDate: "2024-05-01", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique ID for the bank account. | | -| `accountName` | *string* | :heavy_check_mark: | The bank account name. | | -| `accountType` | [shared.SourceAccountV2AccountType](../../../sdk/models/shared/sourceaccountv2accounttype.md) | :heavy_check_mark: | The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. | | -| `accountNumber` | *string* | :heavy_check_mark: | The account number. | | -| `sortCode` | *string* | :heavy_minus_sign: | The sort code. | | -| `routingInfo` | [shared.RoutingInfo](../../../sdk/models/shared/routinginfo.md) | :heavy_minus_sign: | Routing information for the bank. This does not include account number. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `balance` | *Decimal* | :heavy_check_mark: | The latest balance for the bank account. | | -| `accountInfo` | [shared.AccountInfo](../../../sdk/models/shared/accountinfo.md) | :heavy_minus_sign: | N/A | | -| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `status` | [shared.SourceAccountV2Status](../../../sdk/models/shared/sourceaccountv2status.md) | :heavy_minus_sign: | Status of the source account. | | +# SourceAccountV2 + +The target bank account in a supported accounting software for ingestion into a bank feed. + +## Example Usage + +```typescript +import { SourceAccountV2 } from "@codat/lending/sdk/models/shared"; + +let value: SourceAccountV2 = { + id: "acc-001", + accountName: "account-081", + accountType: "checking", + accountNumber: "12345670", + routingInfo: { + bankCode: "021001088", + type: "bankcode", + }, + currency: "GBP", + balance: 99.99, + accountInfo: { + description: "account description 1", + nickname: "account 123", + accountOpenDate: "2023-05-06", + availableBalance: 10, + }, + modifiedDate: "2024-08-02T00:00:00.000Z", + status: "pending", + feedStartDate: "2024-05-01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique ID for the bank account. | | +| `accountName` | *string* | :heavy_check_mark: | The bank account name. | | +| `accountType` | [shared.SourceAccountV2AccountType](../../../sdk/models/shared/sourceaccountv2accounttype.md) | :heavy_check_mark: | The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. | | +| `accountNumber` | *string* | :heavy_check_mark: | The account number. | | +| `sortCode` | *string* | :heavy_minus_sign: | The sort code. | | +| `routingInfo` | [shared.RoutingInfo](../../../sdk/models/shared/routinginfo.md) | :heavy_minus_sign: | Routing information for the bank. This does not include account number. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `balance` | *Decimal | number* | :heavy_check_mark: | The latest balance for the bank account. | | +| `accountInfo` | [shared.AccountInfo](../../../sdk/models/shared/accountinfo.md) | :heavy_minus_sign: | N/A | | +| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `status` | [shared.SourceAccountV2Status](../../../sdk/models/shared/sourceaccountv2status.md) | :heavy_minus_sign: | Status of the source account. | | | `feedStartDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
```
2020-10-08
``` | 2022-10-23 | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourceaccountv2accounttype.md b/lending/docs/sdk/models/shared/sourceaccountv2accounttype.md index 15b961e30..c0f48f46f 100644 --- a/lending/docs/sdk/models/shared/sourceaccountv2accounttype.md +++ b/lending/docs/sdk/models/shared/sourceaccountv2accounttype.md @@ -1,17 +1,15 @@ -# SourceAccountV2AccountType - -The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. - -## Example Usage - -```typescript -import { SourceAccountV2AccountType } from "@codat/lending/sdk/models/shared"; - -let value: SourceAccountV2AccountType = "loan"; -``` - -## Values - -```typescript -"checking" | "savings" | "loan" | "creditCard" | "prepaidCard" +# SourceAccountV2AccountType + +## Example Usage + +```typescript +import { SourceAccountV2AccountType } from "@codat/lending/sdk/models/shared"; + +let value: SourceAccountV2AccountType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourceaccountv2prototype.md b/lending/docs/sdk/models/shared/sourceaccountv2prototype.md index ad83962e9..48ea3cac3 100644 --- a/lending/docs/sdk/models/shared/sourceaccountv2prototype.md +++ b/lending/docs/sdk/models/shared/sourceaccountv2prototype.md @@ -1,34 +1,24 @@ -# SourceAccountV2Prototype - -## Example Usage - -```typescript -import { SourceAccountV2Prototype } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: SourceAccountV2Prototype = { - id: "", - accountName: "", - accountType: "checking", - accountNumber: "", - currency: "GBP", - balance: new Decimal("9826.32"), - modifiedDate: "2022-10-23T00:00:00Z", - accountInfo: null, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique ID for the bank account. | | -| `accountName` | *string* | :heavy_check_mark: | The bank account name. | | -| `accountType` | [shared.PropertieAccountType](../../../sdk/models/shared/propertieaccounttype.md) | :heavy_check_mark: | The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. | | -| `accountNumber` | *string* | :heavy_check_mark: | The account number. | | -| `routingInfo` | [shared.RoutingInfo](../../../sdk/models/shared/routinginfo.md) | :heavy_minus_sign: | Routing information for the bank. This does not include account number. | | -| `sortCode` | *string* | :heavy_minus_sign: | The sort code. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `balance` | *Decimal* | :heavy_check_mark: | The latest balance for the bank account. | | -| `modifiedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `accountInfo` | [shared.AccountInfo](../../../sdk/models/shared/accountinfo.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# SourceAccountV2Prototype + +## Example Usage + +```typescript +import { SourceAccountV2Prototype } from "@codat/lending/sdk/models/shared"; + +let value: SourceAccountV2Prototype = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique ID for the bank account. | +| `accountName` | *string* | :heavy_check_mark: | The bank account name. | +| `accountType` | [shared.PropertieAccountType](../../../sdk/models/shared/propertieaccounttype.md) | :heavy_check_mark: | The type of bank account e.g. Credit. | +| `accountNumber` | *string* | :heavy_check_mark: | The account number. | +| `routingInfo` | [shared.RoutingInfo](../../../sdk/models/shared/routinginfo.md) | :heavy_minus_sign: | N/A | +| `sortCode` | *string* | :heavy_minus_sign: | The sort code. | +| `currency` | *string* | :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. | +| `balance` | *Decimal | number* | :heavy_check_mark: | The latest balance for the bank account. | +| `modifiedDate` | *string* | :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. | +| `accountInfo` | [shared.AccountInfo](../../../sdk/models/shared/accountinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourceaccountv2status.md b/lending/docs/sdk/models/shared/sourceaccountv2status.md index 71b89fadd..90e9306a2 100644 --- a/lending/docs/sdk/models/shared/sourceaccountv2status.md +++ b/lending/docs/sdk/models/shared/sourceaccountv2status.md @@ -1,17 +1,15 @@ -# SourceAccountV2Status - -Status of the source account. - -## Example Usage - -```typescript -import { SourceAccountV2Status } from "@codat/lending/sdk/models/shared"; - -let value: SourceAccountV2Status = "pending"; -``` - -## Values - -```typescript -"pending" | "connected" | "connecting" | "disconnected" | "unknown" +# SourceAccountV2Status + +## Example Usage + +```typescript +import { SourceAccountV2Status } from "@codat/lending/sdk/models/shared"; + +let value: SourceAccountV2Status = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourceref.md b/lending/docs/sdk/models/shared/sourceref.md index 0c46958e9..1dd16f900 100644 --- a/lending/docs/sdk/models/shared/sourceref.md +++ b/lending/docs/sdk/models/shared/sourceref.md @@ -1,17 +1,17 @@ -# SourceRef - -A source reference containing the `sourceType` object "Banking". - -## Example Usage - -```typescript -import { SourceRef } from "@codat/lending/sdk/models/shared"; - -let value: SourceRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | +# SourceRef + +A source reference containing the `sourceType` object "Banking". + +## Example Usage + +```typescript +import { SourceRef } from "@codat/lending/sdk/models/shared"; + +let value: SourceRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | | `sourceType` | *string* | :heavy_minus_sign: | The data source type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/sourcetype.md b/lending/docs/sdk/models/shared/sourcetype.md index 7d824bf2e..b6028ace0 100644 --- a/lending/docs/sdk/models/shared/sourcetype.md +++ b/lending/docs/sdk/models/shared/sourcetype.md @@ -1,17 +1,17 @@ -# SourceType - -The type of platform of the connection. - -## Example Usage - -```typescript -import { SourceType } from "@codat/lending/sdk/models/shared"; - -let value: SourceType = "Accounting"; -``` - -## Values - -```typescript -"Accounting" | "Banking" | "BankFeed" | "Commerce" | "Expense" | "Other" | "Unknown" +# SourceType + +The type of platform of the connection. + +## Example Usage + +```typescript +import { SourceType } from "@codat/lending/sdk/models/shared"; + +let value: SourceType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/startuploadsessionrequest.md b/lending/docs/sdk/models/shared/startuploadsessionrequest.md index 7e3e595e8..85de641e5 100644 --- a/lending/docs/sdk/models/shared/startuploadsessionrequest.md +++ b/lending/docs/sdk/models/shared/startuploadsessionrequest.md @@ -1,15 +1,15 @@ -# StartUploadSessionRequest - -## Example Usage - -```typescript -import { StartUploadSessionRequest } from "@codat/lending/sdk/models/shared"; - -let value: StartUploadSessionRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +# StartUploadSessionRequest + +## Example Usage + +```typescript +import { StartUploadSessionRequest } from "@codat/lending/sdk/models/shared"; + +let value: StartUploadSessionRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `dataType` | [shared.StartUploadSessionRequestDataType](../../../sdk/models/shared/startuploadsessionrequestdatatype.md) | :heavy_minus_sign: | A key for a Codat data type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/startuploadsessionrequestdatatype.md b/lending/docs/sdk/models/shared/startuploadsessionrequestdatatype.md index ecad385ee..e1dd02f46 100644 --- a/lending/docs/sdk/models/shared/startuploadsessionrequestdatatype.md +++ b/lending/docs/sdk/models/shared/startuploadsessionrequestdatatype.md @@ -1,17 +1,15 @@ -# StartUploadSessionRequestDataType - -A key for a Codat data type. - -## Example Usage - -```typescript -import { StartUploadSessionRequestDataType } from "@codat/lending/sdk/models/shared"; - -let value: StartUploadSessionRequestDataType = "banking-accounts"; -``` - -## Values - -```typescript -"banking-accounts" | "banking-transactions" +# StartUploadSessionRequestDataType + +## Example Usage + +```typescript +import { StartUploadSessionRequestDataType } from "@codat/lending/sdk/models/shared"; + +let value: StartUploadSessionRequestDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/status.md b/lending/docs/sdk/models/shared/status.md index f327fb2bc..e6b57f677 100644 --- a/lending/docs/sdk/models/shared/status.md +++ b/lending/docs/sdk/models/shared/status.md @@ -1,17 +1,17 @@ -# Status - -The current status of the dataset. - -## Example Usage - -```typescript -import { Status } from "@codat/lending/sdk/models/shared"; - -let value: Status = "Validating"; -``` - -## Values - -```typescript -"Initial" | "Queued" | "Fetching" | "MapQueued" | "Mapping" | "Complete" | "FetchError" | "MapError" | "InternalError" | "ProcessingQueued" | "Processing" | "ProcessingError" | "ValidationQueued" | "Validating" | "ValidationError" | "AuthError" | "Cancelled" | "NotSupported" | "RateLimitError" | "PermissionsError" | "PrerequisiteNotMet" +# Status + +The current status of the dataset. + +## Example Usage + +```typescript +import { Status } from "@codat/lending/sdk/models/shared"; + +let value: Status = "Initial"; +``` + +## Values + +```typescript +"Initial" | "Queued" | "Fetching" | "MapQueued" | "Mapping" | "Complete" | "FetchError" | "MapError" | "InternalError" | "ProcessingQueued" | "Processing" | "ProcessingError" | "ValidationQueued" | "Validating" | "ValidationError" | "AuthError" | "Cancelled" | "NotSupported" | "RateLimitError" | "PermissionsError" | "PrerequisiteNotMet" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/supplementaldata.md b/lending/docs/sdk/models/shared/supplementaldata.md index 7c00ee807..a70ff4bc4 100644 --- a/lending/docs/sdk/models/shared/supplementaldata.md +++ b/lending/docs/sdk/models/shared/supplementaldata.md @@ -1,19 +1,19 @@ -# SupplementalData - -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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - -## Example Usage - -```typescript -import { SupplementalData } from "@codat/lending/sdk/models/shared"; - -let value: SupplementalData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +# SupplementalData + +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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. + +## Example Usage + +```typescript +import { SupplementalData } from "@codat/lending/sdk/models/shared"; + +let value: SupplementalData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | | `content` | Record> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/supplierref.md b/lending/docs/sdk/models/shared/supplierref.md index 37baefe57..0c8400844 100644 --- a/lending/docs/sdk/models/shared/supplierref.md +++ b/lending/docs/sdk/models/shared/supplierref.md @@ -1,20 +1,18 @@ -# SupplierRef - -Reference to the supplier the record relates to. - -## Example Usage - -```typescript -import { SupplierRef } from "@codat/lending/sdk/models/shared"; - -let value: SupplierRef = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `id` | *string* | :heavy_check_mark: | The supplier's unique ID | +# SupplierRef + +Reference to the supplier the record relates to. + +## Example Usage + +```typescript +import { SupplierRef } from "@codat/lending/sdk/models/shared"; + +let value: SupplierRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `id` | *string* | :heavy_check_mark: | The supplier's unique ID | | `supplierName` | *string* | :heavy_minus_sign: | The supplier's name | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/supplierstatus.md b/lending/docs/sdk/models/shared/supplierstatus.md index 28233fe0e..2c51a22f1 100644 --- a/lending/docs/sdk/models/shared/supplierstatus.md +++ b/lending/docs/sdk/models/shared/supplierstatus.md @@ -1,17 +1,17 @@ -# SupplierStatus - -Status of the supplier. - -## Example Usage - -```typescript -import { SupplierStatus } from "@codat/lending/sdk/models/shared"; - -let value: SupplierStatus = "Archived"; -``` - -## Values - -```typescript -"Unknown" | "Active" | "Archived" +# SupplierStatus + +Status of the supplier. + +## Example Usage + +```typescript +import { SupplierStatus } from "@codat/lending/sdk/models/shared"; + +let value: SupplierStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/targetaccountoption.md b/lending/docs/sdk/models/shared/targetaccountoption.md index 6b378f391..380be1235 100644 --- a/lending/docs/sdk/models/shared/targetaccountoption.md +++ b/lending/docs/sdk/models/shared/targetaccountoption.md @@ -1,19 +1,19 @@ -# TargetAccountOption - -## Example Usage - -```typescript -import { TargetAccountOption } from "@codat/lending/sdk/models/shared"; - -let value: TargetAccountOption = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Id of the target account. | -| `name` | *string* | :heavy_minus_sign: | Name of the target account. | -| `balance` | *Decimal* | :heavy_minus_sign: | The balance of the account. | -| `sortCode` | *string* | :heavy_minus_sign: | The sort code of the account. | +# TargetAccountOption + +## Example Usage + +```typescript +import { TargetAccountOption } from "@codat/lending/sdk/models/shared"; + +let value: TargetAccountOption = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Id of the target account. | +| `name` | *string* | :heavy_minus_sign: | Name of the target account. | +| `balance` | *Decimal | number* | :heavy_minus_sign: | The balance of the account. | +| `sortCode` | *string* | :heavy_minus_sign: | The sort code of the account. | | `accountNumber` | *string* | :heavy_minus_sign: | The account number of the account. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/taxcomponentallocation.md b/lending/docs/sdk/models/shared/taxcomponentallocation.md index adecd20f3..d68ef458c 100644 --- a/lending/docs/sdk/models/shared/taxcomponentallocation.md +++ b/lending/docs/sdk/models/shared/taxcomponentallocation.md @@ -1,21 +1,16 @@ -# TaxComponentAllocation - -## Example Usage - -```typescript -import { TaxComponentAllocation } from "@codat/lending/sdk/models/shared"; - -let value: TaxComponentAllocation = { - taxComponentRef: { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - name: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `taxComponentRef` | [shared.TaxComponentRef](../../../sdk/models/shared/taxcomponentref.md) | :heavy_minus_sign: | Taxes rates reference object depending on the rates being available on source commerce software. | -| `rate` | *Decimal* | :heavy_minus_sign: | Tax amount on order line sale as available from source commerce software. | \ No newline at end of file +# TaxComponentAllocation + +## Example Usage + +```typescript +import { TaxComponentAllocation } from "@codat/lending/sdk/models/shared"; + +let value: TaxComponentAllocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `taxComponentRef` | [shared.TaxComponentRef](../../../sdk/models/shared/taxcomponentref.md) | :heavy_minus_sign: | Taxes rates reference object depending on the rates being available on source commerce software. | +| `rate` | *Decimal | number* | :heavy_minus_sign: | Tax amount on order line sale as available from source commerce software. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/taxcomponentref.md b/lending/docs/sdk/models/shared/taxcomponentref.md index 76ccdd2b2..20b402114 100644 --- a/lending/docs/sdk/models/shared/taxcomponentref.md +++ b/lending/docs/sdk/models/shared/taxcomponentref.md @@ -1,21 +1,18 @@ -# TaxComponentRef - -Taxes rates reference object depending on the rates being available on source commerce software. - -## Example Usage - -```typescript -import { TaxComponentRef } from "@codat/lending/sdk/models/shared"; - -let value: TaxComponentRef = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identitifer of the tax component being referenced. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `name` | *string* | :heavy_check_mark: | Name of the tax component being referenced. | | \ No newline at end of file +# TaxComponentRef + +Taxes rates reference object depending on the rates being available on source commerce software. + +## Example Usage + +```typescript +import { TaxComponentRef } from "@codat/lending/sdk/models/shared"; + +let value: TaxComponentRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identitifer of the tax component being referenced. | +| `name` | *string* | :heavy_check_mark: | Name of the tax component being referenced. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/taxrateref.md b/lending/docs/sdk/models/shared/taxrateref.md index 29ad7c5f3..34ad67fad 100644 --- a/lending/docs/sdk/models/shared/taxrateref.md +++ b/lending/docs/sdk/models/shared/taxrateref.md @@ -1,28 +1,28 @@ -# TaxRateRef - -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 - -## Example Usage - -```typescript -import { TaxRateRef } from "@codat/lending/sdk/models/shared"; - -let value: TaxRateRef = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for the tax rate in the accounting software. | -| `name` | *string* | :heavy_minus_sign: | Name of the tax rate in the accounting software. | -| `effectiveTaxRate` | *Decimal* | :heavy_minus_sign: | Applicable tax rate. | \ No newline at end of file +# TaxRateRef + +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 + +## Example Usage + +```typescript +import { TaxRateRef } from "@codat/lending/sdk/models/shared"; + +let value: TaxRateRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the tax rate in the accounting software. | +| `name` | *string* | :heavy_minus_sign: | Name of the tax rate in the accounting software. | +| `effectiveTaxRate` | *Decimal | number* | :heavy_minus_sign: | Applicable tax rate. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/taxratereference.md b/lending/docs/sdk/models/shared/taxratereference.md index 3c0102585..cca627115 100644 --- a/lending/docs/sdk/models/shared/taxratereference.md +++ b/lending/docs/sdk/models/shared/taxratereference.md @@ -1,28 +1,28 @@ -# TaxRateReference - -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 - -## Example Usage - -```typescript -import { TaxRateReference } from "@codat/lending/sdk/models/shared"; - -let value: TaxRateReference = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for the tax rate in the accounting software. | -| `name` | *string* | :heavy_minus_sign: | Name of the tax rate in the accounting software. | -| `effectiveTaxRate` | *Decimal* | :heavy_minus_sign: | Applicable tax rate. | \ No newline at end of file +# TaxRateReference + +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 + +## Example Usage + +```typescript +import { TaxRateReference } from "@codat/lending/sdk/models/shared"; + +let value: TaxRateReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the tax rate in the accounting software. | +| `name` | *string* | :heavy_minus_sign: | Name of the tax rate in the accounting software. | +| `effectiveTaxRate` | *Decimal | number* | :heavy_minus_sign: | Applicable tax rate. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/tracking.md b/lending/docs/sdk/models/shared/tracking.md index 78c888a51..eb597b3e2 100644 --- a/lending/docs/sdk/models/shared/tracking.md +++ b/lending/docs/sdk/models/shared/tracking.md @@ -1,25 +1,18 @@ -# Tracking - -## Example Usage - -```typescript -import { Tracking } from "@codat/lending/sdk/models/shared"; - -let value: Tracking = { - recordRefs: [ - { - dataType: "trackingCategories", - }, - ], - invoiceTo: { - dataType: "journalEntry", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `recordRefs` | [shared.TrackingRecordRef](../../../sdk/models/shared/trackingrecordref.md)[] | :heavy_check_mark: | N/A | -| `invoiceTo` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.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 +# Tracking + +Categories, and a project and customer, against which the item is tracked. + +## Example Usage + +```typescript +import { Tracking } from "@codat/lending/sdk/models/shared"; + +let value: Tracking = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `recordRefs` | [shared.TrackingRecordRef](../../../sdk/models/shared/trackingrecordref.md)[] | :heavy_check_mark: | N/A | +| `invoiceTo` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/trackingcategoryref.md b/lending/docs/sdk/models/shared/trackingcategoryref.md index 091c946b0..4f222142e 100644 --- a/lending/docs/sdk/models/shared/trackingcategoryref.md +++ b/lending/docs/sdk/models/shared/trackingcategoryref.md @@ -1,22 +1,18 @@ -# ~~TrackingCategoryRef~~ - -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. - -## Example Usage - -```typescript -import { TrackingCategoryRef } from "@codat/lending/sdk/models/shared"; - -let value: TrackingCategoryRef = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier to the tracking category. | +# TrackingCategoryRef + +References a category against which the item is tracked. + +## Example Usage + +```typescript +import { TrackingCategoryRef } from "@codat/lending/sdk/models/shared"; + +let value: TrackingCategoryRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier to the tracking category. | | `name` | *string* | :heavy_minus_sign: | Name of tracking category. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/trackingrecordref.md b/lending/docs/sdk/models/shared/trackingrecordref.md index d45b297a2..e1a1f4b18 100644 --- a/lending/docs/sdk/models/shared/trackingrecordref.md +++ b/lending/docs/sdk/models/shared/trackingrecordref.md @@ -1,20 +1,18 @@ -# TrackingRecordRef - -Links to the customer or tracking category. - -## Example Usage - -```typescript -import { TrackingRecordRef } from "@codat/lending/sdk/models/shared"; - -let value: TrackingRecordRef = { - dataType: "trackingCategories", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | -| `dataType` | [shared.TrackingRecordRefDataType](../../../sdk/models/shared/trackingrecordrefdatatype.md) | :heavy_minus_sign: | Name of underlying data type. | trackingCategories | \ No newline at end of file +# TrackingRecordRef + +Links to the customer or tracking category. + +## Example Usage + +```typescript +import { TrackingRecordRef } from "@codat/lending/sdk/models/shared"; + +let value: TrackingRecordRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | +| `dataType` | [shared.TrackingRecordRefDataType](../../../sdk/models/shared/trackingrecordrefdatatype.md) | :heavy_minus_sign: | Name of underlying data type. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/trackingrecordrefdatatype.md b/lending/docs/sdk/models/shared/trackingrecordrefdatatype.md index edf78e337..0a81a96b7 100644 --- a/lending/docs/sdk/models/shared/trackingrecordrefdatatype.md +++ b/lending/docs/sdk/models/shared/trackingrecordrefdatatype.md @@ -1,17 +1,15 @@ -# TrackingRecordRefDataType - -Name of underlying data type. - -## Example Usage - -```typescript -import { TrackingRecordRefDataType } from "@codat/lending/sdk/models/shared"; - -let value: TrackingRecordRefDataType = "trackingCategories"; -``` - -## Values - -```typescript -"customers" | "suppliers" | "trackingCategories" +# TrackingRecordRefDataType + +## Example Usage + +```typescript +import { TrackingRecordRefDataType } from "@codat/lending/sdk/models/shared"; + +let value: TrackingRecordRefDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/transactioncategory.md b/lending/docs/sdk/models/shared/transactioncategory.md index 73f979af3..377a27a2b 100644 --- a/lending/docs/sdk/models/shared/transactioncategory.md +++ b/lending/docs/sdk/models/shared/transactioncategory.md @@ -1,17 +1,17 @@ -# TransactionCategory - -## Example Usage - -```typescript -import { TransactionCategory } from "@codat/lending/sdk/models/shared"; - -let value: TransactionCategory = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `confidence` | *Decimal* | :heavy_minus_sign: | Returns the aggregate confidence of the suggested category for the transaction. The value is between 0 and 100. | -| `confidences` | *Decimal*[] | :heavy_minus_sign: | An ordered array of category level confidences where each element is the confidence of the corresponding item in the `levels` array. | +# TransactionCategory + +## Example Usage + +```typescript +import { TransactionCategory } from "@codat/lending/sdk/models/shared"; + +let value: TransactionCategory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `confidence` | *Decimal | number* | :heavy_minus_sign: | Returns the aggregate confidence of the suggested category for the transaction. The value is between 0 and 100. | +| `confidences` | *Decimal | number*[] | :heavy_minus_sign: | An ordered array of category level confidences where each element is the confidence of the corresponding item in the `levels` array. | | `levels` | *string*[] | :heavy_minus_sign: | The suggested category is an ordered array of category levels where each element (or level) is a subcategory of the previous element (or level). | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/transactioncategoryref.md b/lending/docs/sdk/models/shared/transactioncategoryref.md index 95b5090ff..9f1d27af2 100644 --- a/lending/docs/sdk/models/shared/transactioncategoryref.md +++ b/lending/docs/sdk/models/shared/transactioncategoryref.md @@ -1,20 +1,18 @@ -# TransactionCategoryRef - -An object of bank transaction category reference data. - -## Example Usage - -```typescript -import { TransactionCategoryRef } from "@codat/lending/sdk/models/shared"; - -let value: TransactionCategoryRef = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique category reference id for the bank transaction. | +# TransactionCategoryRef + +An object of bank transaction category reference data. + +## Example Usage + +```typescript +import { TransactionCategoryRef } from "@codat/lending/sdk/models/shared"; + +let value: TransactionCategoryRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique category reference id for the bank transaction. | | `name` | *string* | :heavy_minus_sign: | The category name reference for the bank transaction. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/transactioncategorystatus.md b/lending/docs/sdk/models/shared/transactioncategorystatus.md index 1811e9096..d1bbd5f30 100644 --- a/lending/docs/sdk/models/shared/transactioncategorystatus.md +++ b/lending/docs/sdk/models/shared/transactioncategorystatus.md @@ -1,17 +1,17 @@ -# TransactionCategoryStatus - -The status of the transaction category. - -## Example Usage - -```typescript -import { TransactionCategoryStatus } from "@codat/lending/sdk/models/shared"; - -let value: TransactionCategoryStatus = "Active"; -``` - -## Values - -```typescript -"Unknown" | "Active" | "Archived" +# TransactionCategoryStatus + +The status of the transaction category. + +## Example Usage + +```typescript +import { TransactionCategoryStatus } from "@codat/lending/sdk/models/shared"; + +let value: TransactionCategoryStatus = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/transactioncode.md b/lending/docs/sdk/models/shared/transactioncode.md index 7a0dc65c5..6ea452881 100644 --- a/lending/docs/sdk/models/shared/transactioncode.md +++ b/lending/docs/sdk/models/shared/transactioncode.md @@ -1,17 +1,17 @@ -# TransactionCode - -Code to identify the underlying transaction. - -## Example Usage - -```typescript -import { TransactionCode } from "@codat/lending/sdk/models/shared"; - -let value: TransactionCode = "Credit"; -``` - -## Values - -```typescript -"Unknown" | "Fee" | "Payment" | "Cash" | "Transfer" | "Interest" | "Cashback" | "Cheque" | "DirectDebit" | "Purchase" | "StandingOrder" | "Adjustment" | "Credit" | "Other" | "NotSupported" +# TransactionCode + +Code to identify the underlying transaction. + +## Example Usage + +```typescript +import { TransactionCode } from "@codat/lending/sdk/models/shared"; + +let value: TransactionCode = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Fee" | "Payment" | "Cash" | "Transfer" | "Interest" | "Cashback" | "Cheque" | "DirectDebit" | "Purchase" | "StandingOrder" | "Adjustment" | "Credit" | "Other" | "NotSupported" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/transactionsourceref.md b/lending/docs/sdk/models/shared/transactionsourceref.md index d78744b49..4862398bd 100644 --- a/lending/docs/sdk/models/shared/transactionsourceref.md +++ b/lending/docs/sdk/models/shared/transactionsourceref.md @@ -1,19 +1,16 @@ -# TransactionSourceRef - -## Example Usage - -```typescript -import { TransactionSourceRef } from "@codat/lending/sdk/models/shared"; - -let value: TransactionSourceRef = { - id: "13d946f0-c5d5-42bc-b092-97ece17923ab", - type: "Unknown", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identitifer of the record being referenced | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | -| `type` | [shared.TransactionSourceType](../../../sdk/models/shared/transactionsourcetype.md) | :heavy_check_mark: | The type of source the transaction arose. | | \ No newline at end of file +# TransactionSourceRef + +## Example Usage + +```typescript +import { TransactionSourceRef } from "@codat/lending/sdk/models/shared"; + +let value: TransactionSourceRef = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identitifer of the record being referenced | +| `type` | [shared.TransactionSourceType](../../../sdk/models/shared/transactionsourcetype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/transactionsourcetype.md b/lending/docs/sdk/models/shared/transactionsourcetype.md index f821130b8..795906c7c 100644 --- a/lending/docs/sdk/models/shared/transactionsourcetype.md +++ b/lending/docs/sdk/models/shared/transactionsourcetype.md @@ -1,17 +1,17 @@ -# TransactionSourceType - -The type of source the transaction arose. - -## Example Usage - -```typescript -import { TransactionSourceType } from "@codat/lending/sdk/models/shared"; - -let value: TransactionSourceType = "Order"; -``` - -## Values - -```typescript -"Fee" | "Order" | "Payment" | "ServiceCharge" | "Unknown" +# TransactionSourceType + +The type of source the transaction arose. + +## Example Usage + +```typescript +import { TransactionSourceType } from "@codat/lending/sdk/models/shared"; + +let value: TransactionSourceType = "Fee"; +``` + +## Values + +```typescript +"Fee" | "Order" | "Payment" | "ServiceCharge" | "Unknown" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/transactiontype.md b/lending/docs/sdk/models/shared/transactiontype.md index 2aac41db8..6aada23a2 100644 --- a/lending/docs/sdk/models/shared/transactiontype.md +++ b/lending/docs/sdk/models/shared/transactiontype.md @@ -1,25 +1,25 @@ -# TransactionType - -The type of the platform transaction: -- `Unknown` -- `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account. -- `Payment` — Credit and debit card payments. -- `PaymentFee` — Payment provider's fee on each card payment. -- `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller. -- `Payout` — Transfer of funds from the seller's merchant account to their bank account. -- `Refund` — Refunds to a customer's credit or debit card. -- `Transfer` — Secure transfer of funds to the seller's bank account. - -## Example Usage - -```typescript -import { TransactionType } from "@codat/lending/sdk/models/shared"; - -let value: TransactionType = "FailedPayout"; -``` - -## Values - -```typescript -"Payment" | "Refund" | "Payout" | "FailedPayout" | "Transfer" | "PaymentFee" | "PaymentFeeRefund" | "Unknown" +# TransactionType + +The type of the platform transaction: +- `Unknown` +- `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account. +- `Payment` — Credit and debit card payments. +- `PaymentFee` — Payment provider's fee on each card payment. +- `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller. +- `Payout` — Transfer of funds from the seller's merchant account to their bank account. +- `Refund` — Refunds to a customer's credit or debit card. +- `Transfer` — Secure transfer of funds to the seller's bank account. + +## Example Usage + +```typescript +import { TransactionType } from "@codat/lending/sdk/models/shared"; + +let value: TransactionType = "Payment"; +``` + +## Values + +```typescript +"Payment" | "Refund" | "Payout" | "FailedPayout" | "Transfer" | "PaymentFee" | "PaymentFeeRefund" | "Unknown" ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/transferaccount.md b/lending/docs/sdk/models/shared/transferaccount.md index c46fd17d2..f699c80a8 100644 --- a/lending/docs/sdk/models/shared/transferaccount.md +++ b/lending/docs/sdk/models/shared/transferaccount.md @@ -1,24 +1,21 @@ -# TransferAccount - -Account details of the account sending or receiving the transfer. - -## Example Usage - -```typescript -import { TransferAccount } from "@codat/lending/sdk/models/shared"; - -let value: TransferAccount = { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `accountRef` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.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. | | -| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | -| `amount` | *Decimal* | :heavy_minus_sign: | The amount transferred between accounts. | | \ No newline at end of file +# TransferAccount + +Account details of the account sending or receiving the transfer. + +## Example Usage + +```typescript +import { TransferAccount } from "@codat/lending/sdk/models/shared"; + +let value: TransferAccount = { + currency: "GBP", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accountRef` | [shared.AccountingRecordRef](../../../sdk/models/shared/accountingrecordref.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. | | +| `currency` | *string* | :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. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | +| `amount` | *Decimal | number* | :heavy_minus_sign: | The amount transferred between accounts. | | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/type.md b/lending/docs/sdk/models/shared/type.md index 2c71c2c0c..3e5a8f8a9 100644 --- a/lending/docs/sdk/models/shared/type.md +++ b/lending/docs/sdk/models/shared/type.md @@ -1,17 +1,15 @@ -# Type - -The type of phone number - -## Example Usage - -```typescript -import { Type } from "@codat/lending/sdk/models/shared"; - -let value: Type = "Primary"; -``` - -## Values - -```typescript -"Primary" | "Landline" | "Mobile" | "Fax" | "Unknown" +# Type + +## Example Usage + +```typescript +import { Type } from "@codat/lending/sdk/models/shared"; + +let value: Type = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/validation.md b/lending/docs/sdk/models/shared/validation.md index 7ce9347aa..710a8eb13 100644 --- a/lending/docs/sdk/models/shared/validation.md +++ b/lending/docs/sdk/models/shared/validation.md @@ -1,18 +1,18 @@ -# Validation - -A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. - -## Example Usage - -```typescript -import { Validation } from "@codat/lending/sdk/models/shared"; - -let value: Validation = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `errors` | [shared.ValidationItem](../../../sdk/models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | +# Validation + +A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + +## Example Usage + +```typescript +import { Validation } from "@codat/lending/sdk/models/shared"; + +let value: Validation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `errors` | [shared.ValidationItem](../../../sdk/models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | | `warnings` | [shared.ValidationItem](../../../sdk/models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/validationitem.md b/lending/docs/sdk/models/shared/validationitem.md index ff48a239e..25c3d8e24 100644 --- a/lending/docs/sdk/models/shared/validationitem.md +++ b/lending/docs/sdk/models/shared/validationitem.md @@ -1,17 +1,17 @@ -# ValidationItem - -## Example Usage - -```typescript -import { ValidationItem } from "@codat/lending/sdk/models/shared"; - -let value: ValidationItem = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `itemId` | *string* | :heavy_minus_sign: | Unique identifier for a validation item. | -| `message` | *string* | :heavy_minus_sign: | A message outlining validation item's issue. | +# ValidationItem + +## Example Usage + +```typescript +import { ValidationItem } from "@codat/lending/sdk/models/shared"; + +let value: ValidationItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `itemId` | *string* | :heavy_minus_sign: | Unique identifier for a validation item. | +| `message` | *string* | :heavy_minus_sign: | A message outlining validation item's issue. | | `validatorName` | *string* | :heavy_minus_sign: | Name of validator. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/validdatatypelinks.md b/lending/docs/sdk/models/shared/validdatatypelinks.md index b008d0d27..35e5b0b0e 100644 --- a/lending/docs/sdk/models/shared/validdatatypelinks.md +++ b/lending/docs/sdk/models/shared/validdatatypelinks.md @@ -1,57 +1,57 @@ -# ValidDataTypeLinks - -When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. - -For example, `validDatatypeLinks` might indicate the following references: - -- Which tax rates are valid to use on the line item of a bill. -- Which items can be used when creating an invoice. - -You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. - -## `validDatatypeLinks` example - -The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. - -```json validDatatypeLinks for an account -{ - "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - "nominalCode": "090", - "name": "Business Bank Account", - #... - "validDatatypeLinks": [ - { - "property": "Id", - "links": [ - "Payment.AccountRef.Id", - "BillPayment.AccountRef.Id", - "DirectIncome.LineItems.AccountRef.Id", - "DirectCost.LineItems.AccountRef.Id" - ] - } - ] - } -``` - - - -## Support for `validDatatypeLinks` - -Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. - -If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. - -## Example Usage - -```typescript -import { ValidDataTypeLinks } from "@codat/lending/sdk/models/shared"; - -let value: ValidDataTypeLinks = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | +# ValidDataTypeLinks + +When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. + +For example, `validDatatypeLinks` might indicate the following references: + +- Which tax rates are valid to use on the line item of a bill. +- Which items can be used when creating an invoice. + +You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. + +## `validDatatypeLinks` example + +The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. + +```json validDatatypeLinks for an account +{ + "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", + "nominalCode": "090", + "name": "Business Bank Account", + #... + "validDatatypeLinks": [ + { + "property": "Id", + "links": [ + "Payment.AccountRef.Id", + "BillPayment.AccountRef.Id", + "DirectIncome.LineItems.AccountRef.Id", + "DirectCost.LineItems.AccountRef.Id" + ] + } + ] + } +``` + + + +## Support for `validDatatypeLinks` + +Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. + +If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + +## Example Usage + +```typescript +import { ValidDataTypeLinks } from "@codat/lending/sdk/models/shared"; + +let value: ValidDataTypeLinks = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | | `links` | *string*[] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/weblink.md b/lending/docs/sdk/models/shared/weblink.md index 7e60d511d..baa678127 100644 --- a/lending/docs/sdk/models/shared/weblink.md +++ b/lending/docs/sdk/models/shared/weblink.md @@ -1,21 +1,21 @@ -# WebLink - -Weblink associated with the company. - -## Example Usage - -```typescript -import { WebLink } from "@codat/lending/sdk/models/shared"; - -let value: WebLink = { - type: "Website", - url: "https://codat.io", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `type` | [shared.WebLinkType](../../../sdk/models/shared/weblinktype.md) | :heavy_minus_sign: | The type of the weblink. | +# WebLink + +Weblink associated with the company. + +## Example Usage + +```typescript +import { WebLink } from "@codat/lending/sdk/models/shared"; + +let value: WebLink = { + type: "Website", + url: "https://codat.io", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `type` | [shared.WebLinkType](../../../sdk/models/shared/weblinktype.md) | :heavy_minus_sign: | The type of the weblink. | | `url` | *string* | :heavy_minus_sign: | The full URL for the weblink. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/weblinktype.md b/lending/docs/sdk/models/shared/weblinktype.md index 454b29bc0..7ab25e124 100644 --- a/lending/docs/sdk/models/shared/weblinktype.md +++ b/lending/docs/sdk/models/shared/weblinktype.md @@ -1,17 +1,15 @@ -# WebLinkType - -The type of the weblink. - -## Example Usage - -```typescript -import { WebLinkType } from "@codat/lending/sdk/models/shared"; - -let value: WebLinkType = "Social"; -``` - -## Values - -```typescript -"Website" | "Social" | "Unknown" +# WebLinkType + +## Example Usage + +```typescript +import { WebLinkType } from "@codat/lending/sdk/models/shared"; + +let value: WebLinkType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/withholdingtax.md b/lending/docs/sdk/models/shared/withholdingtax.md index edbbd1dc7..917ac2fdc 100644 --- a/lending/docs/sdk/models/shared/withholdingtax.md +++ b/lending/docs/sdk/models/shared/withholdingtax.md @@ -1,20 +1,19 @@ -# WithholdingTax - -## Example Usage - -```typescript -import { WithholdingTax } from "@codat/lending/sdk/models/shared"; -import { Decimal } from "@codat/lending/sdk/types"; - -let value: WithholdingTax = { - name: "", - amount: new Decimal("2661.3"), -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `name` | *string* | :heavy_check_mark: | Name assigned to withheld tax. | -| `amount` | *Decimal* | :heavy_check_mark: | Amount of tax withheld. | \ No newline at end of file +# WithholdingTax + +## Example Usage + +```typescript +import { WithholdingTax } from "@codat/lending/sdk/models/shared"; + +let value: WithholdingTax = { + name: "string", + amount: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `name` | *string* | :heavy_check_mark: | Name assigned to withheld tax. | +| `amount` | *Decimal | number* | :heavy_check_mark: | Amount of tax withheld. | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/zero.md b/lending/docs/sdk/models/shared/zero.md index aecb7dcb6..8f5096ce2 100644 --- a/lending/docs/sdk/models/shared/zero.md +++ b/lending/docs/sdk/models/shared/zero.md @@ -1,21 +1,17 @@ -# Zero - -Links the current record line to the underlying record line that created it. - -For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. - -## Example Usage - -```typescript -import { Zero } from "@codat/lending/sdk/models/shared"; - -let value: Zero = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record. | -| `dataType` | [shared.ZeroDataType](../../../sdk/models/shared/zerodatatype.md) | :heavy_minus_sign: | Allowed name of the 'dataType'. | -| `lineNumber` | *string* | :heavy_minus_sign: | Line number of the underlying record. | \ No newline at end of file +# Zero + +## Example Usage + +```typescript +import { Zero } from "@codat/lending/sdk/models/shared"; + +let value: Zero = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `dataType` | *shared.BillLineItemDataType* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `lineNumber` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdk/models/shared/zerodatatype.md b/lending/docs/sdk/models/shared/zerodatatype.md index 1ec41221b..ef5a03108 100644 --- a/lending/docs/sdk/models/shared/zerodatatype.md +++ b/lending/docs/sdk/models/shared/zerodatatype.md @@ -1,17 +1,15 @@ -# ZeroDataType - -Allowed name of the 'dataType'. - -## Example Usage - -```typescript -import { ZeroDataType } from "@codat/lending/sdk/models/shared"; - -let value: ZeroDataType = "purchaseOrders"; -``` - -## Values - -```typescript -"purchaseOrders" | "bills" +# ZeroDataType + +## Example Usage + +```typescript +import { ZeroDataType } from "@codat/lending/sdk/models/shared"; + +let value: ZeroDataType = ""; +``` + +## Values + +```typescript + ``` \ No newline at end of file diff --git a/lending/docs/sdk/models/webhooks/reportscreditmodelgeneratesuccessfulreportgenerationwebhook.md b/lending/docs/sdk/models/webhooks/reportscreditmodelgeneratesuccessfulreportgenerationwebhook.md index 35423ca5c..55fdde204 100644 --- a/lending/docs/sdk/models/webhooks/reportscreditmodelgeneratesuccessfulreportgenerationwebhook.md +++ b/lending/docs/sdk/models/webhooks/reportscreditmodelgeneratesuccessfulreportgenerationwebhook.md @@ -1,30 +1,18 @@ -# ReportsCreditModelGenerateSuccessfulReportGenerationWebhook - -## Example Usage - -```typescript -import { ReportsCreditModelGenerateSuccessfulReportGenerationWebhook } from "@codat/lending/sdk/models/webhooks"; - -let value: ReportsCreditModelGenerateSuccessfulReportGenerationWebhook = { - id: "ba29118f-5406-4e59-b05c-ba307ca38d01", - eventType: "reports.categorizedBankStatement.generate.successful", - generatedDate: "2022-10-23T00:00:00Z", - payload: { - id: "a78e2625-7190-4d94-ae3b-071320451026", - referenceCompany: { - id: "8a210b68-6988-11ed-a1eb-0242ac120002", - name: "Codat Ltd.", - description: "Requested early access to the new financing scheme.", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the event. | ba29118f-5406-4e59-b05c-ba307ca38d01 | -| `eventType` | *string* | :heavy_minus_sign: | The type of event. | **Example 1:** reports.categorizedBankStatement.generate.successful
**Example 2:** reports.creditModel.generate.successful | -| `generatedDate` | *string* | :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. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | -| `payload` | [shared.ReportGenerationPayload](../../../sdk/models/shared/reportgenerationpayload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +# ReportsCreditModelGenerateSuccessfulReportGenerationWebhook + +## Example Usage + +```typescript +import { ReportsCreditModelGenerateSuccessfulReportGenerationWebhook } from "@codat/lending/sdk/models/webhooks"; + +let value: ReportsCreditModelGenerateSuccessfulReportGenerationWebhook = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `eventType` | *string* | :heavy_minus_sign: | N/A | +| `generatedDate` | *string* | :heavy_minus_sign: | N/A | +| `payload` | [shared.ReportGenerationPayload](../../../sdk/models/shared/reportgenerationpayload.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/lending/docs/sdks/accountbalances/README.md b/lending/docs/sdks/accountbalances/README.md index 8f98ca8da..ae42b6786 100644 --- a/lending/docs/sdks/accountbalances/README.md +++ b/lending/docs/sdks/accountbalances/README.md @@ -1,148 +1,148 @@ -# Banking.AccountBalances - -## Overview - -### Available Operations - -* [list](#list) - List account balances - -## list - -The *List account balances* endpoint returns a list of [account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) for a given company's connection. - -[Account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) are balances for a bank account, including end-of-day batch balance or running balances per transaction. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Basiq - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.accountBalances.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingAccountBalancesList } from "@codat/lending/funcs/bankingAccountBalancesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingAccountBalancesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingAccountBalancesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Plaid - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.accountBalances.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingAccountBalancesList } from "@codat/lending/funcs/bankingAccountBalancesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingAccountBalancesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingAccountBalancesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListBankingAccountBalancesRequest](../../sdk/models/operations/listbankingaccountbalancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankingAccountBalances](../../sdk/models/shared/bankingaccountbalances.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Banking.AccountBalances + +## Overview + +### Available Operations + +* [list](#list) - List account balances + +## list + +The *List account balances* endpoint returns a list of [account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) for a given company's connection. + +[Account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) are balances for a bank account, including end-of-day batch balance or running balances per transaction. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Basiq + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.accountBalances.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingAccountBalancesList } from "@codat/lending/funcs/bankingAccountBalancesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingAccountBalancesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingAccountBalancesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Plaid + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.accountBalances.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingAccountBalancesList } from "@codat/lending/funcs/bankingAccountBalancesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingAccountBalancesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingAccountBalancesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBankingAccountBalancesRequest](../../sdk/models/operations/listbankingaccountbalancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankingAccountBalances](../../sdk/models/shared/bankingaccountbalances.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/accountingbankdata/README.md b/lending/docs/sdks/accountingbankdata/README.md index 59aa4b0c3..353f160a6 100644 --- a/lending/docs/sdks/accountingbankdata/README.md +++ b/lending/docs/sdks/accountingbankdata/README.md @@ -1,496 +1,496 @@ -# AccountingBankData - -## Overview - -Access bank transactions from an accounting software. - -### Available Operations - -* [listTransactions](#listtransactions) - List bank account transactions - -## listTransactions - -The *List account bank transactions* endpoint returns a list of [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company's connection. - -[Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.listTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataListTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataListTransactions failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.listTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataListTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataListTransactions failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.listTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataListTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataListTransactions failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.listTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataListTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataListTransactions failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.listTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataListTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataListTransactions failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.listTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataListTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataListTransactions failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.listTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataListTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataListTransactions failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.listTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataListTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataListTransactions failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingBankAccountTransactionsRequest](../../sdk/models/operations/listaccountingbankaccounttransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBankTransactions](../../sdk/models/shared/accountingbanktransactions.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountingBankData + +## Overview + +Access bank transactions from an accounting software. + +### Available Operations + +* [listTransactions](#listtransactions) - List bank account transactions + +## listTransactions + +The *List account bank transactions* endpoint returns a list of [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company's connection. + +[Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataListTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataListTransactions failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataListTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataListTransactions failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataListTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataListTransactions failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataListTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataListTransactions failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataListTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataListTransactions failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataListTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataListTransactions failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataListTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataListTransactions failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.listTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataListTransactions } from "@codat/lending/funcs/accountingBankDataListTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataListTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataListTransactions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingBankAccountTransactionsRequest](../../sdk/models/operations/listaccountingbankaccounttransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBankTransactions](../../sdk/models/shared/accountingbanktransactions.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/accounts/README.md b/lending/docs/sdks/accounts/README.md index eaa9c6e96..26132b96d 100644 --- a/lending/docs/sdks/accounts/README.md +++ b/lending/docs/sdks/accounts/README.md @@ -1,1941 +1,1941 @@ -# FinancialStatements.Accounts - -## Overview - -### Available Operations - -* [list](#list) - List accounts -* [get](#get) - Get account - -## list - -The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - -[Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingAccountsRequest](../../sdk/models/operations/listaccountingaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAccounts](../../sdk/models/shared/accountingaccounts.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get account* endpoint returns a single account for a given accountId. - -[Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsAccountsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingAccountRequest](../../sdk/models/operations/getaccountingaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAccount](../../sdk/models/shared/accountingaccount.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# FinancialStatements.Accounts + +## Overview + +### Available Operations + +* [list](#list) - List accounts +* [get](#get) - Get account + +## list + +The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. + +[Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsList } from "@codat/lending/funcs/financialStatementsAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingAccountsRequest](../../sdk/models/operations/listaccountingaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAccounts](../../sdk/models/shared/accountingaccounts.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get account* endpoint returns a single account for a given accountId. + +[Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsAccountsGet } from "@codat/lending/funcs/financialStatementsAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsAccountsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingAccountRequest](../../sdk/models/operations/getaccountingaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAccount](../../sdk/models/shared/accountingaccount.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/accounttransactions/README.md b/lending/docs/sdks/accounttransactions/README.md index 4e928fff1..ddf041746 100644 --- a/lending/docs/sdks/accounttransactions/README.md +++ b/lending/docs/sdks/accounttransactions/README.md @@ -1,610 +1,610 @@ -# Transactions.AccountTransactions - -## Overview - -### Available Operations - -* [list](#list) - List account transactions -* [get](#get) - Get account transaction - -## list - -The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) for a given company's connection. - -[Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingAccountTransactionsRequest](../../sdk/models/operations/listaccountingaccounttransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAccountTransactions](../../sdk/models/shared/accountingaccounttransactions.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get account transaction* endpoint returns a single account transaction for a given accountTransactionId. - -[Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.accountTransactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsAccountTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountTransactionId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsAccountTransactionsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingAccountTransactionRequest](../../sdk/models/operations/getaccountingaccounttransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAccountTransaction](../../sdk/models/shared/accountingaccounttransaction.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Transactions.AccountTransactions + +## Overview + +### Available Operations + +* [list](#list) - List account transactions +* [get](#get) - Get account transaction + +## list + +The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) for a given company's connection. + +[Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsList } from "@codat/lending/funcs/transactionsAccountTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingAccountTransactionsRequest](../../sdk/models/operations/listaccountingaccounttransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAccountTransactions](../../sdk/models/shared/accountingaccounttransactions.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get account transaction* endpoint returns a single account transaction for a given accountTransactionId. + +[Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.accountTransactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsAccountTransactionsGet } from "@codat/lending/funcs/transactionsAccountTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsAccountTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountTransactionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsAccountTransactionsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingAccountTransactionRequest](../../sdk/models/operations/getaccountingaccounttransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAccountTransaction](../../sdk/models/shared/accountingaccounttransaction.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/balancesheet/README.md b/lending/docs/sdks/balancesheet/README.md index 9d11e701e..7e7bccfea 100644 --- a/lending/docs/sdks/balancesheet/README.md +++ b/lending/docs/sdks/balancesheet/README.md @@ -1,993 +1,993 @@ -# FinancialStatements.BalanceSheet - -## Overview - -### Available Operations - -* [getCategorizedAccounts](#getcategorizedaccounts) - Get categorized balance sheet statement -* [get](#get) - Get balance sheet - -## getCategorizedAccounts - -The *Get categorized balance sheet statement* endpoint returns a list of categorized accounts that appear on a company’s Balance Sheet along with a balance per financial statement date. - -Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.getCategorizedAccounts({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: "29-09-2020", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGetCategorizedAccounts } from "@codat/lending/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGetCategorizedAccounts(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: "29-09-2020", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGetCategorizedAccounts failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCategorizedBalanceSheetStatementRequest](../../sdk/models/operations/getcategorizedbalancesheetstatementrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.EnhancedFinancialReport](../../sdk/models/shared/enhancedfinancialreport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -Gets the latest balance sheet for a company. - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: MYOB AccountRight and Essentials - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.balanceSheet.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsBalanceSheetGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsBalanceSheetGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingBalanceSheetRequest](../../sdk/models/operations/getaccountingbalancesheetrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBalanceSheet](../../sdk/models/shared/accountingbalancesheet.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# FinancialStatements.BalanceSheet + +## Overview + +### Available Operations + +* [getCategorizedAccounts](#getcategorizedaccounts) - Get categorized balance sheet statement +* [get](#get) - Get balance sheet + +## getCategorizedAccounts + +The *Get categorized balance sheet statement* endpoint returns a list of categorized accounts that appear on a company’s Balance Sheet along with a balance per financial statement date. + +Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.getCategorizedAccounts({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "29-09-2020", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGetCategorizedAccounts } from "@codat/lending/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGetCategorizedAccounts(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "29-09-2020", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGetCategorizedAccounts failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCategorizedBalanceSheetStatementRequest](../../sdk/models/operations/getcategorizedbalancesheetstatementrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.EnhancedFinancialReport](../../sdk/models/shared/enhancedfinancialreport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Gets the latest balance sheet for a company. + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: MYOB AccountRight and Essentials + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.balanceSheet.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsBalanceSheetGet } from "@codat/lending/funcs/financialStatementsBalanceSheetGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsBalanceSheetGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsBalanceSheetGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingBalanceSheetRequest](../../sdk/models/operations/getaccountingbalancesheetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBalanceSheet](../../sdk/models/shared/accountingbalancesheet.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/bankaccounts/README.md b/lending/docs/sdks/bankaccounts/README.md index c928b4af4..596e4a839 100644 --- a/lending/docs/sdks/bankaccounts/README.md +++ b/lending/docs/sdks/bankaccounts/README.md @@ -1,595 +1,595 @@ -# LoanWriteback.BankAccounts - -## Overview - -### Available Operations - -* [getCreateUpdateModel](#getcreateupdatemodel) - Get create/update bank account model -* [create](#create) - Create bank account - -## getCreateUpdateModel - -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/lending-api#/schemas/BankAccount) for a given company and integration. - -[Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - -**Integration-specific behavior** - -See the *response examples* for integration-specific indicative models. - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCreateUpdateBankAccountsModelRequest](../../sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company's connection. - -[Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - -**Integration-specific behavior** - -Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/lending-api#/operations/get-create-update-bankAccounts-model). - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankAccounts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingBankAccount: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - currency: "GBP", - status: "Active", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankAccountsCreate } from "@codat/lending/funcs/loanWritebackBankAccountsCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankAccountsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingBankAccount: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - currency: "GBP", - status: "Active", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankAccountsCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateBankAccountRequest](../../sdk/models/operations/createbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreateBankAccountResponse](../../sdk/models/shared/accountingcreatebankaccountresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.BankAccounts + +## Overview + +### Available Operations + +* [getCreateUpdateModel](#getcreateupdatemodel) - Get create/update bank account model +* [create](#create) - Create bank account + +## getCreateUpdateModel + +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/lending-api#/schemas/BankAccount) for a given company and integration. + +[Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + +**Integration-specific behavior** + +See the *response examples* for integration-specific indicative models. + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateUpdateBankAccountsModelRequest](../../sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company's connection. + +[Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + +**Integration-specific behavior** + +Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/lending-api#/operations/get-create-update-bankAccounts-model). + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankAccounts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingBankAccount: { + currency: "GBP", + status: "Active", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankAccountsCreate } from "@codat/lending/funcs/loanWritebackBankAccountsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankAccountsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingBankAccount: { + currency: "GBP", + status: "Active", + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankAccountsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateBankAccountRequest](../../sdk/models/operations/createbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreateBankAccountResponse](../../sdk/models/shared/accountingcreatebankaccountresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/bankstatements/README.md b/lending/docs/sdks/bankstatements/README.md index e160fd67a..9480a3d9c 100644 --- a/lending/docs/sdks/bankstatements/README.md +++ b/lending/docs/sdks/bankstatements/README.md @@ -1,490 +1,670 @@ -# BankStatements - -## Overview - -Retrieve banking data from linked bank accounts. - -### Available Operations - -* [getUploadConfiguration](#getuploadconfiguration) - Get upload configuration -* [setUploadConfiguration](#setuploadconfiguration) - Set upload configuration -* [startUploadSession](#startuploadsession) - Start upload session -* [uploadBankStatementData](#uploadbankstatementdata) - Upload data -* [endUploadSession](#enduploadsession) - End upload session - -## getUploadConfiguration - -Use the *Get upload configuration* endpoint to view the existing bank statement upload configuration for the specified data connection. - -With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. - -When you use the [*Upload data*](https://docs.codat.io/lending-api#/operations/upload-bank-statement-data) endpoint next, you must upload the data for the account you configured. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.bankStatements.getUploadConfiguration({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankStatementsGetUploadConfiguration } from "@codat/lending/funcs/bankStatementsGetUploadConfiguration.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankStatementsGetUploadConfiguration(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankStatementsGetUploadConfiguration failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBankStatementUploadConfigurationRequest](../../sdk/models/operations/getbankstatementuploadconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankStatementUploadConfiguration](../../sdk/models/shared/bankstatementuploadconfiguration.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## setUploadConfiguration - -Use the *Set upload configuration* endpoint to create bank statement upload configuration for the specified data connection. - -With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. - -Each data connection can only have one configuration for each company and external account ID combination. You will receive a Bad Request response if you try to set it again. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.bankStatements.setUploadConfiguration({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - bankStatementUploadConfiguration: { - source: "codat", - accountId: "abc123-ABC", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankStatementsSetUploadConfiguration } from "@codat/lending/funcs/bankStatementsSetUploadConfiguration.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankStatementsSetUploadConfiguration(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - bankStatementUploadConfiguration: { - source: "codat", - accountId: "abc123-ABC", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankStatementsSetUploadConfiguration failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SetBankStatementUploadConfigurationRequest](../../sdk/models/operations/setbankstatementuploadconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankStatementUploadConfiguration](../../sdk/models/shared/bankstatementuploadconfiguration.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## startUploadSession - -Use the *Start upload session* endpoint to initiate a bank statement upload session for a given company. - -A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. - -You can only have one active session per data type at a time. You can complete or cancel a session using the [*End upload session*](https://docs.codat.io/lending-api#/operations/end-bank-statement-upload-session) endpoint. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.bankStatements.startUploadSession({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankStatementsStartUploadSession } from "@codat/lending/funcs/bankStatementsStartUploadSession.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankStatementsStartUploadSession(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankStatementsStartUploadSession failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.StartBankStatementUploadSessionRequest](../../sdk/models/operations/startbankstatementuploadsessionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PullOperation](../../sdk/models/shared/pulloperation.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## uploadBankStatementData - -During an active session, use the **Upload data* endpoint to uploads a page of bank accounts or bank transactions data to the session. - -Make sure you created configuration for the account using the [*Set upload configuration*](https://docs.codat.io/lending-api#/operations/set-bank-statement-upload-configuration) endpoint before attempting an upload. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - await codatLending.bankStatements.uploadBankStatementData({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - datasetId: "f0095e43-88a7-4395-9f2c-1d5226e1c9e5", - requestBody: { - "results": [ - { - "id": "1703194f-7805-4da8-bac0-2ba5da4a4216", - "name": "Business Current Account", - "informalName": "Codat", - "holder": "Codat Ltd", - "type": "Debit", - "balance": { - "available": -459987.97, - "current": -459964.9, - "limit": 5000, - }, - "identifiers": { - "type": "Depository", - "subtype": "checking", - "number": "46762629", - "bankCode": 9911, - "iban": "GB29 LOYD 4773 2346 7626 29", - "bic": "LOYDGB21006", - "maskedAccountNumber": "LOYDGB21006", - }, - "currency": "GBP", - "institution": { - "id": "lloyds-bank", - "name": "Lloyds Bank", - }, - "modifiedDate": "2022-05-23T16:32:50Z", - "sourceModifiedDate": "2021-08-14T05:04:12", - }, - ], - }, - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankStatementsUploadBankStatementData } from "@codat/lending/funcs/bankStatementsUploadBankStatementData.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankStatementsUploadBankStatementData(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - datasetId: "f0095e43-88a7-4395-9f2c-1d5226e1c9e5", - requestBody: { - "results": [ - { - "id": "1703194f-7805-4da8-bac0-2ba5da4a4216", - "name": "Business Current Account", - "informalName": "Codat", - "holder": "Codat Ltd", - "type": "Debit", - "balance": { - "available": -459987.97, - "current": -459964.9, - "limit": 5000, - }, - "identifiers": { - "type": "Depository", - "subtype": "checking", - "number": "46762629", - "bankCode": 9911, - "iban": "GB29 LOYD 4773 2346 7626 29", - "bic": "LOYDGB21006", - "maskedAccountNumber": "LOYDGB21006", - }, - "currency": "GBP", - "institution": { - "id": "lloyds-bank", - "name": "Lloyds Bank", - }, - "modifiedDate": "2022-05-23T16:32:50Z", - "sourceModifiedDate": "2021-08-14T05:04:12", - }, - ], - }, - }); - if (res.ok) { - const { value: result } = res; - - } else { - console.log("bankStatementsUploadBankStatementData failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UploadBankStatementDataRequest](../../sdk/models/operations/uploadbankstatementdatarequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## endUploadSession - -Use the *End upload session* endpoint to finalize a bank statement upload session. Include a `status` in the request body to indicate if you want to cancel the processing of the dataset or trigger the ingestion and enrichment of the data. - -A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - await codatLending.bankStatements.endUploadSession({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - datasetId: "79c714cf-8643-4bc6-9b4e-8d1a971222b7", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankStatementsEndUploadSession } from "@codat/lending/funcs/bankStatementsEndUploadSession.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankStatementsEndUploadSession(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - datasetId: "79c714cf-8643-4bc6-9b4e-8d1a971222b7", - }); - if (res.ok) { - const { value: result } = res; - - } else { - console.log("bankStatementsEndUploadSession failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.EndBankStatementUploadSessionRequest](../../sdk/models/operations/endbankstatementuploadsessionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# BankStatements + +## Overview + +Retrieve banking data from linked bank accounts. + +### Available Operations + +* [getUploadConfiguration](#getuploadconfiguration) - Get upload configuration +* [setUploadConfiguration](#setuploadconfiguration) - Set upload configuration +* [startUploadSession](#startuploadsession) - Start upload session +* [uploadBankStatementData](#uploadbankstatementdata) - Upload data +* [endUploadSession](#enduploadsession) - End upload session +* [getCategorizedBankStatementTransactions](#getcategorizedbankstatementtransactions) - Get categorized bank statement transactions +* [listCategorizedBankStatementAccounts](#listcategorizedbankstatementaccounts) - List categorized bank statement accounts +* [downloadCategorizedBankStatementExcel](#downloadcategorizedbankstatementexcel) - Download categorized bank statement Excel + +## getUploadConfiguration + +Use the *Get upload configuration* endpoint to view the existing bank statement upload configuration for the specified data connection. + +With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. + +When you use the [*Upload data*](https://docs.codat.io/lending-api#/operations/upload-bank-statement-data) endpoint next, you must upload the data for the account you configured. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.bankStatements.getUploadConfiguration({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankStatementsGetUploadConfiguration } from "@codat/lending/funcs/bankStatementsGetUploadConfiguration.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankStatementsGetUploadConfiguration(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankStatementsGetUploadConfiguration failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBankStatementUploadConfigurationRequest](../../sdk/models/operations/getbankstatementuploadconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankStatementUploadConfiguration](../../sdk/models/shared/bankstatementuploadconfiguration.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setUploadConfiguration + +Use the *Set upload configuration* endpoint to create bank statement upload configuration for the specified data connection. + +With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. + +Each data connection can only have one configuration for each company and external account ID combination. You will receive a Bad Request response if you try to set it again. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.bankStatements.setUploadConfiguration({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankStatementUploadConfiguration: { + source: "codat", + accountId: "abc123-ABC", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankStatementsSetUploadConfiguration } from "@codat/lending/funcs/bankStatementsSetUploadConfiguration.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankStatementsSetUploadConfiguration(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankStatementUploadConfiguration: { + source: "codat", + accountId: "abc123-ABC", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankStatementsSetUploadConfiguration failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetBankStatementUploadConfigurationRequest](../../sdk/models/operations/setbankstatementuploadconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankStatementUploadConfiguration](../../sdk/models/shared/bankstatementuploadconfiguration.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## startUploadSession + +Use the *Start upload session* endpoint to initiate a bank statement upload session for a given company. + +A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. + +You can only have one active session per data type at a time. You can complete or cancel a session using the [*End upload session*](https://docs.codat.io/lending-api#/operations/end-bank-statement-upload-session) endpoint. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.bankStatements.startUploadSession({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankStatementsStartUploadSession } from "@codat/lending/funcs/bankStatementsStartUploadSession.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankStatementsStartUploadSession(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankStatementsStartUploadSession failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartBankStatementUploadSessionRequest](../../sdk/models/operations/startbankstatementuploadsessionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PullOperation](../../sdk/models/shared/pulloperation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## uploadBankStatementData + +During an active session, use the **Upload data* endpoint to uploads a page of bank accounts or bank transactions data to the session. + +Make sure you created configuration for the account using the [*Set upload configuration*](https://docs.codat.io/lending-api#/operations/set-bank-statement-upload-configuration) endpoint before attempting an upload. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatLending.bankStatements.uploadBankStatementData({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankStatementsUploadBankStatementData } from "@codat/lending/funcs/bankStatementsUploadBankStatementData.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankStatementsUploadBankStatementData(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("bankStatementsUploadBankStatementData failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UploadBankStatementDataRequest](../../sdk/models/operations/uploadbankstatementdatarequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## endUploadSession + +Use the *End upload session* endpoint to finalize a bank statement upload session. Include a `status` in the request body to indicate if you want to cancel the processing of the dataset or trigger the ingestion and enrichment of the data. + +A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatLending.bankStatements.endUploadSession({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankStatementsEndUploadSession } from "@codat/lending/funcs/bankStatementsEndUploadSession.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankStatementsEndUploadSession(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("bankStatementsEndUploadSession failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EndBankStatementUploadSessionRequest](../../sdk/models/operations/endbankstatementuploadsessionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCategorizedBankStatementTransactions + +The *Get categorized bank statement transactions* endpoint returns fully categorized bank transactions for a company. Transaction data is obtained from the company's connected bank accounts. + +Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.bankStatements.getCategorizedBankStatementTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankStatementsGetCategorizedBankStatementTransactions } from "@codat/lending/funcs/bankStatementsGetCategorizedBankStatementTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankStatementsGetCategorizedBankStatementTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankStatementsGetCategorizedBankStatementTransactions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | GetCategorizedBankStatementTransactionsRequest | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[CategorizedBankStatementTransactions](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listCategorizedBankStatementAccounts + +The *Get categorized bank statement accounts* endpoint returns a list of bank accounts associated with categorized transactions for a company. + +Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.bankStatements.listCategorizedBankStatementAccounts({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankStatementsListCategorizedBankStatementAccounts } from "@codat/lending/funcs/bankStatementsListCategorizedBankStatementAccounts.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankStatementsListCategorizedBankStatementAccounts(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankStatementsListCategorizedBankStatementAccounts failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | ListCategorizedBankStatementAccountsRequest | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[CategorizedBankStatementAccounts](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## downloadCategorizedBankStatementExcel + +Use the *Download categorized bank statement Excel* endpoint to download the categorized bank statement Excel file. + +Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.bankStatements.downloadCategorizedBankStatementExcel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankStatementsDownloadCategorizedBankStatementExcel } from "@codat/lending/funcs/bankStatementsDownloadCategorizedBankStatementExcel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankStatementsDownloadCategorizedBankStatementExcel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankStatementsDownloadCategorizedBankStatementExcel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | DownloadCategorizedBankStatementExcelRequest | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[Uint8Array](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/banktransactions/README.md b/lending/docs/sdks/banktransactions/README.md index 21995b2e6..879728aeb 100644 --- a/lending/docs/sdks/banktransactions/README.md +++ b/lending/docs/sdks/banktransactions/README.md @@ -1,195 +1,195 @@ -# LoanWriteback.BankTransactions - -## Overview - -### Available Operations - -* [getCreateModel](#getcreatemodel) - Get create bank account transactions model -* [create](#create) - Create bank account transactions - -## getCreateModel - -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/lending-api#/schemas/BankTransactions) for a given company and integration. - -[Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - -**Integration-specific behavior** - -See the *response examples* for integration-specific indicative models. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankTransactions.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankTransactionsGetCreateModel } from "@codat/lending/funcs/loanWritebackBankTransactionsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankTransactionsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankTransactionsGetCreateModel failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCreateBankTransactionsModelRequest](../../sdk/models/operations/getcreatebanktransactionsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company's connection. - -[Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - -**Integration-specific behavior** - -Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/lending-api#/operations/get-create-bankTransactions-model). - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.bankTransactions.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - accountingCreateBankTransactions: { - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - transactions: [ - { - date: "2022-10-23T00:00:00Z", - }, - ], - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackBankTransactionsCreate } from "@codat/lending/funcs/loanWritebackBankTransactionsCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackBankTransactionsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - accountingCreateBankTransactions: { - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - transactions: [ - { - date: "2022-10-23T00:00:00Z", - }, - ], - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackBankTransactionsCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateBankTransactionsRequest](../../sdk/models/operations/createbanktransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreateBankTransactionsResponse](../../sdk/models/shared/accountingcreatebanktransactionsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.BankTransactions + +## Overview + +### Available Operations + +* [getCreateModel](#getcreatemodel) - Get create bank account transactions model +* [create](#create) - Create bank account transactions + +## getCreateModel + +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/lending-api#/schemas/BankTransactions) for a given company and integration. + +[Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. + +**Integration-specific behavior** + +See the *response examples* for integration-specific indicative models. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankTransactions.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankTransactionsGetCreateModel } from "@codat/lending/funcs/loanWritebackBankTransactionsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankTransactionsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankTransactionsGetCreateModel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateBankTransactionsModelRequest](../../sdk/models/operations/getcreatebanktransactionsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company's connection. + +[Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. + +**Integration-specific behavior** + +Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/lending-api#/operations/get-create-bankTransactions-model). + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.bankTransactions.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + accountingCreateBankTransactions: { + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + transactions: [ + { + date: "2022-10-23T00:00:00Z", + }, + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackBankTransactionsCreate } from "@codat/lending/funcs/loanWritebackBankTransactionsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackBankTransactionsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + accountingCreateBankTransactions: { + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + transactions: [ + { + date: "2022-10-23T00:00:00Z", + }, + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackBankTransactionsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateBankTransactionsRequest](../../sdk/models/operations/createbanktransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreateBankTransactionsResponse](../../sdk/models/shared/accountingcreatebanktransactionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/billcreditnotes/README.md b/lending/docs/sdks/billcreditnotes/README.md index faef766bb..5509a5bf6 100644 --- a/lending/docs/sdks/billcreditnotes/README.md +++ b/lending/docs/sdks/billcreditnotes/README.md @@ -1,1526 +1,1526 @@ -# AccountsPayable.BillCreditNotes - -## Overview - -### Available Operations - -* [list](#list) - List bill credit notes -* [get](#get) - Get bill credit note - -## list - -The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote) for a given company's connection. - -[Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingBillCreditNotesRequest](../../sdk/models/operations/listaccountingbillcreditnotesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBillCreditNotes](../../sdk/models/shared/accountingbillcreditnotes.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get bill credit note* endpoint returns a single bill credit note for a given billCreditNoteId. - -[Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billCreditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillCreditNotesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingBillCreditNoteRequest](../../sdk/models/operations/getaccountingbillcreditnoterequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBillCreditNote](../../sdk/models/shared/accountingbillcreditnote.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsPayable.BillCreditNotes + +## Overview + +### Available Operations + +* [list](#list) - List bill credit notes +* [get](#get) - Get bill credit note + +## list + +The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote) for a given company's connection. + +[Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesList } from "@codat/lending/funcs/accountsPayableBillCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingBillCreditNotesRequest](../../sdk/models/operations/listaccountingbillcreditnotesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBillCreditNotes](../../sdk/models/shared/accountingbillcreditnotes.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get bill credit note* endpoint returns a single bill credit note for a given billCreditNoteId. + +[Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillCreditNotesGet } from "@codat/lending/funcs/accountsPayableBillCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillCreditNotesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingBillCreditNoteRequest](../../sdk/models/operations/getaccountingbillcreditnoterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBillCreditNote](../../sdk/models/shared/accountingbillcreditnote.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/billpayments/README.md b/lending/docs/sdks/billpayments/README.md index 8ddcc6930..124d7d040 100644 --- a/lending/docs/sdks/billpayments/README.md +++ b/lending/docs/sdks/billpayments/README.md @@ -1,1630 +1,1630 @@ -# AccountsPayable.BillPayments - -## Overview - -### Available Operations - -* [list](#list) - List bill payments -* [get](#get) - Get bill payment - -## list - -The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment) for a given company's connection. - -[Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingBillPaymentsRequest](../../sdk/models/operations/listaccountingbillpaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBillPayments](../../sdk/models/shared/accountingbillpayments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get bill payment* endpoint returns a single bill payment for a given billPaymentId. - -[Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.billPayments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillPaymentsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingBillPaymentRequest](../../sdk/models/operations/getaccountingbillpaymentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBillPayment](../../sdk/models/shared/accountingbillpayment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsPayable.BillPayments + +## Overview + +### Available Operations + +* [list](#list) - List bill payments +* [get](#get) - Get bill payment + +## list + +The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment) for a given company's connection. + +[Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsList } from "@codat/lending/funcs/accountsPayableBillPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingBillPaymentsRequest](../../sdk/models/operations/listaccountingbillpaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBillPayments](../../sdk/models/shared/accountingbillpayments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get bill payment* endpoint returns a single bill payment for a given billPaymentId. + +[Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillPaymentsGet } from "@codat/lending/funcs/accountsPayableBillPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillPaymentsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingBillPaymentRequest](../../sdk/models/operations/getaccountingbillpaymentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBillPayment](../../sdk/models/shared/accountingbillpayment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/bills/README.md b/lending/docs/sdks/bills/README.md index 228f28423..53461be2b 100644 --- a/lending/docs/sdks/bills/README.md +++ b/lending/docs/sdks/bills/README.md @@ -1,2097 +1,2097 @@ -# AccountsPayable.Bills - -## Overview - -### Available Operations - -* [list](#list) - List bills -* [get](#get) - Get bill -* [listAttachments](#listattachments) - List bill attachments -* [getAttachment](#getattachment) - Get bill attachment -* [downloadAttachment](#downloadattachment) - Download bill attachment - -## list - -The *List bills* endpoint returns a list of [bills](https://docs.codat.io/lending-api#/schemas/Bill) for a given company's connection. - -[Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - -### Tips and traps - -To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat's cache. - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingBillsRequest](../../sdk/models/operations/listaccountingbillsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBills](../../sdk/models/shared/accountingbills.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get bill* endpoint returns a single bill for a given billId. - -[Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - -### Tips and traps - -To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat's cache. - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingBillRequest](../../sdk/models/operations/getaccountingbillrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBill](../../sdk/models/shared/accountingbill.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listAttachments - -The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. - -[Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.listAttachments({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsListAttachments } from "@codat/lending/funcs/accountsPayableBillsListAttachments.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsListAttachments(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsListAttachments failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingBillAttachmentsRequest](../../sdk/models/operations/listaccountingbillattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAttachment - -The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. - -[Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.getAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsGetAttachment } from "@codat/lending/funcs/accountsPayableBillsGetAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsGetAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsGetAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingBillAttachmentRequest](../../sdk/models/operations/getaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## downloadAttachment - -The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. - -[Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.bills.downloadAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableBillsDownloadAttachment } from "@codat/lending/funcs/accountsPayableBillsDownloadAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableBillsDownloadAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableBillsDownloadAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadAccountingBillAttachmentRequest](../../sdk/models/operations/downloadaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[ReadableStream](../../models/data.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsPayable.Bills + +## Overview + +### Available Operations + +* [list](#list) - List bills +* [get](#get) - Get bill +* [listAttachments](#listattachments) - List bill attachments +* [getAttachment](#getattachment) - Get bill attachment +* [downloadAttachment](#downloadattachment) - Download bill attachment + +## list + +The *List bills* endpoint returns a list of [bills](https://docs.codat.io/lending-api#/schemas/Bill) for a given company's connection. + +[Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + +### Tips and traps + +To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat's cache. + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsList } from "@codat/lending/funcs/accountsPayableBillsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingBillsRequest](../../sdk/models/operations/listaccountingbillsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBills](../../sdk/models/shared/accountingbills.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get bill* endpoint returns a single bill for a given billId. + +[Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + +### Tips and traps + +To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat's cache. + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGet } from "@codat/lending/funcs/accountsPayableBillsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingBillRequest](../../sdk/models/operations/getaccountingbillrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBill](../../sdk/models/shared/accountingbill.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listAttachments + +The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. + +[Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.listAttachments({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsListAttachments } from "@codat/lending/funcs/accountsPayableBillsListAttachments.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsListAttachments(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsListAttachments failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingBillAttachmentsRequest](../../sdk/models/operations/listaccountingbillattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAttachment + +The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. + +[Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.getAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsGetAttachment } from "@codat/lending/funcs/accountsPayableBillsGetAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsGetAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsGetAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingBillAttachmentRequest](../../sdk/models/operations/getaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## downloadAttachment + +The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. + +[Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.bills.downloadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableBillsDownloadAttachment } from "@codat/lending/funcs/accountsPayableBillsDownloadAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableBillsDownloadAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableBillsDownloadAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadAccountingBillAttachmentRequest](../../sdk/models/operations/downloadaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[ReadableStream](../../models/data.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/cashflow/README.md b/lending/docs/sdks/cashflow/README.md index 961c8d738..b60bb1ec1 100644 --- a/lending/docs/sdks/cashflow/README.md +++ b/lending/docs/sdks/cashflow/README.md @@ -1,363 +1,363 @@ -# FinancialStatements.CashFlow - -## Overview - -### Available Operations - -* [get](#get) - Get cash flow statement - -## get - -Gets the latest cash flow statement for a company. - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.cashFlow.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsCashFlowGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsCashFlowGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.cashFlow.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsCashFlowGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsCashFlowGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.cashFlow.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsCashFlowGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsCashFlowGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.cashFlow.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsCashFlowGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsCashFlowGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.cashFlow.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsCashFlowGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsCashFlowGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.cashFlow.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsCashFlowGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsCashFlowGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingCashFlowStatementRequest](../../sdk/models/operations/getaccountingcashflowstatementrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCashFlowStatement](../../sdk/models/shared/accountingcashflowstatement.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# FinancialStatements.CashFlow + +## Overview + +### Available Operations + +* [get](#get) - Get cash flow statement + +## get + +Gets the latest cash flow statement for a company. + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.cashFlow.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsCashFlowGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsCashFlowGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.cashFlow.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsCashFlowGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsCashFlowGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.cashFlow.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsCashFlowGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsCashFlowGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.cashFlow.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsCashFlowGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsCashFlowGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.cashFlow.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsCashFlowGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsCashFlowGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.cashFlow.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsCashFlowGet } from "@codat/lending/funcs/financialStatementsCashFlowGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsCashFlowGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsCashFlowGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingCashFlowStatementRequest](../../sdk/models/operations/getaccountingcashflowstatementrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCashFlowStatement](../../sdk/models/shared/accountingcashflowstatement.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/categorizedstatement/README.md b/lending/docs/sdks/categorizedstatement/README.md index 61ae87dc8..ee1031060 100644 --- a/lending/docs/sdks/categorizedstatement/README.md +++ b/lending/docs/sdks/categorizedstatement/README.md @@ -1,88 +1,88 @@ -# Banking.CategorizedStatement - -## Overview - -### Available Operations - -* [get](#get) - Get categorized bank statement - -## get - -> **Categorization engine** -> -> The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. - -The _Get categorized bank statement_ endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.categorizedStatement.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingCategorizedStatementGet } from "@codat/lending/funcs/bankingCategorizedStatementGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingCategorizedStatementGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingCategorizedStatementGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCategorizedBankStatementRequest](../../sdk/models/operations/getcategorizedbankstatementrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.EnhancedCashFlowTransactions](../../sdk/models/shared/enhancedcashflowtransactions.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Banking.CategorizedStatement + +## Overview + +### Available Operations + +* [get](#get) - Get categorized bank statement + +## get + +> **Categorization engine** +> +> The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. + +The _Get categorized bank statement_ endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.categorizedStatement.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingCategorizedStatementGet } from "@codat/lending/funcs/bankingCategorizedStatementGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingCategorizedStatementGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingCategorizedStatementGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCategorizedBankStatementRequest](../../sdk/models/operations/getcategorizedbankstatementrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.EnhancedCashFlowTransactions](../../sdk/models/shared/enhancedcashflowtransactions.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingaccounts/README.md b/lending/docs/sdks/codatlendingaccounts/README.md index c857c5d1b..9ebe45c9d 100644 --- a/lending/docs/sdks/codatlendingaccounts/README.md +++ b/lending/docs/sdks/codatlendingaccounts/README.md @@ -1,1366 +1,1366 @@ -# AccountingBankData.Accounts - -## Overview - -### Available Operations - -* [list](#list) - List bank accounts -* [get](#get) - Get bank account - -## list - -The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company's connection. - -[Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingBankAccountsRequest](../../sdk/models/operations/listaccountingbankaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBankAccounts](../../sdk/models/shared/accountingbankaccounts.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get bank account* endpoint returns a single account for a given accountId. - -[Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountingBankData.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountingBankDataAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountingBankDataAccountsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingBankAccountRequest](../../sdk/models/operations/getaccountingbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingBankAccount](../../sdk/models/shared/accountingbankaccount.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountingBankData.Accounts + +## Overview + +### Available Operations + +* [list](#list) - List bank accounts +* [get](#get) - Get bank account + +## list + +The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company's connection. + +[Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsList } from "@codat/lending/funcs/accountingBankDataAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingBankAccountsRequest](../../sdk/models/operations/listaccountingbankaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBankAccounts](../../sdk/models/shared/accountingbankaccounts.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get bank account* endpoint returns a single account for a given accountId. + +[Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountingBankData.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountingBankDataAccountsGet } from "@codat/lending/funcs/accountingBankDataAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountingBankDataAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountingBankDataAccountsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingBankAccountRequest](../../sdk/models/operations/getaccountingbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingBankAccount](../../sdk/models/shared/accountingbankaccount.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingbankingaccounts/README.md b/lending/docs/sdks/codatlendingbankingaccounts/README.md index d7bbb4f7e..e5b7c88bd 100644 --- a/lending/docs/sdks/codatlendingbankingaccounts/README.md +++ b/lending/docs/sdks/codatlendingbankingaccounts/README.md @@ -1,285 +1,285 @@ -# Banking.Accounts - -## Overview - -### Available Operations - -* [list](#list) - List accounts -* [get](#get) - Get account - -## list - -The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - -[Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Basiq - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingAccountsList } from "@codat/lending/funcs/bankingAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingAccountsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Plaid - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.accounts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingAccountsList } from "@codat/lending/funcs/bankingAccountsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingAccountsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingAccountsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListBankingAccountsRequest](../../sdk/models/operations/listbankingaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankingAccounts](../../sdk/models/shared/bankingaccounts.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get account* endpoint returns a single account for a given accountId. - -[Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). - -### Example Usage: Basiq - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingAccountsGet } from "@codat/lending/funcs/bankingAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingAccountsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Plaid - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.accounts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingAccountsGet } from "@codat/lending/funcs/bankingAccountsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingAccountsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingAccountsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBankingAccountRequest](../../sdk/models/operations/getbankingaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankingAccount](../../sdk/models/shared/bankingaccount.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Banking.Accounts + +## Overview + +### Available Operations + +* [list](#list) - List accounts +* [get](#get) - Get account + +## list + +The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. + +[Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Basiq + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingAccountsList } from "@codat/lending/funcs/bankingAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingAccountsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Plaid + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.accounts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingAccountsList } from "@codat/lending/funcs/bankingAccountsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingAccountsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingAccountsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBankingAccountsRequest](../../sdk/models/operations/listbankingaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankingAccounts](../../sdk/models/shared/bankingaccounts.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get account* endpoint returns a single account for a given accountId. + +[Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). + +### Example Usage: Basiq + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingAccountsGet } from "@codat/lending/funcs/bankingAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingAccountsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Plaid + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingAccountsGet } from "@codat/lending/funcs/bankingAccountsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingAccountsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingAccountsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBankingAccountRequest](../../sdk/models/operations/getbankingaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankingAccount](../../sdk/models/shared/bankingaccount.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingcustomers/README.md b/lending/docs/sdks/codatlendingcustomers/README.md index 7b34c6318..6c2769599 100644 --- a/lending/docs/sdks/codatlendingcustomers/README.md +++ b/lending/docs/sdks/codatlendingcustomers/README.md @@ -1,1150 +1,1150 @@ -# Sales.Customers - -## Overview - -### Available Operations - -* [list](#list) - List customers -* [get](#get) - Get customer - -## list - -The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company's connection. - -[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and recieve goods and/or services from the SMB. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: PrestaShop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Stripe Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: WooCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommerceCustomersRequest](../../sdk/models/operations/listcommercecustomersrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceCustomers](../../sdk/models/shared/commercecustomers.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get customer* endpoint returns a single customer for a given customerId. - -[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and receive goods and/or services from the SMB. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: PrestaShop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Stripe Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: WooCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesCustomersGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceCustomerRequest](../../sdk/models/operations/getcommercecustomerrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceCustomer](../../sdk/models/shared/commercecustomer.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Customers + +## Overview + +### Available Operations + +* [list](#list) - List customers +* [get](#get) - Get customer + +## list + +The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company's connection. + +[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and recieve goods and/or services from the SMB. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: PrestaShop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Stripe Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: WooCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersList } from "@codat/lending/funcs/salesCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommerceCustomersRequest](../../sdk/models/operations/listcommercecustomersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceCustomers](../../sdk/models/shared/commercecustomers.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get customer* endpoint returns a single customer for a given customerId. + +[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and receive goods and/or services from the SMB. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: PrestaShop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Stripe Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: WooCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesCustomersGet } from "@codat/lending/funcs/salesCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesCustomersGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceCustomerRequest](../../sdk/models/operations/getcommercecustomerrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceCustomer](../../sdk/models/shared/commercecustomer.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingdirectcosts/README.md b/lending/docs/sdks/codatlendingdirectcosts/README.md index d108c8ae5..e6280d7a1 100644 --- a/lending/docs/sdks/codatlendingdirectcosts/README.md +++ b/lending/docs/sdks/codatlendingdirectcosts/README.md @@ -1,1279 +1,1287 @@ -# LoanWriteback.DirectCosts - -## Overview - -### Available Operations - -* [getCreateModel](#getcreatemodel) - Get create direct cost model -* [create](#create) - Create direct cost - -## getCreateModel - -The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company and integration. - -[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - -**Integration-specific behavior** - -See the *response examples* for integration-specific indicative models. - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCreateDirectCostsModelRequest](../../sdk/models/operations/getcreatedirectcostsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company's connection. - -[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - -**Integration-specific behavior** - -Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/lending-api#/operations/get-create-directCosts-model). - -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - issueDate: "2023-02-12", - currency: "GBP", - lineItems: [ - { - unitAmount: new Decimal("15"), - quantity: new Decimal("1"), - subTotal: new Decimal("15"), - accountRef: { - id: "288", - }, - }, - ], - paymentAllocations: [ - { - payment: { - accountRef: { - id: "750-1", - }, - }, - allocation: {}, - }, - ], - subTotal: new Decimal("15"), - taxAmount: new Decimal("0"), - totalAmount: new Decimal("15"), - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - issueDate: "2023-02-12", - currency: "GBP", - lineItems: [ - { - unitAmount: new Decimal("15"), - quantity: new Decimal("1"), - subTotal: new Decimal("15"), - accountRef: { - id: "288", - }, - }, - ], - paymentAllocations: [ - { - payment: { - accountRef: { - id: "750-1", - }, - }, - allocation: {}, - }, - ], - subTotal: new Decimal("15"), - taxAmount: new Decimal("0"), - totalAmount: new Decimal("15"), - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Malformed query - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - issueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [], - paymentAllocations: [ - { - payment: { - accountRef: {}, - currency: "GBP", - paidOnDate: "2022-10-23T00:00:00Z", - }, - allocation: { - currency: "GBP", - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - }, - ], - subTotal: new Decimal("3566.34"), - taxAmount: new Decimal("7664.68"), - totalAmount: new Decimal("208.93"), - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - issueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - lineItems: [], - paymentAllocations: [ - { - payment: { - accountRef: {}, - currency: "GBP", - paidOnDate: "2022-10-23T00:00:00Z", - }, - allocation: { - currency: "GBP", - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - }, - ], - subTotal: new Decimal("3566.34"), - taxAmount: new Decimal("7664.68"), - totalAmount: new Decimal("208.93"), - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - reference: "test ref", - note: "directCost 21/03 09.20", - contactRef: { - id: "80000001-1671793885", - dataType: "suppliers", - }, - issueDate: "2023-03-21T10:19:52.223Z", - currency: "USD", - lineItems: [ - { - description: "test description line 1", - unitAmount: new Decimal("7"), - quantity: new Decimal("1"), - discountAmount: new Decimal("0"), - discountPercentage: new Decimal("0"), - subTotal: new Decimal("99"), - taxAmount: new Decimal("360"), - totalAmount: new Decimal("70"), - accountRef: { - id: "8000000D-1671793811", - name: "Purchases - Hardware for Resale", - }, - itemRef: { - id: "80000001-1674566705", - name: "item test", - }, - trackingCategoryRefs: [ - { - id: "80000001-1674553252", - name: "Class 1", - }, - ], - }, - ], - paymentAllocations: [ - { - payment: { - note: "payment allocations note", - reference: "payment allocations reference", - accountRef: { - id: "80000028-1671794219", - name: "Bank Account 1", - }, - paidOnDate: "2023-01-28T10:19:52.223Z", - totalAmount: new Decimal("54"), - }, - allocation: { - currencyRate: new Decimal("0"), - allocatedOnDate: "2023-01-29T10:19:52.223Z", - totalAmount: new Decimal("88"), - }, - }, - ], - subTotal: new Decimal("362"), - taxAmount: new Decimal("4"), - totalAmount: new Decimal("366"), - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - reference: "test ref", - note: "directCost 21/03 09.20", - contactRef: { - id: "80000001-1671793885", - dataType: "suppliers", - }, - issueDate: "2023-03-21T10:19:52.223Z", - currency: "USD", - lineItems: [ - { - description: "test description line 1", - unitAmount: new Decimal("7"), - quantity: new Decimal("1"), - discountAmount: new Decimal("0"), - discountPercentage: new Decimal("0"), - subTotal: new Decimal("99"), - taxAmount: new Decimal("360"), - totalAmount: new Decimal("70"), - accountRef: { - id: "8000000D-1671793811", - name: "Purchases - Hardware for Resale", - }, - itemRef: { - id: "80000001-1674566705", - name: "item test", - }, - trackingCategoryRefs: [ - { - id: "80000001-1674553252", - name: "Class 1", - }, - ], - }, - ], - paymentAllocations: [ - { - payment: { - note: "payment allocations note", - reference: "payment allocations reference", - accountRef: { - id: "80000028-1671794219", - name: "Bank Account 1", - }, - paidOnDate: "2023-01-28T10:19:52.223Z", - totalAmount: new Decimal("54"), - }, - allocation: { - currencyRate: new Decimal("0"), - allocatedOnDate: "2023-01-29T10:19:52.223Z", - totalAmount: new Decimal("88"), - }, - }, - ], - subTotal: new Decimal("362"), - taxAmount: new Decimal("4"), - totalAmount: new Decimal("366"), - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - reference: "test ref", - note: "Test 1", - issueDate: "2023-03-31T00:00:00", - currency: "USD", - currencyRate: new Decimal("0.5"), - lineItems: [ - { - unitAmount: new Decimal("9.99"), - quantity: new Decimal("1"), - subTotal: new Decimal("9.99"), - taxAmount: new Decimal("2"), - totalAmount: new Decimal("11.99"), - accountRef: { - id: "195", - }, - }, - ], - paymentAllocations: [ - { - payment: { - id: "4355", - note: "test note", - reference: "test reference", - accountRef: { - id: "348", - name: "CMRR Renewal", - }, - currency: "USD", - paidOnDate: "2023-03-31T00:00:00", - totalAmount: new Decimal("11.99"), - }, - allocation: { - currency: "USD", - allocatedOnDate: "2023-03-31T00:00:00", - totalAmount: new Decimal("11.99"), - }, - }, - ], - subTotal: new Decimal("9.99"), - taxAmount: new Decimal("2"), - totalAmount: new Decimal("11.99"), - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - reference: "test ref", - note: "Test 1", - issueDate: "2023-03-31T00:00:00", - currency: "USD", - currencyRate: new Decimal("0.5"), - lineItems: [ - { - unitAmount: new Decimal("9.99"), - quantity: new Decimal("1"), - subTotal: new Decimal("9.99"), - taxAmount: new Decimal("2"), - totalAmount: new Decimal("11.99"), - accountRef: { - id: "195", - }, - }, - ], - paymentAllocations: [ - { - payment: { - id: "4355", - note: "test note", - reference: "test reference", - accountRef: { - id: "348", - name: "CMRR Renewal", - }, - currency: "USD", - paidOnDate: "2023-03-31T00:00:00", - totalAmount: new Decimal("11.99"), - }, - allocation: { - currency: "USD", - allocatedOnDate: "2023-03-31T00:00:00", - totalAmount: new Decimal("11.99"), - }, - }, - ], - subTotal: new Decimal("9.99"), - taxAmount: new Decimal("2"), - totalAmount: new Decimal("11.99"), - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.directCosts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - reference: "Scenario One neg DC", - contactRef: { - id: "699f0091-b127-4796-9f15-41a2f42abeb2", - dataType: "suppliers", - }, - issueDate: "2023-02-25", - currency: "GBP", - lineItems: [ - { - description: "negative direct cost", - unitAmount: new Decimal("35"), - quantity: new Decimal("-1"), - subTotal: new Decimal("-35"), - taxAmount: new Decimal("-7"), - totalAmount: new Decimal("-42"), - taxRateRef: { - id: "INPUT2", - }, - itemRef: { - id: "965cfc0e-4d80-4059-9641-4a392f9ad549", - }, - }, - ], - paymentAllocations: [ - { - payment: { - accountRef: { - id: "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - }, - currency: "GBP", - }, - allocation: { - totalAmount: new Decimal("-42"), - }, - }, - ], - subTotal: new Decimal("-35"), - taxAmount: new Decimal("-7"), - totalAmount: new Decimal("-42"), - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackDirectCostsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostPrototype: { - reference: "Scenario One neg DC", - contactRef: { - id: "699f0091-b127-4796-9f15-41a2f42abeb2", - dataType: "suppliers", - }, - issueDate: "2023-02-25", - currency: "GBP", - lineItems: [ - { - description: "negative direct cost", - unitAmount: new Decimal("35"), - quantity: new Decimal("-1"), - subTotal: new Decimal("-35"), - taxAmount: new Decimal("-7"), - totalAmount: new Decimal("-42"), - taxRateRef: { - id: "INPUT2", - }, - itemRef: { - id: "965cfc0e-4d80-4059-9641-4a392f9ad549", - }, - }, - ], - paymentAllocations: [ - { - payment: { - accountRef: { - id: "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - }, - currency: "GBP", - }, - allocation: { - totalAmount: new Decimal("-42"), - }, - }, - ], - subTotal: new Decimal("-35"), - taxAmount: new Decimal("-7"), - totalAmount: new Decimal("-42"), - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackDirectCostsCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateDirectCostRequest](../../sdk/models/operations/createdirectcostrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreateDirectCostResponse](../../sdk/models/shared/accountingcreatedirectcostresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.DirectCosts + +## Overview + +### Available Operations + +* [getCreateModel](#getcreatemodel) - Get create direct cost model +* [create](#create) - Create direct cost + +## getCreateModel + +The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company and integration. + +[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. + +**Integration-specific behavior** + +See the *response examples* for integration-specific indicative models. + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsGetCreateModel } from "@codat/lending/funcs/loanWritebackDirectCostsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsGetCreateModel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateDirectCostsModelRequest](../../sdk/models/operations/getcreatedirectcostsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company's connection. + +[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. + +**Integration-specific behavior** + +Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/lending-api#/operations/get-create-directCosts-model). + +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + issueDate: "2023-02-12", + currency: "GBP", + lineItems: [ + { + unitAmount: 15, + quantity: 1, + subTotal: 15, + accountRef: { + id: "288", + }, + }, + ], + paymentAllocations: [ + { + payment: { + accountRef: { + id: "750-1", + }, + }, + allocation: {}, + }, + ], + subTotal: 15, + taxAmount: 0, + totalAmount: 15, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + issueDate: "2023-02-12", + currency: "GBP", + lineItems: [ + { + unitAmount: 15, + quantity: 1, + subTotal: 15, + accountRef: { + id: "288", + }, + }, + ], + paymentAllocations: [ + { + payment: { + accountRef: { + id: "750-1", + }, + }, + allocation: {}, + }, + ], + subTotal: 15, + taxAmount: 0, + totalAmount: 15, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Malformed query + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + issueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + lineItems: [ + { + tracking: { + recordRefs: [ + { + dataType: "trackingCategories", + }, + ], + invoiceTo: { + dataType: "journalEntry", + }, + }, + }, + ], + paymentAllocations: [ + { + payment: { + currency: "GBP", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "GBP", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + issueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + lineItems: [ + { + tracking: { + recordRefs: [ + { + dataType: "trackingCategories", + }, + ], + invoiceTo: { + dataType: "journalEntry", + }, + }, + }, + ], + paymentAllocations: [ + { + payment: { + currency: "GBP", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "GBP", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + reference: "test ref", + note: "directCost 21/03 09.20", + contactRef: { + id: "80000001-1671793885", + dataType: "suppliers", + }, + issueDate: "2023-03-21T10:19:52.223Z", + currency: "USD", + lineItems: [ + { + description: "test description line 1", + unitAmount: 7, + quantity: 1, + discountAmount: 0, + discountPercentage: 0, + subTotal: 99, + taxAmount: 360, + totalAmount: 70, + accountRef: { + id: "8000000D-1671793811", + name: "Purchases - Hardware for Resale", + }, + itemRef: { + id: "80000001-1674566705", + name: "item test", + }, + trackingCategoryRefs: [ + { + id: "80000001-1674553252", + name: "Class 1", + }, + ], + }, + ], + paymentAllocations: [ + { + payment: { + note: "payment allocations note", + reference: "payment allocations reference", + accountRef: { + id: "80000028-1671794219", + name: "Bank Account 1", + }, + paidOnDate: "2023-01-28T10:19:52.223Z", + totalAmount: 54, + }, + allocation: { + currencyRate: 0, + allocatedOnDate: "2023-01-29T10:19:52.223Z", + totalAmount: 88, + }, + }, + ], + subTotal: 362, + taxAmount: 4, + totalAmount: 366, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + reference: "test ref", + note: "directCost 21/03 09.20", + contactRef: { + id: "80000001-1671793885", + dataType: "suppliers", + }, + issueDate: "2023-03-21T10:19:52.223Z", + currency: "USD", + lineItems: [ + { + description: "test description line 1", + unitAmount: 7, + quantity: 1, + discountAmount: 0, + discountPercentage: 0, + subTotal: 99, + taxAmount: 360, + totalAmount: 70, + accountRef: { + id: "8000000D-1671793811", + name: "Purchases - Hardware for Resale", + }, + itemRef: { + id: "80000001-1674566705", + name: "item test", + }, + trackingCategoryRefs: [ + { + id: "80000001-1674553252", + name: "Class 1", + }, + ], + }, + ], + paymentAllocations: [ + { + payment: { + note: "payment allocations note", + reference: "payment allocations reference", + accountRef: { + id: "80000028-1671794219", + name: "Bank Account 1", + }, + paidOnDate: "2023-01-28T10:19:52.223Z", + totalAmount: 54, + }, + allocation: { + currencyRate: 0, + allocatedOnDate: "2023-01-29T10:19:52.223Z", + totalAmount: 88, + }, + }, + ], + subTotal: 362, + taxAmount: 4, + totalAmount: 366, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + reference: "test ref", + note: "Test 1", + issueDate: "2023-03-31T00:00:00", + currency: "USD", + currencyRate: 0.5, + lineItems: [ + { + unitAmount: 9.99, + quantity: 1, + subTotal: 9.99, + taxAmount: 2, + totalAmount: 11.99, + accountRef: { + id: "195", + }, + }, + ], + paymentAllocations: [ + { + payment: { + id: "4355", + note: "test note", + reference: "test reference", + accountRef: { + id: "348", + name: "CMRR Renewal", + }, + currency: "USD", + paidOnDate: "2023-03-31T00:00:00", + totalAmount: 11.99, + }, + allocation: { + currency: "USD", + allocatedOnDate: "2023-03-31T00:00:00", + totalAmount: 11.99, + }, + }, + ], + subTotal: 9.99, + taxAmount: 2, + totalAmount: 11.99, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + reference: "test ref", + note: "Test 1", + issueDate: "2023-03-31T00:00:00", + currency: "USD", + currencyRate: 0.5, + lineItems: [ + { + unitAmount: 9.99, + quantity: 1, + subTotal: 9.99, + taxAmount: 2, + totalAmount: 11.99, + accountRef: { + id: "195", + }, + }, + ], + paymentAllocations: [ + { + payment: { + id: "4355", + note: "test note", + reference: "test reference", + accountRef: { + id: "348", + name: "CMRR Renewal", + }, + currency: "USD", + paidOnDate: "2023-03-31T00:00:00", + totalAmount: 11.99, + }, + allocation: { + currency: "USD", + allocatedOnDate: "2023-03-31T00:00:00", + totalAmount: 11.99, + }, + }, + ], + subTotal: 9.99, + taxAmount: 2, + totalAmount: 11.99, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.directCosts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + reference: "Scenario One neg DC", + contactRef: { + id: "699f0091-b127-4796-9f15-41a2f42abeb2", + dataType: "suppliers", + }, + issueDate: "2023-02-25", + currency: "GBP", + lineItems: [ + { + description: "negative direct cost", + unitAmount: 35, + quantity: -1, + subTotal: -35, + taxAmount: -7, + totalAmount: -42, + taxRateRef: { + id: "INPUT2", + }, + itemRef: { + id: "965cfc0e-4d80-4059-9641-4a392f9ad549", + }, + }, + ], + paymentAllocations: [ + { + payment: { + accountRef: { + id: "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", + }, + currency: "GBP", + }, + allocation: { + totalAmount: -42, + }, + }, + ], + subTotal: -35, + taxAmount: -7, + totalAmount: -42, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackDirectCostsCreate } from "@codat/lending/funcs/loanWritebackDirectCostsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackDirectCostsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostPrototype: { + reference: "Scenario One neg DC", + contactRef: { + id: "699f0091-b127-4796-9f15-41a2f42abeb2", + dataType: "suppliers", + }, + issueDate: "2023-02-25", + currency: "GBP", + lineItems: [ + { + description: "negative direct cost", + unitAmount: 35, + quantity: -1, + subTotal: -35, + taxAmount: -7, + totalAmount: -42, + taxRateRef: { + id: "INPUT2", + }, + itemRef: { + id: "965cfc0e-4d80-4059-9641-4a392f9ad549", + }, + }, + ], + paymentAllocations: [ + { + payment: { + accountRef: { + id: "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", + }, + currency: "GBP", + }, + allocation: { + totalAmount: -42, + }, + }, + ], + subTotal: -35, + taxAmount: -7, + totalAmount: -42, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackDirectCostsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDirectCostRequest](../../sdk/models/operations/createdirectcostrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreateDirectCostResponse](../../sdk/models/shared/accountingcreatedirectcostresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingloanwritebackaccounts/README.md b/lending/docs/sdks/codatlendingloanwritebackaccounts/README.md index fb6cbd699..41215ab46 100644 --- a/lending/docs/sdks/codatlendingloanwritebackaccounts/README.md +++ b/lending/docs/sdks/codatlendingloanwritebackaccounts/README.md @@ -1,657 +1,655 @@ -# LoanWriteback.Accounts - -## Overview - -### Available Operations - -* [getCreateModel](#getcreatemodel) - Get create account model -* [create](#create) - Create account - -## getCreateModel - -The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company and integration. - -[Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. - -**Integration-specific behavior** - -See the *response examples* for integration-specific indicative models. - -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: MYOB AccountRight and Essentials - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsGetCreateModel failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCreateChartOfAccountsModelRequest](../../sdk/models/operations/getcreatechartofaccountsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -The *Create account* endpoint creates a new [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - -[Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. - -**Integration-specific behavior** - -Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/lending-api#/operations/get-create-chartOfAccounts-model). - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.accounts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountPrototype: { - nominalCode: "610", - name: "Accounts Receivable", - description: "Invoices the business has issued but has not yet collected payment on.", - fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Cash On Hand", - currency: "GBP", - currentBalance: new Decimal("0"), - type: "Asset", - status: "Active", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackAccountsCreate } from "@codat/lending/funcs/loanWritebackAccountsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackAccountsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountPrototype: { - nominalCode: "610", - name: "Accounts Receivable", - description: "Invoices the business has issued but has not yet collected payment on.", - fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Cash On Hand", - currency: "GBP", - currentBalance: new Decimal("0"), - type: "Asset", - status: "Active", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackAccountsCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateAccountRequest](../../sdk/models/operations/createaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreateAccountResponse](../../sdk/models/shared/accountingcreateaccountresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.Accounts + +## Overview + +### Available Operations + +* [getCreateModel](#getcreatemodel) - Get create account model +* [create](#create) - Create account + +## getCreateModel + +The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company and integration. + +[Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. + +**Integration-specific behavior** + +See the *response examples* for integration-specific indicative models. + +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: MYOB AccountRight and Essentials + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsGetCreateModel } from "@codat/lending/funcs/loanWritebackAccountsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateChartOfAccountsModelRequest](../../sdk/models/operations/getcreatechartofaccountsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +The *Create account* endpoint creates a new [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. + +[Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. + +**Integration-specific behavior** + +Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/lending-api#/operations/get-create-chartOfAccounts-model). + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.accounts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountPrototype: { + nominalCode: "610", + name: "Accounts Receivable", + description: "Invoices the business has issued but has not yet collected payment on.", + fullyQualifiedCategory: "Asset.Current", + fullyQualifiedName: "Cash On Hand", + currency: "GBP", + currentBalance: 0, + type: "Asset", + status: "Active", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackAccountsCreate } from "@codat/lending/funcs/loanWritebackAccountsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackAccountsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountPrototype: { + nominalCode: "610", + name: "Accounts Receivable", + description: "Invoices the business has issued but has not yet collected payment on.", + fullyQualifiedCategory: "Asset.Current", + fullyQualifiedName: "Cash On Hand", + currency: "GBP", + currentBalance: 0, + type: "Asset", + status: "Active", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackAccountsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateAccountRequest](../../sdk/models/operations/createaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreateAccountResponse](../../sdk/models/shared/accountingcreateaccountresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingloanwritebackpayments/README.md b/lending/docs/sdks/codatlendingloanwritebackpayments/README.md index b8b86b9ea..50102c202 100644 --- a/lending/docs/sdks/codatlendingloanwritebackpayments/README.md +++ b/lending/docs/sdks/codatlendingloanwritebackpayments/README.md @@ -1,1280 +1,1266 @@ -# LoanWriteback.Payments - -## Overview - -### Available Operations - -* [getCreateModel](#getcreatemodel) - Get create payment model -* [create](#create) - Create payment - -## getCreateModel - -The *Get create payment model* endpoint returns the expected data for the request payload when creating a [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company and integration. - -[Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - -**Integration-specific behavior** - -See the *response examples* for integration-specific indicative models. - -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: MYOB AccountRight and Essentials - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCreatePaymentModelRequest](../../sdk/models/operations/getcreatepaymentmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -The *Create payment* endpoint creates a new [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - -[Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - -**Integration-specific behavior** - -Required data may vary by integration. To see what data to post, first call [Get create payment model](https://docs.codat.io/lending-api#/operations/get-create-payments-model). - -### Example Usage: Malformed query - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - accountRef: {}, - paymentMethodRef: { - id: "EILBDVJVNUAGVKRQ", - name: "AliPay", - }, - currency: "GBP", - date: "2022-10-23T00:00:00Z", - lines: [ - { - amount: new Decimal("9098.82"), - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - ], - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - accountRef: {}, - paymentMethodRef: { - id: "EILBDVJVNUAGVKRQ", - name: "AliPay", - }, - currency: "GBP", - date: "2022-10-23T00:00:00Z", - lines: [ - { - amount: new Decimal("9098.82"), - allocatedOnDate: "2022-10-23T00:00:00Z", - }, - ], - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - customerRef: { - id: "80000002-1674552702", - companyName: "string", - }, - accountRef: { - id: "8000002E-1675267199", - name: "Undeposited Funds", - }, - paymentMethodRef: { - id: "string", - name: "string", - }, - totalAmount: new Decimal("28"), - currency: "USD", - currencyRate: new Decimal("1"), - date: "2023-02-10T11:47:04.792Z", - note: "note 14/02 1147", - lines: [ - { - amount: new Decimal("28"), - links: [ - { - type: "Invoice", - id: "181-1676374586", - amount: new Decimal("-28"), - currencyRate: new Decimal("1"), - }, - ], - allocatedOnDate: "2023-02-11T11:47:04.792Z", - }, - ], - reference: "ref 14/02 1147", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - customerRef: { - id: "80000002-1674552702", - companyName: "string", - }, - accountRef: { - id: "8000002E-1675267199", - name: "Undeposited Funds", - }, - paymentMethodRef: { - id: "string", - name: "string", - }, - totalAmount: new Decimal("28"), - currency: "USD", - currencyRate: new Decimal("1"), - date: "2023-02-10T11:47:04.792Z", - note: "note 14/02 1147", - lines: [ - { - amount: new Decimal("28"), - links: [ - { - type: "Invoice", - id: "181-1676374586", - amount: new Decimal("-28"), - currencyRate: new Decimal("1"), - }, - ], - allocatedOnDate: "2023-02-11T11:47:04.792Z", - }, - ], - reference: "ref 14/02 1147", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - customerRef: { - id: "CUST1", - }, - accountRef: { - id: "1200", - name: "Bank Current Account", - }, - paymentMethodRef: { - id: "4405", - }, - totalAmount: new Decimal("4"), - currency: "GBP", - currencyRate: new Decimal("1"), - date: "2023-03-17T11:47:04.792Z", - note: "note 07/03 14.31", - lines: [ - { - amount: new Decimal("4"), - links: [ - { - type: "Invoice", - id: "INV-31", - amount: new Decimal("-4"), - currencyRate: new Decimal("1"), - }, - ], - allocatedOnDate: "2023-02-11T11:47:04.792Z", - }, - ], - reference: "ref", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - customerRef: { - id: "CUST1", - }, - accountRef: { - id: "1200", - name: "Bank Current Account", - }, - paymentMethodRef: { - id: "4405", - }, - totalAmount: new Decimal("4"), - currency: "GBP", - currencyRate: new Decimal("1"), - date: "2023-03-17T11:47:04.792Z", - note: "note 07/03 14.31", - lines: [ - { - amount: new Decimal("4"), - links: [ - { - type: "Invoice", - id: "INV-31", - amount: new Decimal("-4"), - currencyRate: new Decimal("1"), - }, - ], - allocatedOnDate: "2023-02-11T11:47:04.792Z", - }, - ], - reference: "ref", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - customerRef: { - id: "30444c5bd4964fd787c7f8e2e5301ce1", - companyName: "Stanley test customer", - }, - accountRef: { - id: "9a25937b267a11e797950a57719b2edb", - name: "Current", - }, - totalAmount: new Decimal("0.17"), - currency: "GBP", - currencyRate: new Decimal("1"), - date: "2023-03-20T11:47:04.792Z", - note: "Need to send products asap.", - lines: [ - { - amount: new Decimal("0.17"), - links: [ - { - type: "Invoice", - id: "bb85db9226d7450fb99eb83e7fb37505", - amount: new Decimal("-0.17"), - currencyRate: new Decimal("1"), - }, - ], - allocatedOnDate: "2023-02-11T11:47:04.792Z", - }, - ], - reference: "normal payment 20/03 17.05", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - customerRef: { - id: "30444c5bd4964fd787c7f8e2e5301ce1", - companyName: "Stanley test customer", - }, - accountRef: { - id: "9a25937b267a11e797950a57719b2edb", - name: "Current", - }, - totalAmount: new Decimal("0.17"), - currency: "GBP", - currencyRate: new Decimal("1"), - date: "2023-03-20T11:47:04.792Z", - note: "Need to send products asap.", - lines: [ - { - amount: new Decimal("0.17"), - links: [ - { - type: "Invoice", - id: "bb85db9226d7450fb99eb83e7fb37505", - amount: new Decimal("-0.17"), - currencyRate: new Decimal("1"), - }, - ], - allocatedOnDate: "2023-02-11T11:47:04.792Z", - }, - ], - reference: "normal payment 20/03 17.05", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.payments.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - customerRef: { - id: "19", - }, - accountRef: { - id: "81", - }, - totalAmount: new Decimal("0"), - date: "2022-03-12T00:00:00", - lines: [ - { - amount: new Decimal("0"), - links: [ - { - type: "Invoice", - id: "246", - amount: new Decimal("-1.1"), - }, - { - type: "CreditNote", - id: "280", - amount: new Decimal("1.1"), - }, - ], - }, - ], - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackPaymentsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingPayment: { - customerRef: { - id: "19", - }, - accountRef: { - id: "81", - }, - totalAmount: new Decimal("0"), - date: "2022-03-12T00:00:00", - lines: [ - { - amount: new Decimal("0"), - links: [ - { - type: "Invoice", - id: "246", - amount: new Decimal("-1.1"), - }, - { - type: "CreditNote", - id: "280", - amount: new Decimal("1.1"), - }, - ], - }, - ], - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackPaymentsCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreatePaymentRequest](../../sdk/models/operations/createpaymentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreatePaymentResponse](../../sdk/models/shared/accountingcreatepaymentresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.Payments + +## Overview + +### Available Operations + +* [getCreateModel](#getcreatemodel) - Get create payment model +* [create](#create) - Create payment + +## getCreateModel + +The *Get create payment model* endpoint returns the expected data for the request payload when creating a [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company and integration. + +[Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. + +**Integration-specific behavior** + +See the *response examples* for integration-specific indicative models. + +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: MYOB AccountRight and Essentials + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsGetCreateModel } from "@codat/lending/funcs/loanWritebackPaymentsGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsGetCreateModel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreatePaymentModelRequest](../../sdk/models/operations/getcreatepaymentmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +The *Create payment* endpoint creates a new [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. + +[Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. + +**Integration-specific behavior** + +Required data may vary by integration. To see what data to post, first call [Get create payment model](https://docs.codat.io/lending-api#/operations/get-create-payments-model). + +### Example Usage: Malformed query + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + currency: "GBP", + date: "2022-10-23T00:00:00Z", + lines: [ + { + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + currency: "GBP", + date: "2022-10-23T00:00:00Z", + lines: [ + { + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + customerRef: { + id: "80000002-1674552702", + companyName: "string", + }, + accountRef: { + id: "8000002E-1675267199", + name: "Undeposited Funds", + }, + paymentMethodRef: { + id: "string", + name: "string", + }, + totalAmount: 28, + currency: "USD", + currencyRate: 1, + date: "2023-02-10T11:47:04.792Z", + note: "note 14/02 1147", + lines: [ + { + amount: 28, + links: [ + { + type: "Invoice", + id: "181-1676374586", + amount: -28, + currencyRate: 1, + }, + ], + allocatedOnDate: "2023-02-11T11:47:04.792Z", + }, + ], + reference: "ref 14/02 1147", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + customerRef: { + id: "80000002-1674552702", + companyName: "string", + }, + accountRef: { + id: "8000002E-1675267199", + name: "Undeposited Funds", + }, + paymentMethodRef: { + id: "string", + name: "string", + }, + totalAmount: 28, + currency: "USD", + currencyRate: 1, + date: "2023-02-10T11:47:04.792Z", + note: "note 14/02 1147", + lines: [ + { + amount: 28, + links: [ + { + type: "Invoice", + id: "181-1676374586", + amount: -28, + currencyRate: 1, + }, + ], + allocatedOnDate: "2023-02-11T11:47:04.792Z", + }, + ], + reference: "ref 14/02 1147", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + customerRef: { + id: "CUST1", + }, + accountRef: { + id: "1200", + name: "Bank Current Account", + }, + paymentMethodRef: { + id: "4405", + }, + totalAmount: 4, + currency: "GBP", + currencyRate: 1, + date: "2023-03-17T11:47:04.792Z", + note: "note 07/03 14.31", + lines: [ + { + amount: 4, + links: [ + { + type: "Invoice", + id: "INV-31", + amount: -4, + currencyRate: 1, + }, + ], + allocatedOnDate: "2023-02-11T11:47:04.792Z", + }, + ], + reference: "ref", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + customerRef: { + id: "CUST1", + }, + accountRef: { + id: "1200", + name: "Bank Current Account", + }, + paymentMethodRef: { + id: "4405", + }, + totalAmount: 4, + currency: "GBP", + currencyRate: 1, + date: "2023-03-17T11:47:04.792Z", + note: "note 07/03 14.31", + lines: [ + { + amount: 4, + links: [ + { + type: "Invoice", + id: "INV-31", + amount: -4, + currencyRate: 1, + }, + ], + allocatedOnDate: "2023-02-11T11:47:04.792Z", + }, + ], + reference: "ref", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + customerRef: { + id: "30444c5bd4964fd787c7f8e2e5301ce1", + companyName: "Stanley test customer", + }, + accountRef: { + id: "9a25937b267a11e797950a57719b2edb", + name: "Current", + }, + totalAmount: 0.17, + currency: "GBP", + currencyRate: 1, + date: "2023-03-20T11:47:04.792Z", + note: "Need to send products asap.", + lines: [ + { + amount: 0.17, + links: [ + { + type: "Invoice", + id: "bb85db9226d7450fb99eb83e7fb37505", + amount: -0.17, + currencyRate: 1, + }, + ], + allocatedOnDate: "2023-02-11T11:47:04.792Z", + }, + ], + reference: "normal payment 20/03 17.05", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + customerRef: { + id: "30444c5bd4964fd787c7f8e2e5301ce1", + companyName: "Stanley test customer", + }, + accountRef: { + id: "9a25937b267a11e797950a57719b2edb", + name: "Current", + }, + totalAmount: 0.17, + currency: "GBP", + currencyRate: 1, + date: "2023-03-20T11:47:04.792Z", + note: "Need to send products asap.", + lines: [ + { + amount: 0.17, + links: [ + { + type: "Invoice", + id: "bb85db9226d7450fb99eb83e7fb37505", + amount: -0.17, + currencyRate: 1, + }, + ], + allocatedOnDate: "2023-02-11T11:47:04.792Z", + }, + ], + reference: "normal payment 20/03 17.05", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.payments.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + customerRef: { + id: "19", + }, + accountRef: { + id: "81", + }, + totalAmount: 0, + date: "2022-03-12T00:00:00", + lines: [ + { + amount: 0, + links: [ + { + type: "Invoice", + id: "246", + amount: -1.1, + }, + { + type: "CreditNote", + id: "280", + amount: 1.1, + }, + ], + }, + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackPaymentsCreate } from "@codat/lending/funcs/loanWritebackPaymentsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackPaymentsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingPayment: { + customerRef: { + id: "19", + }, + accountRef: { + id: "81", + }, + totalAmount: 0, + date: "2022-03-12T00:00:00", + lines: [ + { + amount: 0, + links: [ + { + type: "Invoice", + id: "246", + amount: -1.1, + }, + { + type: "CreditNote", + id: "280", + amount: 1.1, + }, + ], + }, + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackPaymentsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePaymentRequest](../../sdk/models/operations/createpaymentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreatePaymentResponse](../../sdk/models/shared/accountingcreatepaymentresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingpayments/README.md b/lending/docs/sdks/codatlendingpayments/README.md index 24afae396..c76b2f573 100644 --- a/lending/docs/sdks/codatlendingpayments/README.md +++ b/lending/docs/sdks/codatlendingpayments/README.md @@ -1,1042 +1,1042 @@ -# Sales.Payments - -## Overview - -### Available Operations - -* [list](#list) - List payments -* [get](#get) - Get payment - -## list - -The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - -[Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: PrestaShop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: SumUp - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: WooCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommercePaymentsRequest](../../sdk/models/operations/listcommercepaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommercePayments](../../sdk/models/shared/commercepayments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get payment* endpoint returns a single payment for a given paymentId. - -[Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: PrestaShop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: SumUp - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: WooCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommercePaymentRequest](../../sdk/models/operations/getcommercepaymentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommercePayment](../../sdk/models/shared/commercepayment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Payments + +## Overview + +### Available Operations + +* [list](#list) - List payments +* [get](#get) - Get payment + +## list + +The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. + +[Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: PrestaShop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: SumUp + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: WooCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsList } from "@codat/lending/funcs/salesPaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommercePaymentsRequest](../../sdk/models/operations/listcommercepaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommercePayments](../../sdk/models/shared/commercepayments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get payment* endpoint returns a single payment for a given paymentId. + +[Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: PrestaShop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: SumUp + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: WooCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentsGet } from "@codat/lending/funcs/salesPaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommercePaymentRequest](../../sdk/models/operations/getcommercepaymentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommercePayment](../../sdk/models/shared/commercepayment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingreports/README.md b/lending/docs/sdks/codatlendingreports/README.md index 1074843e3..450618a71 100644 --- a/lending/docs/sdks/codatlendingreports/README.md +++ b/lending/docs/sdks/codatlendingreports/README.md @@ -1,1808 +1,1752 @@ -# AccountsReceivable.Reports - -## Overview - -### Available Operations - -* [isAgedDebtorsAvailable](#isageddebtorsavailable) - Aged debtors report available -* [getAgedDebtors](#getageddebtors) - Aged debtors report -* [isAgedCreditorsAvailable](#isagedcreditorsavailable) - Aged creditors report available -* [getAgedCreditors](#getagedcreditors) - Aged creditors report - -## isAgedDebtorsAvailable - -Indicates whether the aged debtors report is available for the company. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.isAgedDebtorsAvailable({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsIsAgedDebtorsAvailable } from "@codat/lending/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsIsAgedDebtorsAvailable(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsIsAgedDebtorsAvailable failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.IsAgedDebtorsReportAvailableRequest](../../sdk/models/operations/isageddebtorsreportavailablerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[boolean](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAgedDebtors - -Returns aged debtors report for company that shows the total outstanding balance due from customers to the business over time. - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: MYOB AccountRight and Essentials - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingAgedDebtorsReportRequest](../../sdk/models/operations/getaccountingageddebtorsreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAgedDebtorReport](../../sdk/models/shared/accountingageddebtorreport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## isAgedCreditorsAvailable - -Indicates whether the aged creditor report is available for the company. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.isAgedCreditorsAvailable({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsIsAgedCreditorsAvailable } from "@codat/lending/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsIsAgedCreditorsAvailable(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsIsAgedCreditorsAvailable failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.IsAgedCreditorsReportAvailableRequest](../../sdk/models/operations/isagedcreditorsreportavailablerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[boolean](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAgedCreditors - -Returns aged creditors report for company that shows the total balance owed by a business to its suppliers over time. - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: MYOB AccountRight and Essentials - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; -import { RFCDate } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { RFCDate } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: new RFCDate("2022-12-31"), - numberOfPeriods: 12, - periodLengthDays: 30, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingAgedCreditorsReportRequest](../../sdk/models/operations/getaccountingagedcreditorsreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAgedCreditorReport](../../sdk/models/shared/accountingagedcreditorreport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsReceivable.Reports + +## Overview + +### Available Operations + +* [isAgedDebtorsAvailable](#isageddebtorsavailable) - Aged debtors report available +* [getAgedDebtors](#getageddebtors) - Aged debtors report +* [isAgedCreditorsAvailable](#isagedcreditorsavailable) - Aged creditors report available +* [getAgedCreditors](#getagedcreditors) - Aged creditors report + +## isAgedDebtorsAvailable + +Indicates whether the aged debtors report is available for the company. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.isAgedDebtorsAvailable({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsIsAgedDebtorsAvailable } from "@codat/lending/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsIsAgedDebtorsAvailable(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsIsAgedDebtorsAvailable failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.IsAgedDebtorsReportAvailableRequest](../../sdk/models/operations/isageddebtorsreportavailablerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[boolean](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAgedDebtors + +Returns aged debtors report for company that shows the total outstanding balance due from customers to the business over time. + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: MYOB AccountRight and Essentials + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedDebtors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedDebtors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedDebtors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedDebtors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedDebtors failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingAgedDebtorsReportRequest](../../sdk/models/operations/getaccountingageddebtorsreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAgedDebtorReport](../../sdk/models/shared/accountingageddebtorreport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## isAgedCreditorsAvailable + +Indicates whether the aged creditor report is available for the company. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.isAgedCreditorsAvailable({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsIsAgedCreditorsAvailable } from "@codat/lending/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsIsAgedCreditorsAvailable(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsIsAgedCreditorsAvailable failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.IsAgedCreditorsReportAvailableRequest](../../sdk/models/operations/isagedcreditorsreportavailablerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[boolean](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAgedCreditors + +Returns aged creditors report for company that shows the total balance owed by a business to its suppliers over time. + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: MYOB AccountRight and Essentials + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.reports.getAgedCreditors({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableReportsGetAgedCreditors } from "@codat/lending/funcs/accountsReceivableReportsGetAgedCreditors.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableReportsGetAgedCreditors(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "2022-12-31", + numberOfPeriods: 12, + periodLengthDays: 30, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableReportsGetAgedCreditors failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingAgedCreditorsReportRequest](../../sdk/models/operations/getaccountingagedcreditorsreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAgedCreditorReport](../../sdk/models/shared/accountingagedcreditorreport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingsalestransactions/README.md b/lending/docs/sdks/codatlendingsalestransactions/README.md index 642cd66e2..46ce7f3b3 100644 --- a/lending/docs/sdks/codatlendingsalestransactions/README.md +++ b/lending/docs/sdks/codatlendingsalestransactions/README.md @@ -1,718 +1,718 @@ -# Sales.Transactions - -## Overview - -### Available Operations - -* [list](#list) - List transactions -* [get](#get) - Get transaction - -## list - -The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company's connection. - -[Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Stripe Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: SumUp - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommerceTransactionsRequest](../../sdk/models/operations/listcommercetransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceTransactions](../../sdk/models/shared/commercetransactions.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get transaction* endpoint returns a single transaction for a given transactionId. - -[Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Stripe Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: SumUp - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.transactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesTransactionsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceTransactionRequest](../../sdk/models/operations/getcommercetransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceTransaction](../../sdk/models/shared/commercetransaction.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Transactions + +## Overview + +### Available Operations + +* [list](#list) - List transactions +* [get](#get) - Get transaction + +## list + +The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company's connection. + +[Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Stripe Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: SumUp + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsList } from "@codat/lending/funcs/salesTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommerceTransactionsRequest](../../sdk/models/operations/listcommercetransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceTransactions](../../sdk/models/shared/commercetransactions.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get transaction* endpoint returns a single transaction for a given transactionId. + +[Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Stripe Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: SumUp + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.transactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesTransactionsGet } from "@codat/lending/funcs/salesTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesTransactionsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceTransactionRequest](../../sdk/models/operations/getcommercetransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceTransaction](../../sdk/models/shared/commercetransaction.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingsuppliers/README.md b/lending/docs/sdks/codatlendingsuppliers/README.md index f89334473..4132a09d9 100644 --- a/lending/docs/sdks/codatlendingsuppliers/README.md +++ b/lending/docs/sdks/codatlendingsuppliers/README.md @@ -1,927 +1,929 @@ -# LoanWriteback.Suppliers - -## Overview - -### Available Operations - -* [getCreateUpdateModel](#getcreateupdatemodel) - Get create/update supplier model -* [create](#create) - Create supplier - -## getCreateUpdateModel - -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/lending-api#/schemas/Supplier) for a given company and integration. - -[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - -**Integration-specific behavior** - -See the *response examples* for integration-specific indicative models. - - -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: MYOB AccountRight and Essentials - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCreateUpdateSuppliersModelRequest](../../sdk/models/operations/getcreateupdatesuppliersmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company's connection. - -[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - -**Integration-specific behavior** - -Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/lending-api#/operations/get-create-update-suppliers-model). - - -### Example Usage: Malformed query - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingSupplier: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", - supplierName: "Kelly's Industrial Supplies", - contactName: "Kelly's Industrial Supplies", - emailAddress: "sales@kellysupplies.com", - phone: "07999 999999", - addresses: [ - { - type: "Billing", - line1: "Unit 51", - line2: "Bakersfield Industrial Estate", - city: "Bakersfield", - region: "California", - country: "USA", - }, - ], - registrationNumber: "string", - taxNumber: "string", - status: "Unknown", - defaultCurrency: "string", - metadata: { - isDeleted: true, - }, - supplementalData: { - content: { - "property1": { - "property1": "", - "property2": "", - }, - "property2": { - "property1": "", - "property2": "", - }, - }, - }, - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersCreate } from "@codat/lending/funcs/loanWritebackSuppliersCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingSupplier: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", - supplierName: "Kelly's Industrial Supplies", - contactName: "Kelly's Industrial Supplies", - emailAddress: "sales@kellysupplies.com", - phone: "07999 999999", - addresses: [ - { - type: "Billing", - line1: "Unit 51", - line2: "Bakersfield Industrial Estate", - city: "Bakersfield", - region: "California", - country: "USA", - }, - ], - registrationNumber: "string", - taxNumber: "string", - status: "Unknown", - defaultCurrency: "string", - metadata: { - isDeleted: true, - }, - supplementalData: { - content: { - "property1": { - "property1": "", - "property2": "", - }, - "property2": { - "property1": "", - "property2": "", - }, - }, - }, - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.suppliers.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingSupplier: { - id: "73593", - supplierName: "test 20230420 1004", - contactName: "Joe Bloggs", - status: "Active", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSuppliersCreate } from "@codat/lending/funcs/loanWritebackSuppliersCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSuppliersCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingSupplier: { - id: "73593", - supplierName: "test 20230420 1004", - contactName: "Joe Bloggs", - status: "Active", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSuppliersCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateSupplierRequest](../../sdk/models/operations/createsupplierrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreateSupplierResponse](../../sdk/models/shared/accountingcreatesupplierresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.Suppliers + +## Overview + +### Available Operations + +* [getCreateUpdateModel](#getcreateupdatemodel) - Get create/update supplier model +* [create](#create) - Create supplier + +## getCreateUpdateModel + +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/lending-api#/schemas/Supplier) for a given company and integration. + +[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + +**Integration-specific behavior** + +See the *response examples* for integration-specific indicative models. + + +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: MYOB AccountRight and Essentials + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.getCreateUpdateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersGetCreateUpdateModel } from "@codat/lending/funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersGetCreateUpdateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersGetCreateUpdateModel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateUpdateSuppliersModelRequest](../../sdk/models/operations/getcreateupdatesuppliersmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company's connection. + +[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + +**Integration-specific behavior** + +Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/lending-api#/operations/get-create-update-suppliers-model). + + +### Example Usage: Malformed query + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingSupplier: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + supplierName: "Kelly's Industrial Supplies", + contactName: "Kelly's Industrial Supplies", + emailAddress: "sales@kellysupplies.com", + phone: "07999 999999", + addresses: [ + { + type: "Billing", + line1: "Unit 51", + line2: "Bakersfield Industrial Estate", + city: "Bakersfield", + region: "California", + country: "USA", + postalCode: "93308", + }, + ], + registrationNumber: "string", + taxNumber: "string", + status: "Unknown", + defaultCurrency: "string", + metadata: { + isDeleted: true, + }, + supplementalData: { + content: { + "property1": { + "property1": "None", + "property2": "None", + }, + "property2": { + "property1": "None", + "property2": "None", + }, + }, + }, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersCreate } from "@codat/lending/funcs/loanWritebackSuppliersCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingSupplier: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + supplierName: "Kelly's Industrial Supplies", + contactName: "Kelly's Industrial Supplies", + emailAddress: "sales@kellysupplies.com", + phone: "07999 999999", + addresses: [ + { + type: "Billing", + line1: "Unit 51", + line2: "Bakersfield Industrial Estate", + city: "Bakersfield", + region: "California", + country: "USA", + postalCode: "93308", + }, + ], + registrationNumber: "string", + taxNumber: "string", + status: "Unknown", + defaultCurrency: "string", + metadata: { + isDeleted: true, + }, + supplementalData: { + content: { + "property1": { + "property1": "None", + "property2": "None", + }, + "property2": { + "property1": "None", + "property2": "None", + }, + }, + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.suppliers.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingSupplier: { + id: "73593", + supplierName: "test 20230420 1004", + contactName: "Joe Bloggs", + status: "Active", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSuppliersCreate } from "@codat/lending/funcs/loanWritebackSuppliersCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSuppliersCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingSupplier: { + id: "73593", + supplierName: "test 20230420 1004", + contactName: "Joe Bloggs", + status: "Active", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSuppliersCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateSupplierRequest](../../sdk/models/operations/createsupplierrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreateSupplierResponse](../../sdk/models/shared/accountingcreatesupplierresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingtransactions/README.md b/lending/docs/sdks/codatlendingtransactions/README.md index 6c87d6476..8c781e0a7 100644 --- a/lending/docs/sdks/codatlendingtransactions/README.md +++ b/lending/docs/sdks/codatlendingtransactions/README.md @@ -1,286 +1,286 @@ -# Banking.Transactions - -## Overview - -### Available Operations - -* [list](#list) - List transactions -* [get](#get) - Get bank transaction - -## list - -The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company's connection. - -[Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Basiq - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.transactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingTransactionsList } from "@codat/lending/funcs/bankingTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingTransactionsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Plaid - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.transactions.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingTransactionsList } from "@codat/lending/funcs/bankingTransactionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingTransactionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingTransactionsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListBankingTransactionsRequest](../../sdk/models/operations/listbankingtransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankingTransactions](../../sdk/models/shared/bankingtransactions.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get transaction* endpoint returns a single transaction for a given transactionId. - -[Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Basiq - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.transactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingTransactionsGet } from "@codat/lending/funcs/bankingTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingTransactionsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Plaid - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.transactions.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingTransactionsGet } from "@codat/lending/funcs/bankingTransactionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingTransactionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingTransactionsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBankingTransactionRequest](../../sdk/models/operations/getbankingtransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankingTransaction](../../sdk/models/shared/bankingtransaction.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Banking.Transactions + +## Overview + +### Available Operations + +* [list](#list) - List transactions +* [get](#get) - Get bank transaction + +## list + +The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company's connection. + +[Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Basiq + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.transactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingTransactionsList } from "@codat/lending/funcs/bankingTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingTransactionsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Plaid + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.transactions.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingTransactionsList } from "@codat/lending/funcs/bankingTransactionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingTransactionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingTransactionsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBankingTransactionsRequest](../../sdk/models/operations/listbankingtransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankingTransactions](../../sdk/models/shared/bankingtransactions.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get transaction* endpoint returns a single transaction for a given transactionId. + +[Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Basiq + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.transactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingTransactionsGet } from "@codat/lending/funcs/bankingTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingTransactionsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Plaid + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.transactions.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingTransactionsGet } from "@codat/lending/funcs/bankingTransactionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingTransactionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingTransactionsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBankingTransactionRequest](../../sdk/models/operations/getbankingtransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankingTransaction](../../sdk/models/shared/bankingtransaction.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/codatlendingtransfers/README.md b/lending/docs/sdks/codatlendingtransfers/README.md index 25ded01b1..287f9912b 100644 --- a/lending/docs/sdks/codatlendingtransfers/README.md +++ b/lending/docs/sdks/codatlendingtransfers/README.md @@ -1,795 +1,793 @@ -# LoanWriteback.Transfers - -## Overview - -### Available Operations - -* [getCreateModel](#getcreatemodel) - Get create transfer model -* [create](#create) - Create transfer - -## getCreateModel - -The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company and integration. - -[Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - -**Integration-specific behavior** - -See the *response examples* for integration-specific indicative models. - - -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.getCreateModel({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersGetCreateModel(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersGetCreateModel failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCreateTransfersModelRequest](../../sdk/models/operations/getcreatetransfersmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company's connection. - -[Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - -**Integration-specific behavior** - -Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/lending-api#/operations/get-create-transfers-model). - -### Example Usage: Malformed query - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingTransfer: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - date: "2022-10-23T00:00:00Z", - from: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - to: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - depositedRecordRefs: [ - { - dataType: "journalEntry", - }, - ], - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersCreate } from "@codat/lending/funcs/loanWritebackTransfersCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingTransfer: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - date: "2022-10-23T00:00:00Z", - from: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - to: { - accountRef: { - dataType: "journalEntry", - }, - currency: "GBP", - }, - depositedRecordRefs: [ - { - dataType: "journalEntry", - }, - ], - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.transfers.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingTransfer: { - description: "test transfers push 20230126 12.08", - contactRef: { - id: "80000028-167239230944", - dataType: "customers", - }, - date: "2023-01-26T11:51:18.104Z", - from: { - accountRef: { - id: "80000028-1671794219", - dataType: "bankAccounts", - }, - amount: new Decimal("12"), - }, - to: { - accountRef: { - id: "80000004-1671793811", - dataType: "bankAccounts", - }, - amount: new Decimal("12"), - }, - status: "Unknown", - trackingCategoryRefs: [ - { - id: "80000001-1674553252", - name: "Class 1", - }, - ], - metadata: { - isDeleted: true, - }, - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackTransfersCreate } from "@codat/lending/funcs/loanWritebackTransfersCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackTransfersCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountingTransfer: { - description: "test transfers push 20230126 12.08", - contactRef: { - id: "80000028-167239230944", - dataType: "customers", - }, - date: "2023-01-26T11:51:18.104Z", - from: { - accountRef: { - id: "80000028-1671794219", - dataType: "bankAccounts", - }, - amount: new Decimal("12"), - }, - to: { - accountRef: { - id: "80000004-1671793811", - dataType: "bankAccounts", - }, - amount: new Decimal("12"), - }, - status: "Unknown", - trackingCategoryRefs: [ - { - id: "80000001-1674553252", - name: "Class 1", - }, - ], - metadata: { - isDeleted: true, - }, - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackTransfersCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTransferRequest](../../sdk/models/operations/createtransferrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreateTransferResponse](../../sdk/models/shared/accountingcreatetransferresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.Transfers + +## Overview + +### Available Operations + +* [getCreateModel](#getcreatemodel) - Get create transfer model +* [create](#create) - Create transfer + +## getCreateModel + +The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company and integration. + +[Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. + +**Integration-specific behavior** + +See the *response examples* for integration-specific indicative models. + + +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersGetCreateModel } from "@codat/lending/funcs/loanWritebackTransfersGetCreateModel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersGetCreateModel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersGetCreateModel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateTransfersModelRequest](../../sdk/models/operations/getcreatetransfersmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company's connection. + +[Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. + +**Integration-specific behavior** + +Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/lending-api#/operations/get-create-transfers-model). + +### Example Usage: Malformed query + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingTransfer: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + date: "2022-10-23T00:00:00Z", + from: { + accountRef: { + dataType: "journalEntry", + }, + currency: "GBP", + }, + to: { + accountRef: { + dataType: "journalEntry", + }, + currency: "GBP", + }, + depositedRecordRefs: [ + { + dataType: "journalEntry", + }, + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersCreate } from "@codat/lending/funcs/loanWritebackTransfersCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingTransfer: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + date: "2022-10-23T00:00:00Z", + from: { + accountRef: { + dataType: "journalEntry", + }, + currency: "GBP", + }, + to: { + accountRef: { + dataType: "journalEntry", + }, + currency: "GBP", + }, + depositedRecordRefs: [ + { + dataType: "journalEntry", + }, + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.transfers.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingTransfer: { + description: "test transfers push 20230126 12.08", + contactRef: { + id: "80000028-167239230944", + dataType: "customers", + }, + date: "2023-01-26T11:51:18.104Z", + from: { + accountRef: { + id: "80000028-1671794219", + dataType: "bankAccounts", + }, + amount: 12, + }, + to: { + accountRef: { + id: "80000004-1671793811", + dataType: "bankAccounts", + }, + amount: 12, + }, + status: "Unknown", + trackingCategoryRefs: [ + { + id: "80000001-1674553252", + name: "Class 1", + }, + ], + metadata: { + isDeleted: true, + }, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackTransfersCreate } from "@codat/lending/funcs/loanWritebackTransfersCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackTransfersCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + accountingTransfer: { + description: "test transfers push 20230126 12.08", + contactRef: { + id: "80000028-167239230944", + dataType: "customers", + }, + date: "2023-01-26T11:51:18.104Z", + from: { + accountRef: { + id: "80000028-1671794219", + dataType: "bankAccounts", + }, + amount: 12, + }, + to: { + accountRef: { + id: "80000004-1671793811", + dataType: "bankAccounts", + }, + amount: 12, + }, + status: "Unknown", + trackingCategoryRefs: [ + { + id: "80000001-1674553252", + name: "Class 1", + }, + ], + metadata: { + isDeleted: true, + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackTransfersCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateTransferRequest](../../sdk/models/operations/createtransferrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreateTransferResponse](../../sdk/models/shared/accountingcreatetransferresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/companies/README.md b/lending/docs/sdks/companies/README.md index b7917418a..ff0ea8e31 100644 --- a/lending/docs/sdks/companies/README.md +++ b/lending/docs/sdks/companies/README.md @@ -1,1050 +1,1050 @@ -# Companies - -## Overview - -Create and manage your SMB users' companies. - -### Available Operations - -* [list](#list) - List companies -* [create](#create) - Create company -* [replace](#replace) - Replace company -* [update](#update) - Update company -* [delete](#delete) - Delete a company -* [get](#get) - Get company - -## list - -The *List companies* endpoint returns a list of [companies](https://docs.codat.io/lending-api#/schemas/Company) associated to your instances. - -A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. -Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - -## Filter by tags - -The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): - -- equals (`=`) -- not equals (`!=`) -- contains (`~`) - -For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: -- Foreign key: `uid = {yourCustomerId}` -- Region: `region != uk` -- Owning team and region: `region = uk && owningTeam = invoice-finance` - -### Example Usage: List of Companies - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.list({ - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - tags: "region=uk && team=invoice-finance", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesList } from "@codat/lending/funcs/companiesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesList(codatLending, { - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - tags: "region=uk && team=invoice-finance", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: One company - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.list({ - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - tags: "region=uk && team=invoice-finance", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesList } from "@codat/lending/funcs/companiesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesList(codatLending, { - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - tags: "region=uk && team=invoice-finance", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCompaniesRequest](../../sdk/models/operations/listcompaniesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Companies](../../sdk/models/shared/companies.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat. - -A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. -Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - -If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. - -### Example Usage: Malformed query - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.create({ - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesCreate } from "@codat/lending/funcs/companiesCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesCreate(codatLending, { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: With a description - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.create({ - name: "Technicalium", - description: "Technology services, including web and app design and development", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesCreate } from "@codat/lending/funcs/companiesCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesCreate(codatLending, { - name: "Technicalium", - description: "Technology services, including web and app design and development", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: With a tag - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.create({ - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesCreate } from "@codat/lending/funcs/companiesCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesCreate(codatLending, { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: With no description - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.create({ - name: "Technicalium", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesCreate } from "@codat/lending/funcs/companiesCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesCreate(codatLending, { - name: "Technicalium", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.CompanyRequestBody](../../sdk/models/shared/companyrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## replace - -Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload. - -A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. -Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - -### Example Usage: Unauthorized - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.replace({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyRequestBody: { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesReplace } from "@codat/lending/funcs/companiesReplace.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesReplace(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyRequestBody: { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesReplace failed:", res.error); - } -} - -run(); -``` -### Example Usage: Update description - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.replace({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyRequestBody: { - name: "Same name", - description: "Additional documents required", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesReplace } from "@codat/lending/funcs/companiesReplace.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesReplace(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyRequestBody: { - name: "Same name", - description: "Additional documents required", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesReplace failed:", res.error); - } -} - -run(); -``` -### Example Usage: Update name - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.replace({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyRequestBody: { - name: "New Name", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesReplace } from "@codat/lending/funcs/companiesReplace.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesReplace(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyRequestBody: { - name: "New Name", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesReplace failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReplaceCompanyRequest](../../sdk/models/operations/replacecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## update - -Use the *Update company* endpoint to update the name, description, or tags of the company. - -The *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. - -A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - -### Example Usage: Unauthorized - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.update({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyUpdateRequest: { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesUpdate } from "@codat/lending/funcs/companiesUpdate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesUpdate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyUpdateRequest: { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesUpdate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Update name - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.update({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyUpdateRequest: { - name: "New Name", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesUpdate } from "@codat/lending/funcs/companiesUpdate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesUpdate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyUpdateRequest: { - name: "New Name", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesUpdate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Update tags - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.update({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyUpdateRequest: { - tags: { - "refrence": "new reference", - }, - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesUpdate } from "@codat/lending/funcs/companiesUpdate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesUpdate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyUpdateRequest: { - tags: { - "refrence": "new reference", - }, - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesUpdate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateCompanyRequest](../../sdk/models/operations/updatecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## delete - -The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/lending-api#/schemas/Company), its [connections](https://docs.codat.io/lending-api#/schemas/Connection) and any cached data. This operation is irreversible. - -A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. -Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - await codatLending.companies.delete({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesDelete } from "@codat/lending/funcs/companiesDelete.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesDelete(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - - } else { - console.log("companiesDelete failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteCompanyRequest](../../sdk/models/operations/deletecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get company* endpoint returns a single company for a given `companyId`. - -A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. -Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - - -### Example Usage: Parent multi-entity company - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesGet } from "@codat/lending/funcs/companiesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Simple company - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesGet } from "@codat/lending/funcs/companiesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Subsidiary multi-entity company - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companies.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companiesGet } from "@codat/lending/funcs/companiesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companiesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companiesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCompanyRequest](../../sdk/models/operations/getcompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Companies + +## Overview + +Create and manage your SMB users' companies. + +### Available Operations + +* [list](#list) - List companies +* [create](#create) - Create company +* [replace](#replace) - Replace company +* [update](#update) - Update company +* [delete](#delete) - Delete a company +* [get](#get) - Get company + +## list + +The *List companies* endpoint returns a list of [companies](https://docs.codat.io/lending-api#/schemas/Company) associated to your instances. + +A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. +Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + +## Filter by tags + +The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): + +- equals (`=`) +- not equals (`!=`) +- contains (`~`) + +For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: +- Foreign key: `uid = {yourCustomerId}` +- Region: `region != uk` +- Owning team and region: `region = uk && owningTeam = invoice-finance` + +### Example Usage: List of Companies + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.list({ + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesList } from "@codat/lending/funcs/companiesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesList(codatLending, { + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: One company + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.list({ + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesList } from "@codat/lending/funcs/companiesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesList(codatLending, { + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCompaniesRequest](../../sdk/models/operations/listcompaniesrequest.md) | :heavy_minus_sign: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Companies](../../sdk/models/shared/companies.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat. + +A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. +Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + +If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. + +### Example Usage: Malformed query + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.create({ + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesCreate } from "@codat/lending/funcs/companiesCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesCreate(codatLending, { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: With a description + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.create({ + name: "Technicalium", + description: "Technology services, including web and app design and development", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesCreate } from "@codat/lending/funcs/companiesCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesCreate(codatLending, { + name: "Technicalium", + description: "Technology services, including web and app design and development", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: With a tag + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.create({ + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesCreate } from "@codat/lending/funcs/companiesCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesCreate(codatLending, { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: With no description + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.create({ + name: "Technicalium", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesCreate } from "@codat/lending/funcs/companiesCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesCreate(codatLending, { + name: "Technicalium", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.CompanyRequestBody](../../sdk/models/shared/companyrequestbody.md) | :heavy_minus_sign: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## replace + +Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload. + +A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. +Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + +### Example Usage: Unauthorized + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.replace({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesReplace } from "@codat/lending/funcs/companiesReplace.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesReplace(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesReplace failed:", res.error); + } +} + +run(); +``` +### Example Usage: Update description + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.replace({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Same name", + description: "Additional documents required", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesReplace } from "@codat/lending/funcs/companiesReplace.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesReplace(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Same name", + description: "Additional documents required", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesReplace failed:", res.error); + } +} + +run(); +``` +### Example Usage: Update name + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.replace({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "New Name", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesReplace } from "@codat/lending/funcs/companiesReplace.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesReplace(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "New Name", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesReplace failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReplaceCompanyRequest](../../sdk/models/operations/replacecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update + +Use the *Update company* endpoint to update the name, description, or tags of the company. + +The *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. + +A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. + +### Example Usage: Unauthorized + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesUpdate } from "@codat/lending/funcs/companiesUpdate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesUpdate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesUpdate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Update name + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + name: "New Name", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesUpdate } from "@codat/lending/funcs/companiesUpdate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesUpdate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + name: "New Name", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesUpdate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Update tags + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + tags: { + "refrence": "new reference", + }, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesUpdate } from "@codat/lending/funcs/companiesUpdate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesUpdate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + tags: { + "refrence": "new reference", + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateCompanyRequest](../../sdk/models/operations/updatecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/lending-api#/schemas/Company), its [connections](https://docs.codat.io/lending-api#/schemas/Connection) and any cached data. This operation is irreversible. + +A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. +Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatLending.companies.delete({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesDelete } from "@codat/lending/funcs/companiesDelete.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesDelete(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("companiesDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteCompanyRequest](../../sdk/models/operations/deletecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get company* endpoint returns a single company for a given `companyId`. + +A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. +Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + + +### Example Usage: Parent multi-entity company + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesGet } from "@codat/lending/funcs/companiesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Simple company + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesGet } from "@codat/lending/funcs/companiesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Subsidiary multi-entity company + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companies.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companiesGet } from "@codat/lending/funcs/companiesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCompanyRequest](../../sdk/models/operations/getcompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/companyinfo/README.md b/lending/docs/sdks/companyinfo/README.md index 18892a45b..ffa4fae33 100644 --- a/lending/docs/sdks/companyinfo/README.md +++ b/lending/docs/sdks/companyinfo/README.md @@ -1,166 +1,166 @@ -# CompanyInfo - -## Overview - -View company information fetched from the source platform. - -### Available Operations - -* [getAccountingProfile](#getaccountingprofile) - Get company accounting profile -* [getCommerceProfile](#getcommerceprofile) - Get company commerce profile - -## getAccountingProfile - -Gets the latest basic info for a company. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companyInfo.getAccountingProfile({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companyInfoGetAccountingProfile } from "@codat/lending/funcs/companyInfoGetAccountingProfile.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companyInfoGetAccountingProfile(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companyInfoGetAccountingProfile failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingProfileRequest](../../sdk/models/operations/getaccountingprofilerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCompanyInfo](../../sdk/models/shared/accountingcompanyinfo.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getCommerceProfile - -Retrieve information about the company, as seen in the commerce -platform. - -This may include information like addresses, tax registration details and -social media or website information." - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.companyInfo.getCommerceProfile({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { companyInfoGetCommerceProfile } from "@codat/lending/funcs/companyInfoGetCommerceProfile.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await companyInfoGetCommerceProfile(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("companyInfoGetCommerceProfile failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceProfileRequest](../../sdk/models/operations/getcommerceprofilerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceCompanyInfo](../../sdk/models/shared/commercecompanyinfo.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# CompanyInfo + +## Overview + +View company information fetched from the source platform. + +### Available Operations + +* [getAccountingProfile](#getaccountingprofile) - Get company accounting profile +* [getCommerceProfile](#getcommerceprofile) - Get company commerce profile + +## getAccountingProfile + +Gets the latest basic info for a company. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companyInfo.getAccountingProfile({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companyInfoGetAccountingProfile } from "@codat/lending/funcs/companyInfoGetAccountingProfile.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companyInfoGetAccountingProfile(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companyInfoGetAccountingProfile failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingProfileRequest](../../sdk/models/operations/getaccountingprofilerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCompanyInfo](../../sdk/models/shared/accountingcompanyinfo.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCommerceProfile + +Retrieve information about the company, as seen in the commerce +platform. + +This may include information like addresses, tax registration details and +social media or website information." + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.companyInfo.getCommerceProfile({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { companyInfoGetCommerceProfile } from "@codat/lending/funcs/companyInfoGetCommerceProfile.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companyInfoGetCommerceProfile(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companyInfoGetCommerceProfile failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceProfileRequest](../../sdk/models/operations/getcommerceprofilerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceCompanyInfo](../../sdk/models/shared/commercecompanyinfo.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/connections/README.md b/lending/docs/sdks/connections/README.md index 60c2b19f3..1d62838d2 100644 --- a/lending/docs/sdks/connections/README.md +++ b/lending/docs/sdks/connections/README.md @@ -1,468 +1,468 @@ -# Connections - -## Overview - -Create new and manage existing data connections for a company. - -### Available Operations - -* [list](#list) - List connections -* [create](#create) - Create connection -* [get](#get) - Get connection -* [delete](#delete) - Delete connection -* [unlink](#unlink) - Unlink connection - -## list - -List the connections for a company. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.connections.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { connectionsList } from "@codat/lending/funcs/connectionsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await connectionsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("connectionsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListConnectionsRequest](../../sdk/models/operations/listconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Connections](../../sdk/models/shared/connections.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## create - -Creates a connection for the company by providing a valid `platformKey`. - -Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. - -### Example Usage: Connection - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.connections.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - requestBody: { - platformKey: "gbol", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { connectionsCreate } from "@codat/lending/funcs/connectionsCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await connectionsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - requestBody: { - platformKey: "gbol", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("connectionsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Unauthorized - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.connections.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - requestBody: { - platformKey: "gbol", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { connectionsCreate } from "@codat/lending/funcs/connectionsCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await connectionsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - requestBody: { - platformKey: "gbol", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("connectionsCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateConnectionRequest](../../sdk/models/operations/createconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.connections.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { connectionsGet } from "@codat/lending/funcs/connectionsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await connectionsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("connectionsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetConnectionRequest](../../sdk/models/operations/getconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## delete - -Revoke and remove a connection from a company. -This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - await codatLending.connections.delete({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { connectionsDelete } from "@codat/lending/funcs/connectionsDelete.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await connectionsDelete(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - - } else { - console.log("connectionsDelete failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteConnectionRequest](../../sdk/models/operations/deleteconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## unlink - -This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.connections.unlink({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestBody: { - status: "Unlinked", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { connectionsUnlink } from "@codat/lending/funcs/connectionsUnlink.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await connectionsUnlink(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestBody: { - status: "Unlinked", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("connectionsUnlink failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UnlinkConnectionRequest](../../sdk/models/operations/unlinkconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Connections + +## Overview + +Create new and manage existing data connections for a company. + +### Available Operations + +* [list](#list) - List connections +* [create](#create) - Create connection +* [get](#get) - Get connection +* [delete](#delete) - Delete connection +* [unlink](#unlink) - Unlink connection + +## list + +List the connections for a company. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.connections.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { connectionsList } from "@codat/lending/funcs/connectionsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListConnectionsRequest](../../sdk/models/operations/listconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Connections](../../sdk/models/shared/connections.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +Creates a connection for the company by providing a valid `platformKey`. + +Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. + +### Example Usage: Connection + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.connections.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: { + platformKey: "gbol", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { connectionsCreate } from "@codat/lending/funcs/connectionsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: { + platformKey: "gbol", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Unauthorized + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.connections.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: { + platformKey: "gbol", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { connectionsCreate } from "@codat/lending/funcs/connectionsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: { + platformKey: "gbol", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateConnectionRequest](../../sdk/models/operations/createconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.connections.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { connectionsGet } from "@codat/lending/funcs/connectionsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetConnectionRequest](../../sdk/models/operations/getconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Revoke and remove a connection from a company. +This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatLending.connections.delete({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { connectionsDelete } from "@codat/lending/funcs/connectionsDelete.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsDelete(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("connectionsDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteConnectionRequest](../../sdk/models/operations/deleteconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## unlink + +This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.connections.unlink({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestBody: { + status: "Unlinked", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { connectionsUnlink } from "@codat/lending/funcs/connectionsUnlink.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsUnlink(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestBody: { + status: "Unlinked", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsUnlink failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UnlinkConnectionRequest](../../sdk/models/operations/unlinkconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/createoperations/README.md b/lending/docs/sdks/createoperations/README.md index b6193e645..1269be8ed 100644 --- a/lending/docs/sdks/createoperations/README.md +++ b/lending/docs/sdks/createoperations/README.md @@ -1,164 +1,162 @@ -# LoanWriteback.CreateOperations - -## Overview - -### Available Operations - -* [get](#get) - Get create operation -* [list](#list) - List create operations - -## get - -Retrieve create operation. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.createOperations.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "23a26d56-6e3d-4414-865c-4fa7ebbb43e3", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackCreateOperationsGet } from "@codat/lending/funcs/loanWritebackCreateOperationsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackCreateOperationsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "23a26d56-6e3d-4414-865c-4fa7ebbb43e3", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackCreateOperationsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCreateOperationRequest](../../sdk/models/operations/getcreateoperationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOperation](../../sdk/models/shared/pushoperation.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## list - -List create operations. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.createOperations.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackCreateOperationsList } from "@codat/lending/funcs/loanWritebackCreateOperationsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackCreateOperationsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackCreateOperationsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCreateOperationsRequest](../../sdk/models/operations/listcreateoperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PushOperations](../../sdk/models/shared/pushoperations.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.CreateOperations + +## Overview + +### Available Operations + +* [get](#get) - Get create operation +* [list](#list) - List create operations + +## get + +Retrieve create operation. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.createOperations.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackCreateOperationsGet } from "@codat/lending/funcs/loanWritebackCreateOperationsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackCreateOperationsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackCreateOperationsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateOperationRequest](../../sdk/models/operations/getcreateoperationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOperation](../../sdk/models/shared/pushoperation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list + +List create operations. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.createOperations.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackCreateOperationsList } from "@codat/lending/funcs/loanWritebackCreateOperationsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackCreateOperationsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackCreateOperationsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCreateOperationsRequest](../../sdk/models/operations/listcreateoperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PushOperations](../../sdk/models/shared/pushoperations.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/creditnotes/README.md b/lending/docs/sdks/creditnotes/README.md index 706aac595..84797d559 100644 --- a/lending/docs/sdks/creditnotes/README.md +++ b/lending/docs/sdks/creditnotes/README.md @@ -1,1526 +1,1526 @@ -# AccountsReceivable.CreditNotes - -## Overview - -### Available Operations - -* [list](#list) - List credit notes -* [get](#get) - Get credit note - -## list - -The *List credit notes* endpoint returns a list of [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote) for a given company's connection. - -[Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingCreditNotesRequest](../../sdk/models/operations/listaccountingcreditnotesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreditNotes](../../sdk/models/shared/accountingcreditnotes.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get credit note* endpoint returns a single credit note for a given creditNoteId. - -[Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.creditNotes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCreditNotesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - creditNoteId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCreditNotesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingCreditNoteRequest](../../sdk/models/operations/getaccountingcreditnoterequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCreditNote](../../sdk/models/shared/accountingcreditnote.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsReceivable.CreditNotes + +## Overview + +### Available Operations + +* [list](#list) - List credit notes +* [get](#get) - Get credit note + +## list + +The *List credit notes* endpoint returns a list of [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote) for a given company's connection. + +[Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesList } from "@codat/lending/funcs/accountsReceivableCreditNotesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingCreditNotesRequest](../../sdk/models/operations/listaccountingcreditnotesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreditNotes](../../sdk/models/shared/accountingcreditnotes.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get credit note* endpoint returns a single credit note for a given creditNoteId. + +[Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.creditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCreditNotesGet } from "@codat/lending/funcs/accountsReceivableCreditNotesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCreditNotesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + creditNoteId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCreditNotesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingCreditNoteRequest](../../sdk/models/operations/getaccountingcreditnoterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCreditNote](../../sdk/models/shared/accountingcreditnote.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/customers/README.md b/lending/docs/sdks/customers/README.md index 3df545302..789d3b3bb 100644 --- a/lending/docs/sdks/customers/README.md +++ b/lending/docs/sdks/customers/README.md @@ -1,2193 +1,2193 @@ -# AccountsReceivable.Customers - -## Overview - -### Available Operations - -* [list](#list) - List customers -* [get](#get) - Get customer -* [listAttachments](#listattachments) - List customer attachments -* [getAttachment](#getattachment) - Get customer attachment -* [downloadAttachment](#downloadattachment) - Download customer attachment - -## list - -The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company's connection. - -[Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingCustomersRequest](../../sdk/models/operations/listaccountingcustomersrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCustomers](../../sdk/models/shared/accountingcustomers.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get customer* endpoint returns a single customer for a given customerId. - -[Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingCustomerRequest](../../sdk/models/operations/getaccountingcustomerrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingCustomer](../../sdk/models/shared/accountingcustomer.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listAttachments - -The *List customer attachments* endpoint returns a list of attachments avialable to download for given `customerId`. - -[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.listAttachments({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersListAttachments } from "@codat/lending/funcs/accountsReceivableCustomersListAttachments.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersListAttachments(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersListAttachments failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingCustomerAttachmentsRequest](../../sdk/models/operations/listaccountingcustomerattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAttachment - -The *Get customer attachment* endpoint returns a specific attachment for a given `customerId` and `attachmentId`. - -[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.getAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersGetAttachment } from "@codat/lending/funcs/accountsReceivableCustomersGetAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersGetAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersGetAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingCustomerAttachmentRequest](../../sdk/models/operations/getaccountingcustomerattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## downloadAttachment - -The *Download customer attachment* endpoint downloads a specific attachment for a given `customerId` and `attachmentId`. - -[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.customers.downloadAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableCustomersDownloadAttachment } from "@codat/lending/funcs/accountsReceivableCustomersDownloadAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableCustomersDownloadAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableCustomersDownloadAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadAccountingCustomerAttachmentRequest](../../sdk/models/operations/downloadaccountingcustomerattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[ReadableStream](../../models/data.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsReceivable.Customers + +## Overview + +### Available Operations + +* [list](#list) - List customers +* [get](#get) - Get customer +* [listAttachments](#listattachments) - List customer attachments +* [getAttachment](#getattachment) - Get customer attachment +* [downloadAttachment](#downloadattachment) - Download customer attachment + +## list + +The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company's connection. + +[Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersList } from "@codat/lending/funcs/accountsReceivableCustomersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingCustomersRequest](../../sdk/models/operations/listaccountingcustomersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCustomers](../../sdk/models/shared/accountingcustomers.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get customer* endpoint returns a single customer for a given customerId. + +[Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGet } from "@codat/lending/funcs/accountsReceivableCustomersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingCustomerRequest](../../sdk/models/operations/getaccountingcustomerrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingCustomer](../../sdk/models/shared/accountingcustomer.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listAttachments + +The *List customer attachments* endpoint returns a list of attachments avialable to download for given `customerId`. + +[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.listAttachments({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersListAttachments } from "@codat/lending/funcs/accountsReceivableCustomersListAttachments.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersListAttachments(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersListAttachments failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingCustomerAttachmentsRequest](../../sdk/models/operations/listaccountingcustomerattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAttachment + +The *Get customer attachment* endpoint returns a specific attachment for a given `customerId` and `attachmentId`. + +[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.getAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersGetAttachment } from "@codat/lending/funcs/accountsReceivableCustomersGetAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersGetAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersGetAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingCustomerAttachmentRequest](../../sdk/models/operations/getaccountingcustomerattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## downloadAttachment + +The *Download customer attachment* endpoint downloads a specific attachment for a given `customerId` and `attachmentId`. + +[Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.customers.downloadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableCustomersDownloadAttachment } from "@codat/lending/funcs/accountsReceivableCustomersDownloadAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableCustomersDownloadAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableCustomersDownloadAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadAccountingCustomerAttachmentRequest](../../sdk/models/operations/downloadaccountingcustomerattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[ReadableStream](../../models/data.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/dataintegrity/README.md b/lending/docs/sdks/dataintegrity/README.md index 0b5a8be76..629a1dc4e 100644 --- a/lending/docs/sdks/dataintegrity/README.md +++ b/lending/docs/sdks/dataintegrity/README.md @@ -1,261 +1,261 @@ -# DataIntegrity - -## Overview - -Match mutable accounting data with immutable banking data to increase confidence in financial data. - -### Available Operations - -* [status](#status) - Get data integrity status -* [summaries](#summaries) - Get data integrity summaries -* [details](#details) - List data integrity details - -## status - -The *Get data integrity status* endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/DataIntegrityStatus) for the company’s match results between the data type provided in the URL and other data types that Data Integrity uses to support matching. -This endpoint helps you understand whether match data is available and, if so, how to usefully query it. - -The response tells you: - -- Whether match results are available. -- When the results were generated, and their status. -- The connection IDs, amounts, and dates involved to support useful querying. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.dataIntegrity.status({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { dataIntegrityStatus } from "@codat/lending/funcs/dataIntegrityStatus.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await dataIntegrityStatus(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("dataIntegrityStatus failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetDataIntegrityStatusRequest](../../sdk/models/operations/getdataintegritystatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.DataIntegrityStatuses](../../sdk/models/shared/dataintegritystatuses.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## summaries - -The *Get data integrity summary* endpoint returns a [summary](https://docs.codat.io/lending-api#/schemas/DataIntegritySummary) of match results for a given data type filtered by a query string in the [Codat query language](https://docs.codat.io/using-the-api/querying). - -For example, if you wanted to see summary match results only for transactions after 1 December 2020, you could include a query parameter of `query=date>2020-12-01`. - -The endpoint response includes only the summary results, not transactions. To view match data for transactions, use the [List data integrity details](https://docs.codat.io/lending-api#/operations/get-data-integrity-summaries) endpoint. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.dataIntegrity.summaries({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { dataIntegritySummaries } from "@codat/lending/funcs/dataIntegritySummaries.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await dataIntegritySummaries(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("dataIntegritySummaries failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetDataIntegritySummariesRequest](../../sdk/models/operations/getdataintegritysummariesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.DataIntegritySummaries](../../sdk/models/shared/dataintegritysummaries.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## details - -The *List data integrity details* endpoint returns the match result record by record for a given data type, filtered based on a query string in the same way as summary results. - -The [details](https://docs.codat.io/lending-api#/schemas/DataIntegrityDetail) are paginated and support ordering, following the same conventions as our other data endpoints. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.dataIntegrity.details({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { dataIntegrityDetails } from "@codat/lending/funcs/dataIntegrityDetails.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await dataIntegrityDetails(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "banking-accounts", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("dataIntegrityDetails failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListDataIntegrityDetailsRequest](../../sdk/models/operations/listdataintegritydetailsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.DataIntegrityDetails](../../sdk/models/shared/dataintegritydetails.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# DataIntegrity + +## Overview + +Match mutable accounting data with immutable banking data to increase confidence in financial data. + +### Available Operations + +* [status](#status) - Get data integrity status +* [summaries](#summaries) - Get data integrity summaries +* [details](#details) - List data integrity details + +## status + +The *Get data integrity status* endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/DataIntegrityStatus) for the company’s match results between the data type provided in the URL and other data types that Data Integrity uses to support matching. +This endpoint helps you understand whether match data is available and, if so, how to usefully query it. + +The response tells you: + +- Whether match results are available. +- When the results were generated, and their status. +- The connection IDs, amounts, and dates involved to support useful querying. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.dataIntegrity.status({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { dataIntegrityStatus } from "@codat/lending/funcs/dataIntegrityStatus.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await dataIntegrityStatus(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dataIntegrityStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDataIntegrityStatusRequest](../../sdk/models/operations/getdataintegritystatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.DataIntegrityStatuses](../../sdk/models/shared/dataintegritystatuses.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## summaries + +The *Get data integrity summary* endpoint returns a [summary](https://docs.codat.io/lending-api#/schemas/DataIntegritySummary) of match results for a given data type filtered by a query string in the [Codat query language](https://docs.codat.io/using-the-api/querying). + +For example, if you wanted to see summary match results only for transactions after 1 December 2020, you could include a query parameter of `query=date>2020-12-01`. + +The endpoint response includes only the summary results, not transactions. To view match data for transactions, use the [List data integrity details](https://docs.codat.io/lending-api#/operations/get-data-integrity-summaries) endpoint. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.dataIntegrity.summaries({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { dataIntegritySummaries } from "@codat/lending/funcs/dataIntegritySummaries.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await dataIntegritySummaries(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dataIntegritySummaries failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDataIntegritySummariesRequest](../../sdk/models/operations/getdataintegritysummariesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.DataIntegritySummaries](../../sdk/models/shared/dataintegritysummaries.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## details + +The *List data integrity details* endpoint returns the match result record by record for a given data type, filtered based on a query string in the same way as summary results. + +The [details](https://docs.codat.io/lending-api#/schemas/DataIntegrityDetail) are paginated and support ordering, following the same conventions as our other data endpoints. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.dataIntegrity.details({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { dataIntegrityDetails } from "@codat/lending/funcs/dataIntegrityDetails.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await dataIntegrityDetails(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "banking-accounts", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dataIntegrityDetails failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListDataIntegrityDetailsRequest](../../sdk/models/operations/listdataintegritydetailsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.DataIntegrityDetails](../../sdk/models/shared/dataintegritydetails.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/directcosts/README.md b/lending/docs/sdks/directcosts/README.md index e89fecf28..d751b8cdc 100644 --- a/lending/docs/sdks/directcosts/README.md +++ b/lending/docs/sdks/directcosts/README.md @@ -1,1402 +1,1402 @@ -# Transactions.DirectCosts - -## Overview - -### Available Operations - -* [list](#list) - List direct costs -* [get](#get) - Get direct cost -* [getAttachment](#getattachment) - Get direct cost attachment -* [downloadAttachment](#downloadattachment) - Download direct cost attachment -* [listAttachments](#listattachments) - List direct cost attachments - -## list - -The *List direct costs* endpoint returns a list of [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company's connection. - -[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingDirectCostsRequest](../../sdk/models/operations/listaccountingdirectcostsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingDirectCosts](../../sdk/models/shared/accountingdirectcosts.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get direct cost* endpoint returns a single direct cost for a given directCostId. - -[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingDirectCostRequest](../../sdk/models/operations/getaccountingdirectcostrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingDirectCost](../../sdk/models/shared/accountingdirectcost.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAttachment - -The *Get direct cost attachment* endpoint returns a specific attachment for a given `directCostId` and `attachmentId`. - -[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.getAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsGetAttachment } from "@codat/lending/funcs/transactionsDirectCostsGetAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsGetAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsGetAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingDirectCostAttachmentRequest](../../sdk/models/operations/getaccountingdirectcostattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## downloadAttachment - -The *Download direct cost attachment* endpoint downloads a specific attachment for a given `directCostId` and `attachmentId`. - -[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.downloadAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsDownloadAttachment } from "@codat/lending/funcs/transactionsDirectCostsDownloadAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsDownloadAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsDownloadAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadAccountingDirectCostAttachmentRequest](../../sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[ReadableStream](../../models/data.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listAttachments - -The *List direct cost attachments* endpoint returns a list of attachments available to download for given `directCostId`. - -[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.directCosts.listAttachments({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsDirectCostsListAttachments } from "@codat/lending/funcs/transactionsDirectCostsListAttachments.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsDirectCostsListAttachments(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsDirectCostsListAttachments failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingDirectCostAttachmentsRequest](../../sdk/models/operations/listaccountingdirectcostattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Transactions.DirectCosts + +## Overview + +### Available Operations + +* [list](#list) - List direct costs +* [get](#get) - Get direct cost +* [getAttachment](#getattachment) - Get direct cost attachment +* [downloadAttachment](#downloadattachment) - Download direct cost attachment +* [listAttachments](#listattachments) - List direct cost attachments + +## list + +The *List direct costs* endpoint returns a list of [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company's connection. + +[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsList } from "@codat/lending/funcs/transactionsDirectCostsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingDirectCostsRequest](../../sdk/models/operations/listaccountingdirectcostsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingDirectCosts](../../sdk/models/shared/accountingdirectcosts.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get direct cost* endpoint returns a single direct cost for a given directCostId. + +[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGet } from "@codat/lending/funcs/transactionsDirectCostsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingDirectCostRequest](../../sdk/models/operations/getaccountingdirectcostrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingDirectCost](../../sdk/models/shared/accountingdirectcost.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAttachment + +The *Get direct cost attachment* endpoint returns a specific attachment for a given `directCostId` and `attachmentId`. + +[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.getAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsGetAttachment } from "@codat/lending/funcs/transactionsDirectCostsGetAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsGetAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsGetAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingDirectCostAttachmentRequest](../../sdk/models/operations/getaccountingdirectcostattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## downloadAttachment + +The *Download direct cost attachment* endpoint downloads a specific attachment for a given `directCostId` and `attachmentId`. + +[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.downloadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsDownloadAttachment } from "@codat/lending/funcs/transactionsDirectCostsDownloadAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsDownloadAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsDownloadAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadAccountingDirectCostAttachmentRequest](../../sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[ReadableStream](../../models/data.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listAttachments + +The *List direct cost attachments* endpoint returns a list of attachments available to download for given `directCostId`. + +[Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.directCosts.listAttachments({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsDirectCostsListAttachments } from "@codat/lending/funcs/transactionsDirectCostsListAttachments.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsDirectCostsListAttachments(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directCostId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsDirectCostsListAttachments failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingDirectCostAttachmentsRequest](../../sdk/models/operations/listaccountingdirectcostattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/directincomes/README.md b/lending/docs/sdks/directincomes/README.md index 67c8e001c..6b2a07ac9 100644 --- a/lending/docs/sdks/directincomes/README.md +++ b/lending/docs/sdks/directincomes/README.md @@ -1,1184 +1,1184 @@ -# AccountsReceivable.DirectIncomes - -## Overview - -### Available Operations - -* [list](#list) - List direct incomes -* [get](#get) - Get direct income -* [getAttachment](#getattachment) - Get direct income attachment -* [downloadAttachment](#downloadattachment) - Download direct income attachment -* [listAttachments](#listattachments) - List direct income attachments - -## list - -The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) for a given company's connection. - -[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingDirectIncomesRequest](../../sdk/models/operations/listaccountingdirectincomesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingDirectIncomes](../../sdk/models/shared/accountingdirectincomes.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get direct income* endpoint returns a single direct income for a given directIncomeId. - -[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingDirectIncomeRequest](../../sdk/models/operations/getaccountingdirectincomerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingDirectIncome](../../sdk/models/shared/accountingdirectincome.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAttachment - -The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`. - -[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.getAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesGetAttachment } from "@codat/lending/funcs/accountsReceivableDirectIncomesGetAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesGetAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesGetAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingDirectIncomeAttachmentRequest](../../sdk/models/operations/getaccountingdirectincomeattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## downloadAttachment - -The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`. - -[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.downloadAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesDownloadAttachment } from "@codat/lending/funcs/accountsReceivableDirectIncomesDownloadAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesDownloadAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesDownloadAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadAccountingDirectIncomeAttachmentRequest](../../sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[ReadableStream](../../models/data.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listAttachments - -The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`. - -[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.directIncomes.listAttachments({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableDirectIncomesListAttachments } from "@codat/lending/funcs/accountsReceivableDirectIncomesListAttachments.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableDirectIncomesListAttachments(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableDirectIncomesListAttachments failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingDirectIncomeAttachmentsRequest](../../sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsReceivable.DirectIncomes + +## Overview + +### Available Operations + +* [list](#list) - List direct incomes +* [get](#get) - Get direct income +* [getAttachment](#getattachment) - Get direct income attachment +* [downloadAttachment](#downloadattachment) - Download direct income attachment +* [listAttachments](#listattachments) - List direct income attachments + +## list + +The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) for a given company's connection. + +[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesList } from "@codat/lending/funcs/accountsReceivableDirectIncomesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingDirectIncomesRequest](../../sdk/models/operations/listaccountingdirectincomesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingDirectIncomes](../../sdk/models/shared/accountingdirectincomes.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get direct income* endpoint returns a single direct income for a given directIncomeId. + +[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGet } from "@codat/lending/funcs/accountsReceivableDirectIncomesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingDirectIncomeRequest](../../sdk/models/operations/getaccountingdirectincomerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingDirectIncome](../../sdk/models/shared/accountingdirectincome.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAttachment + +The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`. + +[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.getAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesGetAttachment } from "@codat/lending/funcs/accountsReceivableDirectIncomesGetAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesGetAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesGetAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingDirectIncomeAttachmentRequest](../../sdk/models/operations/getaccountingdirectincomeattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## downloadAttachment + +The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`. + +[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.downloadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesDownloadAttachment } from "@codat/lending/funcs/accountsReceivableDirectIncomesDownloadAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesDownloadAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesDownloadAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadAccountingDirectIncomeAttachmentRequest](../../sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[ReadableStream](../../models/data.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listAttachments + +The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`. + +[Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.directIncomes.listAttachments({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableDirectIncomesListAttachments } from "@codat/lending/funcs/accountsReceivableDirectIncomesListAttachments.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableDirectIncomesListAttachments(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + directIncomeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableDirectIncomesListAttachments failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingDirectIncomeAttachmentsRequest](../../sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/disputes/README.md b/lending/docs/sdks/disputes/README.md index 287006823..eb82fb7b7 100644 --- a/lending/docs/sdks/disputes/README.md +++ b/lending/docs/sdks/disputes/README.md @@ -1,286 +1,286 @@ -# Sales.Disputes - -## Overview - -### Available Operations - -* [list](#list) - List disputes -* [get](#get) - Get dispute - -## list - -The *List disputes* endpoint returns a list of [disputes](https://docs.codat.io/lending-api#/schemas/Dispute) for a given company's connection. - -[Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.disputes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesDisputesList } from "@codat/lending/funcs/salesDisputesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesDisputesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesDisputesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Stripe Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.disputes.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesDisputesList } from "@codat/lending/funcs/salesDisputesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesDisputesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesDisputesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommerceDisputesRequest](../../sdk/models/operations/listcommercedisputesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceDisputes](../../sdk/models/shared/commercedisputes.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get dispute* endpoint returns a single dispute for a given disputeId. - -[Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.disputes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesDisputesGet } from "@codat/lending/funcs/salesDisputesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesDisputesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesDisputesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Stripe Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.disputes.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesDisputesGet } from "@codat/lending/funcs/salesDisputesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesDisputesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesDisputesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceDisputeRequest](../../sdk/models/operations/getcommercedisputerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceDispute](../../sdk/models/shared/commercedispute.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Disputes + +## Overview + +### Available Operations + +* [list](#list) - List disputes +* [get](#get) - Get dispute + +## list + +The *List disputes* endpoint returns a list of [disputes](https://docs.codat.io/lending-api#/schemas/Dispute) for a given company's connection. + +[Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.disputes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesDisputesList } from "@codat/lending/funcs/salesDisputesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesDisputesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesDisputesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Stripe Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.disputes.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesDisputesList } from "@codat/lending/funcs/salesDisputesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesDisputesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesDisputesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommerceDisputesRequest](../../sdk/models/operations/listcommercedisputesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceDisputes](../../sdk/models/shared/commercedisputes.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get dispute* endpoint returns a single dispute for a given disputeId. + +[Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.disputes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesDisputesGet } from "@codat/lending/funcs/salesDisputesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesDisputesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesDisputesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Stripe Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.disputes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesDisputesGet } from "@codat/lending/funcs/salesDisputesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesDisputesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + disputeId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesDisputesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceDisputeRequest](../../sdk/models/operations/getcommercedisputerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceDispute](../../sdk/models/shared/commercedispute.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/excelreports/README.md b/lending/docs/sdks/excelreports/README.md index b08ec5096..96163fc1f 100644 --- a/lending/docs/sdks/excelreports/README.md +++ b/lending/docs/sdks/excelreports/README.md @@ -1,266 +1,260 @@ -# ExcelReports - -## Overview - -Download reports in Excel format. - -### Available Operations - -* [generate](#generate) - Generate Excel report -* [getStatus](#getstatus) - Get Excel report status -* [download](#download) - Download Excel report - -## generate - -The *Generate Excel report* endpoint requests the production of a downloadable Excel file for a report type specified in the `reportType` query parameter. - -In response, the endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/ExcelStatus) detailing the current state of the report generation request. - -### Report types - -| reportType | Description | -|--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| -| `audit` | Identifies inaccurate or out-of-date accounts, helping you to make decisions with confidence. || [audit](https://docs.codat.io/lending/excel/audit-report) | Identify inaccurate or out-of-date accounts, helping you to make decisions with confidence. | -| `enhancedCashFlow` | Provides a fully categorized list of bank transactions for a company, allowing lenders to accurately forecast a company's cash flow. | -| `enhancedFinancials` | Supports decision-making using fully categorized financial statements to allow lenders to automate their underwriting processes. | -| `enhancedInvoices` | Helps verify that payments have been made against historic invoices. Great for invoice finance lenders. | - -[Learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. - - - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.excelReports.generate({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "enhancedFinancials", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { excelReportsGenerate } from "@codat/lending/funcs/excelReportsGenerate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await excelReportsGenerate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "enhancedFinancials", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("excelReportsGenerate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GenerateExcelReportRequest](../../sdk/models/operations/generateexcelreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.ExcelStatus](../../sdk/models/shared/excelstatus.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getStatus - -The *Get Excel report status* returns the status of the report mostly recently requested for Excel generation. It does not return the status of any historical report requests. - -Poll this endpoint to check the progress of the report once you have requested its generation. This will not affect the generation of the report. - -When the report generation completes successfully, the `inProgress` property will be marked as `false` and the `success` field will be marked as `true`. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.excelReports.getStatus({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "enhancedCashFlow", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { excelReportsGetStatus } from "@codat/lending/funcs/excelReportsGetStatus.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await excelReportsGetStatus(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "enhancedCashFlow", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("excelReportsGetStatus failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetExcelReportGenerationStatusRequest](../../sdk/models/operations/getexcelreportgenerationstatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.ExcelStatus](../../sdk/models/shared/excelstatus.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## download - -The *Download Excel report* endpoint downloads the latest successfully generated Excel report of a specified report type for a given company. - -The downloadable Excel file is returned in the response. You can save it to your local machine. - -You can [learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.excelReports.download({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "enhancedCashFlow", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { excelReportsDownload } from "@codat/lending/funcs/excelReportsDownload.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await excelReportsDownload(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "enhancedCashFlow", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("excelReportsDownload failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadExcelReportRequest](../../sdk/models/operations/downloadexcelreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[Uint8Array](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# ExcelReports + +## Overview + +Download reports in Excel format. + +### Available Operations + +* [generate](#generate) - Generate Excel report +* [getStatus](#getstatus) - Get Excel report status +* [download](#download) - Download Excel report + +## generate + +The *Generate Excel report* endpoint requests the production of a downloadable Excel file for a report type specified in the `reportType` query parameter. + +In response, the endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/ExcelStatus) detailing the current state of the report generation request. + +### Report types + +| reportType | Description | +|--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| `audit` | Identifies inaccurate or out-of-date accounts, helping you to make decisions with confidence. || [audit](https://docs.codat.io/lending/excel/audit-report) | Identify inaccurate or out-of-date accounts, helping you to make decisions with confidence. | +| `enhancedCashFlow` | Provides a fully categorized list of bank transactions for a company, allowing lenders to accurately forecast a company's cash flow. | +| `enhancedFinancials` | Supports decision-making using fully categorized financial statements to allow lenders to automate their underwriting processes. | +| `enhancedInvoices` | Helps verify that payments have been made against historic invoices. Great for invoice finance lenders. | + +[Learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. + + + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.excelReports.generate({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { excelReportsGenerate } from "@codat/lending/funcs/excelReportsGenerate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await excelReportsGenerate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("excelReportsGenerate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GenerateExcelReportRequest](../../sdk/models/operations/generateexcelreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.ExcelStatus](../../sdk/models/shared/excelstatus.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getStatus + +The *Get Excel report status* returns the status of the report mostly recently requested for Excel generation. It does not return the status of any historical report requests. + +Poll this endpoint to check the progress of the report once you have requested its generation. This will not affect the generation of the report. + +When the report generation completes successfully, the `inProgress` property will be marked as `false` and the `success` field will be marked as `true`. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.excelReports.getStatus({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { excelReportsGetStatus } from "@codat/lending/funcs/excelReportsGetStatus.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await excelReportsGetStatus(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("excelReportsGetStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetExcelReportGenerationStatusRequest](../../sdk/models/operations/getexcelreportgenerationstatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.ExcelStatus](../../sdk/models/shared/excelstatus.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## download + +The *Download Excel report* endpoint downloads the latest successfully generated Excel report of a specified report type for a given company. + +The downloadable Excel file is returned in the response. You can save it to your local machine. + +You can [learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.excelReports.download({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { excelReportsDownload } from "@codat/lending/funcs/excelReportsDownload.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await excelReportsDownload(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("excelReportsDownload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadExcelReportRequest](../../sdk/models/operations/downloadexcelreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[Uint8Array](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/fileupload/README.md b/lending/docs/sdks/fileupload/README.md index 500e9790b..809ef6902 100644 --- a/lending/docs/sdks/fileupload/README.md +++ b/lending/docs/sdks/fileupload/README.md @@ -1,246 +1,246 @@ -# FileUpload - -## Overview - -Endpoints to manage uploaded files. - -### Available Operations - -* [listUploaded](#listuploaded) - List all files uploaded by a company -* [download](#download) - Download all files for a company -* [upload](#upload) - Upload files for a company - -## listUploaded - -The *List files* endpoint returns a list of all files uploaded to Codat by the SMB. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.fileUpload.listUploaded({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { fileUploadListUploaded } from "@codat/lending/funcs/fileUploadListUploaded.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await fileUploadListUploaded(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("fileUploadListUploaded failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListFilesRequest](../../sdk/models/operations/listfilesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.FileT[]](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## download - -The *Download files* endpoint downloads all files that have been uploaded by to SMB to Codat. A `date` may be specified to download any files uploaded on the date provided. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.fileUpload.download({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - date: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { fileUploadDownload } from "@codat/lending/funcs/fileUploadDownload.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await fileUploadDownload(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - date: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("fileUploadDownload failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadFilesRequest](../../sdk/models/operations/downloadfilesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[ReadableStream](../../models/data.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## upload - -The *Upload files* endpoint uploads multiple files provided by the SMB to Codat. This may include personal identity documents, pitch decks, contracts, or files with accounting and banking data. - -Uploaded files must meet the following requirements: - -- Up to 20 files can be uploaded at a time. -- PDF, XLS, XLSX, XLSB, CSV, DOC, DOCX, PPT, PPTX, JPEG, JPG, and PNG files can be uploaded. -- Each file can be up to 10MB in size. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - await codatLending.fileUpload.upload({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { fileUploadUpload } from "@codat/lending/funcs/fileUploadUpload.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await fileUploadUpload(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - - } else { - console.log("fileUploadUpload failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UploadFilesRequest](../../sdk/models/operations/uploadfilesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# FileUpload + +## Overview + +Endpoints to manage uploaded files. + +### Available Operations + +* [listUploaded](#listuploaded) - List all files uploaded by a company +* [download](#download) - Download all files for a company +* [upload](#upload) - Upload files for a company + +## listUploaded + +The *List files* endpoint returns a list of all files uploaded to Codat by the SMB. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.fileUpload.listUploaded({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { fileUploadListUploaded } from "@codat/lending/funcs/fileUploadListUploaded.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await fileUploadListUploaded(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("fileUploadListUploaded failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListFilesRequest](../../sdk/models/operations/listfilesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.FileT[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## download + +The *Download files* endpoint downloads all files that have been uploaded by to SMB to Codat. A `date` may be specified to download any files uploaded on the date provided. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.fileUpload.download({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + date: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { fileUploadDownload } from "@codat/lending/funcs/fileUploadDownload.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await fileUploadDownload(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + date: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("fileUploadDownload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadFilesRequest](../../sdk/models/operations/downloadfilesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[ReadableStream](../../models/data.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## upload + +The *Upload files* endpoint uploads multiple files provided by the SMB to Codat. This may include personal identity documents, pitch decks, contracts, or files with accounting and banking data. + +Uploaded files must meet the following requirements: + +- Up to 20 files can be uploaded at a time. +- PDF, XLS, XLSX, XLSB, CSV, DOC, DOCX, PPT, PPTX, JPEG, JPG, and PNG files can be uploaded. +- Each file can be up to 10MB in size. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatLending.fileUpload.upload({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { fileUploadUpload } from "@codat/lending/funcs/fileUploadUpload.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await fileUploadUpload(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("fileUploadUpload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UploadFilesRequest](../../sdk/models/operations/uploadfilesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/financialsummary/README.md b/lending/docs/sdks/financialsummary/README.md new file mode 100644 index 000000000..7c29e7ced --- /dev/null +++ b/lending/docs/sdks/financialsummary/README.md @@ -0,0 +1,178 @@ +# FinancialSummary + +## Overview + +View financial summary information for a company, including credit model reports and accounting score. + +### Available Operations + +* [downloadCreditModelExcel](#downloadcreditmodelexcel) - Download credit model Excel +* [getFinancialSummary](#getfinancialsummary) - Get financial summary insights + +## downloadCreditModelExcel + +> **Available as beta release** +> +> This endpoint is part of a beta release. Please contact your account manager if you want to enable it. + +Use the *Download Credit Model Excel* endpoint to download the credit model Excel file. + +Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `creditModel`. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialSummary.downloadCreditModelExcel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialSummaryDownloadCreditModelExcel } from "@codat/lending/funcs/financialSummaryDownloadCreditModelExcel.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialSummaryDownloadCreditModelExcel(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialSummaryDownloadCreditModelExcel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | DownloadCreditModelExcelRequest | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[Uint8Array](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getFinancialSummary + +> **Available as beta release** +> +> This endpoint is part of a beta release. Please contact your account manager if you want to enable it. + +Financial summary insights provide high-level indicators about the accuracy and completeness of a business’s financial data. These insights include: +- Closed Books Indicator – An estimate of the most recent accounting period officially closed by a business +- Accounting Score – An evaluation of the quality and completeness of a business’s bookkeeping + +Before accessing this endpoint, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `creditModel`. + +> Please note that missing elements might be disabled for the account. Please contact account manager for more details. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialSummary.getFinancialSummary({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialSummaryGetFinancialSummary } from "@codat/lending/funcs/financialSummaryGetFinancialSummary.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialSummaryGetFinancialSummary(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialSummaryGetFinancialSummary failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | GetFinancialSummaryRequest | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.FinancialSummary](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/invoices/README.md b/lending/docs/sdks/invoices/README.md index 5b3d9e521..4088ea796 100644 --- a/lending/docs/sdks/invoices/README.md +++ b/lending/docs/sdks/invoices/README.md @@ -1,2365 +1,2365 @@ -# AccountsReceivable.Invoices - -## Overview - -### Available Operations - -* [listReconciled](#listreconciled) - List reconciled invoices -* [list](#list) - List invoices -* [get](#get) - Get invoice -* [downloadPdf](#downloadpdf) - Get invoice as PDF -* [listAttachments](#listattachments) - List invoice attachments -* [getAttachment](#getattachment) - Get invoice attachment -* [downloadAttachment](#downloadattachment) - Download invoice attachment - -## listReconciled - -Gets a list of invoices linked to the corresponding banking transaction - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.listReconciled({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesListReconciled } from "@codat/lending/funcs/accountsReceivableInvoicesListReconciled.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesListReconciled(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesListReconciled failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListReconciledInvoicesRequest](../../sdk/models/operations/listreconciledinvoicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.EnhancedInvoicesReport](../../sdk/models/shared/enhancedinvoicesreport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## list - -The *List invoices* endpoint returns a list of [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) for a given company's connection. - -[Invoices](https://docs.codat.io/lending-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/lending-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). - -### Tips and traps - -To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat's cache. - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingInvoicesRequest](../../sdk/models/operations/listaccountinginvoicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingInvoices](../../sdk/models/shared/accountinginvoices.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get invoice* endpoint returns a single invoice for a given invoiceId. - -[Invoices](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - -### Tips and traps - -To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat's cache. - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingInvoiceRequest](../../sdk/models/operations/getaccountinginvoicerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingInvoice](../../sdk/models/shared/accountinginvoice.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## downloadPdf - -Download invoice as a pdf. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.downloadPdf({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesDownloadPdf } from "@codat/lending/funcs/accountsReceivableInvoicesDownloadPdf.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesDownloadPdf(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesDownloadPdf failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadAccountingInvoicePdfRequest](../../sdk/models/operations/downloadaccountinginvoicepdfrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[ReadableStream](../../models/data.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listAttachments - -The *List invoice attachments* endpoint returns a list of attachments available to download for given `invoiceId`. - -[Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.listAttachments({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesListAttachments } from "@codat/lending/funcs/accountsReceivableInvoicesListAttachments.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesListAttachments(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesListAttachments failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingInvoiceAttachmentsRequest](../../sdk/models/operations/listaccountinginvoiceattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAttachment - -The *Get invoice attachment* endpoint returns a specific attachment for a given `invoiceId` and `attachmentId`. - -[Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.getAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesGetAttachment } from "@codat/lending/funcs/accountsReceivableInvoicesGetAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesGetAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesGetAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingInvoiceAttachmentRequest](../../sdk/models/operations/getaccountinginvoiceattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## downloadAttachment - -The *Download invoice attachment* endpoint downloads a specific attachment for a given `invoiceId` and `attachmentId`. - -[Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.invoices.downloadAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivableInvoicesDownloadAttachment } from "@codat/lending/funcs/accountsReceivableInvoicesDownloadAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivableInvoicesDownloadAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivableInvoicesDownloadAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadAccountingInvoiceAttachmentRequest](../../sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[ReadableStream](../../models/data.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsReceivable.Invoices + +## Overview + +### Available Operations + +* [listReconciled](#listreconciled) - List reconciled invoices +* [list](#list) - List invoices +* [get](#get) - Get invoice +* [downloadPdf](#downloadpdf) - Get invoice as PDF +* [listAttachments](#listattachments) - List invoice attachments +* [getAttachment](#getattachment) - Get invoice attachment +* [downloadAttachment](#downloadattachment) - Download invoice attachment + +## listReconciled + +Gets a list of invoices linked to the corresponding banking transaction + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.listReconciled({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesListReconciled } from "@codat/lending/funcs/accountsReceivableInvoicesListReconciled.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesListReconciled(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesListReconciled failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListReconciledInvoicesRequest](../../sdk/models/operations/listreconciledinvoicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.EnhancedInvoicesReport](../../sdk/models/shared/enhancedinvoicesreport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list + +The *List invoices* endpoint returns a list of [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) for a given company's connection. + +[Invoices](https://docs.codat.io/lending-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/lending-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). + +### Tips and traps + +To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat's cache. + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesList } from "@codat/lending/funcs/accountsReceivableInvoicesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingInvoicesRequest](../../sdk/models/operations/listaccountinginvoicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingInvoices](../../sdk/models/shared/accountinginvoices.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get invoice* endpoint returns a single invoice for a given invoiceId. + +[Invoices](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + +### Tips and traps + +To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat's cache. + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGet } from "@codat/lending/funcs/accountsReceivableInvoicesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingInvoiceRequest](../../sdk/models/operations/getaccountinginvoicerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingInvoice](../../sdk/models/shared/accountinginvoice.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## downloadPdf + +Download invoice as a pdf. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.downloadPdf({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesDownloadPdf } from "@codat/lending/funcs/accountsReceivableInvoicesDownloadPdf.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesDownloadPdf(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesDownloadPdf failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadAccountingInvoicePdfRequest](../../sdk/models/operations/downloadaccountinginvoicepdfrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[ReadableStream](../../models/data.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listAttachments + +The *List invoice attachments* endpoint returns a list of attachments available to download for given `invoiceId`. + +[Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.listAttachments({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesListAttachments } from "@codat/lending/funcs/accountsReceivableInvoicesListAttachments.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesListAttachments(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesListAttachments failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingInvoiceAttachmentsRequest](../../sdk/models/operations/listaccountinginvoiceattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAttachment + +The *Get invoice attachment* endpoint returns a specific attachment for a given `invoiceId` and `attachmentId`. + +[Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.getAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesGetAttachment } from "@codat/lending/funcs/accountsReceivableInvoicesGetAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesGetAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesGetAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingInvoiceAttachmentRequest](../../sdk/models/operations/getaccountinginvoiceattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## downloadAttachment + +The *Download invoice attachment* endpoint downloads a specific attachment for a given `invoiceId` and `attachmentId`. + +[Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.invoices.downloadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivableInvoicesDownloadAttachment } from "@codat/lending/funcs/accountsReceivableInvoicesDownloadAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivableInvoicesDownloadAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + invoiceId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivableInvoicesDownloadAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadAccountingInvoiceAttachmentRequest](../../sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[ReadableStream](../../models/data.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/journalentries/README.md b/lending/docs/sdks/journalentries/README.md index aa303b50c..4b7b3cd85 100644 --- a/lending/docs/sdks/journalentries/README.md +++ b/lending/docs/sdks/journalentries/README.md @@ -1,1422 +1,1422 @@ -# Transactions.JournalEntries - -## Overview - -### Available Operations - -* [list](#list) - List journal entries -* [get](#get) - Get journal entry - -## list - -The *List journal entries* endpoint returns a list of [journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) for a given company's connection. - -[Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingJournalEntriesRequest](../../sdk/models/operations/listaccountingjournalentriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingJournalEntries](../../sdk/models/shared/accountingjournalentries.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get journal entry* endpoint returns a single journal entry for a given journalEntryId. - -[Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journalEntries.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalEntriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalEntriesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingJournalEntryRequest](../../sdk/models/operations/getaccountingjournalentryrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingJournalEntry](../../sdk/models/shared/accountingjournalentry.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Transactions.JournalEntries + +## Overview + +### Available Operations + +* [list](#list) - List journal entries +* [get](#get) - Get journal entry + +## list + +The *List journal entries* endpoint returns a list of [journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) for a given company's connection. + +[Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesList } from "@codat/lending/funcs/transactionsJournalEntriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingJournalEntriesRequest](../../sdk/models/operations/listaccountingjournalentriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingJournalEntries](../../sdk/models/shared/accountingjournalentries.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get journal entry* endpoint returns a single journal entry for a given journalEntryId. + +[Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journalEntries.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalEntriesGet } from "@codat/lending/funcs/transactionsJournalEntriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalEntriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalEntryId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalEntriesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingJournalEntryRequest](../../sdk/models/operations/getaccountingjournalentryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingJournalEntry](../../sdk/models/shared/accountingjournalentry.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/journals/README.md b/lending/docs/sdks/journals/README.md index 6ff11df54..b9a1eccdd 100644 --- a/lending/docs/sdks/journals/README.md +++ b/lending/docs/sdks/journals/README.md @@ -1,590 +1,590 @@ -# Transactions.Journals - -## Overview - -### Available Operations - -* [list](#list) - List journals -* [get](#get) - Get journal - -## list - -The *List journals* endpoint returns a list of [journals](https://docs.codat.io/lending-api#/schemas/Journal) for a given company's connection. - -[Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingJournalsRequest](../../sdk/models/operations/listaccountingjournalsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingJournals](../../sdk/models/shared/accountingjournals.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get journal* endpoint returns a single journal for a given journalId. - -[Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.journals.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsJournalsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - journalId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsJournalsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingJournalRequest](../../sdk/models/operations/getaccountingjournalrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingJournal](../../sdk/models/shared/accountingjournal.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Transactions.Journals + +## Overview + +### Available Operations + +* [list](#list) - List journals +* [get](#get) - Get journal + +## list + +The *List journals* endpoint returns a list of [journals](https://docs.codat.io/lending-api#/schemas/Journal) for a given company's connection. + +[Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsList } from "@codat/lending/funcs/transactionsJournalsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingJournalsRequest](../../sdk/models/operations/listaccountingjournalsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingJournals](../../sdk/models/shared/accountingjournals.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get journal* endpoint returns a single journal for a given journalId. + +[Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.journals.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsJournalsGet } from "@codat/lending/funcs/transactionsJournalsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsJournalsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsJournalsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingJournalRequest](../../sdk/models/operations/getaccountingjournalrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingJournal](../../sdk/models/shared/accountingjournal.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/liabilities/README.md b/lending/docs/sdks/liabilities/README.md index e8035cc82..b4c938246 100644 --- a/lending/docs/sdks/liabilities/README.md +++ b/lending/docs/sdks/liabilities/README.md @@ -1,340 +1,332 @@ -# Liabilities - -## Overview - -Debt and other liabilities. - -### Available Operations - -* [generateLoanTransactions](#generateloantransactions) - Generate loan transactions report -* [listLoanTransactions](#listloantransactions) - List loan transactions -* [generateLoanSummary](#generateloansummary) - Generate loan summaries report -* [getLoanSummary](#getloansummary) - Get loan summaries - -## generateLoanTransactions - -The _Generate loan transactions_ endpoint requests the generation of the Loan Transactions report. - -Learn more about Codat's liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). - -Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - await codatLending.liabilities.generateLoanTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "commerce", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { liabilitiesGenerateLoanTransactions } from "@codat/lending/funcs/liabilitiesGenerateLoanTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await liabilitiesGenerateLoanTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "commerce", - }); - if (res.ok) { - const { value: result } = res; - - } else { - console.log("liabilitiesGenerateLoanTransactions failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GenerateLoanTransactionsRequest](../../sdk/models/operations/generateloantransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listLoanTransactions - -The *List loan transactions* endpoint returns all [loan transactions](https://docs.codat.io/lending-api#/schemas/LoanTransactions) identified from a company's accounting, banking, and commerce integrations. - -This detail gives analysts a better idea of the loan obligations a company may have. - -Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.liabilities.listLoanTransactions({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "commerce", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { liabilitiesListLoanTransactions } from "@codat/lending/funcs/liabilitiesListLoanTransactions.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await liabilitiesListLoanTransactions(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "commerce", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("liabilitiesListLoanTransactions failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListLoanTransactionsRequest](../../sdk/models/operations/listloantransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.LoanTransactions](../../sdk/models/shared/loantransactions.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## generateLoanSummary - -The _Generate loan summaries_ endpoint requests the generation of the Loan Summaries report. - -Learn more about Codat's liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). - -Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - await codatLending.liabilities.generateLoanSummary({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "accounting", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { liabilitiesGenerateLoanSummary } from "@codat/lending/funcs/liabilitiesGenerateLoanSummary.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await liabilitiesGenerateLoanSummary(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "accounting", - }); - if (res.ok) { - const { value: result } = res; - - } else { - console.log("liabilitiesGenerateLoanSummary failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GenerateLoanSummaryRequest](../../sdk/models/operations/generateloansummaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getLoanSummary - -The *Get loan summaries* endpoint returns a summary by integration type of all loans identified from a company's accounting, banking, and commerce integrations. - -The endpoint returns a list of a company's [loan summaries](https://docs.codat.io/lending-api#/schemas/LoanSummary) for each valid data connection. - -Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.liabilities.getLoanSummary({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "accounting", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { liabilitiesGetLoanSummary } from "@codat/lending/funcs/liabilitiesGetLoanSummary.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await liabilitiesGetLoanSummary(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - sourceType: "accounting", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("liabilitiesGetLoanSummary failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetLoanSummaryRequest](../../sdk/models/operations/getloansummaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.LoanSummary](../../sdk/models/shared/loansummary.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Liabilities + +## Overview + +Debt and other liabilities. + +### Available Operations + +* [generateLoanTransactions](#generateloantransactions) - Generate loan transactions report +* [listLoanTransactions](#listloantransactions) - List loan transactions +* [generateLoanSummary](#generateloansummary) - Generate loan summaries report +* [getLoanSummary](#getloansummary) - Get loan summaries + +## generateLoanTransactions + +The _Generate loan transactions_ endpoint requests the generation of the Loan Transactions report. + +Learn more about Codat's liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). + +Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatLending.liabilities.generateLoanTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { liabilitiesGenerateLoanTransactions } from "@codat/lending/funcs/liabilitiesGenerateLoanTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await liabilitiesGenerateLoanTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("liabilitiesGenerateLoanTransactions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GenerateLoanTransactionsRequest](../../sdk/models/operations/generateloantransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listLoanTransactions + +The *List loan transactions* endpoint returns all [loan transactions](https://docs.codat.io/lending-api#/schemas/LoanTransactions) identified from a company's accounting, banking, and commerce integrations. + +This detail gives analysts a better idea of the loan obligations a company may have. + +Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.liabilities.listLoanTransactions({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { liabilitiesListLoanTransactions } from "@codat/lending/funcs/liabilitiesListLoanTransactions.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await liabilitiesListLoanTransactions(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("liabilitiesListLoanTransactions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListLoanTransactionsRequest](../../sdk/models/operations/listloantransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.LoanTransactions](../../sdk/models/shared/loantransactions.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## generateLoanSummary + +The _Generate loan summaries_ endpoint requests the generation of the Loan Summaries report. + +Learn more about Codat's liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). + +Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatLending.liabilities.generateLoanSummary({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { liabilitiesGenerateLoanSummary } from "@codat/lending/funcs/liabilitiesGenerateLoanSummary.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await liabilitiesGenerateLoanSummary(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("liabilitiesGenerateLoanSummary failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GenerateLoanSummaryRequest](../../sdk/models/operations/generateloansummaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getLoanSummary + +The *Get loan summaries* endpoint returns a summary by integration type of all loans identified from a company's accounting, banking, and commerce integrations. + +The endpoint returns a list of a company's [loan summaries](https://docs.codat.io/lending-api#/schemas/LoanSummary) for each valid data connection. + +Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.liabilities.getLoanSummary({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { liabilitiesGetLoanSummary } from "@codat/lending/funcs/liabilitiesGetLoanSummary.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await liabilitiesGetLoanSummary(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("liabilitiesGetLoanSummary failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLoanSummaryRequest](../../sdk/models/operations/getloansummaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.LoanSummary](../../sdk/models/shared/loansummary.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/locations/README.md b/lending/docs/sdks/locations/README.md index a5fe0930d..88aea9382 100644 --- a/lending/docs/sdks/locations/README.md +++ b/lending/docs/sdks/locations/README.md @@ -1,486 +1,486 @@ -# Sales.Locations - -## Overview - -### Available Operations - -* [list](#list) - List locations -* [get](#get) - Get location - -## list - -The *List locations* endpoint returns a list of [locations](https://docs.codat.io/lending-api#/schemas/Location) for a given company's connection. - -[Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.locations.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesLocationsList } from "@codat/lending/funcs/salesLocationsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesLocationsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesLocationsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.locations.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesLocationsList } from "@codat/lending/funcs/salesLocationsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesLocationsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesLocationsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.locations.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesLocationsList } from "@codat/lending/funcs/salesLocationsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesLocationsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesLocationsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.locations.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesLocationsList } from "@codat/lending/funcs/salesLocationsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesLocationsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesLocationsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommerceLocationsRequest](../../sdk/models/operations/listcommercelocationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceLocations](../../sdk/models/shared/commercelocations.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get location* endpoint returns a single location for a given locationId. - -[Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.locations.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesLocationsGet } from "@codat/lending/funcs/salesLocationsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesLocationsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesLocationsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.locations.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesLocationsGet } from "@codat/lending/funcs/salesLocationsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesLocationsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesLocationsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.locations.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesLocationsGet } from "@codat/lending/funcs/salesLocationsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesLocationsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesLocationsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.locations.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesLocationsGet } from "@codat/lending/funcs/salesLocationsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesLocationsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesLocationsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceLocationRequest](../../sdk/models/operations/getcommercelocationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceLocation](../../sdk/models/shared/commercelocation.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Locations + +## Overview + +### Available Operations + +* [list](#list) - List locations +* [get](#get) - Get location + +## list + +The *List locations* endpoint returns a list of [locations](https://docs.codat.io/lending-api#/schemas/Location) for a given company's connection. + +[Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.locations.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesLocationsList } from "@codat/lending/funcs/salesLocationsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesLocationsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesLocationsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.locations.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesLocationsList } from "@codat/lending/funcs/salesLocationsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesLocationsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesLocationsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.locations.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesLocationsList } from "@codat/lending/funcs/salesLocationsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesLocationsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesLocationsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.locations.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesLocationsList } from "@codat/lending/funcs/salesLocationsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesLocationsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesLocationsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommerceLocationsRequest](../../sdk/models/operations/listcommercelocationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceLocations](../../sdk/models/shared/commercelocations.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get location* endpoint returns a single location for a given locationId. + +[Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.locations.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesLocationsGet } from "@codat/lending/funcs/salesLocationsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesLocationsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesLocationsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.locations.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesLocationsGet } from "@codat/lending/funcs/salesLocationsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesLocationsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesLocationsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.locations.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesLocationsGet } from "@codat/lending/funcs/salesLocationsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesLocationsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesLocationsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.locations.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesLocationsGet } from "@codat/lending/funcs/salesLocationsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesLocationsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + locationId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesLocationsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceLocationRequest](../../sdk/models/operations/getcommercelocationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceLocation](../../sdk/models/shared/commercelocation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/managedata/README.md b/lending/docs/sdks/managedata/README.md index d8a02c3b3..6f72a9c31 100644 --- a/lending/docs/sdks/managedata/README.md +++ b/lending/docs/sdks/managedata/README.md @@ -1,82 +1,82 @@ -# ManageData - -## Overview - -### Available Operations - -* [getStatus](#getstatus) - Get data status - -## getStatus - -Get the state of each data type for a company - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.manageData.getStatus({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { manageDataGetStatus } from "@codat/lending/funcs/manageDataGetStatus.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await manageDataGetStatus(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("manageDataGetStatus failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetDataStatusRequest](../../sdk/models/operations/getdatastatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetDataStatusDataStatuses](../../sdk/models/operations/getdatastatusdatastatuses.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# ManageData + +## Overview + +### Available Operations + +* [getStatus](#getstatus) - Get data status + +## getStatus + +Get the state of each data type for a company + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.manageData.getStatus({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { manageDataGetStatus } from "@codat/lending/funcs/manageDataGetStatus.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataGetStatus(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageDataGetStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDataStatusRequest](../../sdk/models/operations/getdatastatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetDataStatusDataStatuses](../../sdk/models/operations/getdatastatusdatastatuses.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/managereports/README.md b/lending/docs/sdks/managereports/README.md index 7eb1fea09..e4c443167 100644 --- a/lending/docs/sdks/managereports/README.md +++ b/lending/docs/sdks/managereports/README.md @@ -1,168 +1,248 @@ -# ManageReports - -## Overview - -Generate and review generated reports for a company. - -### Available Operations - -* [generateReport](#generatereport) - Generate report -* [listReports](#listreports) - List reports - -## generateReport - -Use the *Generate report* endpoint to initiate the generation of a report specified by the `reportType` parameter. - -This action triggers the system to refresh and pull the necessary data from the company's data sources to ensure the report contains the most up-to-date information. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.manageReports.generateReport({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "categorizedBankStatement", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { manageReportsGenerateReport } from "@codat/lending/funcs/manageReportsGenerateReport.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await manageReportsGenerateReport(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportType: "categorizedBankStatement", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("manageReportsGenerateReport failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GenerateReportRequest](../../sdk/models/operations/generatereportrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.ReportOperation](../../sdk/models/shared/reportoperation.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listReports - -Use the *List reports* endpoint to return details (such as generation's current status, date of request, and date of generation) about all reports generated for a company. The query parameter can be used to filter the results. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.manageReports.listReports({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { manageReportsListReports } from "@codat/lending/funcs/manageReportsListReports.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await manageReportsListReports(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("manageReportsListReports failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListReportsRequest](../../sdk/models/operations/listreportsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Reports](../../sdk/models/shared/reports.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# ManageReports + +## Overview + +Generate and review generated reports for a company. + +### Available Operations + +* [generateReport](#generatereport) - Generate report +* [getReportStatus](#getreportstatus) - Get report status +* [listReports](#listreports) - List reports + +## generateReport + +Use the *Generate report* endpoint to initiate the generation of a report specified by the `reportType` parameter. + +This action triggers the system to refresh and pull the necessary data from the company's data sources to ensure the report contains the most up-to-date information. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.manageReports.generateReport({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { manageReportsGenerateReport } from "@codat/lending/funcs/manageReportsGenerateReport.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageReportsGenerateReport(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageReportsGenerateReport failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GenerateReportRequest](../../sdk/models/operations/generatereportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.ReportOperation](../../sdk/models/shared/reportoperation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getReportStatus + +Use the *Get report status* endpoint to return the metadata about report generation, such as its current status, date of request, and date of generation. + +You can either provide the ID of a report or use `latest` as the ID value to get the most recent generated *reportName* report for the company. + + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.manageReports.getReportStatus({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { manageReportsGetReportStatus } from "@codat/lending/funcs/manageReportsGetReportStatus.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageReportsGetReportStatus(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + maxAge: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageReportsGetReportStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | GetReportStatusRequest | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.ReportOperation](../../sdk/models/shared/reportoperation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listReports + +Use the *List reports* endpoint to return details (such as generation's current status, date of request, and date of generation) about all reports generated for a company. The query parameter can be used to filter the results. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.manageReports.listReports({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { manageReportsListReports } from "@codat/lending/funcs/manageReportsListReports.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageReportsListReports(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageReportsListReports failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListReportsRequest](../../sdk/models/operations/listreportsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Reports](../../sdk/models/shared/reports.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/metrics/README.md b/lending/docs/sdks/metrics/README.md index 10eb5c98f..ea098959a 100644 --- a/lending/docs/sdks/metrics/README.md +++ b/lending/docs/sdks/metrics/README.md @@ -1,333 +1,315 @@ -# Sales.Metrics - -## Overview - -### Available Operations - -* [getRevenue](#getrevenue) - Get commerce revenue metrics -* [getCustomerRetention](#getcustomerretention) - Get customer retention metrics -* [getLifetimeValue](#getlifetimevalue) - Get lifetime value metrics - -## getRevenue - -The *Get revenue report* endpoint returns the revenue and revenue growth for a specific company connection over one or more periods of time. - -This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - -[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the revenue metrics. - -#### Response structure - -The Revenue report's dimensions and measures are: - -| Index | Dimensions | -|---------------|------------| -| `index` = 0 | Period | -| `index` = 1 | Revenue | - -| Index | Measures | -|---------------|--------------------------------------------------------------------------------------------------------------------------| -| `index` = 0 | Value | -| `index` = 1 | Percentage change, defined as the change between the current and previous periods' values and expressed as a percentage. | - -The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.metrics.getRevenue({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 44877, - numberOfPeriods: 459595, - periodUnit: "Year", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesMetricsGetRevenue } from "@codat/lending/funcs/salesMetricsGetRevenue.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesMetricsGetRevenue(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 44877, - numberOfPeriods: 459595, - periodUnit: "Year", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesMetricsGetRevenue failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceRevenueMetricsRequest](../../sdk/models/operations/getcommercerevenuemetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getCustomerRetention - -The *Get customer retention metrics* endpoint returns customer retention insights for a specific company's commerce connection over one or more periods of time. - -This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - -#### Customer retention metrics - -- __Existing customers__: the number of unique customers that have placed an order(s) in the specified period and any previous period. -- __New customers__: the number of unique customers that have placed an order(s) in the specified period and none in any previous period. -- __Total customers__: the total number of existing and new customers within the specified period. -- __Retention rate__: the ratio of existing customers within the specified period compared to the total customers at the end of the previous period represented as a percentage. -- __Repeat rate__: the ratio of existing customers to total customers over the specified period represented as a percentage. - -[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate customer retention metrics. - -#### Response structure - -The Customer retention report's dimensions and measures are: - -| Index | Dimensions | -|-----------------------------|----------------------------| -| `index` = 0 | Period | -| `index` = 1 | Customer retention metrics | - -| Index | Measures | -|----------------------|------------| -| `index` = 0 | Count | -| `index` = 1 | Percentage | - -The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.metrics.getCustomerRetention({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 555812, - numberOfPeriods: 292320, - periodUnit: "Day", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesMetricsGetCustomerRetention } from "@codat/lending/funcs/salesMetricsGetCustomerRetention.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesMetricsGetCustomerRetention(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 555812, - numberOfPeriods: 292320, - periodUnit: "Day", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesMetricsGetCustomerRetention failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceCustomerRetentionMetricsRequest](../../sdk/models/operations/getcommercecustomerretentionmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getLifetimeValue - -The *Get lifetime value metrics* endpoint returns the average revenue that a specific company will generate throughout its lifespan over one or more periods of time. - -This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - -[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the lifetime value metrics. - -#### Response structure - -The Lifetime value report's dimensions and measures are: - -| Index | Dimensions | -|---------------|------------------------| -| `index` = 0 | Period | -| `index` = 1 | Lifetime value metrics | - -| Index | Measures | -|-------------------|---------| -| `index` = 1 | Value | - -The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.metrics.getLifetimeValue({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 402759, - numberOfPeriods: 976344, - periodUnit: "Day", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesMetricsGetLifetimeValue } from "@codat/lending/funcs/salesMetricsGetLifetimeValue.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesMetricsGetLifetimeValue(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 402759, - numberOfPeriods: 976344, - periodUnit: "Day", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesMetricsGetLifetimeValue failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceLifetimeValueMetricsRequest](../../sdk/models/operations/getcommercelifetimevaluemetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Metrics + +## Overview + +### Available Operations + +* [getRevenue](#getrevenue) - Get commerce revenue metrics +* [getCustomerRetention](#getcustomerretention) - Get customer retention metrics +* [getLifetimeValue](#getlifetimevalue) - Get lifetime value metrics + +## getRevenue + +The *Get revenue report* endpoint returns the revenue and revenue growth for a specific company connection over one or more periods of time. + +This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. + +[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the revenue metrics. + +#### Response structure + +The Revenue report's dimensions and measures are: + +| Index | Dimensions | +|---------------|------------| +| `index` = 0 | Period | +| `index` = 1 | Revenue | + +| Index | Measures | +|---------------|--------------------------------------------------------------------------------------------------------------------------| +| `index` = 0 | Value | +| `index` = 1 | Percentage change, defined as the change between the current and previous periods' values and expressed as a percentage. | + +The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.metrics.getRevenue({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesMetricsGetRevenue } from "@codat/lending/funcs/salesMetricsGetRevenue.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesMetricsGetRevenue(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesMetricsGetRevenue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceRevenueMetricsRequest](../../sdk/models/operations/getcommercerevenuemetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCustomerRetention + +The *Get customer retention metrics* endpoint returns customer retention insights for a specific company's commerce connection over one or more periods of time. + +This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. + +#### Customer retention metrics + +- __Existing customers__: the number of unique customers that have placed an order(s) in the specified period and any previous period. +- __New customers__: the number of unique customers that have placed an order(s) in the specified period and none in any previous period. +- __Total customers__: the total number of existing and new customers within the specified period. +- __Retention rate__: the ratio of existing customers within the specified period compared to the total customers at the end of the previous period represented as a percentage. +- __Repeat rate__: the ratio of existing customers to total customers over the specified period represented as a percentage. + +[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate customer retention metrics. + +#### Response structure + +The Customer retention report's dimensions and measures are: + +| Index | Dimensions | +|-----------------------------|----------------------------| +| `index` = 0 | Period | +| `index` = 1 | Customer retention metrics | + +| Index | Measures | +|----------------------|------------| +| `index` = 0 | Count | +| `index` = 1 | Percentage | + +The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.metrics.getCustomerRetention({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesMetricsGetCustomerRetention } from "@codat/lending/funcs/salesMetricsGetCustomerRetention.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesMetricsGetCustomerRetention(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesMetricsGetCustomerRetention failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceCustomerRetentionMetricsRequest](../../sdk/models/operations/getcommercecustomerretentionmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getLifetimeValue + +The *Get lifetime value metrics* endpoint returns the average revenue that a specific company will generate throughout its lifespan over one or more periods of time. + +This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. + +[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the lifetime value metrics. + +#### Response structure + +The Lifetime value report's dimensions and measures are: + +| Index | Dimensions | +|---------------|------------------------| +| `index` = 0 | Period | +| `index` = 1 | Lifetime value metrics | + +| Index | Measures | +|-------------------|---------| +| `index` = 1 | Value | + +The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.metrics.getLifetimeValue({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesMetricsGetLifetimeValue } from "@codat/lending/funcs/salesMetricsGetLifetimeValue.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesMetricsGetLifetimeValue(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesMetricsGetLifetimeValue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceLifetimeValueMetricsRequest](../../sdk/models/operations/getcommercelifetimevaluemetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/orders/README.md b/lending/docs/sdks/orders/README.md index e98d3deb2..4989b4e01 100644 --- a/lending/docs/sdks/orders/README.md +++ b/lending/docs/sdks/orders/README.md @@ -1,1474 +1,1474 @@ -# Sales.Orders - -## Overview - -### Available Operations - -* [list](#list) - List orders -* [get](#get) - Get order - -## list - -The *List orders* endpoint returns a list of [orders](https://docs.codat.io/lending-api#/schemas/Order) for a given company's connection. - -[Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Amazon Seller Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Partner Commerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: PrestaShop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: SumUp - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: WooCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommerceOrdersRequest](../../sdk/models/operations/listcommerceordersrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceOrders](../../sdk/models/shared/commerceorders.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get order* endpoint returns a single order for a given orderId. - -[Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Amazon Seller Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Partner Commerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: PrestaShop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: SumUp - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: WooCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.orders.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesOrdersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesOrdersGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceOrderRequest](../../sdk/models/operations/getcommerceorderrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceOrder](../../sdk/models/shared/commerceorder.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Orders + +## Overview + +### Available Operations + +* [list](#list) - List orders +* [get](#get) - Get order + +## list + +The *List orders* endpoint returns a list of [orders](https://docs.codat.io/lending-api#/schemas/Order) for a given company's connection. + +[Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Amazon Seller Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Partner Commerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: PrestaShop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: SumUp + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: WooCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersList } from "@codat/lending/funcs/salesOrdersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommerceOrdersRequest](../../sdk/models/operations/listcommerceordersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceOrders](../../sdk/models/shared/commerceorders.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get order* endpoint returns a single order for a given orderId. + +[Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Amazon Seller Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Partner Commerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: PrestaShop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: SumUp + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: WooCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.orders.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesOrdersGet } from "@codat/lending/funcs/salesOrdersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesOrdersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + orderId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesOrdersGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceOrderRequest](../../sdk/models/operations/getcommerceorderrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceOrder](../../sdk/models/shared/commerceorder.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/paymentmethods/README.md b/lending/docs/sdks/paymentmethods/README.md index de245176f..ab3d10ca7 100644 --- a/lending/docs/sdks/paymentmethods/README.md +++ b/lending/docs/sdks/paymentmethods/README.md @@ -1,934 +1,934 @@ -# Sales.PaymentMethods - -## Overview - -### Available Operations - -* [list](#list) - List payment methods -* [get](#get) - Get payment method - -## list - -The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) for a given company's connection. - -[Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Amazon Seller Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: SumUp - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommercePaymentMethodsRequest](../../sdk/models/operations/listcommercepaymentmethodsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommercePaymentMethods](../../sdk/models/shared/commercepaymentmethods.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get payment method* endpoint returns a single payment method for a given paymentMethodId. - -[Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Amazon Seller Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Mollie Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: SumUp - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.paymentMethods.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesPaymentMethodsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesPaymentMethodsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommercePaymentMethodRequest](../../sdk/models/operations/getcommercepaymentmethodrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommercePaymentMethod](../../sdk/models/shared/commercepaymentmethod.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.PaymentMethods + +## Overview + +### Available Operations + +* [list](#list) - List payment methods +* [get](#get) - Get payment method + +## list + +The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) for a given company's connection. + +[Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Amazon Seller Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: SumUp + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsList } from "@codat/lending/funcs/salesPaymentMethodsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommercePaymentMethodsRequest](../../sdk/models/operations/listcommercepaymentmethodsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommercePaymentMethods](../../sdk/models/shared/commercepaymentmethods.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get payment method* endpoint returns a single payment method for a given paymentMethodId. + +[Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Amazon Seller Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Mollie Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: SumUp + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesPaymentMethodsGet } from "@codat/lending/funcs/salesPaymentMethodsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesPaymentMethodsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + paymentMethodId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesPaymentMethodsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommercePaymentMethodRequest](../../sdk/models/operations/getcommercepaymentmethodrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommercePaymentMethod](../../sdk/models/shared/commercepaymentmethod.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/payments/README.md b/lending/docs/sdks/payments/README.md index d4032928c..8b0715bfc 100644 --- a/lending/docs/sdks/payments/README.md +++ b/lending/docs/sdks/payments/README.md @@ -1,1838 +1,1838 @@ -# AccountsReceivable.Payments - -## Overview - -### Available Operations - -* [list](#list) - List payments -* [get](#get) - Get payment - -## list - -The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - -[Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingPaymentsRequest](../../sdk/models/operations/listaccountingpaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingPayments](../../sdk/models/shared/accountingpayments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get payment* endpoint returns a single payment for a given paymentId. - -[Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsReceivable.payments.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsReceivablePaymentsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsReceivablePaymentsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingPaymentRequest](../../sdk/models/operations/getaccountingpaymentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingPayment](../../sdk/models/shared/accountingpayment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsReceivable.Payments + +## Overview + +### Available Operations + +* [list](#list) - List payments +* [get](#get) - Get payment + +## list + +The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. + +[Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsList } from "@codat/lending/funcs/accountsReceivablePaymentsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingPaymentsRequest](../../sdk/models/operations/listaccountingpaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingPayments](../../sdk/models/shared/accountingpayments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get payment* endpoint returns a single payment for a given paymentId. + +[Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsReceivable.payments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsReceivablePaymentsGet } from "@codat/lending/funcs/accountsReceivablePaymentsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsReceivablePaymentsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsReceivablePaymentsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingPaymentRequest](../../sdk/models/operations/getaccountingpaymentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingPayment](../../sdk/models/shared/accountingpayment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/productcategories/README.md b/lending/docs/sdks/productcategories/README.md index 718072328..440db6b3a 100644 --- a/lending/docs/sdks/productcategories/README.md +++ b/lending/docs/sdks/productcategories/README.md @@ -1,178 +1,178 @@ -# Sales.ProductCategories - -## Overview - -### Available Operations - -* [list](#list) - List product categories -* [get](#get) - Get product category - -## list - -The *List product categories* endpoint returns a list of [product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) for a given company's connection. - -[Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.productCategories.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductCategoriesList } from "@codat/lending/funcs/salesProductCategoriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductCategoriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductCategoriesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommerceProductCategoriesRequest](../../sdk/models/operations/listcommerceproductcategoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceProductCategories](../../sdk/models/shared/commerceproductcategories.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get product* endpoint returns a single product for a given productId. - -[Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.productCategories.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductCategoriesGet } from "@codat/lending/funcs/salesProductCategoriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductCategoriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductCategoriesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceProductCategoryRequest](../../sdk/models/operations/getcommerceproductcategoryrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceProductCategory](../../sdk/models/shared/commerceproductcategory.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.ProductCategories + +## Overview + +### Available Operations + +* [list](#list) - List product categories +* [get](#get) - Get product category + +## list + +The *List product categories* endpoint returns a list of [product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) for a given company's connection. + +[Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.productCategories.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductCategoriesList } from "@codat/lending/funcs/salesProductCategoriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductCategoriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductCategoriesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommerceProductCategoriesRequest](../../sdk/models/operations/listcommerceproductcategoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceProductCategories](../../sdk/models/shared/commerceproductcategories.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get product* endpoint returns a single product for a given productId. + +[Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.productCategories.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductCategoriesGet } from "@codat/lending/funcs/salesProductCategoriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductCategoriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductCategoriesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceProductCategoryRequest](../../sdk/models/operations/getcommerceproductcategoryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceProductCategory](../../sdk/models/shared/commerceproductcategory.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/products/README.md b/lending/docs/sdks/products/README.md index 2b52abfc3..8d47d8a62 100644 --- a/lending/docs/sdks/products/README.md +++ b/lending/docs/sdks/products/README.md @@ -1,1150 +1,1150 @@ -# Sales.Products - -## Overview - -### Available Operations - -* [list](#list) - List products -* [get](#get) - Get product - -## list - -The *List products* endpoint returns a list of [products](https://docs.codat.io/lending-api#/schemas/Product) for a given company's connection. - -[Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company's inventory that are available for sale. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Amazon Seller Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: PrestaShop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Stripe Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: WooCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCommerceProductsRequest](../../sdk/models/operations/listcommerceproductsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceProducts](../../sdk/models/shared/commerceproducts.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get product* endpoint returns a single product for a given productId. - -[Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company's inventory that are available for sale. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Amazon Seller Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: BigCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Clover - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Lightspeed K Trial - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: PrestaShop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Shopify - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Square - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Stripe Test - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: WooCommerce - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zettle - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.products.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesProductsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesProductsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceProductRequest](../../sdk/models/operations/getcommerceproductrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceProduct](../../sdk/models/shared/commerceproduct.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Products + +## Overview + +### Available Operations + +* [list](#list) - List products +* [get](#get) - Get product + +## list + +The *List products* endpoint returns a list of [products](https://docs.codat.io/lending-api#/schemas/Product) for a given company's connection. + +[Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company's inventory that are available for sale. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Amazon Seller Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: PrestaShop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Stripe Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: WooCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsList } from "@codat/lending/funcs/salesProductsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCommerceProductsRequest](../../sdk/models/operations/listcommerceproductsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceProducts](../../sdk/models/shared/commerceproducts.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get product* endpoint returns a single product for a given productId. + +[Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company's inventory that are available for sale. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Amazon Seller Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: BigCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Clover + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Lightspeed K Trial + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: PrestaShop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Shopify + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Square + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Stripe Test + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: WooCommerce + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zettle + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.products.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesProductsGet } from "@codat/lending/funcs/salesProductsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesProductsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + productId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesProductsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceProductRequest](../../sdk/models/operations/getcommerceproductrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceProduct](../../sdk/models/shared/commerceproduct.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/profitandloss/README.md b/lending/docs/sdks/profitandloss/README.md index a62e90273..a7c92501f 100644 --- a/lending/docs/sdks/profitandloss/README.md +++ b/lending/docs/sdks/profitandloss/README.md @@ -1,1048 +1,1048 @@ -# FinancialStatements.ProfitAndLoss - -## Overview - -### Available Operations - -* [getCategorizedAccounts](#getcategorizedaccounts) - Get categorized profit and loss statement -* [get](#get) - Get profit and loss - -## getCategorizedAccounts - -The *Get categorized profit and loss statement* endpoint returns a list of categorized accounts that appear on a company’s Profit and Loss statement. It also includes a balance as of the financial statement date. - -Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.getCategorizedAccounts({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: "29-09-2020", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGetCategorizedAccounts } from "@codat/lending/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGetCategorizedAccounts(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - reportDate: "29-09-2020", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGetCategorizedAccounts failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCategorizedProfitAndLossStatementRequest](../../sdk/models/operations/getcategorizedprofitandlossstatementrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.EnhancedFinancialReport](../../sdk/models/shared/enhancedfinancialreport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -Gets the latest profit and loss for a company. - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: MYOB AccountRight and Essentials - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.financialStatements.profitAndLoss.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await financialStatementsProfitAndLossGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - periodLength: 4, - periodsToCompare: 20, - startMonth: "2022-10-23T00:00:00Z", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("financialStatementsProfitAndLossGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingProfitAndLossRequest](../../sdk/models/operations/getaccountingprofitandlossrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingProfitAndLossReport](../../sdk/models/shared/accountingprofitandlossreport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# FinancialStatements.ProfitAndLoss + +## Overview + +### Available Operations + +* [getCategorizedAccounts](#getcategorizedaccounts) - Get categorized profit and loss statement +* [get](#get) - Get profit and loss + +## getCategorizedAccounts + +The *Get categorized profit and loss statement* endpoint returns a list of categorized accounts that appear on a company’s Profit and Loss statement. It also includes a balance as of the financial statement date. + +Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.getCategorizedAccounts({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "29-09-2020", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGetCategorizedAccounts } from "@codat/lending/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGetCategorizedAccounts(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + reportDate: "29-09-2020", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGetCategorizedAccounts failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCategorizedProfitAndLossStatementRequest](../../sdk/models/operations/getcategorizedprofitandlossstatementrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.EnhancedFinancialReport](../../sdk/models/shared/enhancedfinancialreport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Gets the latest profit and loss for a company. + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: MYOB AccountRight and Essentials + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.financialStatements.profitAndLoss.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { financialStatementsProfitAndLossGet } from "@codat/lending/funcs/financialStatementsProfitAndLossGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await financialStatementsProfitAndLossGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + periodLength: 4, + periodsToCompare: 20, + startMonth: "2022-10-23T00:00:00Z", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("financialStatementsProfitAndLossGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingProfitAndLossRequest](../../sdk/models/operations/getaccountingprofitandlossrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingProfitAndLossReport](../../sdk/models/shared/accountingprofitandlossreport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/pulloperations/README.md b/lending/docs/sdks/pulloperations/README.md index e0e2211ca..8c26d24d0 100644 --- a/lending/docs/sdks/pulloperations/README.md +++ b/lending/docs/sdks/pulloperations/README.md @@ -1,164 +1,162 @@ -# ManageData.PullOperations - -## Overview - -### Available Operations - -* [list](#list) - List pull operations -* [get](#get) - Get pull operation - -## list - -Gets the pull operation history (datasets) for a given company. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.manageData.pullOperations.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { manageDataPullOperationsList } from "@codat/lending/funcs/manageDataPullOperationsList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await manageDataPullOperationsList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("manageDataPullOperationsList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListPullOperationsRequest](../../sdk/models/operations/listpulloperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PullOperations](../../sdk/models/shared/pulloperations.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -Retrieve information about a single dataset or pull operation. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.manageData.pullOperations.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - datasetId: "fa5f3e86-bd80-49b8-853c-5fbba4b201f5", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { manageDataPullOperationsGet } from "@codat/lending/funcs/manageDataPullOperationsGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await manageDataPullOperationsGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - datasetId: "fa5f3e86-bd80-49b8-853c-5fbba4b201f5", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("manageDataPullOperationsGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetPullOperationRequest](../../sdk/models/operations/getpulloperationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PullOperation](../../sdk/models/shared/pulloperation.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# ManageData.PullOperations + +## Overview + +### Available Operations + +* [list](#list) - List pull operations +* [get](#get) - Get pull operation + +## list + +Gets the pull operation history (datasets) for a given company. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.manageData.pullOperations.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { manageDataPullOperationsList } from "@codat/lending/funcs/manageDataPullOperationsList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataPullOperationsList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageDataPullOperationsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPullOperationsRequest](../../sdk/models/operations/listpulloperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PullOperations](../../sdk/models/shared/pulloperations.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Retrieve information about a single dataset or pull operation. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.manageData.pullOperations.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { manageDataPullOperationsGet } from "@codat/lending/funcs/manageDataPullOperationsGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataPullOperationsGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageDataPullOperationsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPullOperationRequest](../../sdk/models/operations/getpulloperationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PullOperation](../../sdk/models/shared/pulloperation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/refresh/README.md b/lending/docs/sdks/refresh/README.md index 8f5b8cf5c..60b76910a 100644 --- a/lending/docs/sdks/refresh/README.md +++ b/lending/docs/sdks/refresh/README.md @@ -1,166 +1,166 @@ -# ManageData.Refresh - -## Overview - -### Available Operations - -* [allDataTypes](#alldatatypes) - Refresh all data -* [dataType](#datatype) - Refresh data type - -## allDataTypes - -Refreshes all data types with `fetch on first link` set to `true` for a given company. - -This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - -[Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - await codatLending.manageData.refresh.allDataTypes({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { manageDataRefreshAllDataTypes } from "@codat/lending/funcs/manageDataRefreshAllDataTypes.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await manageDataRefreshAllDataTypes(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - - } else { - console.log("manageDataRefreshAllDataTypes failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RefreshAllDataTypesRequest](../../sdk/models/operations/refreshalldatatypesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## dataType - -Refreshes a given data type for a given company. - -This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.manageData.refresh.dataType({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "invoices", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { manageDataRefreshDataType } from "@codat/lending/funcs/manageDataRefreshDataType.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await manageDataRefreshDataType(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - dataType: "invoices", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("manageDataRefreshDataType failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RefreshDataTypeRequest](../../sdk/models/operations/refreshdatatyperequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.PullOperation](../../sdk/models/shared/pulloperation.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# ManageData.Refresh + +## Overview + +### Available Operations + +* [allDataTypes](#alldatatypes) - Refresh all data +* [dataType](#datatype) - Refresh data type + +## allDataTypes + +Refreshes all data types with `fetch on first link` set to `true` for a given company. + +This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + +[Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatLending.manageData.refresh.allDataTypes({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { manageDataRefreshAllDataTypes } from "@codat/lending/funcs/manageDataRefreshAllDataTypes.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataRefreshAllDataTypes(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("manageDataRefreshAllDataTypes failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshAllDataTypesRequest](../../sdk/models/operations/refreshalldatatypesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## dataType + +Refreshes a given data type for a given company. + +This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.manageData.refresh.dataType({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "invoices", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { manageDataRefreshDataType } from "@codat/lending/funcs/manageDataRefreshDataType.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataRefreshDataType(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "invoices", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageDataRefreshDataType failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshDataTypeRequest](../../sdk/models/operations/refreshdatatyperequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.PullOperation](../../sdk/models/shared/pulloperation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/reports/README.md b/lending/docs/sdks/reports/README.md index 8cdc6dd53..b3ece067b 100644 --- a/lending/docs/sdks/reports/README.md +++ b/lending/docs/sdks/reports/README.md @@ -1,221 +1,209 @@ -# Sales.Reports - -## Overview - -### Available Operations - -* [getOrders](#getorders) - Get orders report -* [getRefunds](#getrefunds) - Get refunds report - -## getOrders - -The *Get orders report* endpoint returns the number of orders, total value, and average order value for a specific company's commerce connection over one or more periods of time. - -This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - -[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the order metrics. - -#### Response structure - -The Orders report's dimensions and measures are: - -| Index | Dimensions | -|---------------|----------------| -| `index` = 0 | Period | -| `index` = 1 | Order metrics | - -| Index | Measures | -|---------------|------------| -| `index` = 0 | Count | -| `index` = 1 | Value | - -The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.reports.getOrders({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 176756, - numberOfPeriods: 64425, - periodUnit: "Day", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesReportsGetOrders } from "@codat/lending/funcs/salesReportsGetOrders.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesReportsGetOrders(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 176756, - numberOfPeriods: 64425, - periodUnit: "Day", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesReportsGetOrders failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceOrdersReportRequest](../../sdk/models/operations/getcommerceordersreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getRefunds - -The *Get refunds report* endpoint returns the number and total value of refunds and the refund rate for a specific company's commerce connection over one or more periods of time. - -This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - -[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the refunds metrics. - -#### Response structure - -The Refunds report's dimensions and measures are: - -| Index | Dimensions | -|----------------|----------------| -| `index` = 0 | Period | -| `index` = 1 | Refund metrics | - -| Index | Measures | -|----------------|------------| -| `index` = 0 | Count | -| `index` = 1 | Value | -| `index` = 2 | Percentage | - -The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.sales.reports.getRefunds({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 931992, - numberOfPeriods: 555513, - periodUnit: "Year", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { salesReportsGetRefunds } from "@codat/lending/funcs/salesReportsGetRefunds.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await salesReportsGetRefunds(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - reportDate: "29-09-2020", - periodLength: 931992, - numberOfPeriods: 555513, - periodUnit: "Year", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("salesReportsGetRefunds failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCommerceRefundsReportRequest](../../sdk/models/operations/getcommercerefundsreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Sales.Reports + +## Overview + +### Available Operations + +* [getOrders](#getorders) - Get orders report +* [getRefunds](#getrefunds) - Get refunds report + +## getOrders + +The *Get orders report* endpoint returns the number of orders, total value, and average order value for a specific company's commerce connection over one or more periods of time. + +This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. + +[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the order metrics. + +#### Response structure + +The Orders report's dimensions and measures are: + +| Index | Dimensions | +|---------------|----------------| +| `index` = 0 | Period | +| `index` = 1 | Order metrics | + +| Index | Measures | +|---------------|------------| +| `index` = 0 | Count | +| `index` = 1 | Value | + +The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.reports.getOrders({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesReportsGetOrders } from "@codat/lending/funcs/salesReportsGetOrders.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesReportsGetOrders(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesReportsGetOrders failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceOrdersReportRequest](../../sdk/models/operations/getcommerceordersreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getRefunds + +The *Get refunds report* endpoint returns the number and total value of refunds and the refund rate for a specific company's commerce connection over one or more periods of time. + +This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. + +[Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the refunds metrics. + +#### Response structure + +The Refunds report's dimensions and measures are: + +| Index | Dimensions | +|----------------|----------------| +| `index` = 0 | Period | +| `index` = 1 | Refund metrics | + +| Index | Measures | +|----------------|------------| +| `index` = 0 | Count | +| `index` = 1 | Value | +| `index` = 2 | Percentage | + +The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.sales.reports.getRefunds({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { salesReportsGetRefunds } from "@codat/lending/funcs/salesReportsGetRefunds.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await salesReportsGetRefunds(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + reportDate: "29-09-2020", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("salesReportsGetRefunds failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommerceRefundsReportRequest](../../sdk/models/operations/getcommercerefundsreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.CommerceReport](../../sdk/models/shared/commercereport.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/sourceaccounts/README.md b/lending/docs/sdks/sourceaccounts/README.md index dd7236ba5..c3603e6b0 100644 --- a/lending/docs/sdks/sourceaccounts/README.md +++ b/lending/docs/sdks/sourceaccounts/README.md @@ -1,489 +1,447 @@ -# LoanWriteback.SourceAccounts - -## Overview - -### Available Operations - -* [create](#create) - Create source account -* [listMappings](#listmappings) - List bank feed account mappings -* [createMapping](#createmapping) - Create bank feed account mapping - -## create - -The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software. - -> ### Versioning -> If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. - -### Example Usage: Malformed query - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.sourceAccounts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestBody: { - id: "", - currency: "GBP", - modifiedDate: "2022-10-23T00:00:00Z", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSourceAccountsCreate } from "@codat/lending/funcs/loanWritebackSourceAccountsCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSourceAccountsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestBody: { - id: "", - currency: "GBP", - modifiedDate: "2022-10-23T00:00:00Z", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSourceAccountsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Version 1 - - -```typescript -import { CodatLending } from "@codat/lending"; -import { Decimal } from "@codat/lending/sdk/types"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.sourceAccounts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestBody: { - id: "acc-002", - accountName: "account-081", - accountType: "Credit", - accountNumber: "12345670", - sortCode: "123456", - currency: "GBP", - balance: new Decimal("99.99"), - modifiedDate: "2023-01-09T14:14:14.1057478Z", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSourceAccountsCreate } from "@codat/lending/funcs/loanWritebackSourceAccountsCreate.js"; -import { Decimal } from "@codat/lending/sdk/types"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSourceAccountsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestBody: { - id: "acc-002", - accountName: "account-081", - accountType: "Credit", - accountNumber: "12345670", - sortCode: "123456", - currency: "GBP", - balance: new Decimal("99.99"), - modifiedDate: "2023-01-09T14:14:14.1057478Z", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSourceAccountsCreate failed:", res.error); - } -} - -run(); -``` -### Example Usage: Version 2 - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.sourceAccounts.create({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestBody: { - id: "", - currency: "GBP", - modifiedDate: "2022-10-23T00:00:00Z", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSourceAccountsCreate } from "@codat/lending/funcs/loanWritebackSourceAccountsCreate.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSourceAccountsCreate(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - requestBody: { - id: "", - currency: "GBP", - modifiedDate: "2022-10-23T00:00:00Z", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSourceAccountsCreate failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateSourceAccountRequest](../../sdk/models/operations/createsourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateSourceAccountResponseBody](../../sdk/models/operations/createsourceaccountresponsebody.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listMappings - -The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts. - -A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). - -> **For custom builds only** -> -> Only use this endpoint if you are building your own account management UI. - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.sourceAccounts.listMappings({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSourceAccountsListMappings } from "@codat/lending/funcs/loanWritebackSourceAccountsListMappings.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSourceAccountsListMappings(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSourceAccountsListMappings failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBankAccountMappingRequest](../../sdk/models/operations/getbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankFeedMapping[]](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createMapping - -The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account). - -A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). - -To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint. - -> **For custom builds only** -> -> Only use this endpoint if you are building your own account management UI. - -#### Account mapping variability - -The method of mapping the source account to the target account varies depending on the accounting software your company uses. - -#### Mapping options: - -1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. -2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping. -3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. - -### Integration-specific behavior - -| Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | -| --------------------- | ----------- | ---------------- | --------------------------- | -| Xero | ✅ | ✅ | | -| FreeAgent | ✅ | ✅ | | -| Oracle NetSuite | ✅ | ✅ | | -| Exact Online (NL) | ✅ | ✅ | | -| QuickBooks Online | | | ✅ | -| Sage | | | ✅ | - -### Example Usage: Example - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.sourceAccounts.createMapping({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - bankFeedBankAccountMapping: { - sourceAccountId: "acc-002", - targetAccountId: "account-081", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSourceAccountsCreateMapping } from "@codat/lending/funcs/loanWritebackSourceAccountsCreateMapping.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSourceAccountsCreateMapping(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - bankFeedBankAccountMapping: { - sourceAccountId: "acc-002", - targetAccountId: "account-081", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSourceAccountsCreateMapping failed:", res.error); - } -} - -run(); -``` -### Example Usage: Malformed query - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.loanWriteback.sourceAccounts.createMapping({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - bankFeedBankAccountMapping: { - sourceAccountId: "acc-002", - targetAccountId: "account-081", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { loanWritebackSourceAccountsCreateMapping } from "@codat/lending/funcs/loanWritebackSourceAccountsCreateMapping.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await loanWritebackSourceAccountsCreateMapping(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - bankFeedBankAccountMapping: { - sourceAccountId: "acc-002", - targetAccountId: "account-081", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("loanWritebackSourceAccountsCreateMapping failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateBankAccountMappingRequest](../../sdk/models/operations/createbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankFeedBankAccountMappingResponse](../../sdk/models/shared/bankfeedbankaccountmappingresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# LoanWriteback.SourceAccounts + +## Overview + +### Available Operations + +* [create](#create) - Create source account +* [listMappings](#listmappings) - List bank feed account mappings +* [createMapping](#createmapping) - Create bank feed account mapping + +## create + +The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software. + +> ### Versioning +> If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. + +### Example Usage: Malformed query + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.sourceAccounts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSourceAccountsCreate } from "@codat/lending/funcs/loanWritebackSourceAccountsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSourceAccountsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSourceAccountsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Version 1 + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.sourceAccounts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSourceAccountsCreate } from "@codat/lending/funcs/loanWritebackSourceAccountsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSourceAccountsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSourceAccountsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Version 2 + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.sourceAccounts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSourceAccountsCreate } from "@codat/lending/funcs/loanWritebackSourceAccountsCreate.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSourceAccountsCreate(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSourceAccountsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateSourceAccountRequest](../../sdk/models/operations/createsourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateSourceAccountResponseBody](../../sdk/models/operations/createsourceaccountresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listMappings + +The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts. + +A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). + +> **For custom builds only** +> +> Only use this endpoint if you are building your own account management UI. + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.sourceAccounts.listMappings({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSourceAccountsListMappings } from "@codat/lending/funcs/loanWritebackSourceAccountsListMappings.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSourceAccountsListMappings(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSourceAccountsListMappings failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBankAccountMappingRequest](../../sdk/models/operations/getbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankFeedMapping[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createMapping + +The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account). + +A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). + +To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint. + +> **For custom builds only** +> +> Only use this endpoint if you are building your own account management UI. + +#### Account mapping variability + +The method of mapping the source account to the target account varies depending on the accounting software your company uses. + +#### Mapping options: + +1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. +2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping. +3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. + +### Integration-specific behavior + +| Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | +| --------------------- | ----------- | ---------------- | --------------------------- | +| Xero | ✅ | ✅ | | +| FreeAgent | ✅ | ✅ | | +| Oracle NetSuite | ✅ | ✅ | | +| Exact Online (NL) | ✅ | ✅ | | +| QuickBooks Online | | | ✅ | +| Sage | | | ✅ | + +### Example Usage: Example + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.sourceAccounts.createMapping({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankFeedBankAccountMapping: { + sourceAccountId: "acc-002", + targetAccountId: "account-081", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSourceAccountsCreateMapping } from "@codat/lending/funcs/loanWritebackSourceAccountsCreateMapping.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSourceAccountsCreateMapping(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankFeedBankAccountMapping: { + sourceAccountId: "acc-002", + targetAccountId: "account-081", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSourceAccountsCreateMapping failed:", res.error); + } +} + +run(); +``` +### Example Usage: Malformed query + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.loanWriteback.sourceAccounts.createMapping({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankFeedBankAccountMapping: { + sourceAccountId: "acc-002", + targetAccountId: "account-081", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { loanWritebackSourceAccountsCreateMapping } from "@codat/lending/funcs/loanWritebackSourceAccountsCreateMapping.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await loanWritebackSourceAccountsCreateMapping(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankFeedBankAccountMapping: { + sourceAccountId: "acc-002", + targetAccountId: "account-081", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("loanWritebackSourceAccountsCreateMapping failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateBankAccountMappingRequest](../../sdk/models/operations/createbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankFeedBankAccountMappingResponse](../../sdk/models/shared/bankfeedbankaccountmappingresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/suppliers/README.md b/lending/docs/sdks/suppliers/README.md index 1b3fcfee7..0143d2ef0 100644 --- a/lending/docs/sdks/suppliers/README.md +++ b/lending/docs/sdks/suppliers/README.md @@ -1,2195 +1,2195 @@ -# AccountsPayable.Suppliers - -## Overview - -### Available Operations - -* [list](#list) - List suppliers -* [get](#get) - Get supplier -* [listAttachments](#listattachments) - List supplier attachments -* [getAttachment](#getattachment) - Get supplier attachment -* [downloadAttachment](#downloadattachment) - Download supplier attachment - -## list - -The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company's connection. - -[Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingSuppliersRequest](../../sdk/models/operations/listaccountingsuppliersrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingSuppliers](../../sdk/models/shared/accountingsuppliers.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get supplier* endpoint returns a single supplier for a given supplierId. - -[Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (Netherlands) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Exact (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreshBooks - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: KashFlow - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 200cloud - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage 50 (UK) - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Wave - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Xero - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Zoho Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingSupplierRequest](../../sdk/models/operations/getaccountingsupplierrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingSupplier](../../sdk/models/shared/accountingsupplier.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listAttachments - -The *List supplier attachments* endpoint returns a list of attachments available to download for given `supplierId`. - -[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.listAttachments({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersListAttachments } from "@codat/lending/funcs/accountsPayableSuppliersListAttachments.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersListAttachments(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersListAttachments failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingSupplierAttachmentsRequest](../../sdk/models/operations/listaccountingsupplierattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAttachment - -The *Get supplier attachment* endpoint returns a specific attachment for a given `supplierId` and `attachmentId`. - -[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.getAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersGetAttachment } from "@codat/lending/funcs/accountsPayableSuppliersGetAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersGetAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersGetAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingSupplierAttachmentRequest](../../sdk/models/operations/getaccountingsupplierattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## downloadAttachment - -The *Download supplier attachment* endpoint downloads a specific attachment for a given `supplierId` and `attachmentId`. - -[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - - -### Example Usage - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.accountsPayable.suppliers.downloadAttachment({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { accountsPayableSuppliersDownloadAttachment } from "@codat/lending/funcs/accountsPayableSuppliersDownloadAttachment.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await accountsPayableSuppliersDownloadAttachment(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("accountsPayableSuppliersDownloadAttachment failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DownloadAccountingSupplierAttachmentRequest](../../sdk/models/operations/downloadaccountingsupplierattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[ReadableStream](../../models/data.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# AccountsPayable.Suppliers + +## Overview + +### Available Operations + +* [list](#list) - List suppliers +* [get](#get) - Get supplier +* [listAttachments](#listattachments) - List supplier attachments +* [getAttachment](#getattachment) - Get supplier attachment +* [downloadAttachment](#downloadattachment) - Download supplier attachment + +## list + +The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company's connection. + +[Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersList } from "@codat/lending/funcs/accountsPayableSuppliersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingSuppliersRequest](../../sdk/models/operations/listaccountingsuppliersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingSuppliers](../../sdk/models/shared/accountingsuppliers.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get supplier* endpoint returns a single supplier for a given supplierId. + +[Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGet } from "@codat/lending/funcs/accountsPayableSuppliersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingSupplierRequest](../../sdk/models/operations/getaccountingsupplierrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingSupplier](../../sdk/models/shared/accountingsupplier.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listAttachments + +The *List supplier attachments* endpoint returns a list of attachments available to download for given `supplierId`. + +[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.listAttachments({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersListAttachments } from "@codat/lending/funcs/accountsPayableSuppliersListAttachments.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersListAttachments(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersListAttachments failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingSupplierAttachmentsRequest](../../sdk/models/operations/listaccountingsupplierattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Attachments](../../sdk/models/shared/attachments.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAttachment + +The *Get supplier attachment* endpoint returns a specific attachment for a given `supplierId` and `attachmentId`. + +[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.getAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersGetAttachment } from "@codat/lending/funcs/accountsPayableSuppliersGetAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersGetAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersGetAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingSupplierAttachmentRequest](../../sdk/models/operations/getaccountingsupplierattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingAttachment](../../sdk/models/shared/accountingattachment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## downloadAttachment + +The *Download supplier attachment* endpoint downloads a specific attachment for a given `supplierId` and `attachmentId`. + +[Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + +### Example Usage + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.accountsPayable.suppliers.downloadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { accountsPayableSuppliersDownloadAttachment } from "@codat/lending/funcs/accountsPayableSuppliersDownloadAttachment.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsPayableSuppliersDownloadAttachment(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsPayableSuppliersDownloadAttachment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadAccountingSupplierAttachmentRequest](../../sdk/models/operations/downloadaccountingsupplierattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[ReadableStream](../../models/data.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/transactioncategories/README.md b/lending/docs/sdks/transactioncategories/README.md index 64d15b931..8a98499a4 100644 --- a/lending/docs/sdks/transactioncategories/README.md +++ b/lending/docs/sdks/transactioncategories/README.md @@ -1,286 +1,286 @@ -# Banking.TransactionCategories - -## Overview - -### Available Operations - -* [list](#list) - List transaction categories -* [get](#get) - Get transaction category - -## list - -The *List transaction categories* endpoint returns a list of [transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) for a given company's connection. - -[Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Basiq - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.transactionCategories.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingTransactionCategoriesList } from "@codat/lending/funcs/bankingTransactionCategoriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingTransactionCategoriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingTransactionCategoriesList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Plaid - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.transactionCategories.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingTransactionCategoriesList } from "@codat/lending/funcs/bankingTransactionCategoriesList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingTransactionCategoriesList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingTransactionCategoriesList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListBankingTransactionCategoriesRequest](../../sdk/models/operations/listbankingtransactioncategoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankingTransactionCategories](../../sdk/models/shared/bankingtransactioncategories.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get transaction category* endpoint returns a single transaction category for a given transactionCategoryId. - -[Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. - -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - - -### Example Usage: Basiq - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.transactionCategories.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionCategoryId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingTransactionCategoriesGet } from "@codat/lending/funcs/bankingTransactionCategoriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingTransactionCategoriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionCategoryId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingTransactionCategoriesGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Plaid - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.banking.transactionCategories.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionCategoryId: "", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { bankingTransactionCategoriesGet } from "@codat/lending/funcs/bankingTransactionCategoriesGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await bankingTransactionCategoriesGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transactionCategoryId: "", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("bankingTransactionCategoriesGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBankingTransactionCategoryRequest](../../sdk/models/operations/getbankingtransactioncategoryrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.BankingTransactionCategory](../../sdk/models/shared/bankingtransactioncategory.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Banking.TransactionCategories + +## Overview + +### Available Operations + +* [list](#list) - List transaction categories +* [get](#get) - Get transaction category + +## list + +The *List transaction categories* endpoint returns a list of [transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) for a given company's connection. + +[Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Basiq + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.transactionCategories.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingTransactionCategoriesList } from "@codat/lending/funcs/bankingTransactionCategoriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingTransactionCategoriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingTransactionCategoriesList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Plaid + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.transactionCategories.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingTransactionCategoriesList } from "@codat/lending/funcs/bankingTransactionCategoriesList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingTransactionCategoriesList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingTransactionCategoriesList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBankingTransactionCategoriesRequest](../../sdk/models/operations/listbankingtransactioncategoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankingTransactionCategories](../../sdk/models/shared/bankingtransactioncategories.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get transaction category* endpoint returns a single transaction category for a given transactionCategoryId. + +[Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + + +### Example Usage: Basiq + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.transactionCategories.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionCategoryId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingTransactionCategoriesGet } from "@codat/lending/funcs/bankingTransactionCategoriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingTransactionCategoriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionCategoryId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingTransactionCategoriesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Plaid + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.banking.transactionCategories.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionCategoryId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { bankingTransactionCategoriesGet } from "@codat/lending/funcs/bankingTransactionCategoriesGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankingTransactionCategoriesGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transactionCategoryId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankingTransactionCategoriesGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBankingTransactionCategoryRequest](../../sdk/models/operations/getbankingtransactioncategoryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.BankingTransactionCategory](../../sdk/models/shared/bankingtransactioncategory.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/sdks/transfers/README.md b/lending/docs/sdks/transfers/README.md index 1d86fc6e2..fafcb9fed 100644 --- a/lending/docs/sdks/transfers/README.md +++ b/lending/docs/sdks/transfers/README.md @@ -1,1042 +1,1042 @@ -# Transactions.Transfers - -## Overview - -### Available Operations - -* [list](#list) - List transfers -* [get](#get) - Get transfer - -## list - -The *List transfers* endpoint returns a list of [transfers](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company's connection. - -[Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.list({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersList(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountingTransfersRequest](../../sdk/models/operations/listaccountingtransfersrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingTransfers](../../sdk/models/shared/accountingtransfers.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## get - -The *Get transfer* endpoint returns a single transfer for a given transferId. - -[Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - - -### Example Usage: Clear Books - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Dynamics 365 Business Central - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: FreeAgent - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Oracle NetSuite - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Desktop - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: QuickBooks Online Sandbox - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Business Cloud Accounting - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` -### Example Usage: Sage Intacct - - -```typescript -import { CodatLending } from "@codat/lending"; - -const codatLending = new CodatLending({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const result = await codatLending.transactions.transfers.get({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { CodatLendingCore } from "@codat/lending/core.js"; -import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; - -// Use `CodatLendingCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const codatLending = new CodatLendingCore({ - authHeader: "Basic BASE_64_ENCODED(API_KEY)", -}); - -async function run() { - const res = await transactionsTransfersGet(codatLending, { - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("transactionsTransfersGet failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountingTransferRequest](../../sdk/models/operations/getaccountingtransferrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[shared.AccountingTransfer](../../sdk/models/shared/accountingtransfer.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | -| errors.ErrorMessage | 500, 503 | application/json | +# Transactions.Transfers + +## Overview + +### Available Operations + +* [list](#list) - List transfers +* [get](#get) - Get transfer + +## list + +The *List transfers* endpoint returns a list of [transfers](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company's connection. + +[Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersList } from "@codat/lending/funcs/transactionsTransfersList.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersList(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountingTransfersRequest](../../sdk/models/operations/listaccountingtransfersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingTransfers](../../sdk/models/shared/accountingtransfers.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get transfer* endpoint returns a single transfer for a given transferId. + +[Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatLending } from "@codat/lending"; + +const codatLending = new CodatLending({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatLending.transactions.transfers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatLendingCore } from "@codat/lending/core.js"; +import { transactionsTransfersGet } from "@codat/lending/funcs/transactionsTransfersGet.js"; + +// Use `CodatLendingCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatLending = new CodatLendingCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transactionsTransfersGet(codatLending, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + transferId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionsTransfersGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingTransferRequest](../../sdk/models/operations/getaccountingtransferrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.AccountingTransfer](../../sdk/models/shared/accountingtransfer.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lending/docs/types/rfcdate.md b/lending/docs/types/rfcdate.md index 5d8591eb5..0c7c33a14 100644 --- a/lending/docs/types/rfcdate.md +++ b/lending/docs/types/rfcdate.md @@ -1,11 +1,11 @@ -# RFCDate - -`types.RFCDate` is a wrapper around Date that allows for JSON marshaling a date string formatted as "2006-01-02". - -## Usage - -```typescript -const d1 = new RFCDate(Date.now()); - -const d2 = new RFCDate("2019-01-01"); +# RFCDate + +`types.RFCDate` is a wrapper around Date that allows for JSON marshaling a date string formatted as "2006-01-02". + +## Usage + +```typescript +const d1 = new RFCDate(Date.now()); + +const d2 = new RFCDate("2019-01-01"); ``` \ No newline at end of file diff --git a/lending/files.gen b/lending/files.gen deleted file mode 100755 index affc1fb32..000000000 --- a/lending/files.gen +++ /dev/null @@ -1,1144 +0,0 @@ -src/sdk/companies.ts -src/sdk/connections.ts -src/sdk/accounttransactions.ts -src/sdk/codatlendingdirectcosts.ts -src/sdk/codatlendingtransfers.ts -src/sdk/journalentries.ts -src/sdk/journals.ts -src/sdk/transactions.ts -src/sdk/accounts.ts -src/sdk/codatlendingaccountingbankdata.ts -src/sdk/accountbalances.ts -src/sdk/codatlendingaccounts.ts -src/sdk/transactioncategories.ts -src/sdk/codatlendingbankingtransactions.ts -src/sdk/categorizedstatement.ts -src/sdk/banking.ts -src/sdk/bills.ts -src/sdk/suppliers.ts -src/sdk/billcreditnotes.ts -src/sdk/billpayments.ts -src/sdk/accountspayable.ts -src/sdk/codatlendingcustomers.ts -src/sdk/disputes.ts -src/sdk/locations.ts -src/sdk/orders.ts -src/sdk/paymentmethods.ts -src/sdk/codatlendingsalespayments.ts -src/sdk/productcategories.ts -src/sdk/products.ts -src/sdk/codatlendingtransactions.ts -src/sdk/metrics.ts -src/sdk/codatlendingreports.ts -src/sdk/sales.ts -src/sdk/companyinfo.ts -src/sdk/customers.ts -src/sdk/directincomes.ts -src/sdk/invoices.ts -src/sdk/creditnotes.ts -src/sdk/payments.ts -src/sdk/reports.ts -src/sdk/accountsreceivable.ts -src/sdk/fileupload.ts -src/sdk/bankaccounts.ts -src/sdk/banktransactions.ts -src/sdk/codatlendingloanwritebackaccounts.ts -src/sdk/directcosts.ts -src/sdk/codatlendingpayments.ts -src/sdk/codatlendingsuppliers.ts -src/sdk/transfers.ts -src/sdk/createoperations.ts -src/sdk/loanwriteback.ts -src/sdk/codatlendingfinancialstatementsaccounts.ts -src/sdk/balancesheet.ts -src/sdk/cashflow.ts -src/sdk/profitandloss.ts -src/sdk/financialstatements.ts -src/sdk/refresh.ts -src/sdk/pulloperations.ts -src/sdk/managedata.ts -src/sdk/liabilities.ts -src/sdk/dataintegrity.ts -src/sdk/excelreports.ts -src/sdk/sdk.ts -.eslintrc.yml -jest.config.js -package-lock.json -package.json -src/index.ts -src/internal/utils/contenttype.ts -src/internal/utils/headers.ts -src/internal/utils/index.ts -src/internal/utils/pathparams.ts -src/internal/utils/queryparams.ts -src/internal/utils/requestbody.ts -src/internal/utils/retries.ts -src/internal/utils/security.ts -src/internal/utils/utils.ts -src/sdk/index.ts -src/sdk/models/errors/sdkerror.ts -src/sdk/types/index.ts -src/sdk/types/rfcdate.ts -tsconfig.json -src/sdk/models/operations/createcompany.ts -src/sdk/models/operations/deletecompany.ts -src/sdk/models/operations/getcompany.ts -src/sdk/models/operations/listcompanies.ts -src/sdk/models/operations/updatecompany.ts -src/sdk/models/operations/createconnection.ts -src/sdk/models/operations/deleteconnection.ts -src/sdk/models/operations/getconnection.ts -src/sdk/models/operations/listconnections.ts -src/sdk/models/operations/unlinkconnection.ts -src/sdk/models/operations/getaccountingaccounttransaction.ts -src/sdk/models/operations/listaccountingaccounttransactions.ts -src/sdk/models/operations/downloadaccountingdirectcostattachment.ts -src/sdk/models/operations/getaccountingdirectcost.ts -src/sdk/models/operations/getaccountingdirectcostattachment.ts -src/sdk/models/operations/listaccountingdirectcosts.ts -src/sdk/models/operations/listaccountingdirectcostattachments.ts -src/sdk/models/operations/getaccountingtransfer.ts -src/sdk/models/operations/listaccountingtransfers.ts -src/sdk/models/operations/getaccountingjournalentry.ts -src/sdk/models/operations/listaccountingjournalentries.ts -src/sdk/models/operations/getaccountingjournal.ts -src/sdk/models/operations/listaccountingjournals.ts -src/sdk/models/operations/listaccountingbankaccounttransactions.ts -src/sdk/models/operations/getaccountingbankaccount.ts -src/sdk/models/operations/listaccountingbankaccounts.ts -src/sdk/models/operations/listbankingaccountbalances.ts -src/sdk/models/operations/getbankingaccount.ts -src/sdk/models/operations/listbankingaccounts.ts -src/sdk/models/operations/getbankingtransactioncategory.ts -src/sdk/models/operations/listbankingtransactioncategories.ts -src/sdk/models/operations/getbankingtransaction.ts -src/sdk/models/operations/listbankingtransactions.ts -src/sdk/models/operations/getcategorizedbankstatement.ts -src/sdk/models/operations/downloadaccountingbillattachment.ts -src/sdk/models/operations/getaccountingbill.ts -src/sdk/models/operations/getaccountingbillattachment.ts -src/sdk/models/operations/listaccountingbills.ts -src/sdk/models/operations/listaccountingbillattachments.ts -src/sdk/models/operations/downloadaccountingsupplierattachment.ts -src/sdk/models/operations/getaccountingsupplier.ts -src/sdk/models/operations/getaccountingsupplierattachment.ts -src/sdk/models/operations/listaccountingsuppliers.ts -src/sdk/models/operations/listaccountingsupplierattachments.ts -src/sdk/models/operations/getaccountingbillcreditnote.ts -src/sdk/models/operations/listaccountingbillcreditnotes.ts -src/sdk/models/operations/getaccountingbillpayment.ts -src/sdk/models/operations/listaccountingbillpayments.ts -src/sdk/models/operations/getcommercecustomer.ts -src/sdk/models/operations/listcommercecustomers.ts -src/sdk/models/operations/getcommercedispute.ts -src/sdk/models/operations/listcommercedisputes.ts -src/sdk/models/operations/getcommercelocation.ts -src/sdk/models/operations/listcommercelocations.ts -src/sdk/models/operations/getcommerceorder.ts -src/sdk/models/operations/listcommerceorders.ts -src/sdk/models/operations/getcommercepaymentmethod.ts -src/sdk/models/operations/listcommercepaymentmethods.ts -src/sdk/models/operations/getcommercepayment.ts -src/sdk/models/operations/listcommercepayments.ts -src/sdk/models/operations/getcommerceproductcategory.ts -src/sdk/models/operations/listcommerceproductcategories.ts -src/sdk/models/operations/getcommerceproduct.ts -src/sdk/models/operations/listcommerceproducts.ts -src/sdk/models/operations/getcommercetransaction.ts -src/sdk/models/operations/listcommercetransactions.ts -src/sdk/models/operations/getcommercecustomerretentionmetrics.ts -src/sdk/models/operations/getcommercelifetimevaluemetrics.ts -src/sdk/models/operations/getcommercerevenuemetrics.ts -src/sdk/models/operations/getcommerceordersreport.ts -src/sdk/models/operations/getcommercerefundsreport.ts -src/sdk/models/operations/getaccountingprofile.ts -src/sdk/models/operations/getcommerceprofile.ts -src/sdk/models/operations/downloadaccountingcustomerattachment.ts -src/sdk/models/operations/getaccountingcustomer.ts -src/sdk/models/operations/getaccountingcustomerattachment.ts -src/sdk/models/operations/listaccountingcustomers.ts -src/sdk/models/operations/listaccountingcustomerattachments.ts -src/sdk/models/operations/downloadaccountingdirectincomeattachment.ts -src/sdk/models/operations/getaccountingdirectincome.ts -src/sdk/models/operations/getaccountingdirectincomeattachment.ts -src/sdk/models/operations/listaccountingdirectincomes.ts -src/sdk/models/operations/listaccountingdirectincomeattachments.ts -src/sdk/models/operations/downloadaccountinginvoiceattachment.ts -src/sdk/models/operations/downloadaccountinginvoicepdf.ts -src/sdk/models/operations/getaccountinginvoice.ts -src/sdk/models/operations/getaccountinginvoiceattachment.ts -src/sdk/models/operations/listaccountinginvoices.ts -src/sdk/models/operations/listaccountinginvoiceattachments.ts -src/sdk/models/operations/listreconciledinvoices.ts -src/sdk/models/operations/getaccountingcreditnote.ts -src/sdk/models/operations/listaccountingcreditnotes.ts -src/sdk/models/operations/getaccountingpayment.ts -src/sdk/models/operations/listaccountingpayments.ts -src/sdk/models/operations/getaccountingagedcreditorsreport.ts -src/sdk/models/operations/getaccountingageddebtorsreport.ts -src/sdk/models/operations/isagedcreditorsreportavailable.ts -src/sdk/models/operations/isageddebtorsreportavailable.ts -src/sdk/models/operations/downloadfiles.ts -src/sdk/models/operations/listfiles.ts -src/sdk/models/operations/uploadfiles.ts -src/sdk/models/operations/createbankaccount.ts -src/sdk/models/operations/getcreateupdatebankaccountsmodel.ts -src/sdk/models/operations/createbanktransactions.ts -src/sdk/models/operations/getcreatebanktransactionsmodel.ts -src/sdk/models/operations/createaccount.ts -src/sdk/models/operations/getcreatechartofaccountsmodel.ts -src/sdk/models/operations/createdirectcost.ts -src/sdk/models/operations/getcreatedirectcostsmodel.ts -src/sdk/models/operations/createpayment.ts -src/sdk/models/operations/getcreatepaymentmodel.ts -src/sdk/models/operations/createsupplier.ts -src/sdk/models/operations/getcreateupdatesuppliersmodel.ts -src/sdk/models/operations/createtransfer.ts -src/sdk/models/operations/getcreatetransfersmodel.ts -src/sdk/models/operations/getcreateoperation.ts -src/sdk/models/operations/listcreateoperations.ts -src/sdk/models/operations/getaccountingaccount.ts -src/sdk/models/operations/listaccountingaccounts.ts -src/sdk/models/operations/getaccountingbalancesheet.ts -src/sdk/models/operations/getcategorizedbalancesheetstatement.ts -src/sdk/models/operations/getaccountingcashflowstatement.ts -src/sdk/models/operations/getaccountingprofitandloss.ts -src/sdk/models/operations/getcategorizedprofitandlossstatement.ts -src/sdk/models/operations/getdatastatus.ts -src/sdk/models/operations/refreshalldatatypes.ts -src/sdk/models/operations/refreshdatatype.ts -src/sdk/models/operations/getpulloperation.ts -src/sdk/models/operations/listpulloperations.ts -src/sdk/models/operations/generateloansummary.ts -src/sdk/models/operations/generateloantransactions.ts -src/sdk/models/operations/getloansummary.ts -src/sdk/models/operations/listloantransactions.ts -src/sdk/models/operations/listdataintegritydetails.ts -src/sdk/models/operations/getdataintegritystatus.ts -src/sdk/models/operations/getdataintegritysummaries.ts -src/sdk/models/operations/downloadexcelreport.ts -src/sdk/models/operations/generateexcelreport.ts -src/sdk/models/operations/getexcelreportgenerationstatus.ts -src/sdk/models/shared/errormessage.ts -src/sdk/models/shared/company.ts -src/sdk/models/shared/connection.ts -src/sdk/models/shared/dataconnectionstatus.ts -src/sdk/models/shared/dataconnectionerror.ts -src/sdk/models/shared/companyrequestbody.ts -src/sdk/models/shared/companies.ts -src/sdk/models/shared/links.ts -src/sdk/models/shared/halref.ts -src/sdk/models/shared/connections.ts -src/sdk/models/shared/accountingaccounttransaction.ts -src/sdk/models/shared/metadata.ts -src/sdk/models/shared/accounttransactionline.ts -src/sdk/models/shared/recordref.ts -src/sdk/models/shared/bankaccountref.ts -src/sdk/models/shared/accountingaccounttransactions.ts -src/sdk/models/shared/accountingdirectcost.ts -src/sdk/models/shared/supplementaldata.ts -src/sdk/models/shared/accountingpaymentallocation.ts -src/sdk/models/shared/paymentallocationpayment.ts -src/sdk/models/shared/accountref.ts -src/sdk/models/shared/directcostlineitem.ts -src/sdk/models/shared/trackingcategoryref.ts -src/sdk/models/shared/tracking.ts -src/sdk/models/shared/taxrateref.ts -src/sdk/models/shared/propertieitemref.ts -src/sdk/models/shared/datatype.ts -src/sdk/models/shared/accountingattachment.ts -src/sdk/models/shared/accountingdirectcosts.ts -src/sdk/models/shared/attachments.ts -src/sdk/models/shared/accountingtransfer.ts -src/sdk/models/shared/transferaccount.ts -src/sdk/models/shared/contactref.ts -src/sdk/models/shared/accountingtransfers.ts -src/sdk/models/shared/accountingjournalentry.ts -src/sdk/models/shared/journalref.ts -src/sdk/models/shared/journalline.ts -src/sdk/models/shared/accountingjournalentries.ts -src/sdk/models/shared/accountingjournal.ts -src/sdk/models/shared/journalstatus.ts -src/sdk/models/shared/accountingjournals.ts -src/sdk/models/shared/accountingbanktransactions.ts -src/sdk/models/shared/accountingbanktransaction.ts -src/sdk/models/shared/banktransactiontype.ts -src/sdk/models/shared/accountingbankaccount.ts -src/sdk/models/shared/accountingbankaccounttype.ts -src/sdk/models/shared/accountingbankaccounts.ts -src/sdk/models/shared/bankingaccountbalances.ts -src/sdk/models/shared/bankingaccountbalance.ts -src/sdk/models/shared/accountbalanceamounts.ts -src/sdk/models/shared/bankingaccount.ts -src/sdk/models/shared/accountinstitution.ts -src/sdk/models/shared/accountidentifiers.ts -src/sdk/models/shared/accountidentifiertype.ts -src/sdk/models/shared/bankingaccounts.ts -src/sdk/models/shared/bankingtransactioncategory.ts -src/sdk/models/shared/transactioncategorystatus.ts -src/sdk/models/shared/bankingtransactioncategories.ts -src/sdk/models/shared/bankingtransaction.ts -src/sdk/models/shared/transactioncategoryref.ts -src/sdk/models/shared/transactioncode.ts -src/sdk/models/shared/bankingtransactions.ts -src/sdk/models/shared/enhancedcashflowtransactions.ts -src/sdk/models/shared/enhancedcashflowitem.ts -src/sdk/models/shared/enhancedcashflowtransaction.ts -src/sdk/models/shared/transactioncategory.ts -src/sdk/models/shared/sourceref.ts -src/sdk/models/shared/reportinfo.ts -src/sdk/models/shared/datasource.ts -src/sdk/models/shared/accounts.ts -src/sdk/models/shared/accountingbill.ts -src/sdk/models/shared/supplierref.ts -src/sdk/models/shared/billstatus.ts -src/sdk/models/shared/billlineitem.ts -src/sdk/models/shared/accountspayabletracking.ts -src/sdk/models/shared/projectref.ts -src/sdk/models/shared/billedtotype.ts -src/sdk/models/shared/accountingcustomerref.ts -src/sdk/models/shared/accountingbills.ts -src/sdk/models/shared/accountingsupplier.ts -src/sdk/models/shared/supplierstatus.ts -src/sdk/models/shared/accountingaddress.ts -src/sdk/models/shared/accountingaddresstype.ts -src/sdk/models/shared/accountingsuppliers.ts -src/sdk/models/shared/accountingbillcreditnote.ts -src/sdk/models/shared/items.ts -src/sdk/models/shared/billcreditnotestatus.ts -src/sdk/models/shared/billcreditnotelineitem.ts -src/sdk/models/shared/accountingbillcreditnotes.ts -src/sdk/models/shared/accountingbillpayment.ts -src/sdk/models/shared/paymentmethodref.ts -src/sdk/models/shared/billpaymentline.ts -src/sdk/models/shared/billpaymentlinelink.ts -src/sdk/models/shared/billpaymentlinelinktype.ts -src/sdk/models/shared/accountingbillpayments.ts -src/sdk/models/shared/commercecustomer.ts -src/sdk/models/shared/commerceaddress.ts -src/sdk/models/shared/commerceaddresstype.ts -src/sdk/models/shared/commercecustomers.ts -src/sdk/models/shared/commercedispute.ts -src/sdk/models/shared/disputestatus.ts -src/sdk/models/shared/transactionsourceref.ts -src/sdk/models/shared/transactionsourcetype.ts -src/sdk/models/shared/commercedisputes.ts -src/sdk/models/shared/commercelocation.ts -src/sdk/models/shared/commercelocations.ts -src/sdk/models/shared/commerceorder.ts -src/sdk/models/shared/servicecharge.ts -src/sdk/models/shared/servicechargetype.ts -src/sdk/models/shared/taxcomponentallocation.ts -src/sdk/models/shared/taxcomponentref.ts -src/sdk/models/shared/paymentref.ts -src/sdk/models/shared/paymenttype.ts -src/sdk/models/shared/paymentstatus.ts -src/sdk/models/shared/orderlineitem.ts -src/sdk/models/shared/productvariantref.ts -src/sdk/models/shared/productref.ts -src/sdk/models/shared/orderdiscountallocation.ts -src/sdk/models/shared/locationref.ts -src/sdk/models/shared/commercecustomerref.ts -src/sdk/models/shared/commerceorders.ts -src/sdk/models/shared/commercepaymentmethod.ts -src/sdk/models/shared/commercepaymentmethods.ts -src/sdk/models/shared/commercepayment.ts -src/sdk/models/shared/commercepayments.ts -src/sdk/models/shared/commerceproductcategory.ts -src/sdk/models/shared/commercerecordref.ts -src/sdk/models/shared/commerceproductcategories.ts -src/sdk/models/shared/commerceproduct.ts -src/sdk/models/shared/productvariant.ts -src/sdk/models/shared/productvariantstatus.ts -src/sdk/models/shared/productprice.ts -src/sdk/models/shared/productinventory.ts -src/sdk/models/shared/productinventorylocation.ts -src/sdk/models/shared/commerceproducts.ts -src/sdk/models/shared/commercetransaction.ts -src/sdk/models/shared/transactiontype.ts -src/sdk/models/shared/commercetransactions.ts -src/sdk/models/shared/commercereport.ts -src/sdk/models/shared/commercereportcomponent.ts -src/sdk/models/shared/reportcomponentmeasure.ts -src/sdk/models/shared/commercereportmeasure.ts -src/sdk/models/shared/commercereporterror.ts -src/sdk/models/shared/commercereportdimension.ts -src/sdk/models/shared/periodunit.ts -src/sdk/models/shared/accountingcompanyinfo.ts -src/sdk/models/shared/weblink.ts -src/sdk/models/shared/phonenumber.ts -src/sdk/models/shared/phonenumbertype.ts -src/sdk/models/shared/commercecompanyinfo.ts -src/sdk/models/shared/accountbalance.ts -src/sdk/models/shared/accountingcustomer.ts -src/sdk/models/shared/customerstatus.ts -src/sdk/models/shared/contact.ts -src/sdk/models/shared/accountingcustomers.ts -src/sdk/models/shared/accountingdirectincome.ts -src/sdk/models/shared/directincomelineitem.ts -src/sdk/models/shared/accountingdirectincomes.ts -src/sdk/models/shared/accountinginvoice.ts -src/sdk/models/shared/invoicestatus.ts -src/sdk/models/shared/invoicelineitem.ts -src/sdk/models/shared/accountsreceivabletracking.ts -src/sdk/models/shared/billedtotype1.ts -src/sdk/models/shared/accountinginvoices.ts -src/sdk/models/shared/enhancedinvoicesreport.ts -src/sdk/models/shared/enhancedinvoicereportitem.ts -src/sdk/models/shared/payment.ts -src/sdk/models/shared/bankingtransactionref.ts -src/sdk/models/shared/lendingcustomerref.ts -src/sdk/models/shared/accountingcreditnote.ts -src/sdk/models/shared/creditnotestatus.ts -src/sdk/models/shared/creditnotelineitem.ts -src/sdk/models/shared/accountingcreditnotes.ts -src/sdk/models/shared/accountingpayment.ts -src/sdk/models/shared/paymentline.ts -src/sdk/models/shared/paymentlinelink.ts -src/sdk/models/shared/paymentlinktype.ts -src/sdk/models/shared/accountingpayments.ts -src/sdk/models/shared/accountingagedcreditorreport.ts -src/sdk/models/shared/agedcreditor.ts -src/sdk/models/shared/agedcurrencyoutstanding.ts -src/sdk/models/shared/agedoutstandingamount.ts -src/sdk/models/shared/agedoutstandingamountdetail.ts -src/sdk/models/shared/accountingageddebtorreport.ts -src/sdk/models/shared/ageddebtor.ts -src/sdk/models/shared/file.ts -src/sdk/models/shared/fileupload.ts -src/sdk/models/shared/codatfile.ts -src/sdk/models/shared/accountingcreatebankaccountresponse.ts -src/sdk/models/shared/validation.ts -src/sdk/models/shared/validationitem.ts -src/sdk/models/shared/pushoperationstatus.ts -src/sdk/models/shared/pushoperationchange.ts -src/sdk/models/shared/pushchangetype.ts -src/sdk/models/shared/pushoperationref.ts -src/sdk/models/shared/pushoption.ts -src/sdk/models/shared/pushvalidationinfo.ts -src/sdk/models/shared/pushfieldvalidation.ts -src/sdk/models/shared/pushoptiontype.ts -src/sdk/models/shared/pushoptionproperty.ts -src/sdk/models/shared/pushoptionchoice.ts -src/sdk/models/shared/accountingcreatebanktransactionsresponse.ts -src/sdk/models/shared/accountingcreatebanktransactions.ts -src/sdk/models/shared/createbankaccounttransaction.ts -src/sdk/models/shared/accountingcreateaccountresponse.ts -src/sdk/models/shared/accountingaccount.ts -src/sdk/models/shared/accounttype.ts -src/sdk/models/shared/accountstatus.ts -src/sdk/models/shared/accountprototype.ts -src/sdk/models/shared/accountingcreatedirectcostresponse.ts -src/sdk/models/shared/directcostprototype.ts -src/sdk/models/shared/accountingcreatepaymentresponse.ts -src/sdk/models/shared/accountingcreatesupplierresponse.ts -src/sdk/models/shared/accountingcreatetransferresponse.ts -src/sdk/models/shared/pushoperation.ts -src/sdk/models/shared/pushoperations.ts -src/sdk/models/shared/accountingaccounts.ts -src/sdk/models/shared/accountingbalancesheet.ts -src/sdk/models/shared/balancesheet.ts -src/sdk/models/shared/reportlineinput.ts -src/sdk/models/shared/reportline.ts -src/sdk/models/shared/enhancedfinancialreport.ts -src/sdk/models/shared/enhancedreportaccountcategory.ts -src/sdk/models/shared/accountcategorylevel.ts -src/sdk/models/shared/enhancedreportinfo.ts -src/sdk/models/shared/accountingcashflowstatement.ts -src/sdk/models/shared/cashflowstatement.ts -src/sdk/models/shared/reportinput.ts -src/sdk/models/shared/reportbasis.ts -src/sdk/models/shared/accountingprofitandlossreport.ts -src/sdk/models/shared/profitandlossreport.ts -src/sdk/models/shared/datastatus.ts -src/sdk/models/shared/pulloperation.ts -src/sdk/models/shared/schemadatatype.ts -src/sdk/models/shared/pulloperations.ts -src/sdk/models/shared/loansummary.ts -src/sdk/models/shared/loansummaryreportitem.ts -src/sdk/models/shared/loansummaryrecordref.ts -src/sdk/models/shared/loansummaryrecordreftype.ts -src/sdk/models/shared/loansummaryintegrationtype.ts -src/sdk/models/shared/loansummaryreportinfo.ts -src/sdk/models/shared/loantransactions.ts -src/sdk/models/shared/reportitems.ts -src/sdk/models/shared/loanref.ts -src/sdk/models/shared/itemref.ts -src/sdk/models/shared/loantransactionsreportinfo.ts -src/sdk/models/shared/dataintegritydetails.ts -src/sdk/models/shared/dataintegritydetail.ts -src/sdk/models/shared/dataintegritymatch.ts -src/sdk/models/shared/dataintegritydatatype.ts -src/sdk/models/shared/dataintegritystatuses.ts -src/sdk/models/shared/dataintegritystatus.ts -src/sdk/models/shared/dataintegritystatusinfo.ts -src/sdk/models/shared/integritystatus.ts -src/sdk/models/shared/dataintegritydates.ts -src/sdk/models/shared/dataintegrityconnectionid.ts -src/sdk/models/shared/dataintegrityamounts.ts -src/sdk/models/shared/dataintegritysummaries.ts -src/sdk/models/shared/dataintegritysummary.ts -src/sdk/models/shared/dataintegritybycount.ts -src/sdk/models/shared/dataintegritybyamount.ts -src/sdk/models/shared/excelreporttypes.ts -src/sdk/models/shared/excelstatus.ts -src/sdk/models/shared/security.ts -src/sdk/models/shared/accountcategoriesupdatedwebhook.ts -src/sdk/models/shared/accountcategoriesupdatedwebhookdata.ts -src/sdk/models/shared/clientratelimitreachedwebhook.ts -src/sdk/models/shared/clientratelimitreachedwebhookdata.ts -src/sdk/models/shared/clientratelimitresetwebhook.ts -src/sdk/models/shared/clientratelimitresetwebhookdata.ts -src/sdk/models/webhooks/accountcategoriesupdated.ts -src/sdk/models/webhooks/clientratelimitreached.ts -src/sdk/models/webhooks/clientratelimitreset.ts -src/sdk/models/errors/index.ts -src/sdk/models/operations/index.ts -src/sdk/models/shared/index.ts -src/sdk/models/webhooks/index.ts -docs/sdk/models/operations/createcompanyresponse.md -docs/sdk/models/operations/deletecompanyrequest.md -docs/sdk/models/operations/deletecompanyresponse.md -docs/sdk/models/operations/getcompanyrequest.md -docs/sdk/models/operations/getcompanyresponse.md -docs/sdk/models/operations/listcompaniesrequest.md -docs/sdk/models/operations/listcompaniesresponse.md -docs/sdk/models/operations/updatecompanyrequest.md -docs/sdk/models/operations/updatecompanyresponse.md -docs/sdk/models/operations/createconnectionrequestbody.md -docs/sdk/models/operations/createconnectionrequest.md -docs/sdk/models/operations/createconnectionresponse.md -docs/sdk/models/operations/deleteconnectionrequest.md -docs/sdk/models/operations/deleteconnectionresponse.md -docs/sdk/models/operations/getconnectionrequest.md -docs/sdk/models/operations/getconnectionresponse.md -docs/sdk/models/operations/listconnectionsrequest.md -docs/sdk/models/operations/listconnectionsresponse.md -docs/sdk/models/operations/unlinkconnectionupdateconnection.md -docs/sdk/models/operations/unlinkconnectionrequest.md -docs/sdk/models/operations/unlinkconnectionresponse.md -docs/sdk/models/operations/getaccountingaccounttransactionrequest.md -docs/sdk/models/operations/getaccountingaccounttransactionresponse.md -docs/sdk/models/operations/listaccountingaccounttransactionsrequest.md -docs/sdk/models/operations/listaccountingaccounttransactionsresponse.md -docs/sdk/models/operations/downloadaccountingdirectcostattachmentrequest.md -docs/sdk/models/operations/downloadaccountingdirectcostattachmentresponse.md -docs/sdk/models/operations/getaccountingdirectcostrequest.md -docs/sdk/models/operations/getaccountingdirectcostresponse.md -docs/sdk/models/operations/getaccountingdirectcostattachmentrequest.md -docs/sdk/models/operations/getaccountingdirectcostattachmentresponse.md -docs/sdk/models/operations/listaccountingdirectcostsrequest.md -docs/sdk/models/operations/listaccountingdirectcostsresponse.md -docs/sdk/models/operations/listaccountingdirectcostattachmentsrequest.md -docs/sdk/models/operations/listaccountingdirectcostattachmentsresponse.md -docs/sdk/models/operations/getaccountingtransferrequest.md -docs/sdk/models/operations/getaccountingtransferresponse.md -docs/sdk/models/operations/listaccountingtransfersrequest.md -docs/sdk/models/operations/listaccountingtransfersresponse.md -docs/sdk/models/operations/getaccountingjournalentryrequest.md -docs/sdk/models/operations/getaccountingjournalentryresponse.md -docs/sdk/models/operations/listaccountingjournalentriesrequest.md -docs/sdk/models/operations/listaccountingjournalentriesresponse.md -docs/sdk/models/operations/getaccountingjournalrequest.md -docs/sdk/models/operations/getaccountingjournalresponse.md -docs/sdk/models/operations/listaccountingjournalsrequest.md -docs/sdk/models/operations/listaccountingjournalsresponse.md -docs/sdk/models/operations/listaccountingbankaccounttransactionsrequest.md -docs/sdk/models/operations/listaccountingbankaccounttransactionsresponse.md -docs/sdk/models/operations/getaccountingbankaccountrequest.md -docs/sdk/models/operations/getaccountingbankaccountresponse.md -docs/sdk/models/operations/listaccountingbankaccountsrequest.md -docs/sdk/models/operations/listaccountingbankaccountsresponse.md -docs/sdk/models/operations/listbankingaccountbalancesrequest.md -docs/sdk/models/operations/listbankingaccountbalancesresponse.md -docs/sdk/models/operations/getbankingaccountrequest.md -docs/sdk/models/operations/getbankingaccountresponse.md -docs/sdk/models/operations/listbankingaccountsrequest.md -docs/sdk/models/operations/listbankingaccountsresponse.md -docs/sdk/models/operations/getbankingtransactioncategoryrequest.md -docs/sdk/models/operations/getbankingtransactioncategoryresponse.md -docs/sdk/models/operations/listbankingtransactioncategoriesrequest.md -docs/sdk/models/operations/listbankingtransactioncategoriesresponse.md -docs/sdk/models/operations/getbankingtransactionrequest.md -docs/sdk/models/operations/getbankingtransactionresponse.md -docs/sdk/models/operations/listbankingtransactionsrequest.md -docs/sdk/models/operations/listbankingtransactionsresponse.md -docs/sdk/models/operations/getcategorizedbankstatementrequest.md -docs/sdk/models/operations/getcategorizedbankstatementresponse.md -docs/sdk/models/operations/downloadaccountingbillattachmentrequest.md -docs/sdk/models/operations/downloadaccountingbillattachmentresponse.md -docs/sdk/models/operations/getaccountingbillrequest.md -docs/sdk/models/operations/getaccountingbillresponse.md -docs/sdk/models/operations/getaccountingbillattachmentrequest.md -docs/sdk/models/operations/getaccountingbillattachmentresponse.md -docs/sdk/models/operations/listaccountingbillsrequest.md -docs/sdk/models/operations/listaccountingbillsresponse.md -docs/sdk/models/operations/listaccountingbillattachmentsrequest.md -docs/sdk/models/operations/listaccountingbillattachmentsresponse.md -docs/sdk/models/operations/downloadaccountingsupplierattachmentrequest.md -docs/sdk/models/operations/downloadaccountingsupplierattachmentresponse.md -docs/sdk/models/operations/getaccountingsupplierrequest.md -docs/sdk/models/operations/getaccountingsupplierresponse.md -docs/sdk/models/operations/getaccountingsupplierattachmentrequest.md -docs/sdk/models/operations/getaccountingsupplierattachmentresponse.md -docs/sdk/models/operations/listaccountingsuppliersrequest.md -docs/sdk/models/operations/listaccountingsuppliersresponse.md -docs/sdk/models/operations/listaccountingsupplierattachmentsrequest.md -docs/sdk/models/operations/listaccountingsupplierattachmentsresponse.md -docs/sdk/models/operations/getaccountingbillcreditnoterequest.md -docs/sdk/models/operations/getaccountingbillcreditnoteresponse.md -docs/sdk/models/operations/listaccountingbillcreditnotesrequest.md -docs/sdk/models/operations/listaccountingbillcreditnotesresponse.md -docs/sdk/models/operations/getaccountingbillpaymentrequest.md -docs/sdk/models/operations/getaccountingbillpaymentresponse.md -docs/sdk/models/operations/listaccountingbillpaymentsrequest.md -docs/sdk/models/operations/listaccountingbillpaymentsresponse.md -docs/sdk/models/operations/getcommercecustomerrequest.md -docs/sdk/models/operations/getcommercecustomerresponse.md -docs/sdk/models/operations/listcommercecustomersrequest.md -docs/sdk/models/operations/listcommercecustomersresponse.md -docs/sdk/models/operations/getcommercedisputerequest.md -docs/sdk/models/operations/getcommercedisputeresponse.md -docs/sdk/models/operations/listcommercedisputesrequest.md -docs/sdk/models/operations/listcommercedisputesresponse.md -docs/sdk/models/operations/getcommercelocationrequest.md -docs/sdk/models/operations/getcommercelocationresponse.md -docs/sdk/models/operations/listcommercelocationsrequest.md -docs/sdk/models/operations/listcommercelocationsresponse.md -docs/sdk/models/operations/getcommerceorderrequest.md -docs/sdk/models/operations/getcommerceorderresponse.md -docs/sdk/models/operations/listcommerceordersrequest.md -docs/sdk/models/operations/listcommerceordersresponse.md -docs/sdk/models/operations/getcommercepaymentmethodrequest.md -docs/sdk/models/operations/getcommercepaymentmethodresponse.md -docs/sdk/models/operations/listcommercepaymentmethodsrequest.md -docs/sdk/models/operations/listcommercepaymentmethodsresponse.md -docs/sdk/models/operations/getcommercepaymentrequest.md -docs/sdk/models/operations/getcommercepaymentresponse.md -docs/sdk/models/operations/listcommercepaymentsrequest.md -docs/sdk/models/operations/listcommercepaymentsresponse.md -docs/sdk/models/operations/getcommerceproductcategoryrequest.md -docs/sdk/models/operations/getcommerceproductcategoryresponse.md -docs/sdk/models/operations/listcommerceproductcategoriesrequest.md -docs/sdk/models/operations/listcommerceproductcategoriesresponse.md -docs/sdk/models/operations/getcommerceproductrequest.md -docs/sdk/models/operations/getcommerceproductresponse.md -docs/sdk/models/operations/listcommerceproductsrequest.md -docs/sdk/models/operations/listcommerceproductsresponse.md -docs/sdk/models/operations/getcommercetransactionrequest.md -docs/sdk/models/operations/getcommercetransactionresponse.md -docs/sdk/models/operations/listcommercetransactionsrequest.md -docs/sdk/models/operations/listcommercetransactionsresponse.md -docs/sdk/models/operations/getcommercecustomerretentionmetricsrequest.md -docs/sdk/models/operations/getcommercecustomerretentionmetricsresponse.md -docs/sdk/models/operations/getcommercelifetimevaluemetricsrequest.md -docs/sdk/models/operations/getcommercelifetimevaluemetricsresponse.md -docs/sdk/models/operations/getcommercerevenuemetricsrequest.md -docs/sdk/models/operations/getcommercerevenuemetricsresponse.md -docs/sdk/models/operations/getcommerceordersreportrequest.md -docs/sdk/models/operations/getcommerceordersreportresponse.md -docs/sdk/models/operations/getcommercerefundsreportrequest.md -docs/sdk/models/operations/getcommercerefundsreportresponse.md -docs/sdk/models/operations/getaccountingprofilerequest.md -docs/sdk/models/operations/getaccountingprofileresponse.md -docs/sdk/models/operations/getcommerceprofilerequest.md -docs/sdk/models/operations/getcommerceprofileresponse.md -docs/sdk/models/operations/downloadaccountingcustomerattachmentrequest.md -docs/sdk/models/operations/downloadaccountingcustomerattachmentresponse.md -docs/sdk/models/operations/getaccountingcustomerrequest.md -docs/sdk/models/operations/getaccountingcustomerresponse.md -docs/sdk/models/operations/getaccountingcustomerattachmentrequest.md -docs/sdk/models/operations/getaccountingcustomerattachmentresponse.md -docs/sdk/models/operations/listaccountingcustomersrequest.md -docs/sdk/models/operations/listaccountingcustomersresponse.md -docs/sdk/models/operations/listaccountingcustomerattachmentsrequest.md -docs/sdk/models/operations/listaccountingcustomerattachmentsresponse.md -docs/sdk/models/operations/downloadaccountingdirectincomeattachmentrequest.md -docs/sdk/models/operations/downloadaccountingdirectincomeattachmentresponse.md -docs/sdk/models/operations/getaccountingdirectincomerequest.md -docs/sdk/models/operations/getaccountingdirectincomeresponse.md -docs/sdk/models/operations/getaccountingdirectincomeattachmentrequest.md -docs/sdk/models/operations/getaccountingdirectincomeattachmentresponse.md -docs/sdk/models/operations/listaccountingdirectincomesrequest.md -docs/sdk/models/operations/listaccountingdirectincomesresponse.md -docs/sdk/models/operations/listaccountingdirectincomeattachmentsrequest.md -docs/sdk/models/operations/listaccountingdirectincomeattachmentsresponse.md -docs/sdk/models/operations/downloadaccountinginvoiceattachmentrequest.md -docs/sdk/models/operations/downloadaccountinginvoiceattachmentresponse.md -docs/sdk/models/operations/downloadaccountinginvoicepdfrequest.md -docs/sdk/models/operations/downloadaccountinginvoicepdfresponse.md -docs/sdk/models/operations/getaccountinginvoicerequest.md -docs/sdk/models/operations/getaccountinginvoiceresponse.md -docs/sdk/models/operations/getaccountinginvoiceattachmentrequest.md -docs/sdk/models/operations/getaccountinginvoiceattachmentresponse.md -docs/sdk/models/operations/listaccountinginvoicesrequest.md -docs/sdk/models/operations/listaccountinginvoicesresponse.md -docs/sdk/models/operations/listaccountinginvoiceattachmentsrequest.md -docs/sdk/models/operations/listaccountinginvoiceattachmentsresponse.md -docs/sdk/models/operations/listreconciledinvoicesrequest.md -docs/sdk/models/operations/listreconciledinvoicesresponse.md -docs/sdk/models/operations/getaccountingcreditnoterequest.md -docs/sdk/models/operations/getaccountingcreditnoteresponse.md -docs/sdk/models/operations/listaccountingcreditnotesrequest.md -docs/sdk/models/operations/listaccountingcreditnotesresponse.md -docs/sdk/models/operations/getaccountingpaymentrequest.md -docs/sdk/models/operations/getaccountingpaymentresponse.md -docs/sdk/models/operations/listaccountingpaymentsrequest.md -docs/sdk/models/operations/listaccountingpaymentsresponse.md -docs/types/rfcdate.md -docs/sdk/models/operations/getaccountingagedcreditorsreportrequest.md -docs/sdk/models/operations/getaccountingagedcreditorsreportresponse.md -docs/sdk/models/operations/getaccountingageddebtorsreportrequest.md -docs/sdk/models/operations/getaccountingageddebtorsreportresponse.md -docs/sdk/models/operations/isagedcreditorsreportavailablerequest.md -docs/sdk/models/operations/isagedcreditorsreportavailableresponse.md -docs/sdk/models/operations/isageddebtorsreportavailablerequest.md -docs/sdk/models/operations/isageddebtorsreportavailableresponse.md -docs/sdk/models/operations/downloadfilesrequest.md -docs/sdk/models/operations/downloadfilesresponse.md -docs/sdk/models/operations/listfilesrequest.md -docs/sdk/models/operations/listfilesresponse.md -docs/sdk/models/operations/uploadfilesrequest.md -docs/sdk/models/operations/uploadfilesresponse.md -docs/sdk/models/operations/createbankaccountrequest.md -docs/sdk/models/operations/createbankaccountresponse.md -docs/sdk/models/operations/getcreateupdatebankaccountsmodelrequest.md -docs/sdk/models/operations/getcreateupdatebankaccountsmodelresponse.md -docs/sdk/models/operations/createbanktransactionsrequest.md -docs/sdk/models/operations/createbanktransactionsresponse.md -docs/sdk/models/operations/getcreatebanktransactionsmodelrequest.md -docs/sdk/models/operations/getcreatebanktransactionsmodelresponse.md -docs/sdk/models/operations/createaccountrequest.md -docs/sdk/models/operations/createaccountresponse.md -docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md -docs/sdk/models/operations/getcreatechartofaccountsmodelresponse.md -docs/sdk/models/operations/createdirectcostrequest.md -docs/sdk/models/operations/createdirectcostresponse.md -docs/sdk/models/operations/getcreatedirectcostsmodelrequest.md -docs/sdk/models/operations/getcreatedirectcostsmodelresponse.md -docs/sdk/models/operations/createpaymentrequest.md -docs/sdk/models/operations/createpaymentresponse.md -docs/sdk/models/operations/getcreatepaymentmodelrequest.md -docs/sdk/models/operations/getcreatepaymentmodelresponse.md -docs/sdk/models/operations/createsupplierrequest.md -docs/sdk/models/operations/createsupplierresponse.md -docs/sdk/models/operations/getcreateupdatesuppliersmodelrequest.md -docs/sdk/models/operations/getcreateupdatesuppliersmodelresponse.md -docs/sdk/models/operations/createtransferrequest.md -docs/sdk/models/operations/createtransferresponse.md -docs/sdk/models/operations/getcreatetransfersmodelrequest.md -docs/sdk/models/operations/getcreatetransfersmodelresponse.md -docs/sdk/models/operations/getcreateoperationrequest.md -docs/sdk/models/operations/getcreateoperationresponse.md -docs/sdk/models/operations/listcreateoperationsrequest.md -docs/sdk/models/operations/listcreateoperationsresponse.md -docs/sdk/models/operations/getaccountingaccountrequest.md -docs/sdk/models/operations/getaccountingaccountresponse.md -docs/sdk/models/operations/listaccountingaccountsrequest.md -docs/sdk/models/operations/listaccountingaccountsresponse.md -docs/sdk/models/operations/getaccountingbalancesheetrequest.md -docs/sdk/models/operations/getaccountingbalancesheetresponse.md -docs/sdk/models/operations/getcategorizedbalancesheetstatementrequest.md -docs/sdk/models/operations/getcategorizedbalancesheetstatementresponse.md -docs/sdk/models/operations/getaccountingcashflowstatementrequest.md -docs/sdk/models/operations/getaccountingcashflowstatementresponse.md -docs/sdk/models/operations/getaccountingprofitandlossrequest.md -docs/sdk/models/operations/getaccountingprofitandlossresponse.md -docs/sdk/models/operations/getcategorizedprofitandlossstatementrequest.md -docs/sdk/models/operations/getcategorizedprofitandlossstatementresponse.md -docs/sdk/models/operations/getdatastatusrequest.md -docs/sdk/models/operations/getdatastatusresponse.md -docs/sdk/models/operations/refreshalldatatypesrequest.md -docs/sdk/models/operations/refreshalldatatypesresponse.md -docs/sdk/models/operations/refreshdatatyperequest.md -docs/sdk/models/operations/refreshdatatyperesponse.md -docs/sdk/models/operations/getpulloperationrequest.md -docs/sdk/models/operations/getpulloperationresponse.md -docs/sdk/models/operations/listpulloperationsrequest.md -docs/sdk/models/operations/listpulloperationsresponse.md -docs/sdk/models/operations/sourcetype.md -docs/sdk/models/operations/generateloansummaryrequest.md -docs/sdk/models/operations/generateloansummaryresponse.md -docs/sdk/models/operations/queryparamsourcetype.md -docs/sdk/models/operations/generateloantransactionsrequest.md -docs/sdk/models/operations/generateloantransactionsresponse.md -docs/sdk/models/operations/getloansummaryqueryparamsourcetype.md -docs/sdk/models/operations/getloansummaryrequest.md -docs/sdk/models/operations/getloansummaryresponse.md -docs/sdk/models/operations/listloantransactionsqueryparamsourcetype.md -docs/sdk/models/operations/listloantransactionsrequest.md -docs/sdk/models/operations/listloantransactionsresponse.md -docs/sdk/models/operations/listdataintegritydetailsrequest.md -docs/sdk/models/operations/listdataintegritydetailsresponse.md -docs/sdk/models/operations/getdataintegritystatusrequest.md -docs/sdk/models/operations/getdataintegritystatusresponse.md -docs/sdk/models/operations/getdataintegritysummariesrequest.md -docs/sdk/models/operations/getdataintegritysummariesresponse.md -docs/sdk/models/operations/downloadexcelreportrequest.md -docs/sdk/models/operations/downloadexcelreportresponse.md -docs/sdk/models/operations/generateexcelreportrequest.md -docs/sdk/models/operations/generateexcelreportresponse.md -docs/sdk/models/operations/getexcelreportgenerationstatusrequest.md -docs/sdk/models/operations/getexcelreportgenerationstatusresponse.md -docs/sdk/models/shared/errormessage.md -docs/sdk/models/shared/company.md -docs/sdk/models/shared/sourcetype.md -docs/sdk/models/shared/connection.md -docs/sdk/models/shared/dataconnectionstatus.md -docs/sdk/models/shared/dataconnectionerror.md -docs/sdk/models/shared/companyrequestbody.md -docs/sdk/models/shared/companies.md -docs/sdk/models/shared/links.md -docs/sdk/models/shared/halref.md -docs/sdk/models/shared/connections.md -docs/sdk/models/shared/status.md -docs/sdk/models/shared/accountingaccounttransaction.md -docs/sdk/models/shared/metadata.md -docs/sdk/models/shared/accounttransactionline.md -docs/sdk/models/shared/recordref.md -docs/sdk/models/shared/bankaccountref.md -docs/sdk/models/shared/accountingaccounttransactions.md -docs/sdk/models/shared/accountingdirectcostcontactref.md -docs/sdk/models/shared/accountingdirectcost.md -docs/sdk/models/shared/supplementaldata.md -docs/sdk/models/shared/allocation.md -docs/sdk/models/shared/accountingpaymentallocation.md -docs/sdk/models/shared/paymentallocationpayment.md -docs/sdk/models/shared/accountref.md -docs/sdk/models/shared/directcostlineitem.md -docs/sdk/models/shared/trackingcategoryref.md -docs/sdk/models/shared/tracking.md -docs/sdk/models/shared/taxrateref.md -docs/sdk/models/shared/propertieitemref.md -docs/sdk/models/shared/datatype.md -docs/sdk/models/shared/accountingattachment.md -docs/sdk/models/shared/accountingdirectcosts.md -docs/sdk/models/shared/attachments.md -docs/sdk/models/shared/accountingtransfer.md -docs/sdk/models/shared/transferaccount.md -docs/sdk/models/shared/contactref.md -docs/sdk/models/shared/accountingtransfers.md -docs/sdk/models/shared/accountingjournalentry.md -docs/sdk/models/shared/journalref.md -docs/sdk/models/shared/journallinetracking.md -docs/sdk/models/shared/journalline.md -docs/sdk/models/shared/accountingjournalentries.md -docs/sdk/models/shared/accountingjournal.md -docs/sdk/models/shared/journalstatus.md -docs/sdk/models/shared/accountingjournals.md -docs/sdk/models/shared/accountingbanktransactions.md -docs/sdk/models/shared/accountingbanktransaction.md -docs/sdk/models/shared/banktransactiontype.md -docs/sdk/models/shared/accountingbankaccount.md -docs/sdk/models/shared/accountingbankaccounttype.md -docs/sdk/models/shared/accountingbankaccounts.md -docs/sdk/models/shared/bankingaccountbalances.md -docs/sdk/models/shared/bankingaccountbalance.md -docs/sdk/models/shared/accountbalanceamounts.md -docs/sdk/models/shared/bankingaccount.md -docs/sdk/models/shared/accountinstitution.md -docs/sdk/models/shared/accountidentifiers.md -docs/sdk/models/shared/accountidentifiertype.md -docs/sdk/models/shared/bankingaccounts.md -docs/sdk/models/shared/bankingtransactioncategory.md -docs/sdk/models/shared/transactioncategorystatus.md -docs/sdk/models/shared/bankingtransactioncategories.md -docs/sdk/models/shared/bankingtransaction.md -docs/sdk/models/shared/transactioncategoryref.md -docs/sdk/models/shared/transactioncode.md -docs/sdk/models/shared/bankingtransactions.md -docs/sdk/models/shared/enhancedcashflowtransactions.md -docs/sdk/models/shared/enhancedcashflowitem.md -docs/sdk/models/shared/enhancedcashflowtransaction.md -docs/sdk/models/shared/transactioncategory.md -docs/sdk/models/shared/sourceref.md -docs/sdk/models/shared/reportinfo.md -docs/sdk/models/shared/datasource.md -docs/sdk/models/shared/accounts.md -docs/sdk/models/shared/purchaseorderreference.md -docs/sdk/models/shared/withholdingtax.md -docs/sdk/models/shared/accountingbill.md -docs/sdk/models/shared/supplierref.md -docs/sdk/models/shared/billstatus.md -docs/sdk/models/shared/billlineitemdatatype.md -docs/sdk/models/shared/recordlinereference.md -docs/sdk/models/shared/billlineitem.md -docs/sdk/models/shared/accountspayabletracking.md -docs/sdk/models/shared/projectref.md -docs/sdk/models/shared/billedtotype.md -docs/sdk/models/shared/accountingcustomerref.md -docs/sdk/models/shared/accountingbills.md -docs/sdk/models/shared/accountingsupplier.md -docs/sdk/models/shared/supplierstatus.md -docs/sdk/models/shared/accountingaddress.md -docs/sdk/models/shared/accountingaddresstype.md -docs/sdk/models/shared/accountingsuppliers.md -docs/sdk/models/shared/accountingbillcreditnote.md -docs/sdk/models/shared/items.md -docs/sdk/models/shared/billcreditnotestatus.md -docs/sdk/models/shared/itemreference.md -docs/sdk/models/shared/taxratereference.md -docs/sdk/models/shared/billcreditnotelineitem.md -docs/sdk/models/shared/accountingbillcreditnotes.md -docs/sdk/models/shared/accountingbillpayment.md -docs/sdk/models/shared/paymentmethodref.md -docs/sdk/models/shared/billpaymentline.md -docs/sdk/models/shared/billpaymentlinelink.md -docs/sdk/models/shared/billpaymentlinelinktype.md -docs/sdk/models/shared/accountingbillpayments.md -docs/sdk/models/shared/commercecustomer.md -docs/sdk/models/shared/commerceaddress.md -docs/sdk/models/shared/commerceaddresstype.md -docs/sdk/models/shared/commercecustomers.md -docs/sdk/models/shared/commercedispute.md -docs/sdk/models/shared/disputestatus.md -docs/sdk/models/shared/transactionsourceref.md -docs/sdk/models/shared/transactionsourcetype.md -docs/sdk/models/shared/commercedisputes.md -docs/sdk/models/shared/commercelocation.md -docs/sdk/models/shared/commercelocations.md -docs/sdk/models/shared/commerceorder.md -docs/sdk/models/shared/servicecharge.md -docs/sdk/models/shared/servicechargetype.md -docs/sdk/models/shared/taxcomponentallocation.md -docs/sdk/models/shared/taxcomponentref.md -docs/sdk/models/shared/paymentref.md -docs/sdk/models/shared/paymenttype.md -docs/sdk/models/shared/paymentstatus.md -docs/sdk/models/shared/orderlineitem.md -docs/sdk/models/shared/productvariantref.md -docs/sdk/models/shared/productref.md -docs/sdk/models/shared/orderdiscountallocation.md -docs/sdk/models/shared/locationref.md -docs/sdk/models/shared/commercecustomerref.md -docs/sdk/models/shared/commerceorders.md -docs/sdk/models/shared/commercepaymentmethodstatus.md -docs/sdk/models/shared/commercepaymentmethod.md -docs/sdk/models/shared/commercepaymentmethods.md -docs/sdk/models/shared/commercepayment.md -docs/sdk/models/shared/commercepayments.md -docs/sdk/models/shared/commerceproductcategory.md -docs/sdk/models/shared/commercerecordref.md -docs/sdk/models/shared/commerceproductcategories.md -docs/sdk/models/shared/commerceproduct.md -docs/sdk/models/shared/productvariant.md -docs/sdk/models/shared/productvariantstatus.md -docs/sdk/models/shared/productprice.md -docs/sdk/models/shared/productinventory.md -docs/sdk/models/shared/productinventorylocation.md -docs/sdk/models/shared/commerceproducts.md -docs/sdk/models/shared/commercetransaction.md -docs/sdk/models/shared/transactiontype.md -docs/sdk/models/shared/commercetransactions.md -docs/sdk/models/shared/commercereport.md -docs/sdk/models/shared/commercereportcomponent.md -docs/sdk/models/shared/reportcomponentmeasure.md -docs/sdk/models/shared/commercereportmeasure.md -docs/sdk/models/shared/commercereporterror.md -docs/sdk/models/shared/commercereportdimensionitems.md -docs/sdk/models/shared/commercereportdimension.md -docs/sdk/models/shared/periodunit.md -docs/sdk/models/shared/accountingcompanyinfo.md -docs/sdk/models/shared/typet.md -docs/sdk/models/shared/weblink.md -docs/sdk/models/shared/phonenumber.md -docs/sdk/models/shared/phonenumbertype.md -docs/sdk/models/shared/commercecompanyinfo.md -docs/sdk/models/shared/accountbalance.md -docs/sdk/models/shared/accountingcustomer.md -docs/sdk/models/shared/customerstatus.md -docs/sdk/models/shared/contact.md -docs/sdk/models/shared/accountingcustomers.md -docs/sdk/models/shared/accountingdirectincome.md -docs/sdk/models/shared/directincomelineitem.md -docs/sdk/models/shared/accountingdirectincomes.md -docs/sdk/models/shared/salesorderreference.md -docs/sdk/models/shared/accountinginvoice.md -docs/sdk/models/shared/invoicestatus.md -docs/sdk/models/shared/invoicelineitem.md -docs/sdk/models/shared/recordreference.md -docs/sdk/models/shared/accountsreceivabletracking.md -docs/sdk/models/shared/billedtotype1.md -docs/sdk/models/shared/accountinginvoices.md -docs/sdk/models/shared/enhancedinvoicesreport.md -docs/sdk/models/shared/enhancedinvoicereportitem.md -docs/sdk/models/shared/payment.md -docs/sdk/models/shared/bankingtransactionref.md -docs/sdk/models/shared/lendingcustomerref.md -docs/sdk/models/shared/accountingcreditnote.md -docs/sdk/models/shared/creditnotestatus.md -docs/sdk/models/shared/creditnotelineitem.md -docs/sdk/models/shared/accountingcreditnotes.md -docs/sdk/models/shared/accountingpayment.md -docs/sdk/models/shared/paymentline.md -docs/sdk/models/shared/paymentlinelink.md -docs/sdk/models/shared/paymentlinktype.md -docs/sdk/models/shared/accountingpayments.md -docs/sdk/models/shared/accountingagedcreditorreport.md -docs/sdk/models/shared/agedcreditor.md -docs/sdk/models/shared/agedcurrencyoutstanding.md -docs/sdk/models/shared/agedoutstandingamount.md -docs/sdk/models/shared/agedoutstandingamountdetail.md -docs/sdk/models/shared/accountingageddebtorreport.md -docs/sdk/models/shared/ageddebtor.md -docs/sdk/models/shared/file.md -docs/sdk/models/shared/fileupload.md -docs/sdk/models/shared/codatfile.md -docs/sdk/models/shared/accountingcreatebankaccountresponse.md -docs/sdk/models/shared/validation.md -docs/sdk/models/shared/validationitem.md -docs/sdk/models/shared/pushoperationstatus.md -docs/sdk/models/shared/pushoperationchange.md -docs/sdk/models/shared/pushchangetype.md -docs/sdk/models/shared/pushoperationref.md -docs/sdk/models/shared/pushoption.md -docs/sdk/models/shared/pushvalidationinfo.md -docs/sdk/models/shared/pushfieldvalidation.md -docs/sdk/models/shared/pushoptiontype.md -docs/sdk/models/shared/pushoptionproperty.md -docs/sdk/models/shared/pushoptionchoice.md -docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md -docs/sdk/models/shared/accountingcreatebanktransactions.md -docs/sdk/models/shared/createbankaccounttransaction.md -docs/sdk/models/shared/accountingcreateaccountresponse.md -docs/sdk/models/shared/accountingaccountvaliddatatypelinks.md -docs/sdk/models/shared/accountingaccount.md -docs/sdk/models/shared/accounttype.md -docs/sdk/models/shared/accountstatus.md -docs/sdk/models/shared/validdatatypelinks.md -docs/sdk/models/shared/accountprototype.md -docs/sdk/models/shared/accountingcreatedirectcostresponse.md -docs/sdk/models/shared/directcostprototypecontactref.md -docs/sdk/models/shared/directcostprototype.md -docs/sdk/models/shared/accountingcreatepaymentresponse.md -docs/sdk/models/shared/accountingcreatesupplierresponse.md -docs/sdk/models/shared/accountingcreatetransferresponse.md -docs/sdk/models/shared/pushoperation.md -docs/sdk/models/shared/pushoperations.md -docs/sdk/models/shared/accountingaccounts.md -docs/sdk/models/shared/accountingbalancesheet.md -docs/sdk/models/shared/balancesheet.md -docs/sdk/models/shared/reportlineinput.md -docs/sdk/models/shared/reportline.md -docs/sdk/models/shared/reportitem.md -docs/sdk/models/shared/enhancedfinancialreport.md -docs/sdk/models/shared/enhancedreportaccountcategory.md -docs/sdk/models/shared/accountcategorylevel.md -docs/sdk/models/shared/enhancedreportinfo.md -docs/sdk/models/shared/accountingcashflowstatement.md -docs/sdk/models/shared/cashflowstatement.md -docs/sdk/models/shared/reportinput.md -docs/sdk/models/shared/reportbasis.md -docs/sdk/models/shared/accountingprofitandlossreport.md -docs/sdk/models/shared/profitandlossreport.md -docs/sdk/models/shared/datatypes.md -docs/sdk/models/shared/datastatus.md -docs/sdk/models/shared/pulloperationstatus.md -docs/sdk/models/shared/pulloperation.md -docs/sdk/models/shared/schemadatatype.md -docs/sdk/models/shared/pulloperations.md -docs/sdk/models/shared/loansummary.md -docs/sdk/models/shared/loansummaryreportitem.md -docs/sdk/models/shared/loansummaryrecordref.md -docs/sdk/models/shared/loansummaryrecordreftype.md -docs/sdk/models/shared/loansummaryintegrationtype.md -docs/sdk/models/shared/loansummaryreportinfo.md -docs/sdk/models/shared/loantransactions.md -docs/sdk/models/shared/loantransactiontype.md -docs/sdk/models/shared/reportitems.md -docs/sdk/models/shared/loanref.md -docs/sdk/models/shared/itemref.md -docs/sdk/models/shared/loantransactionsreportinfo.md -docs/sdk/models/shared/dataintegritydetails.md -docs/sdk/models/shared/dataintegritydetail.md -docs/sdk/models/shared/dataintegritymatch.md -docs/sdk/models/shared/dataintegritydatatype.md -docs/sdk/models/shared/dataintegritystatuses.md -docs/sdk/models/shared/dataintegritystatus.md -docs/sdk/models/shared/dataintegritystatusinfo.md -docs/sdk/models/shared/integritystatus.md -docs/sdk/models/shared/dataintegritydates.md -docs/sdk/models/shared/dataintegrityconnectionid.md -docs/sdk/models/shared/dataintegrityamounts.md -docs/sdk/models/shared/dataintegritysummaries.md -docs/sdk/models/shared/dataintegritysummary.md -docs/sdk/models/shared/dataintegritybycount.md -docs/sdk/models/shared/dataintegritybyamount.md -docs/sdk/models/shared/excelreporttypes.md -docs/sdk/models/shared/excelstatus.md -docs/sdk/models/shared/security.md -docs/sdk/models/shared/accountcategoriesupdatedwebhook.md -docs/sdk/models/shared/accountcategoriesupdatedwebhookdata.md -docs/sdk/models/shared/clientratelimitreachedwebhook.md -docs/sdk/models/shared/clientratelimitreachedwebhookdata.md -docs/sdk/models/shared/clientratelimitresetwebhook.md -docs/sdk/models/shared/clientratelimitresetwebhookdata.md -docs/sdk/models/webhooks/accountcategoriesupdatedresponse.md -docs/sdk/models/webhooks/clientratelimitreachedresponse.md -docs/sdk/models/webhooks/clientratelimitresetresponse.md -docs/sdks/codatlending/README.md -docs/internal/utils/retryconfig.md -docs/sdks/companies/README.md -docs/sdks/connections/README.md -docs/sdks/transactions/README.md -docs/sdks/accounttransactions/README.md -docs/sdks/codatlendingdirectcosts/README.md -docs/sdks/codatlendingtransfers/README.md -docs/sdks/journalentries/README.md -docs/sdks/journals/README.md -docs/sdks/codatlendingaccountingbankdata/README.md -docs/sdks/accounts/README.md -docs/sdks/banking/README.md -docs/sdks/accountbalances/README.md -docs/sdks/codatlendingaccounts/README.md -docs/sdks/transactioncategories/README.md -docs/sdks/codatlendingbankingtransactions/README.md -docs/sdks/categorizedstatement/README.md -docs/sdks/accountspayable/README.md -docs/sdks/bills/README.md -docs/sdks/suppliers/README.md -docs/sdks/billcreditnotes/README.md -docs/sdks/billpayments/README.md -docs/sdks/sales/README.md -docs/sdks/codatlendingcustomers/README.md -docs/sdks/disputes/README.md -docs/sdks/locations/README.md -docs/sdks/orders/README.md -docs/sdks/paymentmethods/README.md -docs/sdks/codatlendingsalespayments/README.md -docs/sdks/productcategories/README.md -docs/sdks/products/README.md -docs/sdks/codatlendingtransactions/README.md -docs/sdks/metrics/README.md -docs/sdks/codatlendingreports/README.md -docs/sdks/companyinfo/README.md -docs/sdks/accountsreceivable/README.md -docs/sdks/customers/README.md -docs/sdks/directincomes/README.md -docs/sdks/invoices/README.md -docs/sdks/creditnotes/README.md -docs/sdks/payments/README.md -docs/sdks/reports/README.md -docs/sdks/fileupload/README.md -docs/sdks/loanwriteback/README.md -docs/sdks/bankaccounts/README.md -docs/sdks/banktransactions/README.md -docs/sdks/codatlendingloanwritebackaccounts/README.md -docs/sdks/directcosts/README.md -docs/sdks/codatlendingpayments/README.md -docs/sdks/codatlendingsuppliers/README.md -docs/sdks/transfers/README.md -docs/sdks/createoperations/README.md -docs/sdks/financialstatements/README.md -docs/sdks/codatlendingfinancialstatementsaccounts/README.md -docs/sdks/balancesheet/README.md -docs/sdks/cashflow/README.md -docs/sdks/profitandloss/README.md -docs/sdks/managedata/README.md -docs/sdks/refresh/README.md -docs/sdks/pulloperations/README.md -docs/sdks/liabilities/README.md -docs/sdks/dataintegrity/README.md -docs/sdks/excelreports/README.md -USAGE.md -.gitattributes \ No newline at end of file diff --git a/lending/jsr.json b/lending/jsr.json deleted file mode 100644 index 4c4fb917e..000000000 --- a/lending/jsr.json +++ /dev/null @@ -1,27 +0,0 @@ - - -{ - "name": "@codat/lending", - "version": "7.6.0", - "exports": { - ".": "./src/index.ts", - "./sdk/models/errors": "./src/sdk/models/errors/index.ts", - "./sdk/models/shared": "./src/sdk/models/shared/index.ts", - "./sdk/models/operations": "./src/sdk/models/operations/index.ts", - "./lib/config": "./src/lib/config.ts", - "./lib/http": "./src/lib/http.ts", - "./lib/retries": "./src/lib/retries.ts", - "./lib/sdks": "./src/lib/sdks.ts", - "./types": "./src/sdk/types/index.ts" - }, - "publish": { - "include": [ - "LICENSE", - "README.md", - "RUNTIMES.md", - "USAGE.md", - "jsr.json", - "src/**/*.ts" - ] - } -} diff --git a/lending/package.json b/lending/package.json index ca2baf1a9..e3eccf0de 100644 --- a/lending/package.json +++ b/lending/package.json @@ -1,31 +1,63 @@ { "name": "@codat/lending", - "version": "7.6.0", + "version": "7.6.1", "author": "Codat", - "main": "./index.js", - "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/codatio/client-sdk-typescript.git", "directory": "lending" }, + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "lint": "eslint --cache --max-warnings=0 src", - "build": "tsc", - "prepublishOnly": "npm run build" - }, - "peerDependencies": { - + "build": "tsc && tsc -p tsconfig.esm.json", + "prepare": "npm run build" }, "devDependencies": { - "@eslint/js": "^9.26.0", - "eslint": "^9.26.0", - "globals": "^15.14.0", - "typescript": "~5.8.3", - "typescript-eslint": "^8.26.0" + "typescript": "^4.0 || ^5.0" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./sdk/models/shared": { + "types": "./dist/sdk/models/shared/index.d.ts", + "default": "./dist/sdk/models/shared/index.js" + }, + "./sdk/models/operations": { + "types": "./dist/sdk/models/operations/index.d.ts", + "default": "./dist/sdk/models/operations/index.js" + }, + "./sdk/models/webhooks": { + "types": "./dist/sdk/models/webhooks/index.d.ts", + "default": "./dist/sdk/models/webhooks/index.js" + }, + "./sdk/models/errors": { + "types": "./dist/sdk/models/errors/index.d.ts", + "default": "./dist/sdk/models/errors/index.js" + }, + "./sdk/types": { + "types": "./dist/sdk/types/index.d.ts", + "default": "./dist/sdk/types/index.js" + }, + "./core.js": { + "types": "./dist/core.d.ts", + "default": "./dist/core.js" + }, + "./lib/http": { + "types": "./dist/lib/sdkconfig.d.ts", + "default": "./dist/lib/sdkconfig.js" + }, + "./funcs/*.js": { + "types": "./dist/funcs/*.d.ts", + "default": "./dist/funcs/*.js" + }, + "./package.json": "./package.json" }, "dependencies": { - "decimal.js": "^10.4.3", - "zod": "^3.25.0 || ^4.0.0" + "decimal.js": "^10.4.3" } } diff --git a/lending/src/apis/AccountBalances.ts b/lending/src/apis/AccountBalances.ts new file mode 100644 index 000000000..07a780428 --- /dev/null +++ b/lending/src/apis/AccountBalances.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + BankingAccountBalances, + ErrorMessage, +} from '../sdk/models/index'; +import { + BankingAccountBalancesFromJSON, + BankingAccountBalancesToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface ListBankingAccountBalancesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class AccountBalances extends runtime.BaseAPI { + + /** + * The *List account balances* endpoint returns a list of [account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) for a given company\'s connection. [Account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) are balances for a bank account, including end-of-day batch balance or running balances per transaction. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List account balances + */ + private async listBankingAccountBalancesRaw(requestParameters: ListBankingAccountBalancesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listBankingAccountBalances().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listBankingAccountBalances().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/banking-accountBalances`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-banking-account-balances', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankingAccountBalancesFromJSON(jsonValue)); + } + + /** + * The *List account balances* endpoint returns a list of [account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) for a given company\'s connection. [Account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) are balances for a bank account, including end-of-day batch balance or running balances per transaction. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List account balances + */ + async list(requestParameters: ListBankingAccountBalancesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listBankingAccountBalancesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/AccountTransactions.ts b/lending/src/apis/AccountTransactions.ts new file mode 100644 index 000000000..672be6a09 --- /dev/null +++ b/lending/src/apis/AccountTransactions.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingAccountTransaction, + AccountingAccountTransactions, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAccountTransactionFromJSON, + AccountingAccountTransactionToJSON, + AccountingAccountTransactionsFromJSON, + AccountingAccountTransactionsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingAccountTransactionRequest { + companyId: string; + connectionId: string; + accountTransactionId: string; +} + +export interface ListAccountingAccountTransactionsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class AccountTransactions extends runtime.BaseAPI { + + /** + * The *Get account transaction* endpoint returns a single account transaction for a given accountTransactionId. [Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). + * Get account transaction + */ + private async getAccountingAccountTransactionRaw(requestParameters: GetAccountingAccountTransactionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingAccountTransaction().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingAccountTransaction().' + ); + } + + if (requestParameters['accountTransactionId'] == null) { + throw new runtime.RequiredError( + 'accountTransactionId', + 'Required parameter "accountTransactionId" was null or undefined when calling getAccountingAccountTransaction().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/accountTransactions/{accountTransactionId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"accountTransactionId"}}`, encodeURIComponent(String(requestParameters['accountTransactionId']))), + method: 'GET', + operationId: 'get-accounting-account-transaction', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAccountTransactionFromJSON(jsonValue)); + } + + /** + * The *Get account transaction* endpoint returns a single account transaction for a given accountTransactionId. [Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). + * Get account transaction + */ + async get(requestParameters: GetAccountingAccountTransactionRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingAccountTransactionRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) for a given company\'s connection. [Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). + * List account transactions + */ + private async listAccountingAccountTransactionsRaw(requestParameters: ListAccountingAccountTransactionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingAccountTransactions().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingAccountTransactions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/accountTransactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-accounting-account-transactions', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAccountTransactionsFromJSON(jsonValue)); + } + + /** + * The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) for a given company\'s connection. [Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). + * List account transactions + */ + async list(requestParameters: ListAccountingAccountTransactionsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingAccountTransactionsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/AccountingBankData.ts b/lending/src/apis/AccountingBankData.ts new file mode 100644 index 000000000..5db3c6fa6 --- /dev/null +++ b/lending/src/apis/AccountingBankData.ts @@ -0,0 +1,128 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import { CodatLendingAccounts } from './Accounts'; +import type { + AccountingBankTransactions, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingBankTransactionsFromJSON, + AccountingBankTransactionsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface ListAccountingBankAccountTransactionsRequest { + companyId: string; + connectionId: string; + accountId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class AccountingBankData extends runtime.BaseAPI { + // CODAT_GROUP_CHILDREN: AccountingBankData + private _accounts?: CodatLendingAccounts; + get accounts(): CodatLendingAccounts { + if (!this._accounts) { this._accounts = new CodatLendingAccounts(this.configuration); } + return this._accounts; + } + + + /** + * The *List account bank transactions* endpoint returns a list of [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company\'s connection. [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB\'s bank account. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List bank account transactions + */ + private async listAccountingBankAccountTransactionsRaw(requestParameters: ListAccountingBankAccountTransactionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingBankAccountTransactions().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingBankAccountTransactions().' + ); + } + + if (requestParameters['accountId'] == null) { + throw new runtime.RequiredError( + 'accountId', + 'Required parameter "accountId" was null or undefined when calling listAccountingBankAccountTransactions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}/bankTransactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))), + method: 'GET', + operationId: 'list-accounting-bank-account-transactions', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBankTransactionsFromJSON(jsonValue)); + } + + /** + * The *List account bank transactions* endpoint returns a list of [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company\'s connection. [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB\'s bank account. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List bank account transactions + */ + async listTransactions(requestParameters: ListAccountingBankAccountTransactionsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingBankAccountTransactionsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Accounts.ts b/lending/src/apis/Accounts.ts new file mode 100644 index 000000000..500f55695 --- /dev/null +++ b/lending/src/apis/Accounts.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingBankAccount, + AccountingBankAccounts, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingBankAccountFromJSON, + AccountingBankAccountToJSON, + AccountingBankAccountsFromJSON, + AccountingBankAccountsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingBankAccountRequest { + companyId: string; + connectionId: string; + accountId: string; +} + +export interface ListAccountingBankAccountsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class CodatLendingAccounts extends runtime.BaseAPI { + + /** + * The *Get bank account* endpoint returns a single account for a given accountId. [Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get bank account + */ + private async getAccountingBankAccountRaw(requestParameters: GetAccountingBankAccountRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingBankAccount().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingBankAccount().' + ); + } + + if (requestParameters['accountId'] == null) { + throw new runtime.RequiredError( + 'accountId', + 'Required parameter "accountId" was null or undefined when calling getAccountingBankAccount().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))), + method: 'GET', + operationId: 'get-accounting-bank-account', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBankAccountFromJSON(jsonValue)); + } + + /** + * The *Get bank account* endpoint returns a single account for a given accountId. [Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get bank account + */ + async get(requestParameters: GetAccountingBankAccountRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingBankAccountRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company\'s connection. [Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List bank accounts + */ + private async listAccountingBankAccountsRaw(requestParameters: ListAccountingBankAccountsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingBankAccounts().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingBankAccounts().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/bankAccounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-accounting-bank-accounts', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBankAccountsFromJSON(jsonValue)); + } + + /** + * The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company\'s connection. [Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List bank accounts + */ + async list(requestParameters: ListAccountingBankAccountsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingBankAccountsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/BalanceSheet.ts b/lending/src/apis/BalanceSheet.ts new file mode 100644 index 000000000..cb8febac3 --- /dev/null +++ b/lending/src/apis/BalanceSheet.ts @@ -0,0 +1,172 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingBalanceSheet, + EnhancedFinancialReport, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingBalanceSheetFromJSON, + AccountingBalanceSheetToJSON, + EnhancedFinancialReportFromJSON, + EnhancedFinancialReportToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingBalanceSheetRequest { + companyId: string; + periodLength: number; + periodsToCompare: number; + startMonth?: string; +} + +export interface GetCategorizedBalanceSheetStatementRequest { + companyId: string; + reportDate: string; + numberOfPeriods?: number; +} + +/** + * + */ +export class BalanceSheet extends runtime.BaseAPI { + + /** + * Gets the latest balance sheet for a company. + * Get balance sheet + */ + private async getAccountingBalanceSheetRaw(requestParameters: GetAccountingBalanceSheetRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingBalanceSheet().' + ); + } + + if (requestParameters['periodLength'] == null) { + throw new runtime.RequiredError( + 'periodLength', + 'Required parameter "periodLength" was null or undefined when calling getAccountingBalanceSheet().' + ); + } + + if (requestParameters['periodsToCompare'] == null) { + throw new runtime.RequiredError( + 'periodsToCompare', + 'Required parameter "periodsToCompare" was null or undefined when calling getAccountingBalanceSheet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['periodLength'] != null) { + queryParameters['periodLength'] = requestParameters['periodLength']; + } + + if (requestParameters['periodsToCompare'] != null) { + queryParameters['periodsToCompare'] = requestParameters['periodsToCompare']; + } + + if (requestParameters['startMonth'] != null) { + queryParameters['startMonth'] = requestParameters['startMonth']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/financials/balanceSheet`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-accounting-balance-sheet', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBalanceSheetFromJSON(jsonValue)); + } + + /** + * Gets the latest balance sheet for a company. + * Get balance sheet + */ + async get(requestParameters: GetAccountingBalanceSheetRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingBalanceSheetRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get categorized balance sheet statement* endpoint returns a list of categorized accounts that appear on a company’s Balance Sheet along with a balance per financial statement date. Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. + * Get categorized balance sheet statement + */ + private async getCategorizedBalanceSheetStatementRaw(requestParameters: GetCategorizedBalanceSheetStatementRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCategorizedBalanceSheetStatement().' + ); + } + + if (requestParameters['reportDate'] == null) { + throw new runtime.RequiredError( + 'reportDate', + 'Required parameter "reportDate" was null or undefined when calling getCategorizedBalanceSheetStatement().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = requestParameters['reportDate']; + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/enhancedBalanceSheet/accounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-categorized-balance-sheet-statement', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnhancedFinancialReportFromJSON(jsonValue)); + } + + /** + * The *Get categorized balance sheet statement* endpoint returns a list of categorized accounts that appear on a company’s Balance Sheet along with a balance per financial statement date. Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. + * Get categorized balance sheet statement + */ + async getCategorizedAccounts(requestParameters: GetCategorizedBalanceSheetStatementRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCategorizedBalanceSheetStatementRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/BankAccounts.ts b/lending/src/apis/BankAccounts.ts new file mode 100644 index 000000000..e1448bbe8 --- /dev/null +++ b/lending/src/apis/BankAccounts.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingBankAccount, + AccountingCreateBankAccountResponse, + ErrorMessage, + PushOption, +} from '../sdk/models/index'; +import { + AccountingBankAccountFromJSON, + AccountingBankAccountToJSON, + AccountingCreateBankAccountResponseFromJSON, + AccountingCreateBankAccountResponseToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + PushOptionFromJSON, + PushOptionToJSON, +} from '../sdk/models/index'; + +export interface CreateBankAccountRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingBankAccount?: AccountingBankAccount; +} + +export interface GetCreateUpdateBankAccountsModelRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class BankAccounts extends runtime.BaseAPI { + + /** + * The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company\'s connection. [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/lending-api#/operations/get-create-update-bankAccounts-model). + * Create bank account + */ + private async createBankAccountRaw(requestParameters: CreateBankAccountRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createBankAccount().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createBankAccount().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeoutInMinutes'] != null) { + queryParameters['timeoutInMinutes'] = requestParameters['timeoutInMinutes']; + } + + if (requestParameters['allowSyncOnPushComplete'] != null) { + queryParameters['allowSyncOnPushComplete'] = requestParameters['allowSyncOnPushComplete']; + } + else { + queryParameters['allowSyncOnPushComplete'] = true; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/push/bankAccounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'create-bank-account', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: AccountingBankAccountToJSON(requestParameters['accountingBankAccount']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreateBankAccountResponseFromJSON(jsonValue)); + } + + /** + * The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company\'s connection. [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/lending-api#/operations/get-create-update-bankAccounts-model). + * Create bank account + */ + async create(requestParameters: CreateBankAccountRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createBankAccountRaw(requestParameters, options); + return await response.value(); + } + + /** + * 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/lending-api#/schemas/BankAccount) for a given company and integration. [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create/update bank account model + */ + private async getCreateUpdateBankAccountsModelRaw(requestParameters: GetCreateUpdateBankAccountsModelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCreateUpdateBankAccountsModel().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCreateUpdateBankAccountsModel().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/options/bankAccounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-create-update-bankAccounts-model', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOptionFromJSON(jsonValue)); + } + + /** + * 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/lending-api#/schemas/BankAccount) for a given company and integration. [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create/update bank account model + */ + async getCreateUpdateModel(requestParameters: GetCreateUpdateBankAccountsModelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCreateUpdateBankAccountsModelRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/BankStatements.ts b/lending/src/apis/BankStatements.ts new file mode 100644 index 000000000..adba25771 --- /dev/null +++ b/lending/src/apis/BankStatements.ts @@ -0,0 +1,601 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { Path } from '../sdk/models/index'; +import type { + BankStatementUploadConfiguration, + CategorizedBankStatementAccounts, + CategorizedBankStatementTransactions, + EndUploadSessionRequest, + ErrorMessage, + GetReportStatusReportIdParameter, + PullOperation, + StartUploadSessionRequest, + UploadBankStatementDataRequestBody, +} from '../sdk/models/index'; +import { + BankStatementUploadConfigurationFromJSON, + BankStatementUploadConfigurationToJSON, + CategorizedBankStatementAccountsFromJSON, + CategorizedBankStatementAccountsToJSON, + CategorizedBankStatementTransactionsFromJSON, + CategorizedBankStatementTransactionsToJSON, + EndUploadSessionRequestFromJSON, + EndUploadSessionRequestToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + GetReportStatusReportIdParameterFromJSON, + GetReportStatusReportIdParameterToJSON, + PullOperationFromJSON, + PullOperationToJSON, + StartUploadSessionRequestFromJSON, + StartUploadSessionRequestToJSON, + UploadBankStatementDataRequestBodyFromJSON, + UploadBankStatementDataRequestBodyToJSON, +} from '../sdk/models/index'; + +export interface DownloadCategorizedBankStatementExcelRequest { + companyId: string; + reportId: any; + maxAge?: string; +} + +export interface EndBankStatementUploadSessionRequest { + companyId: string; + connectionId: string; + datasetId: string; + endUploadSessionRequest?: EndUploadSessionRequest; +} + +export interface GetBankStatementUploadConfigurationRequest { + companyId: string; + connectionId: string; +} + +export interface GetCategorizedBankStatementTransactionsRequest { + companyId: string; + reportId: any; + maxAge?: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +export interface ListCategorizedBankStatementAccountsRequest { + companyId: string; + reportId: any; + maxAge?: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +export interface SetBankStatementUploadConfigurationRequest { + companyId: string; + connectionId: string; + bankStatementUploadConfiguration?: BankStatementUploadConfiguration; +} + +export interface StartBankStatementUploadSessionRequest { + companyId: string; + connectionId: string; + startUploadSessionRequest?: StartUploadSessionRequest; +} + +export interface UploadBankStatementDataRequest { + companyId: string; + connectionId: string; + datasetId: string; + requestBody?: UploadBankStatementDataRequestBody; + path?: Path; +} + +/** + * + */ +export class BankStatements extends runtime.BaseAPI { + + /** + * Use the *Download categorized bank statement Excel* endpoint to download the categorized bank statement Excel file. Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + * Download categorized bank statement Excel + */ + private async downloadCategorizedBankStatementExcelRaw(requestParameters: DownloadCategorizedBankStatementExcelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadCategorizedBankStatementExcel().' + ); + } + + if (requestParameters['reportId'] == null) { + throw new runtime.RequiredError( + 'reportId', + 'Required parameter "reportId" was null or undefined when calling downloadCategorizedBankStatementExcel().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['maxAge'] != null) { + queryParameters['maxAge'] = requestParameters['maxAge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/categorizedBankStatement/{reportId}/excel`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"reportId"}}`, encodeURIComponent(String(requestParameters['reportId']))), + method: 'GET', + operationId: 'download-categorized-bank-statement-excel', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Use the *Download categorized bank statement Excel* endpoint to download the categorized bank statement Excel file. Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + * Download categorized bank statement Excel + */ + async downloadCategorizedBankStatementExcel(requestParameters: DownloadCategorizedBankStatementExcelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.downloadCategorizedBankStatementExcelRaw(requestParameters, options); + return new Uint8Array(await response.raw.arrayBuffer()); + } + + /** + * Use the *End upload session* endpoint to finalize a bank statement upload session. Include a `status` in the request body to indicate if you want to cancel the processing of the dataset or trigger the ingestion and enrichment of the data. A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. + * End upload session + */ + private async endBankStatementUploadSessionRaw(requestParameters: EndBankStatementUploadSessionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling endBankStatementUploadSession().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling endBankStatementUploadSession().' + ); + } + + if (requestParameters['datasetId'] == null) { + throw new runtime.RequiredError( + 'datasetId', + 'Required parameter "datasetId" was null or undefined when calling endBankStatementUploadSession().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/bankStatements/upload/dataset/{datasetId}/endSession`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"datasetId"}}`, encodeURIComponent(String(requestParameters['datasetId']))), + method: 'POST', + operationId: 'end-bank-statement-upload-session', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: EndUploadSessionRequestToJSON(requestParameters['endUploadSessionRequest']), + }, options); + + return new runtime.VoidApiResponse(response); + } + + /** + * Use the *End upload session* endpoint to finalize a bank statement upload session. Include a `status` in the request body to indicate if you want to cancel the processing of the dataset or trigger the ingestion and enrichment of the data. A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. + * End upload session + */ + async endUploadSession(requestParameters: EndBankStatementUploadSessionRequest, options?: runtime.RequestOptions): Promise { + await this.endBankStatementUploadSessionRaw(requestParameters, options); + } + + /** + * Use the *Get upload configuration* endpoint to view the existing bank statement upload configuration for the specified data connection. With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. When you use the [*Upload data*](https://docs.codat.io/lending-api#/operations/upload-bank-statement-data) endpoint next, you must upload the data for the account you configured. + * Get upload configuration + */ + private async getBankStatementUploadConfigurationRaw(requestParameters: GetBankStatementUploadConfigurationRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getBankStatementUploadConfiguration().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getBankStatementUploadConfiguration().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/bankStatements/upload/configuration`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-bank-statement-upload-configuration', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankStatementUploadConfigurationFromJSON(jsonValue)); + } + + /** + * Use the *Get upload configuration* endpoint to view the existing bank statement upload configuration for the specified data connection. With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. When you use the [*Upload data*](https://docs.codat.io/lending-api#/operations/upload-bank-statement-data) endpoint next, you must upload the data for the account you configured. + * Get upload configuration + */ + async getUploadConfiguration(requestParameters: GetBankStatementUploadConfigurationRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getBankStatementUploadConfigurationRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get categorized bank statement transactions* endpoint returns fully categorized bank transactions for a company. Transaction data is obtained from the company\'s connected bank accounts. Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + * Get categorized bank statement transactions + */ + private async getCategorizedBankStatementTransactionsRaw(requestParameters: GetCategorizedBankStatementTransactionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCategorizedBankStatementTransactions().' + ); + } + + if (requestParameters['reportId'] == null) { + throw new runtime.RequiredError( + 'reportId', + 'Required parameter "reportId" was null or undefined when calling getCategorizedBankStatementTransactions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['maxAge'] != null) { + queryParameters['maxAge'] = requestParameters['maxAge']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/categorizedBankStatement/{reportId}/transactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"reportId"}}`, encodeURIComponent(String(requestParameters['reportId']))), + method: 'GET', + operationId: 'get-categorized-bank-statement-transactions', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CategorizedBankStatementTransactionsFromJSON(jsonValue)); + } + + /** + * The *Get categorized bank statement transactions* endpoint returns fully categorized bank transactions for a company. Transaction data is obtained from the company\'s connected bank accounts. Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + * Get categorized bank statement transactions + */ + async getCategorizedBankStatementTransactions(requestParameters: GetCategorizedBankStatementTransactionsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCategorizedBankStatementTransactionsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get categorized bank statement accounts* endpoint returns a list of bank accounts associated with categorized transactions for a company. Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + * List categorized bank statement accounts + */ + private async listCategorizedBankStatementAccountsRaw(requestParameters: ListCategorizedBankStatementAccountsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCategorizedBankStatementAccounts().' + ); + } + + if (requestParameters['reportId'] == null) { + throw new runtime.RequiredError( + 'reportId', + 'Required parameter "reportId" was null or undefined when calling listCategorizedBankStatementAccounts().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['maxAge'] != null) { + queryParameters['maxAge'] = requestParameters['maxAge']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/categorizedBankStatement/{reportId}/accounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"reportId"}}`, encodeURIComponent(String(requestParameters['reportId']))), + method: 'GET', + operationId: 'list-categorized-bank-statement-accounts', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CategorizedBankStatementAccountsFromJSON(jsonValue)); + } + + /** + * The *Get categorized bank statement accounts* endpoint returns a list of bank accounts associated with categorized transactions for a company. Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `categorizedBankStatement`. + * List categorized bank statement accounts + */ + async listCategorizedBankStatementAccounts(requestParameters: ListCategorizedBankStatementAccountsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCategorizedBankStatementAccountsRaw(requestParameters, options); + return await response.value(); + } + + /** + * Use the *Set upload configuration* endpoint to create bank statement upload configuration for the specified data connection. With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. Each data connection can only have one configuration for each company and external account ID combination. You will receive a Bad Request response if you try to set it again. + * Set upload configuration + */ + private async setBankStatementUploadConfigurationRaw(requestParameters: SetBankStatementUploadConfigurationRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling setBankStatementUploadConfiguration().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling setBankStatementUploadConfiguration().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/bankStatements/upload/configuration`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'set-bank-statement-upload-configuration', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: BankStatementUploadConfigurationToJSON(requestParameters['bankStatementUploadConfiguration']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankStatementUploadConfigurationFromJSON(jsonValue)); + } + + /** + * Use the *Set upload configuration* endpoint to create bank statement upload configuration for the specified data connection. With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. Each data connection can only have one configuration for each company and external account ID combination. You will receive a Bad Request response if you try to set it again. + * Set upload configuration + */ + async setUploadConfiguration(requestParameters: SetBankStatementUploadConfigurationRequest, options?: runtime.RequestOptions): Promise { + const response = await this.setBankStatementUploadConfigurationRaw(requestParameters, options); + return await response.value(); + } + + /** + * Use the *Start upload session* endpoint to initiate a bank statement upload session for a given company. A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. You can only have one active session per data type at a time. You can complete or cancel a session using the [*End upload session*](https://docs.codat.io/lending-api#/operations/end-bank-statement-upload-session) endpoint. + * Start upload session + */ + private async startBankStatementUploadSessionRaw(requestParameters: StartBankStatementUploadSessionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling startBankStatementUploadSession().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling startBankStatementUploadSession().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/bankStatements/upload/startSession`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'start-bank-statement-upload-session', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: StartUploadSessionRequestToJSON(requestParameters['startUploadSessionRequest']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PullOperationFromJSON(jsonValue)); + } + + /** + * Use the *Start upload session* endpoint to initiate a bank statement upload session for a given company. A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. You can only have one active session per data type at a time. You can complete or cancel a session using the [*End upload session*](https://docs.codat.io/lending-api#/operations/end-bank-statement-upload-session) endpoint. + * Start upload session + */ + async startUploadSession(requestParameters: StartBankStatementUploadSessionRequest, options?: runtime.RequestOptions): Promise { + const response = await this.startBankStatementUploadSessionRaw(requestParameters, options); + return await response.value(); + } + + /** + * During an active session, use the **Upload data* endpoint to uploads a page of bank accounts or bank transactions data to the session. Make sure you created configuration for the account using the [*Set upload configuration*](https://docs.codat.io/lending-api#/operations/set-bank-statement-upload-configuration) endpoint before attempting an upload. + * Upload data + */ + private async uploadBankStatementDataRaw(requestParameters: UploadBankStatementDataRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling uploadBankStatementData().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling uploadBankStatementData().' + ); + } + + if (requestParameters['datasetId'] == null) { + throw new runtime.RequiredError( + 'datasetId', + 'Required parameter "datasetId" was null or undefined when calling uploadBankStatementData().' + ); + } + + if (requestParameters['requestBody'] == null) { + throw new runtime.RequiredError( + 'requestBody', + 'Required parameter "requestBody" was null or undefined when calling uploadBankStatementData().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['path'] != null) { + queryParameters['path'] = requestParameters['path']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/bankStatements/upload/dataset/{datasetId}/upload`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"datasetId"}}`, encodeURIComponent(String(requestParameters['datasetId']))), + method: 'POST', + operationId: 'upload-bank-statement-data', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: UploadBankStatementDataRequestBodyToJSON(requestParameters['requestBody']), + }, options); + + return new runtime.VoidApiResponse(response); + } + + /** + * During an active session, use the **Upload data* endpoint to uploads a page of bank accounts or bank transactions data to the session. Make sure you created configuration for the account using the [*Set upload configuration*](https://docs.codat.io/lending-api#/operations/set-bank-statement-upload-configuration) endpoint before attempting an upload. + * Upload data + */ + async uploadBankStatementData(requestParameters: UploadBankStatementDataRequest, options?: runtime.RequestOptions): Promise { + await this.uploadBankStatementDataRaw(requestParameters, options); + } + +} + +/** + * @export + */ +export const UploadBankStatementDataPathEnum = { + AuthGet: 'auth/get' +} as const; +export type UploadBankStatementDataPathEnum = typeof UploadBankStatementDataPathEnum[keyof typeof UploadBankStatementDataPathEnum]; diff --git a/lending/src/apis/BankTransactions.ts b/lending/src/apis/BankTransactions.ts new file mode 100644 index 000000000..710fa0c4c --- /dev/null +++ b/lending/src/apis/BankTransactions.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingCreateBankTransactions, + AccountingCreateBankTransactionsResponse, + ErrorMessage, + PushOption, +} from '../sdk/models/index'; +import { + AccountingCreateBankTransactionsFromJSON, + AccountingCreateBankTransactionsToJSON, + AccountingCreateBankTransactionsResponseFromJSON, + AccountingCreateBankTransactionsResponseToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + PushOptionFromJSON, + PushOptionToJSON, +} from '../sdk/models/index'; + +export interface CreateBankTransactionsRequest { + companyId: string; + connectionId: string; + accountId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingCreateBankTransactions?: AccountingCreateBankTransactions; +} + +export interface GetCreateBankTransactionsModelRequest { + companyId: string; + connectionId: string; + accountId: string; +} + +/** + * + */ +export class BankTransactions extends runtime.BaseAPI { + + /** + * The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company\'s connection. [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB\'s bank account. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/lending-api#/operations/get-create-bankTransactions-model). + * Create bank account transactions + */ + private async createBankTransactionsRaw(requestParameters: CreateBankTransactionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createBankTransactions().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createBankTransactions().' + ); + } + + if (requestParameters['accountId'] == null) { + throw new runtime.RequiredError( + 'accountId', + 'Required parameter "accountId" was null or undefined when calling createBankTransactions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeoutInMinutes'] != null) { + queryParameters['timeoutInMinutes'] = requestParameters['timeoutInMinutes']; + } + + if (requestParameters['allowSyncOnPushComplete'] != null) { + queryParameters['allowSyncOnPushComplete'] = requestParameters['allowSyncOnPushComplete']; + } + else { + queryParameters['allowSyncOnPushComplete'] = true; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))), + method: 'POST', + operationId: 'create-bank-transactions', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: AccountingCreateBankTransactionsToJSON(requestParameters['accountingCreateBankTransactions']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreateBankTransactionsResponseFromJSON(jsonValue)); + } + + /** + * The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company\'s connection. [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB\'s bank account. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/lending-api#/operations/get-create-bankTransactions-model). + * Create bank account transactions + */ + async create(requestParameters: CreateBankTransactionsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createBankTransactionsRaw(requestParameters, options); + return await response.value(); + } + + /** + * 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/lending-api#/schemas/BankTransactions) for a given company and integration. [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB\'s bank account. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create bank account transactions model + */ + private async getCreateBankTransactionsModelRaw(requestParameters: GetCreateBankTransactionsModelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCreateBankTransactionsModel().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCreateBankTransactionsModel().' + ); + } + + if (requestParameters['accountId'] == null) { + throw new runtime.RequiredError( + 'accountId', + 'Required parameter "accountId" was null or undefined when calling getCreateBankTransactionsModel().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))), + method: 'GET', + operationId: 'get-create-bank-transactions-model', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOptionFromJSON(jsonValue)); + } + + /** + * 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/lending-api#/schemas/BankTransactions) for a given company and integration. [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB\'s bank account. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create bank account transactions model + */ + async getCreateModel(requestParameters: GetCreateBankTransactionsModelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCreateBankTransactionsModelRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/BankingAccounts.ts b/lending/src/apis/BankingAccounts.ts new file mode 100644 index 000000000..093150869 --- /dev/null +++ b/lending/src/apis/BankingAccounts.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + BankingAccount, + BankingAccounts, + ErrorMessage, +} from '../sdk/models/index'; +import { + BankingAccountFromJSON, + BankingAccountToJSON, + BankingAccountsFromJSON, + BankingAccountsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetBankingAccountRequest { + companyId: string; + connectionId: string; + accountId: string; +} + +export interface ListBankingAccountsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class CodatLendingBankingAccounts extends runtime.BaseAPI { + + /** + * The *Get account* endpoint returns a single account for a given accountId. [Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). + * Get account + */ + private async getBankingAccountRaw(requestParameters: GetBankingAccountRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getBankingAccount().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getBankingAccount().' + ); + } + + if (requestParameters['accountId'] == null) { + throw new runtime.RequiredError( + 'accountId', + 'Required parameter "accountId" was null or undefined when calling getBankingAccount().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/banking-accounts/{accountId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))), + method: 'GET', + operationId: 'get-banking-account', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankingAccountFromJSON(jsonValue)); + } + + /** + * The *Get account* endpoint returns a single account for a given accountId. [Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). + * Get account + */ + async get(requestParameters: GetBankingAccountRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getBankingAccountRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company\'s connection. [Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). + * List accounts + */ + private async listBankingAccountsRaw(requestParameters: ListBankingAccountsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listBankingAccounts().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listBankingAccounts().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/banking-accounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-banking-accounts', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankingAccountsFromJSON(jsonValue)); + } + + /** + * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company\'s connection. [Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). + * List accounts + */ + async list(requestParameters: ListBankingAccountsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listBankingAccountsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/BillCreditNotes.ts b/lending/src/apis/BillCreditNotes.ts new file mode 100644 index 000000000..86e1de4bf --- /dev/null +++ b/lending/src/apis/BillCreditNotes.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingBillCreditNote, + AccountingBillCreditNotes, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingBillCreditNoteFromJSON, + AccountingBillCreditNoteToJSON, + AccountingBillCreditNotesFromJSON, + AccountingBillCreditNotesToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingBillCreditNoteRequest { + companyId: string; + billCreditNoteId: string; +} + +export interface ListAccountingBillCreditNotesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class BillCreditNotes extends runtime.BaseAPI { + + /** + * The *Get bill credit note* endpoint returns a single bill credit note for a given billCreditNoteId. [Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get bill credit note + */ + private async getAccountingBillCreditNoteRaw(requestParameters: GetAccountingBillCreditNoteRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingBillCreditNote().' + ); + } + + if (requestParameters['billCreditNoteId'] == null) { + throw new runtime.RequiredError( + 'billCreditNoteId', + 'Required parameter "billCreditNoteId" was null or undefined when calling getAccountingBillCreditNote().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/billCreditNotes/{billCreditNoteId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"billCreditNoteId"}}`, encodeURIComponent(String(requestParameters['billCreditNoteId']))), + method: 'GET', + operationId: 'get-accounting-bill-credit-note', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBillCreditNoteFromJSON(jsonValue)); + } + + /** + * The *Get bill credit note* endpoint returns a single bill credit note for a given billCreditNoteId. [Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get bill credit note + */ + async get(requestParameters: GetAccountingBillCreditNoteRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingBillCreditNoteRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote) for a given company\'s connection. [Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List bill credit notes + */ + private async listAccountingBillCreditNotesRaw(requestParameters: ListAccountingBillCreditNotesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingBillCreditNotes().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/billCreditNotes`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-bill-credit-notes', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBillCreditNotesFromJSON(jsonValue)); + } + + /** + * The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote) for a given company\'s connection. [Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List bill credit notes + */ + async list(requestParameters: ListAccountingBillCreditNotesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingBillCreditNotesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/BillPayments.ts b/lending/src/apis/BillPayments.ts new file mode 100644 index 000000000..90e919f4a --- /dev/null +++ b/lending/src/apis/BillPayments.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingBillPayment, + AccountingBillPayments, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingBillPaymentFromJSON, + AccountingBillPaymentToJSON, + AccountingBillPaymentsFromJSON, + AccountingBillPaymentsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingBillPaymentRequest { + companyId: string; + billPaymentId: string; +} + +export interface ListAccountingBillPaymentsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class BillPayments extends runtime.BaseAPI { + + /** + * The *Get bill payment* endpoint returns a single bill payment for a given billPaymentId. [Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get bill payment + */ + private async getAccountingBillPaymentRaw(requestParameters: GetAccountingBillPaymentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingBillPayment().' + ); + } + + if (requestParameters['billPaymentId'] == null) { + throw new runtime.RequiredError( + 'billPaymentId', + 'Required parameter "billPaymentId" was null or undefined when calling getAccountingBillPayment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/billPayments/{billPaymentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"billPaymentId"}}`, encodeURIComponent(String(requestParameters['billPaymentId']))), + method: 'GET', + operationId: 'get-accounting-bill-payment', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBillPaymentFromJSON(jsonValue)); + } + + /** + * The *Get bill payment* endpoint returns a single bill payment for a given billPaymentId. [Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get bill payment + */ + async get(requestParameters: GetAccountingBillPaymentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingBillPaymentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment) for a given company\'s connection. [Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List bill payments + */ + private async listAccountingBillPaymentsRaw(requestParameters: ListAccountingBillPaymentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingBillPayments().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/billPayments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-bill-payments', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBillPaymentsFromJSON(jsonValue)); + } + + /** + * The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment) for a given company\'s connection. [Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List bill payments + */ + async list(requestParameters: ListAccountingBillPaymentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingBillPaymentsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Bills.ts b/lending/src/apis/Bills.ts new file mode 100644 index 000000000..b3602484f --- /dev/null +++ b/lending/src/apis/Bills.ts @@ -0,0 +1,366 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingAttachment, + AccountingBill, + AccountingBills, + Attachments, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAttachmentFromJSON, + AccountingAttachmentToJSON, + AccountingBillFromJSON, + AccountingBillToJSON, + AccountingBillsFromJSON, + AccountingBillsToJSON, + AttachmentsFromJSON, + AttachmentsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface DownloadAccountingBillAttachmentRequest { + companyId: string; + connectionId: string; + billId: string; + attachmentId: string; +} + +export interface GetAccountingBillRequest { + companyId: string; + billId: string; +} + +export interface GetAccountingBillAttachmentRequest { + companyId: string; + connectionId: string; + billId: string; + attachmentId: string; +} + +export interface ListAccountingBillAttachmentsRequest { + companyId: string; + connectionId: string; + billId: string; +} + +export interface ListAccountingBillsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Bills extends runtime.BaseAPI { + + /** + * The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB\'s financial obligations to their supplier for a purchase of goods or services. + * Download bill attachment + */ + private async downloadAccountingBillAttachmentRaw(requestParameters: DownloadAccountingBillAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadAccountingBillAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling downloadAccountingBillAttachment().' + ); + } + + if (requestParameters['billId'] == null) { + throw new runtime.RequiredError( + 'billId', + 'Required parameter "billId" was null or undefined when calling downloadAccountingBillAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling downloadAccountingBillAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}/download`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"billId"}}`, encodeURIComponent(String(requestParameters['billId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'download-accounting-bill-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.BlobApiResponse(response); + } + + /** + * The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB\'s financial obligations to their supplier for a purchase of goods or services. + * Download bill attachment + */ + async downloadAttachment(requestParameters: DownloadAccountingBillAttachmentRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.downloadAccountingBillAttachmentRaw(requestParameters, options); + return response.raw.body as ReadableStream; + } + + /** + * The *Get bill* endpoint returns a single bill for a given billId. [Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). ### Tips and traps To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat\'s cache. + * Get bill + */ + private async getAccountingBillRaw(requestParameters: GetAccountingBillRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingBill().' + ); + } + + if (requestParameters['billId'] == null) { + throw new runtime.RequiredError( + 'billId', + 'Required parameter "billId" was null or undefined when calling getAccountingBill().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/bills/{billId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"billId"}}`, encodeURIComponent(String(requestParameters['billId']))), + method: 'GET', + operationId: 'get-accounting-bill', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBillFromJSON(jsonValue)); + } + + /** + * The *Get bill* endpoint returns a single bill for a given billId. [Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). ### Tips and traps To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat\'s cache. + * Get bill + */ + async get(requestParameters: GetAccountingBillRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingBillRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB\'s financial obligations to their supplier for a purchase of goods or services. + * Get bill attachment + */ + private async getAccountingBillAttachmentRaw(requestParameters: GetAccountingBillAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingBillAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingBillAttachment().' + ); + } + + if (requestParameters['billId'] == null) { + throw new runtime.RequiredError( + 'billId', + 'Required parameter "billId" was null or undefined when calling getAccountingBillAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling getAccountingBillAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"billId"}}`, encodeURIComponent(String(requestParameters['billId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'get-accounting-bill-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAttachmentFromJSON(jsonValue)); + } + + /** + * The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB\'s financial obligations to their supplier for a purchase of goods or services. + * Get bill attachment + */ + async getAttachment(requestParameters: GetAccountingBillAttachmentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingBillAttachmentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB\'s financial obligations to their supplier for a purchase of goods or services. + * List bill attachments + */ + private async listAccountingBillAttachmentsRaw(requestParameters: ListAccountingBillAttachmentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingBillAttachments().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingBillAttachments().' + ); + } + + if (requestParameters['billId'] == null) { + throw new runtime.RequiredError( + 'billId', + 'Required parameter "billId" was null or undefined when calling listAccountingBillAttachments().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"billId"}}`, encodeURIComponent(String(requestParameters['billId']))), + method: 'GET', + operationId: 'list-accounting-bill-attachments', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentsFromJSON(jsonValue)); + } + + /** + * The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB\'s financial obligations to their supplier for a purchase of goods or services. + * List bill attachments + */ + async listAttachments(requestParameters: ListAccountingBillAttachmentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingBillAttachmentsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List bills* endpoint returns a list of [bills](https://docs.codat.io/lending-api#/schemas/Bill) for a given company\'s connection. [Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). ### Tips and traps To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat\'s cache. + * List bills + */ + private async listAccountingBillsRaw(requestParameters: ListAccountingBillsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingBills().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/bills`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-bills', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingBillsFromJSON(jsonValue)); + } + + /** + * The *List bills* endpoint returns a list of [bills](https://docs.codat.io/lending-api#/schemas/Bill) for a given company\'s connection. [Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). ### Tips and traps To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat\'s cache. + * List bills + */ + async list(requestParameters: ListAccountingBillsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingBillsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/CashFlow.ts b/lending/src/apis/CashFlow.ts new file mode 100644 index 000000000..0f350b100 --- /dev/null +++ b/lending/src/apis/CashFlow.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingCashFlowStatement, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingCashFlowStatementFromJSON, + AccountingCashFlowStatementToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingCashFlowStatementRequest { + companyId: string; + periodLength: number; + periodsToCompare: number; + startMonth?: string; +} + +/** + * + */ +export class CashFlow extends runtime.BaseAPI { + + /** + * Gets the latest cash flow statement for a company. + * Get cash flow statement + */ + private async getAccountingCashFlowStatementRaw(requestParameters: GetAccountingCashFlowStatementRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingCashFlowStatement().' + ); + } + + if (requestParameters['periodLength'] == null) { + throw new runtime.RequiredError( + 'periodLength', + 'Required parameter "periodLength" was null or undefined when calling getAccountingCashFlowStatement().' + ); + } + + if (requestParameters['periodsToCompare'] == null) { + throw new runtime.RequiredError( + 'periodsToCompare', + 'Required parameter "periodsToCompare" was null or undefined when calling getAccountingCashFlowStatement().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['periodLength'] != null) { + queryParameters['periodLength'] = requestParameters['periodLength']; + } + + if (requestParameters['periodsToCompare'] != null) { + queryParameters['periodsToCompare'] = requestParameters['periodsToCompare']; + } + + if (requestParameters['startMonth'] != null) { + queryParameters['startMonth'] = requestParameters['startMonth']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/financials/cashFlowStatement`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-accounting-cash-flow-statement', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCashFlowStatementFromJSON(jsonValue)); + } + + /** + * Gets the latest cash flow statement for a company. + * Get cash flow statement + */ + async get(requestParameters: GetAccountingCashFlowStatementRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingCashFlowStatementRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/CategorizedStatement.ts b/lending/src/apis/CategorizedStatement.ts new file mode 100644 index 000000000..75fdda1a2 --- /dev/null +++ b/lending/src/apis/CategorizedStatement.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + EnhancedCashFlowTransactions, + ErrorMessage, +} from '../sdk/models/index'; +import { + EnhancedCashFlowTransactionsFromJSON, + EnhancedCashFlowTransactionsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCategorizedBankStatementRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; +} + +/** + * + */ +export class CategorizedStatement extends runtime.BaseAPI { + + /** + * > **Categorization engine** > > The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. The _Get categorized bank statement_ endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company\'s banking data sources. + * Get categorized bank statement + */ + private async getCategorizedBankStatementRaw(requestParameters: GetCategorizedBankStatementRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCategorizedBankStatement().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/enhancedCashFlow/transactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-categorized-bank-statement', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnhancedCashFlowTransactionsFromJSON(jsonValue)); + } + + /** + * > **Categorization engine** > > The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. The _Get categorized bank statement_ endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company\'s banking data sources. + * Get categorized bank statement + */ + async get(requestParameters: GetCategorizedBankStatementRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCategorizedBankStatementRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Companies.ts b/lending/src/apis/Companies.ts new file mode 100644 index 000000000..61bf6ffee --- /dev/null +++ b/lending/src/apis/Companies.ts @@ -0,0 +1,338 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type * as shared from '../sdk/models/index'; +import type { + Company, + CompanyRequestBody, + CompanyUpdateRequest, + ErrorMessage, +} from '../sdk/models/index'; +import { + CompaniesFromJSON, + CompaniesToJSON, + CompanyFromJSON, + CompanyToJSON, + CompanyRequestBodyFromJSON, + CompanyRequestBodyToJSON, + CompanyUpdateRequestFromJSON, + CompanyUpdateRequestToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface CreateCompanyRequest { + companyRequestBody?: CompanyRequestBody; +} + +export interface DeleteCompanyRequest { + companyId: string; +} + +export interface GetCompanyRequest { + companyId: string; +} + +export interface ListCompaniesRequest { + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; + tags?: string; +} + +export interface ReplaceCompanyRequest { + companyId: string; + companyRequestBody?: CompanyRequestBody; +} + +export interface UpdateCompanyRequest { + companyId: string; + companyUpdateRequest?: CompanyUpdateRequest; +} + +/** + * + */ +export class Companies extends runtime.BaseAPI { + + /** + * Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. + * Create company + */ + private async createCompanyRaw(requestParameters: CreateCompanyRequest, options?: runtime.RequestOptions): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies`, + method: 'POST', + operationId: 'create-company', + errorStatuses: [400, 401, 402, 403, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: CompanyRequestBodyToJSON(requestParameters['companyRequestBody']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CompanyFromJSON(jsonValue)); + } + + /** + * Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. + * Create company + */ + async create(companyRequestBody?: CompanyRequestBody, options?: runtime.RequestOptions): Promise { + const response = await this.createCompanyRaw({ companyRequestBody: companyRequestBody }, options); + return await response.value(); + } + + /** + * The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/lending-api#/schemas/Company), its [connections](https://docs.codat.io/lending-api#/schemas/Connection) and any cached data. This operation is irreversible. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + * Delete a company + */ + private async deleteCompanyRaw(requestParameters: DeleteCompanyRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling deleteCompany().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'DELETE', + operationId: 'delete-company', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.VoidApiResponse(response); + } + + /** + * The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/lending-api#/schemas/Company), its [connections](https://docs.codat.io/lending-api#/schemas/Connection) and any cached data. This operation is irreversible. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + * Delete a company + */ + async delete(requestParameters: DeleteCompanyRequest, options?: runtime.RequestOptions): Promise { + await this.deleteCompanyRaw(requestParameters, options); + } + + /** + * The *Get company* endpoint returns a single company for a given `companyId`. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + * Get company + */ + private async getCompanyRaw(requestParameters: GetCompanyRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCompany().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-company', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CompanyFromJSON(jsonValue)); + } + + /** + * The *Get company* endpoint returns a single company for a given `companyId`. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + * Get company + */ + async get(requestParameters: GetCompanyRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCompanyRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List companies* endpoint returns a list of [companies](https://docs.codat.io/lending-api#/schemas/Company) associated to your instances. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. ## Filter by tags The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): - equals (`=`) - not equals (`!=`) - contains (`~`) For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: - Foreign key: `uid = {yourCustomerId}` - Region: `region != uk` - Owning team and region: `region = uk && owningTeam = invoice-finance` + * List companies + */ + private async listCompaniesRaw(requestParameters: ListCompaniesRequest, options?: runtime.RequestOptions): Promise> { + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + if (requestParameters['tags'] != null) { + queryParameters['tags'] = requestParameters['tags']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies`, + method: 'GET', + operationId: 'list-companies', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CompaniesFromJSON(jsonValue)); + } + + /** + * The *List companies* endpoint returns a list of [companies](https://docs.codat.io/lending-api#/schemas/Company) associated to your instances. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. ## Filter by tags The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): - equals (`=`) - not equals (`!=`) - contains (`~`) For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: - Foreign key: `uid = {yourCustomerId}` - Region: `region != uk` - Owning team and region: `region = uk && owningTeam = invoice-finance` + * List companies + */ + async list(requestParameters: ListCompaniesRequest = {}, options?: runtime.RequestOptions): Promise { + const response = await this.listCompaniesRaw(requestParameters, options); + return await response.value(); + } + + /** + * Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven\'t been defined in the payload. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + * Replace company + */ + private async replaceCompanyRaw(requestParameters: ReplaceCompanyRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling replaceCompany().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'PUT', + operationId: 'replace-company', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: CompanyRequestBodyToJSON(requestParameters['companyRequestBody']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CompanyFromJSON(jsonValue)); + } + + /** + * Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven\'t been defined in the payload. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + * Replace company + */ + async replace(requestParameters: ReplaceCompanyRequest, options?: runtime.RequestOptions): Promise { + const response = await this.replaceCompanyRaw(requestParameters, options); + return await response.value(); + } + + /** + * Use the *Update company* endpoint to update the name, description, or tags of the company. The *Update company* endpoint doesn\'t have any required fields. If any of the fields provided are `null` or not provided, they won\'t be included in the update. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. + * Update company + */ + private async updateCompanyRaw(requestParameters: UpdateCompanyRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling updateCompany().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'PATCH', + operationId: 'update-company', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: CompanyUpdateRequestToJSON(requestParameters['companyUpdateRequest']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CompanyFromJSON(jsonValue)); + } + + /** + * Use the *Update company* endpoint to update the name, description, or tags of the company. The *Update company* endpoint doesn\'t have any required fields. If any of the fields provided are `null` or not provided, they won\'t be included in the update. A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. + * Update company + */ + async update(requestParameters: UpdateCompanyRequest, options?: runtime.RequestOptions): Promise { + const response = await this.updateCompanyRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/CompanyInfo.ts b/lending/src/apis/CompanyInfo.ts new file mode 100644 index 000000000..bd80e5d26 --- /dev/null +++ b/lending/src/apis/CompanyInfo.ts @@ -0,0 +1,134 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingCompanyInfo, + CommerceCompanyInfo, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingCompanyInfoFromJSON, + AccountingCompanyInfoToJSON, + CommerceCompanyInfoFromJSON, + CommerceCompanyInfoToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingProfileRequest { + companyId: string; +} + +export interface GetCommerceProfileRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class CompanyInfo extends runtime.BaseAPI { + + /** + * Gets the latest basic info for a company. + * Get company accounting profile + */ + private async getAccountingProfileRaw(requestParameters: GetAccountingProfileRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingProfile().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/info`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-accounting-profile', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCompanyInfoFromJSON(jsonValue)); + } + + /** + * Gets the latest basic info for a company. + * Get company accounting profile + */ + async getAccountingProfile(requestParameters: GetAccountingProfileRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingProfileRaw(requestParameters, options); + return await response.value(); + } + + /** + * Retrieve information about the company, as seen in the commerce platform. This may include information like addresses, tax registration details and social media or website information.\" + * Get company commerce profile + */ + private async getCommerceProfileRaw(requestParameters: GetCommerceProfileRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceProfile().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceProfile().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-info`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-commerce-profile', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceCompanyInfoFromJSON(jsonValue)); + } + + /** + * Retrieve information about the company, as seen in the commerce platform. This may include information like addresses, tax registration details and social media or website information.\" + * Get company commerce profile + */ + async getCommerceProfile(requestParameters: GetCommerceProfileRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceProfileRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Connections.ts b/lending/src/apis/Connections.ts new file mode 100644 index 000000000..6b43e3283 --- /dev/null +++ b/lending/src/apis/Connections.ts @@ -0,0 +1,324 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type * as shared from '../sdk/models/index'; +import type { + Connection, + CreateConnectionRequestBody, + ErrorMessage, + UpdateConnection, +} from '../sdk/models/index'; +import { + ConnectionFromJSON, + ConnectionToJSON, + ConnectionsFromJSON, + ConnectionsToJSON, + CreateConnectionRequestBodyFromJSON, + CreateConnectionRequestBodyToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + UpdateConnectionFromJSON, + UpdateConnectionToJSON, +} from '../sdk/models/index'; + +export interface CreateConnectionRequest { + companyId: string; + requestBody?: CreateConnectionRequestBody; +} + +export interface DeleteConnectionRequest { + companyId: string; + connectionId: string; +} + +export interface GetConnectionRequest { + companyId: string; + connectionId: string; +} + +export interface ListConnectionsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +export interface UnlinkConnectionRequest { + companyId: string; + connectionId: string; + requestBody?: UpdateConnection; +} + +/** + * + */ +export class Connections extends runtime.BaseAPI { + + /** + * Creates a connection for the company by providing a valid `platformKey`. Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. + * Create connection + */ + private async createConnectionRaw(requestParameters: CreateConnectionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createConnection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'POST', + operationId: 'create-connection', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: CreateConnectionRequestBodyToJSON(requestParameters['requestBody']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + } + + /** + * Creates a connection for the company by providing a valid `platformKey`. Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. + * Create connection + */ + async create(requestParameters: CreateConnectionRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createConnectionRaw(requestParameters, options); + return await response.value(); + } + + /** + * Revoke and remove a connection from a company. This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. + * Delete connection + */ + private async deleteConnectionRaw(requestParameters: DeleteConnectionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling deleteConnection().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling deleteConnection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'DELETE', + operationId: 'delete-connection', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.VoidApiResponse(response); + } + + /** + * Revoke and remove a connection from a company. This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. + * Delete connection + */ + async delete(requestParameters: DeleteConnectionRequest, options?: runtime.RequestOptions): Promise { + await this.deleteConnectionRaw(requestParameters, options); + } + + /** + * Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. + * Get connection + */ + private async getConnectionRaw(requestParameters: GetConnectionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getConnection().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getConnection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-connection', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + } + + /** + * Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. + * Get connection + */ + async get(requestParameters: GetConnectionRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getConnectionRaw(requestParameters, options); + return await response.value(); + } + + /** + * List the connections for a company. + * List connections + */ + private async listConnectionsRaw(requestParameters: ListConnectionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listConnections().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-connections', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionsFromJSON(jsonValue)); + } + + /** + * List the connections for a company. + * List connections + */ + async list(requestParameters: ListConnectionsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listConnectionsRaw(requestParameters, options); + return await response.value(); + } + + /** + * This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. + * Unlink connection + */ + private async unlinkConnectionRaw(requestParameters: UnlinkConnectionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling unlinkConnection().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling unlinkConnection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'PATCH', + operationId: 'unlink-connection', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: UpdateConnectionToJSON(requestParameters['requestBody']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + } + + /** + * This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. + * Unlink connection + */ + async unlink(requestParameters: UnlinkConnectionRequest, options?: runtime.RequestOptions): Promise { + const response = await this.unlinkConnectionRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/CreateOperations.ts b/lending/src/apis/CreateOperations.ts new file mode 100644 index 000000000..cd2b0c56b --- /dev/null +++ b/lending/src/apis/CreateOperations.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorMessage, + PushOperation, + PushOperations, +} from '../sdk/models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, + PushOperationFromJSON, + PushOperationToJSON, + PushOperationsFromJSON, + PushOperationsToJSON, +} from '../sdk/models/index'; + +export interface GetCreateOperationRequest { + companyId: string; + pushOperationKey: string; +} + +export interface ListCreateOperationsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class CreateOperations extends runtime.BaseAPI { + + /** + * Retrieve create operation. + * Get create operation + */ + private async getCreateOperationRaw(requestParameters: GetCreateOperationRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCreateOperation().' + ); + } + + if (requestParameters['pushOperationKey'] == null) { + throw new runtime.RequiredError( + 'pushOperationKey', + 'Required parameter "pushOperationKey" was null or undefined when calling getCreateOperation().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/push/{pushOperationKey}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"pushOperationKey"}}`, encodeURIComponent(String(requestParameters['pushOperationKey']))), + method: 'GET', + operationId: 'get-create-operation', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOperationFromJSON(jsonValue)); + } + + /** + * Retrieve create operation. + * Get create operation + */ + async get(requestParameters: GetCreateOperationRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCreateOperationRaw(requestParameters, options); + return await response.value(); + } + + /** + * List create operations. + * List create operations + */ + private async listCreateOperationsRaw(requestParameters: ListCreateOperationsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCreateOperations().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/push`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-create-operations', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOperationsFromJSON(jsonValue)); + } + + /** + * List create operations. + * List create operations + */ + async list(requestParameters: ListCreateOperationsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCreateOperationsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/CreditNotes.ts b/lending/src/apis/CreditNotes.ts new file mode 100644 index 000000000..720df2200 --- /dev/null +++ b/lending/src/apis/CreditNotes.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingCreditNote, + AccountingCreditNotes, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingCreditNoteFromJSON, + AccountingCreditNoteToJSON, + AccountingCreditNotesFromJSON, + AccountingCreditNotesToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingCreditNoteRequest { + companyId: string; + creditNoteId: string; +} + +export interface ListAccountingCreditNotesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class CreditNotes extends runtime.BaseAPI { + + /** + * The *Get credit note* endpoint returns a single credit note for a given creditNoteId. [Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get credit note + */ + private async getAccountingCreditNoteRaw(requestParameters: GetAccountingCreditNoteRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingCreditNote().' + ); + } + + if (requestParameters['creditNoteId'] == null) { + throw new runtime.RequiredError( + 'creditNoteId', + 'Required parameter "creditNoteId" was null or undefined when calling getAccountingCreditNote().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/creditNotes/{creditNoteId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"creditNoteId"}}`, encodeURIComponent(String(requestParameters['creditNoteId']))), + method: 'GET', + operationId: 'get-accounting-credit-note', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreditNoteFromJSON(jsonValue)); + } + + /** + * The *Get credit note* endpoint returns a single credit note for a given creditNoteId. [Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get credit note + */ + async get(requestParameters: GetAccountingCreditNoteRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingCreditNoteRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List credit notes* endpoint returns a list of [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote) for a given company\'s connection. [Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List credit notes + */ + private async listAccountingCreditNotesRaw(requestParameters: ListAccountingCreditNotesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingCreditNotes().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/creditNotes`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-credit-notes', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreditNotesFromJSON(jsonValue)); + } + + /** + * The *List credit notes* endpoint returns a list of [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote) for a given company\'s connection. [Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List credit notes + */ + async list(requestParameters: ListAccountingCreditNotesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingCreditNotesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Customers.ts b/lending/src/apis/Customers.ts new file mode 100644 index 000000000..93200a68b --- /dev/null +++ b/lending/src/apis/Customers.ts @@ -0,0 +1,366 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingAttachment, + AccountingCustomer, + AccountingCustomers, + Attachments, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAttachmentFromJSON, + AccountingAttachmentToJSON, + AccountingCustomerFromJSON, + AccountingCustomerToJSON, + AccountingCustomersFromJSON, + AccountingCustomersToJSON, + AttachmentsFromJSON, + AttachmentsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface DownloadAccountingCustomerAttachmentRequest { + companyId: string; + connectionId: string; + customerId: string; + attachmentId: string; +} + +export interface GetAccountingCustomerRequest { + companyId: string; + customerId: string; +} + +export interface GetAccountingCustomerAttachmentRequest { + companyId: string; + connectionId: string; + customerId: string; + attachmentId: string; +} + +export interface ListAccountingCustomerAttachmentsRequest { + companyId: string; + connectionId: string; + customerId: string; +} + +export interface ListAccountingCustomersRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Customers extends runtime.BaseAPI { + + /** + * The *Download customer attachment* endpoint downloads a specific attachment for a given `customerId` and `attachmentId`. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + * Download customer attachment + */ + private async downloadAccountingCustomerAttachmentRaw(requestParameters: DownloadAccountingCustomerAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadAccountingCustomerAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling downloadAccountingCustomerAttachment().' + ); + } + + if (requestParameters['customerId'] == null) { + throw new runtime.RequiredError( + 'customerId', + 'Required parameter "customerId" was null or undefined when calling downloadAccountingCustomerAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling downloadAccountingCustomerAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments/{attachmentId}/download`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"customerId"}}`, encodeURIComponent(String(requestParameters['customerId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'download-accounting-customer-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.BlobApiResponse(response); + } + + /** + * The *Download customer attachment* endpoint downloads a specific attachment for a given `customerId` and `attachmentId`. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + * Download customer attachment + */ + async downloadAttachment(requestParameters: DownloadAccountingCustomerAttachmentRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.downloadAccountingCustomerAttachmentRaw(requestParameters, options); + return response.raw.body as ReadableStream; + } + + /** + * The *Get customer* endpoint returns a single customer for a given customerId. [Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get customer + */ + private async getAccountingCustomerRaw(requestParameters: GetAccountingCustomerRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingCustomer().' + ); + } + + if (requestParameters['customerId'] == null) { + throw new runtime.RequiredError( + 'customerId', + 'Required parameter "customerId" was null or undefined when calling getAccountingCustomer().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/customers/{customerId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"customerId"}}`, encodeURIComponent(String(requestParameters['customerId']))), + method: 'GET', + operationId: 'get-accounting-customer', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCustomerFromJSON(jsonValue)); + } + + /** + * The *Get customer* endpoint returns a single customer for a given customerId. [Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get customer + */ + async get(requestParameters: GetAccountingCustomerRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingCustomerRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get customer attachment* endpoint returns a specific attachment for a given `customerId` and `attachmentId`. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + * Get customer attachment + */ + private async getAccountingCustomerAttachmentRaw(requestParameters: GetAccountingCustomerAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingCustomerAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingCustomerAttachment().' + ); + } + + if (requestParameters['customerId'] == null) { + throw new runtime.RequiredError( + 'customerId', + 'Required parameter "customerId" was null or undefined when calling getAccountingCustomerAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling getAccountingCustomerAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments/{attachmentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"customerId"}}`, encodeURIComponent(String(requestParameters['customerId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'get-accounting-customer-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAttachmentFromJSON(jsonValue)); + } + + /** + * The *Get customer attachment* endpoint returns a specific attachment for a given `customerId` and `attachmentId`. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + * Get customer attachment + */ + async getAttachment(requestParameters: GetAccountingCustomerAttachmentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingCustomerAttachmentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List customer attachments* endpoint returns a list of attachments avialable to download for given `customerId`. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + * List customer attachments + */ + private async listAccountingCustomerAttachmentsRaw(requestParameters: ListAccountingCustomerAttachmentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingCustomerAttachments().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingCustomerAttachments().' + ); + } + + if (requestParameters['customerId'] == null) { + throw new runtime.RequiredError( + 'customerId', + 'Required parameter "customerId" was null or undefined when calling listAccountingCustomerAttachments().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"customerId"}}`, encodeURIComponent(String(requestParameters['customerId']))), + method: 'GET', + operationId: 'list-accounting-customer-attachments', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentsFromJSON(jsonValue)); + } + + /** + * The *List customer attachments* endpoint returns a list of attachments avialable to download for given `customerId`. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + * List customer attachments + */ + async listAttachments(requestParameters: ListAccountingCustomerAttachmentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingCustomerAttachmentsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company\'s connection. [Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List customers + */ + private async listAccountingCustomersRaw(requestParameters: ListAccountingCustomersRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingCustomers().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/customers`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-customers', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCustomersFromJSON(jsonValue)); + } + + /** + * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company\'s connection. [Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List customers + */ + async list(requestParameters: ListAccountingCustomersRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingCustomersRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/DataIntegrity.ts b/lending/src/apis/DataIntegrity.ts new file mode 100644 index 000000000..997937271 --- /dev/null +++ b/lending/src/apis/DataIntegrity.ts @@ -0,0 +1,263 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { BankingAccounts } from '../sdk/models/index'; +import type { BankingTransactions } from '../sdk/models/index'; +import * as runtime from '../runtime'; +import type { DataIntegrityDataType } from '../sdk/models/index'; +import type { + DataIntegrityDetails, + DataIntegrityStatuses, + DataIntegritySummaries, + ErrorMessage, +} from '../sdk/models/index'; +import { + DataIntegrityDetailsFromJSON, + DataIntegrityDetailsToJSON, + DataIntegrityStatusesFromJSON, + DataIntegrityStatusesToJSON, + DataIntegritySummariesFromJSON, + DataIntegritySummariesToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetDataIntegrityStatusRequest { + companyId: string; + dataType: DataIntegrityDataType; +} + +export interface GetDataIntegritySummariesRequest { + companyId: string; + dataType: DataIntegrityDataType; + query?: string; +} + +export interface ListDataIntegrityDetailsRequest { + companyId: string; + dataType: DataIntegrityDataType; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class DataIntegrity extends runtime.BaseAPI { + + /** + * The *Get data integrity status* endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/DataIntegrityStatus) for the company’s match results between the data type provided in the URL and other data types that Data Integrity uses to support matching. This endpoint helps you understand whether match data is available and, if so, how to usefully query it. The response tells you: - Whether match results are available. - When the results were generated, and their status. - The connection IDs, amounts, and dates involved to support useful querying. + * Get data integrity status + */ + private async getDataIntegrityStatusRaw(requestParameters: GetDataIntegrityStatusRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getDataIntegrityStatus().' + ); + } + + if (requestParameters['dataType'] == null) { + throw new runtime.RequiredError( + 'dataType', + 'Required parameter "dataType" was null or undefined when calling getDataIntegrityStatus().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/status`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"dataType"}}`, encodeURIComponent(String(requestParameters['dataType']))), + method: 'GET', + operationId: 'get-data-integrity-status', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => DataIntegrityStatusesFromJSON(jsonValue)); + } + + /** + * The *Get data integrity status* endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/DataIntegrityStatus) for the company’s match results between the data type provided in the URL and other data types that Data Integrity uses to support matching. This endpoint helps you understand whether match data is available and, if so, how to usefully query it. The response tells you: - Whether match results are available. - When the results were generated, and their status. - The connection IDs, amounts, and dates involved to support useful querying. + * Get data integrity status + */ + async status(requestParameters: GetDataIntegrityStatusRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getDataIntegrityStatusRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get data integrity summary* endpoint returns a [summary](https://docs.codat.io/lending-api#/schemas/DataIntegritySummary) of match results for a given data type filtered by a query string in the [Codat query language](https://docs.codat.io/using-the-api/querying). For example, if you wanted to see summary match results only for transactions after 1 December 2020, you could include a query parameter of `query=date>2020-12-01`. The endpoint response includes only the summary results, not transactions. To view match data for transactions, use the [List data integrity details](https://docs.codat.io/lending-api#/operations/get-data-integrity-summaries) endpoint. + * Get data integrity summaries + */ + private async getDataIntegritySummariesRaw(requestParameters: GetDataIntegritySummariesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getDataIntegritySummaries().' + ); + } + + if (requestParameters['dataType'] == null) { + throw new runtime.RequiredError( + 'dataType', + 'Required parameter "dataType" was null or undefined when calling getDataIntegritySummaries().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/summaries`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"dataType"}}`, encodeURIComponent(String(requestParameters['dataType']))), + method: 'GET', + operationId: 'get-data-integrity-summaries', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => DataIntegritySummariesFromJSON(jsonValue)); + } + + /** + * The *Get data integrity summary* endpoint returns a [summary](https://docs.codat.io/lending-api#/schemas/DataIntegritySummary) of match results for a given data type filtered by a query string in the [Codat query language](https://docs.codat.io/using-the-api/querying). For example, if you wanted to see summary match results only for transactions after 1 December 2020, you could include a query parameter of `query=date>2020-12-01`. The endpoint response includes only the summary results, not transactions. To view match data for transactions, use the [List data integrity details](https://docs.codat.io/lending-api#/operations/get-data-integrity-summaries) endpoint. + * Get data integrity summaries + */ + async summaries(requestParameters: GetDataIntegritySummariesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getDataIntegritySummariesRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List data integrity details* endpoint returns the match result record by record for a given data type, filtered based on a query string in the same way as summary results. The [details](https://docs.codat.io/lending-api#/schemas/DataIntegrityDetail) are paginated and support ordering, following the same conventions as our other data endpoints. + * List data integrity details + */ + private async listDataIntegrityDetailsRaw(requestParameters: ListDataIntegrityDetailsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listDataIntegrityDetails().' + ); + } + + if (requestParameters['dataType'] == null) { + throw new runtime.RequiredError( + 'dataType', + 'Required parameter "dataType" was null or undefined when calling listDataIntegrityDetails().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/details`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"dataType"}}`, encodeURIComponent(String(requestParameters['dataType']))), + method: 'GET', + operationId: 'list-data-integrity-details', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => DataIntegrityDetailsFromJSON(jsonValue)); + } + + /** + * The *List data integrity details* endpoint returns the match result record by record for a given data type, filtered based on a query string in the same way as summary results. The [details](https://docs.codat.io/lending-api#/schemas/DataIntegrityDetail) are paginated and support ordering, following the same conventions as our other data endpoints. + * List data integrity details + */ + async details(requestParameters: ListDataIntegrityDetailsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listDataIntegrityDetailsRaw(requestParameters, options); + return await response.value(); + } + +} + +/** + * @export + */ +export const GetDataIntegrityStatusDataTypeEnum = { + BankingAccounts: 'banking-accounts', + BankingTransactions: 'banking-transactions', + BankAccounts: 'bankAccounts', + AccountTransactions: 'accountTransactions' +} as const; +export type GetDataIntegrityStatusDataTypeEnum = typeof GetDataIntegrityStatusDataTypeEnum[keyof typeof GetDataIntegrityStatusDataTypeEnum]; +/** + * @export + */ +export const GetDataIntegritySummariesDataTypeEnum = { + BankingAccounts: 'banking-accounts', + BankingTransactions: 'banking-transactions', + BankAccounts: 'bankAccounts', + AccountTransactions: 'accountTransactions' +} as const; +export type GetDataIntegritySummariesDataTypeEnum = typeof GetDataIntegritySummariesDataTypeEnum[keyof typeof GetDataIntegritySummariesDataTypeEnum]; +/** + * @export + */ +export const ListDataIntegrityDetailsDataTypeEnum = { + BankingAccounts: 'banking-accounts', + BankingTransactions: 'banking-transactions', + BankAccounts: 'bankAccounts', + AccountTransactions: 'accountTransactions' +} as const; +export type ListDataIntegrityDetailsDataTypeEnum = typeof ListDataIntegrityDetailsDataTypeEnum[keyof typeof ListDataIntegrityDetailsDataTypeEnum]; diff --git a/lending/src/apis/DirectCosts.ts b/lending/src/apis/DirectCosts.ts new file mode 100644 index 000000000..dbb149b03 --- /dev/null +++ b/lending/src/apis/DirectCosts.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingCreateDirectCostResponse, + DirectCostPrototype, + ErrorMessage, + PushOption, +} from '../sdk/models/index'; +import { + AccountingCreateDirectCostResponseFromJSON, + AccountingCreateDirectCostResponseToJSON, + DirectCostPrototypeFromJSON, + DirectCostPrototypeToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + PushOptionFromJSON, + PushOptionToJSON, +} from '../sdk/models/index'; + +export interface CreateDirectCostRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + directCostPrototype?: DirectCostPrototype; +} + +export interface GetCreateDirectCostsModelRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class CodatLendingDirectCosts extends runtime.BaseAPI { + + /** + * The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company\'s connection. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/lending-api#/operations/get-create-directCosts-model). + * Create direct cost + */ + private async createDirectCostRaw(requestParameters: CreateDirectCostRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createDirectCost().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createDirectCost().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeoutInMinutes'] != null) { + queryParameters['timeoutInMinutes'] = requestParameters['timeoutInMinutes']; + } + + if (requestParameters['allowSyncOnPushComplete'] != null) { + queryParameters['allowSyncOnPushComplete'] = requestParameters['allowSyncOnPushComplete']; + } + else { + queryParameters['allowSyncOnPushComplete'] = true; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/push/directCosts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'create-direct-cost', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: DirectCostPrototypeToJSON(requestParameters['directCostPrototype']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreateDirectCostResponseFromJSON(jsonValue)); + } + + /** + * The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company\'s connection. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/lending-api#/operations/get-create-directCosts-model). + * Create direct cost + */ + async create(requestParameters: CreateDirectCostRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createDirectCostRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company and integration. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create direct cost model + */ + private async getCreateDirectCostsModelRaw(requestParameters: GetCreateDirectCostsModelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCreateDirectCostsModel().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCreateDirectCostsModel().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/options/directCosts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-create-directCosts-model', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOptionFromJSON(jsonValue)); + } + + /** + * The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company and integration. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create direct cost model + */ + async getCreateModel(requestParameters: GetCreateDirectCostsModelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCreateDirectCostsModelRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/DirectIncomes.ts b/lending/src/apis/DirectIncomes.ts new file mode 100644 index 000000000..22e521f25 --- /dev/null +++ b/lending/src/apis/DirectIncomes.ts @@ -0,0 +1,387 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingAttachment, + AccountingDirectIncome, + AccountingDirectIncomes, + Attachments, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAttachmentFromJSON, + AccountingAttachmentToJSON, + AccountingDirectIncomeFromJSON, + AccountingDirectIncomeToJSON, + AccountingDirectIncomesFromJSON, + AccountingDirectIncomesToJSON, + AttachmentsFromJSON, + AttachmentsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface DownloadAccountingDirectIncomeAttachmentRequest { + companyId: string; + connectionId: string; + directIncomeId: string; + attachmentId: string; +} + +export interface GetAccountingDirectIncomeRequest { + companyId: string; + connectionId: string; + directIncomeId: string; +} + +export interface GetAccountingDirectIncomeAttachmentRequest { + companyId: string; + connectionId: string; + directIncomeId: string; + attachmentId: string; + timeoutInMinutes?: number; +} + +export interface ListAccountingDirectIncomeAttachmentsRequest { + companyId: string; + connectionId: string; + directIncomeId: string; +} + +export interface ListAccountingDirectIncomesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class DirectIncomes extends runtime.BaseAPI { + + /** + * The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. + * Download direct income attachment + */ + private async downloadAccountingDirectIncomeAttachmentRaw(requestParameters: DownloadAccountingDirectIncomeAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadAccountingDirectIncomeAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling downloadAccountingDirectIncomeAttachment().' + ); + } + + if (requestParameters['directIncomeId'] == null) { + throw new runtime.RequiredError( + 'directIncomeId', + 'Required parameter "directIncomeId" was null or undefined when calling downloadAccountingDirectIncomeAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling downloadAccountingDirectIncomeAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}/download`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"directIncomeId"}}`, encodeURIComponent(String(requestParameters['directIncomeId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'download-accounting-direct-income-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.BlobApiResponse(response); + } + + /** + * The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. + * Download direct income attachment + */ + async downloadAttachment(requestParameters: DownloadAccountingDirectIncomeAttachmentRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.downloadAccountingDirectIncomeAttachmentRaw(requestParameters, options); + return response.raw.body as ReadableStream; + } + + /** + * The *Get direct income* endpoint returns a single direct income for a given directIncomeId. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get direct income + */ + private async getAccountingDirectIncomeRaw(requestParameters: GetAccountingDirectIncomeRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingDirectIncome().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingDirectIncome().' + ); + } + + if (requestParameters['directIncomeId'] == null) { + throw new runtime.RequiredError( + 'directIncomeId', + 'Required parameter "directIncomeId" was null or undefined when calling getAccountingDirectIncome().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"directIncomeId"}}`, encodeURIComponent(String(requestParameters['directIncomeId']))), + method: 'GET', + operationId: 'get-accounting-direct-income', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingDirectIncomeFromJSON(jsonValue)); + } + + /** + * The *Get direct income* endpoint returns a single direct income for a given directIncomeId. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get direct income + */ + async get(requestParameters: GetAccountingDirectIncomeRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingDirectIncomeRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. + * Get direct income attachment + */ + private async getAccountingDirectIncomeAttachmentRaw(requestParameters: GetAccountingDirectIncomeAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingDirectIncomeAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingDirectIncomeAttachment().' + ); + } + + if (requestParameters['directIncomeId'] == null) { + throw new runtime.RequiredError( + 'directIncomeId', + 'Required parameter "directIncomeId" was null or undefined when calling getAccountingDirectIncomeAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling getAccountingDirectIncomeAttachment().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeoutInMinutes'] != null) { + queryParameters['timeoutInMinutes'] = requestParameters['timeoutInMinutes']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"directIncomeId"}}`, encodeURIComponent(String(requestParameters['directIncomeId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'get-accounting-direct-income-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAttachmentFromJSON(jsonValue)); + } + + /** + * The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. + * Get direct income attachment + */ + async getAttachment(requestParameters: GetAccountingDirectIncomeAttachmentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingDirectIncomeAttachmentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. + * List direct income attachments + */ + private async listAccountingDirectIncomeAttachmentsRaw(requestParameters: ListAccountingDirectIncomeAttachmentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingDirectIncomeAttachments().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingDirectIncomeAttachments().' + ); + } + + if (requestParameters['directIncomeId'] == null) { + throw new runtime.RequiredError( + 'directIncomeId', + 'Required parameter "directIncomeId" was null or undefined when calling listAccountingDirectIncomeAttachments().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"directIncomeId"}}`, encodeURIComponent(String(requestParameters['directIncomeId']))), + method: 'GET', + operationId: 'list-accounting-direct-income-attachments', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentsFromJSON(jsonValue)); + } + + /** + * The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. + * List direct income attachments + */ + async listAttachments(requestParameters: ListAccountingDirectIncomeAttachmentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingDirectIncomeAttachmentsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) for a given company\'s connection. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List direct incomes + */ + private async listAccountingDirectIncomesRaw(requestParameters: ListAccountingDirectIncomesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingDirectIncomes().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingDirectIncomes().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directIncomes`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-accounting-direct-incomes', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingDirectIncomesFromJSON(jsonValue)); + } + + /** + * The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) for a given company\'s connection. [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business\' operations at the point of the sale. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List direct incomes + */ + async list(requestParameters: ListAccountingDirectIncomesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingDirectIncomesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Disputes.ts b/lending/src/apis/Disputes.ts new file mode 100644 index 000000000..f7c4ef8f1 --- /dev/null +++ b/lending/src/apis/Disputes.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommerceDispute, + CommerceDisputes, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceDisputeFromJSON, + CommerceDisputeToJSON, + CommerceDisputesFromJSON, + CommerceDisputesToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceDisputeRequest { + companyId: string; + connectionId: string; + disputeId: string; +} + +export interface ListCommerceDisputesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Disputes extends runtime.BaseAPI { + + /** + * The *Get dispute* endpoint returns a single dispute for a given disputeId. [Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get dispute + */ + private async getCommerceDisputeRaw(requestParameters: GetCommerceDisputeRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceDispute().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceDispute().' + ); + } + + if (requestParameters['disputeId'] == null) { + throw new runtime.RequiredError( + 'disputeId', + 'Required parameter "disputeId" was null or undefined when calling getCommerceDispute().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-disputes/{disputeId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"disputeId"}}`, encodeURIComponent(String(requestParameters['disputeId']))), + method: 'GET', + operationId: 'get-commerce-dispute', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceDisputeFromJSON(jsonValue)); + } + + /** + * The *Get dispute* endpoint returns a single dispute for a given disputeId. [Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get dispute + */ + async get(requestParameters: GetCommerceDisputeRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceDisputeRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List disputes* endpoint returns a list of [disputes](https://docs.codat.io/lending-api#/schemas/Dispute) for a given company\'s connection. [Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List disputes + */ + private async listCommerceDisputesRaw(requestParameters: ListCommerceDisputesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommerceDisputes().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommerceDisputes().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-disputes`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-disputes', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceDisputesFromJSON(jsonValue)); + } + + /** + * The *List disputes* endpoint returns a list of [disputes](https://docs.codat.io/lending-api#/schemas/Dispute) for a given company\'s connection. [Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List disputes + */ + async list(requestParameters: ListCommerceDisputesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommerceDisputesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/ExcelReports.ts b/lending/src/apis/ExcelReports.ts new file mode 100644 index 000000000..6aa01c660 --- /dev/null +++ b/lending/src/apis/ExcelReports.ts @@ -0,0 +1,212 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorMessage, + ExcelReportTypes, + ExcelStatus, +} from '../sdk/models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, + ExcelReportTypesFromJSON, + ExcelReportTypesToJSON, + ExcelStatusFromJSON, + ExcelStatusToJSON, +} from '../sdk/models/index'; + +export interface DownloadExcelReportRequest { + companyId: string; + reportType: ExcelReportTypes; +} + +export interface GenerateExcelReportRequest { + companyId: string; + reportType: ExcelReportTypes; +} + +export interface GetExcelReportGenerationStatusRequest { + companyId: string; + reportType: ExcelReportTypes; +} + +/** + * + */ +export class ExcelReports extends runtime.BaseAPI { + + /** + * The *Download Excel report* endpoint downloads the latest successfully generated Excel report of a specified report type for a given company. The downloadable Excel file is returned in the response. You can save it to your local machine. You can [learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. + * Download Excel report + */ + private async downloadExcelReportRaw(requestParameters: DownloadExcelReportRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadExcelReport().' + ); + } + + if (requestParameters['reportType'] == null) { + throw new runtime.RequiredError( + 'reportType', + 'Required parameter "reportType" was null or undefined when calling downloadExcelReport().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportType'] != null) { + queryParameters['reportType'] = requestParameters['reportType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/assess/excel/download`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'download-excel-report', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * The *Download Excel report* endpoint downloads the latest successfully generated Excel report of a specified report type for a given company. The downloadable Excel file is returned in the response. You can save it to your local machine. You can [learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. + * Download Excel report + */ + async download(requestParameters: DownloadExcelReportRequest, options?: runtime.RequestOptions): Promise { + const response = await this.downloadExcelReportRaw(requestParameters, options); + return new Uint8Array(await response.raw.arrayBuffer()); + } + + /** + * The *Generate Excel report* endpoint requests the production of a downloadable Excel file for a report type specified in the `reportType` query parameter. In response, the endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/ExcelStatus) detailing the current state of the report generation request. ### Report types | reportType | Description | |--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| | `audit` | Identifies inaccurate or out-of-date accounts, helping you to make decisions with confidence. || [audit](https://docs.codat.io/lending/excel/audit-report) | Identify inaccurate or out-of-date accounts, helping you to make decisions with confidence. | | `enhancedCashFlow` | Provides a fully categorized list of bank transactions for a company, allowing lenders to accurately forecast a company\'s cash flow. | | `enhancedFinancials` | Supports decision-making using fully categorized financial statements to allow lenders to automate their underwriting processes. | | `enhancedInvoices` | Helps verify that payments have been made against historic invoices. Great for invoice finance lenders. | [Learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. + * Generate Excel report + */ + private async generateExcelReportRaw(requestParameters: GenerateExcelReportRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling generateExcelReport().' + ); + } + + if (requestParameters['reportType'] == null) { + throw new runtime.RequiredError( + 'reportType', + 'Required parameter "reportType" was null or undefined when calling generateExcelReport().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportType'] != null) { + queryParameters['reportType'] = requestParameters['reportType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/assess/excel`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'POST', + operationId: 'generate-excel-report', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExcelStatusFromJSON(jsonValue)); + } + + /** + * The *Generate Excel report* endpoint requests the production of a downloadable Excel file for a report type specified in the `reportType` query parameter. In response, the endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/ExcelStatus) detailing the current state of the report generation request. ### Report types | reportType | Description | |--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| | `audit` | Identifies inaccurate or out-of-date accounts, helping you to make decisions with confidence. || [audit](https://docs.codat.io/lending/excel/audit-report) | Identify inaccurate or out-of-date accounts, helping you to make decisions with confidence. | | `enhancedCashFlow` | Provides a fully categorized list of bank transactions for a company, allowing lenders to accurately forecast a company\'s cash flow. | | `enhancedFinancials` | Supports decision-making using fully categorized financial statements to allow lenders to automate their underwriting processes. | | `enhancedInvoices` | Helps verify that payments have been made against historic invoices. Great for invoice finance lenders. | [Learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. + * Generate Excel report + */ + async generate(requestParameters: GenerateExcelReportRequest, options?: runtime.RequestOptions): Promise { + const response = await this.generateExcelReportRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get Excel report status* returns the status of the report mostly recently requested for Excel generation. It does not return the status of any historical report requests. Poll this endpoint to check the progress of the report once you have requested its generation. This will not affect the generation of the report. When the report generation completes successfully, the `inProgress` property will be marked as `false` and the `success` field will be marked as `true`. + * Get Excel report status + */ + private async getExcelReportGenerationStatusRaw(requestParameters: GetExcelReportGenerationStatusRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getExcelReportGenerationStatus().' + ); + } + + if (requestParameters['reportType'] == null) { + throw new runtime.RequiredError( + 'reportType', + 'Required parameter "reportType" was null or undefined when calling getExcelReportGenerationStatus().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportType'] != null) { + queryParameters['reportType'] = requestParameters['reportType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/assess/excel`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-excel-report-generation-status', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExcelStatusFromJSON(jsonValue)); + } + + /** + * The *Get Excel report status* returns the status of the report mostly recently requested for Excel generation. It does not return the status of any historical report requests. Poll this endpoint to check the progress of the report once you have requested its generation. This will not affect the generation of the report. When the report generation completes successfully, the `inProgress` property will be marked as `false` and the `success` field will be marked as `true`. + * Get Excel report status + */ + async getStatus(requestParameters: GetExcelReportGenerationStatusRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getExcelReportGenerationStatusRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/FileUpload.ts b/lending/src/apis/FileUpload.ts new file mode 100644 index 000000000..2988b2974 --- /dev/null +++ b/lending/src/apis/FileUpload.ts @@ -0,0 +1,229 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { CodatFile } from '../sdk/models/index'; +import * as runtime from '../runtime'; +import type * as shared from '../sdk/models/index'; +import type { + ErrorMessage, +} from '../sdk/models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface DownloadFilesRequest { + companyId: string; + date?: string; +} + +export interface ListFilesRequest { + companyId: string; +} + +export interface UploadFilesRequest { + companyId: string; + connectionId: string; + file?: CodatFile | Blob; +} + +/** + * + */ +export class FileUpload extends runtime.BaseAPI { + + /** + * The *Download files* endpoint downloads all files that have been uploaded by to SMB to Codat. A `date` may be specified to download any files uploaded on the date provided. + * Download all files for a company + */ + private async downloadFilesRaw(requestParameters: DownloadFilesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadFiles().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['date'] != null) { + queryParameters['date'] = requestParameters['date']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/files/download`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'download-files', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.BlobApiResponse(response); + } + + /** + * The *Download files* endpoint downloads all files that have been uploaded by to SMB to Codat. A `date` may be specified to download any files uploaded on the date provided. + * Download all files for a company + */ + async download(requestParameters: DownloadFilesRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.downloadFilesRaw(requestParameters, options); + return response.raw.body as ReadableStream; + } + + /** + * The *List files* endpoint returns a list of all files uploaded to Codat by the SMB. + * List all files uploaded by a company + */ + private async listFilesRaw(requestParameters: ListFilesRequest, options?: runtime.RequestOptions): Promise>> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listFiles().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/files`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-files', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response); + } + + /** + * The *List files* endpoint returns a list of all files uploaded to Codat by the SMB. + * List all files uploaded by a company + */ + async listUploaded(requestParameters: ListFilesRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.listFilesRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Upload files* endpoint uploads multiple files provided by the SMB to Codat. This may include personal identity documents, pitch decks, contracts, or files with accounting and banking data. Uploaded files must meet the following requirements: - Up to 20 files can be uploaded at a time. - PDF, XLS, XLSX, XLSB, CSV, DOC, DOCX, PPT, PPTX, JPEG, JPG, and PNG files can be uploaded. - Each file can be up to 10MB in size. + * Upload files for a company + */ + private async uploadFilesRaw(requestParameters: UploadFilesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling uploadFiles().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling uploadFiles().' + ); + } + + if (requestParameters['file'] == null) { + throw new runtime.RequiredError( + 'file', + 'Required parameter "file" was null or undefined when calling uploadFiles().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any, fileName?: string): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['file'] != null) { + const uploadFile: any = requestParameters['file']; + if (uploadFile && typeof uploadFile === 'object' && 'content' in uploadFile) { + const uploadBlob = new Blob([uploadFile.content], { type: getContentTypeFromFileName(uploadFile.fileName) }); + formParams.append('file', uploadBlob, uploadFile.fileName); + } else { + formParams.append('file', uploadFile as any); + } + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/files`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'upload-files', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: formParams, + }, options); + + return new runtime.VoidApiResponse(response); + } + + /** + * The *Upload files* endpoint uploads multiple files provided by the SMB to Codat. This may include personal identity documents, pitch decks, contracts, or files with accounting and banking data. Uploaded files must meet the following requirements: - Up to 20 files can be uploaded at a time. - PDF, XLS, XLSX, XLSB, CSV, DOC, DOCX, PPT, PPTX, JPEG, JPG, and PNG files can be uploaded. - Each file can be up to 10MB in size. + * Upload files for a company + */ + async upload(requestParameters: UploadFilesRequest, options?: runtime.RequestOptions): Promise { + await this.uploadFilesRaw(requestParameters, options); + } + +} + +function getContentTypeFromFileName(fileName: string): string { + const ext = (fileName || '').toLowerCase().split('.').pop(); + const mimeTypes: Record = { + json: 'application/json', xml: 'application/xml', html: 'text/html', htm: 'text/html', + txt: 'text/plain', csv: 'text/csv', pdf: 'application/pdf', png: 'image/png', + jpg: 'image/jpeg', jpeg: 'image/jpeg', gif: 'image/gif', svg: 'image/svg+xml', + js: 'application/javascript', css: 'text/css', zip: 'application/zip', tar: 'application/x-tar', + gz: 'application/gzip', mp4: 'video/mp4', mp3: 'audio/mpeg', wav: 'audio/wav', + webp: 'image/webp', ico: 'image/x-icon', woff: 'font/woff', woff2: 'font/woff2', + ttf: 'font/ttf', otf: 'font/otf', + }; + return (ext && mimeTypes[ext]) || 'application/octet-stream'; +} diff --git a/lending/src/apis/FinancialStatementsAccounts.ts b/lending/src/apis/FinancialStatementsAccounts.ts new file mode 100644 index 000000000..ed4820d16 --- /dev/null +++ b/lending/src/apis/FinancialStatementsAccounts.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingAccount, + AccountingAccounts, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAccountFromJSON, + AccountingAccountToJSON, + AccountingAccountsFromJSON, + AccountingAccountsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingAccountRequest { + companyId: string; + accountId: string; +} + +export interface ListAccountingAccountsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Accounts extends runtime.BaseAPI { + + /** + * The *Get account* endpoint returns a single account for a given accountId. [Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get account + */ + private async getAccountingAccountRaw(requestParameters: GetAccountingAccountRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingAccount().' + ); + } + + if (requestParameters['accountId'] == null) { + throw new runtime.RequiredError( + 'accountId', + 'Required parameter "accountId" was null or undefined when calling getAccountingAccount().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/accounts/{accountId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))), + method: 'GET', + operationId: 'get-accounting-account', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAccountFromJSON(jsonValue)); + } + + /** + * The *Get account* endpoint returns a single account for a given accountId. [Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get account + */ + async get(requestParameters: GetAccountingAccountRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingAccountRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company\'s connection. [Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List accounts + */ + private async listAccountingAccountsRaw(requestParameters: ListAccountingAccountsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingAccounts().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/accounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-accounts', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAccountsFromJSON(jsonValue)); + } + + /** + * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company\'s connection. [Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List accounts + */ + async list(requestParameters: ListAccountingAccountsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingAccountsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/FinancialSummary.ts b/lending/src/apis/FinancialSummary.ts new file mode 100644 index 000000000..057e0c798 --- /dev/null +++ b/lending/src/apis/FinancialSummary.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type * as shared from '../sdk/models/index'; +import type { + ErrorMessage, + GetReportStatusReportIdParameter, +} from '../sdk/models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, + FinancialSummaryFromJSON, + FinancialSummaryToJSON, + GetReportStatusReportIdParameterFromJSON, + GetReportStatusReportIdParameterToJSON, +} from '../sdk/models/index'; + +export interface DownloadCreditModelExcelRequest { + companyId: string; + reportId: any; + maxAge?: string; +} + +export interface GetFinancialSummaryRequest { + companyId: string; + reportId: any; +} + +/** + * + */ +export class FinancialSummary extends runtime.BaseAPI { + + /** + * > **Available as beta release** > > This endpoint is part of a beta release. Please contact your account manager if you want to enable it. Use the *Download Credit Model Excel* endpoint to download the credit model Excel file. Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `creditModel`. + * Download credit model Excel + */ + private async downloadCreditModelExcelRaw(requestParameters: DownloadCreditModelExcelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadCreditModelExcel().' + ); + } + + if (requestParameters['reportId'] == null) { + throw new runtime.RequiredError( + 'reportId', + 'Required parameter "reportId" was null or undefined when calling downloadCreditModelExcel().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['maxAge'] != null) { + queryParameters['maxAge'] = requestParameters['maxAge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/creditModel/{reportId}/excel`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"reportId"}}`, encodeURIComponent(String(requestParameters['reportId']))), + method: 'GET', + operationId: 'download-credit-model-excel', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * > **Available as beta release** > > This endpoint is part of a beta release. Please contact your account manager if you want to enable it. Use the *Download Credit Model Excel* endpoint to download the credit model Excel file. Before using it, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `creditModel`. + * Download credit model Excel + */ + async downloadCreditModelExcel(requestParameters: DownloadCreditModelExcelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.downloadCreditModelExcelRaw(requestParameters, options); + return new Uint8Array(await response.raw.arrayBuffer()); + } + + /** + * > **Available as beta release** > > This endpoint is part of a beta release. Please contact your account manager if you want to enable it. Financial summary insights provide high-level indicators about the accuracy and completeness of a business’s financial data. These insights include: - Closed Books Indicator – An estimate of the most recent accounting period officially closed by a business - Accounting Score – An evaluation of the quality and completeness of a business’s bookkeeping Before accessing this endpoint, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `creditModel`. > Please note that missing elements might be disabled for the account. Please contact account manager for more details. + * Get financial summary insights + */ + private async getFinancialSummaryRaw(requestParameters: GetFinancialSummaryRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getFinancialSummary().' + ); + } + + if (requestParameters['reportId'] == null) { + throw new runtime.RequiredError( + 'reportId', + 'Required parameter "reportId" was null or undefined when calling getFinancialSummary().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/creditModel/{reportId}/financialSummary`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"reportId"}}`, encodeURIComponent(String(requestParameters['reportId']))), + method: 'GET', + operationId: 'get-financial-summary', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => FinancialSummaryFromJSON(jsonValue)); + } + + /** + * > **Available as beta release** > > This endpoint is part of a beta release. Please contact your account manager if you want to enable it. Financial summary insights provide high-level indicators about the accuracy and completeness of a business’s financial data. These insights include: - Closed Books Indicator – An estimate of the most recent accounting period officially closed by a business - Accounting Score – An evaluation of the quality and completeness of a business’s bookkeeping Before accessing this endpoint, you must call the [Generate report](https://docs.codat.io/lending-api#/operations/generate-report) endpoint of type `creditModel`. > Please note that missing elements might be disabled for the account. Please contact account manager for more details. + * Get financial summary insights + */ + async getFinancialSummary(requestParameters: GetFinancialSummaryRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getFinancialSummaryRaw(requestParameters, options); + switch (response.raw.status) { + case 200: + return await response.value(); + case 204: + return null; + default: + return await response.value(); + } + } + +} diff --git a/lending/src/apis/Invoices.ts b/lending/src/apis/Invoices.ts new file mode 100644 index 000000000..e33a47078 --- /dev/null +++ b/lending/src/apis/Invoices.ts @@ -0,0 +1,489 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingAttachment, + AccountingInvoice, + AccountingInvoices, + Attachments, + EnhancedInvoicesReport, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAttachmentFromJSON, + AccountingAttachmentToJSON, + AccountingInvoiceFromJSON, + AccountingInvoiceToJSON, + AccountingInvoicesFromJSON, + AccountingInvoicesToJSON, + AttachmentsFromJSON, + AttachmentsToJSON, + EnhancedInvoicesReportFromJSON, + EnhancedInvoicesReportToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface DownloadAccountingInvoiceAttachmentRequest { + companyId: string; + connectionId: string; + invoiceId: string; + attachmentId: string; +} + +export interface DownloadAccountingInvoicePdfRequest { + companyId: string; + invoiceId: string; +} + +export interface GetAccountingInvoiceRequest { + companyId: string; + invoiceId: string; +} + +export interface GetAccountingInvoiceAttachmentRequest { + companyId: string; + connectionId: string; + invoiceId: string; + attachmentId: string; +} + +export interface ListAccountingInvoiceAttachmentsRequest { + companyId: string; + connectionId: string; + invoiceId: string; +} + +export interface ListAccountingInvoicesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +export interface ListReconciledInvoicesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; +} + +/** + * + */ +export class Invoices extends runtime.BaseAPI { + + /** + * The *Download invoice attachment* endpoint downloads a specific attachment for a given `invoiceId` and `attachmentId`. [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + * Download invoice attachment + */ + private async downloadAccountingInvoiceAttachmentRaw(requestParameters: DownloadAccountingInvoiceAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadAccountingInvoiceAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling downloadAccountingInvoiceAttachment().' + ); + } + + if (requestParameters['invoiceId'] == null) { + throw new runtime.RequiredError( + 'invoiceId', + 'Required parameter "invoiceId" was null or undefined when calling downloadAccountingInvoiceAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling downloadAccountingInvoiceAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}/download`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'download-accounting-invoice-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.BlobApiResponse(response); + } + + /** + * The *Download invoice attachment* endpoint downloads a specific attachment for a given `invoiceId` and `attachmentId`. [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + * Download invoice attachment + */ + async downloadAttachment(requestParameters: DownloadAccountingInvoiceAttachmentRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.downloadAccountingInvoiceAttachmentRaw(requestParameters, options); + return response.raw.body as ReadableStream; + } + + /** + * Download invoice as a pdf. + * Get invoice as PDF + */ + private async downloadAccountingInvoicePdfRaw(requestParameters: DownloadAccountingInvoicePdfRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadAccountingInvoicePdf().' + ); + } + + if (requestParameters['invoiceId'] == null) { + throw new runtime.RequiredError( + 'invoiceId', + 'Required parameter "invoiceId" was null or undefined when calling downloadAccountingInvoicePdf().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/pdf'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/invoices/{invoiceId}/pdf`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))), + method: 'GET', + operationId: 'download-accounting-invoice-pdf', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.BlobApiResponse(response); + } + + /** + * Download invoice as a pdf. + * Get invoice as PDF + */ + async downloadPdf(requestParameters: DownloadAccountingInvoicePdfRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.downloadAccountingInvoicePdfRaw(requestParameters, options); + return response.raw.body as ReadableStream; + } + + /** + * The *Get invoice* endpoint returns a single invoice for a given invoiceId. [Invoices](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). ### Tips and traps To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat\'s cache. + * Get invoice + */ + private async getAccountingInvoiceRaw(requestParameters: GetAccountingInvoiceRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingInvoice().' + ); + } + + if (requestParameters['invoiceId'] == null) { + throw new runtime.RequiredError( + 'invoiceId', + 'Required parameter "invoiceId" was null or undefined when calling getAccountingInvoice().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/invoices/{invoiceId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))), + method: 'GET', + operationId: 'get-accounting-invoice', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingInvoiceFromJSON(jsonValue)); + } + + /** + * The *Get invoice* endpoint returns a single invoice for a given invoiceId. [Invoices](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). ### Tips and traps To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat\'s cache. + * Get invoice + */ + async get(requestParameters: GetAccountingInvoiceRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingInvoiceRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get invoice attachment* endpoint returns a specific attachment for a given `invoiceId` and `attachmentId`. [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + * Get invoice attachment + */ + private async getAccountingInvoiceAttachmentRaw(requestParameters: GetAccountingInvoiceAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingInvoiceAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingInvoiceAttachment().' + ); + } + + if (requestParameters['invoiceId'] == null) { + throw new runtime.RequiredError( + 'invoiceId', + 'Required parameter "invoiceId" was null or undefined when calling getAccountingInvoiceAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling getAccountingInvoiceAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'get-accounting-invoice-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAttachmentFromJSON(jsonValue)); + } + + /** + * The *Get invoice attachment* endpoint returns a specific attachment for a given `invoiceId` and `attachmentId`. [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + * Get invoice attachment + */ + async getAttachment(requestParameters: GetAccountingInvoiceAttachmentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingInvoiceAttachmentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List invoice attachments* endpoint returns a list of attachments available to download for given `invoiceId`. [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + * List invoice attachments + */ + private async listAccountingInvoiceAttachmentsRaw(requestParameters: ListAccountingInvoiceAttachmentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingInvoiceAttachments().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingInvoiceAttachments().' + ); + } + + if (requestParameters['invoiceId'] == null) { + throw new runtime.RequiredError( + 'invoiceId', + 'Required parameter "invoiceId" was null or undefined when calling listAccountingInvoiceAttachments().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))), + method: 'GET', + operationId: 'list-accounting-invoice-attachments', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentsFromJSON(jsonValue)); + } + + /** + * The *List invoice attachments* endpoint returns a list of attachments available to download for given `invoiceId`. [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. + * List invoice attachments + */ + async listAttachments(requestParameters: ListAccountingInvoiceAttachmentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingInvoiceAttachmentsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List invoices* endpoint returns a list of [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) for a given company\'s connection. [Invoices](https://docs.codat.io/lending-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/lending-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). ### Tips and traps To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat\'s cache. + * List invoices + */ + private async listAccountingInvoicesRaw(requestParameters: ListAccountingInvoicesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingInvoices().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/invoices`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-invoices', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingInvoicesFromJSON(jsonValue)); + } + + /** + * The *List invoices* endpoint returns a list of [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) for a given company\'s connection. [Invoices](https://docs.codat.io/lending-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/lending-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). ### Tips and traps To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat\'s cache. + * List invoices + */ + async list(requestParameters: ListAccountingInvoicesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingInvoicesRaw(requestParameters, options); + return await response.value(); + } + + /** + * Gets a list of invoices linked to the corresponding banking transaction + * List reconciled invoices + */ + private async listReconciledInvoicesRaw(requestParameters: ListReconciledInvoicesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listReconciledInvoices().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/enhancedInvoices`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-reconciled-invoices', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnhancedInvoicesReportFromJSON(jsonValue)); + } + + /** + * Gets a list of invoices linked to the corresponding banking transaction + * List reconciled invoices + */ + async listReconciled(requestParameters: ListReconciledInvoicesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listReconciledInvoicesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/JournalEntries.ts b/lending/src/apis/JournalEntries.ts new file mode 100644 index 000000000..15a01c049 --- /dev/null +++ b/lending/src/apis/JournalEntries.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingJournalEntries, + AccountingJournalEntry, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingJournalEntriesFromJSON, + AccountingJournalEntriesToJSON, + AccountingJournalEntryFromJSON, + AccountingJournalEntryToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingJournalEntryRequest { + companyId: string; + journalEntryId: string; +} + +export interface ListAccountingJournalEntriesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class JournalEntries extends runtime.BaseAPI { + + /** + * The *Get journal entry* endpoint returns a single journal entry for a given journalEntryId. [Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get journal entry + */ + private async getAccountingJournalEntryRaw(requestParameters: GetAccountingJournalEntryRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingJournalEntry().' + ); + } + + if (requestParameters['journalEntryId'] == null) { + throw new runtime.RequiredError( + 'journalEntryId', + 'Required parameter "journalEntryId" was null or undefined when calling getAccountingJournalEntry().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/journalEntries/{journalEntryId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"journalEntryId"}}`, encodeURIComponent(String(requestParameters['journalEntryId']))), + method: 'GET', + operationId: 'get-accounting-journal-entry', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingJournalEntryFromJSON(jsonValue)); + } + + /** + * The *Get journal entry* endpoint returns a single journal entry for a given journalEntryId. [Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get journal entry + */ + async get(requestParameters: GetAccountingJournalEntryRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingJournalEntryRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List journal entries* endpoint returns a list of [journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) for a given company\'s connection. [Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List journal entries + */ + private async listAccountingJournalEntriesRaw(requestParameters: ListAccountingJournalEntriesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingJournalEntries().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/journalEntries`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-journal-entries', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingJournalEntriesFromJSON(jsonValue)); + } + + /** + * The *List journal entries* endpoint returns a list of [journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) for a given company\'s connection. [Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List journal entries + */ + async list(requestParameters: ListAccountingJournalEntriesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingJournalEntriesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Journals.ts b/lending/src/apis/Journals.ts new file mode 100644 index 000000000..9c98bfcfb --- /dev/null +++ b/lending/src/apis/Journals.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingJournal, + AccountingJournals, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingJournalFromJSON, + AccountingJournalToJSON, + AccountingJournalsFromJSON, + AccountingJournalsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingJournalRequest { + companyId: string; + journalId: string; +} + +export interface ListAccountingJournalsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Journals extends runtime.BaseAPI { + + /** + * The *Get journal* endpoint returns a single journal for a given journalId. [Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get journal + */ + private async getAccountingJournalRaw(requestParameters: GetAccountingJournalRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingJournal().' + ); + } + + if (requestParameters['journalId'] == null) { + throw new runtime.RequiredError( + 'journalId', + 'Required parameter "journalId" was null or undefined when calling getAccountingJournal().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/journals/{journalId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"journalId"}}`, encodeURIComponent(String(requestParameters['journalId']))), + method: 'GET', + operationId: 'get-accounting-journal', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingJournalFromJSON(jsonValue)); + } + + /** + * The *Get journal* endpoint returns a single journal for a given journalId. [Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get journal + */ + async get(requestParameters: GetAccountingJournalRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingJournalRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List journals* endpoint returns a list of [journals](https://docs.codat.io/lending-api#/schemas/Journal) for a given company\'s connection. [Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List journals + */ + private async listAccountingJournalsRaw(requestParameters: ListAccountingJournalsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingJournals().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/journals`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-journals', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingJournalsFromJSON(jsonValue)); + } + + /** + * The *List journals* endpoint returns a list of [journals](https://docs.codat.io/lending-api#/schemas/Journal) for a given company\'s connection. [Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List journals + */ + async list(requestParameters: ListAccountingJournalsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingJournalsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Liabilities.ts b/lending/src/apis/Liabilities.ts new file mode 100644 index 000000000..d586df5f5 --- /dev/null +++ b/lending/src/apis/Liabilities.ts @@ -0,0 +1,300 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { GenerateLoanSummaryQueryParamSourceType, GetLoanSummaryQueryParamSourceType, QueryParamSourceType, SourceType } from '../sdk/models/index'; +import type { + ErrorMessage, + LoanSummary, + LoanTransactions, +} from '../sdk/models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, + LoanSummaryFromJSON, + LoanSummaryToJSON, + LoanTransactionsFromJSON, + LoanTransactionsToJSON, +} from '../sdk/models/index'; + +export interface GenerateLoanSummaryRequest { + companyId: string; + sourceType: GenerateLoanSummaryQueryParamSourceType; +} + +export interface GenerateLoanTransactionsRequest { + companyId: string; + sourceType: SourceType; +} + +export interface GetLoanSummaryRequest { + companyId: string; + sourceType: GetLoanSummaryQueryParamSourceType; +} + +export interface ListLoanTransactionsRequest { + companyId: string; + sourceType: QueryParamSourceType; +} + +/** + * + */ +export class Liabilities extends runtime.BaseAPI { + + /** + * The _Generate loan summaries_ endpoint requests the generation of the Loan Summaries report. Learn more about Codat\'s liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + * Generate loan summaries report + */ + private async generateLoanSummaryRaw(requestParameters: GenerateLoanSummaryRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling generateLoanSummary().' + ); + } + + if (requestParameters['sourceType'] == null) { + throw new runtime.RequiredError( + 'sourceType', + 'Required parameter "sourceType" was null or undefined when calling generateLoanSummary().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['sourceType'] != null) { + queryParameters['sourceType'] = requestParameters['sourceType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/liabilities/loans`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'POST', + operationId: 'generate-loan-summary', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.VoidApiResponse(response); + } + + /** + * The _Generate loan summaries_ endpoint requests the generation of the Loan Summaries report. Learn more about Codat\'s liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + * Generate loan summaries report + */ + async generateLoanSummary(requestParameters: GenerateLoanSummaryRequest, options?: runtime.RequestOptions): Promise { + await this.generateLoanSummaryRaw(requestParameters, options); + } + + /** + * The _Generate loan transactions_ endpoint requests the generation of the Loan Transactions report. Learn more about Codat\'s liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + * Generate loan transactions report + */ + private async generateLoanTransactionsRaw(requestParameters: GenerateLoanTransactionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling generateLoanTransactions().' + ); + } + + if (requestParameters['sourceType'] == null) { + throw new runtime.RequiredError( + 'sourceType', + 'Required parameter "sourceType" was null or undefined when calling generateLoanTransactions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['sourceType'] != null) { + queryParameters['sourceType'] = requestParameters['sourceType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/liabilities/loans/transactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'POST', + operationId: 'generate-loan-transactions', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.VoidApiResponse(response); + } + + /** + * The _Generate loan transactions_ endpoint requests the generation of the Loan Transactions report. Learn more about Codat\'s liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + * Generate loan transactions report + */ + async generateLoanTransactions(requestParameters: GenerateLoanTransactionsRequest, options?: runtime.RequestOptions): Promise { + await this.generateLoanTransactionsRaw(requestParameters, options); + } + + /** + * The *Get loan summaries* endpoint returns a summary by integration type of all loans identified from a company\'s accounting, banking, and commerce integrations. The endpoint returns a list of a company\'s [loan summaries](https://docs.codat.io/lending-api#/schemas/LoanSummary) for each valid data connection. Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + * Get loan summaries + */ + private async getLoanSummaryRaw(requestParameters: GetLoanSummaryRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getLoanSummary().' + ); + } + + if (requestParameters['sourceType'] == null) { + throw new runtime.RequiredError( + 'sourceType', + 'Required parameter "sourceType" was null or undefined when calling getLoanSummary().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['sourceType'] != null) { + queryParameters['sourceType'] = requestParameters['sourceType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/liabilities/loans`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-loan-summary', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => LoanSummaryFromJSON(jsonValue)); + } + + /** + * The *Get loan summaries* endpoint returns a summary by integration type of all loans identified from a company\'s accounting, banking, and commerce integrations. The endpoint returns a list of a company\'s [loan summaries](https://docs.codat.io/lending-api#/schemas/LoanSummary) for each valid data connection. Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + * Get loan summaries + */ + async getLoanSummary(requestParameters: GetLoanSummaryRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getLoanSummaryRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List loan transactions* endpoint returns all [loan transactions](https://docs.codat.io/lending-api#/schemas/LoanTransactions) identified from a company\'s accounting, banking, and commerce integrations. This detail gives analysts a better idea of the loan obligations a company may have. Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + * List loan transactions + */ + private async listLoanTransactionsRaw(requestParameters: ListLoanTransactionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listLoanTransactions().' + ); + } + + if (requestParameters['sourceType'] == null) { + throw new runtime.RequiredError( + 'sourceType', + 'Required parameter "sourceType" was null or undefined when calling listLoanTransactions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['sourceType'] != null) { + queryParameters['sourceType'] = requestParameters['sourceType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/liabilities/loans/transactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-loan-transactions', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => LoanTransactionsFromJSON(jsonValue)); + } + + /** + * The *List loan transactions* endpoint returns all [loan transactions](https://docs.codat.io/lending-api#/schemas/LoanTransactions) identified from a company\'s accounting, banking, and commerce integrations. This detail gives analysts a better idea of the loan obligations a company may have. Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. + * List loan transactions + */ + async listLoanTransactions(requestParameters: ListLoanTransactionsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listLoanTransactionsRaw(requestParameters, options); + return await response.value(); + } + +} + +/** + * @export + */ +export const GenerateLoanSummarySourceTypeEnum = { + Banking: 'banking', + Commerce: 'commerce', + Accounting: 'accounting' +} as const; +export type GenerateLoanSummarySourceTypeEnum = typeof GenerateLoanSummarySourceTypeEnum[keyof typeof GenerateLoanSummarySourceTypeEnum]; +/** + * @export + */ +export const GenerateLoanTransactionsSourceTypeEnum = { + Banking: 'banking', + Commerce: 'commerce', + Accounting: 'accounting' +} as const; +export type GenerateLoanTransactionsSourceTypeEnum = typeof GenerateLoanTransactionsSourceTypeEnum[keyof typeof GenerateLoanTransactionsSourceTypeEnum]; +/** + * @export + */ +export const GetLoanSummarySourceTypeEnum = { + Banking: 'banking', + Commerce: 'commerce', + Accounting: 'accounting' +} as const; +export type GetLoanSummarySourceTypeEnum = typeof GetLoanSummarySourceTypeEnum[keyof typeof GetLoanSummarySourceTypeEnum]; +/** + * @export + */ +export const ListLoanTransactionsSourceTypeEnum = { + Banking: 'banking', + Commerce: 'commerce', + Accounting: 'accounting' +} as const; +export type ListLoanTransactionsSourceTypeEnum = typeof ListLoanTransactionsSourceTypeEnum[keyof typeof ListLoanTransactionsSourceTypeEnum]; diff --git a/lending/src/apis/LoanWritebackAccounts.ts b/lending/src/apis/LoanWritebackAccounts.ts new file mode 100644 index 000000000..985d445f5 --- /dev/null +++ b/lending/src/apis/LoanWritebackAccounts.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountPrototype, + AccountingCreateAccountResponse, + ErrorMessage, + PushOption, +} from '../sdk/models/index'; +import { + AccountPrototypeFromJSON, + AccountPrototypeToJSON, + AccountingCreateAccountResponseFromJSON, + AccountingCreateAccountResponseToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + PushOptionFromJSON, + PushOptionToJSON, +} from '../sdk/models/index'; + +export interface CreateAccountRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountPrototype?: AccountPrototype; +} + +export interface GetCreateChartOfAccountsModelRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class CodatLendingLoanWritebackAccounts extends runtime.BaseAPI { + + /** + * The *Create account* endpoint creates a new [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company\'s connection. [Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/lending-api#/operations/get-create-chartOfAccounts-model). + * Create account + */ + private async createAccountRaw(requestParameters: CreateAccountRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createAccount().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createAccount().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeoutInMinutes'] != null) { + queryParameters['timeoutInMinutes'] = requestParameters['timeoutInMinutes']; + } + + if (requestParameters['allowSyncOnPushComplete'] != null) { + queryParameters['allowSyncOnPushComplete'] = requestParameters['allowSyncOnPushComplete']; + } + else { + queryParameters['allowSyncOnPushComplete'] = true; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/push/accounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'create-account', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: AccountPrototypeToJSON(requestParameters['accountPrototype']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreateAccountResponseFromJSON(jsonValue)); + } + + /** + * The *Create account* endpoint creates a new [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company\'s connection. [Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/lending-api#/operations/get-create-chartOfAccounts-model). + * Create account + */ + async create(requestParameters: CreateAccountRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createAccountRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company and integration. [Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create account model + */ + private async getCreateChartOfAccountsModelRaw(requestParameters: GetCreateChartOfAccountsModelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCreateChartOfAccountsModel().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCreateChartOfAccountsModel().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-create-chartOfAccounts-model', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOptionFromJSON(jsonValue)); + } + + /** + * The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company and integration. [Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create account model + */ + async getCreateModel(requestParameters: GetCreateChartOfAccountsModelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCreateChartOfAccountsModelRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/LoanWritebackPayments.ts b/lending/src/apis/LoanWritebackPayments.ts new file mode 100644 index 000000000..7f7e8ffec --- /dev/null +++ b/lending/src/apis/LoanWritebackPayments.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingCreatePaymentResponse, + AccountingPayment, + ErrorMessage, + PushOption, +} from '../sdk/models/index'; +import { + AccountingCreatePaymentResponseFromJSON, + AccountingCreatePaymentResponseToJSON, + AccountingPaymentFromJSON, + AccountingPaymentToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + PushOptionFromJSON, + PushOptionToJSON, +} from '../sdk/models/index'; + +export interface CreatePaymentRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingPayment?: AccountingPayment; +} + +export interface GetCreatePaymentModelRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class CodatLendingLoanWritebackPayments extends runtime.BaseAPI { + + /** + * The *Create payment* endpoint creates a new [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company\'s connection. [Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create payment model](https://docs.codat.io/lending-api#/operations/get-create-payments-model). + * Create payment + */ + private async createPaymentRaw(requestParameters: CreatePaymentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createPayment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createPayment().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeoutInMinutes'] != null) { + queryParameters['timeoutInMinutes'] = requestParameters['timeoutInMinutes']; + } + + if (requestParameters['allowSyncOnPushComplete'] != null) { + queryParameters['allowSyncOnPushComplete'] = requestParameters['allowSyncOnPushComplete']; + } + else { + queryParameters['allowSyncOnPushComplete'] = true; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/push/payments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'create-payment', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: AccountingPaymentToJSON(requestParameters['accountingPayment']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreatePaymentResponseFromJSON(jsonValue)); + } + + /** + * The *Create payment* endpoint creates a new [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company\'s connection. [Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create payment model](https://docs.codat.io/lending-api#/operations/get-create-payments-model). + * Create payment + */ + async create(requestParameters: CreatePaymentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createPaymentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get create payment model* endpoint returns the expected data for the request payload when creating a [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company and integration. [Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create payment model + */ + private async getCreatePaymentModelRaw(requestParameters: GetCreatePaymentModelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCreatePaymentModel().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCreatePaymentModel().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/options/payments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-create-payment-model', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOptionFromJSON(jsonValue)); + } + + /** + * The *Get create payment model* endpoint returns the expected data for the request payload when creating a [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company and integration. [Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create payment model + */ + async getCreateModel(requestParameters: GetCreatePaymentModelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCreatePaymentModelRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/LoanWritebackSuppliers.ts b/lending/src/apis/LoanWritebackSuppliers.ts new file mode 100644 index 000000000..73663c9cd --- /dev/null +++ b/lending/src/apis/LoanWritebackSuppliers.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingCreateSupplierResponse, + AccountingSupplier, + ErrorMessage, + PushOption, +} from '../sdk/models/index'; +import { + AccountingCreateSupplierResponseFromJSON, + AccountingCreateSupplierResponseToJSON, + AccountingSupplierFromJSON, + AccountingSupplierToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + PushOptionFromJSON, + PushOptionToJSON, +} from '../sdk/models/index'; + +export interface CreateSupplierRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingSupplier?: AccountingSupplier; +} + +export interface GetCreateUpdateSuppliersModelRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class CodatLendingSuppliers extends runtime.BaseAPI { + + /** + * The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company\'s connection. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/lending-api#/operations/get-create-update-suppliers-model). + * Create supplier + */ + private async createSupplierRaw(requestParameters: CreateSupplierRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createSupplier().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createSupplier().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeoutInMinutes'] != null) { + queryParameters['timeoutInMinutes'] = requestParameters['timeoutInMinutes']; + } + + if (requestParameters['allowSyncOnPushComplete'] != null) { + queryParameters['allowSyncOnPushComplete'] = requestParameters['allowSyncOnPushComplete']; + } + else { + queryParameters['allowSyncOnPushComplete'] = true; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/push/suppliers`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'create-supplier', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: AccountingSupplierToJSON(requestParameters['accountingSupplier']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreateSupplierResponseFromJSON(jsonValue)); + } + + /** + * The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company\'s connection. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/lending-api#/operations/get-create-update-suppliers-model). + * Create supplier + */ + async create(requestParameters: CreateSupplierRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createSupplierRaw(requestParameters, options); + return await response.value(); + } + + /** + * 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/lending-api#/schemas/Supplier) for a given company and integration. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create/update supplier model + */ + private async getCreateUpdateSuppliersModelRaw(requestParameters: GetCreateUpdateSuppliersModelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCreateUpdateSuppliersModel().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCreateUpdateSuppliersModel().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/options/suppliers`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-create-update-suppliers-model', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOptionFromJSON(jsonValue)); + } + + /** + * 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/lending-api#/schemas/Supplier) for a given company and integration. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create/update supplier model + */ + async getCreateUpdateModel(requestParameters: GetCreateUpdateSuppliersModelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCreateUpdateSuppliersModelRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Locations.ts b/lending/src/apis/Locations.ts new file mode 100644 index 000000000..b83ce5a8a --- /dev/null +++ b/lending/src/apis/Locations.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommerceLocation, + CommerceLocations, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceLocationFromJSON, + CommerceLocationToJSON, + CommerceLocationsFromJSON, + CommerceLocationsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceLocationRequest { + companyId: string; + connectionId: string; + locationId: string; +} + +export interface ListCommerceLocationsRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class Locations extends runtime.BaseAPI { + + /** + * The *Get location* endpoint returns a single location for a given locationId. [Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get location + */ + private async getCommerceLocationRaw(requestParameters: GetCommerceLocationRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceLocation().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceLocation().' + ); + } + + if (requestParameters['locationId'] == null) { + throw new runtime.RequiredError( + 'locationId', + 'Required parameter "locationId" was null or undefined when calling getCommerceLocation().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-locations/{locationId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"locationId"}}`, encodeURIComponent(String(requestParameters['locationId']))), + method: 'GET', + operationId: 'get-commerce-location', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceLocationFromJSON(jsonValue)); + } + + /** + * The *Get location* endpoint returns a single location for a given locationId. [Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get location + */ + async get(requestParameters: GetCommerceLocationRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceLocationRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List locations* endpoint returns a list of [locations](https://docs.codat.io/lending-api#/schemas/Location) for a given company\'s connection. [Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List locations + */ + private async listCommerceLocationsRaw(requestParameters: ListCommerceLocationsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommerceLocations().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommerceLocations().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-locations`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-locations', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceLocationsFromJSON(jsonValue)); + } + + /** + * The *List locations* endpoint returns a list of [locations](https://docs.codat.io/lending-api#/schemas/Location) for a given company\'s connection. [Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List locations + */ + async list(requestParameters: ListCommerceLocationsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommerceLocationsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/ManageData.ts b/lending/src/apis/ManageData.ts new file mode 100644 index 000000000..f9cc3c33d --- /dev/null +++ b/lending/src/apis/ManageData.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type * as shared from '../sdk/models/index'; +import { PullOperations } from './PullOperations'; +import { Refresh } from './Refresh'; +import type { + DataStatuses, + ErrorMessage, +} from '../sdk/models/index'; +import { + DataStatusesFromJSON, + DataStatusesToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetDataStatusRequest { + companyId: string; +} + +/** + * + */ +export class ManageData extends runtime.BaseAPI { + // CODAT_GROUP_CHILDREN: ManageData + private _pullOperations?: PullOperations; + get pullOperations(): PullOperations { + if (!this._pullOperations) { this._pullOperations = new PullOperations(this.configuration); } + return this._pullOperations; + } + private _refresh?: Refresh; + get refresh(): Refresh { + if (!this._refresh) { this._refresh = new Refresh(this.configuration); } + return this._refresh; + } + + + /** + * Get the state of each data type for a company + * Get data status + */ + private async getDataStatusRaw(requestParameters: GetDataStatusRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getDataStatus().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/dataStatus`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-data-status', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => DataStatusesFromJSON(jsonValue)); + } + + /** + * Get the state of each data type for a company + * Get data status + */ + async getStatus(requestParameters: GetDataStatusRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getDataStatusRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/ManageReports.ts b/lending/src/apis/ManageReports.ts new file mode 100644 index 000000000..02131bc74 --- /dev/null +++ b/lending/src/apis/ManageReports.ts @@ -0,0 +1,247 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { ReportType } from '../sdk/models/index'; +import type { + ErrorMessage, + GetReportStatusReportIdParameter, + ReportOperation, + Reports, +} from '../sdk/models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, + GetReportStatusReportIdParameterFromJSON, + GetReportStatusReportIdParameterToJSON, + ReportOperationFromJSON, + ReportOperationToJSON, + ReportsFromJSON, + ReportsToJSON, +} from '../sdk/models/index'; + +export interface GenerateReportRequest { + companyId: string; + reportType: ReportType; +} + +export interface GetReportStatusRequest { + companyId: string; + reportType: ReportType; + reportId: any; + maxAge?: string; +} + +export interface ListReportsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class ManageReports extends runtime.BaseAPI { + + /** + * Use the *Generate report* endpoint to initiate the generation of a report specified by the `reportType` parameter. This action triggers the system to refresh and pull the necessary data from the company\'s data sources to ensure the report contains the most up-to-date information. + * Generate report + */ + private async generateReportRaw(requestParameters: GenerateReportRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling generateReport().' + ); + } + + if (requestParameters['reportType'] == null) { + throw new runtime.RequiredError( + 'reportType', + 'Required parameter "reportType" was null or undefined when calling generateReport().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/{reportType}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"reportType"}}`, encodeURIComponent(String(requestParameters['reportType']))), + method: 'POST', + operationId: 'generate-report', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReportOperationFromJSON(jsonValue)); + } + + /** + * Use the *Generate report* endpoint to initiate the generation of a report specified by the `reportType` parameter. This action triggers the system to refresh and pull the necessary data from the company\'s data sources to ensure the report contains the most up-to-date information. + * Generate report + */ + async generateReport(requestParameters: GenerateReportRequest, options?: runtime.RequestOptions): Promise { + const response = await this.generateReportRaw(requestParameters, options); + return await response.value(); + } + + /** + * Use the *Get report status* endpoint to return the metadata about report generation, such as its current status, date of request, and date of generation. You can either provide the ID of a report or use `latest` as the ID value to get the most recent generated *reportName* report for the company. + * Get report status + */ + private async getReportStatusRaw(requestParameters: GetReportStatusRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getReportStatus().' + ); + } + + if (requestParameters['reportType'] == null) { + throw new runtime.RequiredError( + 'reportType', + 'Required parameter "reportType" was null or undefined when calling getReportStatus().' + ); + } + + if (requestParameters['reportId'] == null) { + throw new runtime.RequiredError( + 'reportId', + 'Required parameter "reportId" was null or undefined when calling getReportStatus().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['maxAge'] != null) { + queryParameters['maxAge'] = requestParameters['maxAge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/{reportType}/{reportId}/status`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"reportType"}}`, encodeURIComponent(String(requestParameters['reportType']))).replace(`{${"reportId"}}`, encodeURIComponent(String(requestParameters['reportId']))), + method: 'GET', + operationId: 'get-report-status', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReportOperationFromJSON(jsonValue)); + } + + /** + * Use the *Get report status* endpoint to return the metadata about report generation, such as its current status, date of request, and date of generation. You can either provide the ID of a report or use `latest` as the ID value to get the most recent generated *reportName* report for the company. + * Get report status + */ + async getReportStatus(requestParameters: GetReportStatusRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getReportStatusRaw(requestParameters, options); + return await response.value(); + } + + /** + * Use the *List reports* endpoint to return details (such as generation\'s current status, date of request, and date of generation) about all reports generated for a company. The query parameter can be used to filter the results. + * List reports + */ + private async listReportsRaw(requestParameters: ListReportsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listReports().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-reports', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReportsFromJSON(jsonValue)); + } + + /** + * Use the *List reports* endpoint to return details (such as generation\'s current status, date of request, and date of generation) about all reports generated for a company. The query parameter can be used to filter the results. + * List reports + */ + async listReports(requestParameters: ListReportsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listReportsRaw(requestParameters, options); + return await response.value(); + } + +} + +/** + * @export + */ +export const GenerateReportReportTypeEnum = { + CategorizedBankStatement: 'categorizedBankStatement', + CreditModel: 'creditModel' +} as const; +export type GenerateReportReportTypeEnum = typeof GenerateReportReportTypeEnum[keyof typeof GenerateReportReportTypeEnum]; +/** + * @export + */ +export const GetReportStatusReportTypeEnum = { + CategorizedBankStatement: 'categorizedBankStatement', + CreditModel: 'creditModel' +} as const; +export type GetReportStatusReportTypeEnum = typeof GetReportStatusReportTypeEnum[keyof typeof GetReportStatusReportTypeEnum]; diff --git a/lending/src/apis/Metrics.ts b/lending/src/apis/Metrics.ts new file mode 100644 index 000000000..2fd9ec749 --- /dev/null +++ b/lending/src/apis/Metrics.ts @@ -0,0 +1,383 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { PeriodUnit } from '../sdk/models/index'; +import type { + CommerceReport, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceReportFromJSON, + CommerceReportToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceCustomerRetentionMetricsRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; +} + +export interface GetCommerceLifetimeValueMetricsRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; +} + +export interface GetCommerceRevenueMetricsRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; +} + +/** + * + */ +export class Metrics extends runtime.BaseAPI { + + /** + * The *Get customer retention metrics* endpoint returns customer retention insights for a specific company\'s commerce connection over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. #### Customer retention metrics - __Existing customers__: the number of unique customers that have placed an order(s) in the specified period and any previous period. - __New customers__: the number of unique customers that have placed an order(s) in the specified period and none in any previous period. - __Total customers__: the total number of existing and new customers within the specified period. - __Retention rate__: the ratio of existing customers within the specified period compared to the total customers at the end of the previous period represented as a percentage. - __Repeat rate__: the ratio of existing customers to total customers over the specified period represented as a percentage. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate customer retention metrics. #### Response structure The Customer retention report\'s dimensions and measures are: | Index | Dimensions | |-----------------------------|----------------------------| | `index` = 0 | Period | | `index` = 1 | Customer retention metrics | | Index | Measures | |----------------------|------------| | `index` = 0 | Count | | `index` = 1 | Percentage | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get customer retention metrics + */ + private async getCommerceCustomerRetentionMetricsRaw(requestParameters: GetCommerceCustomerRetentionMetricsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceCustomerRetentionMetrics().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceCustomerRetentionMetrics().' + ); + } + + if (requestParameters['reportDate'] == null) { + throw new runtime.RequiredError( + 'reportDate', + 'Required parameter "reportDate" was null or undefined when calling getCommerceCustomerRetentionMetrics().' + ); + } + + if (requestParameters['periodLength'] == null) { + throw new runtime.RequiredError( + 'periodLength', + 'Required parameter "periodLength" was null or undefined when calling getCommerceCustomerRetentionMetrics().' + ); + } + + if (requestParameters['numberOfPeriods'] == null) { + throw new runtime.RequiredError( + 'numberOfPeriods', + 'Required parameter "numberOfPeriods" was null or undefined when calling getCommerceCustomerRetentionMetrics().' + ); + } + + if (requestParameters['periodUnit'] == null) { + throw new runtime.RequiredError( + 'periodUnit', + 'Required parameter "periodUnit" was null or undefined when calling getCommerceCustomerRetentionMetrics().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = requestParameters['reportDate']; + } + + if (requestParameters['periodLength'] != null) { + queryParameters['periodLength'] = requestParameters['periodLength']; + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + if (requestParameters['periodUnit'] != null) { + queryParameters['periodUnit'] = requestParameters['periodUnit']; + } + + if (requestParameters['includeDisplayNames'] != null) { + queryParameters['includeDisplayNames'] = requestParameters['includeDisplayNames']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/customerRetention`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-commerce-customer-retention-metrics', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceReportFromJSON(jsonValue)); + } + + /** + * The *Get customer retention metrics* endpoint returns customer retention insights for a specific company\'s commerce connection over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. #### Customer retention metrics - __Existing customers__: the number of unique customers that have placed an order(s) in the specified period and any previous period. - __New customers__: the number of unique customers that have placed an order(s) in the specified period and none in any previous period. - __Total customers__: the total number of existing and new customers within the specified period. - __Retention rate__: the ratio of existing customers within the specified period compared to the total customers at the end of the previous period represented as a percentage. - __Repeat rate__: the ratio of existing customers to total customers over the specified period represented as a percentage. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate customer retention metrics. #### Response structure The Customer retention report\'s dimensions and measures are: | Index | Dimensions | |-----------------------------|----------------------------| | `index` = 0 | Period | | `index` = 1 | Customer retention metrics | | Index | Measures | |----------------------|------------| | `index` = 0 | Count | | `index` = 1 | Percentage | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get customer retention metrics + */ + async getCustomerRetention(requestParameters: GetCommerceCustomerRetentionMetricsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceCustomerRetentionMetricsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get lifetime value metrics* endpoint returns the average revenue that a specific company will generate throughout its lifespan over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the lifetime value metrics. #### Response structure The Lifetime value report\'s dimensions and measures are: | Index | Dimensions | |---------------|------------------------| | `index` = 0 | Period | | `index` = 1 | Lifetime value metrics | | Index | Measures | |-------------------|---------| | `index` = 1 | Value | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get lifetime value metrics + */ + private async getCommerceLifetimeValueMetricsRaw(requestParameters: GetCommerceLifetimeValueMetricsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceLifetimeValueMetrics().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceLifetimeValueMetrics().' + ); + } + + if (requestParameters['reportDate'] == null) { + throw new runtime.RequiredError( + 'reportDate', + 'Required parameter "reportDate" was null or undefined when calling getCommerceLifetimeValueMetrics().' + ); + } + + if (requestParameters['periodLength'] == null) { + throw new runtime.RequiredError( + 'periodLength', + 'Required parameter "periodLength" was null or undefined when calling getCommerceLifetimeValueMetrics().' + ); + } + + if (requestParameters['numberOfPeriods'] == null) { + throw new runtime.RequiredError( + 'numberOfPeriods', + 'Required parameter "numberOfPeriods" was null or undefined when calling getCommerceLifetimeValueMetrics().' + ); + } + + if (requestParameters['periodUnit'] == null) { + throw new runtime.RequiredError( + 'periodUnit', + 'Required parameter "periodUnit" was null or undefined when calling getCommerceLifetimeValueMetrics().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = requestParameters['reportDate']; + } + + if (requestParameters['periodLength'] != null) { + queryParameters['periodLength'] = requestParameters['periodLength']; + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + if (requestParameters['periodUnit'] != null) { + queryParameters['periodUnit'] = requestParameters['periodUnit']; + } + + if (requestParameters['includeDisplayNames'] != null) { + queryParameters['includeDisplayNames'] = requestParameters['includeDisplayNames']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/lifetimeValue`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-commerce-lifetime-value-metrics', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceReportFromJSON(jsonValue)); + } + + /** + * The *Get lifetime value metrics* endpoint returns the average revenue that a specific company will generate throughout its lifespan over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the lifetime value metrics. #### Response structure The Lifetime value report\'s dimensions and measures are: | Index | Dimensions | |---------------|------------------------| | `index` = 0 | Period | | `index` = 1 | Lifetime value metrics | | Index | Measures | |-------------------|---------| | `index` = 1 | Value | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get lifetime value metrics + */ + async getLifetimeValue(requestParameters: GetCommerceLifetimeValueMetricsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceLifetimeValueMetricsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get revenue report* endpoint returns the revenue and revenue growth for a specific company connection over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the revenue metrics. #### Response structure The Revenue report\'s dimensions and measures are: | Index | Dimensions | |---------------|------------| | `index` = 0 | Period | | `index` = 1 | Revenue | | Index | Measures | |---------------|--------------------------------------------------------------------------------------------------------------------------| | `index` = 0 | Value | | `index` = 1 | Percentage change, defined as the change between the current and previous periods\' values and expressed as a percentage. | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get commerce revenue metrics + */ + private async getCommerceRevenueMetricsRaw(requestParameters: GetCommerceRevenueMetricsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceRevenueMetrics().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceRevenueMetrics().' + ); + } + + if (requestParameters['reportDate'] == null) { + throw new runtime.RequiredError( + 'reportDate', + 'Required parameter "reportDate" was null or undefined when calling getCommerceRevenueMetrics().' + ); + } + + if (requestParameters['periodLength'] == null) { + throw new runtime.RequiredError( + 'periodLength', + 'Required parameter "periodLength" was null or undefined when calling getCommerceRevenueMetrics().' + ); + } + + if (requestParameters['numberOfPeriods'] == null) { + throw new runtime.RequiredError( + 'numberOfPeriods', + 'Required parameter "numberOfPeriods" was null or undefined when calling getCommerceRevenueMetrics().' + ); + } + + if (requestParameters['periodUnit'] == null) { + throw new runtime.RequiredError( + 'periodUnit', + 'Required parameter "periodUnit" was null or undefined when calling getCommerceRevenueMetrics().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = requestParameters['reportDate']; + } + + if (requestParameters['periodLength'] != null) { + queryParameters['periodLength'] = requestParameters['periodLength']; + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + if (requestParameters['periodUnit'] != null) { + queryParameters['periodUnit'] = requestParameters['periodUnit']; + } + + if (requestParameters['includeDisplayNames'] != null) { + queryParameters['includeDisplayNames'] = requestParameters['includeDisplayNames']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/revenue`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-commerce-revenue-metrics', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceReportFromJSON(jsonValue)); + } + + /** + * The *Get revenue report* endpoint returns the revenue and revenue growth for a specific company connection over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the revenue metrics. #### Response structure The Revenue report\'s dimensions and measures are: | Index | Dimensions | |---------------|------------| | `index` = 0 | Period | | `index` = 1 | Revenue | | Index | Measures | |---------------|--------------------------------------------------------------------------------------------------------------------------| | `index` = 0 | Value | | `index` = 1 | Percentage change, defined as the change between the current and previous periods\' values and expressed as a percentage. | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get commerce revenue metrics + */ + async getRevenue(requestParameters: GetCommerceRevenueMetricsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceRevenueMetricsRaw(requestParameters, options); + return await response.value(); + } + +} + +/** + * @export + */ +export const GetCommerceCustomerRetentionMetricsPeriodUnitEnum = { + Day: 'Day', + Week: 'Week', + Month: 'Month', + Year: 'Year' +} as const; +export type GetCommerceCustomerRetentionMetricsPeriodUnitEnum = typeof GetCommerceCustomerRetentionMetricsPeriodUnitEnum[keyof typeof GetCommerceCustomerRetentionMetricsPeriodUnitEnum]; +/** + * @export + */ +export const GetCommerceLifetimeValueMetricsPeriodUnitEnum = { + Day: 'Day', + Week: 'Week', + Month: 'Month', + Year: 'Year' +} as const; +export type GetCommerceLifetimeValueMetricsPeriodUnitEnum = typeof GetCommerceLifetimeValueMetricsPeriodUnitEnum[keyof typeof GetCommerceLifetimeValueMetricsPeriodUnitEnum]; +/** + * @export + */ +export const GetCommerceRevenueMetricsPeriodUnitEnum = { + Day: 'Day', + Week: 'Week', + Month: 'Month', + Year: 'Year' +} as const; +export type GetCommerceRevenueMetricsPeriodUnitEnum = typeof GetCommerceRevenueMetricsPeriodUnitEnum[keyof typeof GetCommerceRevenueMetricsPeriodUnitEnum]; diff --git a/lending/src/apis/Orders.ts b/lending/src/apis/Orders.ts new file mode 100644 index 000000000..c67b77761 --- /dev/null +++ b/lending/src/apis/Orders.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommerceOrder, + CommerceOrders, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceOrderFromJSON, + CommerceOrderToJSON, + CommerceOrdersFromJSON, + CommerceOrdersToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceOrderRequest { + companyId: string; + connectionId: string; + orderId: string; +} + +export interface ListCommerceOrdersRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Orders extends runtime.BaseAPI { + + /** + * The *Get order* endpoint returns a single order for a given orderId. [Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get order + */ + private async getCommerceOrderRaw(requestParameters: GetCommerceOrderRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceOrder().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceOrder().' + ); + } + + if (requestParameters['orderId'] == null) { + throw new runtime.RequiredError( + 'orderId', + 'Required parameter "orderId" was null or undefined when calling getCommerceOrder().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-orders/{orderId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + method: 'GET', + operationId: 'get-commerce-order', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceOrderFromJSON(jsonValue)); + } + + /** + * The *Get order* endpoint returns a single order for a given orderId. [Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get order + */ + async get(requestParameters: GetCommerceOrderRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceOrderRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List orders* endpoint returns a list of [orders](https://docs.codat.io/lending-api#/schemas/Order) for a given company\'s connection. [Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List orders + */ + private async listCommerceOrdersRaw(requestParameters: ListCommerceOrdersRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommerceOrders().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommerceOrders().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-orders`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-orders', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceOrdersFromJSON(jsonValue)); + } + + /** + * The *List orders* endpoint returns a list of [orders](https://docs.codat.io/lending-api#/schemas/Order) for a given company\'s connection. [Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List orders + */ + async list(requestParameters: ListCommerceOrdersRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommerceOrdersRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/PaymentMethods.ts b/lending/src/apis/PaymentMethods.ts new file mode 100644 index 000000000..dc00d16fd --- /dev/null +++ b/lending/src/apis/PaymentMethods.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommercePaymentMethod, + CommercePaymentMethods, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommercePaymentMethodFromJSON, + CommercePaymentMethodToJSON, + CommercePaymentMethodsFromJSON, + CommercePaymentMethodsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommercePaymentMethodRequest { + companyId: string; + connectionId: string; + paymentMethodId: string; +} + +export interface ListCommercePaymentMethodsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class PaymentMethods extends runtime.BaseAPI { + + /** + * The *Get payment method* endpoint returns a single payment method for a given paymentMethodId. [Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get payment method + */ + private async getCommercePaymentMethodRaw(requestParameters: GetCommercePaymentMethodRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommercePaymentMethod().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommercePaymentMethod().' + ); + } + + if (requestParameters['paymentMethodId'] == null) { + throw new runtime.RequiredError( + 'paymentMethodId', + 'Required parameter "paymentMethodId" was null or undefined when calling getCommercePaymentMethod().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-paymentMethods/{paymentMethodId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"paymentMethodId"}}`, encodeURIComponent(String(requestParameters['paymentMethodId']))), + method: 'GET', + operationId: 'get-commerce-payment-method', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommercePaymentMethodFromJSON(jsonValue)); + } + + /** + * The *Get payment method* endpoint returns a single payment method for a given paymentMethodId. [Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get payment method + */ + async get(requestParameters: GetCommercePaymentMethodRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommercePaymentMethodRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) for a given company\'s connection. [Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List payment methods + */ + private async listCommercePaymentMethodsRaw(requestParameters: ListCommercePaymentMethodsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommercePaymentMethods().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommercePaymentMethods().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-paymentMethods`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-payment-methods', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommercePaymentMethodsFromJSON(jsonValue)); + } + + /** + * The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) for a given company\'s connection. [Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List payment methods + */ + async list(requestParameters: ListCommercePaymentMethodsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommercePaymentMethodsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Payments.ts b/lending/src/apis/Payments.ts new file mode 100644 index 000000000..212d8d7af --- /dev/null +++ b/lending/src/apis/Payments.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingPayment, + AccountingPayments, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingPaymentFromJSON, + AccountingPaymentToJSON, + AccountingPaymentsFromJSON, + AccountingPaymentsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingPaymentRequest { + companyId: string; + paymentId: string; +} + +export interface ListAccountingPaymentsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Payments extends runtime.BaseAPI { + + /** + * The *Get payment* endpoint returns a single payment for a given paymentId. [Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get payment + */ + private async getAccountingPaymentRaw(requestParameters: GetAccountingPaymentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingPayment().' + ); + } + + if (requestParameters['paymentId'] == null) { + throw new runtime.RequiredError( + 'paymentId', + 'Required parameter "paymentId" was null or undefined when calling getAccountingPayment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/payments/{paymentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"paymentId"}}`, encodeURIComponent(String(requestParameters['paymentId']))), + method: 'GET', + operationId: 'get-accounting-payment', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingPaymentFromJSON(jsonValue)); + } + + /** + * The *Get payment* endpoint returns a single payment for a given paymentId. [Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get payment + */ + async get(requestParameters: GetAccountingPaymentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingPaymentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company\'s connection. [Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List payments + */ + private async listAccountingPaymentsRaw(requestParameters: ListAccountingPaymentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingPayments().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/payments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-payments', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingPaymentsFromJSON(jsonValue)); + } + + /** + * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company\'s connection. [Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List payments + */ + async list(requestParameters: ListAccountingPaymentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingPaymentsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/ProductCategories.ts b/lending/src/apis/ProductCategories.ts new file mode 100644 index 000000000..ba1f102f5 --- /dev/null +++ b/lending/src/apis/ProductCategories.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommerceProductCategories, + CommerceProductCategory, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceProductCategoriesFromJSON, + CommerceProductCategoriesToJSON, + CommerceProductCategoryFromJSON, + CommerceProductCategoryToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceProductCategoryRequest { + companyId: string; + connectionId: string; + productId: string; +} + +export interface ListCommerceProductCategoriesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class ProductCategories extends runtime.BaseAPI { + + /** + * The *Get product* endpoint returns a single product for a given productId. [Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. \"Furniture\"), or sometimes by tax profile. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get product category + */ + private async getCommerceProductCategoryRaw(requestParameters: GetCommerceProductCategoryRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceProductCategory().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceProductCategory().' + ); + } + + if (requestParameters['productId'] == null) { + throw new runtime.RequiredError( + 'productId', + 'Required parameter "productId" was null or undefined when calling getCommerceProductCategory().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-productCategories/{productId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"productId"}}`, encodeURIComponent(String(requestParameters['productId']))), + method: 'GET', + operationId: 'get-commerce-product-category', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceProductCategoryFromJSON(jsonValue)); + } + + /** + * The *Get product* endpoint returns a single product for a given productId. [Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. \"Furniture\"), or sometimes by tax profile. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get product category + */ + async get(requestParameters: GetCommerceProductCategoryRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceProductCategoryRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List product categories* endpoint returns a list of [product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) for a given company\'s connection. [Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. \"Furniture\"), or sometimes by tax profile. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List product categories + */ + private async listCommerceProductCategoriesRaw(requestParameters: ListCommerceProductCategoriesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommerceProductCategories().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommerceProductCategories().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-productCategories`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-product-categories', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceProductCategoriesFromJSON(jsonValue)); + } + + /** + * The *List product categories* endpoint returns a list of [product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) for a given company\'s connection. [Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. \"Furniture\"), or sometimes by tax profile. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List product categories + */ + async list(requestParameters: ListCommerceProductCategoriesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommerceProductCategoriesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Products.ts b/lending/src/apis/Products.ts new file mode 100644 index 000000000..7a3c45480 --- /dev/null +++ b/lending/src/apis/Products.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommerceProduct, + CommerceProducts, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceProductFromJSON, + CommerceProductToJSON, + CommerceProductsFromJSON, + CommerceProductsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceProductRequest { + companyId: string; + connectionId: string; + productId: string; +} + +export interface ListCommerceProductsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Products extends runtime.BaseAPI { + + /** + * The *Get product* endpoint returns a single product for a given productId. [Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company\'s inventory that are available for sale. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get product + */ + private async getCommerceProductRaw(requestParameters: GetCommerceProductRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceProduct().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceProduct().' + ); + } + + if (requestParameters['productId'] == null) { + throw new runtime.RequiredError( + 'productId', + 'Required parameter "productId" was null or undefined when calling getCommerceProduct().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-products/{productId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"productId"}}`, encodeURIComponent(String(requestParameters['productId']))), + method: 'GET', + operationId: 'get-commerce-product', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceProductFromJSON(jsonValue)); + } + + /** + * The *Get product* endpoint returns a single product for a given productId. [Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company\'s inventory that are available for sale. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get product + */ + async get(requestParameters: GetCommerceProductRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceProductRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List products* endpoint returns a list of [products](https://docs.codat.io/lending-api#/schemas/Product) for a given company\'s connection. [Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company\'s inventory that are available for sale. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List products + */ + private async listCommerceProductsRaw(requestParameters: ListCommerceProductsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommerceProducts().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommerceProducts().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-products`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-products', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceProductsFromJSON(jsonValue)); + } + + /** + * The *List products* endpoint returns a list of [products](https://docs.codat.io/lending-api#/schemas/Product) for a given company\'s connection. [Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company\'s inventory that are available for sale. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List products + */ + async list(requestParameters: ListCommerceProductsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommerceProductsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/ProfitAndLoss.ts b/lending/src/apis/ProfitAndLoss.ts new file mode 100644 index 000000000..526de2b15 --- /dev/null +++ b/lending/src/apis/ProfitAndLoss.ts @@ -0,0 +1,165 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingProfitAndLossReport, + EnhancedFinancialReport, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingProfitAndLossReportFromJSON, + AccountingProfitAndLossReportToJSON, + EnhancedFinancialReportFromJSON, + EnhancedFinancialReportToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingProfitAndLossRequest { + companyId: string; + periodLength: number; + periodsToCompare: number; + startMonth?: string; +} + +export interface GetCategorizedProfitAndLossStatementRequest { + companyId: string; + reportDate?: string; + numberOfPeriods?: number; +} + +/** + * + */ +export class ProfitAndLoss extends runtime.BaseAPI { + + /** + * Gets the latest profit and loss for a company. + * Get profit and loss + */ + private async getAccountingProfitAndLossRaw(requestParameters: GetAccountingProfitAndLossRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingProfitAndLoss().' + ); + } + + if (requestParameters['periodLength'] == null) { + throw new runtime.RequiredError( + 'periodLength', + 'Required parameter "periodLength" was null or undefined when calling getAccountingProfitAndLoss().' + ); + } + + if (requestParameters['periodsToCompare'] == null) { + throw new runtime.RequiredError( + 'periodsToCompare', + 'Required parameter "periodsToCompare" was null or undefined when calling getAccountingProfitAndLoss().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['periodLength'] != null) { + queryParameters['periodLength'] = requestParameters['periodLength']; + } + + if (requestParameters['periodsToCompare'] != null) { + queryParameters['periodsToCompare'] = requestParameters['periodsToCompare']; + } + + if (requestParameters['startMonth'] != null) { + queryParameters['startMonth'] = requestParameters['startMonth']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/financials/profitAndLoss`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-accounting-profit-and-loss', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingProfitAndLossReportFromJSON(jsonValue)); + } + + /** + * Gets the latest profit and loss for a company. + * Get profit and loss + */ + async get(requestParameters: GetAccountingProfitAndLossRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingProfitAndLossRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get categorized profit and loss statement* endpoint returns a list of categorized accounts that appear on a company’s Profit and Loss statement. It also includes a balance as of the financial statement date. Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. + * Get categorized profit and loss statement + */ + private async getCategorizedProfitAndLossStatementRaw(requestParameters: GetCategorizedProfitAndLossStatementRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCategorizedProfitAndLossStatement().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = requestParameters['reportDate']; + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/enhancedProfitAndLoss/accounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-categorized-profit-and-loss-statement', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnhancedFinancialReportFromJSON(jsonValue)); + } + + /** + * The *Get categorized profit and loss statement* endpoint returns a list of categorized accounts that appear on a company’s Profit and Loss statement. It also includes a balance as of the financial statement date. Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. + * Get categorized profit and loss statement + */ + async getCategorizedAccounts(requestParameters: GetCategorizedProfitAndLossStatementRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCategorizedProfitAndLossStatementRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/PullOperations.ts b/lending/src/apis/PullOperations.ts new file mode 100644 index 000000000..b568cad0d --- /dev/null +++ b/lending/src/apis/PullOperations.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type * as shared from '../sdk/models/index'; +import type { + ErrorMessage, + PullOperation, +} from '../sdk/models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, + PullOperationFromJSON, + PullOperationToJSON, + PullOperationsFromJSON, + PullOperationsToJSON, +} from '../sdk/models/index'; + +export interface GetPullOperationRequest { + companyId: string; + datasetId: string; +} + +export interface ListPullOperationsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class PullOperations extends runtime.BaseAPI { + + /** + * Retrieve information about a single dataset or pull operation. + * Get pull operation + */ + private async getPullOperationRaw(requestParameters: GetPullOperationRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getPullOperation().' + ); + } + + if (requestParameters['datasetId'] == null) { + throw new runtime.RequiredError( + 'datasetId', + 'Required parameter "datasetId" was null or undefined when calling getPullOperation().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/history/{datasetId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"datasetId"}}`, encodeURIComponent(String(requestParameters['datasetId']))), + method: 'GET', + operationId: 'get-pull-operation', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PullOperationFromJSON(jsonValue)); + } + + /** + * Retrieve information about a single dataset or pull operation. + * Get pull operation + */ + async get(requestParameters: GetPullOperationRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getPullOperationRaw(requestParameters, options); + return await response.value(); + } + + /** + * Gets the pull operation history (datasets) for a given company. + * List pull operations + */ + private async listPullOperationsRaw(requestParameters: ListPullOperationsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listPullOperations().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/history`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-pull-operations', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PullOperationsFromJSON(jsonValue)); + } + + /** + * Gets the pull operation history (datasets) for a given company. + * List pull operations + */ + async list(requestParameters: ListPullOperationsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listPullOperationsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Refresh.ts b/lending/src/apis/Refresh.ts new file mode 100644 index 000000000..4bc639ce4 --- /dev/null +++ b/lending/src/apis/Refresh.ts @@ -0,0 +1,204 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { BalanceSheet } from '../sdk/models/index'; +import type { BankingAccountBalances } from '../sdk/models/index'; +import type { BankingAccounts } from '../sdk/models/index'; +import type { BankingTransactionCategories } from '../sdk/models/index'; +import type { BankingTransactions } from '../sdk/models/index'; +import type { CashFlowStatement } from '../sdk/models/index'; +import type { CommerceCompanyInfo } from '../sdk/models/index'; +import type { CommerceCustomers } from '../sdk/models/index'; +import type { CommerceDisputes } from '../sdk/models/index'; +import type { CommerceLocations } from '../sdk/models/index'; +import type { CommerceOrders } from '../sdk/models/index'; +import type { CommercePaymentMethods } from '../sdk/models/index'; +import type { CommercePayments } from '../sdk/models/index'; +import type { CommerceProductCategories } from '../sdk/models/index'; +import type { CommerceProducts } from '../sdk/models/index'; +import type { CommerceTransactions } from '../sdk/models/index'; +import type { Company } from '../sdk/models/index'; +import type { Items } from '../sdk/models/index'; +import * as runtime from '../runtime'; +import type { DataType } from '../sdk/models/index'; +import type { + ErrorMessage, + PullOperation, +} from '../sdk/models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, + PullOperationFromJSON, + PullOperationToJSON, +} from '../sdk/models/index'; + +export interface RefreshAllDataTypesRequest { + companyId: string; +} + +export interface RefreshDataTypeRequest { + companyId: string; + dataType: DataType; + connectionId?: string; +} + +/** + * + */ +export class Refresh extends runtime.BaseAPI { + + /** + * Refreshes all data types with `fetch on first link` set to `true` for a given company. This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. + * Refresh all data + */ + private async refreshAllDataTypesRaw(requestParameters: RefreshAllDataTypesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling refreshAllDataTypes().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/all`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'POST', + operationId: 'refresh-all-data-types', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.VoidApiResponse(response); + } + + /** + * Refreshes all data types with `fetch on first link` set to `true` for a given company. This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. + * Refresh all data + */ + async allDataTypes(requestParameters: RefreshAllDataTypesRequest, options?: runtime.RequestOptions): Promise { + await this.refreshAllDataTypesRaw(requestParameters, options); + } + + /** + * Refreshes a given data type for a given company. This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + * Refresh data type + */ + private async refreshDataTypeRaw(requestParameters: RefreshDataTypeRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling refreshDataType().' + ); + } + + if (requestParameters['dataType'] == null) { + throw new runtime.RequiredError( + 'dataType', + 'Required parameter "dataType" was null or undefined when calling refreshDataType().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['connectionId'] != null) { + queryParameters['connectionId'] = requestParameters['connectionId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/queue/{dataType}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"dataType"}}`, encodeURIComponent(String(requestParameters['dataType']))), + method: 'POST', + operationId: 'refresh-data-type', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PullOperationFromJSON(jsonValue)); + } + + /** + * Refreshes a given data type for a given company. This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + * Refresh data type + */ + async dataType(requestParameters: RefreshDataTypeRequest, options?: runtime.RequestOptions): Promise { + const response = await this.refreshDataTypeRaw(requestParameters, options); + return await response.value(); + } + +} + +/** + * @export + */ +export const RefreshDataTypeDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type RefreshDataTypeDataTypeEnum = typeof RefreshDataTypeDataTypeEnum[keyof typeof RefreshDataTypeDataTypeEnum]; diff --git a/lending/src/apis/Reports.ts b/lending/src/apis/Reports.ts new file mode 100644 index 000000000..6836cc14a --- /dev/null +++ b/lending/src/apis/Reports.ts @@ -0,0 +1,255 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import { RFCDate } from '../sdk/types/rfcdate'; +import type { + AccountingAgedCreditorReport, + AccountingAgedDebtorReport, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAgedCreditorReportFromJSON, + AccountingAgedCreditorReportToJSON, + AccountingAgedDebtorReportFromJSON, + AccountingAgedDebtorReportToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingAgedCreditorsReportRequest { + companyId: string; + reportDate?: RFCDate; + numberOfPeriods?: number; + periodLengthDays?: number; +} + +export interface GetAccountingAgedDebtorsReportRequest { + companyId: string; + reportDate?: RFCDate; + numberOfPeriods?: number; + periodLengthDays?: number; +} + +export interface IsAgedCreditorsReportAvailableRequest { + companyId: string; +} + +export interface IsAgedDebtorsReportAvailableRequest { + companyId: string; +} + +/** + * + */ +export class CodatLendingReports extends runtime.BaseAPI { + + /** + * Returns aged creditors report for company that shows the total balance owed by a business to its suppliers over time. + * Aged creditors report + */ + private async getAccountingAgedCreditorsReportRaw(requestParameters: GetAccountingAgedCreditorsReportRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingAgedCreditorsReport().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = String(requestParameters['reportDate']); + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + if (requestParameters['periodLengthDays'] != null) { + queryParameters['periodLengthDays'] = requestParameters['periodLengthDays']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/agedCreditor`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-accounting-aged-creditors-report', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAgedCreditorReportFromJSON(jsonValue)); + } + + /** + * Returns aged creditors report for company that shows the total balance owed by a business to its suppliers over time. + * Aged creditors report + */ + async getAgedCreditors(requestParameters: GetAccountingAgedCreditorsReportRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingAgedCreditorsReportRaw(requestParameters, options); + return await response.value(); + } + + /** + * Returns aged debtors report for company that shows the total outstanding balance due from customers to the business over time. + * Aged debtors report + */ + private async getAccountingAgedDebtorsReportRaw(requestParameters: GetAccountingAgedDebtorsReportRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingAgedDebtorsReport().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = String(requestParameters['reportDate']); + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + if (requestParameters['periodLengthDays'] != null) { + queryParameters['periodLengthDays'] = requestParameters['periodLengthDays']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/agedDebtor`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'get-accounting-aged-debtors-report', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAgedDebtorReportFromJSON(jsonValue)); + } + + /** + * Returns aged debtors report for company that shows the total outstanding balance due from customers to the business over time. + * Aged debtors report + */ + async getAgedDebtors(requestParameters: GetAccountingAgedDebtorsReportRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingAgedDebtorsReportRaw(requestParameters, options); + return await response.value(); + } + + /** + * Indicates whether the aged creditor report is available for the company. + * Aged creditors report available + */ + private async isAgedCreditorsReportAvailableRaw(requestParameters: IsAgedCreditorsReportAvailableRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling isAgedCreditorsReportAvailable().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/agedCreditor/available`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'is-aged-creditors-report-available', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Indicates whether the aged creditor report is available for the company. + * Aged creditors report available + */ + async isAgedCreditorsAvailable(requestParameters: IsAgedCreditorsReportAvailableRequest, options?: runtime.RequestOptions): Promise { + const response = await this.isAgedCreditorsReportAvailableRaw(requestParameters, options); + return await response.value(); + } + + /** + * Indicates whether the aged debtors report is available for the company. + * Aged debtors report available + */ + private async isAgedDebtorsReportAvailableRaw(requestParameters: IsAgedDebtorsReportAvailableRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling isAgedDebtorsReportAvailable().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/reports/agedDebtor/available`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'is-aged-debtors-report-available', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Indicates whether the aged debtors report is available for the company. + * Aged debtors report available + */ + async isAgedDebtorsAvailable(requestParameters: IsAgedDebtorsReportAvailableRequest, options?: runtime.RequestOptions): Promise { + const response = await this.isAgedDebtorsReportAvailableRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/SalesCustomers.ts b/lending/src/apis/SalesCustomers.ts new file mode 100644 index 000000000..8eed3fc2d --- /dev/null +++ b/lending/src/apis/SalesCustomers.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommerceCustomer, + CommerceCustomers, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceCustomerFromJSON, + CommerceCustomerToJSON, + CommerceCustomersFromJSON, + CommerceCustomersToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceCustomerRequest { + companyId: string; + connectionId: string; + customerId: string; +} + +export interface ListCommerceCustomersRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class CodatLendingCustomers extends runtime.BaseAPI { + + /** + * The *Get customer* endpoint returns a single customer for a given customerId. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and receive goods and/or services from the SMB. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get customer + */ + private async getCommerceCustomerRaw(requestParameters: GetCommerceCustomerRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceCustomer().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceCustomer().' + ); + } + + if (requestParameters['customerId'] == null) { + throw new runtime.RequiredError( + 'customerId', + 'Required parameter "customerId" was null or undefined when calling getCommerceCustomer().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-customers/{customerId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"customerId"}}`, encodeURIComponent(String(requestParameters['customerId']))), + method: 'GET', + operationId: 'get-commerce-customer', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceCustomerFromJSON(jsonValue)); + } + + /** + * The *Get customer* endpoint returns a single customer for a given customerId. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and receive goods and/or services from the SMB. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get customer + */ + async get(requestParameters: GetCommerceCustomerRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceCustomerRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company\'s connection. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and recieve goods and/or services from the SMB. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List customers + */ + private async listCommerceCustomersRaw(requestParameters: ListCommerceCustomersRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommerceCustomers().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommerceCustomers().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-customers`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-customers', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceCustomersFromJSON(jsonValue)); + } + + /** + * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company\'s connection. [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and recieve goods and/or services from the SMB. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List customers + */ + async list(requestParameters: ListCommerceCustomersRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommerceCustomersRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/SalesPayments.ts b/lending/src/apis/SalesPayments.ts new file mode 100644 index 000000000..f3870e9bc --- /dev/null +++ b/lending/src/apis/SalesPayments.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommercePayment, + CommercePayments, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommercePaymentFromJSON, + CommercePaymentToJSON, + CommercePaymentsFromJSON, + CommercePaymentsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommercePaymentRequest { + companyId: string; + connectionId: string; + paymentId: string; +} + +export interface ListCommercePaymentsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class CodatLendingPayments extends runtime.BaseAPI { + + /** + * The *Get payment* endpoint returns a single payment for a given paymentId. [Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get payment + */ + private async getCommercePaymentRaw(requestParameters: GetCommercePaymentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommercePayment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommercePayment().' + ); + } + + if (requestParameters['paymentId'] == null) { + throw new runtime.RequiredError( + 'paymentId', + 'Required parameter "paymentId" was null or undefined when calling getCommercePayment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-payments/{paymentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"paymentId"}}`, encodeURIComponent(String(requestParameters['paymentId']))), + method: 'GET', + operationId: 'get-commerce-payment', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommercePaymentFromJSON(jsonValue)); + } + + /** + * The *Get payment* endpoint returns a single payment for a given paymentId. [Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get payment + */ + async get(requestParameters: GetCommercePaymentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommercePaymentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company\'s connection. [Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List payments + */ + private async listCommercePaymentsRaw(requestParameters: ListCommercePaymentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommercePayments().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommercePayments().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-payments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-payments', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommercePaymentsFromJSON(jsonValue)); + } + + /** + * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company\'s connection. [Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List payments + */ + async list(requestParameters: ListCommercePaymentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommercePaymentsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/SalesReports.ts b/lending/src/apis/SalesReports.ts new file mode 100644 index 000000000..27c4ff766 --- /dev/null +++ b/lending/src/apis/SalesReports.ts @@ -0,0 +1,267 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { PeriodUnit } from '../sdk/models/index'; +import type { + CommerceReport, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceReportFromJSON, + CommerceReportToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceOrdersReportRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; +} + +export interface GetCommerceRefundsReportRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; +} + +/** + * + */ +export class Reports extends runtime.BaseAPI { + + /** + * The *Get orders report* endpoint returns the number of orders, total value, and average order value for a specific company\'s commerce connection over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the order metrics. #### Response structure The Orders report\'s dimensions and measures are: | Index | Dimensions | |---------------|----------------| | `index` = 0 | Period | | `index` = 1 | Order metrics | | Index | Measures | |---------------|------------| | `index` = 0 | Count | | `index` = 1 | Value | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get orders report + */ + private async getCommerceOrdersReportRaw(requestParameters: GetCommerceOrdersReportRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceOrdersReport().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceOrdersReport().' + ); + } + + if (requestParameters['reportDate'] == null) { + throw new runtime.RequiredError( + 'reportDate', + 'Required parameter "reportDate" was null or undefined when calling getCommerceOrdersReport().' + ); + } + + if (requestParameters['periodLength'] == null) { + throw new runtime.RequiredError( + 'periodLength', + 'Required parameter "periodLength" was null or undefined when calling getCommerceOrdersReport().' + ); + } + + if (requestParameters['numberOfPeriods'] == null) { + throw new runtime.RequiredError( + 'numberOfPeriods', + 'Required parameter "numberOfPeriods" was null or undefined when calling getCommerceOrdersReport().' + ); + } + + if (requestParameters['periodUnit'] == null) { + throw new runtime.RequiredError( + 'periodUnit', + 'Required parameter "periodUnit" was null or undefined when calling getCommerceOrdersReport().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = requestParameters['reportDate']; + } + + if (requestParameters['periodLength'] != null) { + queryParameters['periodLength'] = requestParameters['periodLength']; + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + if (requestParameters['periodUnit'] != null) { + queryParameters['periodUnit'] = requestParameters['periodUnit']; + } + + if (requestParameters['includeDisplayNames'] != null) { + queryParameters['includeDisplayNames'] = requestParameters['includeDisplayNames']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/orders`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-commerce-orders-report', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceReportFromJSON(jsonValue)); + } + + /** + * The *Get orders report* endpoint returns the number of orders, total value, and average order value for a specific company\'s commerce connection over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the order metrics. #### Response structure The Orders report\'s dimensions and measures are: | Index | Dimensions | |---------------|----------------| | `index` = 0 | Period | | `index` = 1 | Order metrics | | Index | Measures | |---------------|------------| | `index` = 0 | Count | | `index` = 1 | Value | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get orders report + */ + async getOrders(requestParameters: GetCommerceOrdersReportRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceOrdersReportRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get refunds report* endpoint returns the number and total value of refunds and the refund rate for a specific company\'s commerce connection over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the refunds metrics. #### Response structure The Refunds report\'s dimensions and measures are: | Index | Dimensions | |----------------|----------------| | `index` = 0 | Period | | `index` = 1 | Refund metrics | | Index | Measures | |----------------|------------| | `index` = 0 | Count | | `index` = 1 | Value | | `index` = 2 | Percentage | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get refunds report + */ + private async getCommerceRefundsReportRaw(requestParameters: GetCommerceRefundsReportRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceRefundsReport().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceRefundsReport().' + ); + } + + if (requestParameters['reportDate'] == null) { + throw new runtime.RequiredError( + 'reportDate', + 'Required parameter "reportDate" was null or undefined when calling getCommerceRefundsReport().' + ); + } + + if (requestParameters['periodLength'] == null) { + throw new runtime.RequiredError( + 'periodLength', + 'Required parameter "periodLength" was null or undefined when calling getCommerceRefundsReport().' + ); + } + + if (requestParameters['numberOfPeriods'] == null) { + throw new runtime.RequiredError( + 'numberOfPeriods', + 'Required parameter "numberOfPeriods" was null or undefined when calling getCommerceRefundsReport().' + ); + } + + if (requestParameters['periodUnit'] == null) { + throw new runtime.RequiredError( + 'periodUnit', + 'Required parameter "periodUnit" was null or undefined when calling getCommerceRefundsReport().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['reportDate'] != null) { + queryParameters['reportDate'] = requestParameters['reportDate']; + } + + if (requestParameters['periodLength'] != null) { + queryParameters['periodLength'] = requestParameters['periodLength']; + } + + if (requestParameters['numberOfPeriods'] != null) { + queryParameters['numberOfPeriods'] = requestParameters['numberOfPeriods']; + } + + if (requestParameters['periodUnit'] != null) { + queryParameters['periodUnit'] = requestParameters['periodUnit']; + } + + if (requestParameters['includeDisplayNames'] != null) { + queryParameters['includeDisplayNames'] = requestParameters['includeDisplayNames']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/refunds`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-commerce-refunds-report', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceReportFromJSON(jsonValue)); + } + + /** + * The *Get refunds report* endpoint returns the number and total value of refunds and the refund rate for a specific company\'s commerce connection over one or more periods of time. This detail helps you assess a merchant\'s health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the refunds metrics. #### Response structure The Refunds report\'s dimensions and measures are: | Index | Dimensions | |----------------|----------------| | `index` = 0 | Period | | `index` = 1 | Refund metrics | | Index | Measures | |----------------|------------| | `index` = 0 | Count | | `index` = 1 | Value | | `index` = 2 | Percentage | The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. + * Get refunds report + */ + async getRefunds(requestParameters: GetCommerceRefundsReportRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceRefundsReportRaw(requestParameters, options); + return await response.value(); + } + +} + +/** + * @export + */ +export const GetCommerceOrdersReportPeriodUnitEnum = { + Day: 'Day', + Week: 'Week', + Month: 'Month', + Year: 'Year' +} as const; +export type GetCommerceOrdersReportPeriodUnitEnum = typeof GetCommerceOrdersReportPeriodUnitEnum[keyof typeof GetCommerceOrdersReportPeriodUnitEnum]; +/** + * @export + */ +export const GetCommerceRefundsReportPeriodUnitEnum = { + Day: 'Day', + Week: 'Week', + Month: 'Month', + Year: 'Year' +} as const; +export type GetCommerceRefundsReportPeriodUnitEnum = typeof GetCommerceRefundsReportPeriodUnitEnum[keyof typeof GetCommerceRefundsReportPeriodUnitEnum]; diff --git a/lending/src/apis/SalesTransactions.ts b/lending/src/apis/SalesTransactions.ts new file mode 100644 index 000000000..629894210 --- /dev/null +++ b/lending/src/apis/SalesTransactions.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CommerceTransaction, + CommerceTransactions, + ErrorMessage, +} from '../sdk/models/index'; +import { + CommerceTransactionFromJSON, + CommerceTransactionToJSON, + CommerceTransactionsFromJSON, + CommerceTransactionsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetCommerceTransactionRequest { + companyId: string; + connectionId: string; + transactionId: string; +} + +export interface ListCommerceTransactionsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class CodatLendingSalesTransactions extends runtime.BaseAPI { + + /** + * The *Get transaction* endpoint returns a single transaction for a given transactionId. [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get transaction + */ + private async getCommerceTransactionRaw(requestParameters: GetCommerceTransactionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCommerceTransaction().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCommerceTransaction().' + ); + } + + if (requestParameters['transactionId'] == null) { + throw new runtime.RequiredError( + 'transactionId', + 'Required parameter "transactionId" was null or undefined when calling getCommerceTransaction().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-transactions/{transactionId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters['transactionId']))), + method: 'GET', + operationId: 'get-commerce-transaction', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceTransactionFromJSON(jsonValue)); + } + + /** + * The *Get transaction* endpoint returns a single transaction for a given transactionId. [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get transaction + */ + async get(requestParameters: GetCommerceTransactionRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCommerceTransactionRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company\'s connection. [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List transactions + */ + private async listCommerceTransactionsRaw(requestParameters: ListCommerceTransactionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listCommerceTransactions().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listCommerceTransactions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/commerce-transactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-commerce-transactions', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CommerceTransactionsFromJSON(jsonValue)); + } + + /** + * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company\'s connection. [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List transactions + */ + async list(requestParameters: ListCommerceTransactionsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listCommerceTransactionsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/SourceAccounts.ts b/lending/src/apis/SourceAccounts.ts new file mode 100644 index 000000000..feb768c7f --- /dev/null +++ b/lending/src/apis/SourceAccounts.ts @@ -0,0 +1,214 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type * as shared from '../sdk/models/index'; +import type * as operations from '../sdk/models/_speakeasy_operations'; +import type { + BankFeedBankAccountMapping, + BankFeedBankAccountMappingResponse, + BankFeedMapping, + CreateSourceAccount200Response, + CreateSourceAccountRequestBody, + ErrorMessage, +} from '../sdk/models/index'; +import { + BankFeedBankAccountMappingFromJSON, + BankFeedBankAccountMappingToJSON, + BankFeedBankAccountMappingResponseFromJSON, + BankFeedBankAccountMappingResponseToJSON, + BankFeedMappingFromJSON, + BankFeedMappingToJSON, + CreateSourceAccount200ResponseFromJSON, + CreateSourceAccount200ResponseToJSON, + CreateSourceAccountRequestBodyFromJSON, + CreateSourceAccountRequestBodyToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface CreateBankAccountMappingRequest { + companyId: string; + connectionId: string; + bankFeedBankAccountMapping?: BankFeedBankAccountMapping; +} + +export interface CreateSourceAccountRequest { + companyId: string; + connectionId: string; + requestBody?: CreateSourceAccountRequestBody; +} + +export interface GetBankAccountMappingRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class SourceAccounts extends runtime.BaseAPI { + + /** + * The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account). A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user\'s account in the underlying software). To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint. > **For custom builds only** > > Only use this endpoint if you are building your own account management UI. #### Account mapping variability The method of mapping the source account to the target account varies depending on the accounting software your company uses. #### Mapping options: 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat\'s provided user interface for mapping. 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. ### Integration-specific behavior | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | | --------------------- | ----------- | ---------------- | --------------------------- | | Xero | ✅ | ✅ | | | FreeAgent | ✅ | ✅ | | | Oracle NetSuite | ✅ | ✅ | | | Exact Online (NL) | ✅ | ✅ | | | QuickBooks Online | | | ✅ | | Sage | | | ✅ | + * Create bank feed account mapping + */ + private async createBankAccountMappingRaw(requestParameters: CreateBankAccountMappingRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createBankAccountMapping().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createBankAccountMapping().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'create-bank-account-mapping', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: BankFeedBankAccountMappingToJSON(requestParameters['bankFeedBankAccountMapping']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankFeedBankAccountMappingResponseFromJSON(jsonValue)); + } + + /** + * The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account). A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user\'s account in the underlying software). To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint. > **For custom builds only** > > Only use this endpoint if you are building your own account management UI. #### Account mapping variability The method of mapping the source account to the target account varies depending on the accounting software your company uses. #### Mapping options: 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat\'s provided user interface for mapping. 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. ### Integration-specific behavior | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | | --------------------- | ----------- | ---------------- | --------------------------- | | Xero | ✅ | ✅ | | | FreeAgent | ✅ | ✅ | | | Oracle NetSuite | ✅ | ✅ | | | Exact Online (NL) | ✅ | ✅ | | | QuickBooks Online | | | ✅ | | Sage | | | ✅ | + * Create bank feed account mapping + */ + async createMapping(requestParameters: CreateBankAccountMappingRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createBankAccountMappingRaw(requestParameters, options); + return await response.value(); + } + + /** + * The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat\'s domain. The company can then map the source account to an existing or new target account in their accounting software. > ### Versioning > If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. + * Create source account + */ + private async createSourceAccountRaw(requestParameters: CreateSourceAccountRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createSourceAccount().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createSourceAccount().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'create-source-account', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: CreateSourceAccountRequestBodyToJSON(requestParameters['requestBody']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateSourceAccount200ResponseFromJSON(jsonValue)); + } + + /** + * The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat\'s domain. The company can then map the source account to an existing or new target account in their accounting software. > ### Versioning > If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. + * Create source account + */ + async create(requestParameters: CreateSourceAccountRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createSourceAccountRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts. A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user\'s account in the underlying software). > **For custom builds only** > > Only use this endpoint if you are building your own account management UI. + * List bank feed account mappings + */ + private async getBankAccountMappingRaw(requestParameters: GetBankAccountMappingRequest, options?: runtime.RequestOptions): Promise>> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getBankAccountMapping().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getBankAccountMapping().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-bank-account-mapping', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BankFeedMappingFromJSON)); + } + + /** + * The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts. A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user\'s account in the underlying software). > **For custom builds only** > > Only use this endpoint if you are building your own account management UI. + * List bank feed account mappings + */ + async listMappings(requestParameters: GetBankAccountMappingRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.getBankAccountMappingRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Suppliers.ts b/lending/src/apis/Suppliers.ts new file mode 100644 index 000000000..bb5511fb8 --- /dev/null +++ b/lending/src/apis/Suppliers.ts @@ -0,0 +1,366 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingAttachment, + AccountingSupplier, + AccountingSuppliers, + Attachments, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAttachmentFromJSON, + AccountingAttachmentToJSON, + AccountingSupplierFromJSON, + AccountingSupplierToJSON, + AccountingSuppliersFromJSON, + AccountingSuppliersToJSON, + AttachmentsFromJSON, + AttachmentsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface DownloadAccountingSupplierAttachmentRequest { + companyId: string; + connectionId: string; + supplierId: string; + attachmentId: string; +} + +export interface GetAccountingSupplierRequest { + companyId: string; + supplierId: string; +} + +export interface GetAccountingSupplierAttachmentRequest { + companyId: string; + connectionId: string; + supplierId: string; + attachmentId: string; +} + +export interface ListAccountingSupplierAttachmentsRequest { + companyId: string; + connectionId: string; + supplierId: string; +} + +export interface ListAccountingSuppliersRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Suppliers extends runtime.BaseAPI { + + /** + * The *Download supplier attachment* endpoint downloads a specific attachment for a given `supplierId` and `attachmentId`. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * Download supplier attachment + */ + private async downloadAccountingSupplierAttachmentRaw(requestParameters: DownloadAccountingSupplierAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadAccountingSupplierAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling downloadAccountingSupplierAttachment().' + ); + } + + if (requestParameters['supplierId'] == null) { + throw new runtime.RequiredError( + 'supplierId', + 'Required parameter "supplierId" was null or undefined when calling downloadAccountingSupplierAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling downloadAccountingSupplierAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}/download`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"supplierId"}}`, encodeURIComponent(String(requestParameters['supplierId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'download-accounting-supplier-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.BlobApiResponse(response); + } + + /** + * The *Download supplier attachment* endpoint downloads a specific attachment for a given `supplierId` and `attachmentId`. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * Download supplier attachment + */ + async downloadAttachment(requestParameters: DownloadAccountingSupplierAttachmentRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.downloadAccountingSupplierAttachmentRaw(requestParameters, options); + return response.raw.body as ReadableStream; + } + + /** + * The *Get supplier* endpoint returns a single supplier for a given supplierId. [Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get supplier + */ + private async getAccountingSupplierRaw(requestParameters: GetAccountingSupplierRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingSupplier().' + ); + } + + if (requestParameters['supplierId'] == null) { + throw new runtime.RequiredError( + 'supplierId', + 'Required parameter "supplierId" was null or undefined when calling getAccountingSupplier().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/suppliers/{supplierId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"supplierId"}}`, encodeURIComponent(String(requestParameters['supplierId']))), + method: 'GET', + operationId: 'get-accounting-supplier', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingSupplierFromJSON(jsonValue)); + } + + /** + * The *Get supplier* endpoint returns a single supplier for a given supplierId. [Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get supplier + */ + async get(requestParameters: GetAccountingSupplierRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingSupplierRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get supplier attachment* endpoint returns a specific attachment for a given `supplierId` and `attachmentId`. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * Get supplier attachment + */ + private async getAccountingSupplierAttachmentRaw(requestParameters: GetAccountingSupplierAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingSupplierAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingSupplierAttachment().' + ); + } + + if (requestParameters['supplierId'] == null) { + throw new runtime.RequiredError( + 'supplierId', + 'Required parameter "supplierId" was null or undefined when calling getAccountingSupplierAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling getAccountingSupplierAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"supplierId"}}`, encodeURIComponent(String(requestParameters['supplierId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'get-accounting-supplier-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAttachmentFromJSON(jsonValue)); + } + + /** + * The *Get supplier attachment* endpoint returns a specific attachment for a given `supplierId` and `attachmentId`. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * Get supplier attachment + */ + async getAttachment(requestParameters: GetAccountingSupplierAttachmentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingSupplierAttachmentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List supplier attachments* endpoint returns a list of attachments available to download for given `supplierId`. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * List supplier attachments + */ + private async listAccountingSupplierAttachmentsRaw(requestParameters: ListAccountingSupplierAttachmentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingSupplierAttachments().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingSupplierAttachments().' + ); + } + + if (requestParameters['supplierId'] == null) { + throw new runtime.RequiredError( + 'supplierId', + 'Required parameter "supplierId" was null or undefined when calling listAccountingSupplierAttachments().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"supplierId"}}`, encodeURIComponent(String(requestParameters['supplierId']))), + method: 'GET', + operationId: 'list-accounting-supplier-attachments', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentsFromJSON(jsonValue)); + } + + /** + * The *List supplier attachments* endpoint returns a list of attachments available to download for given `supplierId`. [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * List supplier attachments + */ + async listAttachments(requestParameters: ListAccountingSupplierAttachmentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingSupplierAttachmentsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company\'s connection. [Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List suppliers + */ + private async listAccountingSuppliersRaw(requestParameters: ListAccountingSuppliersRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingSuppliers().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/data/suppliers`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))), + method: 'GET', + operationId: 'list-accounting-suppliers', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingSuppliersFromJSON(jsonValue)); + } + + /** + * The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company\'s connection. [Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List suppliers + */ + async list(requestParameters: ListAccountingSuppliersRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingSuppliersRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/TransactionCategories.ts b/lending/src/apis/TransactionCategories.ts new file mode 100644 index 000000000..3219a48bf --- /dev/null +++ b/lending/src/apis/TransactionCategories.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + BankingTransactionCategories, + BankingTransactionCategory, + ErrorMessage, +} from '../sdk/models/index'; +import { + BankingTransactionCategoriesFromJSON, + BankingTransactionCategoriesToJSON, + BankingTransactionCategoryFromJSON, + BankingTransactionCategoryToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetBankingTransactionCategoryRequest { + companyId: string; + connectionId: string; + transactionCategoryId: string; +} + +export interface ListBankingTransactionCategoriesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class TransactionCategories extends runtime.BaseAPI { + + /** + * The *Get transaction category* endpoint returns a single transaction category for a given transactionCategoryId. [Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get transaction category + */ + private async getBankingTransactionCategoryRaw(requestParameters: GetBankingTransactionCategoryRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getBankingTransactionCategory().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getBankingTransactionCategory().' + ); + } + + if (requestParameters['transactionCategoryId'] == null) { + throw new runtime.RequiredError( + 'transactionCategoryId', + 'Required parameter "transactionCategoryId" was null or undefined when calling getBankingTransactionCategory().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/banking-transactionCategories/{transactionCategoryId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"transactionCategoryId"}}`, encodeURIComponent(String(requestParameters['transactionCategoryId']))), + method: 'GET', + operationId: 'get-banking-transaction-category', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankingTransactionCategoryFromJSON(jsonValue)); + } + + /** + * The *Get transaction category* endpoint returns a single transaction category for a given transactionCategoryId. [Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get transaction category + */ + async get(requestParameters: GetBankingTransactionCategoryRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getBankingTransactionCategoryRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List transaction categories* endpoint returns a list of [transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) for a given company\'s connection. [Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List transaction categories + */ + private async listBankingTransactionCategoriesRaw(requestParameters: ListBankingTransactionCategoriesRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listBankingTransactionCategories().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listBankingTransactionCategories().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/banking-transactionCategories`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-banking-transaction-categories', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankingTransactionCategoriesFromJSON(jsonValue)); + } + + /** + * The *List transaction categories* endpoint returns a list of [transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) for a given company\'s connection. [Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List transaction categories + */ + async list(requestParameters: ListBankingTransactionCategoriesRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listBankingTransactionCategoriesRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Transactions.ts b/lending/src/apis/Transactions.ts new file mode 100644 index 000000000..41064bb87 --- /dev/null +++ b/lending/src/apis/Transactions.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + BankingTransaction, + BankingTransactions, + ErrorMessage, +} from '../sdk/models/index'; +import { + BankingTransactionFromJSON, + BankingTransactionToJSON, + BankingTransactionsFromJSON, + BankingTransactionsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetBankingTransactionRequest { + companyId: string; + connectionId: string; + transactionId: string; +} + +export interface ListBankingTransactionsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class CodatLendingTransactions extends runtime.BaseAPI { + + /** + * The *Get transaction* endpoint returns a single transaction for a given transactionId. [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get bank transaction + */ + private async getBankingTransactionRaw(requestParameters: GetBankingTransactionRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getBankingTransaction().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getBankingTransaction().' + ); + } + + if (requestParameters['transactionId'] == null) { + throw new runtime.RequiredError( + 'transactionId', + 'Required parameter "transactionId" was null or undefined when calling getBankingTransaction().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/banking-transactions/{transactionId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters['transactionId']))), + method: 'GET', + operationId: 'get-banking-transaction', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankingTransactionFromJSON(jsonValue)); + } + + /** + * The *Get transaction* endpoint returns a single transaction for a given transactionId. [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get bank transaction + */ + async get(requestParameters: GetBankingTransactionRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getBankingTransactionRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company\'s connection. [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List transactions + */ + private async listBankingTransactionsRaw(requestParameters: ListBankingTransactionsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listBankingTransactions().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listBankingTransactions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/banking-transactions`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-banking-transactions', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => BankingTransactionsFromJSON(jsonValue)); + } + + /** + * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company\'s connection. [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List transactions + */ + async list(requestParameters: ListBankingTransactionsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listBankingTransactionsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/TransactionsDirectCosts.ts b/lending/src/apis/TransactionsDirectCosts.ts new file mode 100644 index 000000000..ff75f0bba --- /dev/null +++ b/lending/src/apis/TransactionsDirectCosts.ts @@ -0,0 +1,382 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingAttachment, + AccountingDirectCost, + AccountingDirectCosts, + Attachments, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingAttachmentFromJSON, + AccountingAttachmentToJSON, + AccountingDirectCostFromJSON, + AccountingDirectCostToJSON, + AccountingDirectCostsFromJSON, + AccountingDirectCostsToJSON, + AttachmentsFromJSON, + AttachmentsToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface DownloadAccountingDirectCostAttachmentRequest { + companyId: string; + connectionId: string; + directCostId: string; + attachmentId: string; +} + +export interface GetAccountingDirectCostRequest { + companyId: string; + connectionId: string; + directCostId: string; +} + +export interface GetAccountingDirectCostAttachmentRequest { + companyId: string; + connectionId: string; + directCostId: string; + attachmentId: string; +} + +export interface ListAccountingDirectCostAttachmentsRequest { + companyId: string; + connectionId: string; + directCostId: string; +} + +export interface ListAccountingDirectCostsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class DirectCosts extends runtime.BaseAPI { + + /** + * The *Download direct cost attachment* endpoint downloads a specific attachment for a given `directCostId` and `attachmentId`. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. + * Download direct cost attachment + */ + private async downloadAccountingDirectCostAttachmentRaw(requestParameters: DownloadAccountingDirectCostAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling downloadAccountingDirectCostAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling downloadAccountingDirectCostAttachment().' + ); + } + + if (requestParameters['directCostId'] == null) { + throw new runtime.RequiredError( + 'directCostId', + 'Required parameter "directCostId" was null or undefined when calling downloadAccountingDirectCostAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling downloadAccountingDirectCostAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Accept'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments/{attachmentId}/download`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"directCostId"}}`, encodeURIComponent(String(requestParameters['directCostId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'download-accounting-direct-cost-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.BlobApiResponse(response); + } + + /** + * The *Download direct cost attachment* endpoint downloads a specific attachment for a given `directCostId` and `attachmentId`. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. + * Download direct cost attachment + */ + async downloadAttachment(requestParameters: DownloadAccountingDirectCostAttachmentRequest, options?: runtime.RequestOptions): Promise> { + const response = await this.downloadAccountingDirectCostAttachmentRaw(requestParameters, options); + return response.raw.body as ReadableStream; + } + + /** + * The *Get direct cost* endpoint returns a single direct cost for a given directCostId. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get direct cost + */ + private async getAccountingDirectCostRaw(requestParameters: GetAccountingDirectCostRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingDirectCost().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingDirectCost().' + ); + } + + if (requestParameters['directCostId'] == null) { + throw new runtime.RequiredError( + 'directCostId', + 'Required parameter "directCostId" was null or undefined when calling getAccountingDirectCost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"directCostId"}}`, encodeURIComponent(String(requestParameters['directCostId']))), + method: 'GET', + operationId: 'get-accounting-direct-cost', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingDirectCostFromJSON(jsonValue)); + } + + /** + * The *Get direct cost* endpoint returns a single direct cost for a given directCostId. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * Get direct cost + */ + async get(requestParameters: GetAccountingDirectCostRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingDirectCostRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get direct cost attachment* endpoint returns a specific attachment for a given `directCostId` and `attachmentId`. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. + * Get direct cost attachment + */ + private async getAccountingDirectCostAttachmentRaw(requestParameters: GetAccountingDirectCostAttachmentRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingDirectCostAttachment().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingDirectCostAttachment().' + ); + } + + if (requestParameters['directCostId'] == null) { + throw new runtime.RequiredError( + 'directCostId', + 'Required parameter "directCostId" was null or undefined when calling getAccountingDirectCostAttachment().' + ); + } + + if (requestParameters['attachmentId'] == null) { + throw new runtime.RequiredError( + 'attachmentId', + 'Required parameter "attachmentId" was null or undefined when calling getAccountingDirectCostAttachment().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments/{attachmentId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"directCostId"}}`, encodeURIComponent(String(requestParameters['directCostId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))), + method: 'GET', + operationId: 'get-accounting-direct-cost-attachment', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingAttachmentFromJSON(jsonValue)); + } + + /** + * The *Get direct cost attachment* endpoint returns a specific attachment for a given `directCostId` and `attachmentId`. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. + * Get direct cost attachment + */ + async getAttachment(requestParameters: GetAccountingDirectCostAttachmentRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingDirectCostAttachmentRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List direct cost attachments* endpoint returns a list of attachments available to download for given `directCostId`. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. + * List direct cost attachments + */ + private async listAccountingDirectCostAttachmentsRaw(requestParameters: ListAccountingDirectCostAttachmentsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingDirectCostAttachments().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingDirectCostAttachments().' + ); + } + + if (requestParameters['directCostId'] == null) { + throw new runtime.RequiredError( + 'directCostId', + 'Required parameter "directCostId" was null or undefined when calling listAccountingDirectCostAttachments().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"directCostId"}}`, encodeURIComponent(String(requestParameters['directCostId']))), + method: 'GET', + operationId: 'list-accounting-direct-cost-attachments', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentsFromJSON(jsonValue)); + } + + /** + * The *List direct cost attachments* endpoint returns a list of attachments available to download for given `directCostId`. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. + * List direct cost attachments + */ + async listAttachments(requestParameters: ListAccountingDirectCostAttachmentsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingDirectCostAttachmentsRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List direct costs* endpoint returns a list of [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company\'s connection. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List direct costs + */ + private async listAccountingDirectCostsRaw(requestParameters: ListAccountingDirectCostsRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingDirectCosts().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingDirectCosts().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/directCosts`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-accounting-direct-costs', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingDirectCostsFromJSON(jsonValue)); + } + + /** + * The *List direct costs* endpoint returns a list of [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company\'s connection. [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don\'t impact Accounts Payable. Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). + * List direct costs + */ + async list(requestParameters: ListAccountingDirectCostsRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingDirectCostsRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/TransactionsTransfers.ts b/lending/src/apis/TransactionsTransfers.ts new file mode 100644 index 000000000..1dbe91e01 --- /dev/null +++ b/lending/src/apis/TransactionsTransfers.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingTransfer, + AccountingTransfers, + ErrorMessage, +} from '../sdk/models/index'; +import { + AccountingTransferFromJSON, + AccountingTransferToJSON, + AccountingTransfersFromJSON, + AccountingTransfersToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../sdk/models/index'; + +export interface GetAccountingTransferRequest { + companyId: string; + connectionId: string; + transferId: string; +} + +export interface ListAccountingTransfersRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} + +/** + * + */ +export class Transfers extends runtime.BaseAPI { + + /** + * The *Get transfer* endpoint returns a single transfer for a given transferId. [Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get transfer + */ + private async getAccountingTransferRaw(requestParameters: GetAccountingTransferRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getAccountingTransfer().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getAccountingTransfer().' + ); + } + + if (requestParameters['transferId'] == null) { + throw new runtime.RequiredError( + 'transferId', + 'Required parameter "transferId" was null or undefined when calling getAccountingTransfer().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/transfers/{transferId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))).replace(`{${"transferId"}}`, encodeURIComponent(String(requestParameters['transferId']))), + method: 'GET', + operationId: 'get-accounting-transfer', + errorStatuses: [401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingTransferFromJSON(jsonValue)); + } + + /** + * The *Get transfer* endpoint returns a single transfer for a given transferId. [Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * Get transfer + */ + async get(requestParameters: GetAccountingTransferRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getAccountingTransferRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *List transfers* endpoint returns a list of [transfers](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company\'s connection. [Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List transfers + */ + private async listAccountingTransfersRaw(requestParameters: ListAccountingTransfersRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling listAccountingTransfers().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling listAccountingTransfers().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + else { + queryParameters['page'] = 1; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + else { + queryParameters['pageSize'] = 100; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['orderBy'] != null) { + queryParameters['orderBy'] = requestParameters['orderBy']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/data/transfers`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'list-accounting-transfers', + errorStatuses: [400, 401, 402, 403, 404, 409, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingTransfersFromJSON(jsonValue)); + } + + /** + * The *List transfers* endpoint returns a list of [transfers](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company\'s connection. [Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). + * List transfers + */ + async list(requestParameters: ListAccountingTransfersRequest, options?: runtime.RequestOptions): Promise { + const response = await this.listAccountingTransfersRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/Transfers.ts b/lending/src/apis/Transfers.ts new file mode 100644 index 000000000..de4a948df --- /dev/null +++ b/lending/src/apis/Transfers.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountingCreateTransferResponse, + AccountingTransfer, + ErrorMessage, + PushOption, +} from '../sdk/models/index'; +import { + AccountingCreateTransferResponseFromJSON, + AccountingCreateTransferResponseToJSON, + AccountingTransferFromJSON, + AccountingTransferToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + PushOptionFromJSON, + PushOptionToJSON, +} from '../sdk/models/index'; + +export interface CreateTransferRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingTransfer?: AccountingTransfer; +} + +export interface GetCreateTransfersModelRequest { + companyId: string; + connectionId: string; +} + +/** + * + */ +export class CodatLendingTransfers extends runtime.BaseAPI { + + /** + * The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company\'s connection. [Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/lending-api#/operations/get-create-transfers-model). + * Create transfer + */ + private async createTransferRaw(requestParameters: CreateTransferRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling createTransfer().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling createTransfer().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeoutInMinutes'] != null) { + queryParameters['timeoutInMinutes'] = requestParameters['timeoutInMinutes']; + } + + if (requestParameters['allowSyncOnPushComplete'] != null) { + queryParameters['allowSyncOnPushComplete'] = requestParameters['allowSyncOnPushComplete']; + } + else { + queryParameters['allowSyncOnPushComplete'] = true; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/push/transfers`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'POST', + operationId: 'create-transfer', + errorStatuses: [400, 401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + body: AccountingTransferToJSON(requestParameters['accountingTransfer']), + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccountingCreateTransferResponseFromJSON(jsonValue)); + } + + /** + * The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company\'s connection. [Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. **Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/lending-api#/operations/get-create-transfers-model). + * Create transfer + */ + async create(requestParameters: CreateTransferRequest, options?: runtime.RequestOptions): Promise { + const response = await this.createTransferRaw(requestParameters, options); + return await response.value(); + } + + /** + * The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company and integration. [Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create transfer model + */ + private async getCreateTransfersModelRaw(requestParameters: GetCreateTransfersModelRequest, options?: runtime.RequestOptions): Promise> { + if (requestParameters['companyId'] == null) { + throw new runtime.RequiredError( + 'companyId', + 'Required parameter "companyId" was null or undefined when calling getCreateTransfersModel().' + ); + } + + if (requestParameters['connectionId'] == null) { + throw new runtime.RequiredError( + 'connectionId', + 'Required parameter "connectionId" was null or undefined when calling getCreateTransfersModel().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth_header authentication + } + + const response = await this.request({ + path: `/companies/{companyId}/connections/{connectionId}/options/transfers`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters['companyId']))).replace(`{${"connectionId"}}`, encodeURIComponent(String(requestParameters['connectionId']))), + method: 'GET', + operationId: 'get-create-transfers-model', + errorStatuses: [401, 402, 403, 404, 429, 500, 503, ], + headers: headerParameters, + query: queryParameters, + }, options); + + return new runtime.JSONApiResponse(response, (jsonValue) => PushOptionFromJSON(jsonValue)); + } + + /** + * The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company and integration. [Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. **Integration-specific behavior** See the *response examples* for integration-specific indicative models. + * Get create transfer model + */ + async getCreateModel(requestParameters: GetCreateTransfersModelRequest, options?: runtime.RequestOptions): Promise { + const response = await this.getCreateTransfersModelRaw(requestParameters, options); + return await response.value(); + } + +} diff --git a/lending/src/apis/index.ts b/lending/src/apis/index.ts new file mode 100644 index 000000000..7615b5b69 --- /dev/null +++ b/lending/src/apis/index.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AccountBalances'; +export * from './AccountTransactions'; +export * from './AccountingBankData'; +export * from './Accounts'; +export * from './BalanceSheet'; +export * from './BankAccounts'; +export * from './BankStatements'; +export * from './BankTransactions'; +export * from './BankingAccounts'; +export * from './BillCreditNotes'; +export * from './BillPayments'; +export * from './Bills'; +export * from './CashFlow'; +export * from './CategorizedStatement'; +export * from './Companies'; +export * from './CompanyInfo'; +export * from './Connections'; +export * from './CreateOperations'; +export * from './CreditNotes'; +export * from './Customers'; +export * from './DataIntegrity'; +export * from './DirectCosts'; +export * from './DirectIncomes'; +export * from './Disputes'; +export * from './ExcelReports'; +export * from './FileUpload'; +export * from './FinancialStatementsAccounts'; +export * from './FinancialSummary'; +export * from './Invoices'; +export * from './JournalEntries'; +export * from './Journals'; +export * from './Liabilities'; +export * from './LoanWritebackAccounts'; +export * from './LoanWritebackPayments'; +export * from './LoanWritebackSuppliers'; +export * from './Locations'; +export * from './ManageData'; +export * from './ManageReports'; +export * from './Metrics'; +export * from './Orders'; +export * from './PaymentMethods'; +export * from './Payments'; +export * from './ProductCategories'; +export * from './Products'; +export * from './ProfitAndLoss'; +export * from './PullOperations'; +export * from './Refresh'; +export * from './Reports'; +export * from './SalesCustomers'; +export * from './SalesPayments'; +export * from './SalesReports'; +export * from './SalesTransactions'; +export * from './SourceAccounts'; +export * from './Suppliers'; +export * from './TransactionCategories'; +export * from './Transactions'; +export * from './TransactionsDirectCosts'; +export * from './TransactionsTransfers'; +export * from './Transfers'; diff --git a/lending/src/core.ts b/lending/src/core.ts index 818188522..9e317834d 100644 --- a/lending/src/core.ts +++ b/lending/src/core.ts @@ -1,13 +1,4 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { ClientSDK } from "./lib/sdks.js"; - -/** - * A minimal client to use when calling standalone SDK functions. Typically, an - * instance of this class would be instantiated once at the start of an - * application and passed around through some dependency injection mechanism to - * parts of an application that need to make SDK calls. - */ -export class CodatLendingCore extends ClientSDK {} +export { CodatLending, CodatLending as CodatLendingCore } from './sdk'; diff --git a/lending/src/funcs/_adapter.ts b/lending/src/funcs/_adapter.ts new file mode 100644 index 000000000..56e5acd53 --- /dev/null +++ b/lending/src/funcs/_adapter.ts @@ -0,0 +1,13 @@ +/* tslint:disable */ +/* eslint-disable */ + +import { OK, ERR } from "../sdk/types/fp"; +import type { Result } from "../sdk/types/fp"; + +export async function toResult(call: () => Promise): Promise> { + try { + return OK(await call()); + } catch (err) { + return ERR(err instanceof Error ? err : new Error(String(err))); + } +} diff --git a/lending/src/funcs/accountingBankDataAccountsGet.ts b/lending/src/funcs/accountingBankDataAccountsGet.ts index c61bd490d..8fd1341d2 100644 --- a/lending/src/funcs/accountingBankDataAccountsGet.ts +++ b/lending/src/funcs/accountingBankDataAccountsGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get bank account - * - * @remarks - * The *Get bank account* endpoint returns a single account for a given accountId. - * - * [Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountingBankDataAccountsGet( - client: CodatLendingCore, - request: operations.GetAccountingBankAccountRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBankAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingBankAccountRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBankAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingBankAccountRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - accountId: encodeSimple("accountId", payload.accountId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-bank-account", - oAuth2Scopes: null, +type Call = CodatLending["accountingBankData"]["accounts"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBankAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBankAccount$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountingBankDataAccountsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountingBankData.accounts.get(request, options))); } diff --git a/lending/src/funcs/accountingBankDataAccountsList.ts b/lending/src/funcs/accountingBankDataAccountsList.ts index a36205a0b..d21f273bf 100644 --- a/lending/src/funcs/accountingBankDataAccountsList.ts +++ b/lending/src/funcs/accountingBankDataAccountsList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List bank accounts - * - * @remarks - * The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company's connection. - * - * [Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountingBankDataAccountsList( - client: CodatLendingCore, - request: operations.ListAccountingBankAccountsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBankAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingBankAccountsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBankAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingBankAccountsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/bankAccounts", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-bank-accounts", - oAuth2Scopes: null, +type Call = CodatLending["accountingBankData"]["accounts"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBankAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBankAccounts$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountingBankDataAccountsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountingBankData.accounts.list(request, options))); } diff --git a/lending/src/funcs/accountingBankDataListTransactions.ts b/lending/src/funcs/accountingBankDataListTransactions.ts index 636bd2627..6baa4e618 100644 --- a/lending/src/funcs/accountingBankDataListTransactions.ts +++ b/lending/src/funcs/accountingBankDataListTransactions.ts @@ -1,215 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List bank account transactions - * - * @remarks - * The *List account bank transactions* endpoint returns a list of [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company's connection. - * - * [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function accountingBankDataListTransactions( - client: CodatLendingCore, - request: operations.ListAccountingBankAccountTransactionsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBankTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingBankAccountTransactionsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBankTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingBankAccountTransactionsRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - accountId: encodeSimple("accountId", payload.accountId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}/bankTransactions", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-bank-account-transactions", - oAuth2Scopes: null, +type Call = CodatLending["accountingBankData"]["listTransactions"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBankTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBankTransactions$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountingBankDataListTransactions( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountingBankData.listTransactions(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillCreditNotesGet.ts b/lending/src/funcs/accountsPayableBillCreditNotesGet.ts index dc72f1de3..9576db5cd 100644 --- a/lending/src/funcs/accountsPayableBillCreditNotesGet.ts +++ b/lending/src/funcs/accountsPayableBillCreditNotesGet.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get bill credit note - * - * @remarks - * The *Get bill credit note* endpoint returns a single bill credit note for a given billCreditNoteId. - * - * [Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsPayableBillCreditNotesGet( - client: CodatLendingCore, - request: operations.GetAccountingBillCreditNoteRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBillCreditNote, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingBillCreditNoteRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBillCreditNote, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingBillCreditNoteRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - billCreditNoteId: encodeSimple( - "billCreditNoteId", - payload.billCreditNoteId, - { explode: false, charEncoding: "percent" }, - ), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/data/billCreditNotes/{billCreditNoteId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-bill-credit-note", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["billCreditNotes"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBillCreditNote, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBillCreditNote$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillCreditNotesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.billCreditNotes.get(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillCreditNotesList.ts b/lending/src/funcs/accountsPayableBillCreditNotesList.ts index db750f42c..083985e91 100644 --- a/lending/src/funcs/accountsPayableBillCreditNotesList.ts +++ b/lending/src/funcs/accountsPayableBillCreditNotesList.ts @@ -1,208 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List bill credit notes - * - * @remarks - * The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote) for a given company's connection. - * - * [Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsPayableBillCreditNotesList( - client: CodatLendingCore, - request: operations.ListAccountingBillCreditNotesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBillCreditNotes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingBillCreditNotesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBillCreditNotes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingBillCreditNotesRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/billCreditNotes")( - pathParams, - ); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-bill-credit-notes", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["billCreditNotes"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBillCreditNotes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBillCreditNotes$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillCreditNotesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.billCreditNotes.list(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillPaymentsGet.ts b/lending/src/funcs/accountsPayableBillPaymentsGet.ts index d46958330..307091bba 100644 --- a/lending/src/funcs/accountsPayableBillPaymentsGet.ts +++ b/lending/src/funcs/accountsPayableBillPaymentsGet.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get bill payment - * - * @remarks - * The *Get bill payment* endpoint returns a single bill payment for a given billPaymentId. - * - * [Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsPayableBillPaymentsGet( - client: CodatLendingCore, - request: operations.GetAccountingBillPaymentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBillPayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingBillPaymentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBillPayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingBillPaymentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - billPaymentId: encodeSimple("billPaymentId", payload.billPaymentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/data/billPayments/{billPaymentId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-bill-payment", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["billPayments"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBillPayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBillPayment$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillPaymentsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.billPayments.get(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillPaymentsList.ts b/lending/src/funcs/accountsPayableBillPaymentsList.ts index 37a380b47..f98f08ced 100644 --- a/lending/src/funcs/accountsPayableBillPaymentsList.ts +++ b/lending/src/funcs/accountsPayableBillPaymentsList.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List bill payments - * - * @remarks - * The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment) for a given company's connection. - * - * [Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsPayableBillPaymentsList( - client: CodatLendingCore, - request: operations.ListAccountingBillPaymentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBillPayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingBillPaymentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBillPayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingBillPaymentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/billPayments")( - pathParams, - ); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-bill-payments", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["billPayments"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBillPayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBillPayments$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillPaymentsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.billPayments.list(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillsDownloadAttachment.ts b/lending/src/funcs/accountsPayableBillsDownloadAttachment.ts index 35197cdf3..6d6662391 100644 --- a/lending/src/funcs/accountsPayableBillsDownloadAttachment.ts +++ b/lending/src/funcs/accountsPayableBillsDownloadAttachment.ts @@ -1,207 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Download bill attachment - * - * @remarks - * The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. - * - * [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - */ -export function accountsPayableBillsDownloadAttachment( - client: CodatLendingCore, - request: operations.DownloadAccountingBillAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadAccountingBillAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.DownloadAccountingBillAttachmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - billId: encodeSimple("billId", payload.billId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}/download", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/octet-stream", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-accounting-bill-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["bills"]["downloadAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.stream(200, z.instanceof(ReadableStream)), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillsDownloadAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.bills.downloadAttachment(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillsGet.ts b/lending/src/funcs/accountsPayableBillsGet.ts index c9057ba05..15035637a 100644 --- a/lending/src/funcs/accountsPayableBillsGet.ts +++ b/lending/src/funcs/accountsPayableBillsGet.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get bill - * - * @remarks - * The *Get bill* endpoint returns a single bill for a given billId. - * - * [Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - * - * ### Tips and traps - * - * To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat's cache. - */ -export function accountsPayableBillsGet( - client: CodatLendingCore, - request: operations.GetAccountingBillRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBill, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingBillRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBill, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetAccountingBillRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - billId: encodeSimple("billId", payload.billId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/bills/{billId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-bill", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["bills"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBill, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBill$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.bills.get(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillsGetAttachment.ts b/lending/src/funcs/accountsPayableBillsGetAttachment.ts index d223fec44..68559ef89 100644 --- a/lending/src/funcs/accountsPayableBillsGetAttachment.ts +++ b/lending/src/funcs/accountsPayableBillsGetAttachment.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get bill attachment - * - * @remarks - * The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. - * - * [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - */ -export function accountsPayableBillsGetAttachment( - client: CodatLendingCore, - request: operations.GetAccountingBillAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingBillAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingBillAttachmentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - billId: encodeSimple("billId", payload.billId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-bill-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["bills"]["getAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAttachment$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillsGetAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.bills.getAttachment(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillsList.ts b/lending/src/funcs/accountsPayableBillsList.ts index 3c2acba9d..483dcb049 100644 --- a/lending/src/funcs/accountsPayableBillsList.ts +++ b/lending/src/funcs/accountsPayableBillsList.ts @@ -1,208 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List bills - * - * @remarks - * The *List bills* endpoint returns a list of [bills](https://docs.codat.io/lending-api#/schemas/Bill) for a given company's connection. - * - * [Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - * - * ### Tips and traps - * - * To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat's cache. - */ -export function accountsPayableBillsList( - client: CodatLendingCore, - request: operations.ListAccountingBillsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBills, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingBillsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBills, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingBillsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/bills")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-bills", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["bills"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBills, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBills$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.bills.list(request, options))); } diff --git a/lending/src/funcs/accountsPayableBillsListAttachments.ts b/lending/src/funcs/accountsPayableBillsListAttachments.ts index 463992944..7236c5c23 100644 --- a/lending/src/funcs/accountsPayableBillsListAttachments.ts +++ b/lending/src/funcs/accountsPayableBillsListAttachments.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List bill attachments - * - * @remarks - * The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. - * - * [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - */ -export function accountsPayableBillsListAttachments( - client: CodatLendingCore, - request: operations.ListAccountingBillAttachmentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingBillAttachmentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingBillAttachmentsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - billId: encodeSimple("billId", payload.billId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-bill-attachments", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["bills"]["listAttachments"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Attachments$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableBillsListAttachments( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.bills.listAttachments(request, options))); } diff --git a/lending/src/funcs/accountsPayableSuppliersDownloadAttachment.ts b/lending/src/funcs/accountsPayableSuppliersDownloadAttachment.ts index 8fb90c5c0..ecb55eba6 100644 --- a/lending/src/funcs/accountsPayableSuppliersDownloadAttachment.ts +++ b/lending/src/funcs/accountsPayableSuppliersDownloadAttachment.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Download supplier attachment - * - * @remarks - * The *Download supplier attachment* endpoint downloads a specific attachment for a given `supplierId` and `attachmentId`. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - */ -export function accountsPayableSuppliersDownloadAttachment( - client: CodatLendingCore, - request: operations.DownloadAccountingSupplierAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadAccountingSupplierAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.DownloadAccountingSupplierAttachmentRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - supplierId: encodeSimple("supplierId", payload.supplierId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}/download", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/octet-stream", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-accounting-supplier-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["suppliers"]["downloadAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.stream(200, z.instanceof(ReadableStream)), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableSuppliersDownloadAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.suppliers.downloadAttachment(request, options))); } diff --git a/lending/src/funcs/accountsPayableSuppliersGet.ts b/lending/src/funcs/accountsPayableSuppliersGet.ts index 6172234db..c1af90e6d 100644 --- a/lending/src/funcs/accountsPayableSuppliersGet.ts +++ b/lending/src/funcs/accountsPayableSuppliersGet.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get supplier - * - * @remarks - * The *Get supplier* endpoint returns a single supplier for a given supplierId. - * - * [Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsPayableSuppliersGet( - client: CodatLendingCore, - request: operations.GetAccountingSupplierRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingSupplier, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingSupplierRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingSupplier, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingSupplierRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - supplierId: encodeSimple("supplierId", payload.supplierId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/suppliers/{supplierId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-supplier", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["suppliers"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingSupplier, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingSupplier$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableSuppliersGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.suppliers.get(request, options))); } diff --git a/lending/src/funcs/accountsPayableSuppliersGetAttachment.ts b/lending/src/funcs/accountsPayableSuppliersGetAttachment.ts index c5141c10f..e3b7120a6 100644 --- a/lending/src/funcs/accountsPayableSuppliersGetAttachment.ts +++ b/lending/src/funcs/accountsPayableSuppliersGetAttachment.ts @@ -1,207 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get supplier attachment - * - * @remarks - * The *Get supplier attachment* endpoint returns a specific attachment for a given `supplierId` and `attachmentId`. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - */ -export function accountsPayableSuppliersGetAttachment( - client: CodatLendingCore, - request: operations.GetAccountingSupplierAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingSupplierAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingSupplierAttachmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - supplierId: encodeSimple("supplierId", payload.supplierId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-supplier-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["suppliers"]["getAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAttachment$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableSuppliersGetAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.suppliers.getAttachment(request, options))); } diff --git a/lending/src/funcs/accountsPayableSuppliersList.ts b/lending/src/funcs/accountsPayableSuppliersList.ts index c2f9a6a72..de7efd3e9 100644 --- a/lending/src/funcs/accountsPayableSuppliersList.ts +++ b/lending/src/funcs/accountsPayableSuppliersList.ts @@ -1,204 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List suppliers - * - * @remarks - * The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company's connection. - * - * [Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsPayableSuppliersList( - client: CodatLendingCore, - request: operations.ListAccountingSuppliersRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingSuppliers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingSuppliersRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingSuppliers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingSuppliersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/suppliers")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-suppliers", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["suppliers"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingSuppliers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingSuppliers$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableSuppliersList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.suppliers.list(request, options))); } diff --git a/lending/src/funcs/accountsPayableSuppliersListAttachments.ts b/lending/src/funcs/accountsPayableSuppliersListAttachments.ts index 1608f0dca..a490c104d 100644 --- a/lending/src/funcs/accountsPayableSuppliersListAttachments.ts +++ b/lending/src/funcs/accountsPayableSuppliersListAttachments.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List supplier attachments - * - * @remarks - * The *List supplier attachments* endpoint returns a list of attachments available to download for given `supplierId`. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - */ -export function accountsPayableSuppliersListAttachments( - client: CodatLendingCore, - request: operations.ListAccountingSupplierAttachmentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingSupplierAttachmentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingSupplierAttachmentsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - supplierId: encodeSimple("supplierId", payload.supplierId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-supplier-attachments", - oAuth2Scopes: null, +type Call = CodatLending["accountsPayable"]["suppliers"]["listAttachments"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Attachments$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsPayableSuppliersListAttachments( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsPayable.suppliers.listAttachments(request, options))); } diff --git a/lending/src/funcs/accountsReceivableCreditNotesGet.ts b/lending/src/funcs/accountsReceivableCreditNotesGet.ts index b3402e546..ada8ec2cf 100644 --- a/lending/src/funcs/accountsReceivableCreditNotesGet.ts +++ b/lending/src/funcs/accountsReceivableCreditNotesGet.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get credit note - * - * @remarks - * The *Get credit note* endpoint returns a single credit note for a given creditNoteId. - * - * [Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsReceivableCreditNotesGet( - client: CodatLendingCore, - request: operations.GetAccountingCreditNoteRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreditNote, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingCreditNoteRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreditNote, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingCreditNoteRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - creditNoteId: encodeSimple("creditNoteId", payload.creditNoteId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/data/creditNotes/{creditNoteId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-credit-note", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["creditNotes"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreditNote, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreditNote$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableCreditNotesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.creditNotes.get(request, options))); } diff --git a/lending/src/funcs/accountsReceivableCreditNotesList.ts b/lending/src/funcs/accountsReceivableCreditNotesList.ts index fad520c7e..acd225652 100644 --- a/lending/src/funcs/accountsReceivableCreditNotesList.ts +++ b/lending/src/funcs/accountsReceivableCreditNotesList.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List credit notes - * - * @remarks - * The *List credit notes* endpoint returns a list of [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote) for a given company's connection. - * - * [Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsReceivableCreditNotesList( - client: CodatLendingCore, - request: operations.ListAccountingCreditNotesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreditNotes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingCreditNotesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreditNotes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingCreditNotesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/creditNotes")( - pathParams, - ); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-credit-notes", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["creditNotes"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreditNotes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreditNotes$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableCreditNotesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.creditNotes.list(request, options))); } diff --git a/lending/src/funcs/accountsReceivableCustomersDownloadAttachment.ts b/lending/src/funcs/accountsReceivableCustomersDownloadAttachment.ts index 0d93b67b3..8f9279b10 100644 --- a/lending/src/funcs/accountsReceivableCustomersDownloadAttachment.ts +++ b/lending/src/funcs/accountsReceivableCustomersDownloadAttachment.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Download customer attachment - * - * @remarks - * The *Download customer attachment* endpoint downloads a specific attachment for a given `customerId` and `attachmentId`. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - */ -export function accountsReceivableCustomersDownloadAttachment( - client: CodatLendingCore, - request: operations.DownloadAccountingCustomerAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadAccountingCustomerAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.DownloadAccountingCustomerAttachmentRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - customerId: encodeSimple("customerId", payload.customerId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments/{attachmentId}/download", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/octet-stream", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-accounting-customer-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["customers"]["downloadAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.stream(200, z.instanceof(ReadableStream)), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableCustomersDownloadAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.customers.downloadAttachment(request, options))); } diff --git a/lending/src/funcs/accountsReceivableCustomersGet.ts b/lending/src/funcs/accountsReceivableCustomersGet.ts index dbdfbcb1f..863b0cf8c 100644 --- a/lending/src/funcs/accountsReceivableCustomersGet.ts +++ b/lending/src/funcs/accountsReceivableCustomersGet.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get customer - * - * @remarks - * The *Get customer* endpoint returns a single customer for a given customerId. - * - * [Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsReceivableCustomersGet( - client: CodatLendingCore, - request: operations.GetAccountingCustomerRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCustomer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingCustomerRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCustomer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingCustomerRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - customerId: encodeSimple("customerId", payload.customerId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/customers/{customerId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-customer", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["customers"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCustomer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCustomer$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableCustomersGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.customers.get(request, options))); } diff --git a/lending/src/funcs/accountsReceivableCustomersGetAttachment.ts b/lending/src/funcs/accountsReceivableCustomersGetAttachment.ts index b5e619add..4ffb65088 100644 --- a/lending/src/funcs/accountsReceivableCustomersGetAttachment.ts +++ b/lending/src/funcs/accountsReceivableCustomersGetAttachment.ts @@ -1,207 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get customer attachment - * - * @remarks - * The *Get customer attachment* endpoint returns a specific attachment for a given `customerId` and `attachmentId`. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - */ -export function accountsReceivableCustomersGetAttachment( - client: CodatLendingCore, - request: operations.GetAccountingCustomerAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingCustomerAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingCustomerAttachmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - customerId: encodeSimple("customerId", payload.customerId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments/{attachmentId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-customer-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["customers"]["getAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAttachment$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableCustomersGetAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.customers.getAttachment(request, options))); } diff --git a/lending/src/funcs/accountsReceivableCustomersList.ts b/lending/src/funcs/accountsReceivableCustomersList.ts index 7d0046d37..4155d5a2f 100644 --- a/lending/src/funcs/accountsReceivableCustomersList.ts +++ b/lending/src/funcs/accountsReceivableCustomersList.ts @@ -1,204 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List customers - * - * @remarks - * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company's connection. - * - * [Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsReceivableCustomersList( - client: CodatLendingCore, - request: operations.ListAccountingCustomersRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCustomers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingCustomersRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCustomers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingCustomersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/customers")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-customers", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["customers"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCustomers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCustomers$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableCustomersList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.customers.list(request, options))); } diff --git a/lending/src/funcs/accountsReceivableCustomersListAttachments.ts b/lending/src/funcs/accountsReceivableCustomersListAttachments.ts index bf11578ee..ca6712ac7 100644 --- a/lending/src/funcs/accountsReceivableCustomersListAttachments.ts +++ b/lending/src/funcs/accountsReceivableCustomersListAttachments.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List customer attachments - * - * @remarks - * The *List customer attachments* endpoint returns a list of attachments avialable to download for given `customerId`. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - */ -export function accountsReceivableCustomersListAttachments( - client: CodatLendingCore, - request: operations.ListAccountingCustomerAttachmentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingCustomerAttachmentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingCustomerAttachmentsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - customerId: encodeSimple("customerId", payload.customerId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-customer-attachments", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["customers"]["listAttachments"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Attachments$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableCustomersListAttachments( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.customers.listAttachments(request, options))); } diff --git a/lending/src/funcs/accountsReceivableDirectIncomesDownloadAttachment.ts b/lending/src/funcs/accountsReceivableDirectIncomesDownloadAttachment.ts index f3cc96fa0..dfd9e3585 100644 --- a/lending/src/funcs/accountsReceivableDirectIncomesDownloadAttachment.ts +++ b/lending/src/funcs/accountsReceivableDirectIncomesDownloadAttachment.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Download direct income attachment - * - * @remarks - * The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - */ -export function accountsReceivableDirectIncomesDownloadAttachment( - client: CodatLendingCore, - request: operations.DownloadAccountingDirectIncomeAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadAccountingDirectIncomeAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.DownloadAccountingDirectIncomeAttachmentRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - directIncomeId: encodeSimple("directIncomeId", payload.directIncomeId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}/download", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/octet-stream", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-accounting-direct-income-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["directIncomes"]["downloadAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.stream(200, z.instanceof(ReadableStream)), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableDirectIncomesDownloadAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.directIncomes.downloadAttachment(request, options))); } diff --git a/lending/src/funcs/accountsReceivableDirectIncomesGet.ts b/lending/src/funcs/accountsReceivableDirectIncomesGet.ts index ec1c2358a..af77da12d 100644 --- a/lending/src/funcs/accountsReceivableDirectIncomesGet.ts +++ b/lending/src/funcs/accountsReceivableDirectIncomesGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get direct income - * - * @remarks - * The *Get direct income* endpoint returns a single direct income for a given directIncomeId. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function accountsReceivableDirectIncomesGet( - client: CodatLendingCore, - request: operations.GetAccountingDirectIncomeRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingDirectIncome, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingDirectIncomeRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingDirectIncome, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingDirectIncomeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - directIncomeId: encodeSimple("directIncomeId", payload.directIncomeId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-direct-income", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["directIncomes"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingDirectIncome, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingDirectIncome$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableDirectIncomesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.directIncomes.get(request, options))); } diff --git a/lending/src/funcs/accountsReceivableDirectIncomesGetAttachment.ts b/lending/src/funcs/accountsReceivableDirectIncomesGetAttachment.ts index 9516cf38f..a3672d3e2 100644 --- a/lending/src/funcs/accountsReceivableDirectIncomesGetAttachment.ts +++ b/lending/src/funcs/accountsReceivableDirectIncomesGetAttachment.ts @@ -1,211 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get direct income attachment - * - * @remarks - * The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - */ -export function accountsReceivableDirectIncomesGetAttachment( - client: CodatLendingCore, - request: operations.GetAccountingDirectIncomeAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingDirectIncomeAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingDirectIncomeAttachmentRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - directIncomeId: encodeSimple("directIncomeId", payload.directIncomeId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}", - )(pathParams); - - const query = encodeFormQuery({ - "timeoutInMinutes": payload.timeoutInMinutes, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-direct-income-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["directIncomes"]["getAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAttachment$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableDirectIncomesGetAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.directIncomes.getAttachment(request, options))); } diff --git a/lending/src/funcs/accountsReceivableDirectIncomesList.ts b/lending/src/funcs/accountsReceivableDirectIncomesList.ts index cdfc1ee6d..c36df170e 100644 --- a/lending/src/funcs/accountsReceivableDirectIncomesList.ts +++ b/lending/src/funcs/accountsReceivableDirectIncomesList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List direct incomes - * - * @remarks - * The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) for a given company's connection. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function accountsReceivableDirectIncomesList( - client: CodatLendingCore, - request: operations.ListAccountingDirectIncomesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingDirectIncomes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingDirectIncomesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingDirectIncomes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingDirectIncomesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directIncomes", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-direct-incomes", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["directIncomes"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingDirectIncomes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingDirectIncomes$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableDirectIncomesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.directIncomes.list(request, options))); } diff --git a/lending/src/funcs/accountsReceivableDirectIncomesListAttachments.ts b/lending/src/funcs/accountsReceivableDirectIncomesListAttachments.ts index 3447460b6..1a6235855 100644 --- a/lending/src/funcs/accountsReceivableDirectIncomesListAttachments.ts +++ b/lending/src/funcs/accountsReceivableDirectIncomesListAttachments.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List direct income attachments - * - * @remarks - * The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - */ -export function accountsReceivableDirectIncomesListAttachments( - client: CodatLendingCore, - request: operations.ListAccountingDirectIncomeAttachmentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingDirectIncomeAttachmentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingDirectIncomeAttachmentsRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - directIncomeId: encodeSimple("directIncomeId", payload.directIncomeId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-direct-income-attachments", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["directIncomes"]["listAttachments"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Attachments$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableDirectIncomesListAttachments( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.directIncomes.listAttachments(request, options))); } diff --git a/lending/src/funcs/accountsReceivableInvoicesDownloadAttachment.ts b/lending/src/funcs/accountsReceivableInvoicesDownloadAttachment.ts index 2e1ec215a..fdf17370c 100644 --- a/lending/src/funcs/accountsReceivableInvoicesDownloadAttachment.ts +++ b/lending/src/funcs/accountsReceivableInvoicesDownloadAttachment.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Download invoice attachment - * - * @remarks - * The *Download invoice attachment* endpoint downloads a specific attachment for a given `invoiceId` and `attachmentId`. - * - * [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - */ -export function accountsReceivableInvoicesDownloadAttachment( - client: CodatLendingCore, - request: operations.DownloadAccountingInvoiceAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadAccountingInvoiceAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.DownloadAccountingInvoiceAttachmentRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - invoiceId: encodeSimple("invoiceId", payload.invoiceId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}/download", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/octet-stream", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-accounting-invoice-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["invoices"]["downloadAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.stream(200, z.instanceof(ReadableStream)), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableInvoicesDownloadAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.invoices.downloadAttachment(request, options))); } diff --git a/lending/src/funcs/accountsReceivableInvoicesDownloadPdf.ts b/lending/src/funcs/accountsReceivableInvoicesDownloadPdf.ts index e509c752c..4bfc9150b 100644 --- a/lending/src/funcs/accountsReceivableInvoicesDownloadPdf.ts +++ b/lending/src/funcs/accountsReceivableInvoicesDownloadPdf.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get invoice as PDF - * - * @remarks - * Download invoice as a pdf. - */ -export function accountsReceivableInvoicesDownloadPdf( - client: CodatLendingCore, - request: operations.DownloadAccountingInvoicePdfRequest, - options?: RequestOptions, -): APIPromise< - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadAccountingInvoicePdfRequest, - options?: RequestOptions, -): Promise< - [ - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.DownloadAccountingInvoicePdfRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - invoiceId: encodeSimple("invoiceId", payload.invoiceId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/data/invoices/{invoiceId}/pdf", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/pdf", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-accounting-invoice-pdf", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["invoices"]["downloadPdf"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.stream(200, z.instanceof(ReadableStream), { - ctype: "application/pdf", - }), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableInvoicesDownloadPdf( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.invoices.downloadPdf(request, options))); } diff --git a/lending/src/funcs/accountsReceivableInvoicesGet.ts b/lending/src/funcs/accountsReceivableInvoicesGet.ts index 887c90e9a..13043db89 100644 --- a/lending/src/funcs/accountsReceivableInvoicesGet.ts +++ b/lending/src/funcs/accountsReceivableInvoicesGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get invoice - * - * @remarks - * The *Get invoice* endpoint returns a single invoice for a given invoiceId. - * - * [Invoices](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - * - * ### Tips and traps - * - * To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat's cache. - */ -export function accountsReceivableInvoicesGet( - client: CodatLendingCore, - request: operations.GetAccountingInvoiceRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingInvoice, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingInvoiceRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingInvoice, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingInvoiceRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - invoiceId: encodeSimple("invoiceId", payload.invoiceId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/invoices/{invoiceId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-invoice", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["invoices"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingInvoice, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingInvoice$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableInvoicesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.invoices.get(request, options))); } diff --git a/lending/src/funcs/accountsReceivableInvoicesGetAttachment.ts b/lending/src/funcs/accountsReceivableInvoicesGetAttachment.ts index 4ca33ed77..5f2bc5578 100644 --- a/lending/src/funcs/accountsReceivableInvoicesGetAttachment.ts +++ b/lending/src/funcs/accountsReceivableInvoicesGetAttachment.ts @@ -1,207 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get invoice attachment - * - * @remarks - * The *Get invoice attachment* endpoint returns a specific attachment for a given `invoiceId` and `attachmentId`. - * - * [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - */ -export function accountsReceivableInvoicesGetAttachment( - client: CodatLendingCore, - request: operations.GetAccountingInvoiceAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingInvoiceAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingInvoiceAttachmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - invoiceId: encodeSimple("invoiceId", payload.invoiceId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-invoice-attachment", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["invoices"]["getAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAttachment$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableInvoicesGetAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.invoices.getAttachment(request, options))); } diff --git a/lending/src/funcs/accountsReceivableInvoicesList.ts b/lending/src/funcs/accountsReceivableInvoicesList.ts index 9f04482f3..4d952286e 100644 --- a/lending/src/funcs/accountsReceivableInvoicesList.ts +++ b/lending/src/funcs/accountsReceivableInvoicesList.ts @@ -1,215 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List invoices - * - * @remarks - * The *List invoices* endpoint returns a list of [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) for a given company's connection. - * - * [Invoices](https://docs.codat.io/lending-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/lending-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). - * - * ### Tips and traps - * - * To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat's cache. - */ -export function accountsReceivableInvoicesList( - client: CodatLendingCore, - request: operations.ListAccountingInvoicesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingInvoices, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingInvoicesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingInvoices, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingInvoicesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/invoices")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-invoices", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["invoices"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingInvoices, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingInvoices$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableInvoicesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.invoices.list(request, options))); } diff --git a/lending/src/funcs/accountsReceivableInvoicesListAttachments.ts b/lending/src/funcs/accountsReceivableInvoicesListAttachments.ts index c1c822db8..934464742 100644 --- a/lending/src/funcs/accountsReceivableInvoicesListAttachments.ts +++ b/lending/src/funcs/accountsReceivableInvoicesListAttachments.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List invoice attachments - * - * @remarks - * The *List invoice attachments* endpoint returns a list of attachments available to download for given `invoiceId`. - * - * [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - */ -export function accountsReceivableInvoicesListAttachments( - client: CodatLendingCore, - request: operations.ListAccountingInvoiceAttachmentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingInvoiceAttachmentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingInvoiceAttachmentsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - invoiceId: encodeSimple("invoiceId", payload.invoiceId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-invoice-attachments", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["invoices"]["listAttachments"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Attachments$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableInvoicesListAttachments( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.invoices.listAttachments(request, options))); } diff --git a/lending/src/funcs/accountsReceivableInvoicesListReconciled.ts b/lending/src/funcs/accountsReceivableInvoicesListReconciled.ts index 6b2b1675d..e42b67ad3 100644 --- a/lending/src/funcs/accountsReceivableInvoicesListReconciled.ts +++ b/lending/src/funcs/accountsReceivableInvoicesListReconciled.ts @@ -1,201 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List reconciled invoices - * - * @remarks - * Gets a list of invoices linked to the corresponding banking transaction - */ -export function accountsReceivableInvoicesListReconciled( - client: CodatLendingCore, - request: operations.ListReconciledInvoicesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.EnhancedInvoicesReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListReconciledInvoicesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.EnhancedInvoicesReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListReconciledInvoicesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/reports/enhancedInvoices")( - pathParams, - ); - - const query = encodeFormQuery({ - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-reconciled-invoices", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["invoices"]["listReconciled"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.EnhancedInvoicesReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.EnhancedInvoicesReport$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableInvoicesListReconciled( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.invoices.listReconciled(request, options))); } diff --git a/lending/src/funcs/accountsReceivablePaymentsGet.ts b/lending/src/funcs/accountsReceivablePaymentsGet.ts index c9a5a135a..0e10b54a7 100644 --- a/lending/src/funcs/accountsReceivablePaymentsGet.ts +++ b/lending/src/funcs/accountsReceivablePaymentsGet.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get payment - * - * @remarks - * The *Get payment* endpoint returns a single payment for a given paymentId. - * - * [Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsReceivablePaymentsGet( - client: CodatLendingCore, - request: operations.GetAccountingPaymentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingPayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingPaymentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingPayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingPaymentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - paymentId: encodeSimple("paymentId", payload.paymentId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/payments/{paymentId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-payment", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["payments"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingPayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingPayment$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivablePaymentsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.payments.get(request, options))); } diff --git a/lending/src/funcs/accountsReceivablePaymentsList.ts b/lending/src/funcs/accountsReceivablePaymentsList.ts index 19eac5e37..4126004c3 100644 --- a/lending/src/funcs/accountsReceivablePaymentsList.ts +++ b/lending/src/funcs/accountsReceivablePaymentsList.ts @@ -1,204 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List payments - * - * @remarks - * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - * - * [Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function accountsReceivablePaymentsList( - client: CodatLendingCore, - request: operations.ListAccountingPaymentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingPayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingPaymentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingPayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingPaymentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/payments")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-payments", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["payments"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingPayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingPayments$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivablePaymentsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.payments.list(request, options))); } diff --git a/lending/src/funcs/accountsReceivableReportsGetAgedCreditors.ts b/lending/src/funcs/accountsReceivableReportsGetAgedCreditors.ts index ccb5b0dc1..97849760b 100644 --- a/lending/src/funcs/accountsReceivableReportsGetAgedCreditors.ts +++ b/lending/src/funcs/accountsReceivableReportsGetAgedCreditors.ts @@ -1,200 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Aged creditors report - * - * @remarks - * Returns aged creditors report for company that shows the total balance owed by a business to its suppliers over time. - */ -export function accountsReceivableReportsGetAgedCreditors( - client: CodatLendingCore, - request: operations.GetAccountingAgedCreditorsReportRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAgedCreditorReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingAgedCreditorsReportRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAgedCreditorReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingAgedCreditorsReportRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/reports/agedCreditor")( - pathParams, - ); - - const query = encodeFormQuery({ - "numberOfPeriods": payload.numberOfPeriods, - "periodLengthDays": payload.periodLengthDays, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-aged-creditors-report", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["reports"]["getAgedCreditors"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAgedCreditorReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAgedCreditorReport$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableReportsGetAgedCreditors( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.reports.getAgedCreditors(request, options))); } diff --git a/lending/src/funcs/accountsReceivableReportsGetAgedDebtors.ts b/lending/src/funcs/accountsReceivableReportsGetAgedDebtors.ts index 6ba9225ad..df59d62ad 100644 --- a/lending/src/funcs/accountsReceivableReportsGetAgedDebtors.ts +++ b/lending/src/funcs/accountsReceivableReportsGetAgedDebtors.ts @@ -1,200 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Aged debtors report - * - * @remarks - * Returns aged debtors report for company that shows the total outstanding balance due from customers to the business over time. - */ -export function accountsReceivableReportsGetAgedDebtors( - client: CodatLendingCore, - request: operations.GetAccountingAgedDebtorsReportRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAgedDebtorReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingAgedDebtorsReportRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAgedDebtorReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingAgedDebtorsReportRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/reports/agedDebtor")( - pathParams, - ); - - const query = encodeFormQuery({ - "numberOfPeriods": payload.numberOfPeriods, - "periodLengthDays": payload.periodLengthDays, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-aged-debtors-report", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["reports"]["getAgedDebtors"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAgedDebtorReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAgedDebtorReport$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableReportsGetAgedDebtors( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.reports.getAgedDebtors(request, options))); } diff --git a/lending/src/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.ts b/lending/src/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.ts index f02a95db3..08b738816 100644 --- a/lending/src/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.ts +++ b/lending/src/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.ts @@ -1,193 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Aged creditors report available - * - * @remarks - * Indicates whether the aged creditor report is available for the company. - */ -export function accountsReceivableReportsIsAgedCreditorsAvailable( - client: CodatLendingCore, - request: operations.IsAgedCreditorsReportAvailableRequest, - options?: RequestOptions, -): APIPromise< - Result< - boolean, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.IsAgedCreditorsReportAvailableRequest, - options?: RequestOptions, -): Promise< - [ - Result< - boolean, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.IsAgedCreditorsReportAvailableRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/reports/agedCreditor/available", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "is-aged-creditors-report-available", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["reports"]["isAgedCreditorsAvailable"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - boolean, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, z.boolean()), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableReportsIsAgedCreditorsAvailable( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.reports.isAgedCreditorsAvailable(request, options))); } diff --git a/lending/src/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.ts b/lending/src/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.ts index 800dbd215..fcf0fd3a1 100644 --- a/lending/src/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.ts +++ b/lending/src/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.ts @@ -1,193 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Aged debtors report available - * - * @remarks - * Indicates whether the aged debtors report is available for the company. - */ -export function accountsReceivableReportsIsAgedDebtorsAvailable( - client: CodatLendingCore, - request: operations.IsAgedDebtorsReportAvailableRequest, - options?: RequestOptions, -): APIPromise< - Result< - boolean, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.IsAgedDebtorsReportAvailableRequest, - options?: RequestOptions, -): Promise< - [ - Result< - boolean, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.IsAgedDebtorsReportAvailableRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/reports/agedDebtor/available", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "is-aged-debtors-report-available", - oAuth2Scopes: null, +type Call = CodatLending["accountsReceivable"]["reports"]["isAgedDebtorsAvailable"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - boolean, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, z.boolean()), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function accountsReceivableReportsIsAgedDebtorsAvailable( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.accountsReceivable.reports.isAgedDebtorsAvailable(request, options))); } diff --git a/lending/src/funcs/bankStatementsDownloadCategorizedBankStatementExcel.ts b/lending/src/funcs/bankStatementsDownloadCategorizedBankStatementExcel.ts new file mode 100644 index 000000000..1fa2d57bf --- /dev/null +++ b/lending/src/funcs/bankStatementsDownloadCategorizedBankStatementExcel.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; + +type Call = CodatLending["bankStatements"]["downloadCategorizedBankStatementExcel"]; + +export function bankStatementsDownloadCategorizedBankStatementExcel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.bankStatements.downloadCategorizedBankStatementExcel(request, options))); +} diff --git a/lending/src/funcs/bankStatementsEndUploadSession.ts b/lending/src/funcs/bankStatementsEndUploadSession.ts index 3d1719bcc..2b0039c83 100644 --- a/lending/src/funcs/bankStatementsEndUploadSession.ts +++ b/lending/src/funcs/bankStatementsEndUploadSession.ts @@ -1,209 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * End upload session - * - * @remarks - * Use the *End upload session* endpoint to finalize a bank statement upload session. Include a `status` in the request body to indicate if you want to cancel the processing of the dataset or trigger the ingestion and enrichment of the data. - * - * A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. - */ -export function bankStatementsEndUploadSession( - client: CodatLendingCore, - request: operations.EndBankStatementUploadSessionRequest, - options?: RequestOptions, -): APIPromise< - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.EndBankStatementUploadSessionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.EndBankStatementUploadSessionRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.EndUploadSessionRequest, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - datasetId: encodeSimple("datasetId", payload.datasetId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/bankStatements/upload/dataset/{datasetId}/endSession", - )(pathParams); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "end-bank-statement-upload-session", - oAuth2Scopes: null, +type Call = CodatLending["bankStatements"]["endUploadSession"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankStatementsEndUploadSession( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.bankStatements.endUploadSession(request, options))); } diff --git a/lending/src/funcs/bankStatementsGetCategorizedBankStatementTransactions.ts b/lending/src/funcs/bankStatementsGetCategorizedBankStatementTransactions.ts new file mode 100644 index 000000000..c5b1d2ed0 --- /dev/null +++ b/lending/src/funcs/bankStatementsGetCategorizedBankStatementTransactions.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; + +type Call = CodatLending["bankStatements"]["getCategorizedBankStatementTransactions"]; + +export function bankStatementsGetCategorizedBankStatementTransactions( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.bankStatements.getCategorizedBankStatementTransactions(request, options))); +} diff --git a/lending/src/funcs/bankStatementsGetUploadConfiguration.ts b/lending/src/funcs/bankStatementsGetUploadConfiguration.ts index cbbc5840a..dc6db38b2 100644 --- a/lending/src/funcs/bankStatementsGetUploadConfiguration.ts +++ b/lending/src/funcs/bankStatementsGetUploadConfiguration.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get upload configuration - * - * @remarks - * Use the *Get upload configuration* endpoint to view the existing bank statement upload configuration for the specified data connection. - * - * With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. - * - * When you use the [*Upload data*](https://docs.codat.io/lending-api#/operations/upload-bank-statement-data) endpoint next, you must upload the data for the account you configured. - */ -export function bankStatementsGetUploadConfiguration( - client: CodatLendingCore, - request: operations.GetBankStatementUploadConfigurationRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankStatementUploadConfiguration, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetBankStatementUploadConfigurationRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankStatementUploadConfiguration, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetBankStatementUploadConfigurationRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/bankStatements/upload/configuration", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-bank-statement-upload-configuration", - oAuth2Scopes: null, +type Call = CodatLending["bankStatements"]["getUploadConfiguration"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankStatementUploadConfiguration, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankStatementUploadConfiguration$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankStatementsGetUploadConfiguration( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.bankStatements.getUploadConfiguration(request, options))); } diff --git a/lending/src/funcs/bankStatementsListCategorizedBankStatementAccounts.ts b/lending/src/funcs/bankStatementsListCategorizedBankStatementAccounts.ts new file mode 100644 index 000000000..0360b507e --- /dev/null +++ b/lending/src/funcs/bankStatementsListCategorizedBankStatementAccounts.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; + +type Call = CodatLending["bankStatements"]["listCategorizedBankStatementAccounts"]; + +export function bankStatementsListCategorizedBankStatementAccounts( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.bankStatements.listCategorizedBankStatementAccounts(request, options))); +} diff --git a/lending/src/funcs/bankStatementsSetUploadConfiguration.ts b/lending/src/funcs/bankStatementsSetUploadConfiguration.ts index 4e9d046b7..fbcd081bc 100644 --- a/lending/src/funcs/bankStatementsSetUploadConfiguration.ts +++ b/lending/src/funcs/bankStatementsSetUploadConfiguration.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Set upload configuration - * - * @remarks - * Use the *Set upload configuration* endpoint to create bank statement upload configuration for the specified data connection. - * - * With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. - * - * Each data connection can only have one configuration for each company and external account ID combination. You will receive a Bad Request response if you try to set it again. - */ -export function bankStatementsSetUploadConfiguration( - client: CodatLendingCore, - request: operations.SetBankStatementUploadConfigurationRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankStatementUploadConfiguration, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.SetBankStatementUploadConfigurationRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankStatementUploadConfiguration, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.SetBankStatementUploadConfigurationRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.BankStatementUploadConfiguration, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/bankStatements/upload/configuration", - )(pathParams); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "set-bank-statement-upload-configuration", - oAuth2Scopes: null, +type Call = CodatLending["bankStatements"]["setUploadConfiguration"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankStatementUploadConfiguration, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankStatementUploadConfiguration$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankStatementsSetUploadConfiguration( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.bankStatements.setUploadConfiguration(request, options))); } diff --git a/lending/src/funcs/bankStatementsStartUploadSession.ts b/lending/src/funcs/bankStatementsStartUploadSession.ts index 55d0802de..d9b0bbc71 100644 --- a/lending/src/funcs/bankStatementsStartUploadSession.ts +++ b/lending/src/funcs/bankStatementsStartUploadSession.ts @@ -1,207 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Start upload session - * - * @remarks - * Use the *Start upload session* endpoint to initiate a bank statement upload session for a given company. - * - * A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. - * - * You can only have one active session per data type at a time. You can complete or cancel a session using the [*End upload session*](https://docs.codat.io/lending-api#/operations/end-bank-statement-upload-session) endpoint. - */ -export function bankStatementsStartUploadSession( - client: CodatLendingCore, - request: operations.StartBankStatementUploadSessionRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.StartBankStatementUploadSessionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.StartBankStatementUploadSessionRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.StartUploadSessionRequest, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/bankStatements/upload/startSession", - )(pathParams); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "start-bank-statement-upload-session", - oAuth2Scopes: null, +type Call = CodatLending["bankStatements"]["startUploadSession"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PullOperation$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankStatementsStartUploadSession( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.bankStatements.startUploadSession(request, options))); } diff --git a/lending/src/funcs/bankStatementsUploadBankStatementData.ts b/lending/src/funcs/bankStatementsUploadBankStatementData.ts index 28de47b78..a9c165718 100644 --- a/lending/src/funcs/bankStatementsUploadBankStatementData.ts +++ b/lending/src/funcs/bankStatementsUploadBankStatementData.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Upload data - * - * @remarks - * During an active session, use the **Upload data* endpoint to uploads a page of bank accounts or bank transactions data to the session. - * - * Make sure you created configuration for the account using the [*Set upload configuration*](https://docs.codat.io/lending-api#/operations/set-bank-statement-upload-configuration) endpoint before attempting an upload. - */ -export function bankStatementsUploadBankStatementData( - client: CodatLendingCore, - request: operations.UploadBankStatementDataRequest, - options?: RequestOptions, -): APIPromise< - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.UploadBankStatementDataRequest, - options?: RequestOptions, -): Promise< - [ - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.UploadBankStatementDataRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - datasetId: encodeSimple("datasetId", payload.datasetId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/bankStatements/upload/dataset/{datasetId}/upload", - )(pathParams); - - const query = encodeFormQuery({ - "path": payload.path, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "upload-bank-statement-data", - oAuth2Scopes: null, +type Call = CodatLending["bankStatements"]["uploadBankStatementData"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankStatementsUploadBankStatementData( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.bankStatements.uploadBankStatementData(request, options))); } diff --git a/lending/src/funcs/bankingAccountBalancesList.ts b/lending/src/funcs/bankingAccountBalancesList.ts index 69711de43..2b821ebab 100644 --- a/lending/src/funcs/bankingAccountBalancesList.ts +++ b/lending/src/funcs/bankingAccountBalancesList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List account balances - * - * @remarks - * The *List account balances* endpoint returns a list of [account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) for a given company's connection. - * - * [Account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) are balances for a bank account, including end-of-day batch balance or running balances per transaction. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function bankingAccountBalancesList( - client: CodatLendingCore, - request: operations.ListBankingAccountBalancesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankingAccountBalances, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListBankingAccountBalancesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankingAccountBalances, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListBankingAccountBalancesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/banking-accountBalances", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-banking-account-balances", - oAuth2Scopes: null, +type Call = CodatLending["banking"]["accountBalances"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankingAccountBalances, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankingAccountBalances$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankingAccountBalancesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.banking.accountBalances.list(request, options))); } diff --git a/lending/src/funcs/bankingAccountsGet.ts b/lending/src/funcs/bankingAccountsGet.ts index 77a1e1b71..535d8105c 100644 --- a/lending/src/funcs/bankingAccountsGet.ts +++ b/lending/src/funcs/bankingAccountsGet.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get account - * - * @remarks - * The *Get account* endpoint returns a single account for a given accountId. - * - * [Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). - */ -export function bankingAccountsGet( - client: CodatLendingCore, - request: operations.GetBankingAccountRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankingAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetBankingAccountRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankingAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetBankingAccountRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - accountId: encodeSimple("accountId", payload.accountId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/banking-accounts/{accountId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-banking-account", - oAuth2Scopes: null, +type Call = CodatLending["banking"]["accounts"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankingAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankingAccount$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankingAccountsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.banking.accounts.get(request, options))); } diff --git a/lending/src/funcs/bankingAccountsList.ts b/lending/src/funcs/bankingAccountsList.ts index efa9d141f..d4575273b 100644 --- a/lending/src/funcs/bankingAccountsList.ts +++ b/lending/src/funcs/bankingAccountsList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List accounts - * - * @remarks - * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - * - * [Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). - */ -export function bankingAccountsList( - client: CodatLendingCore, - request: operations.ListBankingAccountsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankingAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListBankingAccountsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankingAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListBankingAccountsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/banking-accounts", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-banking-accounts", - oAuth2Scopes: null, +type Call = CodatLending["banking"]["accounts"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankingAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankingAccounts$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankingAccountsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.banking.accounts.list(request, options))); } diff --git a/lending/src/funcs/bankingCategorizedStatementGet.ts b/lending/src/funcs/bankingCategorizedStatementGet.ts index 1672aa8de..afb17aa6d 100644 --- a/lending/src/funcs/bankingCategorizedStatementGet.ts +++ b/lending/src/funcs/bankingCategorizedStatementGet.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get categorized bank statement - * - * @remarks - * > **Categorization engine** - * > - * > The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. - * - * The _Get categorized bank statement_ endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources. - */ -export function bankingCategorizedStatementGet( - client: CodatLendingCore, - request: operations.GetCategorizedBankStatementRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.EnhancedCashFlowTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCategorizedBankStatementRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.EnhancedCashFlowTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCategorizedBankStatementRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/reports/enhancedCashFlow/transactions", - )(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-categorized-bank-statement", - oAuth2Scopes: null, +type Call = CodatLending["banking"]["categorizedStatement"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.EnhancedCashFlowTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.EnhancedCashFlowTransactions$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankingCategorizedStatementGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.banking.categorizedStatement.get(request, options))); } diff --git a/lending/src/funcs/bankingTransactionCategoriesGet.ts b/lending/src/funcs/bankingTransactionCategoriesGet.ts index 3ed15b78b..0f62736ad 100644 --- a/lending/src/funcs/bankingTransactionCategoriesGet.ts +++ b/lending/src/funcs/bankingTransactionCategoriesGet.ts @@ -1,209 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get transaction category - * - * @remarks - * The *Get transaction category* endpoint returns a single transaction category for a given transactionCategoryId. - * - * [Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function bankingTransactionCategoriesGet( - client: CodatLendingCore, - request: operations.GetBankingTransactionCategoryRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankingTransactionCategory, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetBankingTransactionCategoryRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankingTransactionCategory, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetBankingTransactionCategoryRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - transactionCategoryId: encodeSimple( - "transactionCategoryId", - payload.transactionCategoryId, - { explode: false, charEncoding: "percent" }, - ), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/banking-transactionCategories/{transactionCategoryId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-banking-transaction-category", - oAuth2Scopes: null, +type Call = CodatLending["banking"]["transactionCategories"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankingTransactionCategory, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankingTransactionCategory$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankingTransactionCategoriesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.banking.transactionCategories.get(request, options))); } diff --git a/lending/src/funcs/bankingTransactionCategoriesList.ts b/lending/src/funcs/bankingTransactionCategoriesList.ts index 98d66062b..d14d60473 100644 --- a/lending/src/funcs/bankingTransactionCategoriesList.ts +++ b/lending/src/funcs/bankingTransactionCategoriesList.ts @@ -1,212 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List transaction categories - * - * @remarks - * The *List transaction categories* endpoint returns a list of [transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) for a given company's connection. - * - * [Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function bankingTransactionCategoriesList( - client: CodatLendingCore, - request: operations.ListBankingTransactionCategoriesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankingTransactionCategories, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListBankingTransactionCategoriesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankingTransactionCategories, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListBankingTransactionCategoriesRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/banking-transactionCategories", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-banking-transaction-categories", - oAuth2Scopes: null, +type Call = CodatLending["banking"]["transactionCategories"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankingTransactionCategories, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankingTransactionCategories$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankingTransactionCategoriesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.banking.transactionCategories.list(request, options))); } diff --git a/lending/src/funcs/bankingTransactionsGet.ts b/lending/src/funcs/bankingTransactionsGet.ts index 8c114eaa5..784bd5fcf 100644 --- a/lending/src/funcs/bankingTransactionsGet.ts +++ b/lending/src/funcs/bankingTransactionsGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get bank transaction - * - * @remarks - * The *Get transaction* endpoint returns a single transaction for a given transactionId. - * - * [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function bankingTransactionsGet( - client: CodatLendingCore, - request: operations.GetBankingTransactionRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankingTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetBankingTransactionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankingTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetBankingTransactionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - transactionId: encodeSimple("transactionId", payload.transactionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/banking-transactions/{transactionId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-banking-transaction", - oAuth2Scopes: null, +type Call = CodatLending["banking"]["transactions"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankingTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankingTransaction$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankingTransactionsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.banking.transactions.get(request, options))); } diff --git a/lending/src/funcs/bankingTransactionsList.ts b/lending/src/funcs/bankingTransactionsList.ts index 0e90cd21b..db8a0dbbc 100644 --- a/lending/src/funcs/bankingTransactionsList.ts +++ b/lending/src/funcs/bankingTransactionsList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List transactions - * - * @remarks - * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company's connection. - * - * [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function bankingTransactionsList( - client: CodatLendingCore, - request: operations.ListBankingTransactionsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankingTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListBankingTransactionsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankingTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListBankingTransactionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/banking-transactions", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-banking-transactions", - oAuth2Scopes: null, +type Call = CodatLending["banking"]["transactions"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankingTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankingTransactions$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function bankingTransactionsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.banking.transactions.list(request, options))); } diff --git a/lending/src/funcs/companiesCreate.ts b/lending/src/funcs/companiesCreate.ts index fad79b59e..5d79b9882 100644 --- a/lending/src/funcs/companiesCreate.ts +++ b/lending/src/funcs/companiesCreate.ts @@ -1,189 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create company - * - * @remarks - * Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - * - * If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. - */ -export function companiesCreate( - client: CodatLendingCore, - request?: shared.CompanyRequestBody | undefined, - options?: RequestOptions, -): APIPromise< - Result< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request?: shared.CompanyRequestBody | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => shared.CompanyRequestBody$outboundSchema.optional().parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = payload === undefined - ? null - : encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/companies")(); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-company", - oAuth2Scopes: null, +type Call = CodatLending["companies"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Company$inboundSchema), - M.jsonErr([400, 401, 402, 403, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function companiesCreate( + client: CodatLendingCore, + request?: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.companies.create(request, options))); } diff --git a/lending/src/funcs/companiesDelete.ts b/lending/src/funcs/companiesDelete.ts index e79e4d006..43db73e1b 100644 --- a/lending/src/funcs/companiesDelete.ts +++ b/lending/src/funcs/companiesDelete.ts @@ -1,191 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Delete a company - * - * @remarks - * The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/lending-api#/schemas/Company), its [connections](https://docs.codat.io/lending-api#/schemas/Connection) and any cached data. This operation is irreversible. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - */ -export function companiesDelete( - client: CodatLendingCore, - request: operations.DeleteCompanyRequest, - options?: RequestOptions, -): APIPromise< - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DeleteCompanyRequest, - options?: RequestOptions, -): Promise< - [ - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.DeleteCompanyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "delete-company", - oAuth2Scopes: null, +type Call = CodatLending["companies"]["delete"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(204, z.void()), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function companiesDelete( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.companies.delete(request, options))); } diff --git a/lending/src/funcs/companiesGet.ts b/lending/src/funcs/companiesGet.ts index c1ae1a509..9e8ea7329 100644 --- a/lending/src/funcs/companiesGet.ts +++ b/lending/src/funcs/companiesGet.ts @@ -1,191 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get company - * - * @remarks - * The *Get company* endpoint returns a single company for a given `companyId`. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - */ -export function companiesGet( - client: CodatLendingCore, - request: operations.GetCompanyRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCompanyRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetCompanyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-company", - oAuth2Scopes: null, +type Call = CodatLending["companies"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Company$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function companiesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.companies.get(request, options))); } diff --git a/lending/src/funcs/companiesList.ts b/lending/src/funcs/companiesList.ts index 78226f3c2..502080c6c 100644 --- a/lending/src/funcs/companiesList.ts +++ b/lending/src/funcs/companiesList.ts @@ -1,211 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List companies - * - * @remarks - * The *List companies* endpoint returns a list of [companies](https://docs.codat.io/lending-api#/schemas/Company) associated to your instances. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - * - * ## Filter by tags - * - * The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): - * - * - equals (`=`) - * - not equals (`!=`) - * - contains (`~`) - * - * For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: - * - Foreign key: `uid = {yourCustomerId}` - * - Region: `region != uk` - * - Owning team and region: `region = uk && owningTeam = invoice-finance` - */ -export function companiesList( - client: CodatLendingCore, - request?: operations.ListCompaniesRequest | undefined, - options?: RequestOptions, -): APIPromise< - Result< - shared.Companies, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request?: operations.ListCompaniesRequest | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Companies, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCompaniesRequest$outboundSchema.optional().parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/companies")(); - - const query = encodeFormQuery({ - "orderBy": payload?.orderBy, - "page": payload?.page, - "pageSize": payload?.pageSize, - "query": payload?.query, - "tags": payload?.tags, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-companies", - oAuth2Scopes: null, +type Call = CodatLending["companies"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Companies, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Companies$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function companiesList( + client: CodatLendingCore, + request?: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.companies.list(request, options))); } diff --git a/lending/src/funcs/companiesReplace.ts b/lending/src/funcs/companiesReplace.ts index eafef5f75..426a99bd5 100644 --- a/lending/src/funcs/companiesReplace.ts +++ b/lending/src/funcs/companiesReplace.ts @@ -1,194 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Replace company - * - * @remarks - * Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - */ -export function companiesReplace( - client: CodatLendingCore, - request: operations.ReplaceCompanyRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ReplaceCompanyRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.ReplaceCompanyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.CompanyRequestBody, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}")(pathParams); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "replace-company", - oAuth2Scopes: null, +type Call = CodatLending["companies"]["replace"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Company$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function companiesReplace( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.companies.replace(request, options))); } diff --git a/lending/src/funcs/companiesUpdate.ts b/lending/src/funcs/companiesUpdate.ts index debcec5da..21d36417b 100644 --- a/lending/src/funcs/companiesUpdate.ts +++ b/lending/src/funcs/companiesUpdate.ts @@ -1,195 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Update company - * - * @remarks - * Use the *Update company* endpoint to update the name, description, or tags of the company. - * - * The *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - */ -export function companiesUpdate( - client: CodatLendingCore, - request: operations.UpdateCompanyRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.UpdateCompanyRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.UpdateCompanyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.CompanyUpdateRequest, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}")(pathParams); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "update-company", - oAuth2Scopes: null, +type Call = CodatLending["companies"]["update"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Company, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Company$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function companiesUpdate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.companies.update(request, options))); } diff --git a/lending/src/funcs/companyInfoGetAccountingProfile.ts b/lending/src/funcs/companyInfoGetAccountingProfile.ts index b84bdb087..0bbb14285 100644 --- a/lending/src/funcs/companyInfoGetAccountingProfile.ts +++ b/lending/src/funcs/companyInfoGetAccountingProfile.ts @@ -1,192 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get company accounting profile - * - * @remarks - * Gets the latest basic info for a company. - */ -export function companyInfoGetAccountingProfile( - client: CodatLendingCore, - request: operations.GetAccountingProfileRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCompanyInfo, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingProfileRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCompanyInfo, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingProfileRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/info")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-profile", - oAuth2Scopes: null, +type Call = CodatLending["companyInfo"]["getAccountingProfile"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCompanyInfo, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCompanyInfo$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function companyInfoGetAccountingProfile( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.companyInfo.getAccountingProfile(request, options))); } diff --git a/lending/src/funcs/companyInfoGetCommerceProfile.ts b/lending/src/funcs/companyInfoGetCommerceProfile.ts index ed1740ffd..543dccaae 100644 --- a/lending/src/funcs/companyInfoGetCommerceProfile.ts +++ b/lending/src/funcs/companyInfoGetCommerceProfile.ts @@ -1,201 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get company commerce profile - * - * @remarks - * Retrieve information about the company, as seen in the commerce - * platform. - * - * This may include information like addresses, tax registration details and - * social media or website information." - */ -export function companyInfoGetCommerceProfile( - client: CodatLendingCore, - request: operations.GetCommerceProfileRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceCompanyInfo, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceProfileRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceCompanyInfo, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetCommerceProfileRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-info", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-profile", - oAuth2Scopes: null, +type Call = CodatLending["companyInfo"]["getCommerceProfile"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceCompanyInfo, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceCompanyInfo$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function companyInfoGetCommerceProfile( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.companyInfo.getCommerceProfile(request, options))); } diff --git a/lending/src/funcs/connectionsCreate.ts b/lending/src/funcs/connectionsCreate.ts index 5bc742a10..8e65da7b7 100644 --- a/lending/src/funcs/connectionsCreate.ts +++ b/lending/src/funcs/connectionsCreate.ts @@ -1,191 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create connection - * - * @remarks - * Creates a connection for the company by providing a valid `platformKey`. - * - * Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. - */ -export function connectionsCreate( - client: CodatLendingCore, - request: operations.CreateConnectionRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateConnectionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.CreateConnectionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/connections")(pathParams); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-connection", - oAuth2Scopes: null, +type Call = CodatLending["connections"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Connection$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function connectionsCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.connections.create(request, options))); } diff --git a/lending/src/funcs/connectionsDelete.ts b/lending/src/funcs/connectionsDelete.ts index d50c05d0e..4d3b408d3 100644 --- a/lending/src/funcs/connectionsDelete.ts +++ b/lending/src/funcs/connectionsDelete.ts @@ -1,195 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Delete connection - * - * @remarks - * Revoke and remove a connection from a company. - * This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. - */ -export function connectionsDelete( - client: CodatLendingCore, - request: operations.DeleteConnectionRequest, - options?: RequestOptions, -): APIPromise< - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DeleteConnectionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.DeleteConnectionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/connections/{connectionId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "delete-connection", - oAuth2Scopes: null, +type Call = CodatLending["connections"]["delete"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, z.void()), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function connectionsDelete( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.connections.delete(request, options))); } diff --git a/lending/src/funcs/connectionsGet.ts b/lending/src/funcs/connectionsGet.ts index ae9348c6e..cb1695f08 100644 --- a/lending/src/funcs/connectionsGet.ts +++ b/lending/src/funcs/connectionsGet.ts @@ -1,194 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get connection - * - * @remarks - * Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. - */ -export function connectionsGet( - client: CodatLendingCore, - request: operations.GetConnectionRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetConnectionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetConnectionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/connections/{connectionId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-connection", - oAuth2Scopes: null, +type Call = CodatLending["connections"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Connection$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function connectionsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.connections.get(request, options))); } diff --git a/lending/src/funcs/connectionsList.ts b/lending/src/funcs/connectionsList.ts index ead90932f..a1422edc4 100644 --- a/lending/src/funcs/connectionsList.ts +++ b/lending/src/funcs/connectionsList.ts @@ -1,199 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List connections - * - * @remarks - * List the connections for a company. - */ -export function connectionsList( - client: CodatLendingCore, - request: operations.ListConnectionsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Connections, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListConnectionsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Connections, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.ListConnectionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/connections")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-connections", - oAuth2Scopes: null, +type Call = CodatLending["connections"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Connections, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Connections$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function connectionsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.connections.list(request, options))); } diff --git a/lending/src/funcs/connectionsUnlink.ts b/lending/src/funcs/connectionsUnlink.ts index 87fdd8a3d..af3f9bee0 100644 --- a/lending/src/funcs/connectionsUnlink.ts +++ b/lending/src/funcs/connectionsUnlink.ts @@ -1,195 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Unlink connection - * - * @remarks - * This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. - */ -export function connectionsUnlink( - client: CodatLendingCore, - request: operations.UnlinkConnectionRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.UnlinkConnectionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.UnlinkConnectionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/connections/{connectionId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "unlink-connection", - oAuth2Scopes: null, +type Call = CodatLending["connections"]["unlink"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Connection, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Connection$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function connectionsUnlink( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.connections.unlink(request, options))); } diff --git a/lending/src/funcs/dataIntegrityDetails.ts b/lending/src/funcs/dataIntegrityDetails.ts index 6e13457dc..8bc4e012b 100644 --- a/lending/src/funcs/dataIntegrityDetails.ts +++ b/lending/src/funcs/dataIntegrityDetails.ts @@ -1,208 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List data integrity details - * - * @remarks - * The *List data integrity details* endpoint returns the match result record by record for a given data type, filtered based on a query string in the same way as summary results. - * - * The [details](https://docs.codat.io/lending-api#/schemas/DataIntegrityDetail) are paginated and support ordering, following the same conventions as our other data endpoints. - */ -export function dataIntegrityDetails( - client: CodatLendingCore, - request: operations.ListDataIntegrityDetailsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.DataIntegrityDetails, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListDataIntegrityDetailsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.DataIntegrityDetails, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListDataIntegrityDetailsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - dataType: encodeSimple("dataType", payload.dataType, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/details", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-data-integrity-details", - oAuth2Scopes: null, +type Call = CodatLending["dataIntegrity"]["details"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.DataIntegrityDetails, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.DataIntegrityDetails$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function dataIntegrityDetails( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.dataIntegrity.details(request, options))); } diff --git a/lending/src/funcs/dataIntegrityStatus.ts b/lending/src/funcs/dataIntegrityStatus.ts index 35c0ccc57..03b84cdc5 100644 --- a/lending/src/funcs/dataIntegrityStatus.ts +++ b/lending/src/funcs/dataIntegrityStatus.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get data integrity status - * - * @remarks - * The *Get data integrity status* endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/DataIntegrityStatus) for the company’s match results between the data type provided in the URL and other data types that Data Integrity uses to support matching. - * This endpoint helps you understand whether match data is available and, if so, how to usefully query it. - * - * The response tells you: - * - * - Whether match results are available. - * - When the results were generated, and their status. - * - The connection IDs, amounts, and dates involved to support useful querying. - */ -export function dataIntegrityStatus( - client: CodatLendingCore, - request: operations.GetDataIntegrityStatusRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.DataIntegrityStatuses, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetDataIntegrityStatusRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.DataIntegrityStatuses, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetDataIntegrityStatusRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - dataType: encodeSimple("dataType", payload.dataType, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/status", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-data-integrity-status", - oAuth2Scopes: null, +type Call = CodatLending["dataIntegrity"]["status"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.DataIntegrityStatuses, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.DataIntegrityStatuses$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function dataIntegrityStatus( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.dataIntegrity.status(request, options))); } diff --git a/lending/src/funcs/dataIntegritySummaries.ts b/lending/src/funcs/dataIntegritySummaries.ts index 9e1fa6548..8f3b7044b 100644 --- a/lending/src/funcs/dataIntegritySummaries.ts +++ b/lending/src/funcs/dataIntegritySummaries.ts @@ -1,207 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get data integrity summaries - * - * @remarks - * The *Get data integrity summary* endpoint returns a [summary](https://docs.codat.io/lending-api#/schemas/DataIntegritySummary) of match results for a given data type filtered by a query string in the [Codat query language](https://docs.codat.io/using-the-api/querying). - * - * For example, if you wanted to see summary match results only for transactions after 1 December 2020, you could include a query parameter of `query=date>2020-12-01`. - * - * The endpoint response includes only the summary results, not transactions. To view match data for transactions, use the [List data integrity details](https://docs.codat.io/lending-api#/operations/get-data-integrity-summaries) endpoint. - */ -export function dataIntegritySummaries( - client: CodatLendingCore, - request: operations.GetDataIntegritySummariesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.DataIntegritySummaries, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetDataIntegritySummariesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.DataIntegritySummaries, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetDataIntegritySummariesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - dataType: encodeSimple("dataType", payload.dataType, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/summaries", - )(pathParams); - - const query = encodeFormQuery({ - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-data-integrity-summaries", - oAuth2Scopes: null, +type Call = CodatLending["dataIntegrity"]["summaries"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.DataIntegritySummaries, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.DataIntegritySummaries$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function dataIntegritySummaries( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.dataIntegrity.summaries(request, options))); } diff --git a/lending/src/funcs/excelReportsDownload.ts b/lending/src/funcs/excelReportsDownload.ts index 1f51fdab6..4fbd38328 100644 --- a/lending/src/funcs/excelReportsDownload.ts +++ b/lending/src/funcs/excelReportsDownload.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import * as b64$ from "../lib/base64.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Download Excel report - * - * @remarks - * The *Download Excel report* endpoint downloads the latest successfully generated Excel report of a specified report type for a given company. - * - * The downloadable Excel file is returned in the response. You can save it to your local machine. - * - * You can [learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. - */ -export function excelReportsDownload( - client: CodatLendingCore, - request: operations.DownloadExcelReportRequest, - options?: RequestOptions, -): APIPromise< - Result< - Uint8Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadExcelReportRequest, - options?: RequestOptions, -): Promise< - [ - Result< - Uint8Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.DownloadExcelReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/data/companies/{companyId}/assess/excel/download")( - pathParams, - ); - - const query = encodeFormQuery({ - "reportType": payload.reportType, - }); - - const headers = new Headers(compactMap({ - Accept: "application/octet-stream", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-excel-report", - oAuth2Scopes: null, +type Call = CodatLending["excelReports"]["download"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - Uint8Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.bytes(200, b64$.zodInbound), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function excelReportsDownload( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.excelReports.download(request, options))); } diff --git a/lending/src/funcs/excelReportsGenerate.ts b/lending/src/funcs/excelReportsGenerate.ts index eacfdb74e..8e5d9eb0b 100644 --- a/lending/src/funcs/excelReportsGenerate.ts +++ b/lending/src/funcs/excelReportsGenerate.ts @@ -1,212 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Generate Excel report - * - * @remarks - * The *Generate Excel report* endpoint requests the production of a downloadable Excel file for a report type specified in the `reportType` query parameter. - * - * In response, the endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/ExcelStatus) detailing the current state of the report generation request. - * - * ### Report types - * - * | reportType | Description | - * |--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| - * | `audit` | Identifies inaccurate or out-of-date accounts, helping you to make decisions with confidence. || [audit](https://docs.codat.io/lending/excel/audit-report) | Identify inaccurate or out-of-date accounts, helping you to make decisions with confidence. | - * | `enhancedCashFlow` | Provides a fully categorized list of bank transactions for a company, allowing lenders to accurately forecast a company's cash flow. | - * | `enhancedFinancials` | Supports decision-making using fully categorized financial statements to allow lenders to automate their underwriting processes. | - * | `enhancedInvoices` | Helps verify that payments have been made against historic invoices. Great for invoice finance lenders. | - * - * [Learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. - */ -export function excelReportsGenerate( - client: CodatLendingCore, - request: operations.GenerateExcelReportRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.ExcelStatus, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GenerateExcelReportRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.ExcelStatus, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GenerateExcelReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/data/companies/{companyId}/assess/excel")( - pathParams, - ); - - const query = encodeFormQuery({ - "reportType": payload.reportType, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "generate-excel-report", - oAuth2Scopes: null, +type Call = CodatLending["excelReports"]["generate"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.ExcelStatus, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.ExcelStatus$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function excelReportsGenerate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.excelReports.generate(request, options))); } diff --git a/lending/src/funcs/excelReportsGetStatus.ts b/lending/src/funcs/excelReportsGetStatus.ts index 63e2c2bab..b51886011 100644 --- a/lending/src/funcs/excelReportsGetStatus.ts +++ b/lending/src/funcs/excelReportsGetStatus.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get Excel report status - * - * @remarks - * The *Get Excel report status* returns the status of the report mostly recently requested for Excel generation. It does not return the status of any historical report requests. - * - * Poll this endpoint to check the progress of the report once you have requested its generation. This will not affect the generation of the report. - * - * When the report generation completes successfully, the `inProgress` property will be marked as `false` and the `success` field will be marked as `true`. - */ -export function excelReportsGetStatus( - client: CodatLendingCore, - request: operations.GetExcelReportGenerationStatusRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.ExcelStatus, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetExcelReportGenerationStatusRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.ExcelStatus, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetExcelReportGenerationStatusRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/data/companies/{companyId}/assess/excel")( - pathParams, - ); - - const query = encodeFormQuery({ - "reportType": payload.reportType, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-excel-report-generation-status", - oAuth2Scopes: null, +type Call = CodatLending["excelReports"]["getStatus"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.ExcelStatus, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.ExcelStatus$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function excelReportsGetStatus( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.excelReports.getStatus(request, options))); } diff --git a/lending/src/funcs/fileUploadDownload.ts b/lending/src/funcs/fileUploadDownload.ts index ecbb1caba..a610ed675 100644 --- a/lending/src/funcs/fileUploadDownload.ts +++ b/lending/src/funcs/fileUploadDownload.ts @@ -1,196 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Download all files for a company - * - * @remarks - * The *Download files* endpoint downloads all files that have been uploaded by to SMB to Codat. A `date` may be specified to download any files uploaded on the date provided. - */ -export function fileUploadDownload( - client: CodatLendingCore, - request: operations.DownloadFilesRequest, - options?: RequestOptions, -): APIPromise< - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadFilesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.DownloadFilesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/files/download")(pathParams); - - const query = encodeFormQuery({ - "date": payload.date, - }); - - const headers = new Headers(compactMap({ - Accept: "application/octet-stream", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-files", - oAuth2Scopes: null, +type Call = CodatLending["fileUpload"]["download"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.stream(200, z.instanceof(ReadableStream)), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function fileUploadDownload( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.fileUpload.download(request, options))); } diff --git a/lending/src/funcs/fileUploadListUploaded.ts b/lending/src/funcs/fileUploadListUploaded.ts index d2141ccae..2ed80a56a 100644 --- a/lending/src/funcs/fileUploadListUploaded.ts +++ b/lending/src/funcs/fileUploadListUploaded.ts @@ -1,189 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List all files uploaded by a company - * - * @remarks - * The *List files* endpoint returns a list of all files uploaded to Codat by the SMB. - */ -export function fileUploadListUploaded( - client: CodatLendingCore, - request: operations.ListFilesRequest, - options?: RequestOptions, -): APIPromise< - Result< - Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListFilesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.ListFilesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/files")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-files", - oAuth2Scopes: null, +type Call = CodatLending["fileUpload"]["listUploaded"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, z.array(shared.FileT$inboundSchema)), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function fileUploadListUploaded( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.fileUpload.listUploaded(request, options))); } diff --git a/lending/src/funcs/fileUploadUpload.ts b/lending/src/funcs/fileUploadUpload.ts index d4b497290..d9ab6d335 100644 --- a/lending/src/funcs/fileUploadUpload.ts +++ b/lending/src/funcs/fileUploadUpload.ts @@ -1,241 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { appendForm, encodeSimple, normalizeBlob } from "../lib/encodings.js"; -import { - bytesToBlob, - getContentTypeFromFileName, - readableStreamToArrayBuffer, -} from "../lib/files.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { isBlobLike } from "../sdk/types/blobs.js"; -import { Result } from "../sdk/types/fp.js"; -import { isReadableStream } from "../sdk/types/streams.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Upload files for a company - * - * @remarks - * The *Upload files* endpoint uploads multiple files provided by the SMB to Codat. This may include personal identity documents, pitch decks, contracts, or files with accounting and banking data. - * - * Uploaded files must meet the following requirements: - * - * - Up to 20 files can be uploaded at a time. - * - PDF, XLS, XLSX, XLSB, CSV, DOC, DOCX, PPT, PPTX, JPEG, JPG, and PNG files can be uploaded. - * - Each file can be up to 10MB in size. - */ -export function fileUploadUpload( - client: CodatLendingCore, - request: operations.UploadFilesRequest, - options?: RequestOptions, -): APIPromise< - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.UploadFilesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.UploadFilesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = new FormData(); - if (payload.FileUpload != null) { - if (isBlobLike(payload.FileUpload.file)) { - const file = payload.FileUpload.file; - const blob = await normalizeBlob(file); - const name = "name" in file ? (file.name as string) : undefined; - appendForm(body, "file", blob, name); - } else if (isReadableStream(payload.FileUpload.file.content)) { - const buffer = await readableStreamToArrayBuffer( - payload.FileUpload.file.content, - ); - const contentType = - getContentTypeFromFileName(payload.FileUpload.file.fileName) - || "application/octet-stream"; - appendForm( - body, - "file", - bytesToBlob(buffer, contentType), - payload.FileUpload.file.fileName, - ); - } else { - const contentType = - getContentTypeFromFileName(payload.FileUpload.file.fileName) - || "application/octet-stream"; - appendForm( - body, - "file", - bytesToBlob(payload.FileUpload.file.content, contentType), - payload.FileUpload.file.fileName, - ); - } - } - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/files", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "upload-files", - oAuth2Scopes: null, +type Call = CodatLending["fileUpload"]["upload"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function fileUploadUpload( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.fileUpload.upload(request, options))); } diff --git a/lending/src/funcs/financialStatementsAccountsGet.ts b/lending/src/funcs/financialStatementsAccountsGet.ts index 224ed68d7..fc5e6389b 100644 --- a/lending/src/funcs/financialStatementsAccountsGet.ts +++ b/lending/src/funcs/financialStatementsAccountsGet.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get account - * - * @remarks - * The *Get account* endpoint returns a single account for a given accountId. - * - * [Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function financialStatementsAccountsGet( - client: CodatLendingCore, - request: operations.GetAccountingAccountRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingAccountRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingAccountRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - accountId: encodeSimple("accountId", payload.accountId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/accounts/{accountId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-account", - oAuth2Scopes: null, +type Call = CodatLending["financialStatements"]["accounts"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAccount, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAccount$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function financialStatementsAccountsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialStatements.accounts.get(request, options))); } diff --git a/lending/src/funcs/financialStatementsAccountsList.ts b/lending/src/funcs/financialStatementsAccountsList.ts index fc510ba4d..df33f22c4 100644 --- a/lending/src/funcs/financialStatementsAccountsList.ts +++ b/lending/src/funcs/financialStatementsAccountsList.ts @@ -1,204 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List accounts - * - * @remarks - * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - * - * [Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function financialStatementsAccountsList( - client: CodatLendingCore, - request: operations.ListAccountingAccountsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingAccountsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingAccountsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/accounts")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-accounts", - oAuth2Scopes: null, +type Call = CodatLending["financialStatements"]["accounts"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAccounts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAccounts$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function financialStatementsAccountsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialStatements.accounts.list(request, options))); } diff --git a/lending/src/funcs/financialStatementsBalanceSheetGet.ts b/lending/src/funcs/financialStatementsBalanceSheetGet.ts index 23be0c4f4..6b5ad0fec 100644 --- a/lending/src/funcs/financialStatementsBalanceSheetGet.ts +++ b/lending/src/funcs/financialStatementsBalanceSheetGet.ts @@ -1,201 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get balance sheet - * - * @remarks - * Gets the latest balance sheet for a company. - */ -export function financialStatementsBalanceSheetGet( - client: CodatLendingCore, - request: operations.GetAccountingBalanceSheetRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingBalanceSheet, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingBalanceSheetRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingBalanceSheet, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingBalanceSheetRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/data/financials/balanceSheet", - )(pathParams); - - const query = encodeFormQuery({ - "periodLength": payload.periodLength, - "periodsToCompare": payload.periodsToCompare, - "startMonth": payload.startMonth, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-balance-sheet", - oAuth2Scopes: null, +type Call = CodatLending["financialStatements"]["balanceSheet"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingBalanceSheet, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingBalanceSheet$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function financialStatementsBalanceSheetGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialStatements.balanceSheet.get(request, options))); } diff --git a/lending/src/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.ts b/lending/src/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.ts index 24d64108c..896faa8db 100644 --- a/lending/src/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.ts +++ b/lending/src/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get categorized balance sheet statement - * - * @remarks - * The *Get categorized balance sheet statement* endpoint returns a list of categorized accounts that appear on a company’s Balance Sheet along with a balance per financial statement date. - * - * Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. - */ -export function financialStatementsBalanceSheetGetCategorizedAccounts( - client: CodatLendingCore, - request: operations.GetCategorizedBalanceSheetStatementRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.EnhancedFinancialReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCategorizedBalanceSheetStatementRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.EnhancedFinancialReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCategorizedBalanceSheetStatementRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/reports/enhancedBalanceSheet/accounts", - )(pathParams); - - const query = encodeFormQuery({ - "numberOfPeriods": payload.numberOfPeriods, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-categorized-balance-sheet-statement", - oAuth2Scopes: null, +type Call = CodatLending["financialStatements"]["balanceSheet"]["getCategorizedAccounts"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.EnhancedFinancialReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.EnhancedFinancialReport$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function financialStatementsBalanceSheetGetCategorizedAccounts( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialStatements.balanceSheet.getCategorizedAccounts(request, options))); } diff --git a/lending/src/funcs/financialStatementsCashFlowGet.ts b/lending/src/funcs/financialStatementsCashFlowGet.ts index f136c8ebf..842275978 100644 --- a/lending/src/funcs/financialStatementsCashFlowGet.ts +++ b/lending/src/funcs/financialStatementsCashFlowGet.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get cash flow statement - * - * @remarks - * Gets the latest cash flow statement for a company. - */ -export function financialStatementsCashFlowGet( - client: CodatLendingCore, - request: operations.GetAccountingCashFlowStatementRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCashFlowStatement, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingCashFlowStatementRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCashFlowStatement, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingCashFlowStatementRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/data/financials/cashFlowStatement", - )(pathParams); - - const query = encodeFormQuery({ - "periodLength": payload.periodLength, - "periodsToCompare": payload.periodsToCompare, - "startMonth": payload.startMonth, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-cash-flow-statement", - oAuth2Scopes: null, +type Call = CodatLending["financialStatements"]["cashFlow"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCashFlowStatement, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCashFlowStatement$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function financialStatementsCashFlowGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialStatements.cashFlow.get(request, options))); } diff --git a/lending/src/funcs/financialStatementsProfitAndLossGet.ts b/lending/src/funcs/financialStatementsProfitAndLossGet.ts index f78005487..0df500476 100644 --- a/lending/src/funcs/financialStatementsProfitAndLossGet.ts +++ b/lending/src/funcs/financialStatementsProfitAndLossGet.ts @@ -1,201 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get profit and loss - * - * @remarks - * Gets the latest profit and loss for a company. - */ -export function financialStatementsProfitAndLossGet( - client: CodatLendingCore, - request: operations.GetAccountingProfitAndLossRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingProfitAndLossReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingProfitAndLossRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingProfitAndLossReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingProfitAndLossRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/data/financials/profitAndLoss", - )(pathParams); - - const query = encodeFormQuery({ - "periodLength": payload.periodLength, - "periodsToCompare": payload.periodsToCompare, - "startMonth": payload.startMonth, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-profit-and-loss", - oAuth2Scopes: null, +type Call = CodatLending["financialStatements"]["profitAndLoss"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingProfitAndLossReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingProfitAndLossReport$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function financialStatementsProfitAndLossGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialStatements.profitAndLoss.get(request, options))); } diff --git a/lending/src/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.ts b/lending/src/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.ts index 99a3dfe3f..af15d5a3b 100644 --- a/lending/src/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.ts +++ b/lending/src/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get categorized profit and loss statement - * - * @remarks - * The *Get categorized profit and loss statement* endpoint returns a list of categorized accounts that appear on a company’s Profit and Loss statement. It also includes a balance as of the financial statement date. - * - * Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. - */ -export function financialStatementsProfitAndLossGetCategorizedAccounts( - client: CodatLendingCore, - request: operations.GetCategorizedProfitAndLossStatementRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.EnhancedFinancialReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCategorizedProfitAndLossStatementRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.EnhancedFinancialReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCategorizedProfitAndLossStatementRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/reports/enhancedProfitAndLoss/accounts", - )(pathParams); - - const query = encodeFormQuery({ - "numberOfPeriods": payload.numberOfPeriods, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-categorized-profit-and-loss-statement", - oAuth2Scopes: null, +type Call = CodatLending["financialStatements"]["profitAndLoss"]["getCategorizedAccounts"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.EnhancedFinancialReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.EnhancedFinancialReport$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function financialStatementsProfitAndLossGetCategorizedAccounts( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialStatements.profitAndLoss.getCategorizedAccounts(request, options))); } diff --git a/lending/src/funcs/financialSummaryDownloadCreditModelExcel.ts b/lending/src/funcs/financialSummaryDownloadCreditModelExcel.ts new file mode 100644 index 000000000..7739cb552 --- /dev/null +++ b/lending/src/funcs/financialSummaryDownloadCreditModelExcel.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; + +type Call = CodatLending["financialSummary"]["downloadCreditModelExcel"]; + +export function financialSummaryDownloadCreditModelExcel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialSummary.downloadCreditModelExcel(request, options))); +} diff --git a/lending/src/funcs/financialSummaryGetFinancialSummary.ts b/lending/src/funcs/financialSummaryGetFinancialSummary.ts new file mode 100644 index 000000000..d6a72f851 --- /dev/null +++ b/lending/src/funcs/financialSummaryGetFinancialSummary.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; + +type Call = CodatLending["financialSummary"]["getFinancialSummary"]; + +export function financialSummaryGetFinancialSummary( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.financialSummary.getFinancialSummary(request, options))); +} diff --git a/lending/src/funcs/liabilitiesGenerateLoanSummary.ts b/lending/src/funcs/liabilitiesGenerateLoanSummary.ts index d2419d285..40d7237ee 100644 --- a/lending/src/funcs/liabilitiesGenerateLoanSummary.ts +++ b/lending/src/funcs/liabilitiesGenerateLoanSummary.ts @@ -1,200 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Generate loan summaries report - * - * @remarks - * The _Generate loan summaries_ endpoint requests the generation of the Loan Summaries report. - * - * Learn more about Codat's liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). - * - * Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - */ -export function liabilitiesGenerateLoanSummary( - client: CodatLendingCore, - request: operations.GenerateLoanSummaryRequest, - options?: RequestOptions, -): APIPromise< - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GenerateLoanSummaryRequest, - options?: RequestOptions, -): Promise< - [ - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GenerateLoanSummaryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/reports/liabilities/loans")( - pathParams, - ); - - const query = encodeFormQuery({ - "sourceType": payload.sourceType, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "generate-loan-summary", - oAuth2Scopes: null, +type Call = CodatLending["liabilities"]["generateLoanSummary"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(202, z.void()), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function liabilitiesGenerateLoanSummary( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.liabilities.generateLoanSummary(request, options))); } diff --git a/lending/src/funcs/liabilitiesGenerateLoanTransactions.ts b/lending/src/funcs/liabilitiesGenerateLoanTransactions.ts index 24b0845fb..1bd8042d9 100644 --- a/lending/src/funcs/liabilitiesGenerateLoanTransactions.ts +++ b/lending/src/funcs/liabilitiesGenerateLoanTransactions.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Generate loan transactions report - * - * @remarks - * The _Generate loan transactions_ endpoint requests the generation of the Loan Transactions report. - * - * Learn more about Codat's liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). - * - * Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - */ -export function liabilitiesGenerateLoanTransactions( - client: CodatLendingCore, - request: operations.GenerateLoanTransactionsRequest, - options?: RequestOptions, -): APIPromise< - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GenerateLoanTransactionsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GenerateLoanTransactionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/reports/liabilities/loans/transactions", - )(pathParams); - - const query = encodeFormQuery({ - "sourceType": payload.sourceType, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "generate-loan-transactions", - oAuth2Scopes: null, +type Call = CodatLending["liabilities"]["generateLoanTransactions"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(202, z.void()), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function liabilitiesGenerateLoanTransactions( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.liabilities.generateLoanTransactions(request, options))); } diff --git a/lending/src/funcs/liabilitiesGetLoanSummary.ts b/lending/src/funcs/liabilitiesGetLoanSummary.ts index ffca78284..3a8a9b0f7 100644 --- a/lending/src/funcs/liabilitiesGetLoanSummary.ts +++ b/lending/src/funcs/liabilitiesGetLoanSummary.ts @@ -1,199 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get loan summaries - * - * @remarks - * The *Get loan summaries* endpoint returns a summary by integration type of all loans identified from a company's accounting, banking, and commerce integrations. - * - * The endpoint returns a list of a company's [loan summaries](https://docs.codat.io/lending-api#/schemas/LoanSummary) for each valid data connection. - * - * Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - */ -export function liabilitiesGetLoanSummary( - client: CodatLendingCore, - request: operations.GetLoanSummaryRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.LoanSummary, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetLoanSummaryRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.LoanSummary, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetLoanSummaryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/reports/liabilities/loans")( - pathParams, - ); - - const query = encodeFormQuery({ - "sourceType": payload.sourceType, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-loan-summary", - oAuth2Scopes: null, +type Call = CodatLending["liabilities"]["getLoanSummary"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.LoanSummary, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.LoanSummary$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function liabilitiesGetLoanSummary( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.liabilities.getLoanSummary(request, options))); } diff --git a/lending/src/funcs/liabilitiesListLoanTransactions.ts b/lending/src/funcs/liabilitiesListLoanTransactions.ts index d13c0fae5..537d84a98 100644 --- a/lending/src/funcs/liabilitiesListLoanTransactions.ts +++ b/lending/src/funcs/liabilitiesListLoanTransactions.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List loan transactions - * - * @remarks - * The *List loan transactions* endpoint returns all [loan transactions](https://docs.codat.io/lending-api#/schemas/LoanTransactions) identified from a company's accounting, banking, and commerce integrations. - * - * This detail gives analysts a better idea of the loan obligations a company may have. - * - * Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - */ -export function liabilitiesListLoanTransactions( - client: CodatLendingCore, - request: operations.ListLoanTransactionsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.LoanTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListLoanTransactionsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.LoanTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListLoanTransactionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/reports/liabilities/loans/transactions", - )(pathParams); - - const query = encodeFormQuery({ - "sourceType": payload.sourceType, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-loan-transactions", - oAuth2Scopes: null, +type Call = CodatLending["liabilities"]["listLoanTransactions"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.LoanTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.LoanTransactions$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function liabilitiesListLoanTransactions( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.liabilities.listLoanTransactions(request, options))); } diff --git a/lending/src/funcs/loanWritebackAccountsCreate.ts b/lending/src/funcs/loanWritebackAccountsCreate.ts index 398da0f02..a470ff5ad 100644 --- a/lending/src/funcs/loanWritebackAccountsCreate.ts +++ b/lending/src/funcs/loanWritebackAccountsCreate.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create account - * - * @remarks - * The *Create account* endpoint creates a new [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - * - * [Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/lending-api#/operations/get-create-chartOfAccounts-model). - */ -export function loanWritebackAccountsCreate( - client: CodatLendingCore, - request: operations.CreateAccountRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreateAccountResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateAccountRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreateAccountResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.CreateAccountRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.accountPrototype, { explode: true }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/push/accounts", - )(pathParams); - - const query = encodeFormQuery({ - "allowSyncOnPushComplete": payload.allowSyncOnPushComplete, - "timeoutInMinutes": payload.timeoutInMinutes, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-account", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["accounts"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreateAccountResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreateAccountResponse$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackAccountsCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.accounts.create(request, options))); } diff --git a/lending/src/funcs/loanWritebackAccountsGetCreateModel.ts b/lending/src/funcs/loanWritebackAccountsGetCreateModel.ts index fbca30c53..6e1b2974c 100644 --- a/lending/src/funcs/loanWritebackAccountsGetCreateModel.ts +++ b/lending/src/funcs/loanWritebackAccountsGetCreateModel.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get create account model - * - * @remarks - * The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company and integration. - * - * [Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ -export function loanWritebackAccountsGetCreateModel( - client: CodatLendingCore, - request: operations.GetCreateChartOfAccountsModelRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCreateChartOfAccountsModelRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCreateChartOfAccountsModelRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-create-chartOfAccounts-model", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["accounts"]["getCreateModel"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOption$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackAccountsGetCreateModel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.accounts.getCreateModel(request, options))); } diff --git a/lending/src/funcs/loanWritebackBankAccountsCreate.ts b/lending/src/funcs/loanWritebackBankAccountsCreate.ts index 7d12d9588..39c4ab5ca 100644 --- a/lending/src/funcs/loanWritebackBankAccountsCreate.ts +++ b/lending/src/funcs/loanWritebackBankAccountsCreate.ts @@ -1,212 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create bank account - * - * @remarks - * The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company's connection. - * - * [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/lending-api#/operations/get-create-update-bankAccounts-model). - */ -export function loanWritebackBankAccountsCreate( - client: CodatLendingCore, - request: operations.CreateBankAccountRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreateBankAccountResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateBankAccountRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreateBankAccountResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.CreateBankAccountRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.AccountingBankAccount, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/push/bankAccounts", - )(pathParams); - - const query = encodeFormQuery({ - "allowSyncOnPushComplete": payload.allowSyncOnPushComplete, - "timeoutInMinutes": payload.timeoutInMinutes, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-bank-account", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["bankAccounts"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreateBankAccountResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreateBankAccountResponse$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackBankAccountsCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.bankAccounts.create(request, options))); } diff --git a/lending/src/funcs/loanWritebackBankAccountsGetCreateUpdateModel.ts b/lending/src/funcs/loanWritebackBankAccountsGetCreateUpdateModel.ts index a46717857..d3e49aff0 100644 --- a/lending/src/funcs/loanWritebackBankAccountsGetCreateUpdateModel.ts +++ b/lending/src/funcs/loanWritebackBankAccountsGetCreateUpdateModel.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get create/update bank account model - * - * @remarks - * 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/lending-api#/schemas/BankAccount) for a given company and integration. - * - * [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ -export function loanWritebackBankAccountsGetCreateUpdateModel( - client: CodatLendingCore, - request: operations.GetCreateUpdateBankAccountsModelRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCreateUpdateBankAccountsModelRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCreateUpdateBankAccountsModelRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/options/bankAccounts", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-create-update-bankAccounts-model", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["bankAccounts"]["getCreateUpdateModel"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOption$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackBankAccountsGetCreateUpdateModel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.bankAccounts.getCreateUpdateModel(request, options))); } diff --git a/lending/src/funcs/loanWritebackBankTransactionsCreate.ts b/lending/src/funcs/loanWritebackBankTransactionsCreate.ts index 64def5637..fdb515dbc 100644 --- a/lending/src/funcs/loanWritebackBankTransactionsCreate.ts +++ b/lending/src/funcs/loanWritebackBankTransactionsCreate.ts @@ -1,217 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create bank account transactions - * - * @remarks - * The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company's connection. - * - * [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/lending-api#/operations/get-create-bankTransactions-model). - */ -export function loanWritebackBankTransactionsCreate( - client: CodatLendingCore, - request: operations.CreateBankTransactionsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreateBankTransactionsResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateBankTransactionsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreateBankTransactionsResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.CreateBankTransactionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.AccountingCreateBankTransactions, { - explode: true, - }); - - const pathParams = { - accountId: encodeSimple("accountId", payload.accountId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions", - )(pathParams); - - const query = encodeFormQuery({ - "allowSyncOnPushComplete": payload.allowSyncOnPushComplete, - "timeoutInMinutes": payload.timeoutInMinutes, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-bank-transactions", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["bankTransactions"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreateBankTransactionsResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreateBankTransactionsResponse$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackBankTransactionsCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.bankTransactions.create(request, options))); } diff --git a/lending/src/funcs/loanWritebackBankTransactionsGetCreateModel.ts b/lending/src/funcs/loanWritebackBankTransactionsGetCreateModel.ts index 7c366ae66..de92857aa 100644 --- a/lending/src/funcs/loanWritebackBankTransactionsGetCreateModel.ts +++ b/lending/src/funcs/loanWritebackBankTransactionsGetCreateModel.ts @@ -1,207 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get create bank account transactions model - * - * @remarks - * 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/lending-api#/schemas/BankTransactions) for a given company and integration. - * - * [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ -export function loanWritebackBankTransactionsGetCreateModel( - client: CodatLendingCore, - request: operations.GetCreateBankTransactionsModelRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCreateBankTransactionsModelRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCreateBankTransactionsModelRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - accountId: encodeSimple("accountId", payload.accountId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-create-bank-transactions-model", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["bankTransactions"]["getCreateModel"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOption$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackBankTransactionsGetCreateModel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.bankTransactions.getCreateModel(request, options))); } diff --git a/lending/src/funcs/loanWritebackCreateOperationsGet.ts b/lending/src/funcs/loanWritebackCreateOperationsGet.ts index df18e4946..7e0e4e5f1 100644 --- a/lending/src/funcs/loanWritebackCreateOperationsGet.ts +++ b/lending/src/funcs/loanWritebackCreateOperationsGet.ts @@ -1,195 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get create operation - * - * @remarks - * Retrieve create operation. - */ -export function loanWritebackCreateOperationsGet( - client: CodatLendingCore, - request: operations.GetCreateOperationRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCreateOperationRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetCreateOperationRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - pushOperationKey: encodeSimple( - "pushOperationKey", - payload.pushOperationKey, - { explode: false, charEncoding: "percent" }, - ), - }; - const path = pathToFunc("/companies/{companyId}/push/{pushOperationKey}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-create-operation", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["createOperations"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOperation$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackCreateOperationsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.createOperations.get(request, options))); } diff --git a/lending/src/funcs/loanWritebackCreateOperationsList.ts b/lending/src/funcs/loanWritebackCreateOperationsList.ts index bc9d094d3..35d386bbf 100644 --- a/lending/src/funcs/loanWritebackCreateOperationsList.ts +++ b/lending/src/funcs/loanWritebackCreateOperationsList.ts @@ -1,200 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List create operations - * - * @remarks - * List create operations. - */ -export function loanWritebackCreateOperationsList( - client: CodatLendingCore, - request: operations.ListCreateOperationsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOperations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCreateOperationsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOperations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCreateOperationsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/push")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-create-operations", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["createOperations"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOperations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOperations$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackCreateOperationsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.createOperations.list(request, options))); } diff --git a/lending/src/funcs/loanWritebackDirectCostsCreate.ts b/lending/src/funcs/loanWritebackDirectCostsCreate.ts index 3aae23825..70ad00563 100644 --- a/lending/src/funcs/loanWritebackDirectCostsCreate.ts +++ b/lending/src/funcs/loanWritebackDirectCostsCreate.ts @@ -1,212 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create direct cost - * - * @remarks - * The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company's connection. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/lending-api#/operations/get-create-directCosts-model). - */ -export function loanWritebackDirectCostsCreate( - client: CodatLendingCore, - request: operations.CreateDirectCostRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreateDirectCostResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateDirectCostRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreateDirectCostResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.CreateDirectCostRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.directCostPrototype, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/push/directCosts", - )(pathParams); - - const query = encodeFormQuery({ - "allowSyncOnPushComplete": payload.allowSyncOnPushComplete, - "timeoutInMinutes": payload.timeoutInMinutes, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-direct-cost", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["directCosts"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreateDirectCostResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreateDirectCostResponse$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackDirectCostsCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.directCosts.create(request, options))); } diff --git a/lending/src/funcs/loanWritebackDirectCostsGetCreateModel.ts b/lending/src/funcs/loanWritebackDirectCostsGetCreateModel.ts index d787c34d7..ad05e31d2 100644 --- a/lending/src/funcs/loanWritebackDirectCostsGetCreateModel.ts +++ b/lending/src/funcs/loanWritebackDirectCostsGetCreateModel.ts @@ -1,201 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get create direct cost model - * - * @remarks - * The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company and integration. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ -export function loanWritebackDirectCostsGetCreateModel( - client: CodatLendingCore, - request: operations.GetCreateDirectCostsModelRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCreateDirectCostsModelRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCreateDirectCostsModelRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/options/directCosts", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-create-directCosts-model", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["directCosts"]["getCreateModel"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOption$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackDirectCostsGetCreateModel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.directCosts.getCreateModel(request, options))); } diff --git a/lending/src/funcs/loanWritebackPaymentsCreate.ts b/lending/src/funcs/loanWritebackPaymentsCreate.ts index 02eb10382..77ed5876e 100644 --- a/lending/src/funcs/loanWritebackPaymentsCreate.ts +++ b/lending/src/funcs/loanWritebackPaymentsCreate.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create payment - * - * @remarks - * The *Create payment* endpoint creates a new [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - * - * [Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create payment model](https://docs.codat.io/lending-api#/operations/get-create-payments-model). - */ -export function loanWritebackPaymentsCreate( - client: CodatLendingCore, - request: operations.CreatePaymentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreatePaymentResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreatePaymentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreatePaymentResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.CreatePaymentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.AccountingPayment, { explode: true }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/push/payments", - )(pathParams); - - const query = encodeFormQuery({ - "allowSyncOnPushComplete": payload.allowSyncOnPushComplete, - "timeoutInMinutes": payload.timeoutInMinutes, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-payment", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["payments"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreatePaymentResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreatePaymentResponse$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackPaymentsCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.payments.create(request, options))); } diff --git a/lending/src/funcs/loanWritebackPaymentsGetCreateModel.ts b/lending/src/funcs/loanWritebackPaymentsGetCreateModel.ts index e2aabba85..b4454f7ba 100644 --- a/lending/src/funcs/loanWritebackPaymentsGetCreateModel.ts +++ b/lending/src/funcs/loanWritebackPaymentsGetCreateModel.ts @@ -1,201 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get create payment model - * - * @remarks - * The *Get create payment model* endpoint returns the expected data for the request payload when creating a [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company and integration. - * - * [Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ -export function loanWritebackPaymentsGetCreateModel( - client: CodatLendingCore, - request: operations.GetCreatePaymentModelRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCreatePaymentModelRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCreatePaymentModelRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/options/payments", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-create-payment-model", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["payments"]["getCreateModel"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOption$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackPaymentsGetCreateModel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.payments.getCreateModel(request, options))); } diff --git a/lending/src/funcs/loanWritebackSourceAccountsCreate.ts b/lending/src/funcs/loanWritebackSourceAccountsCreate.ts index a1f234615..127a0a540 100644 --- a/lending/src/funcs/loanWritebackSourceAccountsCreate.ts +++ b/lending/src/funcs/loanWritebackSourceAccountsCreate.ts @@ -1,201 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create source account - * - * @remarks - * The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software. - * - * > ### Versioning - * > If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. - */ -export function loanWritebackSourceAccountsCreate( - client: CodatLendingCore, - request: operations.CreateSourceAccountRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.CreateSourceAccountResponseBody, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateSourceAccountRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.CreateSourceAccountResponseBody, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.CreateSourceAccountRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts", - )(pathParams); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-source-account", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["sourceAccounts"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - operations.CreateSourceAccountResponseBody, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.CreateSourceAccountResponseBody$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackSourceAccountsCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.sourceAccounts.create(request, options))); } diff --git a/lending/src/funcs/loanWritebackSourceAccountsCreateMapping.ts b/lending/src/funcs/loanWritebackSourceAccountsCreateMapping.ts index 529e7bc53..61afd384f 100644 --- a/lending/src/funcs/loanWritebackSourceAccountsCreateMapping.ts +++ b/lending/src/funcs/loanWritebackSourceAccountsCreateMapping.ts @@ -1,230 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create bank feed account mapping - * - * @remarks - * The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account). - * - * A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). - * - * To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint. - * - * > **For custom builds only** - * > - * > Only use this endpoint if you are building your own account management UI. - * - * #### Account mapping variability - * - * The method of mapping the source account to the target account varies depending on the accounting software your company uses. - * - * #### Mapping options: - * - * 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. - * 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping. - * 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. - * - * ### Integration-specific behavior - * - * | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | - * | --------------------- | ----------- | ---------------- | --------------------------- | - * | Xero | ✅ | ✅ | | - * | FreeAgent | ✅ | ✅ | | - * | Oracle NetSuite | ✅ | ✅ | | - * | Exact Online (NL) | ✅ | ✅ | | - * | QuickBooks Online | | | ✅ | - * | Sage | | | ✅ | - */ -export function loanWritebackSourceAccountsCreateMapping( - client: CodatLendingCore, - request: operations.CreateBankAccountMappingRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.BankFeedBankAccountMappingResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateBankAccountMappingRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.BankFeedBankAccountMappingResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.CreateBankAccountMappingRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.BankFeedBankAccountMapping, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping", - )(pathParams); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-bank-account-mapping", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["sourceAccounts"]["createMapping"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.BankFeedBankAccountMappingResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.BankFeedBankAccountMappingResponse$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackSourceAccountsCreateMapping( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.sourceAccounts.createMapping(request, options))); } diff --git a/lending/src/funcs/loanWritebackSourceAccountsListMappings.ts b/lending/src/funcs/loanWritebackSourceAccountsListMappings.ts index 8518391b6..c620f7fb9 100644 --- a/lending/src/funcs/loanWritebackSourceAccountsListMappings.ts +++ b/lending/src/funcs/loanWritebackSourceAccountsListMappings.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List bank feed account mappings - * - * @remarks - * The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts. - * - * A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). - * - * > **For custom builds only** - * > - * > Only use this endpoint if you are building your own account management UI. - */ -export function loanWritebackSourceAccountsListMappings( - client: CodatLendingCore, - request: operations.GetBankAccountMappingRequest, - options?: RequestOptions, -): APIPromise< - Result< - Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetBankAccountMappingRequest, - options?: RequestOptions, -): Promise< - [ - Result< - Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetBankAccountMappingRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-bank-account-mapping", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["sourceAccounts"]["listMappings"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - Array, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, z.array(shared.BankFeedMapping$inboundSchema)), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackSourceAccountsListMappings( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.sourceAccounts.listMappings(request, options))); } diff --git a/lending/src/funcs/loanWritebackSuppliersCreate.ts b/lending/src/funcs/loanWritebackSuppliersCreate.ts index 32662a6eb..c5f5301e0 100644 --- a/lending/src/funcs/loanWritebackSuppliersCreate.ts +++ b/lending/src/funcs/loanWritebackSuppliersCreate.ts @@ -1,212 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create supplier - * - * @remarks - * The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company's connection. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/lending-api#/operations/get-create-update-suppliers-model). - */ -export function loanWritebackSuppliersCreate( - client: CodatLendingCore, - request: operations.CreateSupplierRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreateSupplierResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateSupplierRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreateSupplierResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.CreateSupplierRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.AccountingSupplier, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/push/suppliers", - )(pathParams); - - const query = encodeFormQuery({ - "allowSyncOnPushComplete": payload.allowSyncOnPushComplete, - "timeoutInMinutes": payload.timeoutInMinutes, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-supplier", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["suppliers"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreateSupplierResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreateSupplierResponse$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackSuppliersCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.suppliers.create(request, options))); } diff --git a/lending/src/funcs/loanWritebackSuppliersGetCreateUpdateModel.ts b/lending/src/funcs/loanWritebackSuppliersGetCreateUpdateModel.ts index ac8a11047..bb0443c4a 100644 --- a/lending/src/funcs/loanWritebackSuppliersGetCreateUpdateModel.ts +++ b/lending/src/funcs/loanWritebackSuppliersGetCreateUpdateModel.ts @@ -1,203 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get create/update supplier model - * - * @remarks - * 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/lending-api#/schemas/Supplier) for a given company and integration. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ -export function loanWritebackSuppliersGetCreateUpdateModel( - client: CodatLendingCore, - request: operations.GetCreateUpdateSuppliersModelRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCreateUpdateSuppliersModelRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCreateUpdateSuppliersModelRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/options/suppliers", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-create-update-suppliers-model", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["suppliers"]["getCreateUpdateModel"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOption$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackSuppliersGetCreateUpdateModel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.suppliers.getCreateUpdateModel(request, options))); } diff --git a/lending/src/funcs/loanWritebackTransfersCreate.ts b/lending/src/funcs/loanWritebackTransfersCreate.ts index 82c06b165..1bccb6d62 100644 --- a/lending/src/funcs/loanWritebackTransfersCreate.ts +++ b/lending/src/funcs/loanWritebackTransfersCreate.ts @@ -1,212 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Create transfer - * - * @remarks - * The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company's connection. - * - * [Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/lending-api#/operations/get-create-transfers-model). - */ -export function loanWritebackTransfersCreate( - client: CodatLendingCore, - request: operations.CreateTransferRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingCreateTransferResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.CreateTransferRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingCreateTransferResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.CreateTransferRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.AccountingTransfer, { - explode: true, - }); - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/push/transfers", - )(pathParams); - - const query = encodeFormQuery({ - "allowSyncOnPushComplete": payload.allowSyncOnPushComplete, - "timeoutInMinutes": payload.timeoutInMinutes, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "create-transfer", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["transfers"]["create"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingCreateTransferResponse, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingCreateTransferResponse$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackTransfersCreate( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.transfers.create(request, options))); } diff --git a/lending/src/funcs/loanWritebackTransfersGetCreateModel.ts b/lending/src/funcs/loanWritebackTransfersGetCreateModel.ts index 45fe3a932..35ea3dcc7 100644 --- a/lending/src/funcs/loanWritebackTransfersGetCreateModel.ts +++ b/lending/src/funcs/loanWritebackTransfersGetCreateModel.ts @@ -1,201 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get create transfer model - * - * @remarks - * The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company and integration. - * - * [Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ -export function loanWritebackTransfersGetCreateModel( - client: CodatLendingCore, - request: operations.GetCreateTransfersModelRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCreateTransfersModelRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCreateTransfersModelRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/options/transfers", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-create-transfers-model", - oAuth2Scopes: null, +type Call = CodatLending["loanWriteback"]["transfers"]["getCreateModel"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PushOption, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PushOption$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function loanWritebackTransfersGetCreateModel( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.loanWriteback.transfers.getCreateModel(request, options))); } diff --git a/lending/src/funcs/manageDataGetStatus.ts b/lending/src/funcs/manageDataGetStatus.ts index 04b3ed22c..d0c063290 100644 --- a/lending/src/funcs/manageDataGetStatus.ts +++ b/lending/src/funcs/manageDataGetStatus.ts @@ -1,187 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get data status - * - * @remarks - * Get the state of each data type for a company - */ -export function manageDataGetStatus( - client: CodatLendingCore, - request: operations.GetDataStatusRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetDataStatusDataStatuses, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetDataStatusRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetDataStatusDataStatuses, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetDataStatusRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/dataStatus")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-data-status", - oAuth2Scopes: null, +type Call = CodatLending["manageData"]["getStatus"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - operations.GetDataStatusDataStatuses, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetDataStatusDataStatuses$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function manageDataGetStatus( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.manageData.getStatus(request, options))); } diff --git a/lending/src/funcs/manageDataPullOperationsGet.ts b/lending/src/funcs/manageDataPullOperationsGet.ts index 435c40984..8499b7bd5 100644 --- a/lending/src/funcs/manageDataPullOperationsGet.ts +++ b/lending/src/funcs/manageDataPullOperationsGet.ts @@ -1,194 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get pull operation - * - * @remarks - * Retrieve information about a single dataset or pull operation. - */ -export function manageDataPullOperationsGet( - client: CodatLendingCore, - request: operations.GetPullOperationRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetPullOperationRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetPullOperationRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - datasetId: encodeSimple("datasetId", payload.datasetId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/history/{datasetId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-pull-operation", - oAuth2Scopes: null, +type Call = CodatLending["manageData"]["pullOperations"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PullOperation$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function manageDataPullOperationsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.manageData.pullOperations.get(request, options))); } diff --git a/lending/src/funcs/manageDataPullOperationsList.ts b/lending/src/funcs/manageDataPullOperationsList.ts index 3754666de..7ad674a34 100644 --- a/lending/src/funcs/manageDataPullOperationsList.ts +++ b/lending/src/funcs/manageDataPullOperationsList.ts @@ -1,199 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List pull operations - * - * @remarks - * Gets the pull operation history (datasets) for a given company. - */ -export function manageDataPullOperationsList( - client: CodatLendingCore, - request: operations.ListPullOperationsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PullOperations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListPullOperationsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PullOperations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.ListPullOperationsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/history")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-pull-operations", - oAuth2Scopes: null, +type Call = CodatLending["manageData"]["pullOperations"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PullOperations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PullOperations$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function manageDataPullOperationsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.manageData.pullOperations.list(request, options))); } diff --git a/lending/src/funcs/manageDataRefreshAllDataTypes.ts b/lending/src/funcs/manageDataRefreshAllDataTypes.ts index 4bc5d41fe..0a3913a49 100644 --- a/lending/src/funcs/manageDataRefreshAllDataTypes.ts +++ b/lending/src/funcs/manageDataRefreshAllDataTypes.ts @@ -1,196 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Refresh all data - * - * @remarks - * Refreshes all data types with `fetch on first link` set to `true` for a given company. - * - * This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - * - * [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. - */ -export function manageDataRefreshAllDataTypes( - client: CodatLendingCore, - request: operations.RefreshAllDataTypesRequest, - options?: RequestOptions, -): APIPromise< - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.RefreshAllDataTypesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.RefreshAllDataTypesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/all")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "refresh-all-data-types", - oAuth2Scopes: null, +type Call = CodatLending["manageData"]["refresh"]["allDataTypes"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function manageDataRefreshAllDataTypes( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.manageData.refresh.allDataTypes(request, options))); } diff --git a/lending/src/funcs/manageDataRefreshDataType.ts b/lending/src/funcs/manageDataRefreshDataType.ts index b2c560556..9a924f471 100644 --- a/lending/src/funcs/manageDataRefreshDataType.ts +++ b/lending/src/funcs/manageDataRefreshDataType.ts @@ -1,204 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Refresh data type - * - * @remarks - * Refreshes a given data type for a given company. - * - * This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - */ -export function manageDataRefreshDataType( - client: CodatLendingCore, - request: operations.RefreshDataTypeRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.RefreshDataTypeRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.RefreshDataTypeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - dataType: encodeSimple("dataType", payload.dataType, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/queue/{dataType}")( - pathParams, - ); - - const query = encodeFormQuery({ - "connectionId": payload.connectionId, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "refresh-data-type", - oAuth2Scopes: null, +type Call = CodatLending["manageData"]["refresh"]["dataType"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.PullOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.PullOperation$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function manageDataRefreshDataType( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.manageData.refresh.dataType(request, options))); } diff --git a/lending/src/funcs/manageReportsGenerateReport.ts b/lending/src/funcs/manageReportsGenerateReport.ts index 0e5c8e1b1..0a92ccf51 100644 --- a/lending/src/funcs/manageReportsGenerateReport.ts +++ b/lending/src/funcs/manageReportsGenerateReport.ts @@ -1,199 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Generate report - * - * @remarks - * Use the *Generate report* endpoint to initiate the generation of a report specified by the `reportType` parameter. - * - * This action triggers the system to refresh and pull the necessary data from the company's data sources to ensure the report contains the most up-to-date information. - */ -export function manageReportsGenerateReport( - client: CodatLendingCore, - request: operations.GenerateReportRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.ReportOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GenerateReportRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.ReportOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GenerateReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - reportType: encodeSimple("reportType", payload.reportType, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/reports/{reportType}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "generate-report", - oAuth2Scopes: null, +type Call = CodatLending["manageReports"]["generateReport"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.ReportOperation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(202, shared.ReportOperation$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function manageReportsGenerateReport( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.manageReports.generateReport(request, options))); } diff --git a/lending/src/funcs/manageReportsGetReportStatus.ts b/lending/src/funcs/manageReportsGetReportStatus.ts new file mode 100644 index 000000000..15a429d49 --- /dev/null +++ b/lending/src/funcs/manageReportsGetReportStatus.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; + +type Call = CodatLending["manageReports"]["getReportStatus"]; + +export function manageReportsGetReportStatus( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.manageReports.getReportStatus(request, options))); +} diff --git a/lending/src/funcs/manageReportsListReports.ts b/lending/src/funcs/manageReportsListReports.ts index 4ed8b23d8..b364b60a7 100644 --- a/lending/src/funcs/manageReportsListReports.ts +++ b/lending/src/funcs/manageReportsListReports.ts @@ -1,199 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List reports - * - * @remarks - * Use the *List reports* endpoint to return details (such as generation's current status, date of request, and date of generation) about all reports generated for a company. The query parameter can be used to filter the results. - */ -export function manageReportsListReports( - client: CodatLendingCore, - request: operations.ListReportsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Reports, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListReportsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Reports, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.ListReportsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/reports")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-reports", - oAuth2Scopes: null, +type Call = CodatLending["manageReports"]["listReports"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Reports, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Reports$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function manageReportsListReports( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.manageReports.listReports(request, options))); } diff --git a/lending/src/funcs/salesCustomersGet.ts b/lending/src/funcs/salesCustomersGet.ts index 54bd3d131..bf1aa5645 100644 --- a/lending/src/funcs/salesCustomersGet.ts +++ b/lending/src/funcs/salesCustomersGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get customer - * - * @remarks - * The *Get customer* endpoint returns a single customer for a given customerId. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and receive goods and/or services from the SMB. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesCustomersGet( - client: CodatLendingCore, - request: operations.GetCommerceCustomerRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceCustomer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceCustomerRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceCustomer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceCustomerRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - customerId: encodeSimple("customerId", payload.customerId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-customers/{customerId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-customer", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["customers"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceCustomer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceCustomer$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesCustomersGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.customers.get(request, options))); } diff --git a/lending/src/funcs/salesCustomersList.ts b/lending/src/funcs/salesCustomersList.ts index 36c10c212..22353cac1 100644 --- a/lending/src/funcs/salesCustomersList.ts +++ b/lending/src/funcs/salesCustomersList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List customers - * - * @remarks - * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company's connection. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and recieve goods and/or services from the SMB. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesCustomersList( - client: CodatLendingCore, - request: operations.ListCommerceCustomersRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceCustomers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommerceCustomersRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceCustomers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCommerceCustomersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-customers", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-customers", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["customers"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceCustomers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceCustomers$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesCustomersList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.customers.list(request, options))); } diff --git a/lending/src/funcs/salesDisputesGet.ts b/lending/src/funcs/salesDisputesGet.ts index 823d7764b..0ccca0879 100644 --- a/lending/src/funcs/salesDisputesGet.ts +++ b/lending/src/funcs/salesDisputesGet.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get dispute - * - * @remarks - * The *Get dispute* endpoint returns a single dispute for a given disputeId. - * - * [Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesDisputesGet( - client: CodatLendingCore, - request: operations.GetCommerceDisputeRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceDispute, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceDisputeRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceDispute, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetCommerceDisputeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - disputeId: encodeSimple("disputeId", payload.disputeId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-disputes/{disputeId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-dispute", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["disputes"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceDispute, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceDispute$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesDisputesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.disputes.get(request, options))); } diff --git a/lending/src/funcs/salesDisputesList.ts b/lending/src/funcs/salesDisputesList.ts index 56a362dae..c3aa031c5 100644 --- a/lending/src/funcs/salesDisputesList.ts +++ b/lending/src/funcs/salesDisputesList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List disputes - * - * @remarks - * The *List disputes* endpoint returns a list of [disputes](https://docs.codat.io/lending-api#/schemas/Dispute) for a given company's connection. - * - * [Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesDisputesList( - client: CodatLendingCore, - request: operations.ListCommerceDisputesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceDisputes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommerceDisputesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceDisputes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCommerceDisputesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-disputes", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-disputes", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["disputes"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceDisputes, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceDisputes$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesDisputesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.disputes.list(request, options))); } diff --git a/lending/src/funcs/salesLocationsGet.ts b/lending/src/funcs/salesLocationsGet.ts index 6b3414bf0..1c39b105e 100644 --- a/lending/src/funcs/salesLocationsGet.ts +++ b/lending/src/funcs/salesLocationsGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get location - * - * @remarks - * The *Get location* endpoint returns a single location for a given locationId. - * - * [Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesLocationsGet( - client: CodatLendingCore, - request: operations.GetCommerceLocationRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceLocation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceLocationRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceLocation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceLocationRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - locationId: encodeSimple("locationId", payload.locationId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-locations/{locationId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-location", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["locations"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceLocation, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceLocation$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesLocationsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.locations.get(request, options))); } diff --git a/lending/src/funcs/salesLocationsList.ts b/lending/src/funcs/salesLocationsList.ts index bf255dfe6..7189b94da 100644 --- a/lending/src/funcs/salesLocationsList.ts +++ b/lending/src/funcs/salesLocationsList.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List locations - * - * @remarks - * The *List locations* endpoint returns a list of [locations](https://docs.codat.io/lending-api#/schemas/Location) for a given company's connection. - * - * [Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesLocationsList( - client: CodatLendingCore, - request: operations.ListCommerceLocationsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceLocations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommerceLocationsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceLocations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCommerceLocationsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-locations", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-locations", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["locations"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceLocations, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceLocations$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesLocationsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.locations.list(request, options))); } diff --git a/lending/src/funcs/salesMetricsGetCustomerRetention.ts b/lending/src/funcs/salesMetricsGetCustomerRetention.ts index 9a16d51e0..30f4779a2 100644 --- a/lending/src/funcs/salesMetricsGetCustomerRetention.ts +++ b/lending/src/funcs/salesMetricsGetCustomerRetention.ts @@ -1,236 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get customer retention metrics - * - * @remarks - * The *Get customer retention metrics* endpoint returns customer retention insights for a specific company's commerce connection over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * #### Customer retention metrics - * - * - __Existing customers__: the number of unique customers that have placed an order(s) in the specified period and any previous period. - * - __New customers__: the number of unique customers that have placed an order(s) in the specified period and none in any previous period. - * - __Total customers__: the total number of existing and new customers within the specified period. - * - __Retention rate__: the ratio of existing customers within the specified period compared to the total customers at the end of the previous period represented as a percentage. - * - __Repeat rate__: the ratio of existing customers to total customers over the specified period represented as a percentage. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate customer retention metrics. - * - * #### Response structure - * - * The Customer retention report's dimensions and measures are: - * - * | Index | Dimensions | - * |-----------------------------|----------------------------| - * | `index` = 0 | Period | - * | `index` = 1 | Customer retention metrics | - * - * | Index | Measures | - * |----------------------|------------| - * | `index` = 0 | Count | - * | `index` = 1 | Percentage | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ -export function salesMetricsGetCustomerRetention( - client: CodatLendingCore, - request: operations.GetCommerceCustomerRetentionMetricsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceCustomerRetentionMetricsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceCustomerRetentionMetricsRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/customerRetention", - )(pathParams); - - const query = encodeFormQuery({ - "includeDisplayNames": payload.includeDisplayNames, - "numberOfPeriods": payload.numberOfPeriods, - "periodLength": payload.periodLength, - "periodUnit": payload.periodUnit, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-customer-retention-metrics", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["metrics"]["getCustomerRetention"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceReport$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesMetricsGetCustomerRetention( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.metrics.getCustomerRetention(request, options))); } diff --git a/lending/src/funcs/salesMetricsGetLifetimeValue.ts b/lending/src/funcs/salesMetricsGetLifetimeValue.ts index e00d7906f..215c39166 100644 --- a/lending/src/funcs/salesMetricsGetLifetimeValue.ts +++ b/lending/src/funcs/salesMetricsGetLifetimeValue.ts @@ -1,228 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get lifetime value metrics - * - * @remarks - * The *Get lifetime value metrics* endpoint returns the average revenue that a specific company will generate throughout its lifespan over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the lifetime value metrics. - * - * #### Response structure - * - * The Lifetime value report's dimensions and measures are: - * - * | Index | Dimensions | - * |---------------|------------------------| - * | `index` = 0 | Period | - * | `index` = 1 | Lifetime value metrics | - * - * | Index | Measures | - * |-------------------|---------| - * | `index` = 1 | Value | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ -export function salesMetricsGetLifetimeValue( - client: CodatLendingCore, - request: operations.GetCommerceLifetimeValueMetricsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceLifetimeValueMetricsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceLifetimeValueMetricsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/lifetimeValue", - )(pathParams); - - const query = encodeFormQuery({ - "includeDisplayNames": payload.includeDisplayNames, - "numberOfPeriods": payload.numberOfPeriods, - "periodLength": payload.periodLength, - "periodUnit": payload.periodUnit, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-lifetime-value-metrics", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["metrics"]["getLifetimeValue"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceReport$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesMetricsGetLifetimeValue( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.metrics.getLifetimeValue(request, options))); } diff --git a/lending/src/funcs/salesMetricsGetRevenue.ts b/lending/src/funcs/salesMetricsGetRevenue.ts index 2154fb80b..c9094a99d 100644 --- a/lending/src/funcs/salesMetricsGetRevenue.ts +++ b/lending/src/funcs/salesMetricsGetRevenue.ts @@ -1,227 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get commerce revenue metrics - * - * @remarks - * The *Get revenue report* endpoint returns the revenue and revenue growth for a specific company connection over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the revenue metrics. - * - * #### Response structure - * - * The Revenue report's dimensions and measures are: - * - * | Index | Dimensions | - * |---------------|------------| - * | `index` = 0 | Period | - * | `index` = 1 | Revenue | - * - * | Index | Measures | - * |---------------|--------------------------------------------------------------------------------------------------------------------------| - * | `index` = 0 | Value | - * | `index` = 1 | Percentage change, defined as the change between the current and previous periods' values and expressed as a percentage. | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ -export function salesMetricsGetRevenue( - client: CodatLendingCore, - request: operations.GetCommerceRevenueMetricsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceRevenueMetricsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceRevenueMetricsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/revenue", - )(pathParams); - - const query = encodeFormQuery({ - "includeDisplayNames": payload.includeDisplayNames, - "numberOfPeriods": payload.numberOfPeriods, - "periodLength": payload.periodLength, - "periodUnit": payload.periodUnit, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-revenue-metrics", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["metrics"]["getRevenue"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceReport$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesMetricsGetRevenue( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.metrics.getRevenue(request, options))); } diff --git a/lending/src/funcs/salesOrdersGet.ts b/lending/src/funcs/salesOrdersGet.ts index f63b7c4a8..c8f77b649 100644 --- a/lending/src/funcs/salesOrdersGet.ts +++ b/lending/src/funcs/salesOrdersGet.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get order - * - * @remarks - * The *Get order* endpoint returns a single order for a given orderId. - * - * [Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesOrdersGet( - client: CodatLendingCore, - request: operations.GetCommerceOrderRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceOrder, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceOrderRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceOrder, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetCommerceOrderRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - orderId: encodeSimple("orderId", payload.orderId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-orders/{orderId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-order", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["orders"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceOrder, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceOrder$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesOrdersGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.orders.get(request, options))); } diff --git a/lending/src/funcs/salesOrdersList.ts b/lending/src/funcs/salesOrdersList.ts index 5d649ecf5..a789d859f 100644 --- a/lending/src/funcs/salesOrdersList.ts +++ b/lending/src/funcs/salesOrdersList.ts @@ -1,209 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List orders - * - * @remarks - * The *List orders* endpoint returns a list of [orders](https://docs.codat.io/lending-api#/schemas/Order) for a given company's connection. - * - * [Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesOrdersList( - client: CodatLendingCore, - request: operations.ListCommerceOrdersRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceOrders, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommerceOrdersRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceOrders, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.ListCommerceOrdersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-orders", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-orders", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["orders"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceOrders, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceOrders$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesOrdersList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.orders.list(request, options))); } diff --git a/lending/src/funcs/salesPaymentMethodsGet.ts b/lending/src/funcs/salesPaymentMethodsGet.ts index 9bfbbf438..958653284 100644 --- a/lending/src/funcs/salesPaymentMethodsGet.ts +++ b/lending/src/funcs/salesPaymentMethodsGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get payment method - * - * @remarks - * The *Get payment method* endpoint returns a single payment method for a given paymentMethodId. - * - * [Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesPaymentMethodsGet( - client: CodatLendingCore, - request: operations.GetCommercePaymentMethodRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommercePaymentMethod, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommercePaymentMethodRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommercePaymentMethod, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommercePaymentMethodRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - paymentMethodId: encodeSimple("paymentMethodId", payload.paymentMethodId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-paymentMethods/{paymentMethodId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-payment-method", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["paymentMethods"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommercePaymentMethod, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommercePaymentMethod$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesPaymentMethodsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.paymentMethods.get(request, options))); } diff --git a/lending/src/funcs/salesPaymentMethodsList.ts b/lending/src/funcs/salesPaymentMethodsList.ts index c791da80f..7dfd7fee8 100644 --- a/lending/src/funcs/salesPaymentMethodsList.ts +++ b/lending/src/funcs/salesPaymentMethodsList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List payment methods - * - * @remarks - * The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) for a given company's connection. - * - * [Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesPaymentMethodsList( - client: CodatLendingCore, - request: operations.ListCommercePaymentMethodsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommercePaymentMethods, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommercePaymentMethodsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommercePaymentMethods, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCommercePaymentMethodsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-paymentMethods", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-payment-methods", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["paymentMethods"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommercePaymentMethods, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommercePaymentMethods$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesPaymentMethodsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.paymentMethods.list(request, options))); } diff --git a/lending/src/funcs/salesPaymentsGet.ts b/lending/src/funcs/salesPaymentsGet.ts index c34eb3c5c..efb4e6ae7 100644 --- a/lending/src/funcs/salesPaymentsGet.ts +++ b/lending/src/funcs/salesPaymentsGet.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get payment - * - * @remarks - * The *Get payment* endpoint returns a single payment for a given paymentId. - * - * [Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesPaymentsGet( - client: CodatLendingCore, - request: operations.GetCommercePaymentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommercePayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommercePaymentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommercePayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetCommercePaymentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - paymentId: encodeSimple("paymentId", payload.paymentId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-payments/{paymentId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-payment", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["payments"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommercePayment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommercePayment$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesPaymentsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.payments.get(request, options))); } diff --git a/lending/src/funcs/salesPaymentsList.ts b/lending/src/funcs/salesPaymentsList.ts index e98222d1d..12dd5101e 100644 --- a/lending/src/funcs/salesPaymentsList.ts +++ b/lending/src/funcs/salesPaymentsList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List payments - * - * @remarks - * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - * - * [Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesPaymentsList( - client: CodatLendingCore, - request: operations.ListCommercePaymentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommercePayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommercePaymentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommercePayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCommercePaymentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-payments", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-payments", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["payments"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommercePayments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommercePayments$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesPaymentsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.payments.list(request, options))); } diff --git a/lending/src/funcs/salesProductCategoriesGet.ts b/lending/src/funcs/salesProductCategoriesGet.ts index f3ba30762..beda9e77a 100644 --- a/lending/src/funcs/salesProductCategoriesGet.ts +++ b/lending/src/funcs/salesProductCategoriesGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get product category - * - * @remarks - * The *Get product* endpoint returns a single product for a given productId. - * - * [Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesProductCategoriesGet( - client: CodatLendingCore, - request: operations.GetCommerceProductCategoryRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceProductCategory, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceProductCategoryRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceProductCategory, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceProductCategoryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - productId: encodeSimple("productId", payload.productId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-productCategories/{productId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-product-category", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["productCategories"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceProductCategory, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceProductCategory$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesProductCategoriesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.productCategories.get(request, options))); } diff --git a/lending/src/funcs/salesProductCategoriesList.ts b/lending/src/funcs/salesProductCategoriesList.ts index 4f7fb8376..2c2df04df 100644 --- a/lending/src/funcs/salesProductCategoriesList.ts +++ b/lending/src/funcs/salesProductCategoriesList.ts @@ -1,212 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List product categories - * - * @remarks - * The *List product categories* endpoint returns a list of [product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) for a given company's connection. - * - * [Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesProductCategoriesList( - client: CodatLendingCore, - request: operations.ListCommerceProductCategoriesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceProductCategories, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommerceProductCategoriesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceProductCategories, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCommerceProductCategoriesRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-productCategories", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-product-categories", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["productCategories"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceProductCategories, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceProductCategories$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesProductCategoriesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.productCategories.list(request, options))); } diff --git a/lending/src/funcs/salesProductsGet.ts b/lending/src/funcs/salesProductsGet.ts index c669fe5d0..d0ff5c9db 100644 --- a/lending/src/funcs/salesProductsGet.ts +++ b/lending/src/funcs/salesProductsGet.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get product - * - * @remarks - * The *Get product* endpoint returns a single product for a given productId. - * - * [Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company's inventory that are available for sale. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesProductsGet( - client: CodatLendingCore, - request: operations.GetCommerceProductRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceProduct, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceProductRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceProduct, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetCommerceProductRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - productId: encodeSimple("productId", payload.productId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-products/{productId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-product", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["products"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceProduct, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceProduct$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesProductsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.products.get(request, options))); } diff --git a/lending/src/funcs/salesProductsList.ts b/lending/src/funcs/salesProductsList.ts index 52798aec3..ba1f7703c 100644 --- a/lending/src/funcs/salesProductsList.ts +++ b/lending/src/funcs/salesProductsList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List products - * - * @remarks - * The *List products* endpoint returns a list of [products](https://docs.codat.io/lending-api#/schemas/Product) for a given company's connection. - * - * [Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company's inventory that are available for sale. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesProductsList( - client: CodatLendingCore, - request: operations.ListCommerceProductsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceProducts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommerceProductsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceProducts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCommerceProductsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-products", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-products", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["products"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceProducts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceProducts$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesProductsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.products.list(request, options))); } diff --git a/lending/src/funcs/salesReportsGetOrders.ts b/lending/src/funcs/salesReportsGetOrders.ts index 237fe4268..f918bfaac 100644 --- a/lending/src/funcs/salesReportsGetOrders.ts +++ b/lending/src/funcs/salesReportsGetOrders.ts @@ -1,227 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get orders report - * - * @remarks - * The *Get orders report* endpoint returns the number of orders, total value, and average order value for a specific company's commerce connection over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the order metrics. - * - * #### Response structure - * - * The Orders report's dimensions and measures are: - * - * | Index | Dimensions | - * |---------------|----------------| - * | `index` = 0 | Period | - * | `index` = 1 | Order metrics | - * - * | Index | Measures | - * |---------------|------------| - * | `index` = 0 | Count | - * | `index` = 1 | Value | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ -export function salesReportsGetOrders( - client: CodatLendingCore, - request: operations.GetCommerceOrdersReportRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceOrdersReportRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceOrdersReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/orders", - )(pathParams); - - const query = encodeFormQuery({ - "includeDisplayNames": payload.includeDisplayNames, - "numberOfPeriods": payload.numberOfPeriods, - "periodLength": payload.periodLength, - "periodUnit": payload.periodUnit, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-orders-report", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["reports"]["getOrders"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceReport$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesReportsGetOrders( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.reports.getOrders(request, options))); } diff --git a/lending/src/funcs/salesReportsGetRefunds.ts b/lending/src/funcs/salesReportsGetRefunds.ts index 64d43a39b..80657a92e 100644 --- a/lending/src/funcs/salesReportsGetRefunds.ts +++ b/lending/src/funcs/salesReportsGetRefunds.ts @@ -1,228 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get refunds report - * - * @remarks - * The *Get refunds report* endpoint returns the number and total value of refunds and the refund rate for a specific company's commerce connection over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the refunds metrics. - * - * #### Response structure - * - * The Refunds report's dimensions and measures are: - * - * | Index | Dimensions | - * |----------------|----------------| - * | `index` = 0 | Period | - * | `index` = 1 | Refund metrics | - * - * | Index | Measures | - * |----------------|------------| - * | `index` = 0 | Count | - * | `index` = 1 | Value | - * | `index` = 2 | Percentage | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ -export function salesReportsGetRefunds( - client: CodatLendingCore, - request: operations.GetCommerceRefundsReportRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceRefundsReportRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceRefundsReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/refunds", - )(pathParams); - - const query = encodeFormQuery({ - "includeDisplayNames": payload.includeDisplayNames, - "numberOfPeriods": payload.numberOfPeriods, - "periodLength": payload.periodLength, - "periodUnit": payload.periodUnit, - "reportDate": payload.reportDate, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-refunds-report", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["reports"]["getRefunds"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceReport, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceReport$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesReportsGetRefunds( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.reports.getRefunds(request, options))); } diff --git a/lending/src/funcs/salesTransactionsGet.ts b/lending/src/funcs/salesTransactionsGet.ts index 78bb7ba66..f598b50cd 100644 --- a/lending/src/funcs/salesTransactionsGet.ts +++ b/lending/src/funcs/salesTransactionsGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get transaction - * - * @remarks - * The *Get transaction* endpoint returns a single transaction for a given transactionId. - * - * [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesTransactionsGet( - client: CodatLendingCore, - request: operations.GetCommerceTransactionRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetCommerceTransactionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetCommerceTransactionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - transactionId: encodeSimple("transactionId", payload.transactionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-transactions/{transactionId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-commerce-transaction", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["transactions"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceTransaction$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesTransactionsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.transactions.get(request, options))); } diff --git a/lending/src/funcs/salesTransactionsList.ts b/lending/src/funcs/salesTransactionsList.ts index c3a4237ca..5390e753a 100644 --- a/lending/src/funcs/salesTransactionsList.ts +++ b/lending/src/funcs/salesTransactionsList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List transactions - * - * @remarks - * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company's connection. - * - * [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function salesTransactionsList( - client: CodatLendingCore, - request: operations.ListCommerceTransactionsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.CommerceTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListCommerceTransactionsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.CommerceTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListCommerceTransactionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/commerce-transactions", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-commerce-transactions", - oAuth2Scopes: null, +type Call = CodatLending["sales"]["transactions"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.CommerceTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.CommerceTransactions$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function salesTransactionsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.sales.transactions.list(request, options))); } diff --git a/lending/src/funcs/transactionsAccountTransactionsGet.ts b/lending/src/funcs/transactionsAccountTransactionsGet.ts index 3acef78c9..347eb3d01 100644 --- a/lending/src/funcs/transactionsAccountTransactionsGet.ts +++ b/lending/src/funcs/transactionsAccountTransactionsGet.ts @@ -1,209 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get account transaction - * - * @remarks - * The *Get account transaction* endpoint returns a single account transaction for a given accountTransactionId. - * - * [Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). - */ -export function transactionsAccountTransactionsGet( - client: CodatLendingCore, - request: operations.GetAccountingAccountTransactionRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAccountTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingAccountTransactionRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAccountTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingAccountTransactionRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - accountTransactionId: encodeSimple( - "accountTransactionId", - payload.accountTransactionId, - { explode: false, charEncoding: "percent" }, - ), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/accountTransactions/{accountTransactionId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-account-transaction", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["accountTransactions"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAccountTransaction, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAccountTransaction$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsAccountTransactionsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.accountTransactions.get(request, options))); } diff --git a/lending/src/funcs/transactionsAccountTransactionsList.ts b/lending/src/funcs/transactionsAccountTransactionsList.ts index 21bea7d4b..0befd1fee 100644 --- a/lending/src/funcs/transactionsAccountTransactionsList.ts +++ b/lending/src/funcs/transactionsAccountTransactionsList.ts @@ -1,212 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List account transactions - * - * @remarks - * The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) for a given company's connection. - * - * [Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). - */ -export function transactionsAccountTransactionsList( - client: CodatLendingCore, - request: operations.ListAccountingAccountTransactionsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAccountTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingAccountTransactionsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAccountTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingAccountTransactionsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/accountTransactions", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-account-transactions", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["accountTransactions"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAccountTransactions, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAccountTransactions$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsAccountTransactionsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.accountTransactions.list(request, options))); } diff --git a/lending/src/funcs/transactionsDirectCostsDownloadAttachment.ts b/lending/src/funcs/transactionsDirectCostsDownloadAttachment.ts index ebcc201a7..2bde3b0e5 100644 --- a/lending/src/funcs/transactionsDirectCostsDownloadAttachment.ts +++ b/lending/src/funcs/transactionsDirectCostsDownloadAttachment.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Download direct cost attachment - * - * @remarks - * The *Download direct cost attachment* endpoint downloads a specific attachment for a given `directCostId` and `attachmentId`. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - */ -export function transactionsDirectCostsDownloadAttachment( - client: CodatLendingCore, - request: operations.DownloadAccountingDirectCostAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.DownloadAccountingDirectCostAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.DownloadAccountingDirectCostAttachmentRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - directCostId: encodeSimple("directCostId", payload.directCostId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments/{attachmentId}/download", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/octet-stream", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "download-accounting-direct-cost-attachment", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["directCosts"]["downloadAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - ReadableStream, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.stream(200, z.instanceof(ReadableStream)), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsDirectCostsDownloadAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.directCosts.downloadAttachment(request, options))); } diff --git a/lending/src/funcs/transactionsDirectCostsGet.ts b/lending/src/funcs/transactionsDirectCostsGet.ts index 938d8a3d0..f69ae9ff0 100644 --- a/lending/src/funcs/transactionsDirectCostsGet.ts +++ b/lending/src/funcs/transactionsDirectCostsGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get direct cost - * - * @remarks - * The *Get direct cost* endpoint returns a single direct cost for a given directCostId. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function transactionsDirectCostsGet( - client: CodatLendingCore, - request: operations.GetAccountingDirectCostRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingDirectCost, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingDirectCostRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingDirectCost, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingDirectCostRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - directCostId: encodeSimple("directCostId", payload.directCostId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-direct-cost", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["directCosts"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingDirectCost, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingDirectCost$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsDirectCostsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.directCosts.get(request, options))); } diff --git a/lending/src/funcs/transactionsDirectCostsGetAttachment.ts b/lending/src/funcs/transactionsDirectCostsGetAttachment.ts index 2a708ee16..a0ede9019 100644 --- a/lending/src/funcs/transactionsDirectCostsGetAttachment.ts +++ b/lending/src/funcs/transactionsDirectCostsGetAttachment.ts @@ -1,207 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get direct cost attachment - * - * @remarks - * The *Get direct cost attachment* endpoint returns a specific attachment for a given `directCostId` and `attachmentId`. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - */ -export function transactionsDirectCostsGetAttachment( - client: CodatLendingCore, - request: operations.GetAccountingDirectCostAttachmentRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingDirectCostAttachmentRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingDirectCostAttachmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - attachmentId: encodeSimple("attachmentId", payload.attachmentId, { - explode: false, - charEncoding: "percent", - }), - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - directCostId: encodeSimple("directCostId", payload.directCostId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments/{attachmentId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-direct-cost-attachment", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["directCosts"]["getAttachment"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingAttachment, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingAttachment$inboundSchema), - M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsDirectCostsGetAttachment( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.directCosts.getAttachment(request, options))); } diff --git a/lending/src/funcs/transactionsDirectCostsList.ts b/lending/src/funcs/transactionsDirectCostsList.ts index 865127b21..8e3c481bb 100644 --- a/lending/src/funcs/transactionsDirectCostsList.ts +++ b/lending/src/funcs/transactionsDirectCostsList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List direct costs - * - * @remarks - * The *List direct costs* endpoint returns a list of [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company's connection. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ -export function transactionsDirectCostsList( - client: CodatLendingCore, - request: operations.ListAccountingDirectCostsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingDirectCosts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingDirectCostsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingDirectCosts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingDirectCostsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directCosts", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-direct-costs", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["directCosts"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingDirectCosts, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingDirectCosts$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsDirectCostsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.directCosts.list(request, options))); } diff --git a/lending/src/funcs/transactionsDirectCostsListAttachments.ts b/lending/src/funcs/transactionsDirectCostsListAttachments.ts index 6478e3e18..49da38466 100644 --- a/lending/src/funcs/transactionsDirectCostsListAttachments.ts +++ b/lending/src/funcs/transactionsDirectCostsListAttachments.ts @@ -1,205 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List direct cost attachments - * - * @remarks - * The *List direct cost attachments* endpoint returns a list of attachments available to download for given `directCostId`. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - */ -export function transactionsDirectCostsListAttachments( - client: CodatLendingCore, - request: operations.ListAccountingDirectCostAttachmentsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingDirectCostAttachmentsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingDirectCostAttachmentsRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - directCostId: encodeSimple("directCostId", payload.directCostId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-direct-cost-attachments", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["directCosts"]["listAttachments"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.Attachments, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.Attachments$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsDirectCostsListAttachments( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.directCosts.listAttachments(request, options))); } diff --git a/lending/src/funcs/transactionsJournalEntriesGet.ts b/lending/src/funcs/transactionsJournalEntriesGet.ts index 72ce6b115..124b16d8c 100644 --- a/lending/src/funcs/transactionsJournalEntriesGet.ts +++ b/lending/src/funcs/transactionsJournalEntriesGet.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get journal entry - * - * @remarks - * The *Get journal entry* endpoint returns a single journal entry for a given journalEntryId. - * - * [Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function transactionsJournalEntriesGet( - client: CodatLendingCore, - request: operations.GetAccountingJournalEntryRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingJournalEntry, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingJournalEntryRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingJournalEntry, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingJournalEntryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - journalEntryId: encodeSimple("journalEntryId", payload.journalEntryId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/data/journalEntries/{journalEntryId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-journal-entry", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["journalEntries"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingJournalEntry, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingJournalEntry$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsJournalEntriesGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.journalEntries.get(request, options))); } diff --git a/lending/src/funcs/transactionsJournalEntriesList.ts b/lending/src/funcs/transactionsJournalEntriesList.ts index a0d7360d5..4268192d1 100644 --- a/lending/src/funcs/transactionsJournalEntriesList.ts +++ b/lending/src/funcs/transactionsJournalEntriesList.ts @@ -1,208 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List journal entries - * - * @remarks - * The *List journal entries* endpoint returns a list of [journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) for a given company's connection. - * - * [Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function transactionsJournalEntriesList( - client: CodatLendingCore, - request: operations.ListAccountingJournalEntriesRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingJournalEntries, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingJournalEntriesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingJournalEntries, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingJournalEntriesRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/journalEntries")( - pathParams, - ); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-journal-entries", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["journalEntries"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingJournalEntries, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingJournalEntries$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsJournalEntriesList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.journalEntries.list(request, options))); } diff --git a/lending/src/funcs/transactionsJournalsGet.ts b/lending/src/funcs/transactionsJournalsGet.ts index cad1e63ed..e878254d7 100644 --- a/lending/src/funcs/transactionsJournalsGet.ts +++ b/lending/src/funcs/transactionsJournalsGet.ts @@ -1,202 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get journal - * - * @remarks - * The *Get journal* endpoint returns a single journal for a given journalId. - * - * [Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function transactionsJournalsGet( - client: CodatLendingCore, - request: operations.GetAccountingJournalRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingJournal, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingJournalRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingJournal, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingJournalRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - journalId: encodeSimple("journalId", payload.journalId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/journals/{journalId}")( - pathParams, - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-journal", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["journals"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingJournal, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingJournal$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsJournalsGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.journals.get(request, options))); } diff --git a/lending/src/funcs/transactionsJournalsList.ts b/lending/src/funcs/transactionsJournalsList.ts index d9dc8284e..b60b79d53 100644 --- a/lending/src/funcs/transactionsJournalsList.ts +++ b/lending/src/funcs/transactionsJournalsList.ts @@ -1,204 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List journals - * - * @remarks - * The *List journals* endpoint returns a list of [journals](https://docs.codat.io/lending-api#/schemas/Journal) for a given company's connection. - * - * [Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function transactionsJournalsList( - client: CodatLendingCore, - request: operations.ListAccountingJournalsRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingJournals, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingJournalsRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingJournals, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingJournalsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc("/companies/{companyId}/data/journals")(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-journals", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["journals"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingJournals, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingJournals$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsJournalsList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.journals.list(request, options))); } diff --git a/lending/src/funcs/transactionsTransfersGet.ts b/lending/src/funcs/transactionsTransfersGet.ts index 146445e35..c6a779709 100644 --- a/lending/src/funcs/transactionsTransfersGet.ts +++ b/lending/src/funcs/transactionsTransfersGet.ts @@ -1,206 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * Get transfer - * - * @remarks - * The *Get transfer* endpoint returns a single transfer for a given transferId. - * - * [Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function transactionsTransfersGet( - client: CodatLendingCore, - request: operations.GetAccountingTransferRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingTransfer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.GetAccountingTransferRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingTransfer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetAccountingTransferRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - transferId: encodeSimple("transferId", payload.transferId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/transfers/{transferId}", - )(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-accounting-transfer", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["transfers"]["get"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingTransfer, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingTransfer$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsTransfersGet( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.transfers.get(request, options))); } diff --git a/lending/src/funcs/transactionsTransfersList.ts b/lending/src/funcs/transactionsTransfersList.ts index 8547cfd04..c8fac540f 100644 --- a/lending/src/funcs/transactionsTransfersList.ts +++ b/lending/src/funcs/transactionsTransfersList.ts @@ -1,210 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import { matchStatusCode } from "../lib/http.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { CodatLendingError } from "../sdk/models/errors/codatlendingerror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import * as shared from "../sdk/models/shared/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; +import type { CodatLending, CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import type { Result } from "../sdk/types/fp"; +import { toResult } from "./_adapter"; -/** - * List transfers - * - * @remarks - * The *List transfers* endpoint returns a list of [transfers](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company's connection. - * - * [Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ -export function transactionsTransfersList( - client: CodatLendingCore, - request: operations.ListAccountingTransfersRequest, - options?: RequestOptions, -): APIPromise< - Result< - shared.AccountingTransfers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: CodatLendingCore, - request: operations.ListAccountingTransfersRequest, - options?: RequestOptions, -): Promise< - [ - Result< - shared.AccountingTransfers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.ListAccountingTransfersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - companyId: encodeSimple("companyId", payload.companyId, { - explode: false, - charEncoding: "percent", - }), - connectionId: encodeSimple("connectionId", payload.connectionId, { - explode: false, - charEncoding: "percent", - }), - }; - const path = pathToFunc( - "/companies/{companyId}/connections/{connectionId}/data/transfers", - )(pathParams); - - const query = encodeFormQuery({ - "orderBy": payload.orderBy, - "page": payload.page, - "pageSize": payload.pageSize, - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.authHeader); - const securityInput = secConfig == null ? {} : { authHeader: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "list-accounting-transfers", - oAuth2Scopes: null, +type Call = CodatLending["transactions"]["transfers"]["list"]; - resolvedSecurity: requestSecurity, - - securitySource: client._options.authHeader, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - isErrorStatusCode: (statusCode: number) => - matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - shared.AccountingTransfers, - | errors.ErrorMessage - | CodatLendingError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, shared.AccountingTransfers$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 404, 409, 429], - errors.ErrorMessage$inboundSchema, - ), - M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; +export function transactionsTransfersList( + client: CodatLendingCore, + request: Parameters[0], + options?: Parameters[1], +): APIPromise>, Error>> { + return new APIPromise(toResult(() => client.transactions.transfers.list(request, options))); } diff --git a/lending/src/funcs/validateWebhook.ts b/lending/src/funcs/validateWebhook.ts index f666764da..b419fd2e6 100644 --- a/lending/src/funcs/validateWebhook.ts +++ b/lending/src/funcs/validateWebhook.ts @@ -1,72 +1,76 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingCore } from "../core.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as shared from "../sdk/models/shared/index.js"; -import * as webhooks from "../sdk/models/webhooks/index.js"; -import { ERR, Result } from "../sdk/types/fp.js"; +import type { CodatLendingCore } from "../core"; +import { APIPromise } from "../sdk/types/async"; +import { OK, ERR } from "../sdk/types/fp"; +import type { Result } from "../sdk/types/fp"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror"; +import type * as shared from "../sdk/models/index"; +import type * as webhooks from "../sdk/models/webhooks/index"; -export async function validateWebhook(_client: CodatLendingCore, { - request: rawRequest, -}: { - request: { - body: BodyInit; - method: string; - url: string; - headers: Record | Headers; - } | Request; -}): Promise< - Result< - | shared.AccountCategoriesUpdatedWebhook - | undefined - | shared.ClientRateLimitWebhook - | shared.Schema - | webhooks.ReportsCreditModelGenerateSuccessfulReportGenerationWebhook, - SDKValidationError - > -> { - const request = normalizeRequest(rawRequest); - const knownSchemas = [ - shared.accountCategoriesUpdatedWebhookFromJSON, - shared.clientRateLimitWebhookFromJSON, - shared.clientRateLimitWebhookFromJSON, - shared.schemaFromJSON, - shared.schemaFromJSON, - webhooks - .reportsCreditModelGenerateSuccessfulReportGenerationWebhookFromJSON, - shared.schemaFromJSON, - ]; +type ValidateWebhookResult = shared.AccountCategoriesUpdatedWebhook | shared.ClientRateLimitWebhook | shared.Schema | webhooks.ReportsCreditModelGenerateSuccessfulReportGenerationWebhook | undefined; - const jsonString = await request.text(); +type WebhookMatchSpec = + | "string" + | "number" + | "boolean" + | "any" + | { kind: "nullable"; inner: WebhookMatchSpec } + | { kind: "array"; items: WebhookMatchSpec } + | { kind: "object"; required: string[]; props: Record }; - for (const schema of knownSchemas) { - const ret = schema(jsonString); - if (ret.ok) { - return ret; +function conformsToWebhookSpec(value: unknown, spec: WebhookMatchSpec): boolean { + if (spec === "any") { return true; } + if (spec === "string") { return typeof value === "string"; } + if (spec === "number") { return typeof value === "number"; } + if (spec === "boolean") { return typeof value === "boolean"; } + if (spec.kind === "nullable") { return value === null || conformsToWebhookSpec(value, spec.inner); } + if (spec.kind === "array") { return Array.isArray(value) && value.every((item) => conformsToWebhookSpec(item, spec.items)); } + if (value === null || typeof value !== "object" || Array.isArray(value)) { return false; } + const object = value as Record; + for (const key of spec.required) { + if (object[key] === undefined) { return false; } } - } - - return ERR( - new SDKValidationError( - "No matching schema found for the given webhook payload", - jsonString, - jsonString, - ), - ); + for (const key of Object.keys(spec.props)) { + if (object[key] === undefined) { continue; } + if (!conformsToWebhookSpec(object[key], spec.props[key])) { return false; } + } + return true; } -function normalizeRequest( - request: { - body: BodyInit; - method: string; - url: string; - headers: Record | Headers; - } | Request, +function normalizeWebhookRequest( + request: { body: string; method: string; url: string; headers: Record | Headers } | Request, ): Request { - if (request instanceof Request) { - return request; - } - return new Request(request.url, request); + if (typeof Request !== "undefined" && request instanceof Request) { return request; } + return new Request(request.url, request); +} + +const WEBHOOK_NO_MATCH_MESSAGE = "No matching schema found for the given webhook payload"; + +const WEBHOOK_MATCH_ORDER: { name: string; spec: WebhookMatchSpec }[] = [ + { name: "AccountCategoriesUpdatedWebhook", spec: {"kind": "object", "required": [], "props": {"ClientId": "string", "ClientName": "string", "CompanyId": "string", "DataConnectionId": "string", "RuleId": "string", "RuleType": "string", "AlertId": "string", "Message": "string", "Data": {"kind": "object", "required": [], "props": {"modifiedDate": {"kind": "nullable", "inner": "string"}}}}} }, + { name: "ClientRateLimitWebhook", spec: {"kind": "object", "required": [], "props": {"id": "string", "eventType": "string", "generatedDate": "string", "payload": {"kind": "object", "required": [], "props": {"dailyQuota": "number", "quotaRemaining": "number", "expiryDate": "string"}}}} }, + { name: "Schema", spec: {"kind": "object", "required": [], "props": {"id": "string", "eventType": "string", "generatedDate": "string", "payload": {"kind": "object", "required": [], "props": {"id": "string", "referenceCompany": {"kind": "object", "required": [], "props": {"id": "string", "name": "string", "description": "string", "links": {"kind": "object", "required": [], "props": {"portal": "string"}}, "tags": {"kind": "object", "required": [], "props": {}}}}}}}} }, + { name: "ReportsCreditModelGenerateSuccessfulReportGenerationWebhook", spec: {"kind": "object", "required": [], "props": {"id": "string", "eventType": "string", "generatedDate": "string", "payload": {"kind": "object", "required": [], "props": {"id": "string", "referenceCompany": {"kind": "object", "required": [], "props": {"id": "string", "name": "string", "description": "string", "links": {"kind": "object", "required": [], "props": {"portal": "string"}}, "tags": {"kind": "object", "required": [], "props": {}}}}}}}} } +]; + +export function validateWebhook(_client: CodatLendingCore, { request }: { request: { body: string; method: string; url: string; headers: Record | Headers } | Request }): APIPromise> { + void _client; + return new APIPromise((async (): Promise> => { + const normalized = normalizeWebhookRequest(request); + const jsonString = await normalized.text(); + let parsed: unknown; + try { + parsed = JSON.parse(jsonString); + } catch { + return ERR(new SDKValidationError(WEBHOOK_NO_MATCH_MESSAGE, jsonString, jsonString)); + } + for (const member of WEBHOOK_MATCH_ORDER) { + if (conformsToWebhookSpec(parsed, member.spec)) { + return OK(parsed as ValidateWebhookResult); + } + } + return ERR(new SDKValidationError(WEBHOOK_NO_MATCH_MESSAGE, jsonString, jsonString)); + })()); } diff --git a/lending/src/hooks/hooks.ts b/lending/src/hooks/hooks.ts index d34c88497..b628a2bf8 100644 --- a/lending/src/hooks/hooks.ts +++ b/lending/src/hooks/hooks.ts @@ -1,132 +1,75 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { RequestInput } from "../lib/http.js"; import { - AfterErrorContext, - AfterErrorHook, - AfterSuccessContext, - AfterSuccessHook, - BeforeCreateRequestContext, - BeforeCreateRequestHook, - BeforeRequestContext, - BeforeRequestHook, - Hook, - Hooks, - SDKInitHook, - SDKInitOptions, -} from "./types.js"; - -import { initHooks } from "./registration.js"; + AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook, + BeforeCreateRequestContext, BeforeCreateRequestHook, BeforeRequestContext, BeforeRequestHook, + Hook, Hooks, SDKInitHook, SDKInitOptions, +} from "./types"; +import { RequestInput } from "../lib/sdkconfig"; +import { initHooks } from "./registration"; export class SDKHooks implements Hooks { - sdkInitHooks: SDKInitHook[] = []; - beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; - beforeRequestHooks: BeforeRequestHook[] = []; - afterSuccessHooks: AfterSuccessHook[] = []; - afterErrorHooks: AfterErrorHook[] = []; - - constructor() { - const presetHooks: Array = []; - - for (const hook of presetHooks) { - if ("sdkInit" in hook) { - this.registerSDKInitHook(hook); - } - if ("beforeCreateRequest" in hook) { - this.registerBeforeCreateRequestHook(hook); - } - if ("beforeRequest" in hook) { - this.registerBeforeRequestHook(hook); - } - if ("afterSuccess" in hook) { - this.registerAfterSuccessHook(hook); - } - if ("afterError" in hook) { - this.registerAfterErrorHook(hook); - } + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + const presetHooks: Array = []; + for (const hook of presetHooks) { + if ("sdkInit" in hook) { this.registerSDKInitHook(hook); } + if ("beforeCreateRequest" in hook) { this.registerBeforeCreateRequestHook(hook); } + if ("beforeRequest" in hook) { this.registerBeforeRequestHook(hook); } + if ("afterSuccess" in hook) { this.registerAfterSuccessHook(hook); } + if ("afterError" in hook) { this.registerAfterErrorHook(hook); } + } + initHooks(this); } - initHooks(this); - } - - registerSDKInitHook(hook: SDKInitHook) { - this.sdkInitHooks.push(hook); - } - - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { - this.beforeCreateRequestHooks.push(hook); - } - - registerBeforeRequestHook(hook: BeforeRequestHook) { - this.beforeRequestHooks.push(hook); - } - - registerAfterSuccessHook(hook: AfterSuccessHook) { - this.afterSuccessHooks.push(hook); - } - - registerAfterErrorHook(hook: AfterErrorHook) { - this.afterErrorHooks.push(hook); - } - sdkInit(opts: SDKInitOptions): SDKInitOptions { - return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); - } + registerSDKInitHook(hook: SDKInitHook) { this.sdkInitHooks.push(hook); } + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { this.beforeCreateRequestHooks.push(hook); } + registerBeforeRequestHook(hook: BeforeRequestHook) { this.beforeRequestHooks.push(hook); } + registerAfterSuccessHook(hook: AfterSuccessHook) { this.afterSuccessHooks.push(hook); } + registerAfterErrorHook(hook: AfterErrorHook) { this.afterErrorHooks.push(hook); } - beforeCreateRequest( - hookCtx: BeforeCreateRequestContext, - input: RequestInput, - ): RequestInput { - let inp = input; - - for (const hook of this.beforeCreateRequestHooks) { - inp = hook.beforeCreateRequest(hookCtx, inp); + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((o, hook) => hook.sdkInit(o), opts); } - return inp; - } - - async beforeRequest( - hookCtx: BeforeRequestContext, - request: Request, - ): Promise { - let req = request; - - for (const hook of this.beforeRequestHooks) { - req = await hook.beforeRequest(hookCtx, req); + beforeCreateRequest(hookCtx: BeforeCreateRequestContext, input: RequestInput): RequestInput { + let inp = input; + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); + } + return inp; } - return req; - } - - async afterSuccess( - hookCtx: AfterSuccessContext, - response: Response, - ): Promise { - let res = response; - - for (const hook of this.afterSuccessHooks) { - res = await hook.afterSuccess(hookCtx, res); + async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise { + let req = request; + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); + } + return req; } - return res; - } - - async afterError( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown, - ): Promise<{ response: Response | null; error: unknown }> { - let res = response; - let err = error; - - for (const hook of this.afterErrorHooks) { - const result = await hook.afterError(hookCtx, res, err); - res = result.response; - err = result.error; + async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise { + let res = response; + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); + } + return res; } - return { response: res, error: err }; - } + async afterError(hookCtx: AfterErrorContext, response: Response | null, error: unknown): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; + } + return { response: res, error: err }; + } } diff --git a/lending/src/hooks/index.ts b/lending/src/hooks/index.ts index f60ec7acd..ae868065a 100644 --- a/lending/src/hooks/index.ts +++ b/lending/src/hooks/index.ts @@ -1,6 +1,5 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -export * from "./hooks.js"; -export * from "./types.js"; +export * from "./hooks"; +export * from "./types"; diff --git a/lending/src/hooks/types.ts b/lending/src/hooks/types.ts index 494395f66..3818216a1 100644 --- a/lending/src/hooks/types.ts +++ b/lending/src/hooks/types.ts @@ -1,29 +1,23 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { SDKOptions } from "../lib/config.js"; -import { HTTPClient, RequestInput } from "../lib/http.js"; -import { RetryConfig } from "../lib/retries.js"; -import { SecurityState } from "../lib/security.js"; -import { WebhookRecipient } from "../sdk/types/webhooks.js"; +import { SDKOptions, RetryConfig, HTTPClient, RequestInput, SecurityState } from "../lib/sdkconfig"; + +export type Awaitable = T | Promise; export type HookContext = { - baseURL: string | URL; - operationID: string; - oAuth2Scopes: string[] | null; - webhookRecipient?: WebhookRecipient; - securitySource?: any | (() => Promise); - retryConfig: RetryConfig; - resolvedSecurity: SecurityState | null; - options: SDKOptions; + baseURL: string | URL; + operationID: string; + oAuth2Scopes: string[] | null; + securitySource?: unknown | (() => Promise); + retryConfig: RetryConfig; + resolvedSecurity: SecurityState | null; + options: SDKOptions; }; -export type Awaitable = T | Promise; - export type SDKInitOptions = { - baseURL: URL | null; - client: HTTPClient; + baseURL: URL | null; + client: HTTPClient; }; export type BeforeCreateRequestContext = HookContext & {}; @@ -31,84 +25,37 @@ export type BeforeRequestContext = HookContext & {}; export type AfterSuccessContext = HookContext & {}; export type AfterErrorContext = HookContext & {}; -/** - * SDKInitHook is called when the SDK is initializing. The - * hook can return a new baseURL and HTTP client to be used by the SDK. - */ export interface SDKInitHook { - sdkInit: (opts: SDKInitOptions) => SDKInitOptions; + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; } export interface BeforeCreateRequestHook { - /** - * A hook that is called before the SDK creates a `Request` object. The hook - * can modify how a request is constructed since certain modifications, like - * changing the request URL, cannot be done on a request object directly. - */ - beforeCreateRequest: ( - hookCtx: BeforeCreateRequestContext, - input: RequestInput, - ) => RequestInput; + beforeCreateRequest: (hookCtx: BeforeCreateRequestContext, input: RequestInput) => RequestInput; } export interface BeforeRequestHook { - /** - * A hook that is called before the SDK sends a request. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * replace the request before it is sent or throw an error to stop the - * request from being sent. - */ - beforeRequest: ( - hookCtx: BeforeRequestContext, - request: Request, - ) => Awaitable; + beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable; } export interface AfterSuccessHook { - /** - * A hook that is called after the SDK receives a response. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * modify the response before it is handled or throw an error to stop the - * response from being handled. - */ - afterSuccess: ( - hookCtx: AfterSuccessContext, - response: Response, - ) => Awaitable; + afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable; } export interface AfterErrorHook { - /** - * A hook that is called after the SDK encounters an error, or a - * non-successful response. The hook can introduce instrumentation code such - * as logging, tracing and metrics or modify the response or error values. - */ - afterError: ( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown, - ) => Awaitable<{ - response: Response | null; - error: unknown; - }>; + afterError: (hookCtx: AfterErrorContext, response: Response | null, error: unknown) => Awaitable<{ response: Response | null; error: unknown }>; } export interface Hooks { - /** Registers a hook to be used by the SDK for initialization event. */ - registerSDKInitHook(hook: SDKInitHook): void; - /** Registers a hook to be used by the SDK for to modify `Request` construction. */ - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; - /** Registers a hook to be used by the SDK for the before request event. */ - registerBeforeRequestHook(hook: BeforeRequestHook): void; - /** Registers a hook to be used by the SDK for the after success event. */ - registerAfterSuccessHook(hook: AfterSuccessHook): void; - /** Registers a hook to be used by the SDK for the after error event. */ - registerAfterErrorHook(hook: AfterErrorHook): void; + registerSDKInitHook(hook: SDKInitHook): void; + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + registerBeforeRequestHook(hook: BeforeRequestHook): void; + registerAfterSuccessHook(hook: AfterSuccessHook): void; + registerAfterErrorHook(hook: AfterErrorHook): void; } export type Hook = - | SDKInitHook - | BeforeCreateRequestHook - | BeforeRequestHook - | AfterSuccessHook - | AfterErrorHook; + | SDKInitHook + | BeforeCreateRequestHook + | BeforeRequestHook + | AfterSuccessHook + | AfterErrorHook; diff --git a/lending/src/index.ts b/lending/src/index.ts index dbcba164a..52b74ba06 100644 --- a/lending/src/index.ts +++ b/lending/src/index.ts @@ -1,9 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -export * from "./lib/config.js"; -export * as files from "./lib/files.js"; -export { HTTPClient } from "./lib/http.js"; -export type { Fetcher, HTTPClientOptions } from "./lib/http.js"; -export * from "./sdk/sdk.js"; +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './sdk/models/index'; +export * from './sdk/types/rfcdate'; +export * from './sdk'; +export * from './lib/sdkconfig'; diff --git a/lending/src/lib/base64.ts b/lending/src/lib/base64.ts deleted file mode 100644 index 0aebd8b0a..000000000 --- a/lending/src/lib/base64.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export function bytesToBase64(u8arr: Uint8Array): string { - return btoa(String.fromCodePoint(...u8arr)); -} - -export function bytesFromBase64(encoded: string): Uint8Array { - return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)); -} - -export function stringToBytes(str: string): Uint8Array { - return new TextEncoder().encode(str); -} - -export function stringFromBytes(u8arr: Uint8Array): string { - return new TextDecoder().decode(u8arr); -} - -export function stringToBase64(str: string): string { - return bytesToBase64(stringToBytes(str)); -} - -export function stringFromBase64(b64str: string): string { - return stringFromBytes(bytesFromBase64(b64str)); -} - -export const zodOutbound = z - .instanceof(Uint8Array) - .or(z.string().transform(stringToBytes)); - -export const zodInbound = z - .instanceof(Uint8Array) - .or(z.string().transform(bytesFromBase64)); diff --git a/lending/src/lib/config.ts b/lending/src/lib/config.ts index 9d3fbc4b2..416844419 100644 --- a/lending/src/lib/config.ts +++ b/lending/src/lib/config.ts @@ -1,67 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { HTTPClient } from "./http.js"; -import { Logger } from "./logger.js"; -import { RetryConfig } from "./retries.js"; -import { Params, pathToFunc } from "./url.js"; - -/** - * Contains the list of servers available to the SDK - */ -export const ServerList = [ - /** - * Production - */ - "https://api.codat.io", -] as const; - -export type SDKOptions = { - authHeader?: string | (() => Promise) | undefined; - - httpClient?: HTTPClient; - /** - * Allows overriding the default server used by the SDK - */ - serverIdx?: number | undefined; - /** - * Allows overriding the default server URL used by the SDK - */ - serverURL?: string | undefined; - /** - * Allows overriding the default user agent used by the SDK - */ - userAgent?: string | undefined; - /** - * Allows overriding the default retry config used by the SDK - */ - retryConfig?: RetryConfig; - timeoutMs?: number; - debugLogger?: Logger; -}; - -export function serverURLFromOptions(options: SDKOptions): URL | null { - let serverURL = options.serverURL; - - const params: Params = {}; - - if (!serverURL) { - const serverIdx = options.serverIdx ?? 0; - if (serverIdx < 0 || serverIdx >= ServerList.length) { - throw new Error(`Invalid server index ${serverIdx}`); - } - serverURL = ServerList[serverIdx] || ""; - } - - const u = pathToFunc(serverURL)(params); - return new URL(u); +export function serverURLFromOptions(options: unknown): string { + void options; + return ""; } - -export const SDK_METADATA = { - language: "typescript", - openapiDocVersion: "3.0.0", - sdkVersion: "7.6.0", - genVersion: "2.881.4", - userAgent: "speakeasy-sdk/typescript 7.6.0 2.881.4 3.0.0 @codat/lending", -} as const; diff --git a/lending/src/lib/dlv.ts b/lending/src/lib/dlv.ts deleted file mode 100644 index e81091f5e..000000000 --- a/lending/src/lib/dlv.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -/* -MIT License - -Copyright (c) 2024 Jason Miller (http://jasonformat.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -/** - * @param obj The object to walk - * @param key The key path to walk the object with - * @param def A default value to return if the result is undefined - * - * @example - * dlv(obj, "a.b.c.d") - * @example - * dlv(object, ["a", "b", "c", "d"]) - * @example - * dlv(object, "foo.bar.baz", "Hello, default value!") - */ -export function dlv( - obj: any, - key: string | string[], - def?: T, - p?: number, - undef?: never, -): T | undefined { - key = Array.isArray(key) ? key : key.split("."); - for (p = 0; p < key.length; p++) { - const k = key[p]; - obj = k != null && obj ? obj[k] : undef; - } - return obj === undef ? def : obj; -} diff --git a/lending/src/lib/encodings.ts b/lending/src/lib/encodings.ts deleted file mode 100644 index 2791d25bc..000000000 --- a/lending/src/lib/encodings.ts +++ /dev/null @@ -1,525 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { bytesToBase64 } from "./base64.js"; -import { isPlainObject } from "./is-plain-object.js"; - -export class EncodingError extends Error { - constructor(message: string) { - super(message); - this.name = "EncodingError"; - } -} - -export function encodeMatrix( - key: string, - value: unknown, - options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string | undefined { - let out = ""; - const pairs: [string, unknown][] = options?.explode - ? explode(key, value) - : [[key, value]]; - - if (pairs.every(([_, v]) => v == null)) { - return; - } - - const encodeString = (v: string) => { - return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; - }; - const encodeValue = (v: unknown) => encodeString(serializeValue(v)); - - pairs.forEach(([pk, pv]) => { - let tmp = ""; - let encValue: string | null | undefined = null; - - if (pv == null) { - return; - } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); - } else if (isPlainObject(pv)) { - const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { - return `,${encodeString(k)},${encodeValue(v)}`; - }); - encValue = mapped?.join("").slice(1); - } else { - encValue = `${encodeValue(pv)}`; - } - - if (encValue == null) { - return; - } - - const keyPrefix = encodeString(pk); - tmp = `${keyPrefix}=${encValue}`; - // trim trailing '=' if value was empty - if (tmp === `${keyPrefix}=`) { - tmp = tmp.slice(0, -1); - } - - // If we end up with the nothing then skip forward - if (!tmp) { - return; - } - - out += `;${tmp}`; - }); - - return out; -} - -export function encodeLabel( - key: string, - value: unknown, - options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string | undefined { - let out = ""; - const pairs: [string, unknown][] = options?.explode - ? explode(key, value) - : [[key, value]]; - - if (pairs.every(([_, v]) => v == null)) { - return; - } - - const encodeString = (v: string) => { - return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; - }; - const encodeValue = (v: unknown) => encodeString(serializeValue(v)); - - pairs.forEach(([pk, pv]) => { - let encValue: string | null | undefined = ""; - - if (pv == null) { - return; - } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join("."); - } else if (isPlainObject(pv)) { - const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { - return `.${encodeString(k)}.${encodeValue(v)}`; - }); - encValue = mapped?.join("").slice(1); - } else { - const k = options?.explode && isPlainObject(value) - ? `${encodeString(pk)}=` - : ""; - encValue = `${k}${encodeValue(pv)}`; - } - - out += encValue == null ? "" : `.${encValue}`; - }); - - return out; -} - -type FormEncoder = ( - key: string, - value: unknown, - options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) => string | undefined; - -function formEncoder(sep: string): FormEncoder { - return ( - key: string, - value: unknown, - options?: { explode?: boolean; charEncoding?: "percent" | "none" }, - ) => { - let out = ""; - const pairs: [string, unknown][] = options?.explode - ? explode(key, value) - : [[key, value]]; - - if (pairs.every(([_, v]) => v == null)) { - return; - } - - const encodeString = (v: string) => { - return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; - }; - - const encodeValue = (v: unknown) => encodeString(serializeValue(v)); - - const encodedSep = encodeString(sep); - - pairs.forEach(([pk, pv]) => { - let tmp = ""; - let encValue: string | null | undefined = null; - - if (pv == null) { - return; - } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(encodedSep); - } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { - return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; - })?.join(encodedSep); - } else { - encValue = `${encodeValue(pv)}`; - } - - if (encValue == null) { - return; - } - - tmp = `${encodeString(pk)}=${encValue}`; - - // If we end up with the nothing then skip forward - if (!tmp || tmp === "=") { - return; - } - - out += `&${tmp}`; - }); - - return out.slice(1); - }; -} - -export const encodeForm = formEncoder(","); -export const encodeSpaceDelimited = formEncoder(" "); -export const encodePipeDelimited = formEncoder("|"); - -export function encodeBodyForm( - key: string, - value: unknown, - options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { - let out = ""; - const pairs: [string, unknown][] = options?.explode - ? explode(key, value) - : [[key, value]]; - - const encodeString = (v: string) => { - return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; - }; - - const encodeValue = (v: unknown) => encodeString(serializeValue(v)); - - pairs.forEach(([pk, pv]) => { - let tmp = ""; - let encValue = ""; - - if (pv == null) { - return; - } else if (Array.isArray(pv)) { - encValue = JSON.stringify(pv, jsonReplacer); - } else if (isPlainObject(pv)) { - encValue = JSON.stringify(pv, jsonReplacer); - } else { - encValue = `${encodeValue(pv)}`; - } - - tmp = `${encodeString(pk)}=${encValue}`; - - // If we end up with the nothing then skip forward - if (!tmp || tmp === "=") { - return; - } - - out += `&${tmp}`; - }); - - return out.slice(1); -} - -export function encodeDeepObject( - key: string, - value: unknown, - options?: { charEncoding?: "percent" | "none" }, -): string | undefined { - if (value == null) { - return; - } - - if (!isPlainObject(value)) { - throw new EncodingError( - `Value of parameter '${key}' which uses deepObject encoding must be an object or null`, - ); - } - - return encodeDeepObjectObject(key, value, options); -} - -export function encodeDeepObjectObject( - key: string, - value: unknown, - options?: { charEncoding?: "percent" | "none" }, -): string | undefined { - if (value == null) { - return; - } - - let out = ""; - - const encodeString = (v: string) => { - return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; - }; - - if (!isPlainObject(value)) { - throw new EncodingError(`Expected parameter '${key}' to be an object.`); - } - - Object.entries(value).forEach(([ck, cv]) => { - if (cv == null) { - return; - } - - const pk = `${key}[${ck}]`; - - if (isPlainObject(cv)) { - const objOut = encodeDeepObjectObject(pk, cv, options); - - out += objOut == null ? "" : `&${objOut}`; - - return; - } - - const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; - const encoded = mapDefined(pairs, (v) => { - return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; - })?.join("&"); - - out += encoded == null ? "" : `&${encoded}`; - }); - - return out.slice(1); -} - -export function encodeJSON( - key: string, - value: unknown, - options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string | undefined { - if (typeof value === "undefined") { - return; - } - - const encodeString = (v: string) => { - return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; - }; - - const encVal = encodeString(JSON.stringify(value, jsonReplacer)); - - return options?.explode ? encVal : `${encodeString(key)}=${encVal}`; -} - -export const encodeSimple = ( - key: string, - value: unknown, - options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string | undefined => { - let out = ""; - const pairs: [string, unknown][] = options?.explode - ? explode(key, value) - : [[key, value]]; - - if (pairs.every(([_, v]) => v == null)) { - return; - } - - const encodeString = (v: string) => { - return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; - }; - const encodeValue = (v: unknown) => encodeString(serializeValue(v)); - - pairs.forEach(([pk, pv]) => { - let tmp: string | null | undefined = ""; - - if (pv == null) { - return; - } else if (Array.isArray(pv)) { - tmp = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); - } else if (isPlainObject(pv)) { - const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { - return `,${encodeString(k)},${encodeValue(v)}`; - }); - tmp = mapped?.join("").slice(1); - } else { - const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; - tmp = `${k}${encodeValue(pv)}`; - } - - out += tmp ? `,${tmp}` : ""; - }); - - return out.slice(1); -}; - -function explode(key: string, value: unknown): [string, unknown][] { - if (Array.isArray(value)) { - return value.map((v) => [key, v]); - } else if (isPlainObject(value)) { - const o = value ?? {}; - return Object.entries(o).map(([k, v]) => [k, v]); - } else { - return [[key, value]]; - } -} - -function serializeValue(value: unknown): string { - if (value == null) { - return ""; - } else if (value instanceof Date) { - return value.toISOString(); - } else if (value instanceof Uint8Array) { - return bytesToBase64(value); - } else if (typeof value === "object") { - return JSON.stringify(value, jsonReplacer); - } - - return `${value}`; -} - -function jsonReplacer(_: string, value: unknown): unknown { - if (value instanceof Uint8Array) { - return bytesToBase64(value); - } else { - return value; - } -} - -function mapDefined(inp: T[], mapper: (v: T) => R): R[] | null { - const res = inp.reduce((acc, v) => { - if (v == null) { - return acc; - } - - const m = mapper(v); - if (m == null) { - return acc; - } - - acc.push(m); - - return acc; - }, []); - - return res.length ? res : null; -} - -function mapDefinedEntries( - inp: Iterable<[K, V]>, - mapper: (v: [K, V]) => R, -): R[] | null { - const acc: R[] = []; - for (const [k, v] of inp) { - if (v == null) { - continue; - } - - const m = mapper([k, v]); - if (m == null) { - continue; - } - - acc.push(m); - } - - return acc.length ? acc : null; -} - -export function queryJoin(...args: (string | undefined)[]): string { - return args.filter(Boolean).join("&"); -} - -type QueryEncoderOptions = { - explode?: boolean; - charEncoding?: "percent" | "none"; - allowEmptyValue?: string[]; -}; - -type QueryEncoder = ( - key: string, - value: unknown, - options?: QueryEncoderOptions, -) => string | undefined; - -type BulkQueryEncoder = ( - values: Record, - options?: QueryEncoderOptions, -) => string; - -export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { - const bulkEncode = function( - values: Record, - options?: QueryEncoderOptions, - ): string { - const opts: QueryEncoderOptions = { - ...options, - explode: options?.explode ?? true, - charEncoding: options?.charEncoding ?? "percent", - }; - - const allowEmptySet = new Set(options?.allowEmptyValue ?? []); - - const encoded = Object.entries(values).map(([key, value]) => { - if (allowEmptySet.has(key)) { - if ( - value === undefined - || value === null - || value === "" - || (Array.isArray(value) && value.length === 0) - ) { - return `${encodeURIComponent(key)}=`; - } - } - return f(key, value, opts); - }); - return queryJoin(...encoded); - }; - - return bulkEncode; -} - -export const encodeJSONQuery = queryEncoder(encodeJSON); -export const encodeFormQuery = queryEncoder(encodeForm); -export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); -export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); -export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); - -function isBlobLike(val: unknown): val is Blob { - if (val instanceof Blob) { - return true; - } - - if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { - return false; - } - - const tag = val[Symbol.toStringTag]; - if (tag !== "Blob" && tag !== "File") { - return false; - } - - return "stream" in val && typeof val.stream === "function"; -} - -export function appendForm( - fd: FormData, - key: string, - value: unknown, - fileName?: string, -): void { - if (value == null) { - return; - } else if (isBlobLike(value)) { - if (fileName) { - fd.append(key, value as Blob, fileName); - } else { - fd.append(key, value as Blob); - } - } else { - fd.append(key, String(value)); - } -} - -export async function normalizeBlob( - value: Pick, -): Promise { - if (value instanceof Blob) { - return value; - } - return new Blob([await value.arrayBuffer()], { type: value.type }); -} diff --git a/lending/src/lib/files.ts b/lending/src/lib/files.ts index 6ca6b37d3..1427b8cf6 100644 --- a/lending/src/lib/files.ts +++ b/lending/src/lib/files.ts @@ -1,104 +1,17 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -/** - * Consumes a stream and returns a concatenated array buffer. Useful in - * situations where we need to read the whole file because it forms part of a - * larger payload containing other fields, and we can't modify the underlying - * request structure. - */ -export async function readableStreamToArrayBuffer( - readable: ReadableStream, -): Promise { - const reader = readable.getReader(); - const chunks: Uint8Array[] = []; - - let totalLength = 0; - let done = false; - - while (!done) { - const { value, done: doneReading } = await reader.read(); - - if (doneReading) { - done = true; - } else { - chunks.push(value); - totalLength += value.length; - } - } - - const concatenatedChunks = new Uint8Array(totalLength); - let offset = 0; - - for (const chunk of chunks) { - concatenatedChunks.set(chunk, offset); - offset += chunk.length; - } - - return concatenatedChunks.buffer as ArrayBuffer; +export function bytesToBlob(content: unknown, contentType: string): Blob { + void content; + return new Blob([], { type: contentType }); } -/** - * Determines the MIME content type based on a file's extension. - * Returns null if the extension is not recognized. - */ -export function getContentTypeFromFileName(fileName: string): string | null { - if (!fileName) return null; - - const ext = fileName.toLowerCase().split(".").pop(); - if (!ext) return null; - - const mimeTypes: Record = { - json: "application/json", - xml: "application/xml", - html: "text/html", - htm: "text/html", - txt: "text/plain", - csv: "text/csv", - pdf: "application/pdf", - png: "image/png", - jpg: "image/jpeg", - jpeg: "image/jpeg", - gif: "image/gif", - svg: "image/svg+xml", - js: "application/javascript", - css: "text/css", - zip: "application/zip", - tar: "application/x-tar", - gz: "application/gzip", - mp4: "video/mp4", - mp3: "audio/mpeg", - wav: "audio/wav", - webp: "image/webp", - ico: "image/x-icon", - woff: "font/woff", - woff2: "font/woff2", - ttf: "font/ttf", - otf: "font/otf", - }; - - return mimeTypes[ext] || null; +export function getContentTypeFromFileName(fileName: string): string { + void fileName; + return "application/octet-stream"; } -/** - * Creates a Blob from file content with the given MIME type. - * - * Node.js Buffers are Uint8Array subclasses that may share a pooled - * ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing - * such a Buffer directly to `new Blob([buf])` can include the entire - * underlying pool on some runtimes, producing a Blob with extra bytes - * that corrupts multipart uploads. - * - * Copying into a standalone Uint8Array ensures the Blob receives only the - * intended bytes regardless of runtime behaviour. - */ -export function bytesToBlob( - content: Uint8Array | ArrayBuffer | Blob | string, - contentType: string, -): Blob { - if (content instanceof Uint8Array) { - return new Blob([new Uint8Array(content)], { type: contentType }); - } - return new Blob([content as BlobPart], { type: contentType }); +export async function readableStreamToArrayBuffer(readable: unknown): Promise { + void readable; + return new ArrayBuffer(0); } diff --git a/lending/src/lib/http.ts b/lending/src/lib/http.ts deleted file mode 100644 index 13cf1fd78..000000000 --- a/lending/src/lib/http.ts +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -export type Fetcher = ( - input: RequestInfo | URL, - init?: RequestInit, -) => Promise; - -export type Awaitable = T | Promise; - -const DEFAULT_FETCHER: Fetcher = (input, init) => { - // If input is a Request and init is undefined, Bun will discard the method, - // headers, body and other options that were set on the request object. - // Node.js and browers would ignore an undefined init value. This check is - // therefore needed for interop with Bun. - if (init == null) { - return fetch(input); - } else { - return fetch(input, init); - } -}; - -export type RequestInput = { - /** - * The URL the request will use. - */ - url: URL; - /** - * Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). - */ - options?: RequestInit | undefined; -}; - -export interface HTTPClientOptions { - fetcher?: Fetcher; -} - -export type BeforeRequestHook = (req: Request) => Awaitable; -export type RequestErrorHook = (err: unknown, req: Request) => Awaitable; -export type ResponseHook = (res: Response, req: Request) => Awaitable; - -export class HTTPClient { - private fetcher: Fetcher; - private requestHooks: BeforeRequestHook[] = []; - private requestErrorHooks: RequestErrorHook[] = []; - private responseHooks: ResponseHook[] = []; - - constructor(private options: HTTPClientOptions = {}) { - this.fetcher = options.fetcher || DEFAULT_FETCHER; - } - - async request(request: Request): Promise { - let req = request; - for (const hook of this.requestHooks) { - const nextRequest = await hook(req); - if (nextRequest) { - req = nextRequest; - } - } - - try { - const res = await this.fetcher(req); - - for (const hook of this.responseHooks) { - await hook(res, req); - } - - return res; - } catch (err) { - for (const hook of this.requestErrorHooks) { - await hook(err, req); - } - - throw err; - } - } - - /** - * Registers a hook that is called before a request is made. The hook function - * can mutate the request or return a new request. This may be useful to add - * additional information to request such as request IDs and tracing headers. - */ - addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; - /** - * Registers a hook that is called when a request cannot be made due to a - * network error. - */ - addHook(hook: "requestError", fn: RequestErrorHook): this; - /** - * Registers a hook that is called when a response has been received from the - * server. - */ - addHook(hook: "response", fn: ResponseHook): this; - addHook( - ...args: - | [hook: "beforeRequest", fn: BeforeRequestHook] - | [hook: "requestError", fn: RequestErrorHook] - | [hook: "response", fn: ResponseHook] - ) { - if (args[0] === "beforeRequest") { - this.requestHooks.push(args[1]); - } else if (args[0] === "requestError") { - this.requestErrorHooks.push(args[1]); - } else if (args[0] === "response") { - this.responseHooks.push(args[1]); - } else { - throw new Error(`Invalid hook type: ${args[0]}`); - } - return this; - } - - /** Removes a hook that was previously registered with `addHook`. */ - removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; - /** Removes a hook that was previously registered with `addHook`. */ - removeHook(hook: "requestError", fn: RequestErrorHook): this; - /** Removes a hook that was previously registered with `addHook`. */ - removeHook(hook: "response", fn: ResponseHook): this; - removeHook( - ...args: - | [hook: "beforeRequest", fn: BeforeRequestHook] - | [hook: "requestError", fn: RequestErrorHook] - | [hook: "response", fn: ResponseHook] - ): this { - let target: unknown[]; - if (args[0] === "beforeRequest") { - target = this.requestHooks; - } else if (args[0] === "requestError") { - target = this.requestErrorHooks; - } else if (args[0] === "response") { - target = this.responseHooks; - } else { - throw new Error(`Invalid hook type: ${args[0]}`); - } - - const index = target.findIndex((v) => v === args[1]); - if (index >= 0) { - target.splice(index, 1); - } - - return this; - } - - clone(): HTTPClient { - const child = new HTTPClient(this.options); - child.requestHooks = this.requestHooks.slice(); - child.requestErrorHooks = this.requestErrorHooks.slice(); - child.responseHooks = this.responseHooks.slice(); - - return child; - } -} - -export type StatusCodePredicate = number | string | (number | string)[]; - -// A semicolon surrounded by optional whitespace characters is used to separate -// segments in a media type string. -const mediaParamSeparator = /\s*;\s*/g; - -export function matchContentType(response: Response, pattern: string): boolean { - // `*` is a special case which means anything is acceptable. - if (pattern === "*") { - return true; - } - - let contentType = - response.headers.get("content-type")?.trim() || "application/octet-stream"; - contentType = contentType.toLowerCase(); - - const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); - const [wantType = "", ...wantParams] = wantParts; - - if (wantType.split("/").length !== 2) { - return false; - } - - const gotParts = contentType.split(mediaParamSeparator); - const [gotType = "", ...gotParams] = gotParts; - - const [type = "", subtype = ""] = gotType.split("/"); - if (!type || !subtype) { - return false; - } - - if ( - wantType !== "*/*" && - gotType !== wantType && - `${type}/*` !== wantType && - `*/${subtype}` !== wantType - ) { - return false; - } - - if (gotParams.length < wantParams.length) { - return false; - } - - const params = new Set(gotParams); - for (const wantParam of wantParams) { - if (!params.has(wantParam)) { - return false; - } - } - - return true; -} - -const codeRangeRE = new RegExp("^[0-9]xx$", "i"); - -export function matchStatusCode( - response: Response, - codes: StatusCodePredicate, -): boolean { - const actual = `${response.status}`; - const expectedCodes = Array.isArray(codes) ? codes : [codes]; - if (!expectedCodes.length) { - return false; - } - - return expectedCodes.some((ec) => { - const code = `${ec}`; - - if (code === "default") { - return true; - } - - if (!codeRangeRE.test(`${code}`)) { - return code === actual; - } - - const expectFamily = code.charAt(0); - if (!expectFamily) { - throw new Error("Invalid status code range"); - } - - const actualFamily = actual.charAt(0); - if (!actualFamily) { - throw new Error(`Invalid response status code: ${actual}`); - } - - return actualFamily === expectFamily; - }); -} - -export function matchResponse( - response: Response, - code: StatusCodePredicate, - contentTypePattern: string, -): boolean { - return ( - matchStatusCode(response, code) && - matchContentType(response, contentTypePattern) - ); -} - -/** - * Uses various heurisitics to determine if an error is a connection error. - */ -export function isConnectionError(err: unknown): boolean { - if (typeof err !== "object" || err == null) { - return false; - } - - // Covers fetch in Deno as well - const isBrowserErr = - err instanceof TypeError && - err.message.toLowerCase().startsWith("failed to fetch"); - - const isNodeErr = - err instanceof TypeError && - err.message.toLowerCase().startsWith("fetch failed"); - - const isBunErr = "name" in err && err.name === "ConnectionError"; - - const isGenericErr = - "code" in err && - typeof err.code === "string" && - err.code.toLowerCase() === "econnreset"; - - return isBrowserErr || isNodeErr || isGenericErr || isBunErr; -} - -/** - * Uses various heurisitics to determine if an error is a timeout error. - */ -export function isTimeoutError(err: unknown): boolean { - if (typeof err !== "object" || err == null) { - return false; - } - - // Fetch in browser, Node.js, Bun, Deno - const isNative = "name" in err && err.name === "TimeoutError"; - const isLegacyNative = "code" in err && err.code === 23; - - // Node.js HTTP client and Axios - const isGenericErr = - "code" in err && - typeof err.code === "string" && - err.code.toLowerCase() === "econnaborted"; - - return isNative || isLegacyNative || isGenericErr; -} - -/** - * Uses various heurisitics to determine if an error is a abort error. - */ -export function isAbortError(err: unknown): boolean { - if (typeof err !== "object" || err == null) { - return false; - } - - // Fetch in browser, Node.js, Bun, Deno - const isNative = "name" in err && err.name === "AbortError"; - const isLegacyNative = "code" in err && err.code === 20; - - // Node.js HTTP client and Axios - const isGenericErr = - "code" in err && - typeof err.code === "string" && - err.code.toLowerCase() === "econnaborted"; - - return isNative || isLegacyNative || isGenericErr; -} diff --git a/lending/src/lib/is-plain-object.ts b/lending/src/lib/is-plain-object.ts deleted file mode 100644 index 61070d3d7..000000000 --- a/lending/src/lib/is-plain-object.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -/* -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js - -export function isPlainObject(value: unknown): value is object { - if (typeof value !== "object" || value === null) { - return false; - } - - const prototype = Object.getPrototypeOf(value); - return ( - (prototype === null || - prototype === Object.prototype || - Object.getPrototypeOf(prototype) === null) && - !(Symbol.toStringTag in value) && - !(Symbol.iterator in value) - ); -} diff --git a/lending/src/lib/logger.ts b/lending/src/lib/logger.ts deleted file mode 100644 index d181f2937..000000000 --- a/lending/src/lib/logger.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -export interface Logger { - group(label?: string): void; - groupEnd(): void; - log(message: any, ...args: any[]): void; -} diff --git a/lending/src/lib/matchers.ts b/lending/src/lib/matchers.ts deleted file mode 100644 index b096d6f20..000000000 --- a/lending/src/lib/matchers.ts +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; -import { ERR, OK, Result } from "../sdk/types/fp.js"; -import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; -import { isPlainObject } from "./is-plain-object.js"; - -export type Encoding = - | "jsonl" - | "json" - | "text" - | "bytes" - | "stream" - | "sse" - | "nil" - | "fail"; - -const DEFAULT_CONTENT_TYPES: Record = { - jsonl: "application/jsonl", - json: "application/json", - text: "text/plain", - bytes: "application/octet-stream", - stream: "application/octet-stream", - sse: "text/event-stream", - nil: "*", - fail: "*", -}; - -type Schema = { parse(raw: unknown): T }; - -type MatchOptions = { - ctype?: string; - hdrs?: boolean; - key?: string; - sseSentinel?: string; -}; - -export type ValueMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; -}; - -export type ErrorMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; - err: true; -}; - -export type FailMatcher = { - enc: "fail"; - codes: StatusCodePredicate; -}; - -export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; - -export function jsonErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ErrorMatcher { - return { ...options, err: true, enc: "json", codes, schema }; -} -export function json( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ValueMatcher { - return { ...options, enc: "json", codes, schema }; -} - -export function jsonl( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ValueMatcher { - return { ...options, enc: "jsonl", codes, schema }; -} - -export function jsonlErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ErrorMatcher { - return { ...options, err: true, enc: "jsonl", codes, schema }; -} -export function textErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ErrorMatcher { - return { ...options, err: true, enc: "text", codes, schema }; -} -export function text( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ValueMatcher { - return { ...options, enc: "text", codes, schema }; -} - -export function bytesErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ErrorMatcher { - return { ...options, err: true, enc: "bytes", codes, schema }; -} -export function bytes( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ValueMatcher { - return { ...options, enc: "bytes", codes, schema }; -} - -export function streamErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ErrorMatcher { - return { ...options, err: true, enc: "stream", codes, schema }; -} -export function stream( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ValueMatcher { - return { ...options, enc: "stream", codes, schema }; -} - -export function sseErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ErrorMatcher { - return { ...options, err: true, enc: "sse", codes, schema }; -} -export function sse( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ValueMatcher { - return { ...options, enc: "sse", codes, schema }; -} - -export function nilErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ErrorMatcher { - return { ...options, err: true, enc: "nil", codes, schema }; -} -export function nil( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions, -): ValueMatcher { - return { ...options, enc: "nil", codes, schema }; -} - -export function fail(codes: StatusCodePredicate): FailMatcher { - return { enc: "fail", codes }; -} - -export type MatchedValue = Matchers extends Matcher[] - ? T - : never; -export type MatchedError = Matchers extends Matcher[] - ? E - : never; -export type MatchFunc = ( - response: Response, - request: Request, - options?: { resultKey?: string; extraFields?: Record }, -) => Promise<[result: Result, raw: unknown]>; - -export function match( - ...matchers: Array> -): MatchFunc { - return async function matchFunc( - response: Response, - request: Request, - options?: { resultKey?: string; extraFields?: Record }, - ): Promise< - [result: Result, raw: unknown] - > { - let raw: unknown; - let matcher: Matcher | undefined; - for (const match of matchers) { - const { codes } = match; - const ctpattern = "ctype" in match - ? match.ctype - : DEFAULT_CONTENT_TYPES[match.enc]; - if (ctpattern && matchResponse(response, codes, ctpattern)) { - matcher = match; - break; - } else if (!ctpattern && matchStatusCode(response, codes)) { - matcher = match; - break; - } - } - - if (!matcher) { - return [{ - ok: false, - error: new SDKError("Unexpected Status or Content-Type", { - response, - request, - body: await response.text().catch(() => ""), - }), - }, raw]; - } - - const encoding = matcher.enc; - let body = ""; - switch (encoding) { - case "json": - body = await response.text(); - raw = JSON.parse(body); - break; - case "jsonl": - raw = response.body; - break; - case "bytes": - raw = new Uint8Array(await response.arrayBuffer()); - break; - case "stream": - raw = response.body; - break; - case "text": - body = await response.text(); - raw = body; - break; - case "sse": - raw = response.body; - break; - case "nil": - body = await response.text(); - raw = undefined; - break; - case "fail": - body = await response.text(); - raw = body; - break; - default: - throw new Error( - `Unsupported response type: ${encoding satisfies never}`, - ); - } - - if (matcher.enc === "fail") { - return [{ - ok: false, - error: new SDKError("API error occurred", { request, response, body }), - }, raw]; - } - - const resultKey = matcher.key || options?.resultKey; - let data: unknown; - - if ("err" in matcher) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - request$: request, - response$: response, - body$: body, - }; - } else if (resultKey) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - [resultKey]: raw, - }; - } else if (matcher.hdrs) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else { - data = raw; - } - - if ("err" in matcher) { - const result = safeParseResponse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed", - { request, response, body }, - ); - return [result.ok ? { ok: false, error: result.value } : result, raw]; - } else { - return [ - safeParseResponse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed", - { request, response, body }, - ), - raw, - ]; - } - }; -} - -const headerValRE = /, */; -/** - * Iterates over a Headers object and returns an object with all the header - * entries. Values are represented as an array to account for repeated headers. - */ -export function unpackHeaders(headers: Headers): Record { - const out: Record = {}; - - for (const [k, v] of headers.entries()) { - out[k] = v.split(headerValRE); - } - - return out; -} - -function safeParseResponse( - rawValue: Inp, - fn: (value: Inp) => Out, - errorMessage: string, - httpMeta: { response: Response; request: Request; body: string }, -): Result { - try { - return OK(fn(rawValue)); - } catch (err) { - return ERR( - new ResponseValidationError(errorMessage, { - cause: err, - rawValue, - rawMessage: errorMessage, - ...httpMeta, - }), - ); - } -} diff --git a/lending/src/lib/primitives.ts b/lending/src/lib/primitives.ts deleted file mode 100644 index d21f1dc49..000000000 --- a/lending/src/lib/primitives.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -class InvariantError extends Error { - constructor(message: string) { - super(message); - this.name = "InvariantError"; - } -} - -export function invariant( - condition: unknown, - message: string, -): asserts condition { - if (!condition) { - throw new InvariantError(message); - } -} - -export type ExactPartial = { - [P in keyof T]?: T[P] | undefined; -}; - -export type Remap = { - [k in keyof Inp as Mapping[k] extends string /* if we have a string mapping for this key then use it */ - ? Mapping[k] - : Mapping[k] extends null /* if the mapping is to `null` then drop the key */ - ? never - : k /* otherwise keep the key as-is */]: Inp[k]; -}; - -/** - * Converts or omits an object's keys according to a mapping. - * - * @param inp An object whose keys will be remapped - * @param mappings A mapping of original keys to new keys. If a key is not present in the mapping, it will be left as is. If a key is mapped to `null`, it will be removed in the resulting object. - * @returns A new object with keys remapped or omitted according to the mappings - */ -export function remap< - Inp extends Record, - const Mapping extends { [k in keyof Inp]?: string | null }, ->(inp: Inp, mappings: Mapping): Remap { - let out: any = {}; - - if (!Object.keys(mappings).length) { - out = inp; - return out; - } - - for (const [k, v] of Object.entries(inp)) { - const j = mappings[k]; - if (j === null) { - continue; - } - out[j ?? k] = v; - } - - return out; -} - -export function combineSignals( - ...signals: Array -): AbortSignal | null { - const filtered: AbortSignal[] = []; - for (const signal of signals) { - if (signal) { - filtered.push(signal); - } - } - - switch (filtered.length) { - case 0: - case 1: - return filtered[0] || null; - default: - if ("any" in AbortSignal && typeof AbortSignal.any === "function") { - return AbortSignal.any(filtered); - } - return abortSignalAny(filtered); - } -} - -export function abortSignalAny(signals: AbortSignal[]): AbortSignal { - const controller = new AbortController(); - const result = controller.signal; - if (!signals.length) { - return controller.signal; - } - - if (signals.length === 1) { - return signals[0] || controller.signal; - } - - for (const signal of signals) { - if (signal.aborted) { - return signal; - } - } - - function abort(this: AbortSignal) { - controller.abort(this.reason); - clean(); - } - - const signalRefs: WeakRef[] = []; - function clean() { - for (const signalRef of signalRefs) { - const signal = signalRef.deref(); - if (signal) { - signal.removeEventListener("abort", abort); - } - } - } - - for (const signal of signals) { - signalRefs.push(new WeakRef(signal)); - signal.addEventListener("abort", abort); - } - - return result; -} - -export function compactMap( - values: Record, -): Record { - const out: Record = {}; - - for (const [k, v] of Object.entries(values)) { - if (typeof v !== "undefined") { - out[k] = v; - } - } - - return out; -} - -export function allRequired>( - v: V, -): - | { - [K in keyof V]: NonNullable; - } - | undefined { - if (Object.values(v).every((x) => x == null)) { - return void 0; - } - - return v as ReturnType>; -} diff --git a/lending/src/lib/retries.ts b/lending/src/lib/retries.ts deleted file mode 100644 index e3ce9aba7..000000000 --- a/lending/src/lib/retries.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { isConnectionError, isTimeoutError } from "./http.js"; - -export type BackoffStrategy = { - initialInterval: number; - maxInterval: number; - exponent: number; - maxElapsedTime: number; -}; - -const defaultBackoff: BackoffStrategy = { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 3600000, -}; - -export type RetryConfig = - | { strategy: "none" } - | { - strategy: "backoff"; - backoff?: BackoffStrategy; - retryConnectionErrors?: boolean; - }; - -/** - * PermanentError is an error that is not recoverable. Throwing this error will - * cause a retry loop to terminate. - */ -export class PermanentError extends Error { - /** The underlying cause of the error. */ - override readonly cause: unknown; - - constructor(message: string, options?: { cause?: unknown }) { - let msg = message; - if (options?.cause) { - msg += `: ${options.cause}`; - } - - super(msg, options); - this.name = "PermanentError"; - // In older runtimes, the cause field would not have been assigned through - // the super() call. - if (typeof this.cause === "undefined") { - this.cause = options?.cause; - } - - Object.setPrototypeOf(this, PermanentError.prototype); - } -} - -/** - * TemporaryError is an error is used to signal that an HTTP request can be - * retried as part of a retry loop. If retry attempts are exhausted and this - * error is thrown, the response will be returned to the caller. - */ -export class TemporaryError extends Error { - response: Response; - - constructor(message: string, response: Response) { - super(message); - this.response = response; - this.name = "TemporaryError"; - - Object.setPrototypeOf(this, TemporaryError.prototype); - } -} - -export async function retry( - fetchFn: () => Promise, - options: { - config: RetryConfig; - statusCodes: string[]; - }, -): Promise { - switch (options.config.strategy) { - case "backoff": - return retryBackoff( - wrapFetcher(fetchFn, { - statusCodes: options.statusCodes, - retryConnectionErrors: !!options.config.retryConnectionErrors, - }), - options.config.backoff ?? defaultBackoff, - ); - default: - return await fetchFn(); - } -} - -function wrapFetcher( - fn: () => Promise, - options: { - statusCodes: string[]; - retryConnectionErrors: boolean; - }, -): () => Promise { - return async () => { - try { - const res = await fn(); - if (isRetryableResponse(res, options.statusCodes)) { - throw new TemporaryError( - "Response failed with retryable status code", - res, - ); - } - - return res; - } catch (err: unknown) { - if (err instanceof TemporaryError) { - throw err; - } - - if ( - options.retryConnectionErrors && - (isTimeoutError(err) || isConnectionError(err)) - ) { - throw err; - } - - throw new PermanentError("Permanent error", { cause: err }); - } - }; -} - -const codeRangeRE = new RegExp("^[0-9]xx$", "i"); - -function isRetryableResponse(res: Response, statusCodes: string[]): boolean { - const actual = `${res.status}`; - - return statusCodes.some((code) => { - if (!codeRangeRE.test(code)) { - return code === actual; - } - - const expectFamily = code.charAt(0); - if (!expectFamily) { - throw new Error("Invalid status code range"); - } - - const actualFamily = actual.charAt(0); - if (!actualFamily) { - throw new Error(`Invalid response status code: ${actual}`); - } - - return actualFamily === expectFamily; - }); -} - -async function retryBackoff( - fn: () => Promise, - strategy: BackoffStrategy, -): Promise { - const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; - - const start = Date.now(); - let x = 0; - - while (true) { - try { - const res = await fn(); - return res; - } catch (err: unknown) { - if (err instanceof PermanentError) { - throw err.cause; - } - const elapsed = Date.now() - start; - if (elapsed > maxElapsedTime) { - if (err instanceof TemporaryError) { - return err.response; - } - - throw err; - } - - let retryInterval = 0; - if (err instanceof TemporaryError) { - retryInterval = retryIntervalFromResponse(err.response); - } - - if (retryInterval <= 0) { - retryInterval = - initialInterval * Math.pow(x, exponent) + Math.random() * 1000; - } - - const d = Math.min(retryInterval, maxInterval); - - await delay(d); - x++; - } - } -} - -function retryIntervalFromResponse(res: Response): number { - const retryVal = res.headers.get("retry-after") || ""; - if (!retryVal) { - return 0; - } - - const parsedNumber = Number(retryVal); - if (Number.isInteger(parsedNumber)) { - return parsedNumber * 1000; - } - - const parsedDate = Date.parse(retryVal); - if (Number.isInteger(parsedDate)) { - const deltaMS = parsedDate - Date.now(); - return deltaMS > 0 ? Math.ceil(deltaMS) : 0; - } - - return 0; -} - -async function delay(delay: number): Promise { - return new Promise((resolve) => setTimeout(resolve, delay)); -} diff --git a/lending/src/lib/schemas.ts b/lending/src/lib/schemas.ts deleted file mode 100644 index dc2510e33..000000000 --- a/lending/src/lib/schemas.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { - output, - ZodEffects, - ZodError, - ZodObject, - ZodRawShape, - ZodTypeAny, -} from "zod/v3"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { ERR, OK, Result } from "../sdk/types/fp.js"; - -/** - * Utility function that executes some code which may throw a ZodError. It - * intercepts this error and converts it to an SDKValidationError so as to not - * leak Zod implementation details to user code. - */ -export function parse( - rawValue: Inp, - fn: (value: Inp) => Out, - errorMessage: string, -): Out { - try { - return fn(rawValue); - } catch (err) { - if (err instanceof ZodError) { - throw new SDKValidationError(errorMessage, err, rawValue); - } - throw err; - } -} - -/** - * Utility function that executes some code which may result in a ZodError. It - * intercepts this error and converts it to an SDKValidationError so as to not - * leak Zod implementation details to user code. - */ -export function safeParse( - rawValue: Inp, - fn: (value: Inp) => Out, - errorMessage: string, -): Result { - try { - return OK(fn(rawValue)); - } catch (err) { - return ERR(new SDKValidationError(errorMessage, err, rawValue)); - } -} - -export function collectExtraKeys< - Shape extends ZodRawShape, - Catchall extends ZodTypeAny, - K extends string, ->( - obj: ZodObject, - extrasKey: K, - optional: boolean, -): ZodEffects< - typeof obj, - & output> - & { - [k in K]: Record>; - } -> { - return obj.transform((val) => { - const extras: Record> = {}; - const { shape } = obj; - for (const [key] of Object.entries(val)) { - if (key in shape) { - continue; - } - - const v = val[key]; - if (typeof v === "undefined") { - continue; - } - - extras[key] = v; - delete val[key]; - } - - if (optional && Object.keys(extras).length === 0) { - return val; - } - - return { ...val, [extrasKey]: extras }; - }); -} diff --git a/lending/src/lib/sdkconfig.ts b/lending/src/lib/sdkconfig.ts new file mode 100644 index 000000000..be33ab52a --- /dev/null +++ b/lending/src/lib/sdkconfig.ts @@ -0,0 +1,473 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type { SDKHooks } from "../hooks/hooks"; +import type { HookContext } from "../hooks/types"; + +export type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise; + +export type RequestInput = { + url: URL; + options?: RequestInit | undefined; +}; + +export type Awaitable = T | Promise; + +export type BeforeRequestHook = (req: Request) => Awaitable; +export type RequestErrorHook = (err: unknown, req: Request) => Awaitable; +export type ResponseHook = (res: Response, req: Request) => Awaitable; + +const DEFAULT_FETCHER: Fetcher = (input, init) => (init == null ? fetch(input) : fetch(input, init)); + +export class HTTPClient { + private fetcher: Fetcher; + private requestHooks: BeforeRequestHook[] = []; + private requestErrorHooks: RequestErrorHook[] = []; + private responseHooks: ResponseHook[] = []; + + constructor(private options: HTTPClientOptions = {}) { + this.fetcher = options.fetcher || DEFAULT_FETCHER; + } + + async request(request: Request): Promise { + let req = request; + for (const hook of this.requestHooks) { + const next = await hook(req); + if (next) { + req = next; + } + } + try { + const res = await this.fetcher(req); + for (const hook of this.responseHooks) { + await hook(res, req); + } + return res; + } catch (err) { + for (const hook of this.requestErrorHooks) { + await hook(err, req); + } + throw err; + } + } + + addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + addHook(hook: "requestError", fn: RequestErrorHook): this; + addHook(hook: "response", fn: ResponseHook): this; + addHook(hook: string, fn: BeforeRequestHook | RequestErrorHook | ResponseHook): this { + if (hook === "beforeRequest") { + this.requestHooks.push(fn as BeforeRequestHook); + } else if (hook === "requestError") { + this.requestErrorHooks.push(fn as RequestErrorHook); + } else if (hook === "response") { + this.responseHooks.push(fn as ResponseHook); + } else { + throw new Error(`Invalid hook type: ${hook}`); + } + return this; + } + + removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + removeHook(hook: "requestError", fn: RequestErrorHook): this; + removeHook(hook: "response", fn: ResponseHook): this; + removeHook(hook: string, fn: BeforeRequestHook | RequestErrorHook | ResponseHook): this { + let target: unknown[]; + if (hook === "beforeRequest") { + target = this.requestHooks; + } else if (hook === "requestError") { + target = this.requestErrorHooks; + } else if (hook === "response") { + target = this.responseHooks; + } else { + throw new Error(`Invalid hook type: ${hook}`); + } + const index = target.findIndex((v) => v === fn); + if (index >= 0) { + target.splice(index, 1); + } + return this; + } + + clone(): HTTPClient { + const child = new HTTPClient(this.options); + child.requestHooks = this.requestHooks.slice(); + child.requestErrorHooks = this.requestErrorHooks.slice(); + child.responseHooks = this.responseHooks.slice(); + return child; + } +} + +export interface HTTPClientOptions { + fetcher?: Fetcher; +} + +export interface Logger { + group(label?: string): void; + groupEnd(): void; + log(...args: unknown[]): void; +} + +export type BackoffStrategy = { + initialInterval: number; + maxInterval: number; + exponent: number; + maxElapsedTime: number; +}; + +export type RetryConfig = + | { strategy: "none" } + | { + strategy: "backoff"; + backoff?: BackoffStrategy; + retryConnectionErrors?: boolean; + }; + +export interface SDKOptions { + authHeader?: string | (() => Promise) | undefined; + debugLogger?: Logger; + httpClient?: HTTPClient; + retryConfig?: RetryConfig; + serverIdx?: number | undefined; + serverURL?: string | undefined; + timeoutMs?: number; + userAgent?: string | undefined; +} + +export type Security = { + authHeader: string; +}; + +export const ServerList = ["https://api.codat.io"] as const; + +export const SDK_METADATA = { + language: "typescript", + genVersion: "codat-sdk-codegen-poc-0.1.0", + sdkVersion: "3.0.0", + openapiDocVersion: "3.0.0", + userAgent: "codat-sdk/typescript 3.0.0 codat-sdk-codegen-poc-0.1.0 3.0.0 @codat/lending", +} as const; + +export function resolveServerURL(options: SDKOptions = {}): string { + const fromList = ServerList[options.serverIdx ?? 0] ?? ServerList[0]; + return (options.serverURL ?? fromList).replace(/\/+$/, ""); +} + +export function resolveAuthHeader( + authHeader: SDKOptions["authHeader"], +): string | ((name: string) => Promise) | undefined { + if (authHeader == null) { + return undefined; + } + if (typeof authHeader === "function") { + return () => authHeader(); + } + return authHeader; +} + +const DEFAULT_RETRY_CODES = ["408", "429", "5XX"]; + +const DEFAULT_RETRY_CONFIG: RetryConfig = { + strategy: "backoff", + backoff: { initialInterval: 500, maxInterval: 60000, exponent: 1.5, maxElapsedTime: 3600000 }, + retryConnectionErrors: true, +}; + +class PermanentError extends Error { + readonly cause: unknown; + constructor(message: string, options?: { cause?: unknown }) { + super(message); + this.name = "PermanentError"; + this.cause = options?.cause; + } +} + +class TemporaryError extends Error { + readonly response: Response; + constructor(message: string, response: Response) { + super(message); + this.name = "TemporaryError"; + this.response = response; + } +} + +function isConnectionError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + const msg = err instanceof TypeError ? err.message.toLowerCase() : ""; + const isFetchErr = msg.startsWith("failed to fetch") || msg.startsWith("fetch failed"); + const code = "code" in err ? String((err as { code?: unknown }).code).toLowerCase() : ""; + return isFetchErr || code === "econnreset"; +} + +function isTimeoutError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + const name = "name" in err ? (err as { name?: unknown }).name : ""; + const code = "code" in err ? String((err as { code?: unknown }).code).toLowerCase() : ""; + return name === "TimeoutError" || code === "econnaborted"; +} + +const codeRangeRE = /^[0-9]xx$/i; + +function isRetryableResponse(res: Response, statusCodes: string[]): boolean { + const actual = `${res.status}`; + return statusCodes.some((code) => { + if (!codeRangeRE.test(code)) { + return code === actual; + } + return actual.charAt(0) === code.charAt(0); + }); +} + +function retryIntervalFromResponse(res: Response): number { + const retryVal = res.headers.get("retry-after") || ""; + if (!retryVal) { + return 0; + } + const asNumber = Number(retryVal); + if (Number.isInteger(asNumber)) { + return asNumber * 1000; + } + const asDate = Date.parse(retryVal); + if (Number.isInteger(asDate)) { + const deltaMs = asDate - Date.now(); + return deltaMs > 0 ? Math.ceil(deltaMs) : 0; + } + return 0; +} + +function delay(ms: number): Promise { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function wrapFetcher( + fn: () => Promise, + statusCodes: string[], + retryConnectionErrors: boolean, +): () => Promise { + return async () => { + try { + const res = await fn(); + if (isRetryableResponse(res, statusCodes)) { + throw new TemporaryError("Response failed with retryable status code", res); + } + return res; + } catch (err: unknown) { + if (err instanceof TemporaryError) { + throw err; + } + if (retryConnectionErrors && (isTimeoutError(err) || isConnectionError(err))) { + throw err; + } + throw new PermanentError("Permanent error", { cause: err }); + } + }; +} + +async function retryBackoff(fn: () => Promise, strategy: BackoffStrategy): Promise { + const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; + const start = Date.now(); + let x = 0; + for (;;) { + try { + return await fn(); + } catch (err: unknown) { + if (err instanceof PermanentError) { + throw err.cause; + } + if (Date.now() - start > maxElapsedTime) { + if (err instanceof TemporaryError) { + return err.response; + } + throw err; + } + let retryInterval = err instanceof TemporaryError ? retryIntervalFromResponse(err.response) : 0; + if (retryInterval <= 0) { + retryInterval = initialInterval * Math.pow(x, exponent) + Math.random() * 1000; + } + await delay(Math.min(retryInterval, maxInterval)); + x++; + } + } +} + +function retryRequest(fn: () => Promise, config: RetryConfig, statusCodes: string[]): Promise { + if (config.strategy === "backoff") { + return retryBackoff( + wrapFetcher(fn, statusCodes, !!config.retryConnectionErrors), + config.backoff ?? { initialInterval: 500, maxInterval: 60000, exponent: 1.5, maxElapsedTime: 3600000 }, + ); + } + return fn(); +} + +export function resolveUserAgent(userAgent: string | undefined): Record { + const agent = userAgent ?? SDK_METADATA.userAgent; + if (!agent) { + return {}; + } + const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + return isBrowser ? {} : { "user-agent": agent }; +} + +function parseURL(input: RequestInfo | URL): URL | null { + try { + return new URL(String(input)); + } catch { + return null; + } +} + +export type SecurityState = { + basic: { username?: string; password?: string }; + headers: Record; + queryParams: Record; + cookies: Record; + oauth2: { type: "none" }; +}; + +function headerValue(headers: HeadersInit | undefined, name: string): string | undefined { + if (!headers) { + return undefined; + } + const lower = name.toLowerCase(); + if (typeof Headers !== "undefined" && headers instanceof Headers) { + return headers.get(name) ?? undefined; + } + if (Array.isArray(headers)) { + const found = headers.find(([k]) => k.toLowerCase() === lower); + return found ? found[1] : undefined; + } + for (const k of Object.keys(headers)) { + if (k.toLowerCase() === lower) { + return (headers as Record)[k]; + } + } + return undefined; +} + +function resolveSecurityState(authValue: string | undefined): SecurityState | null { + if (authValue == null) { + return null; + } + return { + basic: {}, + headers: { Authorization: authValue }, + queryParams: {}, + cookies: {}, + oauth2: { type: "none" }, + }; +} + +export function makeFetch(options: SDKOptions = {}, hooks?: SDKHooks): Fetcher { + const client = options.httpClient; + const logger = options.debugLogger; + return (input, init) => { + const reqInit: RequestInit = init ?? {}; + const stamped = reqInit as RequestInit & { + __codatOperationId?: string; + __codatRetries?: RetryConfig; + __codatRetryCodes?: string[]; + }; + const operationId = stamped.__codatOperationId; + const config = stamped.__codatRetries ?? options.retryConfig ?? DEFAULT_RETRY_CONFIG; + const retryCodes = stamped.__codatRetryCodes ?? DEFAULT_RETRY_CODES; + for (const key of ["__codatOperationId", "__codatRetries", "__codatRetryCodes"] as const) { + if (key in stamped) { + delete stamped[key]; + } + } + const parsed = parseURL(input); + const ctx: HookContext = { + baseURL: resolveServerURL(options), + operationID: operationId ?? `${(reqInit.method ?? "GET").toUpperCase()} ${parsed ? parsed.pathname : String(input)}`, + oAuth2Scopes: null, + securitySource: options.authHeader, + retryConfig: config, + resolvedSecurity: resolveSecurityState(headerValue(reqInit.headers, "Authorization")), + options, + }; + + let url: RequestInfo | URL = input; + let finalInit: RequestInit = reqInit; + if (hooks && parsed) { + const created = hooks.beforeCreateRequest(ctx, { url: parsed, options: reqInit }); + url = created.url; + finalInit = created.options ?? reqInit; + } + if (!finalInit.signal && options.timeoutMs && options.timeoutMs > 0) { + finalInit = { ...finalInit, signal: AbortSignal.timeout(options.timeoutMs) }; + } + + const dispatch = async (): Promise => { + let request = new Request(url, finalInit); + if (hooks) { + request = await hooks.beforeRequest(ctx, request.clone()); + } + if (logger) { + logger.log(`request: ${request.method} ${request.url}`); + } + let res: Response; + try { + res = client ? await client.request(request) : await fetch(request); + } catch (err) { + if (hooks) { + const handled = await hooks.afterError(ctx, null, err); + if (handled.error) { + throw handled.error; + } + if (handled.response) { + return handled.response; + } + } + throw err; + } + if (logger) { + logger.log(`response: ${res.status}`); + } + if (hooks) { + if (res.status >= 400) { + const handled = await hooks.afterError(ctx, res, null); + if (handled.error) { + throw handled.error; + } + res = handled.response ?? res; + } else { + res = await hooks.afterSuccess(ctx, res); + } + } + return res; + }; + return retryRequest(dispatch, config, retryCodes); + }; +} + +export type StatusCodePredicate = number | string | (number | string)[]; + +export function matchStatusCode(response: Response, codes: StatusCodePredicate): boolean { + const actual = `${response.status}`; + const expectedCodes = Array.isArray(codes) ? codes : [codes]; + if (!expectedCodes.length) { + return false; + } + return expectedCodes.some((ec) => { + const code = `${ec}`; + if (code === "default") { + return true; + } + if (!codeRangeRE.test(code)) { + return code === actual; + } + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + return actualFamily === expectFamily; + }); +} diff --git a/lending/src/lib/sdks.ts b/lending/src/lib/sdks.ts deleted file mode 100644 index cef4177db..000000000 --- a/lending/src/lib/sdks.ts +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { SDKHooks } from "../hooks/hooks.js"; -import { HookContext } from "../hooks/types.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import { ERR, OK, Result } from "../sdk/types/fp.js"; -import { stringToBase64 } from "./base64.js"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; -import { encodeForm } from "./encodings.js"; -import { - HTTPClient, - isAbortError, - isConnectionError, - isTimeoutError, - matchContentType, -} from "./http.js"; -import { Logger } from "./logger.js"; -import { retry, RetryConfig } from "./retries.js"; -import { SecurityState } from "./security.js"; - -export type RequestOptions = { - /** - * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If - * `fetchOptions.signal` is set then it will take precedence over this option. - */ - timeoutMs?: number; - /** - * Set or override a retry policy on HTTP calls. - */ - retries?: RetryConfig; - /** - * Specifies the status codes which should be retried using the given retry policy. - */ - retryCodes?: string[]; - /** - * Overrides the base server URL that will be used by an operation. - */ - serverURL?: string | URL; - /** - * @deprecated `fetchOptions` has been flattened into `RequestOptions`. - * - * Sets various request options on the `fetch` call made by an SDK method. - * - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} - */ - fetchOptions?: Omit; -} & Omit; - -type RequestConfig = { - method: string; - path: string; - baseURL?: string | URL | undefined; - query?: string; - body?: RequestInit["body"]; - headers?: HeadersInit; - security?: SecurityState | null; - uaHeader?: string; - userAgent?: string | undefined; - timeoutMs?: number; -}; - -const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; -const webWorkerLike = typeof gt === "object" - && gt != null - && "importScripts" in gt - && typeof gt["importScripts"] === "function"; -const isBrowserLike = webWorkerLike - || (typeof navigator !== "undefined" && "serviceWorker" in navigator) - || (typeof window === "object" && typeof window.document !== "undefined"); - -export class ClientSDK { - readonly #httpClient: HTTPClient; - readonly #hooks: SDKHooks; - readonly #logger?: Logger | undefined; - public readonly _baseURL: URL | null; - public readonly _options: SDKOptions & { hooks?: SDKHooks }; - - constructor(options: SDKOptions = {}) { - const opt = options as unknown; - if ( - typeof opt === "object" - && opt != null - && "hooks" in opt - && opt.hooks instanceof SDKHooks - ) { - this.#hooks = opt.hooks; - } else { - this.#hooks = new SDKHooks(); - } - const url = serverURLFromOptions(options); - if (url) { - url.pathname = url.pathname.replace(/\/+$/, "") + "/"; - } - - const { baseURL, client } = this.#hooks.sdkInit({ - baseURL: url, - client: options.httpClient || new HTTPClient(), - }); - this._baseURL = baseURL; - this.#httpClient = client; - - this._options = { ...options, hooks: this.#hooks }; - - this.#logger = this._options.debugLogger; - } - - public _createRequest( - context: HookContext, - conf: RequestConfig, - options?: RequestOptions, - ): Result { - const { method, path, query, headers: opHeaders, security } = conf; - - const base = conf.baseURL ?? this._baseURL; - if (!base) { - return ERR(new InvalidRequestError("No base URL provided for operation")); - } - const baseURL = new URL(base); - let reqURL: URL; - if (path) { - baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/"; - reqURL = new URL(path, baseURL); - } else { - reqURL = baseURL; - } - reqURL.hash = ""; - - let finalQuery = query || ""; - - const secQuery: string[] = []; - for (const [k, v] of Object.entries(security?.queryParams || {})) { - const q = encodeForm(k, v, { charEncoding: "percent" }); - if (typeof q !== "undefined") { - secQuery.push(q); - } - } - if (secQuery.length) { - finalQuery += `&${secQuery.join("&")}`; - } - - if (finalQuery) { - const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q}`; - } - - const headers = new Headers(opHeaders); - - const username = security?.basic.username; - const password = security?.basic.password; - if (username != null || password != null) { - const encoded = stringToBase64( - [username || "", password || ""].join(":"), - ); - headers.set("Authorization", `Basic ${encoded}`); - } - - const securityHeaders = new Headers(security?.headers || {}); - for (const [k, v] of securityHeaders) { - headers.set(k, v); - } - - let cookie = headers.get("cookie") || ""; - for (const [k, v] of Object.entries(security?.cookies || {})) { - cookie += `; ${k}=${v}`; - } - cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; - headers.set("cookie", cookie); - - const userHeaders = new Headers( - options?.headers ?? options?.fetchOptions?.headers, - ); - for (const [k, v] of userHeaders) { - headers.set(k, v); - } - - // Only set user agent header in non-browser-like environments since CORS - // policy disallows setting it in browsers e.g. Chrome throws an error. - if (!isBrowserLike) { - headers.set( - conf.uaHeader ?? "user-agent", - conf.userAgent ?? SDK_METADATA.userAgent, - ); - } - - const fetchOptions: Omit = { - ...options?.fetchOptions, - ...options, - }; - if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { - const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - fetchOptions.signal = timeoutSignal; - } - - if (conf.body instanceof ReadableStream) { - Object.assign(fetchOptions, { duplex: "half" }); - } - - let input; - try { - input = this.#hooks.beforeCreateRequest(context, { - url: reqURL, - options: { - ...fetchOptions, - body: conf.body ?? null, - headers, - method, - }, - }); - } catch (err: unknown) { - return ERR( - new UnexpectedClientError("Create request hook failed to execute", { - cause: err, - }), - ); - } - - return OK(new Request(input.url, input.options)); - } - - public async _do( - request: Request, - options: { - context: HookContext; - isErrorStatusCode: (statusCode: number) => boolean; - retryConfig: RetryConfig; - retryCodes: string[]; - }, - ): Promise< - Result< - Response, - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - | UnexpectedClientError - > - > { - const { context, isErrorStatusCode } = options; - - return retry( - async () => { - const req = await this.#hooks.beforeRequest(context, request.clone()); - await logRequest(this.#logger, req).catch((e) => - this.#logger?.log("Failed to log request:", e) - ); - - let response = await this.#httpClient.request(req); - - try { - if (isErrorStatusCode(response.status)) { - const result = await this.#hooks.afterError( - context, - response, - null, - ); - if (result.error) { - throw result.error; - } - response = result.response || response; - } else { - response = await this.#hooks.afterSuccess(context, response); - } - } finally { - await logResponse(this.#logger, response, req) - .catch(e => this.#logger?.log("Failed to log response:", e)); - } - - return response; - }, - { config: options.retryConfig, statusCodes: options.retryCodes }, - ).then( - (r) => OK(r), - (err) => { - switch (true) { - case isAbortError(err): - return ERR( - new RequestAbortedError("Request aborted by client", { - cause: err, - }), - ); - case isTimeoutError(err): - return ERR( - new RequestTimeoutError("Request timed out", { cause: err }), - ); - case isConnectionError(err): - return ERR( - new ConnectionError("Unable to make request", { cause: err }), - ); - default: - return ERR( - new UnexpectedClientError("Unexpected HTTP client error", { - cause: err, - }), - ); - } - }, - ); - } -} - -const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/; -const jsonlLikeContentTypeRE = - /^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/; -async function logRequest(logger: Logger | undefined, req: Request) { - if (!logger) { - return; - } - - const contentType = req.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`> Request: ${req.method} ${req.url}`); - - logger.group("Headers:"); - for (const [k, v] of req.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case jsonLikeContentTypeRE.test(ct): - logger.log(await req.clone().json()); - break; - case ct.startsWith("text/"): - logger.log(await req.clone().text()); - break; - case ct === "multipart/form-data": { - const body = await req.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; - } - logger.groupEnd(); - - logger.groupEnd(); -} - -async function logResponse( - logger: Logger | undefined, - res: Response, - req: Request, -) { - if (!logger) { - return; - } - - const contentType = res.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`< Response: ${req.method} ${req.url}`); - logger.log("Status Code:", res.status, res.statusText); - - logger.group("Headers:"); - for (const [k, v] of res.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case matchContentType(res, "application/json") - || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct): - logger.log(await res.clone().json()); - break; - case matchContentType(res, "application/jsonl") - || jsonlLikeContentTypeRE.test(ct): - case matchContentType(res, "text/event-stream"): - logger.log(`<${contentType}>`); - break; - case matchContentType(res, "text/*"): - logger.log(await res.clone().text()); - break; - case matchContentType(res, "multipart/form-data"): { - const body = await res.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; - } - logger.groupEnd(); - - logger.groupEnd(); -} diff --git a/lending/src/lib/security.ts b/lending/src/lib/security.ts deleted file mode 100644 index 3da8e733b..000000000 --- a/lending/src/lib/security.ts +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as shared from "../sdk/models/shared/index.js"; - -type OAuth2PasswordFlow = { - username: string; - password: string; - clientID?: string | undefined; - clientSecret?: string | undefined; - tokenURL: string; -}; - -export enum SecurityErrorCode { - Incomplete = "incomplete", - UnrecognisedSecurityType = "unrecognized_security_type", -} - -export class SecurityError extends Error { - constructor( - public code: SecurityErrorCode, - message: string, - ) { - super(message); - this.name = "SecurityError"; - } - - static incomplete(): SecurityError { - return new SecurityError( - SecurityErrorCode.Incomplete, - "Security requirements not met in order to perform the operation", - ); - } - static unrecognizedType(type: string): SecurityError { - return new SecurityError( - SecurityErrorCode.UnrecognisedSecurityType, - `Unrecognised security type: ${type}`, - ); - } -} - -export type SecurityState = { - basic: { username?: string | undefined; password?: string | undefined }; - headers: Record; - queryParams: Record; - cookies: Record; - oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" }; -}; - -type SecurityInputBasic = { - type: "http:basic"; - value: - | { username?: string | undefined; password?: string | undefined } - | null - | undefined; -}; - -type SecurityInputBearer = { - type: "http:bearer"; - value: string | null | undefined; - fieldName: string; -}; - -type SecurityInputAPIKey = { - type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; - value: string | null | undefined; - fieldName: string; -}; - -type SecurityInputOIDC = { - type: "openIdConnect"; - value: string | null | undefined; - fieldName: string; -}; - -type SecurityInputOAuth2 = { - type: "oauth2"; - value: string | null | undefined; - fieldName: string; -}; - -type SecurityInputOAuth2ClientCredentials = { - type: "oauth2:client_credentials"; - value: - | { - clientID?: string | undefined; - clientSecret?: string | undefined; - } - | null - | string - | undefined; - fieldName?: string; -}; - -type SecurityInputOAuth2PasswordCredentials = { - type: "oauth2:password"; - value: - | string - | null - | undefined; - fieldName?: string; -}; - -type SecurityInputCustom = { - type: "http:custom"; - value: any | null | undefined; - fieldName?: string; -}; - -export type SecurityInput = - | SecurityInputBasic - | SecurityInputBearer - | SecurityInputAPIKey - | SecurityInputOAuth2 - | SecurityInputOAuth2ClientCredentials - | SecurityInputOAuth2PasswordCredentials - | SecurityInputOIDC - | SecurityInputCustom; - -export function resolveSecurity( - ...options: SecurityInput[][] -): SecurityState | null { - const state: SecurityState = { - basic: {}, - headers: {}, - queryParams: {}, - cookies: {}, - oauth2: { type: "none" }, - }; - - const option = options.find((opts) => { - return opts.every((o) => { - if (o.value == null) { - return false; - } else if (o.type === "http:basic") { - return o.value.username != null || o.value.password != null; - } else if (o.type === "http:custom") { - return null; - } else if (o.type === "oauth2:password") { - return ( - typeof o.value === "string" && !!o.value - ); - } else if (o.type === "oauth2:client_credentials") { - if (typeof o.value == "string") { - return !!o.value; - } - return o.value.clientID != null || o.value.clientSecret != null; - } else if (typeof o.value === "string") { - return !!o.value; - } else { - throw new Error( - `Unrecognized security type: ${o.type} (value type: ${typeof o - .value})`, - ); - } - }); - }); - if (option == null) { - return null; - } - - option.forEach((spec) => { - if (spec.value == null) { - return; - } - - const { type } = spec; - - switch (type) { - case "apiKey:header": - state.headers[spec.fieldName] = spec.value; - break; - case "apiKey:query": - state.queryParams[spec.fieldName] = spec.value; - break; - case "apiKey:cookie": - state.cookies[spec.fieldName] = spec.value; - break; - case "http:basic": - applyBasic(state, spec); - break; - case "http:custom": - break; - case "http:bearer": - applyBearer(state, spec); - break; - case "oauth2": - applyBearer(state, spec); - break; - case "oauth2:password": - applyBearer(state, spec); - break; - case "oauth2:client_credentials": - break; - case "openIdConnect": - applyBearer(state, spec); - break; - default: - throw SecurityError.unrecognizedType((spec satisfies never, type)); - } - }); - - return state; -} - -function applyBasic( - state: SecurityState, - spec: SecurityInputBasic, -) { - if (spec.value == null) { - return; - } - - state.basic = spec.value; -} - -function applyBearer( - state: SecurityState, - spec: - | SecurityInputBearer - | SecurityInputOAuth2 - | SecurityInputOIDC - | SecurityInputOAuth2PasswordCredentials, -) { - if (typeof spec.value !== "string" || !spec.value) { - return; - } - - let value = spec.value; - if (value.slice(0, 7).toLowerCase() !== "bearer ") { - value = `Bearer ${value}`; - } - - if (spec.fieldName !== undefined) { - state.headers[spec.fieldName] = value; - } -} - -export function resolveGlobalSecurity( - security: Partial | null | undefined, - allowedFields?: number[], -): SecurityState | null { - let inputs: SecurityInput[][] = [ - [ - { - fieldName: "Authorization", - type: "apiKey:header", - value: security?.authHeader, - }, - ], - ]; - - if (allowedFields) { - inputs = allowedFields.map((i) => { - if (i < 0 || i >= inputs.length) { - throw new RangeError(`invalid allowedFields index ${i}`); - } - return inputs[i]!; - }); - } - - return resolveSecurity(...inputs); -} - -export async function extractSecurity< - T extends string | Record, ->(sec: T | (() => Promise) | undefined): Promise { - if (sec == null) { - return; - } - - return typeof sec === "function" ? sec() : sec; -} diff --git a/lending/src/lib/url.ts b/lending/src/lib/url.ts deleted file mode 100644 index 79e7ce660..000000000 --- a/lending/src/lib/url.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -const hasOwn = Object.prototype.hasOwnProperty; - -export type Params = Partial>; - -export function pathToFunc( - pathPattern: string, - options?: { charEncoding?: "percent" | "none" }, -): (params?: Params) => string { - const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g; - - return function buildURLPath(params: Record = {}): string { - return pathPattern - .replace(paramRE, function (_, placeholder) { - if (!hasOwn.call(params, placeholder)) { - throw new Error(`Parameter '${placeholder}' is required`); - } - - const value = params[placeholder]; - if (typeof value !== "string" && typeof value !== "number") { - throw new Error( - `Parameter '${placeholder}' must be a string or number`, - ); - } - - return options?.charEncoding === "percent" - ? encodeURIComponent(`${value}`) - : `${value}`; - }) - .replace(/^\/+/, ""); - }; -} diff --git a/lending/src/runtime.ts b/lending/src/runtime.ts new file mode 100644 index 000000000..4eb110333 --- /dev/null +++ b/lending/src/runtime.ts @@ -0,0 +1,518 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { SDKError } from './sdk/models/errors/sdkerror'; +import { ErrorMessage } from './sdk/models/errors/errormessage'; +import type { RetryConfig } from './lib/sdkconfig'; + +export const BASE_PATH = "https://api.codat.io".replace(/\/+$/, ""); + +export type RequestOptions = { + timeoutMs?: number; + retries?: RetryConfig; + retryCodes?: string[]; + serverURL?: string | URL; + fetchOptions?: Omit; +} & Omit; + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, options?: RequestOptions): Promise { + const { url, init } = await this.createFetchParams(context, options); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw await buildSpeakeasyError(url, init, response, context.errorStatuses); + } + + private async createFetchParams(context: RequestOpts, options?: RequestOptions) { + const opts: RequestOptions = options ?? {}; + const { + timeoutMs, + retries, + retryCodes, + serverURL, + fetchOptions, + headers: perCallHeaders, + ...restInit + } = opts; + + const base = (typeof serverURL === "string" || serverURL instanceof URL) + ? String(serverURL).replace(/\/+$/, "") + : this.configuration.basePath; + let url = base + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign( + {}, + this.configuration.headers, + context.headers, + toHeaderRecord(fetchOptions?.headers), + toHeaderRecord(perCallHeaders), + ); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + let body: any; + if (isFormData(context.body) + || (context.body instanceof URLSearchParams) + || isBlob(context.body)) { + body = context.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(context.body); + } else { + body = context.body; + } + + const init: RequestInit = { + ...fetchOptions, + ...restInit, + method: context.method, + headers, + body, + }; + if (init.credentials === undefined && this.configuration.credentials !== undefined) { + init.credentials = this.configuration.credentials; + } + if (!init.signal && timeoutMs && timeoutMs > 0) { + init.signal = AbortSignal.timeout(timeoutMs); + } + + const stamped = init as RequestInit & { + __codatOperationId?: string; + __codatRetries?: RetryConfig; + __codatRetryCodes?: string[]; + }; + if (context.operationId !== undefined) { + stamped.__codatOperationId = context.operationId; + } + if (retries !== undefined) { + stamped.__codatRetries = retries; + } + if (retryCodes !== undefined) { + stamped.__codatRetryCodes = retryCodes; + } + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +function toHeaderRecord(headers: HeadersInit | undefined): HTTPHeaders { + if (!headers) { + return {}; + } + if (typeof Headers !== "undefined" && headers instanceof Headers) { + const out: HTTPHeaders = {}; + headers.forEach((value, key) => { out[key] = value; }); + return out; + } + if (Array.isArray(headers)) { + const out: HTTPHeaders = {}; + for (const [key, value] of headers) { + out[key] = value; + } + return out; + } + return { ...(headers as Record) }; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +async function buildSpeakeasyError(url: string, init: RequestInit, response: Response, errorStatuses?: number[]): Promise { + const httpResponse = response ?? new Response(null, { status: 500 }); + const body = response ? await response.clone().text() : ""; + const httpMeta = { response: httpResponse, request: new Request(url, { method: init.method }), body }; + let data: any; + try { + data = body ? JSON.parse(body) : undefined; + } catch { + data = undefined; + } + const documentsThisStatus = Array.isArray(errorStatuses) && errorStatuses.indexOf(httpResponse.status) !== -1; + if (documentsThisStatus && data && typeof data === "object" && !Array.isArray(data)) { + return new ErrorMessage(data, httpMeta); + } + return new SDKError("Response returned an error code", httpMeta); +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + operationId?: string; + errorStatuses?: number[]; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} + + +import { Decimal } from './sdk/types/decimal'; +export { Decimal }; + +export function toDecimal(value: any): any { + if (value == null) { return value; } + if (Array.isArray(value)) { return value.map(toDecimal); } + return value instanceof Decimal ? value : new Decimal(value); +} + +export function fromDecimal(value: any): any { + if (value == null) { return value; } + if (Array.isArray(value)) { return value.map(fromDecimal); } + return value instanceof Decimal ? value.toNumber() : value; +} diff --git a/lending/src/sdk.ts b/lending/src/sdk.ts new file mode 100644 index 000000000..7caebd8a5 --- /dev/null +++ b/lending/src/sdk.ts @@ -0,0 +1,531 @@ +/* tslint:disable */ +/* eslint-disable */ +import { Configuration, ConfigurationParameters } from './runtime'; +import type * as shared from './sdk/models/index'; +import type * as webhooks from './sdk/models/webhooks/index'; +import { SDKOptions, resolveServerURL, resolveAuthHeader, resolveUserAgent, makeFetch, HTTPClient } from './lib/sdkconfig'; +import { SDKHooks } from './hooks/hooks'; +import { validateWebhook as runValidateWebhook } from './funcs/validateWebhook'; +import { + AccountBalances, + AccountTransactions, + AccountingBankData, + Accounts, + BalanceSheet, + BankAccounts, + BankStatements, + BankTransactions, + BillCreditNotes, + BillPayments, + Bills, + CashFlow, + CategorizedStatement, + CodatLendingBankingAccounts, + CodatLendingCustomers, + CodatLendingDirectCosts, + CodatLendingLoanWritebackAccounts, + CodatLendingLoanWritebackPayments, + CodatLendingPayments, + CodatLendingReports, + CodatLendingSalesTransactions, + CodatLendingSuppliers, + CodatLendingTransactions, + CodatLendingTransfers, + Companies, + CompanyInfo, + Connections, + CreateOperations, + CreditNotes, + Customers, + DataIntegrity, + DirectCosts, + DirectIncomes, + Disputes, + ExcelReports, + FileUpload, + FinancialSummary, + Invoices, + JournalEntries, + Journals, + Liabilities, + Locations, + ManageData, + ManageReports, + Metrics, + Orders, + PaymentMethods, + Payments, + ProductCategories, + Products, + ProfitAndLoss, + Reports, + SourceAccounts, + Suppliers, + TransactionCategories, + Transfers, +} from './apis/index'; + +export class AccountsPayable { + private readonly _config: Configuration; + + constructor(configuration: Configuration) { + this._config = configuration; + } + + private _billCreditNotes?: BillCreditNotes; + get billCreditNotes(): BillCreditNotes { + if (!this._billCreditNotes) { this._billCreditNotes = new BillCreditNotes(this._config); } + return this._billCreditNotes; + } + + private _billPayments?: BillPayments; + get billPayments(): BillPayments { + if (!this._billPayments) { this._billPayments = new BillPayments(this._config); } + return this._billPayments; + } + + private _bills?: Bills; + get bills(): Bills { + if (!this._bills) { this._bills = new Bills(this._config); } + return this._bills; + } + + private _suppliers?: Suppliers; + get suppliers(): Suppliers { + if (!this._suppliers) { this._suppliers = new Suppliers(this._config); } + return this._suppliers; + } +} + +export class AccountsReceivable { + private readonly _config: Configuration; + + constructor(configuration: Configuration) { + this._config = configuration; + } + + private _creditNotes?: CreditNotes; + get creditNotes(): CreditNotes { + if (!this._creditNotes) { this._creditNotes = new CreditNotes(this._config); } + return this._creditNotes; + } + + private _customers?: Customers; + get customers(): Customers { + if (!this._customers) { this._customers = new Customers(this._config); } + return this._customers; + } + + private _directIncomes?: DirectIncomes; + get directIncomes(): DirectIncomes { + if (!this._directIncomes) { this._directIncomes = new DirectIncomes(this._config); } + return this._directIncomes; + } + + private _invoices?: Invoices; + get invoices(): Invoices { + if (!this._invoices) { this._invoices = new Invoices(this._config); } + return this._invoices; + } + + private _payments?: Payments; + get payments(): Payments { + if (!this._payments) { this._payments = new Payments(this._config); } + return this._payments; + } + + private _reports?: CodatLendingReports; + get reports(): CodatLendingReports { + if (!this._reports) { this._reports = new CodatLendingReports(this._config); } + return this._reports; + } +} + +export class Banking { + private readonly _config: Configuration; + + constructor(configuration: Configuration) { + this._config = configuration; + } + + private _accountBalances?: AccountBalances; + get accountBalances(): AccountBalances { + if (!this._accountBalances) { this._accountBalances = new AccountBalances(this._config); } + return this._accountBalances; + } + + private _accounts?: CodatLendingBankingAccounts; + get accounts(): CodatLendingBankingAccounts { + if (!this._accounts) { this._accounts = new CodatLendingBankingAccounts(this._config); } + return this._accounts; + } + + private _categorizedStatement?: CategorizedStatement; + get categorizedStatement(): CategorizedStatement { + if (!this._categorizedStatement) { this._categorizedStatement = new CategorizedStatement(this._config); } + return this._categorizedStatement; + } + + private _transactionCategories?: TransactionCategories; + get transactionCategories(): TransactionCategories { + if (!this._transactionCategories) { this._transactionCategories = new TransactionCategories(this._config); } + return this._transactionCategories; + } + + private _transactions?: CodatLendingTransactions; + get transactions(): CodatLendingTransactions { + if (!this._transactions) { this._transactions = new CodatLendingTransactions(this._config); } + return this._transactions; + } +} + +export class FinancialStatements { + private readonly _config: Configuration; + + constructor(configuration: Configuration) { + this._config = configuration; + } + + private _accounts?: Accounts; + get accounts(): Accounts { + if (!this._accounts) { this._accounts = new Accounts(this._config); } + return this._accounts; + } + + private _balanceSheet?: BalanceSheet; + get balanceSheet(): BalanceSheet { + if (!this._balanceSheet) { this._balanceSheet = new BalanceSheet(this._config); } + return this._balanceSheet; + } + + private _cashFlow?: CashFlow; + get cashFlow(): CashFlow { + if (!this._cashFlow) { this._cashFlow = new CashFlow(this._config); } + return this._cashFlow; + } + + private _profitAndLoss?: ProfitAndLoss; + get profitAndLoss(): ProfitAndLoss { + if (!this._profitAndLoss) { this._profitAndLoss = new ProfitAndLoss(this._config); } + return this._profitAndLoss; + } +} + +export class LoanWriteback { + private readonly _config: Configuration; + + constructor(configuration: Configuration) { + this._config = configuration; + } + + private _accounts?: CodatLendingLoanWritebackAccounts; + get accounts(): CodatLendingLoanWritebackAccounts { + if (!this._accounts) { this._accounts = new CodatLendingLoanWritebackAccounts(this._config); } + return this._accounts; + } + + private _bankAccounts?: BankAccounts; + get bankAccounts(): BankAccounts { + if (!this._bankAccounts) { this._bankAccounts = new BankAccounts(this._config); } + return this._bankAccounts; + } + + private _bankTransactions?: BankTransactions; + get bankTransactions(): BankTransactions { + if (!this._bankTransactions) { this._bankTransactions = new BankTransactions(this._config); } + return this._bankTransactions; + } + + private _createOperations?: CreateOperations; + get createOperations(): CreateOperations { + if (!this._createOperations) { this._createOperations = new CreateOperations(this._config); } + return this._createOperations; + } + + private _directCosts?: CodatLendingDirectCosts; + get directCosts(): CodatLendingDirectCosts { + if (!this._directCosts) { this._directCosts = new CodatLendingDirectCosts(this._config); } + return this._directCosts; + } + + private _payments?: CodatLendingLoanWritebackPayments; + get payments(): CodatLendingLoanWritebackPayments { + if (!this._payments) { this._payments = new CodatLendingLoanWritebackPayments(this._config); } + return this._payments; + } + + private _sourceAccounts?: SourceAccounts; + get sourceAccounts(): SourceAccounts { + if (!this._sourceAccounts) { this._sourceAccounts = new SourceAccounts(this._config); } + return this._sourceAccounts; + } + + private _suppliers?: CodatLendingSuppliers; + get suppliers(): CodatLendingSuppliers { + if (!this._suppliers) { this._suppliers = new CodatLendingSuppliers(this._config); } + return this._suppliers; + } + + private _transfers?: CodatLendingTransfers; + get transfers(): CodatLendingTransfers { + if (!this._transfers) { this._transfers = new CodatLendingTransfers(this._config); } + return this._transfers; + } +} + +export class Sales { + private readonly _config: Configuration; + + constructor(configuration: Configuration) { + this._config = configuration; + } + + private _customers?: CodatLendingCustomers; + get customers(): CodatLendingCustomers { + if (!this._customers) { this._customers = new CodatLendingCustomers(this._config); } + return this._customers; + } + + private _disputes?: Disputes; + get disputes(): Disputes { + if (!this._disputes) { this._disputes = new Disputes(this._config); } + return this._disputes; + } + + private _locations?: Locations; + get locations(): Locations { + if (!this._locations) { this._locations = new Locations(this._config); } + return this._locations; + } + + private _metrics?: Metrics; + get metrics(): Metrics { + if (!this._metrics) { this._metrics = new Metrics(this._config); } + return this._metrics; + } + + private _orders?: Orders; + get orders(): Orders { + if (!this._orders) { this._orders = new Orders(this._config); } + return this._orders; + } + + private _paymentMethods?: PaymentMethods; + get paymentMethods(): PaymentMethods { + if (!this._paymentMethods) { this._paymentMethods = new PaymentMethods(this._config); } + return this._paymentMethods; + } + + private _payments?: CodatLendingPayments; + get payments(): CodatLendingPayments { + if (!this._payments) { this._payments = new CodatLendingPayments(this._config); } + return this._payments; + } + + private _productCategories?: ProductCategories; + get productCategories(): ProductCategories { + if (!this._productCategories) { this._productCategories = new ProductCategories(this._config); } + return this._productCategories; + } + + private _products?: Products; + get products(): Products { + if (!this._products) { this._products = new Products(this._config); } + return this._products; + } + + private _reports?: Reports; + get reports(): Reports { + if (!this._reports) { this._reports = new Reports(this._config); } + return this._reports; + } + + private _transactions?: CodatLendingSalesTransactions; + get transactions(): CodatLendingSalesTransactions { + if (!this._transactions) { this._transactions = new CodatLendingSalesTransactions(this._config); } + return this._transactions; + } +} + +export class Transactions { + private readonly _config: Configuration; + + constructor(configuration: Configuration) { + this._config = configuration; + } + + private _accountTransactions?: AccountTransactions; + get accountTransactions(): AccountTransactions { + if (!this._accountTransactions) { this._accountTransactions = new AccountTransactions(this._config); } + return this._accountTransactions; + } + + private _directCosts?: DirectCosts; + get directCosts(): DirectCosts { + if (!this._directCosts) { this._directCosts = new DirectCosts(this._config); } + return this._directCosts; + } + + private _journalEntries?: JournalEntries; + get journalEntries(): JournalEntries { + if (!this._journalEntries) { this._journalEntries = new JournalEntries(this._config); } + return this._journalEntries; + } + + private _journals?: Journals; + get journals(): Journals { + if (!this._journals) { this._journals = new Journals(this._config); } + return this._journals; + } + + private _transfers?: Transfers; + get transfers(): Transfers { + if (!this._transfers) { this._transfers = new Transfers(this._config); } + return this._transfers; + } +} + +export class CodatLending { + private readonly _config: Configuration; + + constructor(options: SDKOptions | ConfigurationParameters | Configuration = {}) { + if (options instanceof Configuration) { + this._config = options; + return; + } + const opts = options as SDKOptions & ConfigurationParameters; + const hooks = new SDKHooks(); + const baseURL = opts.basePath ?? resolveServerURL(opts); + let parsedBaseURL: URL | null = null; + try { parsedBaseURL = new URL(baseURL); } catch { parsedBaseURL = null; } + const init = hooks.sdkInit({ baseURL: parsedBaseURL, client: opts.httpClient ?? new HTTPClient() }); + const resolvedBaseURL = init.baseURL ? init.baseURL.toString().replace(/\/+$/, '') : baseURL; + this._config = new Configuration({ + ...opts, + basePath: resolvedBaseURL, + apiKey: opts.apiKey ?? resolveAuthHeader(opts.authHeader), + fetchApi: opts.fetchApi ?? makeFetch({ ...opts, httpClient: init.client }, hooks), + headers: { ...(opts.headers ?? {}), ...resolveUserAgent(opts.userAgent) }, + }); + } + + private _accountingBankData?: AccountingBankData; + get accountingBankData(): AccountingBankData { + if (!this._accountingBankData) { this._accountingBankData = new AccountingBankData(this._config); } + return this._accountingBankData; + } + + private _accountsPayable?: AccountsPayable; + get accountsPayable(): AccountsPayable { + if (!this._accountsPayable) { this._accountsPayable = new AccountsPayable(this._config); } + return this._accountsPayable; + } + + private _accountsReceivable?: AccountsReceivable; + get accountsReceivable(): AccountsReceivable { + if (!this._accountsReceivable) { this._accountsReceivable = new AccountsReceivable(this._config); } + return this._accountsReceivable; + } + + private _banking?: Banking; + get banking(): Banking { + if (!this._banking) { this._banking = new Banking(this._config); } + return this._banking; + } + + private _financialStatements?: FinancialStatements; + get financialStatements(): FinancialStatements { + if (!this._financialStatements) { this._financialStatements = new FinancialStatements(this._config); } + return this._financialStatements; + } + + private _loanWriteback?: LoanWriteback; + get loanWriteback(): LoanWriteback { + if (!this._loanWriteback) { this._loanWriteback = new LoanWriteback(this._config); } + return this._loanWriteback; + } + + private _manageData?: ManageData; + get manageData(): ManageData { + if (!this._manageData) { this._manageData = new ManageData(this._config); } + return this._manageData; + } + + private _sales?: Sales; + get sales(): Sales { + if (!this._sales) { this._sales = new Sales(this._config); } + return this._sales; + } + + private _transactions?: Transactions; + get transactions(): Transactions { + if (!this._transactions) { this._transactions = new Transactions(this._config); } + return this._transactions; + } + + private _bankStatements?: BankStatements; + get bankStatements(): BankStatements { + if (!this._bankStatements) { this._bankStatements = new BankStatements(this._config); } + return this._bankStatements; + } + + private _companies?: Companies; + get companies(): Companies { + if (!this._companies) { this._companies = new Companies(this._config); } + return this._companies; + } + + private _companyInfo?: CompanyInfo; + get companyInfo(): CompanyInfo { + if (!this._companyInfo) { this._companyInfo = new CompanyInfo(this._config); } + return this._companyInfo; + } + + private _connections?: Connections; + get connections(): Connections { + if (!this._connections) { this._connections = new Connections(this._config); } + return this._connections; + } + + private _dataIntegrity?: DataIntegrity; + get dataIntegrity(): DataIntegrity { + if (!this._dataIntegrity) { this._dataIntegrity = new DataIntegrity(this._config); } + return this._dataIntegrity; + } + + private _excelReports?: ExcelReports; + get excelReports(): ExcelReports { + if (!this._excelReports) { this._excelReports = new ExcelReports(this._config); } + return this._excelReports; + } + + private _fileUpload?: FileUpload; + get fileUpload(): FileUpload { + if (!this._fileUpload) { this._fileUpload = new FileUpload(this._config); } + return this._fileUpload; + } + + private _financialSummary?: FinancialSummary; + get financialSummary(): FinancialSummary { + if (!this._financialSummary) { this._financialSummary = new FinancialSummary(this._config); } + return this._financialSummary; + } + + private _liabilities?: Liabilities; + get liabilities(): Liabilities { + if (!this._liabilities) { this._liabilities = new Liabilities(this._config); } + return this._liabilities; + } + + private _manageReports?: ManageReports; + get manageReports(): ManageReports { + if (!this._manageReports) { this._manageReports = new ManageReports(this._config); } + return this._manageReports; + } + + async validateWebhook(args: { request: { body: string; headers: Record | Headers; url: string; method: string; } | Request; }): Promise { + const outcome = await runValidateWebhook(this as never, { request: args.request }); + if (!outcome.ok) { throw outcome.error; } + return outcome.value; + } +} diff --git a/lending/src/sdk/accountbalances.ts b/lending/src/sdk/accountbalances.ts index 222ab465c..557cbc3a3 100644 --- a/lending/src/sdk/accountbalances.ts +++ b/lending/src/sdk/accountbalances.ts @@ -1,32 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { bankingAccountBalancesList } from "../funcs/bankingAccountBalancesList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class AccountBalances extends ClientSDK { - /** - * List account balances - * - * @remarks - * The *List account balances* endpoint returns a list of [account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) for a given company's connection. - * - * [Account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) are balances for a bank account, including end-of-day batch balance or running balances per transaction. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListBankingAccountBalancesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankingAccountBalancesList( - this, - request, - options, - )); - } -} +export { AccountBalances } from "../apis/AccountBalances"; diff --git a/lending/src/sdk/accountingbankdata.ts b/lending/src/sdk/accountingbankdata.ts index 80790417a..024894aee 100644 --- a/lending/src/sdk/accountingbankdata.ts +++ b/lending/src/sdk/accountingbankdata.ts @@ -1,38 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountingBankDataListTransactions } from "../funcs/accountingBankDataListTransactions.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import { CodatLendingAccounts } from "./codatlendingaccounts.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class AccountingBankData extends ClientSDK { - private _accounts?: CodatLendingAccounts; - get accounts(): CodatLendingAccounts { - return (this._accounts ??= new CodatLendingAccounts(this._options)); - } - - /** - * List bank account transactions - * - * @remarks - * The *List account bank transactions* endpoint returns a list of [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company's connection. - * - * [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async listTransactions( - request: operations.ListAccountingBankAccountTransactionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountingBankDataListTransactions( - this, - request, - options, - )); - } -} +export { AccountingBankData } from "../apis/AccountingBankData"; diff --git a/lending/src/sdk/accounts.ts b/lending/src/sdk/accounts.ts index e9be20e98..8715f5d29 100644 --- a/lending/src/sdk/accounts.ts +++ b/lending/src/sdk/accounts.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { financialStatementsAccountsGet } from "../funcs/financialStatementsAccountsGet.js"; -import { financialStatementsAccountsList } from "../funcs/financialStatementsAccountsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Accounts extends ClientSDK { - /** - * List accounts - * - * @remarks - * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - * - * [Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingAccountsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(financialStatementsAccountsList( - this, - request, - options, - )); - } - - /** - * Get account - * - * @remarks - * The *Get account* endpoint returns a single account for a given accountId. - * - * [Accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(financialStatementsAccountsGet( - this, - request, - options, - )); - } -} +export { Accounts } from "../apis/FinancialStatementsAccounts"; diff --git a/lending/src/sdk/accountspayable.ts b/lending/src/sdk/accountspayable.ts index d92686934..49667d906 100644 --- a/lending/src/sdk/accountspayable.ts +++ b/lending/src/sdk/accountspayable.ts @@ -1,31 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ClientSDK } from "../lib/sdks.js"; -import { BillCreditNotes } from "./billcreditnotes.js"; -import { BillPayments } from "./billpayments.js"; -import { Bills } from "./bills.js"; -import { Suppliers } from "./suppliers.js"; - -export class AccountsPayable extends ClientSDK { - private _billCreditNotes?: BillCreditNotes; - get billCreditNotes(): BillCreditNotes { - return (this._billCreditNotes ??= new BillCreditNotes(this._options)); - } - - private _billPayments?: BillPayments; - get billPayments(): BillPayments { - return (this._billPayments ??= new BillPayments(this._options)); - } - - private _bills?: Bills; - get bills(): Bills { - return (this._bills ??= new Bills(this._options)); - } - - private _suppliers?: Suppliers; - get suppliers(): Suppliers { - return (this._suppliers ??= new Suppliers(this._options)); - } -} +export { AccountsPayable } from "../sdk"; diff --git a/lending/src/sdk/accountsreceivable.ts b/lending/src/sdk/accountsreceivable.ts index d39973d7c..03e8de628 100644 --- a/lending/src/sdk/accountsreceivable.ts +++ b/lending/src/sdk/accountsreceivable.ts @@ -1,43 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ClientSDK } from "../lib/sdks.js"; -import { CodatLendingReports } from "./codatlendingreports.js"; -import { CreditNotes } from "./creditnotes.js"; -import { Customers } from "./customers.js"; -import { DirectIncomes } from "./directincomes.js"; -import { Invoices } from "./invoices.js"; -import { Payments } from "./payments.js"; - -export class AccountsReceivable extends ClientSDK { - private _invoices?: Invoices; - get invoices(): Invoices { - return (this._invoices ??= new Invoices(this._options)); - } - - private _creditNotes?: CreditNotes; - get creditNotes(): CreditNotes { - return (this._creditNotes ??= new CreditNotes(this._options)); - } - - private _customers?: Customers; - get customers(): Customers { - return (this._customers ??= new Customers(this._options)); - } - - private _directIncomes?: DirectIncomes; - get directIncomes(): DirectIncomes { - return (this._directIncomes ??= new DirectIncomes(this._options)); - } - - private _payments?: Payments; - get payments(): Payments { - return (this._payments ??= new Payments(this._options)); - } - - private _reports?: CodatLendingReports; - get reports(): CodatLendingReports { - return (this._reports ??= new CodatLendingReports(this._options)); - } -} +export { AccountsReceivable } from "../sdk"; diff --git a/lending/src/sdk/accounttransactions.ts b/lending/src/sdk/accounttransactions.ts index eb6ceec05..3bb21e5aa 100644 --- a/lending/src/sdk/accounttransactions.ts +++ b/lending/src/sdk/accounttransactions.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { transactionsAccountTransactionsGet } from "../funcs/transactionsAccountTransactionsGet.js"; -import { transactionsAccountTransactionsList } from "../funcs/transactionsAccountTransactionsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class AccountTransactions extends ClientSDK { - /** - * List account transactions - * - * @remarks - * The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) for a given company's connection. - * - * [Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingAccountTransactionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsAccountTransactionsList( - this, - request, - options, - )); - } - - /** - * Get account transaction - * - * @remarks - * The *Get account transaction* endpoint returns a single account transaction for a given accountTransactionId. - * - * [Account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction) represent bank activity within an accounting software. 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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingAccountTransactionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsAccountTransactionsGet( - this, - request, - options, - )); - } -} +export { AccountTransactions } from "../apis/AccountTransactions"; diff --git a/lending/src/sdk/balancesheet.ts b/lending/src/sdk/balancesheet.ts index 0a33779e7..8b8266f35 100644 --- a/lending/src/sdk/balancesheet.ts +++ b/lending/src/sdk/balancesheet.ts @@ -1,48 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { financialStatementsBalanceSheetGet } from "../funcs/financialStatementsBalanceSheetGet.js"; -import { financialStatementsBalanceSheetGetCategorizedAccounts } from "../funcs/financialStatementsBalanceSheetGetCategorizedAccounts.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class BalanceSheet extends ClientSDK { - /** - * Get categorized balance sheet statement - * - * @remarks - * The *Get categorized balance sheet statement* endpoint returns a list of categorized accounts that appear on a company’s Balance Sheet along with a balance per financial statement date. - * - * Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. - */ - async getCategorizedAccounts( - request: operations.GetCategorizedBalanceSheetStatementRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(financialStatementsBalanceSheetGetCategorizedAccounts( - this, - request, - options, - )); - } - - /** - * Get balance sheet - * - * @remarks - * Gets the latest balance sheet for a company. - */ - async get( - request: operations.GetAccountingBalanceSheetRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(financialStatementsBalanceSheetGet( - this, - request, - options, - )); - } -} +export { BalanceSheet } from "../apis/BalanceSheet"; diff --git a/lending/src/sdk/bankaccounts.ts b/lending/src/sdk/bankaccounts.ts index a595f9cb2..911d7ba40 100644 --- a/lending/src/sdk/bankaccounts.ts +++ b/lending/src/sdk/bankaccounts.ts @@ -1,58 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackBankAccountsCreate } from "../funcs/loanWritebackBankAccountsCreate.js"; -import { loanWritebackBankAccountsGetCreateUpdateModel } from "../funcs/loanWritebackBankAccountsGetCreateUpdateModel.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class BankAccounts extends ClientSDK { - /** - * Get create/update bank account model - * - * @remarks - * 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/lending-api#/schemas/BankAccount) for a given company and integration. - * - * [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ - async getCreateUpdateModel( - request: operations.GetCreateUpdateBankAccountsModelRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackBankAccountsGetCreateUpdateModel( - this, - request, - options, - )); - } - - /** - * Create bank account - * - * @remarks - * The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company's connection. - * - * [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/lending-api#/operations/get-create-update-bankAccounts-model). - */ - async create( - request: operations.CreateBankAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackBankAccountsCreate( - this, - request, - options, - )); - } -} +export { BankAccounts } from "../apis/BankAccounts"; diff --git a/lending/src/sdk/banking.ts b/lending/src/sdk/banking.ts index 3c1c57ed2..13d35333a 100644 --- a/lending/src/sdk/banking.ts +++ b/lending/src/sdk/banking.ts @@ -1,41 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ClientSDK } from "../lib/sdks.js"; -import { AccountBalances } from "./accountbalances.js"; -import { CategorizedStatement } from "./categorizedstatement.js"; -import { CodatLendingBankingAccounts } from "./codatlendingbankingaccounts.js"; -import { CodatLendingTransactions } from "./codatlendingtransactions.js"; -import { TransactionCategories } from "./transactioncategories.js"; - -export class Banking extends ClientSDK { - private _categorizedStatement?: CategorizedStatement; - get categorizedStatement(): CategorizedStatement { - return (this._categorizedStatement ??= new CategorizedStatement( - this._options, - )); - } - - private _accountBalances?: AccountBalances; - get accountBalances(): AccountBalances { - return (this._accountBalances ??= new AccountBalances(this._options)); - } - - private _accounts?: CodatLendingBankingAccounts; - get accounts(): CodatLendingBankingAccounts { - return (this._accounts ??= new CodatLendingBankingAccounts(this._options)); - } - - private _transactions?: CodatLendingTransactions; - get transactions(): CodatLendingTransactions { - return (this._transactions ??= new CodatLendingTransactions(this._options)); - } - - private _transactionCategories?: TransactionCategories; - get transactionCategories(): TransactionCategories { - return (this._transactionCategories ??= new TransactionCategories( - this._options, - )); - } -} +export { Banking } from "../sdk"; diff --git a/lending/src/sdk/bankstatements.ts b/lending/src/sdk/bankstatements.ts index ea85572c4..58f3844c8 100644 --- a/lending/src/sdk/bankstatements.ts +++ b/lending/src/sdk/bankstatements.ts @@ -1,116 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { bankStatementsEndUploadSession } from "../funcs/bankStatementsEndUploadSession.js"; -import { bankStatementsGetUploadConfiguration } from "../funcs/bankStatementsGetUploadConfiguration.js"; -import { bankStatementsSetUploadConfiguration } from "../funcs/bankStatementsSetUploadConfiguration.js"; -import { bankStatementsStartUploadSession } from "../funcs/bankStatementsStartUploadSession.js"; -import { bankStatementsUploadBankStatementData } from "../funcs/bankStatementsUploadBankStatementData.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class BankStatements extends ClientSDK { - /** - * Get upload configuration - * - * @remarks - * Use the *Get upload configuration* endpoint to view the existing bank statement upload configuration for the specified data connection. - * - * With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. - * - * When you use the [*Upload data*](https://docs.codat.io/lending-api#/operations/upload-bank-statement-data) endpoint next, you must upload the data for the account you configured. - */ - async getUploadConfiguration( - request: operations.GetBankStatementUploadConfigurationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankStatementsGetUploadConfiguration( - this, - request, - options, - )); - } - - /** - * Set upload configuration - * - * @remarks - * Use the *Set upload configuration* endpoint to create bank statement upload configuration for the specified data connection. - * - * With this configuration, you set the source of the data you plan to upload, the ID of the account in third-party banking platform, and a provider ID, if required. This lets us determine the expected format of the data and any source-specific requirements. - * - * Each data connection can only have one configuration for each company and external account ID combination. You will receive a Bad Request response if you try to set it again. - */ - async setUploadConfiguration( - request: operations.SetBankStatementUploadConfigurationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankStatementsSetUploadConfiguration( - this, - request, - options, - )); - } - - /** - * Start upload session - * - * @remarks - * Use the *Start upload session* endpoint to initiate a bank statement upload session for a given company. - * - * A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. - * - * You can only have one active session per data type at a time. You can complete or cancel a session using the [*End upload session*](https://docs.codat.io/lending-api#/operations/end-bank-statement-upload-session) endpoint. - */ - async startUploadSession( - request: operations.StartBankStatementUploadSessionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankStatementsStartUploadSession( - this, - request, - options, - )); - } - - /** - * Upload data - * - * @remarks - * During an active session, use the **Upload data* endpoint to uploads a page of bank accounts or bank transactions data to the session. - * - * Make sure you created configuration for the account using the [*Set upload configuration*](https://docs.codat.io/lending-api#/operations/set-bank-statement-upload-configuration) endpoint before attempting an upload. - */ - async uploadBankStatementData( - request: operations.UploadBankStatementDataRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankStatementsUploadBankStatementData( - this, - request, - options, - )); - } - - /** - * End upload session - * - * @remarks - * Use the *End upload session* endpoint to finalize a bank statement upload session. Include a `status` in the request body to indicate if you want to cancel the processing of the dataset or trigger the ingestion and enrichment of the data. - * - * A session is a one-time process that enables you to upload bank statements to Codat. It will time out after 90 minutes if no data is uploaded. - */ - async endUploadSession( - request: operations.EndBankStatementUploadSessionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankStatementsEndUploadSession( - this, - request, - options, - )); - } -} +export { BankStatements } from "../apis/BankStatements"; diff --git a/lending/src/sdk/banktransactions.ts b/lending/src/sdk/banktransactions.ts index 0ae279dd6..5a2d0cb8c 100644 --- a/lending/src/sdk/banktransactions.ts +++ b/lending/src/sdk/banktransactions.ts @@ -1,58 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackBankTransactionsCreate } from "../funcs/loanWritebackBankTransactionsCreate.js"; -import { loanWritebackBankTransactionsGetCreateModel } from "../funcs/loanWritebackBankTransactionsGetCreateModel.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class BankTransactions extends ClientSDK { - /** - * Get create bank account transactions model - * - * @remarks - * 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/lending-api#/schemas/BankTransactions) for a given company and integration. - * - * [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ - async getCreateModel( - request: operations.GetCreateBankTransactionsModelRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackBankTransactionsGetCreateModel( - this, - request, - options, - )); - } - - /** - * Create bank account transactions - * - * @remarks - * The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) for a given company's connection. - * - * [Bank account transactions](https://docs.codat.io/lending-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/lending-api#/operations/get-create-bankTransactions-model). - */ - async create( - request: operations.CreateBankTransactionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackBankTransactionsCreate( - this, - request, - options, - )); - } -} +export { BankTransactions } from "../apis/BankTransactions"; diff --git a/lending/src/sdk/billcreditnotes.ts b/lending/src/sdk/billcreditnotes.ts index 7d4de6ea1..1d02b31a4 100644 --- a/lending/src/sdk/billcreditnotes.ts +++ b/lending/src/sdk/billcreditnotes.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsPayableBillCreditNotesGet } from "../funcs/accountsPayableBillCreditNotesGet.js"; -import { accountsPayableBillCreditNotesList } from "../funcs/accountsPayableBillCreditNotesList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class BillCreditNotes extends ClientSDK { - /** - * List bill credit notes - * - * @remarks - * The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote) for a given company's connection. - * - * [Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingBillCreditNotesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableBillCreditNotesList( - this, - request, - options, - )); - } - - /** - * Get bill credit note - * - * @remarks - * The *Get bill credit note* endpoint returns a single bill credit note for a given billCreditNoteId. - * - * [Bill credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingBillCreditNoteRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableBillCreditNotesGet( - this, - request, - options, - )); - } -} +export { BillCreditNotes } from "../apis/BillCreditNotes"; diff --git a/lending/src/sdk/billpayments.ts b/lending/src/sdk/billpayments.ts index 5f607a322..6f8461eb0 100644 --- a/lending/src/sdk/billpayments.ts +++ b/lending/src/sdk/billpayments.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsPayableBillPaymentsGet } from "../funcs/accountsPayableBillPaymentsGet.js"; -import { accountsPayableBillPaymentsList } from "../funcs/accountsPayableBillPaymentsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class BillPayments extends ClientSDK { - /** - * List bill payments - * - * @remarks - * The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment) for a given company's connection. - * - * [Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingBillPaymentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableBillPaymentsList( - this, - request, - options, - )); - } - - /** - * Get bill payment - * - * @remarks - * The *Get bill payment* endpoint returns a single bill payment for a given billPaymentId. - * - * [Bill payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingBillPaymentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableBillPaymentsGet( - this, - request, - options, - )); - } -} +export { BillPayments } from "../apis/BillPayments"; diff --git a/lending/src/sdk/bills.ts b/lending/src/sdk/bills.ts index 8f5040c25..4a939484e 100644 --- a/lending/src/sdk/bills.ts +++ b/lending/src/sdk/bills.ts @@ -1,122 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsPayableBillsDownloadAttachment } from "../funcs/accountsPayableBillsDownloadAttachment.js"; -import { accountsPayableBillsGet } from "../funcs/accountsPayableBillsGet.js"; -import { accountsPayableBillsGetAttachment } from "../funcs/accountsPayableBillsGetAttachment.js"; -import { accountsPayableBillsList } from "../funcs/accountsPayableBillsList.js"; -import { accountsPayableBillsListAttachments } from "../funcs/accountsPayableBillsListAttachments.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Bills extends ClientSDK { - /** - * List bills - * - * @remarks - * The *List bills* endpoint returns a list of [bills](https://docs.codat.io/lending-api#/schemas/Bill) for a given company's connection. - * - * [Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - * - * ### Tips and traps - * - * To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat's cache. - */ - async list( - request: operations.ListAccountingBillsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableBillsList( - this, - request, - options, - )); - } - - /** - * Get bill - * - * @remarks - * The *Get bill* endpoint returns a single bill for a given billId. - * - * [Bills](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - * - * ### Tips and traps - * - * To access the `paymentAllocations` property, ensure that the `billPayments` data type is queued and cached in Codat before retrieving `bills` from Codat's cache. - */ - async get( - request: operations.GetAccountingBillRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableBillsGet( - this, - request, - options, - )); - } - - /** - * List bill attachments - * - * @remarks - * The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. - * - * [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - */ - async listAttachments( - request: operations.ListAccountingBillAttachmentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableBillsListAttachments( - this, - request, - options, - )); - } - - /** - * Get bill attachment - * - * @remarks - * The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. - * - * [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - */ - async getAttachment( - request: operations.GetAccountingBillAttachmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableBillsGetAttachment( - this, - request, - options, - )); - } - - /** - * Download bill attachment - * - * @remarks - * The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. - * - * [Bills](https://docs.codat.io/lending-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - */ - async downloadAttachment( - request: operations.DownloadAccountingBillAttachmentRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(accountsPayableBillsDownloadAttachment( - this, - request, - options, - )); - } -} +export { Bills } from "../apis/Bills"; diff --git a/lending/src/sdk/cashflow.ts b/lending/src/sdk/cashflow.ts index 0840292a5..60ed330a4 100644 --- a/lending/src/sdk/cashflow.ts +++ b/lending/src/sdk/cashflow.ts @@ -1,28 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { financialStatementsCashFlowGet } from "../funcs/financialStatementsCashFlowGet.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CashFlow extends ClientSDK { - /** - * Get cash flow statement - * - * @remarks - * Gets the latest cash flow statement for a company. - */ - async get( - request: operations.GetAccountingCashFlowStatementRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(financialStatementsCashFlowGet( - this, - request, - options, - )); - } -} +export { CashFlow } from "../apis/CashFlow"; diff --git a/lending/src/sdk/categorizedstatement.ts b/lending/src/sdk/categorizedstatement.ts index 3b93f35f1..bab0bd9c2 100644 --- a/lending/src/sdk/categorizedstatement.ts +++ b/lending/src/sdk/categorizedstatement.ts @@ -1,32 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { bankingCategorizedStatementGet } from "../funcs/bankingCategorizedStatementGet.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CategorizedStatement extends ClientSDK { - /** - * Get categorized bank statement - * - * @remarks - * > **Categorization engine** - * > - * > The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. - * - * The _Get categorized bank statement_ endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources. - */ - async get( - request: operations.GetCategorizedBankStatementRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankingCategorizedStatementGet( - this, - request, - options, - )); - } -} +export { CategorizedStatement } from "../apis/CategorizedStatement"; diff --git a/lending/src/sdk/codatlendingaccounts.ts b/lending/src/sdk/codatlendingaccounts.ts index dc2b3baf5..dec7609e5 100644 --- a/lending/src/sdk/codatlendingaccounts.ts +++ b/lending/src/sdk/codatlendingaccounts.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountingBankDataAccountsGet } from "../funcs/accountingBankDataAccountsGet.js"; -import { accountingBankDataAccountsList } from "../funcs/accountingBankDataAccountsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingAccounts extends ClientSDK { - /** - * List bank accounts - * - * @remarks - * The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) for a given company's connection. - * - * [Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingBankAccountsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountingBankDataAccountsList( - this, - request, - options, - )); - } - - /** - * Get bank account - * - * @remarks - * The *Get bank account* endpoint returns a single account for a given accountId. - * - * [Bank accounts](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingBankAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountingBankDataAccountsGet( - this, - request, - options, - )); - } -} +export { CodatLendingAccounts } from "../apis/Accounts"; diff --git a/lending/src/sdk/codatlendingbankingaccounts.ts b/lending/src/sdk/codatlendingbankingaccounts.ts index 2f5ae84d9..cebddecd6 100644 --- a/lending/src/sdk/codatlendingbankingaccounts.ts +++ b/lending/src/sdk/codatlendingbankingaccounts.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { bankingAccountsGet } from "../funcs/bankingAccountsGet.js"; -import { bankingAccountsList } from "../funcs/bankingAccountsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingBankingAccounts extends ClientSDK { - /** - * List accounts - * - * @remarks - * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - * - * [Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListBankingAccountsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankingAccountsList( - this, - request, - options, - )); - } - - /** - * Get account - * - * @remarks - * The *Get account* endpoint returns a single account for a given accountId. - * - * [Accounts](https://docs.codat.io/lending-api#/schemas/Account) 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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetBankingAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankingAccountsGet( - this, - request, - options, - )); - } -} +export { CodatLendingBankingAccounts } from "../apis/BankingAccounts"; diff --git a/lending/src/sdk/codatlendingcustomers.ts b/lending/src/sdk/codatlendingcustomers.ts index 734c40cb9..dc8588b77 100644 --- a/lending/src/sdk/codatlendingcustomers.ts +++ b/lending/src/sdk/codatlendingcustomers.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesCustomersGet } from "../funcs/salesCustomersGet.js"; -import { salesCustomersList } from "../funcs/salesCustomersList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingCustomers extends ClientSDK { - /** - * List customers - * - * @remarks - * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company's connection. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and recieve goods and/or services from the SMB. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommerceCustomersRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesCustomersList( - this, - request, - options, - )); - } - - /** - * Get customer - * - * @remarks - * The *Get customer* endpoint returns a single customer for a given customerId. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that place orders, make payments and receive goods and/or services from the SMB. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommerceCustomerRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesCustomersGet( - this, - request, - options, - )); - } -} +export { CodatLendingCustomers } from "../apis/SalesCustomers"; diff --git a/lending/src/sdk/codatlendingdirectcosts.ts b/lending/src/sdk/codatlendingdirectcosts.ts index 6d2f6b104..46a2c4e9d 100644 --- a/lending/src/sdk/codatlendingdirectcosts.ts +++ b/lending/src/sdk/codatlendingdirectcosts.ts @@ -1,58 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackDirectCostsCreate } from "../funcs/loanWritebackDirectCostsCreate.js"; -import { loanWritebackDirectCostsGetCreateModel } from "../funcs/loanWritebackDirectCostsGetCreateModel.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingDirectCosts extends ClientSDK { - /** - * Get create direct cost model - * - * @remarks - * The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company and integration. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ - async getCreateModel( - request: operations.GetCreateDirectCostsModelRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackDirectCostsGetCreateModel( - this, - request, - options, - )); - } - - /** - * Create direct cost - * - * @remarks - * The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company's connection. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/lending-api#/operations/get-create-directCosts-model). - */ - async create( - request: operations.CreateDirectCostRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackDirectCostsCreate( - this, - request, - options, - )); - } -} +export { CodatLendingDirectCosts } from "../apis/DirectCosts"; diff --git a/lending/src/sdk/codatlendingloanwritebackaccounts.ts b/lending/src/sdk/codatlendingloanwritebackaccounts.ts index 0f08e4f3d..3f9cdf817 100644 --- a/lending/src/sdk/codatlendingloanwritebackaccounts.ts +++ b/lending/src/sdk/codatlendingloanwritebackaccounts.ts @@ -1,58 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackAccountsCreate } from "../funcs/loanWritebackAccountsCreate.js"; -import { loanWritebackAccountsGetCreateModel } from "../funcs/loanWritebackAccountsGetCreateModel.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingLoanWritebackAccounts extends ClientSDK { - /** - * Get create account model - * - * @remarks - * The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company and integration. - * - * [Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ - async getCreateModel( - request: operations.GetCreateChartOfAccountsModelRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackAccountsGetCreateModel( - this, - request, - options, - )); - } - - /** - * Create account - * - * @remarks - * The *Create account* endpoint creates a new [account](https://docs.codat.io/lending-api#/schemas/Account) for a given company's connection. - * - * [Accounts](https://docs.codat.io/lending-api#/schemas/Account) are the categories a business uses to record accounting transactions. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/lending-api#/operations/get-create-chartOfAccounts-model). - */ - async create( - request: operations.CreateAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackAccountsCreate( - this, - request, - options, - )); - } -} +export { CodatLendingLoanWritebackAccounts } from "../apis/LoanWritebackAccounts"; diff --git a/lending/src/sdk/codatlendingloanwritebackpayments.ts b/lending/src/sdk/codatlendingloanwritebackpayments.ts index ba76915fb..fa355878b 100644 --- a/lending/src/sdk/codatlendingloanwritebackpayments.ts +++ b/lending/src/sdk/codatlendingloanwritebackpayments.ts @@ -1,58 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackPaymentsCreate } from "../funcs/loanWritebackPaymentsCreate.js"; -import { loanWritebackPaymentsGetCreateModel } from "../funcs/loanWritebackPaymentsGetCreateModel.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingLoanWritebackPayments extends ClientSDK { - /** - * Get create payment model - * - * @remarks - * The *Get create payment model* endpoint returns the expected data for the request payload when creating a [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company and integration. - * - * [Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ - async getCreateModel( - request: operations.GetCreatePaymentModelRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackPaymentsGetCreateModel( - this, - request, - options, - )); - } - - /** - * Create payment - * - * @remarks - * The *Create payment* endpoint creates a new [payment](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - * - * [Payments](https://docs.codat.io/lending-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create payment model](https://docs.codat.io/lending-api#/operations/get-create-payments-model). - */ - async create( - request: operations.CreatePaymentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackPaymentsCreate( - this, - request, - options, - )); - } -} +export { CodatLendingLoanWritebackPayments } from "../apis/LoanWritebackPayments"; diff --git a/lending/src/sdk/codatlendingpayments.ts b/lending/src/sdk/codatlendingpayments.ts index 3f4f0f632..81f840668 100644 --- a/lending/src/sdk/codatlendingpayments.ts +++ b/lending/src/sdk/codatlendingpayments.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesPaymentsGet } from "../funcs/salesPaymentsGet.js"; -import { salesPaymentsList } from "../funcs/salesPaymentsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingPayments extends ClientSDK { - /** - * List payments - * - * @remarks - * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - * - * [Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommercePaymentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesPaymentsList( - this, - request, - options, - )); - } - - /** - * Get payment - * - * @remarks - * The *Get payment* endpoint returns a single payment for a given paymentId. - * - * [Payments](https://docs.codat.io/lending-api#/schemas/Payment) contain details of all payments made by customers to the company. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommercePaymentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesPaymentsGet( - this, - request, - options, - )); - } -} +export { CodatLendingPayments } from "../apis/SalesPayments"; diff --git a/lending/src/sdk/codatlendingreports.ts b/lending/src/sdk/codatlendingreports.ts index 27235f7e9..d215e0626 100644 --- a/lending/src/sdk/codatlendingreports.ts +++ b/lending/src/sdk/codatlendingreports.ts @@ -1,82 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsReceivableReportsGetAgedCreditors } from "../funcs/accountsReceivableReportsGetAgedCreditors.js"; -import { accountsReceivableReportsGetAgedDebtors } from "../funcs/accountsReceivableReportsGetAgedDebtors.js"; -import { accountsReceivableReportsIsAgedCreditorsAvailable } from "../funcs/accountsReceivableReportsIsAgedCreditorsAvailable.js"; -import { accountsReceivableReportsIsAgedDebtorsAvailable } from "../funcs/accountsReceivableReportsIsAgedDebtorsAvailable.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingReports extends ClientSDK { - /** - * Aged debtors report available - * - * @remarks - * Indicates whether the aged debtors report is available for the company. - */ - async isAgedDebtorsAvailable( - request: operations.IsAgedDebtorsReportAvailableRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableReportsIsAgedDebtorsAvailable( - this, - request, - options, - )); - } - - /** - * Aged debtors report - * - * @remarks - * Returns aged debtors report for company that shows the total outstanding balance due from customers to the business over time. - */ - async getAgedDebtors( - request: operations.GetAccountingAgedDebtorsReportRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableReportsGetAgedDebtors( - this, - request, - options, - )); - } - - /** - * Aged creditors report available - * - * @remarks - * Indicates whether the aged creditor report is available for the company. - */ - async isAgedCreditorsAvailable( - request: operations.IsAgedCreditorsReportAvailableRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableReportsIsAgedCreditorsAvailable( - this, - request, - options, - )); - } - - /** - * Aged creditors report - * - * @remarks - * Returns aged creditors report for company that shows the total balance owed by a business to its suppliers over time. - */ - async getAgedCreditors( - request: operations.GetAccountingAgedCreditorsReportRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableReportsGetAgedCreditors( - this, - request, - options, - )); - } -} +export { CodatLendingReports } from "../apis/Reports"; diff --git a/lending/src/sdk/codatlendingsalestransactions.ts b/lending/src/sdk/codatlendingsalestransactions.ts index 1b37f5f55..bad9161c6 100644 --- a/lending/src/sdk/codatlendingsalestransactions.ts +++ b/lending/src/sdk/codatlendingsalestransactions.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesTransactionsGet } from "../funcs/salesTransactionsGet.js"; -import { salesTransactionsList } from "../funcs/salesTransactionsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingSalesTransactions extends ClientSDK { - /** - * List transactions - * - * @remarks - * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company's connection. - * - * [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommerceTransactionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesTransactionsList( - this, - request, - options, - )); - } - - /** - * Get transaction - * - * @remarks - * The *Get transaction* endpoint returns a single transaction for a given transactionId. - * - * [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommerceTransactionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesTransactionsGet( - this, - request, - options, - )); - } -} +export { CodatLendingSalesTransactions } from "../apis/SalesTransactions"; diff --git a/lending/src/sdk/codatlendingsuppliers.ts b/lending/src/sdk/codatlendingsuppliers.ts index b8f3ee22e..afdc4bbfb 100644 --- a/lending/src/sdk/codatlendingsuppliers.ts +++ b/lending/src/sdk/codatlendingsuppliers.ts @@ -1,58 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackSuppliersCreate } from "../funcs/loanWritebackSuppliersCreate.js"; -import { loanWritebackSuppliersGetCreateUpdateModel } from "../funcs/loanWritebackSuppliersGetCreateUpdateModel.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingSuppliers extends ClientSDK { - /** - * Get create/update supplier model - * - * @remarks - * 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/lending-api#/schemas/Supplier) for a given company and integration. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ - async getCreateUpdateModel( - request: operations.GetCreateUpdateSuppliersModelRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackSuppliersGetCreateUpdateModel( - this, - request, - options, - )); - } - - /** - * Create supplier - * - * @remarks - * The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company's connection. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/lending-api#/operations/get-create-update-suppliers-model). - */ - async create( - request: operations.CreateSupplierRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackSuppliersCreate( - this, - request, - options, - )); - } -} +export { CodatLendingSuppliers } from "../apis/LoanWritebackSuppliers"; diff --git a/lending/src/sdk/codatlendingtransactions.ts b/lending/src/sdk/codatlendingtransactions.ts index df91136ac..84e991a4d 100644 --- a/lending/src/sdk/codatlendingtransactions.ts +++ b/lending/src/sdk/codatlendingtransactions.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { bankingTransactionsGet } from "../funcs/bankingTransactionsGet.js"; -import { bankingTransactionsList } from "../funcs/bankingTransactionsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingTransactions extends ClientSDK { - /** - * List transactions - * - * @remarks - * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/lending-api#/schemas/Transaction) for a given company's connection. - * - * [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListBankingTransactionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankingTransactionsList( - this, - request, - options, - )); - } - - /** - * Get bank transaction - * - * @remarks - * The *Get transaction* endpoint returns a single transaction for a given transactionId. - * - * [Transactions](https://docs.codat.io/lending-api#/schemas/Transaction) provide an immutable source of up-to-date information on income and expenditure. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetBankingTransactionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankingTransactionsGet( - this, - request, - options, - )); - } -} +export { CodatLendingTransactions } from "../apis/Transactions"; diff --git a/lending/src/sdk/codatlendingtransfers.ts b/lending/src/sdk/codatlendingtransfers.ts index fee65ee50..9d1c3238e 100644 --- a/lending/src/sdk/codatlendingtransfers.ts +++ b/lending/src/sdk/codatlendingtransfers.ts @@ -1,58 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackTransfersCreate } from "../funcs/loanWritebackTransfersCreate.js"; -import { loanWritebackTransfersGetCreateModel } from "../funcs/loanWritebackTransfersGetCreateModel.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLendingTransfers extends ClientSDK { - /** - * Get create transfer model - * - * @remarks - * The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company and integration. - * - * [Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - * - * **Integration-specific behavior** - * - * See the *response examples* for integration-specific indicative models. - */ - async getCreateModel( - request: operations.GetCreateTransfersModelRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackTransfersGetCreateModel( - this, - request, - options, - )); - } - - /** - * Create transfer - * - * @remarks - * The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company's connection. - * - * [Transfers](https://docs.codat.io/lending-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - * - * **Integration-specific behavior** - * - * Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/lending-api#/operations/get-create-transfers-model). - */ - async create( - request: operations.CreateTransferRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackTransfersCreate( - this, - request, - options, - )); - } -} +export { CodatLendingTransfers } from "../apis/Transfers"; diff --git a/lending/src/sdk/companies.ts b/lending/src/sdk/companies.ts index 27513d668..4b89b1e24 100644 --- a/lending/src/sdk/companies.ts +++ b/lending/src/sdk/companies.ts @@ -1,152 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { companiesCreate } from "../funcs/companiesCreate.js"; -import { companiesDelete } from "../funcs/companiesDelete.js"; -import { companiesGet } from "../funcs/companiesGet.js"; -import { companiesList } from "../funcs/companiesList.js"; -import { companiesReplace } from "../funcs/companiesReplace.js"; -import { companiesUpdate } from "../funcs/companiesUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Companies extends ClientSDK { - /** - * List companies - * - * @remarks - * The *List companies* endpoint returns a list of [companies](https://docs.codat.io/lending-api#/schemas/Company) associated to your instances. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - * - * ## Filter by tags - * - * The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): - * - * - equals (`=`) - * - not equals (`!=`) - * - contains (`~`) - * - * For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: - * - Foreign key: `uid = {yourCustomerId}` - * - Region: `region != uk` - * - Owning team and region: `region = uk && owningTeam = invoice-finance` - */ - async list( - request?: operations.ListCompaniesRequest | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(companiesList( - this, - request, - options, - )); - } - - /** - * Create company - * - * @remarks - * Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - * - * If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. - */ - async create( - request?: shared.CompanyRequestBody | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(companiesCreate( - this, - request, - options, - )); - } - - /** - * Replace company - * - * @remarks - * Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - */ - async replace( - request: operations.ReplaceCompanyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(companiesReplace( - this, - request, - options, - )); - } - - /** - * Update company - * - * @remarks - * Use the *Update company* endpoint to update the name, description, or tags of the company. - * - * The *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - */ - async update( - request: operations.UpdateCompanyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(companiesUpdate( - this, - request, - options, - )); - } - - /** - * Delete a company - * - * @remarks - * The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/lending-api#/schemas/Company), its [connections](https://docs.codat.io/lending-api#/schemas/Connection) and any cached data. This operation is irreversible. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - */ - async delete( - request: operations.DeleteCompanyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(companiesDelete( - this, - request, - options, - )); - } - - /** - * Get company - * - * @remarks - * The *Get company* endpoint returns a single company for a given `companyId`. - * - * A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - */ - async get( - request: operations.GetCompanyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(companiesGet( - this, - request, - options, - )); - } -} +export { Companies } from "../apis/Companies"; diff --git a/lending/src/sdk/companyinfo.ts b/lending/src/sdk/companyinfo.ts index e7c7fd426..d8ecf2281 100644 --- a/lending/src/sdk/companyinfo.ts +++ b/lending/src/sdk/companyinfo.ts @@ -1,50 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { companyInfoGetAccountingProfile } from "../funcs/companyInfoGetAccountingProfile.js"; -import { companyInfoGetCommerceProfile } from "../funcs/companyInfoGetCommerceProfile.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CompanyInfo extends ClientSDK { - /** - * Get company accounting profile - * - * @remarks - * Gets the latest basic info for a company. - */ - async getAccountingProfile( - request: operations.GetAccountingProfileRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(companyInfoGetAccountingProfile( - this, - request, - options, - )); - } - - /** - * Get company commerce profile - * - * @remarks - * Retrieve information about the company, as seen in the commerce - * platform. - * - * This may include information like addresses, tax registration details and - * social media or website information." - */ - async getCommerceProfile( - request: operations.GetCommerceProfileRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(companyInfoGetCommerceProfile( - this, - request, - options, - )); - } -} +export { CompanyInfo } from "../apis/CompanyInfo"; diff --git a/lending/src/sdk/connections.ts b/lending/src/sdk/connections.ts index 9253cd633..9abd92e59 100644 --- a/lending/src/sdk/connections.ts +++ b/lending/src/sdk/connections.ts @@ -1,103 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { connectionsCreate } from "../funcs/connectionsCreate.js"; -import { connectionsDelete } from "../funcs/connectionsDelete.js"; -import { connectionsGet } from "../funcs/connectionsGet.js"; -import { connectionsList } from "../funcs/connectionsList.js"; -import { connectionsUnlink } from "../funcs/connectionsUnlink.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Connections extends ClientSDK { - /** - * List connections - * - * @remarks - * List the connections for a company. - */ - async list( - request: operations.ListConnectionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(connectionsList( - this, - request, - options, - )); - } - - /** - * Create connection - * - * @remarks - * Creates a connection for the company by providing a valid `platformKey`. - * - * Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. - */ - async create( - request: operations.CreateConnectionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(connectionsCreate( - this, - request, - options, - )); - } - - /** - * Get connection - * - * @remarks - * Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. - */ - async get( - request: operations.GetConnectionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(connectionsGet( - this, - request, - options, - )); - } - - /** - * Delete connection - * - * @remarks - * Revoke and remove a connection from a company. - * This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. - */ - async delete( - request: operations.DeleteConnectionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(connectionsDelete( - this, - request, - options, - )); - } - - /** - * Unlink connection - * - * @remarks - * This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. - */ - async unlink( - request: operations.UnlinkConnectionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(connectionsUnlink( - this, - request, - options, - )); - } -} +export { Connections } from "../apis/Connections"; diff --git a/lending/src/sdk/createoperations.ts b/lending/src/sdk/createoperations.ts index 04bf032c4..64c1b4ed8 100644 --- a/lending/src/sdk/createoperations.ts +++ b/lending/src/sdk/createoperations.ts @@ -1,46 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackCreateOperationsGet } from "../funcs/loanWritebackCreateOperationsGet.js"; -import { loanWritebackCreateOperationsList } from "../funcs/loanWritebackCreateOperationsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CreateOperations extends ClientSDK { - /** - * Get create operation - * - * @remarks - * Retrieve create operation. - */ - async get( - request: operations.GetCreateOperationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackCreateOperationsGet( - this, - request, - options, - )); - } - - /** - * List create operations - * - * @remarks - * List create operations. - */ - async list( - request: operations.ListCreateOperationsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackCreateOperationsList( - this, - request, - options, - )); - } -} +export { CreateOperations } from "../apis/CreateOperations"; diff --git a/lending/src/sdk/creditnotes.ts b/lending/src/sdk/creditnotes.ts index 63702d948..fe5c9d67b 100644 --- a/lending/src/sdk/creditnotes.ts +++ b/lending/src/sdk/creditnotes.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsReceivableCreditNotesGet } from "../funcs/accountsReceivableCreditNotesGet.js"; -import { accountsReceivableCreditNotesList } from "../funcs/accountsReceivableCreditNotesList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CreditNotes extends ClientSDK { - /** - * List credit notes - * - * @remarks - * The *List credit notes* endpoint returns a list of [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote) for a given company's connection. - * - * [Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingCreditNotesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableCreditNotesList( - this, - request, - options, - )); - } - - /** - * Get credit note - * - * @remarks - * The *Get credit note* endpoint returns a single credit note for a given creditNoteId. - * - * [Credit notes](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingCreditNoteRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableCreditNotesGet( - this, - request, - options, - )); - } -} +export { CreditNotes } from "../apis/CreditNotes"; diff --git a/lending/src/sdk/customers.ts b/lending/src/sdk/customers.ts index c6ab91ab9..354c7d1e5 100644 --- a/lending/src/sdk/customers.ts +++ b/lending/src/sdk/customers.ts @@ -1,114 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsReceivableCustomersDownloadAttachment } from "../funcs/accountsReceivableCustomersDownloadAttachment.js"; -import { accountsReceivableCustomersGet } from "../funcs/accountsReceivableCustomersGet.js"; -import { accountsReceivableCustomersGetAttachment } from "../funcs/accountsReceivableCustomersGetAttachment.js"; -import { accountsReceivableCustomersList } from "../funcs/accountsReceivableCustomersList.js"; -import { accountsReceivableCustomersListAttachments } from "../funcs/accountsReceivableCustomersListAttachments.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Customers extends ClientSDK { - /** - * List customers - * - * @remarks - * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/lending-api#/schemas/Customer) for a given company's connection. - * - * [Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingCustomersRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableCustomersList( - this, - request, - options, - )); - } - - /** - * Get customer - * - * @remarks - * The *Get customer* endpoint returns a single customer for a given customerId. - * - * [Customers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingCustomerRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableCustomersGet( - this, - request, - options, - )); - } - - /** - * List customer attachments - * - * @remarks - * The *List customer attachments* endpoint returns a list of attachments avialable to download for given `customerId`. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - */ - async listAttachments( - request: operations.ListAccountingCustomerAttachmentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableCustomersListAttachments( - this, - request, - options, - )); - } - - /** - * Get customer attachment - * - * @remarks - * The *Get customer attachment* endpoint returns a specific attachment for a given `customerId` and `attachmentId`. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - */ - async getAttachment( - request: operations.GetAccountingCustomerAttachmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableCustomersGetAttachment( - this, - request, - options, - )); - } - - /** - * Download customer attachment - * - * @remarks - * The *Download customer attachment* endpoint downloads a specific attachment for a given `customerId` and `attachmentId`. - * - * [Customers](https://docs.codat.io/lending-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - */ - async downloadAttachment( - request: operations.DownloadAccountingCustomerAttachmentRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(accountsReceivableCustomersDownloadAttachment( - this, - request, - options, - )); - } -} +export { Customers } from "../apis/Customers"; diff --git a/lending/src/sdk/dataintegrity.ts b/lending/src/sdk/dataintegrity.ts index 01603aabd..f10897b24 100644 --- a/lending/src/sdk/dataintegrity.ts +++ b/lending/src/sdk/dataintegrity.ts @@ -1,77 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { dataIntegrityDetails } from "../funcs/dataIntegrityDetails.js"; -import { dataIntegrityStatus } from "../funcs/dataIntegrityStatus.js"; -import { dataIntegritySummaries } from "../funcs/dataIntegritySummaries.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class DataIntegrity extends ClientSDK { - /** - * Get data integrity status - * - * @remarks - * The *Get data integrity status* endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/DataIntegrityStatus) for the company’s match results between the data type provided in the URL and other data types that Data Integrity uses to support matching. - * This endpoint helps you understand whether match data is available and, if so, how to usefully query it. - * - * The response tells you: - * - * - Whether match results are available. - * - When the results were generated, and their status. - * - The connection IDs, amounts, and dates involved to support useful querying. - */ - async status( - request: operations.GetDataIntegrityStatusRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(dataIntegrityStatus( - this, - request, - options, - )); - } - - /** - * Get data integrity summaries - * - * @remarks - * The *Get data integrity summary* endpoint returns a [summary](https://docs.codat.io/lending-api#/schemas/DataIntegritySummary) of match results for a given data type filtered by a query string in the [Codat query language](https://docs.codat.io/using-the-api/querying). - * - * For example, if you wanted to see summary match results only for transactions after 1 December 2020, you could include a query parameter of `query=date>2020-12-01`. - * - * The endpoint response includes only the summary results, not transactions. To view match data for transactions, use the [List data integrity details](https://docs.codat.io/lending-api#/operations/get-data-integrity-summaries) endpoint. - */ - async summaries( - request: operations.GetDataIntegritySummariesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(dataIntegritySummaries( - this, - request, - options, - )); - } - - /** - * List data integrity details - * - * @remarks - * The *List data integrity details* endpoint returns the match result record by record for a given data type, filtered based on a query string in the same way as summary results. - * - * The [details](https://docs.codat.io/lending-api#/schemas/DataIntegrityDetail) are paginated and support ordering, following the same conventions as our other data endpoints. - */ - async details( - request: operations.ListDataIntegrityDetailsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(dataIntegrityDetails( - this, - request, - options, - )); - } -} +export { DataIntegrity } from "../apis/DataIntegrity"; diff --git a/lending/src/sdk/directcosts.ts b/lending/src/sdk/directcosts.ts index b454ad373..cb6a626e6 100644 --- a/lending/src/sdk/directcosts.ts +++ b/lending/src/sdk/directcosts.ts @@ -1,114 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { transactionsDirectCostsDownloadAttachment } from "../funcs/transactionsDirectCostsDownloadAttachment.js"; -import { transactionsDirectCostsGet } from "../funcs/transactionsDirectCostsGet.js"; -import { transactionsDirectCostsGetAttachment } from "../funcs/transactionsDirectCostsGetAttachment.js"; -import { transactionsDirectCostsList } from "../funcs/transactionsDirectCostsList.js"; -import { transactionsDirectCostsListAttachments } from "../funcs/transactionsDirectCostsListAttachments.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class DirectCosts extends ClientSDK { - /** - * List direct costs - * - * @remarks - * The *List direct costs* endpoint returns a list of [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) for a given company's connection. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingDirectCostsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsDirectCostsList( - this, - request, - options, - )); - } - - /** - * Get direct cost - * - * @remarks - * The *Get direct cost* endpoint returns a single direct cost for a given directCostId. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingDirectCostRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsDirectCostsGet( - this, - request, - options, - )); - } - - /** - * Get direct cost attachment - * - * @remarks - * The *Get direct cost attachment* endpoint returns a specific attachment for a given `directCostId` and `attachmentId`. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - */ - async getAttachment( - request: operations.GetAccountingDirectCostAttachmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsDirectCostsGetAttachment( - this, - request, - options, - )); - } - - /** - * Download direct cost attachment - * - * @remarks - * The *Download direct cost attachment* endpoint downloads a specific attachment for a given `directCostId` and `attachmentId`. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - */ - async downloadAttachment( - request: operations.DownloadAccountingDirectCostAttachmentRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(transactionsDirectCostsDownloadAttachment( - this, - request, - options, - )); - } - - /** - * List direct cost attachments - * - * @remarks - * The *List direct cost attachments* endpoint returns a list of attachments available to download for given `directCostId`. - * - * [Direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost) are business expenses that don't impact Accounts Payable. - */ - async listAttachments( - request: operations.ListAccountingDirectCostAttachmentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsDirectCostsListAttachments( - this, - request, - options, - )); - } -} +export { DirectCosts } from "../apis/TransactionsDirectCosts"; diff --git a/lending/src/sdk/directincomes.ts b/lending/src/sdk/directincomes.ts index fec1600e2..d8ca060f1 100644 --- a/lending/src/sdk/directincomes.ts +++ b/lending/src/sdk/directincomes.ts @@ -1,114 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsReceivableDirectIncomesDownloadAttachment } from "../funcs/accountsReceivableDirectIncomesDownloadAttachment.js"; -import { accountsReceivableDirectIncomesGet } from "../funcs/accountsReceivableDirectIncomesGet.js"; -import { accountsReceivableDirectIncomesGetAttachment } from "../funcs/accountsReceivableDirectIncomesGetAttachment.js"; -import { accountsReceivableDirectIncomesList } from "../funcs/accountsReceivableDirectIncomesList.js"; -import { accountsReceivableDirectIncomesListAttachments } from "../funcs/accountsReceivableDirectIncomesListAttachments.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class DirectIncomes extends ClientSDK { - /** - * List direct incomes - * - * @remarks - * The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) for a given company's connection. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingDirectIncomesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableDirectIncomesList( - this, - request, - options, - )); - } - - /** - * Get direct income - * - * @remarks - * The *Get direct income* endpoint returns a single direct income for a given directIncomeId. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingDirectIncomeRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableDirectIncomesGet( - this, - request, - options, - )); - } - - /** - * Get direct income attachment - * - * @remarks - * The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - */ - async getAttachment( - request: operations.GetAccountingDirectIncomeAttachmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableDirectIncomesGetAttachment( - this, - request, - options, - )); - } - - /** - * Download direct income attachment - * - * @remarks - * The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - */ - async downloadAttachment( - request: operations.DownloadAccountingDirectIncomeAttachmentRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(accountsReceivableDirectIncomesDownloadAttachment( - this, - request, - options, - )); - } - - /** - * List direct income attachments - * - * @remarks - * The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`. - * - * [Direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome) are incomes received directly from the business' operations at the point of the sale. - */ - async listAttachments( - request: operations.ListAccountingDirectIncomeAttachmentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableDirectIncomesListAttachments( - this, - request, - options, - )); - } -} +export { DirectIncomes } from "../apis/DirectIncomes"; diff --git a/lending/src/sdk/disputes.ts b/lending/src/sdk/disputes.ts index e55c14928..7e50d95db 100644 --- a/lending/src/sdk/disputes.ts +++ b/lending/src/sdk/disputes.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesDisputesGet } from "../funcs/salesDisputesGet.js"; -import { salesDisputesList } from "../funcs/salesDisputesList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Disputes extends ClientSDK { - /** - * List disputes - * - * @remarks - * The *List disputes* endpoint returns a list of [disputes](https://docs.codat.io/lending-api#/schemas/Dispute) for a given company's connection. - * - * [Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommerceDisputesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesDisputesList( - this, - request, - options, - )); - } - - /** - * Get dispute - * - * @remarks - * The *Get dispute* endpoint returns a single dispute for a given disputeId. - * - * [Disputes](https://docs.codat.io/lending-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommerceDisputeRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesDisputesGet( - this, - request, - options, - )); - } -} +export { Disputes } from "../apis/Disputes"; diff --git a/lending/src/sdk/excelreports.ts b/lending/src/sdk/excelreports.ts index a68fd87ae..24deaa807 100644 --- a/lending/src/sdk/excelreports.ts +++ b/lending/src/sdk/excelreports.ts @@ -1,85 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { excelReportsDownload } from "../funcs/excelReportsDownload.js"; -import { excelReportsGenerate } from "../funcs/excelReportsGenerate.js"; -import { excelReportsGetStatus } from "../funcs/excelReportsGetStatus.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class ExcelReports extends ClientSDK { - /** - * Generate Excel report - * - * @remarks - * The *Generate Excel report* endpoint requests the production of a downloadable Excel file for a report type specified in the `reportType` query parameter. - * - * In response, the endpoint returns the [status](https://docs.codat.io/lending-api#/schemas/ExcelStatus) detailing the current state of the report generation request. - * - * ### Report types - * - * | reportType | Description | - * |--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| - * | `audit` | Identifies inaccurate or out-of-date accounts, helping you to make decisions with confidence. || [audit](https://docs.codat.io/lending/excel/audit-report) | Identify inaccurate or out-of-date accounts, helping you to make decisions with confidence. | - * | `enhancedCashFlow` | Provides a fully categorized list of bank transactions for a company, allowing lenders to accurately forecast a company's cash flow. | - * | `enhancedFinancials` | Supports decision-making using fully categorized financial statements to allow lenders to automate their underwriting processes. | - * | `enhancedInvoices` | Helps verify that payments have been made against historic invoices. Great for invoice finance lenders. | - * - * [Learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. - */ - async generate( - request: operations.GenerateExcelReportRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(excelReportsGenerate( - this, - request, - options, - )); - } - - /** - * Get Excel report status - * - * @remarks - * The *Get Excel report status* returns the status of the report mostly recently requested for Excel generation. It does not return the status of any historical report requests. - * - * Poll this endpoint to check the progress of the report once you have requested its generation. This will not affect the generation of the report. - * - * When the report generation completes successfully, the `inProgress` property will be marked as `false` and the `success` field will be marked as `true`. - */ - async getStatus( - request: operations.GetExcelReportGenerationStatusRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(excelReportsGetStatus( - this, - request, - options, - )); - } - - /** - * Download Excel report - * - * @remarks - * The *Download Excel report* endpoint downloads the latest successfully generated Excel report of a specified report type for a given company. - * - * The downloadable Excel file is returned in the response. You can save it to your local machine. - * - * You can [learn more](https://docs.codat.io/lending/features/excel-download-overview#feature-components) about valid Excel report types. - */ - async download( - request: operations.DownloadExcelReportRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(excelReportsDownload( - this, - request, - options, - )); - } -} +export { ExcelReports } from "../apis/ExcelReports"; diff --git a/lending/src/sdk/fileupload.ts b/lending/src/sdk/fileupload.ts index dd7fb5f19..ed02c3087 100644 --- a/lending/src/sdk/fileupload.ts +++ b/lending/src/sdk/fileupload.ts @@ -1,70 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { fileUploadDownload } from "../funcs/fileUploadDownload.js"; -import { fileUploadListUploaded } from "../funcs/fileUploadListUploaded.js"; -import { fileUploadUpload } from "../funcs/fileUploadUpload.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class FileUpload extends ClientSDK { - /** - * List all files uploaded by a company - * - * @remarks - * The *List files* endpoint returns a list of all files uploaded to Codat by the SMB. - */ - async listUploaded( - request: operations.ListFilesRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(fileUploadListUploaded( - this, - request, - options, - )); - } - - /** - * Download all files for a company - * - * @remarks - * The *Download files* endpoint downloads all files that have been uploaded by to SMB to Codat. A `date` may be specified to download any files uploaded on the date provided. - */ - async download( - request: operations.DownloadFilesRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(fileUploadDownload( - this, - request, - options, - )); - } - - /** - * Upload files for a company - * - * @remarks - * The *Upload files* endpoint uploads multiple files provided by the SMB to Codat. This may include personal identity documents, pitch decks, contracts, or files with accounting and banking data. - * - * Uploaded files must meet the following requirements: - * - * - Up to 20 files can be uploaded at a time. - * - PDF, XLS, XLSX, XLSB, CSV, DOC, DOCX, PPT, PPTX, JPEG, JPG, and PNG files can be uploaded. - * - Each file can be up to 10MB in size. - */ - async upload( - request: operations.UploadFilesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(fileUploadUpload( - this, - request, - options, - )); - } -} +export { FileUpload } from "../apis/FileUpload"; diff --git a/lending/src/sdk/financialstatements.ts b/lending/src/sdk/financialstatements.ts index 9b3240792..8ee733002 100644 --- a/lending/src/sdk/financialstatements.ts +++ b/lending/src/sdk/financialstatements.ts @@ -1,31 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ClientSDK } from "../lib/sdks.js"; -import { Accounts } from "./accounts.js"; -import { BalanceSheet } from "./balancesheet.js"; -import { CashFlow } from "./cashflow.js"; -import { ProfitAndLoss } from "./profitandloss.js"; - -export class FinancialStatements extends ClientSDK { - private _profitAndLoss?: ProfitAndLoss; - get profitAndLoss(): ProfitAndLoss { - return (this._profitAndLoss ??= new ProfitAndLoss(this._options)); - } - - private _balanceSheet?: BalanceSheet; - get balanceSheet(): BalanceSheet { - return (this._balanceSheet ??= new BalanceSheet(this._options)); - } - - private _accounts?: Accounts; - get accounts(): Accounts { - return (this._accounts ??= new Accounts(this._options)); - } - - private _cashFlow?: CashFlow; - get cashFlow(): CashFlow { - return (this._cashFlow ??= new CashFlow(this._options)); - } -} +export { FinancialStatements } from "../sdk"; diff --git a/lending/src/sdk/index.ts b/lending/src/sdk/index.ts index ecac22648..d28eeda9d 100644 --- a/lending/src/sdk/index.ts +++ b/lending/src/sdk/index.ts @@ -1,5 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -export * from "./sdk.js"; +export * from "./sdk"; diff --git a/lending/src/sdk/invoices.ts b/lending/src/sdk/invoices.ts index ec3465adc..881619a58 100644 --- a/lending/src/sdk/invoices.ts +++ b/lending/src/sdk/invoices.ts @@ -1,165 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsReceivableInvoicesDownloadAttachment } from "../funcs/accountsReceivableInvoicesDownloadAttachment.js"; -import { accountsReceivableInvoicesDownloadPdf } from "../funcs/accountsReceivableInvoicesDownloadPdf.js"; -import { accountsReceivableInvoicesGet } from "../funcs/accountsReceivableInvoicesGet.js"; -import { accountsReceivableInvoicesGetAttachment } from "../funcs/accountsReceivableInvoicesGetAttachment.js"; -import { accountsReceivableInvoicesList } from "../funcs/accountsReceivableInvoicesList.js"; -import { accountsReceivableInvoicesListAttachments } from "../funcs/accountsReceivableInvoicesListAttachments.js"; -import { accountsReceivableInvoicesListReconciled } from "../funcs/accountsReceivableInvoicesListReconciled.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Invoices extends ClientSDK { - /** - * List reconciled invoices - * - * @remarks - * Gets a list of invoices linked to the corresponding banking transaction - */ - async listReconciled( - request: operations.ListReconciledInvoicesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableInvoicesListReconciled( - this, - request, - options, - )); - } - - /** - * List invoices - * - * @remarks - * The *List invoices* endpoint returns a list of [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) for a given company's connection. - * - * [Invoices](https://docs.codat.io/lending-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/lending-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). - * - * ### Tips and traps - * - * To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat's cache. - */ - async list( - request: operations.ListAccountingInvoicesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableInvoicesList( - this, - request, - options, - )); - } - - /** - * Get invoice - * - * @remarks - * The *Get invoice* endpoint returns a single invoice for a given invoiceId. - * - * [Invoices](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - * - * ### Tips and traps - * - * To access the `paymentAllocations` property, ensure that the `payments` data type is queued and cached in Codat before retrieving `invoices` from Codat's cache. - */ - async get( - request: operations.GetAccountingInvoiceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableInvoicesGet( - this, - request, - options, - )); - } - - /** - * Get invoice as PDF - * - * @remarks - * Download invoice as a pdf. - */ - async downloadPdf( - request: operations.DownloadAccountingInvoicePdfRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(accountsReceivableInvoicesDownloadPdf( - this, - request, - options, - )); - } - - /** - * List invoice attachments - * - * @remarks - * The *List invoice attachments* endpoint returns a list of attachments available to download for given `invoiceId`. - * - * [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - */ - async listAttachments( - request: operations.ListAccountingInvoiceAttachmentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableInvoicesListAttachments( - this, - request, - options, - )); - } - - /** - * Get invoice attachment - * - * @remarks - * The *Get invoice attachment* endpoint returns a specific attachment for a given `invoiceId` and `attachmentId`. - * - * [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - */ - async getAttachment( - request: operations.GetAccountingInvoiceAttachmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivableInvoicesGetAttachment( - this, - request, - options, - )); - } - - /** - * Download invoice attachment - * - * @remarks - * The *Download invoice attachment* endpoint downloads a specific attachment for a given `invoiceId` and `attachmentId`. - * - * [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - */ - async downloadAttachment( - request: operations.DownloadAccountingInvoiceAttachmentRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(accountsReceivableInvoicesDownloadAttachment( - this, - request, - options, - )); - } -} +export { Invoices } from "../apis/Invoices"; diff --git a/lending/src/sdk/journalentries.ts b/lending/src/sdk/journalentries.ts index f4bbfc708..f73cbafb9 100644 --- a/lending/src/sdk/journalentries.ts +++ b/lending/src/sdk/journalentries.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { transactionsJournalEntriesGet } from "../funcs/transactionsJournalEntriesGet.js"; -import { transactionsJournalEntriesList } from "../funcs/transactionsJournalEntriesList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class JournalEntries extends ClientSDK { - /** - * List journal entries - * - * @remarks - * The *List journal entries* endpoint returns a list of [journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) for a given company's connection. - * - * [Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingJournalEntriesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsJournalEntriesList( - this, - request, - options, - )); - } - - /** - * Get journal entry - * - * @remarks - * The *Get journal entry* endpoint returns a single journal entry for a given journalEntryId. - * - * [Journal entries](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingJournalEntryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsJournalEntriesGet( - this, - request, - options, - )); - } -} +export { JournalEntries } from "../apis/JournalEntries"; diff --git a/lending/src/sdk/journals.ts b/lending/src/sdk/journals.ts index d9f3ce7a9..0c967785f 100644 --- a/lending/src/sdk/journals.ts +++ b/lending/src/sdk/journals.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { transactionsJournalsGet } from "../funcs/transactionsJournalsGet.js"; -import { transactionsJournalsList } from "../funcs/transactionsJournalsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Journals extends ClientSDK { - /** - * List journals - * - * @remarks - * The *List journals* endpoint returns a list of [journals](https://docs.codat.io/lending-api#/schemas/Journal) for a given company's connection. - * - * [Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingJournalsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsJournalsList( - this, - request, - options, - )); - } - - /** - * Get journal - * - * @remarks - * The *Get journal* endpoint returns a single journal for a given journalId. - * - * [Journals](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingJournalRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsJournalsGet( - this, - request, - options, - )); - } -} +export { Journals } from "../apis/Journals"; diff --git a/lending/src/sdk/liabilities.ts b/lending/src/sdk/liabilities.ts index aef4e3ff6..2d4bc5da3 100644 --- a/lending/src/sdk/liabilities.ts +++ b/lending/src/sdk/liabilities.ts @@ -1,98 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { liabilitiesGenerateLoanSummary } from "../funcs/liabilitiesGenerateLoanSummary.js"; -import { liabilitiesGenerateLoanTransactions } from "../funcs/liabilitiesGenerateLoanTransactions.js"; -import { liabilitiesGetLoanSummary } from "../funcs/liabilitiesGetLoanSummary.js"; -import { liabilitiesListLoanTransactions } from "../funcs/liabilitiesListLoanTransactions.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Liabilities extends ClientSDK { - /** - * Generate loan transactions report - * - * @remarks - * The _Generate loan transactions_ endpoint requests the generation of the Loan Transactions report. - * - * Learn more about Codat's liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). - * - * Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - */ - async generateLoanTransactions( - request: operations.GenerateLoanTransactionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(liabilitiesGenerateLoanTransactions( - this, - request, - options, - )); - } - - /** - * List loan transactions - * - * @remarks - * The *List loan transactions* endpoint returns all [loan transactions](https://docs.codat.io/lending-api#/schemas/LoanTransactions) identified from a company's accounting, banking, and commerce integrations. - * - * This detail gives analysts a better idea of the loan obligations a company may have. - * - * Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - */ - async listLoanTransactions( - request: operations.ListLoanTransactionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(liabilitiesListLoanTransactions( - this, - request, - options, - )); - } - - /** - * Generate loan summaries report - * - * @remarks - * The _Generate loan summaries_ endpoint requests the generation of the Loan Summaries report. - * - * Learn more about Codat's liabilities feature [here](https://docs.codat.io/lending/features/liabilities-overview). - * - * Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - */ - async generateLoanSummary( - request: operations.GenerateLoanSummaryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(liabilitiesGenerateLoanSummary( - this, - request, - options, - )); - } - - /** - * Get loan summaries - * - * @remarks - * The *Get loan summaries* endpoint returns a summary by integration type of all loans identified from a company's accounting, banking, and commerce integrations. - * - * The endpoint returns a list of a company's [loan summaries](https://docs.codat.io/lending-api#/schemas/LoanSummary) for each valid data connection. - * - * Make sure you have [synced a company](https://docs.codat.io/lending-api#/operations/refresh-company-data) recently before calling the endpoint. - */ - async getLoanSummary( - request: operations.GetLoanSummaryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(liabilitiesGetLoanSummary( - this, - request, - options, - )); - } -} +export { Liabilities } from "../apis/Liabilities"; diff --git a/lending/src/sdk/loanwriteback.ts b/lending/src/sdk/loanwriteback.ts index 87636abf1..ba7148a52 100644 --- a/lending/src/sdk/loanwriteback.ts +++ b/lending/src/sdk/loanwriteback.ts @@ -1,65 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ClientSDK } from "../lib/sdks.js"; -import { BankAccounts } from "./bankaccounts.js"; -import { BankTransactions } from "./banktransactions.js"; -import { CodatLendingDirectCosts } from "./codatlendingdirectcosts.js"; -import { CodatLendingLoanWritebackAccounts } from "./codatlendingloanwritebackaccounts.js"; -import { CodatLendingLoanWritebackPayments } from "./codatlendingloanwritebackpayments.js"; -import { CodatLendingSuppliers } from "./codatlendingsuppliers.js"; -import { CodatLendingTransfers } from "./codatlendingtransfers.js"; -import { CreateOperations } from "./createoperations.js"; -import { SourceAccounts } from "./sourceaccounts.js"; - -export class LoanWriteback extends ClientSDK { - private _bankAccounts?: BankAccounts; - get bankAccounts(): BankAccounts { - return (this._bankAccounts ??= new BankAccounts(this._options)); - } - - private _accounts?: CodatLendingLoanWritebackAccounts; - get accounts(): CodatLendingLoanWritebackAccounts { - return (this._accounts ??= new CodatLendingLoanWritebackAccounts( - this._options, - )); - } - - private _sourceAccounts?: SourceAccounts; - get sourceAccounts(): SourceAccounts { - return (this._sourceAccounts ??= new SourceAccounts(this._options)); - } - - private _suppliers?: CodatLendingSuppliers; - get suppliers(): CodatLendingSuppliers { - return (this._suppliers ??= new CodatLendingSuppliers(this._options)); - } - - private _transfers?: CodatLendingTransfers; - get transfers(): CodatLendingTransfers { - return (this._transfers ??= new CodatLendingTransfers(this._options)); - } - - private _bankTransactions?: BankTransactions; - get bankTransactions(): BankTransactions { - return (this._bankTransactions ??= new BankTransactions(this._options)); - } - - private _directCosts?: CodatLendingDirectCosts; - get directCosts(): CodatLendingDirectCosts { - return (this._directCosts ??= new CodatLendingDirectCosts(this._options)); - } - - private _payments?: CodatLendingLoanWritebackPayments; - get payments(): CodatLendingLoanWritebackPayments { - return (this._payments ??= new CodatLendingLoanWritebackPayments( - this._options, - )); - } - - private _createOperations?: CreateOperations; - get createOperations(): CreateOperations { - return (this._createOperations ??= new CreateOperations(this._options)); - } -} +export { LoanWriteback } from "../sdk"; diff --git a/lending/src/sdk/locations.ts b/lending/src/sdk/locations.ts index 7fa5bb7d8..9cc071c04 100644 --- a/lending/src/sdk/locations.ts +++ b/lending/src/sdk/locations.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesLocationsGet } from "../funcs/salesLocationsGet.js"; -import { salesLocationsList } from "../funcs/salesLocationsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Locations extends ClientSDK { - /** - * List locations - * - * @remarks - * The *List locations* endpoint returns a list of [locations](https://docs.codat.io/lending-api#/schemas/Location) for a given company's connection. - * - * [Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommerceLocationsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesLocationsList( - this, - request, - options, - )); - } - - /** - * Get location - * - * @remarks - * The *Get location* endpoint returns a single location for a given locationId. - * - * [Locations](https://docs.codat.io/lending-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/lending-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/lending-api#/schemas/Order) were placed. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommerceLocationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesLocationsGet( - this, - request, - options, - )); - } -} +export { Locations } from "../apis/Locations"; diff --git a/lending/src/sdk/managedata.ts b/lending/src/sdk/managedata.ts index fda8373b8..98026248d 100644 --- a/lending/src/sdk/managedata.ts +++ b/lending/src/sdk/managedata.ts @@ -1,39 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { manageDataGetStatus } from "../funcs/manageDataGetStatus.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import { PullOperations } from "./pulloperations.js"; -import { Refresh } from "./refresh.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class ManageData extends ClientSDK { - private _refresh?: Refresh; - get refresh(): Refresh { - return (this._refresh ??= new Refresh(this._options)); - } - - private _pullOperations?: PullOperations; - get pullOperations(): PullOperations { - return (this._pullOperations ??= new PullOperations(this._options)); - } - - /** - * Get data status - * - * @remarks - * Get the state of each data type for a company - */ - async getStatus( - request: operations.GetDataStatusRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(manageDataGetStatus( - this, - request, - options, - )); - } -} +export { ManageData } from "../apis/ManageData"; diff --git a/lending/src/sdk/managereports.ts b/lending/src/sdk/managereports.ts index b6b7cd48c..b74cf5617 100644 --- a/lending/src/sdk/managereports.ts +++ b/lending/src/sdk/managereports.ts @@ -1,48 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { manageReportsGenerateReport } from "../funcs/manageReportsGenerateReport.js"; -import { manageReportsListReports } from "../funcs/manageReportsListReports.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class ManageReports extends ClientSDK { - /** - * Generate report - * - * @remarks - * Use the *Generate report* endpoint to initiate the generation of a report specified by the `reportType` parameter. - * - * This action triggers the system to refresh and pull the necessary data from the company's data sources to ensure the report contains the most up-to-date information. - */ - async generateReport( - request: operations.GenerateReportRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(manageReportsGenerateReport( - this, - request, - options, - )); - } - - /** - * List reports - * - * @remarks - * Use the *List reports* endpoint to return details (such as generation's current status, date of request, and date of generation) about all reports generated for a company. The query parameter can be used to filter the results. - */ - async listReports( - request: operations.ListReportsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(manageReportsListReports( - this, - request, - options, - )); - } -} +export { ManageReports } from "../apis/ManageReports"; diff --git a/lending/src/sdk/metrics.ts b/lending/src/sdk/metrics.ts index 43233a645..1d2232c80 100644 --- a/lending/src/sdk/metrics.ts +++ b/lending/src/sdk/metrics.ts @@ -1,131 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesMetricsGetCustomerRetention } from "../funcs/salesMetricsGetCustomerRetention.js"; -import { salesMetricsGetLifetimeValue } from "../funcs/salesMetricsGetLifetimeValue.js"; -import { salesMetricsGetRevenue } from "../funcs/salesMetricsGetRevenue.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Metrics extends ClientSDK { - /** - * Get commerce revenue metrics - * - * @remarks - * The *Get revenue report* endpoint returns the revenue and revenue growth for a specific company connection over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the revenue metrics. - * - * #### Response structure - * - * The Revenue report's dimensions and measures are: - * - * | Index | Dimensions | - * |---------------|------------| - * | `index` = 0 | Period | - * | `index` = 1 | Revenue | - * - * | Index | Measures | - * |---------------|--------------------------------------------------------------------------------------------------------------------------| - * | `index` = 0 | Value | - * | `index` = 1 | Percentage change, defined as the change between the current and previous periods' values and expressed as a percentage. | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ - async getRevenue( - request: operations.GetCommerceRevenueMetricsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesMetricsGetRevenue( - this, - request, - options, - )); - } - - /** - * Get customer retention metrics - * - * @remarks - * The *Get customer retention metrics* endpoint returns customer retention insights for a specific company's commerce connection over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * #### Customer retention metrics - * - * - __Existing customers__: the number of unique customers that have placed an order(s) in the specified period and any previous period. - * - __New customers__: the number of unique customers that have placed an order(s) in the specified period and none in any previous period. - * - __Total customers__: the total number of existing and new customers within the specified period. - * - __Retention rate__: the ratio of existing customers within the specified period compared to the total customers at the end of the previous period represented as a percentage. - * - __Repeat rate__: the ratio of existing customers to total customers over the specified period represented as a percentage. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate customer retention metrics. - * - * #### Response structure - * - * The Customer retention report's dimensions and measures are: - * - * | Index | Dimensions | - * |-----------------------------|----------------------------| - * | `index` = 0 | Period | - * | `index` = 1 | Customer retention metrics | - * - * | Index | Measures | - * |----------------------|------------| - * | `index` = 0 | Count | - * | `index` = 1 | Percentage | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ - async getCustomerRetention( - request: operations.GetCommerceCustomerRetentionMetricsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesMetricsGetCustomerRetention( - this, - request, - options, - )); - } - - /** - * Get lifetime value metrics - * - * @remarks - * The *Get lifetime value metrics* endpoint returns the average revenue that a specific company will generate throughout its lifespan over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the lifetime value metrics. - * - * #### Response structure - * - * The Lifetime value report's dimensions and measures are: - * - * | Index | Dimensions | - * |---------------|------------------------| - * | `index` = 0 | Period | - * | `index` = 1 | Lifetime value metrics | - * - * | Index | Measures | - * |-------------------|---------| - * | `index` = 1 | Value | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ - async getLifetimeValue( - request: operations.GetCommerceLifetimeValueMetricsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesMetricsGetLifetimeValue( - this, - request, - options, - )); - } -} +export { Metrics } from "../apis/Metrics"; diff --git a/lending/src/sdk/models/Account.ts b/lending/src/sdk/models/Account.ts new file mode 100644 index 000000000..2634b36da --- /dev/null +++ b/lending/src/sdk/models/Account.ts @@ -0,0 +1,340 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +import type { AccountIdentifiers } from './shared/accountidentifiers'; +import { + AccountIdentifiersFromJSON, + AccountIdentifiersFromJSONTyped, + AccountIdentifiersToJSON, + AccountIdentifiersToJSONTyped, +} from './shared/accountidentifiers'; +import type { SourceRef } from './shared/sourceref'; +import { + SourceRefFromJSON, + SourceRefFromJSONTyped, + SourceRefToJSON, + SourceRefToJSONTyped, +} from './shared/sourceref'; + +/** + * + * @export + * @interface Account + */ +export interface Account { + /** + * The ID of the account from the provider. + * @type {string} + * @memberof Account + */ + id?: string; + /** + * + * @type {SourceRef} + * @memberof Account + */ + sourceRef?: SourceRef; + /** + * Name of the banking data source, e.g. "Plaid". + * @type {string} + * @memberof Account + */ + platformName?: string; + /** + * The bank or other financial institution providing the account. + * @type {string} + * @memberof Account + */ + accountProvider?: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof Account + */ + accountName?: string; + /** + * The type of banking account, e.g. credit or debit. + * @type {string} + * @memberof Account + */ + accountType?: string; + /** + * 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. + * @type {string} + * @memberof Account + */ + currency?: string; + /** + * The balance of the bank account. + * @type {string} + * @memberof Account + */ + currentBalance?: Decimal | number; + /** + * + * @type {AccountIdentifiers} + * @memberof Account + */ + identifiers?: AccountIdentifiers; +} + +/** + * Check if a given object implements the Account interface. + */ +export function instanceOfAccount(value: object): value is Account { + return true; +} + +export function AccountFromJSON(json: any): Account { + return AccountFromJSONTyped(json, false); +} + +export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Account { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'sourceRef': json['sourceRef'] == null ? undefined : SourceRefFromJSON(json['sourceRef']), + 'platformName': json['platformName'] == null ? undefined : json['platformName'], + 'accountProvider': json['accountProvider'] == null ? undefined : json['accountProvider'], + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'accountType': json['accountType'] == null ? undefined : json['accountType'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currentBalance': json['currentBalance'] == null ? undefined : toDecimal(json['currentBalance']), + 'identifiers': json['identifiers'] == null ? undefined : AccountIdentifiersFromJSON(json['identifiers']), + }; +} + +export function AccountToJSON(json: any): Account { + return AccountToJSONTyped(json, false); +} + +export function AccountToJSONTyped(value?: Account | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'sourceRef': SourceRefToJSON(value['sourceRef']), + 'platformName': value['platformName'], + 'accountProvider': value['accountProvider'], + 'accountName': value['accountName'], + 'accountType': value['accountType'], + 'currency': value['currency'], + 'currentBalance': fromDecimal(value['currentBalance']), + 'identifiers': AccountIdentifiersToJSON(value['identifiers']), + }; +} + + +export interface CategorizedBankStatementAccountsAccount { + /** + * The ID of the account from the provider. + * @type {string} + * @memberof Account + */ + id?: string; + /** + * + * @type {SourceRef} + * @memberof Account + */ + sourceRef?: SourceRef; + /** + * Name of the banking data source, e.g. "Plaid". + * @type {string} + * @memberof Account + */ + platformName?: string; + /** + * The bank or other financial institution providing the account. + * @type {string} + * @memberof Account + */ + accountProvider?: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof Account + */ + accountName?: string; + /** + * The type of banking account, e.g. credit or debit. + * @type {string} + * @memberof Account + */ + accountType?: string; + /** + * 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. + * @type {string} + * @memberof Account + */ + currency?: string; + /** + * The balance of the bank account. + * @type {string} + * @memberof Account + */ + currentBalance?: Decimal | number; + /** + * + * @type {AccountIdentifiers} + * @memberof Account + */ + identifiers?: AccountIdentifiers; +} + +export interface CategorizedBankStatementAccountsListResponseAccount { + /** + * The ID of the account from the provider. + * @type {string} + * @memberof Account + */ + id?: string; + /** + * + * @type {SourceRef} + * @memberof Account + */ + sourceRef?: SourceRef; + /** + * Name of the banking data source, e.g. "Plaid". + * @type {string} + * @memberof Account + */ + platformName?: string; + /** + * The bank or other financial institution providing the account. + * @type {string} + * @memberof Account + */ + accountProvider?: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof Account + */ + accountName?: string; + /** + * The type of banking account, e.g. credit or debit. + * @type {string} + * @memberof Account + */ + accountType?: string; + /** + * 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. + * @type {string} + * @memberof Account + */ + currency?: string; + /** + * The balance of the bank account. + * @type {string} + * @memberof Account + */ + currentBalance?: Decimal | number; + /** + * + * @type {AccountIdentifiers} + * @memberof Account + */ + identifiers?: AccountIdentifiers; +} + +export interface ListCategorizedBankStatementAccountsResponseAccount { + /** + * The ID of the account from the provider. + * @type {string} + * @memberof Account + */ + id?: string; + /** + * + * @type {SourceRef} + * @memberof Account + */ + sourceRef?: SourceRef; + /** + * Name of the banking data source, e.g. "Plaid". + * @type {string} + * @memberof Account + */ + platformName?: string; + /** + * The bank or other financial institution providing the account. + * @type {string} + * @memberof Account + */ + accountProvider?: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof Account + */ + accountName?: string; + /** + * The type of banking account, e.g. credit or debit. + * @type {string} + * @memberof Account + */ + accountType?: string; + /** + * 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. + * @type {string} + * @memberof Account + */ + currency?: string; + /** + * The balance of the bank account. + * @type {string} + * @memberof Account + */ + currentBalance?: Decimal | number; + /** + * + * @type {AccountIdentifiers} + * @memberof Account + */ + identifiers?: AccountIdentifiers; +} diff --git a/lending/src/sdk/models/AccountingBillPaymentAllOfPaymentMethodRef.ts b/lending/src/sdk/models/AccountingBillPaymentAllOfPaymentMethodRef.ts new file mode 100644 index 000000000..1483d8c5f --- /dev/null +++ b/lending/src/sdk/models/AccountingBillPaymentAllOfPaymentMethodRef.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * + * @export + * @interface AccountingBillPaymentAllOfPaymentMethodRef + */ +export interface AccountingBillPaymentAllOfPaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof AccountingBillPaymentAllOfPaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof AccountingBillPaymentAllOfPaymentMethodRef + */ + name?: string; +} + +/** + * Check if a given object implements the AccountingBillPaymentAllOfPaymentMethodRef interface. + */ +export function instanceOfAccountingBillPaymentAllOfPaymentMethodRef(value: object): value is AccountingBillPaymentAllOfPaymentMethodRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function AccountingBillPaymentAllOfPaymentMethodRefFromJSON(json: any): AccountingBillPaymentAllOfPaymentMethodRef { + return AccountingBillPaymentAllOfPaymentMethodRefFromJSONTyped(json, false); +} + +export function AccountingBillPaymentAllOfPaymentMethodRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBillPaymentAllOfPaymentMethodRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function AccountingBillPaymentAllOfPaymentMethodRefToJSON(json: any): AccountingBillPaymentAllOfPaymentMethodRef { + return AccountingBillPaymentAllOfPaymentMethodRefToJSONTyped(json, false); +} + +export function AccountingBillPaymentAllOfPaymentMethodRefToJSONTyped(value?: AccountingBillPaymentAllOfPaymentMethodRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + diff --git a/lending/src/sdk/models/AccountingBillPaymentAllOfSupplierRef.ts b/lending/src/sdk/models/AccountingBillPaymentAllOfSupplierRef.ts new file mode 100644 index 000000000..0a5456864 --- /dev/null +++ b/lending/src/sdk/models/AccountingBillPaymentAllOfSupplierRef.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * + * @export + * @interface AccountingBillPaymentAllOfSupplierRef + */ +export interface AccountingBillPaymentAllOfSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof AccountingBillPaymentAllOfSupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof AccountingBillPaymentAllOfSupplierRef + */ + supplierName?: string; +} + +/** + * Check if a given object implements the AccountingBillPaymentAllOfSupplierRef interface. + */ +export function instanceOfAccountingBillPaymentAllOfSupplierRef(value: object): value is AccountingBillPaymentAllOfSupplierRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function AccountingBillPaymentAllOfSupplierRefFromJSON(json: any): AccountingBillPaymentAllOfSupplierRef { + return AccountingBillPaymentAllOfSupplierRefFromJSONTyped(json, false); +} + +export function AccountingBillPaymentAllOfSupplierRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBillPaymentAllOfSupplierRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'supplierName': json['supplierName'] == null ? undefined : json['supplierName'], + }; +} + +export function AccountingBillPaymentAllOfSupplierRefToJSON(json: any): AccountingBillPaymentAllOfSupplierRef { + return AccountingBillPaymentAllOfSupplierRefToJSONTyped(json, false); +} + +export function AccountingBillPaymentAllOfSupplierRefToJSONTyped(value?: AccountingBillPaymentAllOfSupplierRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'supplierName': value['supplierName'], + }; +} + diff --git a/lending/src/sdk/models/AccountingCreateAccountResponseAllOfData.ts b/lending/src/sdk/models/AccountingCreateAccountResponseAllOfData.ts new file mode 100644 index 000000000..9346af1c3 --- /dev/null +++ b/lending/src/sdk/models/AccountingCreateAccountResponseAllOfData.ts @@ -0,0 +1,243 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { AccountType } from './_speakeasy_enums'; +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +import type { AccountStatus } from './shared/accountstatus'; +import { + AccountStatusFromJSON, + AccountStatusFromJSONTyped, + AccountStatusToJSON, + AccountStatusToJSONTyped, +} from './shared/accountstatus'; +import type { SupplementalData } from './shared/supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './shared/supplementaldata'; +import type { Metadata } from './shared/metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './shared/metadata'; +import type { ValidDataTypeLinks } from './shared/validdatatypelinks'; +import { + ValidDataTypeLinksFromJSON, + ValidDataTypeLinksFromJSONTyped, + ValidDataTypeLinksToJSON, + ValidDataTypeLinksToJSONTyped, +} from './shared/validdatatypelinks'; + +/** + * + * @export + * @interface AccountingCreateAccountResponseAllOfData + */ +export interface AccountingCreateAccountResponseAllOfData { + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + id?: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + type?: AccountType; + /** + * + * @type {AccountStatus} + * @memberof AccountingCreateAccountResponseAllOfData + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingCreateAccountResponseAllOfData + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingCreateAccountResponseAllOfData + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreateAccountResponseAllOfData + */ + supplementalData?: SupplementalData; + /** + * + * @type {Metadata} + * @memberof AccountingCreateAccountResponseAllOfData + */ + metadata?: Metadata; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateAccountResponseAllOfData + */ + sourceModifiedDate?: string; +} + + + +/** + * Check if a given object implements the AccountingCreateAccountResponseAllOfData interface. + */ +export function instanceOfAccountingCreateAccountResponseAllOfData(value: object): value is AccountingCreateAccountResponseAllOfData { + return true; +} + +export function AccountingCreateAccountResponseAllOfDataFromJSON(json: any): AccountingCreateAccountResponseAllOfData { + return AccountingCreateAccountResponseAllOfDataFromJSONTyped(json, false); +} + +export function AccountingCreateAccountResponseAllOfDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateAccountResponseAllOfData { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'nominalCode': json['nominalCode'] == null ? undefined : json['nominalCode'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'fullyQualifiedCategory': json['fullyQualifiedCategory'] == null ? undefined : json['fullyQualifiedCategory'], + 'fullyQualifiedName': json['fullyQualifiedName'] == null ? undefined : json['fullyQualifiedName'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currentBalance': json['currentBalance'] == null ? undefined : toDecimal(json['currentBalance']), + 'type': json['type'] == null ? undefined : json['type'], + 'status': json['status'] == null ? undefined : AccountStatusFromJSON(json['status']), + 'isBankAccount': json['isBankAccount'] == null ? undefined : json['isBankAccount'], + 'validDatatypeLinks': json['validDatatypeLinks'] == null ? undefined : ((json['validDatatypeLinks'] as Array).map(ValidDataTypeLinksFromJSON)), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function AccountingCreateAccountResponseAllOfDataToJSON(json: any): AccountingCreateAccountResponseAllOfData { + return AccountingCreateAccountResponseAllOfDataToJSONTyped(json, false); +} + +export function AccountingCreateAccountResponseAllOfDataToJSONTyped(value?: AccountingCreateAccountResponseAllOfData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'nominalCode': value['nominalCode'], + 'name': value['name'], + 'description': value['description'], + 'fullyQualifiedCategory': value['fullyQualifiedCategory'], + 'fullyQualifiedName': value['fullyQualifiedName'], + 'currency': value['currency'], + 'currentBalance': fromDecimal(value['currentBalance']), + 'type': value['type'], + 'status': AccountStatusToJSON(value['status']), + 'isBankAccount': value['isBankAccount'], + 'validDatatypeLinks': value['validDatatypeLinks'] == null ? undefined : ((value['validDatatypeLinks'] as Array).map(ValidDataTypeLinksToJSON)), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'metadata': MetadataToJSON(value['metadata']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + diff --git a/lending/src/sdk/models/AccountingCreateBankAccountResponseAllOfData.ts b/lending/src/sdk/models/AccountingCreateBankAccountResponseAllOfData.ts new file mode 100644 index 000000000..1e30c4a69 --- /dev/null +++ b/lending/src/sdk/models/AccountingCreateBankAccountResponseAllOfData.ts @@ -0,0 +1,256 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +import type { AccountingBankAccountType } from './shared/accountingbankaccounttype'; +import { + AccountingBankAccountTypeFromJSON, + AccountingBankAccountTypeFromJSONTyped, + AccountingBankAccountTypeToJSON, + AccountingBankAccountTypeToJSONTyped, +} from './shared/accountingbankaccounttype'; +import type { SupplementalData } from './shared/supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './shared/supplementaldata'; +import type { Metadata } from './shared/metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './shared/metadata'; +import type { BankAccountStatus } from './shared/bankaccountstatus'; +import { + BankAccountStatusFromJSON, + BankAccountStatusFromJSONTyped, + BankAccountStatusToJSON, + BankAccountStatusToJSONTyped, +} from './shared/bankaccountstatus'; + +/** + * + * @export + * @interface AccountingCreateBankAccountResponseAllOfData + */ +export interface AccountingCreateBankAccountResponseAllOfData { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + id?: string; + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + status?: BankAccountStatus; + /** + * + * @type {Metadata} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateBankAccountResponseAllOfData + */ + sourceModifiedDate?: string; +} + + + +/** + * Check if a given object implements the AccountingCreateBankAccountResponseAllOfData interface. + */ +export function instanceOfAccountingCreateBankAccountResponseAllOfData(value: object): value is AccountingCreateBankAccountResponseAllOfData { + return true; +} + +export function AccountingCreateBankAccountResponseAllOfDataFromJSON(json: any): AccountingCreateBankAccountResponseAllOfData { + return AccountingCreateBankAccountResponseAllOfDataFromJSONTyped(json, false); +} + +export function AccountingCreateBankAccountResponseAllOfDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateBankAccountResponseAllOfData { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'accountType': json['accountType'] == null ? undefined : AccountingBankAccountTypeFromJSON(json['accountType']), + 'nominalCode': json['nominalCode'] == null ? undefined : json['nominalCode'], + 'sortCode': json['sortCode'] == null ? undefined : json['sortCode'], + 'accountNumber': json['accountNumber'] == null ? undefined : json['accountNumber'], + 'iBan': json['iBan'] == null ? undefined : json['iBan'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'institution': json['institution'] == null ? undefined : json['institution'], + 'availableBalance': json['availableBalance'] == null ? undefined : toDecimal(json['availableBalance']), + 'overdraftLimit': json['overdraftLimit'] == null ? undefined : toDecimal(json['overdraftLimit']), + 'status': json['status'] == null ? undefined : BankAccountStatusFromJSON(json['status']), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function AccountingCreateBankAccountResponseAllOfDataToJSON(json: any): AccountingCreateBankAccountResponseAllOfData { + return AccountingCreateBankAccountResponseAllOfDataToJSONTyped(json, false); +} + +export function AccountingCreateBankAccountResponseAllOfDataToJSONTyped(value?: AccountingCreateBankAccountResponseAllOfData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'accountName': value['accountName'], + 'accountType': AccountingBankAccountTypeToJSON(value['accountType']), + 'nominalCode': value['nominalCode'], + 'sortCode': value['sortCode'], + 'accountNumber': value['accountNumber'], + 'iBan': value['iBan'], + 'currency': value['currency'], + 'balance': fromDecimal(value['balance']), + 'institution': value['institution'], + 'availableBalance': fromDecimal(value['availableBalance']), + 'overdraftLimit': fromDecimal(value['overdraftLimit']), + 'status': BankAccountStatusToJSON(value['status']), + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + diff --git a/lending/src/sdk/models/AccountingCreateBankTransactionsResponseAllOfData.ts b/lending/src/sdk/models/AccountingCreateBankTransactionsResponseAllOfData.ts new file mode 100644 index 000000000..369d0120a --- /dev/null +++ b/lending/src/sdk/models/AccountingCreateBankTransactionsResponseAllOfData.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { CreateBankAccountTransaction } from './shared/createbankaccounttransaction'; +import { + CreateBankAccountTransactionFromJSON, + CreateBankAccountTransactionFromJSONTyped, + CreateBankAccountTransactionToJSON, + CreateBankAccountTransactionToJSONTyped, +} from './shared/createbankaccounttransaction'; + +/** + * + * @export + * @interface AccountingCreateBankTransactionsResponseAllOfData + */ +export interface AccountingCreateBankTransactionsResponseAllOfData { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponseAllOfData + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactionsResponseAllOfData + */ + transactions?: Array; +} + +/** + * Check if a given object implements the AccountingCreateBankTransactionsResponseAllOfData interface. + */ +export function instanceOfAccountingCreateBankTransactionsResponseAllOfData(value: object): value is AccountingCreateBankTransactionsResponseAllOfData { + return true; +} + +export function AccountingCreateBankTransactionsResponseAllOfDataFromJSON(json: any): AccountingCreateBankTransactionsResponseAllOfData { + return AccountingCreateBankTransactionsResponseAllOfDataFromJSONTyped(json, false); +} + +export function AccountingCreateBankTransactionsResponseAllOfDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateBankTransactionsResponseAllOfData { + if (json == null) { + return json; + } + return { + + 'accountId': json['accountId'] == null ? undefined : json['accountId'], + 'transactions': json['transactions'] == null ? undefined : ((json['transactions'] as Array).map(CreateBankAccountTransactionFromJSON)), + }; +} + +export function AccountingCreateBankTransactionsResponseAllOfDataToJSON(json: any): AccountingCreateBankTransactionsResponseAllOfData { + return AccountingCreateBankTransactionsResponseAllOfDataToJSONTyped(json, false); +} + +export function AccountingCreateBankTransactionsResponseAllOfDataToJSONTyped(value?: AccountingCreateBankTransactionsResponseAllOfData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'accountId': value['accountId'], + 'transactions': value['transactions'] == null ? undefined : ((value['transactions'] as Array).map(CreateBankAccountTransactionToJSON)), + }; +} + diff --git a/lending/src/sdk/models/AccountingCreateDirectCostResponseAllOfData.ts b/lending/src/sdk/models/AccountingCreateDirectCostResponseAllOfData.ts new file mode 100644 index 000000000..9066b1ee8 --- /dev/null +++ b/lending/src/sdk/models/AccountingCreateDirectCostResponseAllOfData.ts @@ -0,0 +1,298 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +import type { DirectCostLineItem } from './shared/directcostlineitem'; +import { + DirectCostLineItemFromJSON, + DirectCostLineItemFromJSONTyped, + DirectCostLineItemToJSON, + DirectCostLineItemToJSONTyped, +} from './shared/directcostlineitem'; +import type { SupplementalData } from './shared/supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './shared/supplementaldata'; +import type { Metadata } from './shared/metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './shared/metadata'; +import type { ContactRef } from './shared/contactref'; +import { + ContactRefFromJSON, + ContactRefFromJSONTyped, + ContactRefToJSON, + ContactRefToJSONTyped, +} from './shared/contactref'; +import type { AccountingPaymentAllocation } from './shared/accountingpaymentallocation'; +import { + AccountingPaymentAllocationFromJSON, + AccountingPaymentAllocationFromJSONTyped, + AccountingPaymentAllocationToJSON, + AccountingPaymentAllocationToJSONTyped, +} from './shared/accountingpaymentallocation'; + +/** + * + * @export + * @interface AccountingCreateDirectCostResponseAllOfData + */ +export interface AccountingCreateDirectCostResponseAllOfData { + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + id?: string; + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + supplementalData?: SupplementalData; + /** + * + * @type {Metadata} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + metadata?: Metadata; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateDirectCostResponseAllOfData + */ + sourceModifiedDate?: string; +} + +/** + * Check if a given object implements the AccountingCreateDirectCostResponseAllOfData interface. + */ +export function instanceOfAccountingCreateDirectCostResponseAllOfData(value: object): value is AccountingCreateDirectCostResponseAllOfData { + if (!('issueDate' in value) || value['issueDate'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + if (!('lineItems' in value) || value['lineItems'] === undefined) return false; + if (!('paymentAllocations' in value) || value['paymentAllocations'] === undefined) return false; + if (!('subTotal' in value) || value['subTotal'] === undefined) return false; + if (!('taxAmount' in value) || value['taxAmount'] === undefined) return false; + if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false; + return true; +} + +export function AccountingCreateDirectCostResponseAllOfDataFromJSON(json: any): AccountingCreateDirectCostResponseAllOfData { + return AccountingCreateDirectCostResponseAllOfDataFromJSONTyped(json, false); +} + +export function AccountingCreateDirectCostResponseAllOfDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateDirectCostResponseAllOfData { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'reference': json['reference'] == null ? undefined : json['reference'], + 'note': json['note'] == null ? undefined : json['note'], + 'contactRef': json['contactRef'] == null ? undefined : ContactRefFromJSON(json['contactRef']), + 'issueDate': json['issueDate'], + 'currency': json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lineItems': ((json['lineItems'] as Array).map(DirectCostLineItemFromJSON)), + 'paymentAllocations': ((json['paymentAllocations'] as Array).map(AccountingPaymentAllocationFromJSON)), + 'subTotal': json['subTotal'], + 'taxAmount': json['taxAmount'], + 'totalAmount': json['totalAmount'], + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function AccountingCreateDirectCostResponseAllOfDataToJSON(json: any): AccountingCreateDirectCostResponseAllOfData { + return AccountingCreateDirectCostResponseAllOfDataToJSONTyped(json, false); +} + +export function AccountingCreateDirectCostResponseAllOfDataToJSONTyped(value?: AccountingCreateDirectCostResponseAllOfData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'reference': value['reference'], + 'note': value['note'], + 'contactRef': ContactRefToJSON(value['contactRef']), + 'issueDate': value['issueDate'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lineItems': ((value['lineItems'] as Array).map(DirectCostLineItemToJSON)), + 'paymentAllocations': ((value['paymentAllocations'] as Array).map(AccountingPaymentAllocationToJSON)), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'metadata': MetadataToJSON(value['metadata']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + diff --git a/lending/src/sdk/models/AccountingCreatePaymentResponseAllOfData.ts b/lending/src/sdk/models/AccountingCreatePaymentResponseAllOfData.ts new file mode 100644 index 000000000..d9827d8eb --- /dev/null +++ b/lending/src/sdk/models/AccountingCreatePaymentResponseAllOfData.ts @@ -0,0 +1,291 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +import type { AccountingCustomerRef } from './shared/accountingcustomerref'; +import { + AccountingCustomerRefFromJSON, + AccountingCustomerRefFromJSONTyped, + AccountingCustomerRefToJSON, + AccountingCustomerRefToJSONTyped, +} from './shared/accountingcustomerref'; +import type { SupplementalData } from './shared/supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './shared/supplementaldata'; +import type { PaymentMethodRef } from './shared/paymentmethodref'; +import { + PaymentMethodRefFromJSON, + PaymentMethodRefFromJSONTyped, + PaymentMethodRefToJSON, + PaymentMethodRefToJSONTyped, +} from './shared/paymentmethodref'; +import type { Metadata } from './shared/metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './shared/metadata'; +import type { AccountRef } from './shared/accountref'; +import { + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './shared/accountref'; +import type { PaymentLine } from './shared/paymentline'; +import { + PaymentLineFromJSON, + PaymentLineFromJSONTyped, + PaymentLineToJSON, + PaymentLineToJSONTyped, +} from './shared/paymentline'; + +/** + * + * @export + * @interface AccountingCreatePaymentResponseAllOfData + */ +export interface AccountingCreatePaymentResponseAllOfData { + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreatePaymentResponseAllOfData + */ + sourceModifiedDate?: string; +} + +/** + * Check if a given object implements the AccountingCreatePaymentResponseAllOfData interface. + */ +export function instanceOfAccountingCreatePaymentResponseAllOfData(value: object): value is AccountingCreatePaymentResponseAllOfData { + if (!('date' in value) || value['date'] === undefined) return false; + return true; +} + +export function AccountingCreatePaymentResponseAllOfDataFromJSON(json: any): AccountingCreatePaymentResponseAllOfData { + return AccountingCreatePaymentResponseAllOfDataFromJSONTyped(json, false); +} + +export function AccountingCreatePaymentResponseAllOfDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreatePaymentResponseAllOfData { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'customerRef': json['customerRef'] == null ? undefined : AccountingCustomerRefFromJSON(json['customerRef']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'paymentMethodRef': json['paymentMethodRef'] == null ? undefined : PaymentMethodRefFromJSON(json['paymentMethodRef']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'date': json['date'], + 'note': json['note'] == null ? undefined : json['note'], + 'lines': json['lines'] == null ? undefined : ((json['lines'] as Array).map(PaymentLineFromJSON)), + 'reference': json['reference'] == null ? undefined : json['reference'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function AccountingCreatePaymentResponseAllOfDataToJSON(json: any): AccountingCreatePaymentResponseAllOfData { + return AccountingCreatePaymentResponseAllOfDataToJSONTyped(json, false); +} + +export function AccountingCreatePaymentResponseAllOfDataToJSONTyped(value?: AccountingCreatePaymentResponseAllOfData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'customerRef': AccountingCustomerRefToJSON(value['customerRef']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'paymentMethodRef': PaymentMethodRefToJSON(value['paymentMethodRef']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'date': value['date'], + 'note': value['note'], + 'lines': value['lines'] == null ? undefined : ((value['lines'] as Array).map(PaymentLineToJSON)), + 'reference': value['reference'], + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + diff --git a/lending/src/sdk/models/AccountingCreateSupplierResponseAllOfData.ts b/lending/src/sdk/models/AccountingCreateSupplierResponseAllOfData.ts new file mode 100644 index 000000000..1d5498ae0 --- /dev/null +++ b/lending/src/sdk/models/AccountingCreateSupplierResponseAllOfData.ts @@ -0,0 +1,215 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { SupplierStatus } from './shared/supplierstatus'; +import { + SupplierStatusFromJSON, + SupplierStatusFromJSONTyped, + SupplierStatusToJSON, + SupplierStatusToJSONTyped, +} from './shared/supplierstatus'; +import type { SupplementalData } from './shared/supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './shared/supplementaldata'; +import type { AccountingAddress } from './shared/accountingaddress'; +import { + AccountingAddressFromJSON, + AccountingAddressFromJSONTyped, + AccountingAddressToJSON, + AccountingAddressToJSONTyped, +} from './shared/accountingaddress'; +import type { Metadata } from './shared/metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './shared/metadata'; + +/** + * + * @export + * @interface AccountingCreateSupplierResponseAllOfData + */ +export interface AccountingCreateSupplierResponseAllOfData { + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateSupplierResponseAllOfData + */ + sourceModifiedDate?: string; +} + + + +/** + * Check if a given object implements the AccountingCreateSupplierResponseAllOfData interface. + */ +export function instanceOfAccountingCreateSupplierResponseAllOfData(value: object): value is AccountingCreateSupplierResponseAllOfData { + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} + +export function AccountingCreateSupplierResponseAllOfDataFromJSON(json: any): AccountingCreateSupplierResponseAllOfData { + return AccountingCreateSupplierResponseAllOfDataFromJSONTyped(json, false); +} + +export function AccountingCreateSupplierResponseAllOfDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateSupplierResponseAllOfData { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'supplierName': json['supplierName'] == null ? undefined : json['supplierName'], + 'contactName': json['contactName'] == null ? undefined : json['contactName'], + 'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'], + 'phone': json['phone'] == null ? undefined : json['phone'], + 'addresses': json['addresses'] == null ? undefined : ((json['addresses'] as Array).map(AccountingAddressFromJSON)), + 'registrationNumber': json['registrationNumber'] == null ? undefined : json['registrationNumber'], + 'taxNumber': json['taxNumber'] == null ? undefined : json['taxNumber'], + 'status': SupplierStatusFromJSON(json['status']), + 'defaultCurrency': json['defaultCurrency'] == null ? undefined : json['defaultCurrency'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function AccountingCreateSupplierResponseAllOfDataToJSON(json: any): AccountingCreateSupplierResponseAllOfData { + return AccountingCreateSupplierResponseAllOfDataToJSONTyped(json, false); +} + +export function AccountingCreateSupplierResponseAllOfDataToJSONTyped(value?: AccountingCreateSupplierResponseAllOfData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'supplierName': value['supplierName'], + 'contactName': value['contactName'], + 'emailAddress': value['emailAddress'], + 'phone': value['phone'], + 'addresses': value['addresses'] == null ? undefined : ((value['addresses'] as Array).map(AccountingAddressToJSON)), + 'registrationNumber': value['registrationNumber'], + 'taxNumber': value['taxNumber'], + 'status': SupplierStatusToJSON(value['status']), + 'defaultCurrency': value['defaultCurrency'], + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + diff --git a/lending/src/sdk/models/AccountingCreateTransferResponseAllOfData.ts b/lending/src/sdk/models/AccountingCreateTransferResponseAllOfData.ts new file mode 100644 index 000000000..6fe659a8f --- /dev/null +++ b/lending/src/sdk/models/AccountingCreateTransferResponseAllOfData.ts @@ -0,0 +1,250 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { AccountingTransferStatus } from './_speakeasy_enums'; +import { mapValues } from '../../runtime'; +import type { TrackingCategoryRef } from './shared/trackingcategoryref'; +import { + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './shared/trackingcategoryref'; +import type { AccountingRecordRef } from './shared/accountingrecordref'; +import { + AccountingRecordRefFromJSON, + AccountingRecordRefFromJSONTyped, + AccountingRecordRefToJSON, + AccountingRecordRefToJSONTyped, +} from './shared/accountingrecordref'; +import type { SupplementalData } from './shared/supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './shared/supplementaldata'; +import type { Metadata } from './shared/metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './shared/metadata'; +import type { ContactRef } from './shared/contactref'; +import { + ContactRefFromJSON, + ContactRefFromJSONTyped, + ContactRefToJSON, + ContactRefToJSONTyped, +} from './shared/contactref'; +import type { TransferAccount } from './shared/transferaccount'; +import { + TransferAccountFromJSON, + TransferAccountFromJSONTyped, + TransferAccountToJSON, + TransferAccountToJSONTyped, +} from './shared/transferaccount'; + +/** + * + * @export + * @interface AccountingCreateTransferResponseAllOfData + */ +export interface AccountingCreateTransferResponseAllOfData { + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingCreateTransferResponseAllOfData + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingCreateTransferResponseAllOfData + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingCreateTransferResponseAllOfData + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateTransferResponseAllOfData + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingCreateTransferResponseAllOfData + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingCreateTransferResponseAllOfData + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingCreateTransferResponseAllOfData + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingCreateTransferResponseAllOfData + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingCreateTransferResponseAllOfData + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreateTransferResponseAllOfData + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreateTransferResponseAllOfData + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateTransferResponseAllOfData + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreateTransferResponseAllOfData + */ + sourceModifiedDate?: string; +} + + +/** + * @export + */ +export const AccountingCreateTransferResponseAllOfDataStatusEnum = { + Unknown: 'Unknown', + Unreconciled: 'Unreconciled', + Reconciled: 'Reconciled', + Void: 'Void' +} as const; +export type AccountingCreateTransferResponseAllOfDataStatusEnum = typeof AccountingCreateTransferResponseAllOfDataStatusEnum[keyof typeof AccountingCreateTransferResponseAllOfDataStatusEnum]; + + +/** + * Check if a given object implements the AccountingCreateTransferResponseAllOfData interface. + */ +export function instanceOfAccountingCreateTransferResponseAllOfData(value: object): value is AccountingCreateTransferResponseAllOfData { + return true; +} + +export function AccountingCreateTransferResponseAllOfDataFromJSON(json: any): AccountingCreateTransferResponseAllOfData { + return AccountingCreateTransferResponseAllOfDataFromJSONTyped(json, false); +} + +export function AccountingCreateTransferResponseAllOfDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateTransferResponseAllOfData { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'description': json['description'] == null ? undefined : json['description'], + 'contactRef': json['contactRef'] == null ? undefined : ContactRefFromJSON(json['contactRef']), + 'date': json['date'] == null ? undefined : json['date'], + 'from': json['from'] == null ? undefined : TransferAccountFromJSON(json['from']), + 'to': json['to'] == null ? undefined : TransferAccountFromJSON(json['to']), + 'status': json['status'] == null ? undefined : json['status'], + 'trackingCategoryRefs': json['trackingCategoryRefs'] == null ? undefined : ((json['trackingCategoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'depositedRecordRefs': json['depositedRecordRefs'] == null ? undefined : ((json['depositedRecordRefs'] as Array).map(AccountingRecordRefFromJSON)), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function AccountingCreateTransferResponseAllOfDataToJSON(json: any): AccountingCreateTransferResponseAllOfData { + return AccountingCreateTransferResponseAllOfDataToJSONTyped(json, false); +} + +export function AccountingCreateTransferResponseAllOfDataToJSONTyped(value?: AccountingCreateTransferResponseAllOfData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'description': value['description'], + 'contactRef': ContactRefToJSON(value['contactRef']), + 'date': value['date'], + 'from': TransferAccountToJSON(value['from']), + 'to': TransferAccountToJSON(value['to']), + 'status': value['status'], + 'trackingCategoryRefs': value['trackingCategoryRefs'] == null ? undefined : ((value['trackingCategoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'depositedRecordRefs': value['depositedRecordRefs'] == null ? undefined : ((value['depositedRecordRefs'] as Array).map(AccountingRecordRefToJSON)), + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + diff --git a/lending/src/sdk/models/AccountingPaymentAllocationAllocation.ts b/lending/src/sdk/models/AccountingPaymentAllocationAllocation.ts new file mode 100644 index 000000000..45667e27f --- /dev/null +++ b/lending/src/sdk/models/AccountingPaymentAllocationAllocation.ts @@ -0,0 +1,227 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +/** + * + * @export + * @interface AccountingPaymentAllocationAllocation + */ +export interface AccountingPaymentAllocationAllocation { + /** + * 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. + * @type {string} + * @memberof AccountingPaymentAllocationAllocation + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPaymentAllocationAllocation + */ + currencyRate?: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPaymentAllocationAllocation + */ + allocatedOnDate?: string; + /** + * The total amount that has been allocated. + * @type {string} + * @memberof AccountingPaymentAllocationAllocation + */ + totalAmount?: Decimal | number; +} + +/** + * Check if a given object implements the AccountingPaymentAllocationAllocation interface. + */ +export function instanceOfAccountingPaymentAllocationAllocation(value: object): value is AccountingPaymentAllocationAllocation { + return true; +} + +export function AccountingPaymentAllocationAllocationFromJSON(json: any): AccountingPaymentAllocationAllocation { + return AccountingPaymentAllocationAllocationFromJSONTyped(json, false); +} + +export function AccountingPaymentAllocationAllocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingPaymentAllocationAllocation { + if (json == null) { + return json; + } + return { + + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'allocatedOnDate': json['allocatedOnDate'] == null ? undefined : json['allocatedOnDate'], + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + }; +} + +export function AccountingPaymentAllocationAllocationToJSON(json: any): AccountingPaymentAllocationAllocation { + return AccountingPaymentAllocationAllocationToJSONTyped(json, false); +} + +export function AccountingPaymentAllocationAllocationToJSONTyped(value?: AccountingPaymentAllocationAllocation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'allocatedOnDate': value['allocatedOnDate'], + 'totalAmount': fromDecimal(value['totalAmount']), + }; +} + + +export interface Allocation { + /** + * 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. + * @type {string} + * @memberof AccountingPaymentAllocationAllocation + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPaymentAllocationAllocation + */ + currencyRate?: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPaymentAllocationAllocation + */ + allocatedOnDate?: string; + /** + * The total amount that has been allocated. + * @type {string} + * @memberof AccountingPaymentAllocationAllocation + */ + totalAmount?: Decimal | number; +} diff --git a/lending/src/sdk/models/AccountingPaymentMethod.ts b/lending/src/sdk/models/AccountingPaymentMethod.ts new file mode 100644 index 000000000..fbff7c66f --- /dev/null +++ b/lending/src/sdk/models/AccountingPaymentMethod.ts @@ -0,0 +1,153 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { Status } from './shared/status'; +import { + StatusFromJSON, + StatusFromJSONTyped, + StatusToJSON, + StatusToJSONTyped, +} from './shared/status'; +import type { PaymentMethodType } from './PaymentMethodType'; +import { + PaymentMethodTypeFromJSON, + PaymentMethodTypeFromJSONTyped, + PaymentMethodTypeToJSON, + PaymentMethodTypeToJSONTyped, +} from './PaymentMethodType'; +import type { Metadata } from './shared/metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './shared/metadata'; + +/** + * ## 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/lending-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/lending-api#/schemas/Payment). + * @export + * @interface AccountingPaymentMethod + */ +export interface AccountingPaymentMethod { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPaymentMethod + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPaymentMethod + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the payment method. + * @type {string} + * @memberof AccountingPaymentMethod + */ + id?: string; + /** + * Name of the payment method. + * @type {string} + * @memberof AccountingPaymentMethod + */ + name?: string | null; + /** + * + * @type {PaymentMethodType} + * @memberof AccountingPaymentMethod + */ + type?: PaymentMethodType; + /** + * + * @type {Status} + * @memberof AccountingPaymentMethod + */ + status?: Status; + /** + * + * @type {Metadata} + * @memberof AccountingPaymentMethod + */ + metadata?: Metadata; +} + + + +/** + * Check if a given object implements the AccountingPaymentMethod interface. + */ +export function instanceOfAccountingPaymentMethod(value: object): value is AccountingPaymentMethod { + return true; +} + +export function AccountingPaymentMethodFromJSON(json: any): AccountingPaymentMethod { + return AccountingPaymentMethodFromJSONTyped(json, false); +} + +export function AccountingPaymentMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingPaymentMethod { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'type': json['type'] == null ? undefined : PaymentMethodTypeFromJSON(json['type']), + 'status': json['status'] == null ? undefined : StatusFromJSON(json['status']), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + }; +} + +export function AccountingPaymentMethodToJSON(json: any): AccountingPaymentMethod { + return AccountingPaymentMethodToJSONTyped(json, false); +} + +export function AccountingPaymentMethodToJSONTyped(value?: AccountingPaymentMethod | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'name': value['name'], + 'type': PaymentMethodTypeToJSON(value['type']), + 'status': StatusToJSON(value['status']), + 'metadata': MetadataToJSON(value['metadata']), + }; +} + diff --git a/lending/src/sdk/models/AccountingTrackingCategory.ts b/lending/src/sdk/models/AccountingTrackingCategory.ts new file mode 100644 index 000000000..927e898b2 --- /dev/null +++ b/lending/src/sdk/models/AccountingTrackingCategory.ts @@ -0,0 +1,277 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { Status } from './shared/status'; +import { + StatusFromJSON, + StatusFromJSONTyped, + StatusToJSON, + StatusToJSONTyped, +} from './shared/status'; +import type { Metadata } from './shared/metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './shared/metadata'; + +/** + * 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 software. In Codat, we refer to these as tracking categories. + * + * ## 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. + * @export + * @interface AccountingTrackingCategory + */ +export interface AccountingTrackingCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTrackingCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTrackingCategory + */ + sourceModifiedDate?: string; + /** + * The identifier for the item, unique per tracking category. + * @type {string} + * @memberof AccountingTrackingCategory + */ + id?: string | null; + /** + * The name of the tracking category. + * @type {string} + * @memberof AccountingTrackingCategory + */ + name?: string | null; + /** + * + * @type {Status} + * @memberof AccountingTrackingCategory + */ + status?: Status; + /** + * The identifier for this item's immediate parent. + * @type {string} + * @memberof AccountingTrackingCategory + */ + parentId?: string | null; + /** + * Boolean value indicating whether this category has SubCategories. + * @type {boolean} + * @memberof AccountingTrackingCategory + */ + hasChildren?: boolean; + /** + * + * @type {Metadata} + * @memberof AccountingTrackingCategory + */ + metadata?: Metadata; +} + + + +/** + * Check if a given object implements the AccountingTrackingCategory interface. + */ +export function instanceOfAccountingTrackingCategory(value: object): value is AccountingTrackingCategory { + return true; +} + +export function AccountingTrackingCategoryFromJSON(json: any): AccountingTrackingCategory { + return AccountingTrackingCategoryFromJSONTyped(json, false); +} + +export function AccountingTrackingCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingTrackingCategory { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'status': json['status'] == null ? undefined : StatusFromJSON(json['status']), + 'parentId': json['parentId'] == null ? undefined : json['parentId'], + 'hasChildren': json['hasChildren'] == null ? undefined : json['hasChildren'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + }; +} + +export function AccountingTrackingCategoryToJSON(json: any): AccountingTrackingCategory { + return AccountingTrackingCategoryToJSONTyped(json, false); +} + +export function AccountingTrackingCategoryToJSONTyped(value?: AccountingTrackingCategory | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'name': value['name'], + 'status': StatusToJSON(value['status']), + 'parentId': value['parentId'], + 'hasChildren': value['hasChildren'], + 'metadata': MetadataToJSON(value['metadata']), + }; +} + diff --git a/lending/src/sdk/models/BankAccountPrototype.ts b/lending/src/sdk/models/BankAccountPrototype.ts new file mode 100644 index 000000000..94a90cab7 --- /dev/null +++ b/lending/src/sdk/models/BankAccountPrototype.ts @@ -0,0 +1,1016 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +import type { AccountingBankAccountType } from './shared/accountingbankaccounttype'; +import { + AccountingBankAccountTypeFromJSON, + AccountingBankAccountTypeFromJSONTyped, + AccountingBankAccountTypeToJSON, + AccountingBankAccountTypeToJSONTyped, +} from './shared/accountingbankaccounttype'; +import type { BankAccountStatus } from './shared/bankaccountstatus'; +import { + BankAccountStatusFromJSON, + BankAccountStatusFromJSONTyped, + BankAccountStatusToJSON, + BankAccountStatusToJSONTyped, +} from './shared/bankaccountstatus'; + +/** + * + * @export + * @interface BankAccountPrototype + */ +export interface BankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + + + +/** + * Check if a given object implements the BankAccountPrototype interface. + */ +export function instanceOfBankAccountPrototype(value: object): value is BankAccountPrototype { + return true; +} + +export function BankAccountPrototypeFromJSON(json: any): BankAccountPrototype { + return BankAccountPrototypeFromJSONTyped(json, false); +} + +export function BankAccountPrototypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankAccountPrototype { + if (json == null) { + return json; + } + return { + + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'accountType': json['accountType'] == null ? undefined : AccountingBankAccountTypeFromJSON(json['accountType']), + 'nominalCode': json['nominalCode'] == null ? undefined : json['nominalCode'], + 'sortCode': json['sortCode'] == null ? undefined : json['sortCode'], + 'accountNumber': json['accountNumber'] == null ? undefined : json['accountNumber'], + 'iBan': json['iBan'] == null ? undefined : json['iBan'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'institution': json['institution'] == null ? undefined : json['institution'], + 'availableBalance': json['availableBalance'] == null ? undefined : toDecimal(json['availableBalance']), + 'overdraftLimit': json['overdraftLimit'] == null ? undefined : toDecimal(json['overdraftLimit']), + 'status': json['status'] == null ? undefined : BankAccountStatusFromJSON(json['status']), + }; +} + +export function BankAccountPrototypeToJSON(json: any): BankAccountPrototype { + return BankAccountPrototypeToJSONTyped(json, false); +} + +export function BankAccountPrototypeToJSONTyped(value?: BankAccountPrototype | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'accountName': value['accountName'], + 'accountType': AccountingBankAccountTypeToJSON(value['accountType']), + 'nominalCode': value['nominalCode'], + 'sortCode': value['sortCode'], + 'accountNumber': value['accountNumber'], + 'iBan': value['iBan'], + 'currency': value['currency'], + 'balance': fromDecimal(value['balance']), + 'institution': value['institution'], + 'availableBalance': fromDecimal(value['availableBalance']), + 'overdraftLimit': fromDecimal(value['overdraftLimit']), + 'status': BankAccountStatusToJSON(value['status']), + }; +} + + +export interface AccountingBankAccountBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + +export interface AccountingBankAccountGetResponseBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + +export interface AccountingBankAccountsBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + +export interface AccountingBankAccountsListResponseBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + +export interface AccountingCreateBankAccountResponseBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + +export interface BankAccountCreateResponseBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + +export interface CreateBankAccountResponseBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + +export interface GetAccountingBankAccountResponseBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} + +export interface ListAccountingBankAccountsResponseBankAccountPrototype { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof BankAccountPrototype + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankAccountPrototype + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof BankAccountPrototype + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof BankAccountPrototype + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof BankAccountPrototype + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof BankAccountPrototype + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof BankAccountPrototype + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof BankAccountPrototype + */ + status?: BankAccountStatus; +} diff --git a/lending/src/sdk/models/BillLineItemPurchaseOrderLineRef.ts b/lending/src/sdk/models/BillLineItemPurchaseOrderLineRef.ts new file mode 100644 index 000000000..50d056a25 --- /dev/null +++ b/lending/src/sdk/models/BillLineItemPurchaseOrderLineRef.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * + * @export + * @interface BillLineItemPurchaseOrderLineRef + */ +export interface BillLineItemPurchaseOrderLineRef { + /** + * 'id' of the underlying record. + * @type {string} + * @memberof BillLineItemPurchaseOrderLineRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof BillLineItemPurchaseOrderLineRef + */ + dataType?: BillLineItemPurchaseOrderLineRefDataTypeEnum; + /** + * Line number of the underlying record. + * @type {string} + * @memberof BillLineItemPurchaseOrderLineRef + */ + lineNumber?: string; +} + + +/** + * @export + */ +export const BillLineItemPurchaseOrderLineRefDataTypeEnum = { + PurchaseOrders: 'purchaseOrders', + Bills: 'bills' +} as const; +export type BillLineItemPurchaseOrderLineRefDataTypeEnum = typeof BillLineItemPurchaseOrderLineRefDataTypeEnum[keyof typeof BillLineItemPurchaseOrderLineRefDataTypeEnum]; + + +/** + * Check if a given object implements the BillLineItemPurchaseOrderLineRef interface. + */ +export function instanceOfBillLineItemPurchaseOrderLineRef(value: object): value is BillLineItemPurchaseOrderLineRef { + return true; +} + +export function BillLineItemPurchaseOrderLineRefFromJSON(json: any): BillLineItemPurchaseOrderLineRef { + return BillLineItemPurchaseOrderLineRefFromJSONTyped(json, false); +} + +export function BillLineItemPurchaseOrderLineRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillLineItemPurchaseOrderLineRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'lineNumber': json['lineNumber'] == null ? undefined : json['lineNumber'], + }; +} + +export function BillLineItemPurchaseOrderLineRefToJSON(json: any): BillLineItemPurchaseOrderLineRef { + return BillLineItemPurchaseOrderLineRefToJSONTyped(json, false); +} + +export function BillLineItemPurchaseOrderLineRefToJSONTyped(value?: BillLineItemPurchaseOrderLineRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataType': value['dataType'], + 'lineNumber': value['lineNumber'], + }; +} + diff --git a/lending/src/sdk/models/CategorizedBankStatementAccounts.ts b/lending/src/sdk/models/CategorizedBankStatementAccounts.ts new file mode 100644 index 000000000..e4511f6c4 --- /dev/null +++ b/lending/src/sdk/models/CategorizedBankStatementAccounts.ts @@ -0,0 +1,186 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { Account } from './Account'; +import { + AccountFromJSON, + AccountFromJSONTyped, + AccountToJSON, + AccountToJSONTyped, +} from './Account'; +import type { Links } from './shared/links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './shared/links'; + +/** + * > **Categorization engine** + * > + * > The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. + * + * The Enhanced Cash Flow accounts endpoint provides a list of accounts that categorized transactions have been taken from. + * @export + * @interface CategorizedBankStatementAccounts + */ +export interface CategorizedBankStatementAccounts { + /** + * Current page number. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CategorizedBankStatementAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof CategorizedBankStatementAccounts + */ + results?: Array; +} + +/** + * Check if a given object implements the CategorizedBankStatementAccounts interface. + */ +export function instanceOfCategorizedBankStatementAccounts(value: object): value is CategorizedBankStatementAccounts { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CategorizedBankStatementAccountsFromJSON(json: any): CategorizedBankStatementAccounts { + return CategorizedBankStatementAccountsFromJSONTyped(json, false); +} + +export function CategorizedBankStatementAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategorizedBankStatementAccounts { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountFromJSON)), + }; +} + +export function CategorizedBankStatementAccountsToJSON(json: any): CategorizedBankStatementAccounts { + return CategorizedBankStatementAccountsToJSONTyped(json, false); +} + +export function CategorizedBankStatementAccountsToJSONTyped(value?: CategorizedBankStatementAccounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountToJSON)), + }; +} + + +export interface CategorizedBankStatementAccountsListResponseCategorizedBankStatementAccounts { + /** + * Current page number. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CategorizedBankStatementAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof CategorizedBankStatementAccounts + */ + results?: Array; +} + +export interface ListCategorizedBankStatementAccountsResponseCategorizedBankStatementAccounts { + /** + * Current page number. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CategorizedBankStatementAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CategorizedBankStatementAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof CategorizedBankStatementAccounts + */ + results?: Array; +} diff --git a/lending/src/sdk/models/CategorizedBankStatementTransactions.ts b/lending/src/sdk/models/CategorizedBankStatementTransactions.ts new file mode 100644 index 000000000..645c5313b --- /dev/null +++ b/lending/src/sdk/models/CategorizedBankStatementTransactions.ts @@ -0,0 +1,186 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { CashFlowTransaction } from './shared/cashflowtransaction'; +import { + CashFlowTransactionFromJSON, + CashFlowTransactionFromJSONTyped, + CashFlowTransactionToJSON, + CashFlowTransactionToJSONTyped, +} from './shared/cashflowtransaction'; +import type { Links } from './shared/links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './shared/links'; + +/** + * > **Categorization engine** + * > + * > The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. + * + * The Enhanced Cash Flow Transactions endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources. + * @export + * @interface CategorizedBankStatementTransactions + */ +export interface CategorizedBankStatementTransactions { + /** + * Current page number. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CategorizedBankStatementTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof CategorizedBankStatementTransactions + */ + results?: Array; +} + +/** + * Check if a given object implements the CategorizedBankStatementTransactions interface. + */ +export function instanceOfCategorizedBankStatementTransactions(value: object): value is CategorizedBankStatementTransactions { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CategorizedBankStatementTransactionsFromJSON(json: any): CategorizedBankStatementTransactions { + return CategorizedBankStatementTransactionsFromJSONTyped(json, false); +} + +export function CategorizedBankStatementTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategorizedBankStatementTransactions { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CashFlowTransactionFromJSON)), + }; +} + +export function CategorizedBankStatementTransactionsToJSON(json: any): CategorizedBankStatementTransactions { + return CategorizedBankStatementTransactionsToJSONTyped(json, false); +} + +export function CategorizedBankStatementTransactionsToJSONTyped(value?: CategorizedBankStatementTransactions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CashFlowTransactionToJSON)), + }; +} + + +export interface CategorizedBankStatementTransactionsGetResponseCategorizedBankStatementTransactions { + /** + * Current page number. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CategorizedBankStatementTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof CategorizedBankStatementTransactions + */ + results?: Array; +} + +export interface GetCategorizedBankStatementTransactionsResponseCategorizedBankStatementTransactions { + /** + * Current page number. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CategorizedBankStatementTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CategorizedBankStatementTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof CategorizedBankStatementTransactions + */ + results?: Array; +} diff --git a/lending/src/sdk/models/CommerceTaxComponent.ts b/lending/src/sdk/models/CommerceTaxComponent.ts new file mode 100644 index 000000000..50d54ce80 --- /dev/null +++ b/lending/src/sdk/models/CommerceTaxComponent.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +/** + * The Tax Components endpoints return tax rates data from the commerce software, including tax rate names and values. This is to support the mapping of tax rates from the commerce software to those in the accounting software. + * @export + * @interface CommerceTaxComponent + */ +export interface CommerceTaxComponent { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceTaxComponent + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTaxComponent + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTaxComponent + */ + sourceModifiedDate?: string; + /** + * Name of the Tax Rate Component in the source commerce software. + * @type {string} + * @memberof CommerceTaxComponent + */ + name?: string; + /** + * Rate of taxation represented as a fraction of the net price (typically in the range 0.00 - 1.00). + * @type {string} + * @memberof CommerceTaxComponent + */ + rate?: Decimal | number; + /** + * The Boolean flag to indicate when a Tax Rate Component compounds on a sale. + * @type {boolean} + * @memberof CommerceTaxComponent + */ + isCompound?: boolean; +} + +/** + * Check if a given object implements the CommerceTaxComponent interface. + */ +export function instanceOfCommerceTaxComponent(value: object): value is CommerceTaxComponent { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommerceTaxComponentFromJSON(json: any): CommerceTaxComponent { + return CommerceTaxComponentFromJSONTyped(json, false); +} + +export function CommerceTaxComponentFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceTaxComponent { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'name': json['name'] == null ? undefined : json['name'], + 'rate': json['rate'] == null ? undefined : toDecimal(json['rate']), + 'isCompound': json['isCompound'] == null ? undefined : json['isCompound'], + }; +} + +export function CommerceTaxComponentToJSON(json: any): CommerceTaxComponent { + return CommerceTaxComponentToJSONTyped(json, false); +} + +export function CommerceTaxComponentToJSONTyped(value?: CommerceTaxComponent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'name': value['name'], + 'rate': fromDecimal(value['rate']), + 'isCompound': value['isCompound'], + }; +} + diff --git a/lending/src/sdk/models/CompanyDetails.ts b/lending/src/sdk/models/CompanyDetails.ts new file mode 100644 index 000000000..a2bdc5520 --- /dev/null +++ b/lending/src/sdk/models/CompanyDetails.ts @@ -0,0 +1,1452 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { CompanyReference } from './shared/companyreference'; +import { + CompanyReferenceFromJSON, + CompanyReferenceFromJSONTyped, + CompanyReferenceToJSON, + CompanyReferenceToJSONTyped, +} from './shared/companyreference'; + +/** + * + * @export + * @interface CompanyDetails + */ +export interface CompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +/** + * Check if a given object implements the CompanyDetails interface. + */ +export function instanceOfCompanyDetails(value: object): value is CompanyDetails { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('redirect' in value) || value['redirect'] === undefined) return false; + return true; +} + +export function CompanyDetailsFromJSON(json: any): CompanyDetails { + return CompanyDetailsFromJSONTyped(json, false); +} + +export function CompanyDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompanyDetails { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'redirect': json['redirect'], + 'lastSync': json['lastSync'] == null ? undefined : json['lastSync'], + 'created': json['created'] == null ? undefined : json['created'], + 'createdByUserName': json['createdByUserName'] == null ? undefined : json['createdByUserName'], + 'products': json['products'] == null ? undefined : json['products'], + 'tags': json['tags'] == null ? undefined : json['tags'], + 'referenceParentCompany': json['referenceParentCompany'] == null ? undefined : CompanyReferenceFromJSON(json['referenceParentCompany']), + 'referenceSubsidiaryCompanies': json['referenceSubsidiaryCompanies'] == null ? undefined : ((json['referenceSubsidiaryCompanies'] as Array).map(CompanyReferenceFromJSON)), + }; +} + +export function CompanyDetailsToJSON(json: any): CompanyDetails { + return CompanyDetailsToJSONTyped(json, false); +} + +export function CompanyDetailsToJSONTyped(value?: CompanyDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'description': value['description'], + 'redirect': value['redirect'], + 'lastSync': value['lastSync'], + 'created': value['created'], + 'createdByUserName': value['createdByUserName'], + 'products': value['products'], + 'tags': value['tags'], + 'referenceParentCompany': CompanyReferenceToJSON(value['referenceParentCompany']), + 'referenceSubsidiaryCompanies': value['referenceSubsidiaryCompanies'] == null ? undefined : ((value['referenceSubsidiaryCompanies'] as Array).map(CompanyReferenceToJSON)), + }; +} + + +export interface CompaniesCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface CompaniesListResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface CompanyCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface CompanyCreateResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface CompanyGetResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface CompanyReplaceResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface CompanyUpdateResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface CreateCompanyResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface GetCompanyResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface ListCompaniesResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface ReplaceCompanyResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} + +export interface UpdateCompanyResponseCompanyDetails { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyDetails + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyDetails + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyDetails + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof CompanyDetails + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CompanyDetails + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof CompanyDetails + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof CompanyDetails + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyDetails + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof CompanyDetails + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof CompanyDetails + */ + referenceSubsidiaryCompanies?: Array; +} diff --git a/lending/src/sdk/models/CreateCompanyRequest.ts b/lending/src/sdk/models/CreateCompanyRequest.ts new file mode 100644 index 000000000..ec06f2e2e --- /dev/null +++ b/lending/src/sdk/models/CreateCompanyRequest.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ + +import type { CompanyRequestBody } from './shared/companyrequestbody'; +/* eslint-disable */ + +export interface CreateCompanyRequest { + companyRequestBody?: CompanyRequestBody | undefined; +} + +export interface CompanyRequestBodyCreateCompanyRequest { + companyRequestBody?: CompanyRequestBody | undefined; +} diff --git a/lending/src/sdk/models/CreateSourceAccount200Response.ts b/lending/src/sdk/models/CreateSourceAccount200Response.ts new file mode 100644 index 000000000..6227da2de --- /dev/null +++ b/lending/src/sdk/models/CreateSourceAccount200Response.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { SourceAccount } from './shared/sourceaccount'; +import { + instanceOfSourceAccount, + SourceAccountFromJSON, + SourceAccountFromJSONTyped, + SourceAccountToJSON, +} from './shared/sourceaccount'; +import type { SourceAccountV2 } from './shared/sourceaccountv2'; +import { + instanceOfSourceAccountV2, + SourceAccountV2FromJSON, + SourceAccountV2FromJSONTyped, + SourceAccountV2ToJSON, +} from './shared/sourceaccountv2'; + +/** + * @type CreateSourceAccount200Response + * + * @export + */ +export type CreateSourceAccount200Response = SourceAccount | SourceAccountV2; + +export function CreateSourceAccount200ResponseFromJSON(json: any): CreateSourceAccount200Response { + return CreateSourceAccount200ResponseFromJSONTyped(json, false); +} + +export function CreateSourceAccount200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSourceAccount200Response { + if (json == null) { + return json; + } + if (instanceOfSourceAccount(json)) { + return SourceAccountFromJSONTyped(json, true); + } + if (instanceOfSourceAccountV2(json)) { + return SourceAccountV2FromJSONTyped(json, true); + } + + return {} as any; +} + +export function CreateSourceAccount200ResponseToJSON(json: any): any { + return CreateSourceAccount200ResponseToJSONTyped(json, false); +} + +export function CreateSourceAccount200ResponseToJSONTyped(value?: CreateSourceAccount200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + if (instanceOfSourceAccount(value)) { + return SourceAccountToJSON(value as SourceAccount); + } + if (instanceOfSourceAccountV2(value)) { + return SourceAccountV2ToJSON(value as SourceAccountV2); + } + + return {}; +} + diff --git a/lending/src/sdk/models/CreatedDate.ts b/lending/src/sdk/models/CreatedDate.ts new file mode 100644 index 000000000..7554944f2 --- /dev/null +++ b/lending/src/sdk/models/CreatedDate.ts @@ -0,0 +1,1082 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * + * @export + * @interface CreatedDate + */ +export interface CreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +/** + * Check if a given object implements the CreatedDate interface. + */ +export function instanceOfCreatedDate(value: object): value is CreatedDate { + return true; +} + +export function CreatedDateFromJSON(json: any): CreatedDate { + return CreatedDateFromJSONTyped(json, false); +} + +export function CreatedDateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatedDate { + if (json == null) { + return json; + } + return { + + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + }; +} + +export function CreatedDateToJSON(json: any): CreatedDate { + return CreatedDateToJSONTyped(json, false); +} + +export function CreatedDateToJSONTyped(value?: CreatedDate | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'createdDate': value['createdDate'], + }; +} + + +export interface CommerceCompanyInfoCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceCompanyProfileCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceCustomerCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceCustomerGetResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceCustomersCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceCustomersListResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceDisputeCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceDisputeGetResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceDisputesCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceDisputesListResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceOrderCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceOrderGetResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceOrdersCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceOrdersListResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommercePaymentCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommercePaymentGetResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommercePaymentsCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommercePaymentsListResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceProductCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceProductGetResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceProfileGetResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceTransactionCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceTransactionGetResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceTransactionsCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface CommerceTransactionsListResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface GetCommerceCustomerResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface GetCommerceDisputeResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface GetCommerceOrderResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface GetCommercePaymentResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface GetCommerceProductResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface GetCommerceProfileResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface GetCommerceTransactionResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface ListCommerceCustomersResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface ListCommerceDisputesResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface ListCommerceOrdersResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface ListCommercePaymentsResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} + +export interface ListCommerceTransactionsResponseCreatedDate { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreatedDate + */ + createdDate?: string; +} diff --git a/lending/src/sdk/models/DataIntegrityType.ts b/lending/src/sdk/models/DataIntegrityType.ts new file mode 100644 index 000000000..88205cf7e --- /dev/null +++ b/lending/src/sdk/models/DataIntegrityType.ts @@ -0,0 +1,137 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * + * @export + * @interface DataIntegrityType + */ +export interface DataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} + +/** + * Check if a given object implements the DataIntegrityType interface. + */ +export function instanceOfDataIntegrityType(value: object): value is DataIntegrityType { + return true; +} + +export function DataIntegrityTypeFromJSON(json: any): DataIntegrityType { + return DataIntegrityTypeFromJSONTyped(json, false); +} + +export function DataIntegrityTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityType { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + }; +} + +export function DataIntegrityTypeToJSON(json: any): DataIntegrityType { + return DataIntegrityTypeToJSONTyped(json, false); +} + +export function DataIntegrityTypeToJSONTyped(value?: DataIntegrityType | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': value['type'], + }; +} + + +export interface DataIntegrityStatusDataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} + +export interface DataIntegrityStatusGetResponseDataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} + +export interface DataIntegrityStatusesDataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} + +export interface DataIntegritySummariesDataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} + +export interface DataIntegritySummariesGetResponseDataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} + +export interface DataIntegritySummaryDataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} + +export interface GetDataIntegrityStatusResponseDataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} + +export interface GetDataIntegritySummariesResponseDataIntegrityType { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityType + */ + type?: string; +} diff --git a/lending/src/sdk/models/DataStatuses.ts b/lending/src/sdk/models/DataStatuses.ts new file mode 100644 index 000000000..879265511 --- /dev/null +++ b/lending/src/sdk/models/DataStatuses.ts @@ -0,0 +1,1453 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { DataStatus } from './shared/datastatus'; +import { + DataStatusFromJSON, + DataStatusFromJSONTyped, + DataStatusToJSON, + DataStatusToJSONTyped, +} from './shared/datastatus'; + +/** + * + * @export + * @interface DataStatuses + */ +export interface DataStatuses { + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + accountTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + balanceSheet?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billCreditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billPayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bills?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + cashFlowStatement?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + chartOfAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + company?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + creditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + customers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directCosts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directIncomes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + invoices?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + itemReceipts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + items?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journalEntries?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journals?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + paymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + payments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + profitAndLoss?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + purchaseOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + salesOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + suppliers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + taxRates?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + trackingCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + transfers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccountBalances?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactionCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCompanyInfo?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCustomers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceDisputes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceLocations?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePaymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProductCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProducts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTaxComponents?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTransactions?: DataStatus; +} + +/** + * Check if a given object implements the DataStatuses interface. + */ +export function instanceOfDataStatuses(value: object): value is DataStatuses { + return true; +} + +export function DataStatusesFromJSON(json: any): DataStatuses { + return DataStatusesFromJSONTyped(json, false); +} + +export function DataStatusesFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataStatuses { + if (json == null) { + return json; + } + return { + + 'accountTransactions': json['accountTransactions'] == null ? undefined : DataStatusFromJSON(json['accountTransactions']), + 'balanceSheet': json['balanceSheet'] == null ? undefined : DataStatusFromJSON(json['balanceSheet']), + 'bankAccounts': json['bankAccounts'] == null ? undefined : DataStatusFromJSON(json['bankAccounts']), + 'bankTransactions': json['bankTransactions'] == null ? undefined : DataStatusFromJSON(json['bankTransactions']), + 'billCreditNotes': json['billCreditNotes'] == null ? undefined : DataStatusFromJSON(json['billCreditNotes']), + 'billPayments': json['billPayments'] == null ? undefined : DataStatusFromJSON(json['billPayments']), + 'bills': json['bills'] == null ? undefined : DataStatusFromJSON(json['bills']), + 'cashFlowStatement': json['cashFlowStatement'] == null ? undefined : DataStatusFromJSON(json['cashFlowStatement']), + 'chartOfAccounts': json['chartOfAccounts'] == null ? undefined : DataStatusFromJSON(json['chartOfAccounts']), + 'company': json['company'] == null ? undefined : DataStatusFromJSON(json['company']), + 'creditNotes': json['creditNotes'] == null ? undefined : DataStatusFromJSON(json['creditNotes']), + 'customers': json['customers'] == null ? undefined : DataStatusFromJSON(json['customers']), + 'directCosts': json['directCosts'] == null ? undefined : DataStatusFromJSON(json['directCosts']), + 'directIncomes': json['directIncomes'] == null ? undefined : DataStatusFromJSON(json['directIncomes']), + 'invoices': json['invoices'] == null ? undefined : DataStatusFromJSON(json['invoices']), + 'itemReceipts': json['itemReceipts'] == null ? undefined : DataStatusFromJSON(json['itemReceipts']), + 'items': json['items'] == null ? undefined : DataStatusFromJSON(json['items']), + 'journalEntries': json['journalEntries'] == null ? undefined : DataStatusFromJSON(json['journalEntries']), + 'journals': json['journals'] == null ? undefined : DataStatusFromJSON(json['journals']), + 'paymentMethods': json['paymentMethods'] == null ? undefined : DataStatusFromJSON(json['paymentMethods']), + 'payments': json['payments'] == null ? undefined : DataStatusFromJSON(json['payments']), + 'profitAndLoss': json['profitAndLoss'] == null ? undefined : DataStatusFromJSON(json['profitAndLoss']), + 'purchaseOrders': json['purchaseOrders'] == null ? undefined : DataStatusFromJSON(json['purchaseOrders']), + 'salesOrders': json['salesOrders'] == null ? undefined : DataStatusFromJSON(json['salesOrders']), + 'suppliers': json['suppliers'] == null ? undefined : DataStatusFromJSON(json['suppliers']), + 'taxRates': json['taxRates'] == null ? undefined : DataStatusFromJSON(json['taxRates']), + 'trackingCategories': json['trackingCategories'] == null ? undefined : DataStatusFromJSON(json['trackingCategories']), + 'transfers': json['transfers'] == null ? undefined : DataStatusFromJSON(json['transfers']), + 'bankingAccountBalances': json['banking-accountBalances'] == null ? undefined : DataStatusFromJSON(json['banking-accountBalances']), + 'bankingAccounts': json['banking-accounts'] == null ? undefined : DataStatusFromJSON(json['banking-accounts']), + 'bankingTransactionCategories': json['banking-transactionCategories'] == null ? undefined : DataStatusFromJSON(json['banking-transactionCategories']), + 'bankingTransactions': json['banking-transactions'] == null ? undefined : DataStatusFromJSON(json['banking-transactions']), + 'commerceCompanyInfo': json['commerce-companyInfo'] == null ? undefined : DataStatusFromJSON(json['commerce-companyInfo']), + 'commerceCustomers': json['commerce-customers'] == null ? undefined : DataStatusFromJSON(json['commerce-customers']), + 'commerceDisputes': json['commerce-disputes'] == null ? undefined : DataStatusFromJSON(json['commerce-disputes']), + 'commerceLocations': json['commerce-locations'] == null ? undefined : DataStatusFromJSON(json['commerce-locations']), + 'commerceOrders': json['commerce-orders'] == null ? undefined : DataStatusFromJSON(json['commerce-orders']), + 'commercePaymentMethods': json['commerce-paymentMethods'] == null ? undefined : DataStatusFromJSON(json['commerce-paymentMethods']), + 'commercePayments': json['commerce-payments'] == null ? undefined : DataStatusFromJSON(json['commerce-payments']), + 'commerceProductCategories': json['commerce-productCategories'] == null ? undefined : DataStatusFromJSON(json['commerce-productCategories']), + 'commerceProducts': json['commerce-products'] == null ? undefined : DataStatusFromJSON(json['commerce-products']), + 'commerceTaxComponents': json['commerce-taxComponents'] == null ? undefined : DataStatusFromJSON(json['commerce-taxComponents']), + 'commerceTransactions': json['commerce-transactions'] == null ? undefined : DataStatusFromJSON(json['commerce-transactions']), + }; +} + +export function DataStatusesToJSON(json: any): DataStatuses { + return DataStatusesToJSONTyped(json, false); +} + +export function DataStatusesToJSONTyped(value?: DataStatuses | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'accountTransactions': DataStatusToJSON(value['accountTransactions']), + 'balanceSheet': DataStatusToJSON(value['balanceSheet']), + 'bankAccounts': DataStatusToJSON(value['bankAccounts']), + 'bankTransactions': DataStatusToJSON(value['bankTransactions']), + 'billCreditNotes': DataStatusToJSON(value['billCreditNotes']), + 'billPayments': DataStatusToJSON(value['billPayments']), + 'bills': DataStatusToJSON(value['bills']), + 'cashFlowStatement': DataStatusToJSON(value['cashFlowStatement']), + 'chartOfAccounts': DataStatusToJSON(value['chartOfAccounts']), + 'company': DataStatusToJSON(value['company']), + 'creditNotes': DataStatusToJSON(value['creditNotes']), + 'customers': DataStatusToJSON(value['customers']), + 'directCosts': DataStatusToJSON(value['directCosts']), + 'directIncomes': DataStatusToJSON(value['directIncomes']), + 'invoices': DataStatusToJSON(value['invoices']), + 'itemReceipts': DataStatusToJSON(value['itemReceipts']), + 'items': DataStatusToJSON(value['items']), + 'journalEntries': DataStatusToJSON(value['journalEntries']), + 'journals': DataStatusToJSON(value['journals']), + 'paymentMethods': DataStatusToJSON(value['paymentMethods']), + 'payments': DataStatusToJSON(value['payments']), + 'profitAndLoss': DataStatusToJSON(value['profitAndLoss']), + 'purchaseOrders': DataStatusToJSON(value['purchaseOrders']), + 'salesOrders': DataStatusToJSON(value['salesOrders']), + 'suppliers': DataStatusToJSON(value['suppliers']), + 'taxRates': DataStatusToJSON(value['taxRates']), + 'trackingCategories': DataStatusToJSON(value['trackingCategories']), + 'transfers': DataStatusToJSON(value['transfers']), + 'banking-accountBalances': DataStatusToJSON(value['bankingAccountBalances']), + 'banking-accounts': DataStatusToJSON(value['bankingAccounts']), + 'banking-transactionCategories': DataStatusToJSON(value['bankingTransactionCategories']), + 'banking-transactions': DataStatusToJSON(value['bankingTransactions']), + 'commerce-companyInfo': DataStatusToJSON(value['commerceCompanyInfo']), + 'commerce-customers': DataStatusToJSON(value['commerceCustomers']), + 'commerce-disputes': DataStatusToJSON(value['commerceDisputes']), + 'commerce-locations': DataStatusToJSON(value['commerceLocations']), + 'commerce-orders': DataStatusToJSON(value['commerceOrders']), + 'commerce-paymentMethods': DataStatusToJSON(value['commercePaymentMethods']), + 'commerce-payments': DataStatusToJSON(value['commercePayments']), + 'commerce-productCategories': DataStatusToJSON(value['commerceProductCategories']), + 'commerce-products': DataStatusToJSON(value['commerceProducts']), + 'commerce-taxComponents': DataStatusToJSON(value['commerceTaxComponents']), + 'commerce-transactions': DataStatusToJSON(value['commerceTransactions']), + }; +} + + +export interface DataStatusGetDataStatuses { + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + accountTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + balanceSheet?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billCreditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billPayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bills?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + cashFlowStatement?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + chartOfAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + company?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + creditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + customers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directCosts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directIncomes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + invoices?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + itemReceipts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + items?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journalEntries?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journals?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + paymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + payments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + profitAndLoss?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + purchaseOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + salesOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + suppliers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + taxRates?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + trackingCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + transfers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccountBalances?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactionCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCompanyInfo?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCustomers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceDisputes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceLocations?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePaymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProductCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProducts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTaxComponents?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTransactions?: DataStatus; +} + +export interface DataStatusGetResponseDataStatuses { + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + accountTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + balanceSheet?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billCreditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billPayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bills?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + cashFlowStatement?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + chartOfAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + company?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + creditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + customers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directCosts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directIncomes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + invoices?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + itemReceipts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + items?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journalEntries?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journals?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + paymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + payments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + profitAndLoss?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + purchaseOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + salesOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + suppliers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + taxRates?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + trackingCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + transfers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccountBalances?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactionCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCompanyInfo?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCustomers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceDisputes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceLocations?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePaymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProductCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProducts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTaxComponents?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTransactions?: DataStatus; +} + +export interface GetDataStatusDataStatuses { + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + accountTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + balanceSheet?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billCreditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billPayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bills?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + cashFlowStatement?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + chartOfAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + company?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + creditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + customers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directCosts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directIncomes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + invoices?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + itemReceipts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + items?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journalEntries?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journals?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + paymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + payments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + profitAndLoss?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + purchaseOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + salesOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + suppliers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + taxRates?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + trackingCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + transfers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccountBalances?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactionCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCompanyInfo?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCustomers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceDisputes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceLocations?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePaymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProductCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProducts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTaxComponents?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTransactions?: DataStatus; +} + +export interface GetDataStatusResponseDataStatuses { + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + accountTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + balanceSheet?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billCreditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + billPayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bills?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + cashFlowStatement?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + chartOfAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + company?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + creditNotes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + customers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directCosts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + directIncomes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + invoices?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + itemReceipts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + items?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journalEntries?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + journals?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + paymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + payments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + profitAndLoss?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + purchaseOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + salesOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + suppliers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + taxRates?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + trackingCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + transfers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccountBalances?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingAccounts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactionCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + bankingTransactions?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCompanyInfo?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceCustomers?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceDisputes?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceLocations?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceOrders?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePaymentMethods?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commercePayments?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProductCategories?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceProducts?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTaxComponents?: DataStatus; + /** + * + * @type {DataStatus} + * @memberof DataStatuses + */ + commerceTransactions?: DataStatus; +} diff --git a/lending/src/sdk/models/DownloadCategorizedBankStatementExcelRequest.ts b/lending/src/sdk/models/DownloadCategorizedBankStatementExcelRequest.ts new file mode 100644 index 000000000..00572a18b --- /dev/null +++ b/lending/src/sdk/models/DownloadCategorizedBankStatementExcelRequest.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/* eslint-disable */ + +export interface DownloadCategorizedBankStatementExcelRequest { + companyId: string; + reportId: any; + maxAge?: string; +} diff --git a/lending/src/sdk/models/DownloadCreditModelExcelRequest.ts b/lending/src/sdk/models/DownloadCreditModelExcelRequest.ts new file mode 100644 index 000000000..4131828bc --- /dev/null +++ b/lending/src/sdk/models/DownloadCreditModelExcelRequest.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/* eslint-disable */ + +export interface DownloadCreditModelExcelRequest { + companyId: string; + reportId: any; + maxAge?: string; +} diff --git a/lending/src/sdk/models/ErrorMessage.ts b/lending/src/sdk/models/ErrorMessage.ts new file mode 100644 index 000000000..ebef9dfdf --- /dev/null +++ b/lending/src/sdk/models/ErrorMessage.ts @@ -0,0 +1,166 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { ErrorValidation } from './shared/errorvalidation'; +import { + ErrorValidationFromJSON, + ErrorValidationFromJSONTyped, + ErrorValidationToJSON, + ErrorValidationToJSONTyped, +} from './shared/errorvalidation'; + +/** + * + * @export + * @interface ErrorMessage + */ +export interface ErrorMessage { + /** + * The HTTP status code returned by the error. + * @type {number} + * @memberof ErrorMessage + */ + statusCode?: number; + /** + * Codat's service the returned the error. + * @type {string} + * @memberof ErrorMessage + */ + service?: string; + /** + * A brief description of the error. + * @type {string} + * @memberof ErrorMessage + */ + error?: string; + /** + * Unique identifier used to propagate to all downstream services and determine the source of the error. + * @type {string} + * @memberof ErrorMessage + */ + correlationId?: string; + /** + * + * @type {ErrorValidation} + * @memberof ErrorMessage + */ + validation?: ErrorValidation | null; + /** + * `True` if the error occurred transiently and can be retried. + * @type {string} + * @memberof ErrorMessage + */ + canBeRetried?: string; + /** + * Machine readable error code used to automate processes based on the code returned. + * @type {number} + * @memberof ErrorMessage + */ + detailedErrorCode?: number; +} + +/** + * Check if a given object implements the ErrorMessage interface. + */ +export function instanceOfErrorMessage(value: object): value is ErrorMessage { + return true; +} + +export function ErrorMessageFromJSON(json: any): ErrorMessage { + return ErrorMessageFromJSONTyped(json, false); +} + +export function ErrorMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorMessage { + if (json == null) { + return json; + } + return { + + 'statusCode': json['statusCode'] == null ? undefined : json['statusCode'], + 'service': json['service'] == null ? undefined : json['service'], + 'error': json['error'] == null ? undefined : json['error'], + 'correlationId': json['correlationId'] == null ? undefined : json['correlationId'], + 'validation': json['validation'] == null ? undefined : ErrorValidationFromJSON(json['validation']), + 'canBeRetried': json['canBeRetried'] == null ? undefined : json['canBeRetried'], + 'detailedErrorCode': json['detailedErrorCode'] == null ? undefined : json['detailedErrorCode'], + }; +} + +export function ErrorMessageToJSON(json: any): ErrorMessage { + return ErrorMessageToJSONTyped(json, false); +} + +export function ErrorMessageToJSONTyped(value?: ErrorMessage | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'statusCode': value['statusCode'], + 'service': value['service'], + 'error': value['error'], + 'correlationId': value['correlationId'], + 'validation': ErrorValidationToJSON(value['validation']), + 'canBeRetried': value['canBeRetried'], + 'detailedErrorCode': value['detailedErrorCode'], + }; +} + + +export interface ErrorMessageData { + /** + * The HTTP status code returned by the error. + * @type {number} + * @memberof ErrorMessage + */ + statusCode?: number; + /** + * Codat's service the returned the error. + * @type {string} + * @memberof ErrorMessage + */ + service?: string; + /** + * A brief description of the error. + * @type {string} + * @memberof ErrorMessage + */ + error?: string; + /** + * Unique identifier used to propagate to all downstream services and determine the source of the error. + * @type {string} + * @memberof ErrorMessage + */ + correlationId?: string; + /** + * + * @type {ErrorValidation} + * @memberof ErrorMessage + */ + validation?: ErrorValidation | null; + /** + * `True` if the error occurred transiently and can be retried. + * @type {string} + * @memberof ErrorMessage + */ + canBeRetried?: string; + /** + * Machine readable error code used to automate processes based on the code returned. + * @type {number} + * @memberof ErrorMessage + */ + detailedErrorCode?: number; +} diff --git a/lending/src/sdk/models/FinancialSummary.ts b/lending/src/sdk/models/FinancialSummary.ts new file mode 100644 index 000000000..a3d20a8ee --- /dev/null +++ b/lending/src/sdk/models/FinancialSummary.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { FinancialSummaryBooksClosedDate } from './FinancialSummaryBooksClosedDate'; +import { + FinancialSummaryBooksClosedDateFromJSON, + FinancialSummaryBooksClosedDateFromJSONTyped, + FinancialSummaryBooksClosedDateToJSON, + FinancialSummaryBooksClosedDateToJSONTyped, +} from './FinancialSummaryBooksClosedDate'; +import type { FinancialSummaryAccountingScore } from './FinancialSummaryAccountingScore'; +import { + FinancialSummaryAccountingScoreFromJSON, + FinancialSummaryAccountingScoreFromJSONTyped, + FinancialSummaryAccountingScoreToJSON, + FinancialSummaryAccountingScoreToJSONTyped, +} from './FinancialSummaryAccountingScore'; + +/** + * + * @export + * @interface FinancialSummary + */ +export interface FinancialSummary { + /** + * + * @type {FinancialSummaryBooksClosedDate} + * @memberof FinancialSummary + */ + booksClosedDate?: FinancialSummaryBooksClosedDate; + /** + * + * @type {FinancialSummaryAccountingScore} + * @memberof FinancialSummary + */ + accountingScore?: FinancialSummaryAccountingScore; +} + +/** + * Check if a given object implements the FinancialSummary interface. + */ +export function instanceOfFinancialSummary(value: object): value is FinancialSummary { + return true; +} + +export function FinancialSummaryFromJSON(json: any): FinancialSummary { + return FinancialSummaryFromJSONTyped(json, false); +} + +export function FinancialSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FinancialSummary { + if (json == null) { + return json; + } + return { + + 'booksClosedDate': json['booksClosedDate'] == null ? undefined : FinancialSummaryBooksClosedDateFromJSON(json['booksClosedDate']), + 'accountingScore': json['accountingScore'] == null ? undefined : FinancialSummaryAccountingScoreFromJSON(json['accountingScore']), + }; +} + +export function FinancialSummaryToJSON(json: any): FinancialSummary { + return FinancialSummaryToJSONTyped(json, false); +} + +export function FinancialSummaryToJSONTyped(value?: FinancialSummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'booksClosedDate': FinancialSummaryBooksClosedDateToJSON(value['booksClosedDate']), + 'accountingScore': FinancialSummaryAccountingScoreToJSON(value['accountingScore']), + }; +} + + +export interface ClosedBooksIndicator { + /** + * + * @type {FinancialSummaryBooksClosedDate} + * @memberof FinancialSummary + */ + booksClosedDate?: FinancialSummaryBooksClosedDate; + /** + * + * @type {FinancialSummaryAccountingScore} + * @memberof FinancialSummary + */ + accountingScore?: FinancialSummaryAccountingScore; +} + +export interface FinancialSummaryClosedBooksIndicator { + /** + * + * @type {FinancialSummaryBooksClosedDate} + * @memberof FinancialSummary + */ + booksClosedDate?: FinancialSummaryBooksClosedDate; + /** + * + * @type {FinancialSummaryAccountingScore} + * @memberof FinancialSummary + */ + accountingScore?: FinancialSummaryAccountingScore; +} + +export interface FinancialSummaryGetResponseClosedBooksIndicator { + /** + * + * @type {FinancialSummaryBooksClosedDate} + * @memberof FinancialSummary + */ + booksClosedDate?: FinancialSummaryBooksClosedDate; + /** + * + * @type {FinancialSummaryAccountingScore} + * @memberof FinancialSummary + */ + accountingScore?: FinancialSummaryAccountingScore; +} + +export interface FinancialSummaryGetResponseFinancialSummary { + /** + * + * @type {FinancialSummaryBooksClosedDate} + * @memberof FinancialSummary + */ + booksClosedDate?: FinancialSummaryBooksClosedDate; + /** + * + * @type {FinancialSummaryAccountingScore} + * @memberof FinancialSummary + */ + accountingScore?: FinancialSummaryAccountingScore; +} + +export interface GetFinancialSummaryResponseClosedBooksIndicator { + /** + * + * @type {FinancialSummaryBooksClosedDate} + * @memberof FinancialSummary + */ + booksClosedDate?: FinancialSummaryBooksClosedDate; + /** + * + * @type {FinancialSummaryAccountingScore} + * @memberof FinancialSummary + */ + accountingScore?: FinancialSummaryAccountingScore; +} + +export interface GetFinancialSummaryResponseFinancialSummary { + /** + * + * @type {FinancialSummaryBooksClosedDate} + * @memberof FinancialSummary + */ + booksClosedDate?: FinancialSummaryBooksClosedDate; + /** + * + * @type {FinancialSummaryAccountingScore} + * @memberof FinancialSummary + */ + accountingScore?: FinancialSummaryAccountingScore; +} diff --git a/lending/src/sdk/models/FinancialSummaryAccountingScore.ts b/lending/src/sdk/models/FinancialSummaryAccountingScore.ts new file mode 100644 index 000000000..e9e060b31 --- /dev/null +++ b/lending/src/sdk/models/FinancialSummaryAccountingScore.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../runtime'; +/** + * A score based on data completeness, accuracy, consistency, and presentation of data and the reasons for the score. + * @export + * @interface FinancialSummaryAccountingScore + */ +export interface FinancialSummaryAccountingScore { + /** + * The accounting score value. + * @type {string} + * @memberof FinancialSummaryAccountingScore + */ + score?: Decimal | number; + /** + * List of reasons explaining the accounting score. + * @type {Array} + * @memberof FinancialSummaryAccountingScore + */ + reason?: Array; +} + +/** + * Check if a given object implements the FinancialSummaryAccountingScore interface. + */ +export function instanceOfFinancialSummaryAccountingScore(value: object): value is FinancialSummaryAccountingScore { + return true; +} + +export function FinancialSummaryAccountingScoreFromJSON(json: any): FinancialSummaryAccountingScore { + return FinancialSummaryAccountingScoreFromJSONTyped(json, false); +} + +export function FinancialSummaryAccountingScoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): FinancialSummaryAccountingScore { + if (json == null) { + return json; + } + return { + + 'score': json['score'] == null ? undefined : toDecimal(json['score']), + 'reason': json['reason'] == null ? undefined : json['reason'], + }; +} + +export function FinancialSummaryAccountingScoreToJSON(json: any): FinancialSummaryAccountingScore { + return FinancialSummaryAccountingScoreToJSONTyped(json, false); +} + +export function FinancialSummaryAccountingScoreToJSONTyped(value?: FinancialSummaryAccountingScore | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'score': fromDecimal(value['score']), + 'reason': value['reason'], + }; +} + + +export interface AccountingScore { + /** + * The accounting score value. + * @type {string} + * @memberof FinancialSummaryAccountingScore + */ + score?: Decimal | number; + /** + * List of reasons explaining the accounting score. + * @type {Array} + * @memberof FinancialSummaryAccountingScore + */ + reason?: Array; +} diff --git a/lending/src/sdk/models/FinancialSummaryBooksClosedDate.ts b/lending/src/sdk/models/FinancialSummaryBooksClosedDate.ts new file mode 100644 index 000000000..2ea911f2f --- /dev/null +++ b/lending/src/sdk/models/FinancialSummaryBooksClosedDate.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * The date time in UTC the books closed. + * @export + * @interface FinancialSummaryBooksClosedDate + */ +export interface FinancialSummaryBooksClosedDate { + /** + * The date time in UTC the books closed. + * @type {string} + * @memberof FinancialSummaryBooksClosedDate + */ + date?: Date; + /** + * List of reasons explaining the books closed date. + * @type {Array} + * @memberof FinancialSummaryBooksClosedDate + */ + reason?: Array; +} + +/** + * Check if a given object implements the FinancialSummaryBooksClosedDate interface. + */ +export function instanceOfFinancialSummaryBooksClosedDate(value: object): value is FinancialSummaryBooksClosedDate { + return true; +} + +export function FinancialSummaryBooksClosedDateFromJSON(json: any): FinancialSummaryBooksClosedDate { + return FinancialSummaryBooksClosedDateFromJSONTyped(json, false); +} + +export function FinancialSummaryBooksClosedDateFromJSONTyped(json: any, ignoreDiscriminator: boolean): FinancialSummaryBooksClosedDate { + if (json == null) { + return json; + } + return { + + 'date': json['date'] == null ? undefined : json['date'], + 'reason': json['reason'] == null ? undefined : json['reason'], + }; +} + +export function FinancialSummaryBooksClosedDateToJSON(json: any): FinancialSummaryBooksClosedDate { + return FinancialSummaryBooksClosedDateToJSONTyped(json, false); +} + +export function FinancialSummaryBooksClosedDateToJSONTyped(value?: FinancialSummaryBooksClosedDate | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'date': value['date'], + 'reason': value['reason'], + }; +} + + +export interface BooksClosedDate { + /** + * The date time in UTC the books closed. + * @type {string} + * @memberof FinancialSummaryBooksClosedDate + */ + date?: Date; + /** + * List of reasons explaining the books closed date. + * @type {Array} + * @memberof FinancialSummaryBooksClosedDate + */ + reason?: Array; +} diff --git a/lending/src/sdk/models/GetCategorizedBankStatementTransactionsRequest.ts b/lending/src/sdk/models/GetCategorizedBankStatementTransactionsRequest.ts new file mode 100644 index 000000000..0cd930442 --- /dev/null +++ b/lending/src/sdk/models/GetCategorizedBankStatementTransactionsRequest.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ + +export interface GetCategorizedBankStatementTransactionsRequest { + companyId: string; + reportId: any; + maxAge?: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} diff --git a/lending/src/sdk/models/GetFinancialSummaryRequest.ts b/lending/src/sdk/models/GetFinancialSummaryRequest.ts new file mode 100644 index 000000000..e986849e2 --- /dev/null +++ b/lending/src/sdk/models/GetFinancialSummaryRequest.ts @@ -0,0 +1,7 @@ +/* tslint:disable */ +/* eslint-disable */ + +export interface GetFinancialSummaryRequest { + companyId: string; + reportId: any; +} diff --git a/lending/src/sdk/models/GetReportStatusReportIdParameter.ts b/lending/src/sdk/models/GetReportStatusReportIdParameter.ts new file mode 100644 index 000000000..7050fd2ac --- /dev/null +++ b/lending/src/sdk/models/GetReportStatusReportIdParameter.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * @type GetReportStatusReportIdParameter + * + * @export + */ +export type GetReportStatusReportIdParameter = string; + +export function GetReportStatusReportIdParameterFromJSON(json: any): GetReportStatusReportIdParameter { + return GetReportStatusReportIdParameterFromJSONTyped(json, false); +} + +export function GetReportStatusReportIdParameterFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetReportStatusReportIdParameter { + if (json == null) { + return json; + } + + return {} as any; +} + +export function GetReportStatusReportIdParameterToJSON(json: any): any { + return GetReportStatusReportIdParameterToJSONTyped(json, false); +} + +export function GetReportStatusReportIdParameterToJSONTyped(value?: GetReportStatusReportIdParameter | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + + return {}; +} + diff --git a/lending/src/sdk/models/GetReportStatusRequest.ts b/lending/src/sdk/models/GetReportStatusRequest.ts new file mode 100644 index 000000000..1fb777598 --- /dev/null +++ b/lending/src/sdk/models/GetReportStatusRequest.ts @@ -0,0 +1,11 @@ +/* tslint:disable */ + +import type { ReportType } from './_speakeasy_enums'; +/* eslint-disable */ + +export interface GetReportStatusRequest { + companyId: string; + reportType: ReportType; + reportId: any; + maxAge?: string; +} diff --git a/lending/src/sdk/models/JournalPrototype.ts b/lending/src/sdk/models/JournalPrototype.ts new file mode 100644 index 000000000..9c7eab72e --- /dev/null +++ b/lending/src/sdk/models/JournalPrototype.ts @@ -0,0 +1,533 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { JournalStatus } from './shared/journalstatus'; +import { + JournalStatusFromJSON, + JournalStatusFromJSONTyped, + JournalStatusToJSON, + JournalStatusToJSONTyped, +} from './shared/journalstatus'; + +/** + * + * @export + * @interface JournalPrototype + */ +export interface JournalPrototype { + /** + * Native journal number or code. + * @type {string} + * @memberof JournalPrototype + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof JournalPrototype + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof JournalPrototype + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof JournalPrototype + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof JournalPrototype + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof JournalPrototype + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof JournalPrototype + */ + status?: JournalStatus; +} + + + +/** + * Check if a given object implements the JournalPrototype interface. + */ +export function instanceOfJournalPrototype(value: object): value is JournalPrototype { + return true; +} + +export function JournalPrototypeFromJSON(json: any): JournalPrototype { + return JournalPrototypeFromJSONTyped(json, false); +} + +export function JournalPrototypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalPrototype { + if (json == null) { + return json; + } + return { + + 'journalCode': json['journalCode'] == null ? undefined : json['journalCode'], + 'name': json['name'] == null ? undefined : json['name'], + 'type': json['type'] == null ? undefined : json['type'], + 'parentId': json['parentId'] == null ? undefined : json['parentId'], + 'hasChildren': json['hasChildren'] == null ? undefined : json['hasChildren'], + 'createdOn': json['createdOn'] == null ? undefined : json['createdOn'], + 'status': json['status'] == null ? undefined : JournalStatusFromJSON(json['status']), + }; +} + +export function JournalPrototypeToJSON(json: any): JournalPrototype { + return JournalPrototypeToJSONTyped(json, false); +} + +export function JournalPrototypeToJSONTyped(value?: JournalPrototype | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'journalCode': value['journalCode'], + 'name': value['name'], + 'type': value['type'], + 'parentId': value['parentId'], + 'hasChildren': value['hasChildren'], + 'createdOn': value['createdOn'], + 'status': JournalStatusToJSON(value['status']), + }; +} + + +export interface AccountingJournalGetResponseJournalPrototype { + /** + * Native journal number or code. + * @type {string} + * @memberof JournalPrototype + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof JournalPrototype + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof JournalPrototype + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof JournalPrototype + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof JournalPrototype + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof JournalPrototype + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof JournalPrototype + */ + status?: JournalStatus; +} + +export interface AccountingJournalJournalPrototype { + /** + * Native journal number or code. + * @type {string} + * @memberof JournalPrototype + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof JournalPrototype + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof JournalPrototype + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof JournalPrototype + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof JournalPrototype + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof JournalPrototype + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof JournalPrototype + */ + status?: JournalStatus; +} + +export interface AccountingJournalsJournalPrototype { + /** + * Native journal number or code. + * @type {string} + * @memberof JournalPrototype + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof JournalPrototype + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof JournalPrototype + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof JournalPrototype + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof JournalPrototype + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof JournalPrototype + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof JournalPrototype + */ + status?: JournalStatus; +} + +export interface AccountingJournalsListResponseJournalPrototype { + /** + * Native journal number or code. + * @type {string} + * @memberof JournalPrototype + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof JournalPrototype + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof JournalPrototype + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof JournalPrototype + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof JournalPrototype + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof JournalPrototype + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof JournalPrototype + */ + status?: JournalStatus; +} + +export interface GetAccountingJournalResponseJournalPrototype { + /** + * Native journal number or code. + * @type {string} + * @memberof JournalPrototype + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof JournalPrototype + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof JournalPrototype + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof JournalPrototype + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof JournalPrototype + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof JournalPrototype + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof JournalPrototype + */ + status?: JournalStatus; +} + +export interface ListAccountingJournalsResponseJournalPrototype { + /** + * Native journal number or code. + * @type {string} + * @memberof JournalPrototype + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof JournalPrototype + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof JournalPrototype + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof JournalPrototype + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof JournalPrototype + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof JournalPrototype + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof JournalPrototype + */ + status?: JournalStatus; +} diff --git a/lending/src/sdk/models/ListCategorizedBankStatementAccountsRequest.ts b/lending/src/sdk/models/ListCategorizedBankStatementAccountsRequest.ts new file mode 100644 index 000000000..615f34253 --- /dev/null +++ b/lending/src/sdk/models/ListCategorizedBankStatementAccountsRequest.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCategorizedBankStatementAccountsRequest { + companyId: string; + reportId: any; + maxAge?: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; +} diff --git a/lending/src/sdk/models/Model0.ts b/lending/src/sdk/models/Model0.ts new file mode 100644 index 000000000..41a06baeb --- /dev/null +++ b/lending/src/sdk/models/Model0.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * + * @export + * @interface Model0 + */ +export interface Model0 { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof Model0 + */ + id: string; +} + +/** + * Check if a given object implements the Model0 interface. + */ +export function instanceOfModel0(value: object): value is Model0 { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function Model0FromJSON(json: any): Model0 { + return Model0FromJSONTyped(json, false); +} + +export function Model0FromJSONTyped(json: any, ignoreDiscriminator: boolean): Model0 { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + }; +} + +export function Model0ToJSON(json: any): Model0 { + return Model0ToJSONTyped(json, false); +} + +export function Model0ToJSONTyped(value?: Model0 | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + }; +} + diff --git a/lending/src/sdk/models/Model3.ts b/lending/src/sdk/models/Model3.ts new file mode 100644 index 000000000..7bf9c2aac --- /dev/null +++ b/lending/src/sdk/models/Model3.ts @@ -0,0 +1,87 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * + * @export + * @interface Model3 + */ +export interface Model3 { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof Model3 + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof Model3 + */ + sourceModifiedDate?: string; +} + +/** + * Check if a given object implements the Model3 interface. + */ +export function instanceOfModel3(value: object): value is Model3 { + return true; +} + +export function Model3FromJSON(json: any): Model3 { + return Model3FromJSONTyped(json, false); +} + +export function Model3FromJSONTyped(json: any, ignoreDiscriminator: boolean): Model3 { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function Model3ToJSON(json: any): Model3 { + return Model3ToJSONTyped(json, false); +} + +export function Model3ToJSONTyped(value?: Model3 | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + diff --git a/lending/src/sdk/models/ModelFile.ts b/lending/src/sdk/models/ModelFile.ts new file mode 100644 index 000000000..9d64f853e --- /dev/null +++ b/lending/src/sdk/models/ModelFile.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +/** + * + * @export + * @interface ModelFile + */ +export interface ModelFile { + [key: string]: any | any; + /** + * The file's name. + * @type {string} + * @memberof ModelFile + */ + fileName?: string; + /** + * An optional display name for the file. + * @type {string} + * @memberof ModelFile + */ + displayName?: string; + /** + * The source of the file uploaded. + * @type {string} + * @memberof ModelFile + */ + sourceType?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ModelFile + */ + uploaded?: string; +} + +/** + * Check if a given object implements the ModelFile interface. + */ +export function instanceOfModelFile(value: object): value is ModelFile { + return true; +} + +export function ModelFileFromJSON(json: any): ModelFile { + return ModelFileFromJSONTyped(json, false); +} + +export function ModelFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelFile { + if (json == null) { + return json; + } + return { + + ...json, + 'fileName': json['fileName'] == null ? undefined : json['fileName'], + 'displayName': json['displayName'] == null ? undefined : json['displayName'], + 'sourceType': json['sourceType'] == null ? undefined : json['sourceType'], + 'uploaded': json['uploaded'] == null ? undefined : json['uploaded'], + }; +} + +export function ModelFileToJSON(json: any): ModelFile { + return ModelFileToJSONTyped(json, false); +} + +export function ModelFileToJSONTyped(value?: ModelFile | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'fileName': value['fileName'], + 'displayName': value['displayName'], + 'sourceType': value['sourceType'], + 'uploaded': value['uploaded'], + }; +} + + +export interface FileT { + [key: string]: any | any; + /** + * The file's name. + * @type {string} + * @memberof ModelFile + */ + fileName?: string; + /** + * An optional display name for the file. + * @type {string} + * @memberof ModelFile + */ + displayName?: string; + /** + * The source of the file uploaded. + * @type {string} + * @memberof ModelFile + */ + sourceType?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ModelFile + */ + uploaded?: string; +} diff --git a/lending/src/sdk/models/PagingInfo.ts b/lending/src/sdk/models/PagingInfo.ts new file mode 100644 index 000000000..566989476 --- /dev/null +++ b/lending/src/sdk/models/PagingInfo.ts @@ -0,0 +1,6473 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { Links } from './shared/links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './shared/links'; + +/** + * + * @export + * @interface PagingInfo + */ +export interface PagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +/** + * Check if a given object implements the PagingInfo interface. + */ +export function instanceOfPagingInfo(value: object): value is PagingInfo { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function PagingInfoFromJSON(json: any): PagingInfo { + return PagingInfoFromJSONTyped(json, false); +} + +export function PagingInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PagingInfo { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + }; +} + +export function PagingInfoToJSON(json: any): PagingInfo { + return PagingInfoToJSONTyped(json, false); +} + +export function PagingInfoToJSONTyped(value?: PagingInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + }; +} + + +export interface AccountingAccountTransactionsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountTransactionsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountTransactionsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountTransactionsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountingBankTransactionsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountingBankTransactionsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingAccountsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBankAccountTransactionsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBankAccountTransactionsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBankAccountsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBankAccountsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBankAccountsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBankAccountsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBankTransactionsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBankTransactionsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillCreditNotesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillCreditNotesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillCreditNotesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillCreditNotesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillPaymentsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillPaymentsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillPaymentsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillPaymentsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingBillsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingCreditNotesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingCreditNotesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingCreditNotesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingCreditNotesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingCustomersListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingCustomersListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingCustomersPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingCustomersPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingDirectCostsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingDirectCostsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingDirectCostsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingDirectCostsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingDirectIncomesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingDirectIncomesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingDirectIncomesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingDirectIncomesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingInvoicesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingInvoicesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingInvoicesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingInvoicesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingJournalEntriesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingJournalEntriesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingJournalEntriesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingJournalEntriesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingJournalsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingJournalsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingJournalsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingJournalsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingPaymentsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingPaymentsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingPaymentsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingPaymentsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingSuppliersListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingSuppliersListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingSuppliersPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingSuppliersPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingTransfersListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingTransfersListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingTransfersPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface AccountingTransfersPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingAccountBalancesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingAccountBalancesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingAccountBalancesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingAccountBalancesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingAccountsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingAccountsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingAccountsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingAccountsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingBankAccountsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingBankAccountsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingTransactionCategoriesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingTransactionCategoriesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingTransactionCategoriesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingTransactionCategoriesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingTransactionsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingTransactionsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingTransactionsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface BankingTransactionsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CategorizedBankStatementAccountsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CategorizedBankStatementAccountsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CategorizedBankStatementAccountsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CategorizedBankStatementAccountsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CategorizedBankStatementTransactionsGetResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CategorizedBankStatementTransactionsGetResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CategorizedBankStatementTransactionsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CategorizedBankStatementTransactionsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceCustomersListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceCustomersListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceCustomersPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceCustomersPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceDisputesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceDisputesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceDisputesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceDisputesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceLocationsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceLocationsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceLocationsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceLocationsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceOrdersListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceOrdersListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceOrdersPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceOrdersPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommercePaymentMethodsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommercePaymentMethodsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommercePaymentMethodsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommercePaymentMethodsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommercePaymentsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommercePaymentsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommercePaymentsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommercePaymentsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceProductCategoriesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceProductCategoriesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceProductCategoriesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceProductCategoriesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceProductsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceProductsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceProductsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceProductsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceTransactionsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceTransactionsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceTransactionsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CommerceTransactionsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CompaniesListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CompaniesListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CompaniesPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CompaniesPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ConnectionsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ConnectionsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ConnectionsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ConnectionsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CreateOperationsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface CreateOperationsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface DataIntegrityDetailsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface DataIntegrityDetailsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface DataIntegrityDetailsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface DataIntegrityDetailsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface GetCategorizedBankStatementTransactionsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface GetCategorizedBankStatementTransactionsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingAccountTransactionsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingAccountTransactionsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingAccountsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingAccountsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBankAccountTransactionsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBankAccountTransactionsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBankAccountsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBankAccountsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBillCreditNotesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBillCreditNotesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBillPaymentsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBillPaymentsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBillsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingBillsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingCreditNotesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingCreditNotesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingCustomersResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingCustomersResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingDirectCostsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingDirectCostsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingDirectIncomesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingDirectIncomesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingInvoicesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingInvoicesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingJournalEntriesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingJournalEntriesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingJournalsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingJournalsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingPaymentsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingPaymentsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingSuppliersResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingSuppliersResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingTransfersResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListAccountingTransfersResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListBankingAccountBalancesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListBankingAccountBalancesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListBankingAccountsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListBankingAccountsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListBankingTransactionCategoriesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListBankingTransactionCategoriesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListBankingTransactionsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListBankingTransactionsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCategorizedBankStatementAccountsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCategorizedBankStatementAccountsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceCustomersResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceCustomersResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceDisputesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceDisputesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceLocationsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceLocationsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceOrdersResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceOrdersResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommercePaymentMethodsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommercePaymentMethodsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommercePaymentsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommercePaymentsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceProductCategoriesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceProductCategoriesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceProductsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceProductsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceTransactionsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCommerceTransactionsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCompaniesResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCompaniesResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListConnectionsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListConnectionsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCreateOperationsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListCreateOperationsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListDataIntegrityDetailsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListDataIntegrityDetailsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListPullOperationsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListPullOperationsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListReportsResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ListReportsResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface PaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface PagingInfoPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface PullOperationsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface PullOperationsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface PullOperationsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface PullOperationsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface PushOperationsPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface PushOperationsPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ReportsListResponsePaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface ReportsListResponsePagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface SuppliersPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface SuppliersPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface UploadBankStatementDataRequestBodyPaginationInformation { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} + +export interface UploadBankStatementDataRequestBodyPagingInfo { + /** + * Current page number. + * @type {number} + * @memberof PagingInfo + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PagingInfo + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PagingInfo + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PagingInfo + */ + links: Links; +} diff --git a/lending/src/sdk/models/PaymentMethodType.ts b/lending/src/sdk/models/PaymentMethodType.ts new file mode 100644 index 000000000..eab8205c1 --- /dev/null +++ b/lending/src/sdk/models/PaymentMethodType.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Method of payment. + * @export + */ +export const PaymentMethodType = { + Unknown: 'Unknown', + Cash: 'Cash', + Check: 'Check', + CreditCard: 'CreditCard', + DebitCard: 'DebitCard', + BankTransfer: 'BankTransfer', + Other: 'Other' +} as const; +export type PaymentMethodType = typeof PaymentMethodType[keyof typeof PaymentMethodType]; + + +export function instanceOfPaymentMethodType(value: any): boolean { + for (const key in PaymentMethodType) { + if (Object.prototype.hasOwnProperty.call(PaymentMethodType, key)) { + if (PaymentMethodType[key as keyof typeof PaymentMethodType] === value) { + return true; + } + } + } + return false; +} + +export function PaymentMethodTypeFromJSON(json: any): PaymentMethodType { + return PaymentMethodTypeFromJSONTyped(json, false); +} + +export function PaymentMethodTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentMethodType { + return json as PaymentMethodType; +} + +export function PaymentMethodTypeToJSON(value?: PaymentMethodType | null): any { + return value as any; +} + +export function PaymentMethodTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentMethodType { + return value as PaymentMethodType; +} + diff --git a/lending/src/sdk/models/UpdateConnection.ts b/lending/src/sdk/models/UpdateConnection.ts new file mode 100644 index 000000000..a4171ccbb --- /dev/null +++ b/lending/src/sdk/models/UpdateConnection.ts @@ -0,0 +1,108 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../runtime'; +import type { DataConnectionStatus } from './shared/dataconnectionstatus'; +import { + DataConnectionStatusFromJSON, + DataConnectionStatusFromJSONTyped, + DataConnectionStatusToJSON, + DataConnectionStatusToJSONTyped, +} from './shared/dataconnectionstatus'; + +/** + * + * @export + * @interface UpdateConnection + */ +export interface UpdateConnection { + [key: string]: any | any; + /** + * The current authorization status of the data connection. + * @type {DataConnectionStatus} + * @memberof UpdateConnection + */ + status?: DataConnectionStatus; +} + + + +/** + * Check if a given object implements the UpdateConnection interface. + */ +export function instanceOfUpdateConnection(value: object): value is UpdateConnection { + return true; +} + +export function UpdateConnectionFromJSON(json: any): UpdateConnection { + return UpdateConnectionFromJSONTyped(json, false); +} + +export function UpdateConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateConnection { + if (json == null) { + return json; + } + return { + + ...json, + 'status': json['status'] == null ? undefined : DataConnectionStatusFromJSON(json['status']), + }; +} + +export function UpdateConnectionToJSON(json: any): UpdateConnection { + return UpdateConnectionToJSONTyped(json, false); +} + +export function UpdateConnectionToJSONTyped(value?: UpdateConnection | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'status': DataConnectionStatusToJSON(value['status']), + }; +} + + +export interface ConnectionUnlinkRequestBody { + [key: string]: any | any; + /** + * The current authorization status of the data connection. + * @type {DataConnectionStatus} + * @memberof UpdateConnection + */ + status?: DataConnectionStatus; +} + +export interface UnlinkConnectionRequestBody { + [key: string]: any | any; + /** + * The current authorization status of the data connection. + * @type {DataConnectionStatus} + * @memberof UpdateConnection + */ + status?: DataConnectionStatus; +} + +export interface UnlinkConnectionUpdateConnection { + [key: string]: any | any; + /** + * The current authorization status of the data connection. + * @type {DataConnectionStatus} + * @memberof UpdateConnection + */ + status?: DataConnectionStatus; +} diff --git a/lending/src/sdk/models/_speakeasy_enums.ts b/lending/src/sdk/models/_speakeasy_enums.ts new file mode 100644 index 000000000..0e167dfa8 --- /dev/null +++ b/lending/src/sdk/models/_speakeasy_enums.ts @@ -0,0 +1,11744 @@ +/* tslint:disable */ +/* eslint-disable */ + +export const AccountIdentifierTypeAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type AccountIdentifierTypeAccountIdentifierType = (typeof AccountIdentifierTypeAccountIdentifierType)[keyof typeof AccountIdentifierTypeAccountIdentifierType]; +export const AccountIdentifiersAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type AccountIdentifiersAccountIdentifierType = (typeof AccountIdentifiersAccountIdentifierType)[keyof typeof AccountIdentifiersAccountIdentifierType]; +export const AccountIdentifiersTypeAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type AccountIdentifiersTypeAccountIdentifierType = (typeof AccountIdentifiersTypeAccountIdentifierType)[keyof typeof AccountIdentifiersTypeAccountIdentifierType]; +export const AccountPrototypeAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountPrototypeAccountStatus = (typeof AccountPrototypeAccountStatus)[keyof typeof AccountPrototypeAccountStatus]; +export const AccountPrototypeAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountPrototypeAccountType = (typeof AccountPrototypeAccountType)[keyof typeof AccountPrototypeAccountType]; +export const AccountPrototypeStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountPrototypeStatusAccountStatus = (typeof AccountPrototypeStatusAccountStatus)[keyof typeof AccountPrototypeStatusAccountStatus]; +export const AccountPrototypeTypeAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountPrototypeTypeAccountType = (typeof AccountPrototypeTypeAccountType)[keyof typeof AccountPrototypeTypeAccountType]; +export const AccountStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountStatusAccountStatus = (typeof AccountStatusAccountStatus)[keyof typeof AccountStatusAccountStatus]; +export const AccountTransactionLineDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountTransactionLineDataType = (typeof AccountTransactionLineDataType)[keyof typeof AccountTransactionLineDataType]; +export const AccountTransactionLineRecordRefDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountTransactionLineRecordRefDataType = (typeof AccountTransactionLineRecordRefDataType)[keyof typeof AccountTransactionLineRecordRefDataType]; +export const AccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountType = (typeof AccountType)[keyof typeof AccountType]; +export const AccountType1 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type AccountType1 = (typeof AccountType1)[keyof typeof AccountType1]; +export const AccountType2 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type AccountType2 = (typeof AccountType2)[keyof typeof AccountType2]; +export const AccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type AccountTypeAccountingBankAccountType = (typeof AccountTypeAccountingBankAccountType)[keyof typeof AccountTypeAccountingBankAccountType]; +export const AccountingAccountAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingAccountAccountStatus = (typeof AccountingAccountAccountStatus)[keyof typeof AccountingAccountAccountStatus]; +export const AccountingAccountAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountingAccountAccountType = (typeof AccountingAccountAccountType)[keyof typeof AccountingAccountAccountType]; +export const AccountingAccountStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingAccountStatusAccountStatus = (typeof AccountingAccountStatusAccountStatus)[keyof typeof AccountingAccountStatusAccountStatus]; +export const AccountingAccountTransactionDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountingAccountTransactionDataType = (typeof AccountingAccountTransactionDataType)[keyof typeof AccountingAccountTransactionDataType]; +export const AccountingAccountTransactionRecordRefDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountingAccountTransactionRecordRefDataType = (typeof AccountingAccountTransactionRecordRefDataType)[keyof typeof AccountingAccountTransactionRecordRefDataType]; +export const AccountingAccountTransactionStatus = { + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type AccountingAccountTransactionStatus = (typeof AccountingAccountTransactionStatus)[keyof typeof AccountingAccountTransactionStatus]; +export const AccountingAccountTransactionsDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountingAccountTransactionsDataType = (typeof AccountingAccountTransactionsDataType)[keyof typeof AccountingAccountTransactionsDataType]; +export const AccountingAccountTransactionsRecordRefDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountingAccountTransactionsRecordRefDataType = (typeof AccountingAccountTransactionsRecordRefDataType)[keyof typeof AccountingAccountTransactionsRecordRefDataType]; +export const AccountingAccountTransactionsResultsDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountingAccountTransactionsResultsDataType = (typeof AccountingAccountTransactionsResultsDataType)[keyof typeof AccountingAccountTransactionsResultsDataType]; +export const AccountingAccountTransactionsResultsStatus = { + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type AccountingAccountTransactionsResultsStatus = (typeof AccountingAccountTransactionsResultsStatus)[keyof typeof AccountingAccountTransactionsResultsStatus]; +export const AccountingAccountTransactionsStatus = { + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type AccountingAccountTransactionsStatus = (typeof AccountingAccountTransactionsStatus)[keyof typeof AccountingAccountTransactionsStatus]; +export const AccountingAccountTypeAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountingAccountTypeAccountType = (typeof AccountingAccountTypeAccountType)[keyof typeof AccountingAccountTypeAccountType]; +export const AccountingAccountsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingAccountsAccountStatus = (typeof AccountingAccountsAccountStatus)[keyof typeof AccountingAccountsAccountStatus]; +export const AccountingAccountsAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountingAccountsAccountType = (typeof AccountingAccountsAccountType)[keyof typeof AccountingAccountsAccountType]; +export const AccountingAccountsResultsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingAccountsResultsAccountStatus = (typeof AccountingAccountsResultsAccountStatus)[keyof typeof AccountingAccountsResultsAccountStatus]; +export const AccountingAccountsResultsAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountingAccountsResultsAccountType = (typeof AccountingAccountsResultsAccountType)[keyof typeof AccountingAccountsResultsAccountType]; +export const AccountingAccountsStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingAccountsStatusAccountStatus = (typeof AccountingAccountsStatusAccountStatus)[keyof typeof AccountingAccountsStatusAccountStatus]; +export const AccountingAccountsTypeAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountingAccountsTypeAccountType = (typeof AccountingAccountsTypeAccountType)[keyof typeof AccountingAccountsTypeAccountType]; +export const AccountingAddressAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingAddressAccountingAddressType = (typeof AccountingAddressAccountingAddressType)[keyof typeof AccountingAddressAccountingAddressType]; +export const AccountingAddressTypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingAddressTypeAccountingAddressType = (typeof AccountingAddressTypeAccountingAddressType)[keyof typeof AccountingAddressTypeAccountingAddressType]; +export const AccountingBankAccountAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountAccountStatus = (typeof AccountingBankAccountAccountStatus)[keyof typeof AccountingBankAccountAccountStatus]; +export const AccountingBankAccountAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountAccountTypeAccountingBankAccountType = (typeof AccountingBankAccountAccountTypeAccountingBankAccountType)[keyof typeof AccountingBankAccountAccountTypeAccountingBankAccountType]; +export const AccountingBankAccountAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountAccountingBankAccountType = (typeof AccountingBankAccountAccountingBankAccountType)[keyof typeof AccountingBankAccountAccountingBankAccountType]; +export const AccountingBankAccountDataAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountDataAccountStatus = (typeof AccountingBankAccountDataAccountStatus)[keyof typeof AccountingBankAccountDataAccountStatus]; +export const AccountingBankAccountDataPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountDataPushChangeType = (typeof AccountingBankAccountDataPushChangeType)[keyof typeof AccountingBankAccountDataPushChangeType]; +export const AccountingBankAccountDataPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingBankAccountDataPushOperationStatus = (typeof AccountingBankAccountDataPushOperationStatus)[keyof typeof AccountingBankAccountDataPushOperationStatus]; +export const AccountingBankAccountDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingBankAccountDataTypeDataTypes = (typeof AccountingBankAccountDataTypeDataTypes)[keyof typeof AccountingBankAccountDataTypeDataTypes]; +export const AccountingBankAccountDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingBankAccountDataTypes = (typeof AccountingBankAccountDataTypes)[keyof typeof AccountingBankAccountDataTypes]; +export const AccountingBankAccountPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountPushChangeType = (typeof AccountingBankAccountPushChangeType)[keyof typeof AccountingBankAccountPushChangeType]; +export const AccountingBankAccountPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingBankAccountPushOperationStatus = (typeof AccountingBankAccountPushOperationStatus)[keyof typeof AccountingBankAccountPushOperationStatus]; +export const AccountingBankAccountResultsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountResultsAccountStatus = (typeof AccountingBankAccountResultsAccountStatus)[keyof typeof AccountingBankAccountResultsAccountStatus]; +export const AccountingBankAccountResultsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountResultsPushChangeType = (typeof AccountingBankAccountResultsPushChangeType)[keyof typeof AccountingBankAccountResultsPushChangeType]; +export const AccountingBankAccountResultsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingBankAccountResultsPushOperationStatus = (typeof AccountingBankAccountResultsPushOperationStatus)[keyof typeof AccountingBankAccountResultsPushOperationStatus]; +export const AccountingBankAccountStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountStatusAccountStatus = (typeof AccountingBankAccountStatusAccountStatus)[keyof typeof AccountingBankAccountStatusAccountStatus]; +export const AccountingBankAccountStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingBankAccountStatusPushOperationStatus = (typeof AccountingBankAccountStatusPushOperationStatus)[keyof typeof AccountingBankAccountStatusPushOperationStatus]; +export const AccountingBankAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountTypeAccountingBankAccountType = (typeof AccountingBankAccountTypeAccountingBankAccountType)[keyof typeof AccountingBankAccountTypeAccountingBankAccountType]; +export const AccountingBankAccountTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountTypePushChangeType = (typeof AccountingBankAccountTypePushChangeType)[keyof typeof AccountingBankAccountTypePushChangeType]; +export const AccountingBankAccountsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountsAccountStatus = (typeof AccountingBankAccountsAccountStatus)[keyof typeof AccountingBankAccountsAccountStatus]; +export const AccountingBankAccountsAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountsAccountTypeAccountingBankAccountType = (typeof AccountingBankAccountsAccountTypeAccountingBankAccountType)[keyof typeof AccountingBankAccountsAccountTypeAccountingBankAccountType]; +export const AccountingBankAccountsAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountsAccountingBankAccountType = (typeof AccountingBankAccountsAccountingBankAccountType)[keyof typeof AccountingBankAccountsAccountingBankAccountType]; +export const AccountingBankAccountsDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingBankAccountsDataTypeDataTypes = (typeof AccountingBankAccountsDataTypeDataTypes)[keyof typeof AccountingBankAccountsDataTypeDataTypes]; +export const AccountingBankAccountsDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingBankAccountsDataTypes = (typeof AccountingBankAccountsDataTypes)[keyof typeof AccountingBankAccountsDataTypes]; +export const AccountingBankAccountsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountsPushChangeType = (typeof AccountingBankAccountsPushChangeType)[keyof typeof AccountingBankAccountsPushChangeType]; +export const AccountingBankAccountsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingBankAccountsPushOperationStatus = (typeof AccountingBankAccountsPushOperationStatus)[keyof typeof AccountingBankAccountsPushOperationStatus]; +export const AccountingBankAccountsResultsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountsResultsAccountStatus = (typeof AccountingBankAccountsResultsAccountStatus)[keyof typeof AccountingBankAccountsResultsAccountStatus]; +export const AccountingBankAccountsResultsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountsResultsPushChangeType = (typeof AccountingBankAccountsResultsPushChangeType)[keyof typeof AccountingBankAccountsResultsPushChangeType]; +export const AccountingBankAccountsResultsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingBankAccountsResultsPushOperationStatus = (typeof AccountingBankAccountsResultsPushOperationStatus)[keyof typeof AccountingBankAccountsResultsPushOperationStatus]; +export const AccountingBankAccountsStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountsStatusAccountStatus = (typeof AccountingBankAccountsStatusAccountStatus)[keyof typeof AccountingBankAccountsStatusAccountStatus]; +export const AccountingBankAccountsStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingBankAccountsStatusPushOperationStatus = (typeof AccountingBankAccountsStatusPushOperationStatus)[keyof typeof AccountingBankAccountsStatusPushOperationStatus]; +export const AccountingBankAccountsTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingBankAccountsTypePushChangeType = (typeof AccountingBankAccountsTypePushChangeType)[keyof typeof AccountingBankAccountsTypePushChangeType]; +export const AccountingBankTransactionBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type AccountingBankTransactionBankTransactionType = (typeof AccountingBankTransactionBankTransactionType)[keyof typeof AccountingBankTransactionBankTransactionType]; +export const AccountingBankTransactionTransactionTypeBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type AccountingBankTransactionTransactionTypeBankTransactionType = (typeof AccountingBankTransactionTransactionTypeBankTransactionType)[keyof typeof AccountingBankTransactionTransactionTypeBankTransactionType]; +export const AccountingBankTransactionsBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type AccountingBankTransactionsBankTransactionType = (typeof AccountingBankTransactionsBankTransactionType)[keyof typeof AccountingBankTransactionsBankTransactionType]; +export const AccountingBankTransactionsResultsBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type AccountingBankTransactionsResultsBankTransactionType = (typeof AccountingBankTransactionsResultsBankTransactionType)[keyof typeof AccountingBankTransactionsResultsBankTransactionType]; +export const AccountingBankTransactionsTransactionTypeBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type AccountingBankTransactionsTransactionTypeBankTransactionType = (typeof AccountingBankTransactionsTransactionTypeBankTransactionType)[keyof typeof AccountingBankTransactionsTransactionTypeBankTransactionType]; +export const AccountingBillBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillBillStatus = (typeof AccountingBillBillStatus)[keyof typeof AccountingBillBillStatus]; +export const AccountingBillBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillBilledToType = (typeof AccountingBillBilledToType)[keyof typeof AccountingBillBilledToType]; +export const AccountingBillCreditNoteBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillCreditNoteBilledToType = (typeof AccountingBillCreditNoteBilledToType)[keyof typeof AccountingBillCreditNoteBilledToType]; +export const AccountingBillCreditNoteCreatedFromLineRefDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type AccountingBillCreditNoteCreatedFromLineRefDataType = (typeof AccountingBillCreditNoteCreatedFromLineRefDataType)[keyof typeof AccountingBillCreditNoteCreatedFromLineRefDataType]; +export const AccountingBillCreditNoteDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type AccountingBillCreditNoteDataType = (typeof AccountingBillCreditNoteDataType)[keyof typeof AccountingBillCreditNoteDataType]; +export const AccountingBillCreditNoteInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillCreditNoteInvoiceStatus = (typeof AccountingBillCreditNoteInvoiceStatus)[keyof typeof AccountingBillCreditNoteInvoiceStatus]; +export const AccountingBillCreditNoteIsBilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillCreditNoteIsBilledToBilledToType = (typeof AccountingBillCreditNoteIsBilledToBilledToType)[keyof typeof AccountingBillCreditNoteIsBilledToBilledToType]; +export const AccountingBillCreditNoteIsRebilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillCreditNoteIsRebilledToBilledToType = (typeof AccountingBillCreditNoteIsRebilledToBilledToType)[keyof typeof AccountingBillCreditNoteIsRebilledToBilledToType]; +export const AccountingBillCreditNoteStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillCreditNoteStatusInvoiceStatus = (typeof AccountingBillCreditNoteStatusInvoiceStatus)[keyof typeof AccountingBillCreditNoteStatusInvoiceStatus]; +export const AccountingBillCreditNoteTrackingBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillCreditNoteTrackingBilledToType = (typeof AccountingBillCreditNoteTrackingBilledToType)[keyof typeof AccountingBillCreditNoteTrackingBilledToType]; +export const AccountingBillCreditNotesBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillCreditNotesBilledToType = (typeof AccountingBillCreditNotesBilledToType)[keyof typeof AccountingBillCreditNotesBilledToType]; +export const AccountingBillCreditNotesCreatedFromLineRefDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type AccountingBillCreditNotesCreatedFromLineRefDataType = (typeof AccountingBillCreditNotesCreatedFromLineRefDataType)[keyof typeof AccountingBillCreditNotesCreatedFromLineRefDataType]; +export const AccountingBillCreditNotesDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type AccountingBillCreditNotesDataType = (typeof AccountingBillCreditNotesDataType)[keyof typeof AccountingBillCreditNotesDataType]; +export const AccountingBillCreditNotesInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillCreditNotesInvoiceStatus = (typeof AccountingBillCreditNotesInvoiceStatus)[keyof typeof AccountingBillCreditNotesInvoiceStatus]; +export const AccountingBillCreditNotesIsBilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillCreditNotesIsBilledToBilledToType = (typeof AccountingBillCreditNotesIsBilledToBilledToType)[keyof typeof AccountingBillCreditNotesIsBilledToBilledToType]; +export const AccountingBillCreditNotesIsRebilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillCreditNotesIsRebilledToBilledToType = (typeof AccountingBillCreditNotesIsRebilledToBilledToType)[keyof typeof AccountingBillCreditNotesIsRebilledToBilledToType]; +export const AccountingBillCreditNotesResultsInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillCreditNotesResultsInvoiceStatus = (typeof AccountingBillCreditNotesResultsInvoiceStatus)[keyof typeof AccountingBillCreditNotesResultsInvoiceStatus]; +export const AccountingBillCreditNotesStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillCreditNotesStatusInvoiceStatus = (typeof AccountingBillCreditNotesStatusInvoiceStatus)[keyof typeof AccountingBillCreditNotesStatusInvoiceStatus]; +export const AccountingBillCreditNotesTrackingBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillCreditNotesTrackingBilledToType = (typeof AccountingBillCreditNotesTrackingBilledToType)[keyof typeof AccountingBillCreditNotesTrackingBilledToType]; +export const AccountingBillDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type AccountingBillDataType = (typeof AccountingBillDataType)[keyof typeof AccountingBillDataType]; +export const AccountingBillIsBilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillIsBilledToBilledToType = (typeof AccountingBillIsBilledToBilledToType)[keyof typeof AccountingBillIsBilledToBilledToType]; +export const AccountingBillIsRebilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillIsRebilledToBilledToType = (typeof AccountingBillIsRebilledToBilledToType)[keyof typeof AccountingBillIsRebilledToBilledToType]; +export const AccountingBillPaymentBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingBillPaymentBillPaymentLineLinkType = (typeof AccountingBillPaymentBillPaymentLineLinkType)[keyof typeof AccountingBillPaymentBillPaymentLineLinkType]; +export const AccountingBillPaymentTypeBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingBillPaymentTypeBillPaymentLineLinkType = (typeof AccountingBillPaymentTypeBillPaymentLineLinkType)[keyof typeof AccountingBillPaymentTypeBillPaymentLineLinkType]; +export const AccountingBillPaymentsBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingBillPaymentsBillPaymentLineLinkType = (typeof AccountingBillPaymentsBillPaymentLineLinkType)[keyof typeof AccountingBillPaymentsBillPaymentLineLinkType]; +export const AccountingBillPaymentsResultsBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingBillPaymentsResultsBillPaymentLineLinkType = (typeof AccountingBillPaymentsResultsBillPaymentLineLinkType)[keyof typeof AccountingBillPaymentsResultsBillPaymentLineLinkType]; +export const AccountingBillPaymentsTypeBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingBillPaymentsTypeBillPaymentLineLinkType = (typeof AccountingBillPaymentsTypeBillPaymentLineLinkType)[keyof typeof AccountingBillPaymentsTypeBillPaymentLineLinkType]; +export const AccountingBillPurchaseOrderLineRefDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type AccountingBillPurchaseOrderLineRefDataType = (typeof AccountingBillPurchaseOrderLineRefDataType)[keyof typeof AccountingBillPurchaseOrderLineRefDataType]; +export const AccountingBillStatusBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillStatusBillStatus = (typeof AccountingBillStatusBillStatus)[keyof typeof AccountingBillStatusBillStatus]; +export const AccountingBillTrackingBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillTrackingBilledToType = (typeof AccountingBillTrackingBilledToType)[keyof typeof AccountingBillTrackingBilledToType]; +export const AccountingBillsBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillsBillStatus = (typeof AccountingBillsBillStatus)[keyof typeof AccountingBillsBillStatus]; +export const AccountingBillsBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillsBilledToType = (typeof AccountingBillsBilledToType)[keyof typeof AccountingBillsBilledToType]; +export const AccountingBillsDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type AccountingBillsDataType = (typeof AccountingBillsDataType)[keyof typeof AccountingBillsDataType]; +export const AccountingBillsIsBilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillsIsBilledToBilledToType = (typeof AccountingBillsIsBilledToBilledToType)[keyof typeof AccountingBillsIsBilledToBilledToType]; +export const AccountingBillsIsRebilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillsIsRebilledToBilledToType = (typeof AccountingBillsIsRebilledToBilledToType)[keyof typeof AccountingBillsIsRebilledToBilledToType]; +export const AccountingBillsPurchaseOrderLineRefDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type AccountingBillsPurchaseOrderLineRefDataType = (typeof AccountingBillsPurchaseOrderLineRefDataType)[keyof typeof AccountingBillsPurchaseOrderLineRefDataType]; +export const AccountingBillsResultsBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillsResultsBillStatus = (typeof AccountingBillsResultsBillStatus)[keyof typeof AccountingBillsResultsBillStatus]; +export const AccountingBillsStatusBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingBillsStatusBillStatus = (typeof AccountingBillsStatusBillStatus)[keyof typeof AccountingBillsStatusBillStatus]; +export const AccountingBillsTrackingBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingBillsTrackingBilledToType = (typeof AccountingBillsTrackingBilledToType)[keyof typeof AccountingBillsTrackingBilledToType]; +export const AccountingCashFlowStatementReportBasis = { + Accrual: "Accrual", + Cash: "Cash", + Unknown: "Unknown", +} as const; +export type AccountingCashFlowStatementReportBasis = (typeof AccountingCashFlowStatementReportBasis)[keyof typeof AccountingCashFlowStatementReportBasis]; +export const AccountingCashFlowStatementReportInput = { + Direct: "Direct", + Indirect: "Indirect", + Unknown: "Unknown", +} as const; +export type AccountingCashFlowStatementReportInput = (typeof AccountingCashFlowStatementReportInput)[keyof typeof AccountingCashFlowStatementReportInput]; +export const AccountingCompanyInfoAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCompanyInfoAccountingAddressType = (typeof AccountingCompanyInfoAccountingAddressType)[keyof typeof AccountingCompanyInfoAccountingAddressType]; +export const AccountingCompanyInfoAddressesAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCompanyInfoAddressesAccountingAddressType = (typeof AccountingCompanyInfoAddressesAccountingAddressType)[keyof typeof AccountingCompanyInfoAddressesAccountingAddressType]; +export const AccountingCompanyInfoPhoneNumbersType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type AccountingCompanyInfoPhoneNumbersType = (typeof AccountingCompanyInfoPhoneNumbersType)[keyof typeof AccountingCompanyInfoPhoneNumbersType]; +export const AccountingCompanyInfoType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type AccountingCompanyInfoType = (typeof AccountingCompanyInfoType)[keyof typeof AccountingCompanyInfoType]; +export const AccountingCompanyInfoType1 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type AccountingCompanyInfoType1 = (typeof AccountingCompanyInfoType1)[keyof typeof AccountingCompanyInfoType1]; +export const AccountingCompanyInfoType2 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type AccountingCompanyInfoType2 = (typeof AccountingCompanyInfoType2)[keyof typeof AccountingCompanyInfoType2]; +export const AccountingCompanyInfoTypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCompanyInfoTypeAccountingAddressType = (typeof AccountingCompanyInfoTypeAccountingAddressType)[keyof typeof AccountingCompanyInfoTypeAccountingAddressType]; +export const AccountingCompanyInfoWebLinksType = { + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type AccountingCompanyInfoWebLinksType = (typeof AccountingCompanyInfoWebLinksType)[keyof typeof AccountingCompanyInfoWebLinksType]; +export const AccountingCreateAccountResponseAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingCreateAccountResponseAccountStatus = (typeof AccountingCreateAccountResponseAccountStatus)[keyof typeof AccountingCreateAccountResponseAccountStatus]; +export const AccountingCreateAccountResponseAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountingCreateAccountResponseAccountType = (typeof AccountingCreateAccountResponseAccountType)[keyof typeof AccountingCreateAccountResponseAccountType]; +export const AccountingCreateAccountResponseDataAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingCreateAccountResponseDataAccountStatus = (typeof AccountingCreateAccountResponseDataAccountStatus)[keyof typeof AccountingCreateAccountResponseDataAccountStatus]; +export const AccountingCreateAccountResponseDataAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountingCreateAccountResponseDataAccountType = (typeof AccountingCreateAccountResponseDataAccountType)[keyof typeof AccountingCreateAccountResponseDataAccountType]; +export const AccountingCreateAccountResponseDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateAccountResponseDataType = (typeof AccountingCreateAccountResponseDataType)[keyof typeof AccountingCreateAccountResponseDataType]; +export const AccountingCreateAccountResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateAccountResponseDataTypeDataTypes = (typeof AccountingCreateAccountResponseDataTypeDataTypes)[keyof typeof AccountingCreateAccountResponseDataTypeDataTypes]; +export const AccountingCreateAccountResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateAccountResponseDataTypes = (typeof AccountingCreateAccountResponseDataTypes)[keyof typeof AccountingCreateAccountResponseDataTypes]; +export const AccountingCreateAccountResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateAccountResponsePushChangeType = (typeof AccountingCreateAccountResponsePushChangeType)[keyof typeof AccountingCreateAccountResponsePushChangeType]; +export const AccountingCreateAccountResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateAccountResponsePushOperationStatus = (typeof AccountingCreateAccountResponsePushOperationStatus)[keyof typeof AccountingCreateAccountResponsePushOperationStatus]; +export const AccountingCreateAccountResponseStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingCreateAccountResponseStatusAccountStatus = (typeof AccountingCreateAccountResponseStatusAccountStatus)[keyof typeof AccountingCreateAccountResponseStatusAccountStatus]; +export const AccountingCreateAccountResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateAccountResponseStatusPushOperationStatus = (typeof AccountingCreateAccountResponseStatusPushOperationStatus)[keyof typeof AccountingCreateAccountResponseStatusPushOperationStatus]; +export const AccountingCreateAccountResponseTypeAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type AccountingCreateAccountResponseTypeAccountType = (typeof AccountingCreateAccountResponseTypeAccountType)[keyof typeof AccountingCreateAccountResponseTypeAccountType]; +export const AccountingCreateAccountResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateAccountResponseTypePushChangeType = (typeof AccountingCreateAccountResponseTypePushChangeType)[keyof typeof AccountingCreateAccountResponseTypePushChangeType]; +export const AccountingCreateBankAccountResponseAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankAccountResponseAccountStatus = (typeof AccountingCreateBankAccountResponseAccountStatus)[keyof typeof AccountingCreateBankAccountResponseAccountStatus]; +export const AccountingCreateBankAccountResponseAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankAccountResponseAccountTypeAccountingBankAccountType = (typeof AccountingCreateBankAccountResponseAccountTypeAccountingBankAccountType)[keyof typeof AccountingCreateBankAccountResponseAccountTypeAccountingBankAccountType]; +export const AccountingCreateBankAccountResponseAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankAccountResponseAccountingBankAccountType = (typeof AccountingCreateBankAccountResponseAccountingBankAccountType)[keyof typeof AccountingCreateBankAccountResponseAccountingBankAccountType]; +export const AccountingCreateBankAccountResponseDataAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankAccountResponseDataAccountStatus = (typeof AccountingCreateBankAccountResponseDataAccountStatus)[keyof typeof AccountingCreateBankAccountResponseDataAccountStatus]; +export const AccountingCreateBankAccountResponseDataPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankAccountResponseDataPushChangeType = (typeof AccountingCreateBankAccountResponseDataPushChangeType)[keyof typeof AccountingCreateBankAccountResponseDataPushChangeType]; +export const AccountingCreateBankAccountResponseDataPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateBankAccountResponseDataPushOperationStatus = (typeof AccountingCreateBankAccountResponseDataPushOperationStatus)[keyof typeof AccountingCreateBankAccountResponseDataPushOperationStatus]; +export const AccountingCreateBankAccountResponseDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateBankAccountResponseDataType = (typeof AccountingCreateBankAccountResponseDataType)[keyof typeof AccountingCreateBankAccountResponseDataType]; +export const AccountingCreateBankAccountResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateBankAccountResponseDataTypeDataTypes = (typeof AccountingCreateBankAccountResponseDataTypeDataTypes)[keyof typeof AccountingCreateBankAccountResponseDataTypeDataTypes]; +export const AccountingCreateBankAccountResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateBankAccountResponseDataTypes = (typeof AccountingCreateBankAccountResponseDataTypes)[keyof typeof AccountingCreateBankAccountResponseDataTypes]; +export const AccountingCreateBankAccountResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankAccountResponsePushChangeType = (typeof AccountingCreateBankAccountResponsePushChangeType)[keyof typeof AccountingCreateBankAccountResponsePushChangeType]; +export const AccountingCreateBankAccountResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateBankAccountResponsePushOperationStatus = (typeof AccountingCreateBankAccountResponsePushOperationStatus)[keyof typeof AccountingCreateBankAccountResponsePushOperationStatus]; +export const AccountingCreateBankAccountResponseStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankAccountResponseStatusAccountStatus = (typeof AccountingCreateBankAccountResponseStatusAccountStatus)[keyof typeof AccountingCreateBankAccountResponseStatusAccountStatus]; +export const AccountingCreateBankAccountResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateBankAccountResponseStatusPushOperationStatus = (typeof AccountingCreateBankAccountResponseStatusPushOperationStatus)[keyof typeof AccountingCreateBankAccountResponseStatusPushOperationStatus]; +export const AccountingCreateBankAccountResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankAccountResponseTypePushChangeType = (typeof AccountingCreateBankAccountResponseTypePushChangeType)[keyof typeof AccountingCreateBankAccountResponseTypePushChangeType]; +export const AccountingCreateBankTransactionsResponseDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateBankTransactionsResponseDataType = (typeof AccountingCreateBankTransactionsResponseDataType)[keyof typeof AccountingCreateBankTransactionsResponseDataType]; +export const AccountingCreateBankTransactionsResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateBankTransactionsResponseDataTypeDataTypes = (typeof AccountingCreateBankTransactionsResponseDataTypeDataTypes)[keyof typeof AccountingCreateBankTransactionsResponseDataTypeDataTypes]; +export const AccountingCreateBankTransactionsResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateBankTransactionsResponseDataTypes = (typeof AccountingCreateBankTransactionsResponseDataTypes)[keyof typeof AccountingCreateBankTransactionsResponseDataTypes]; +export const AccountingCreateBankTransactionsResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankTransactionsResponsePushChangeType = (typeof AccountingCreateBankTransactionsResponsePushChangeType)[keyof typeof AccountingCreateBankTransactionsResponsePushChangeType]; +export const AccountingCreateBankTransactionsResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateBankTransactionsResponsePushOperationStatus = (typeof AccountingCreateBankTransactionsResponsePushOperationStatus)[keyof typeof AccountingCreateBankTransactionsResponsePushOperationStatus]; +export const AccountingCreateBankTransactionsResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateBankTransactionsResponseStatusPushOperationStatus = (typeof AccountingCreateBankTransactionsResponseStatusPushOperationStatus)[keyof typeof AccountingCreateBankTransactionsResponseStatusPushOperationStatus]; +export const AccountingCreateBankTransactionsResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateBankTransactionsResponseTypePushChangeType = (typeof AccountingCreateBankTransactionsResponseTypePushChangeType)[keyof typeof AccountingCreateBankTransactionsResponseTypePushChangeType]; +export const AccountingCreateDirectCostResponseContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingCreateDirectCostResponseContactRefDataType = (typeof AccountingCreateDirectCostResponseContactRefDataType)[keyof typeof AccountingCreateDirectCostResponseContactRefDataType]; +export const AccountingCreateDirectCostResponseDataDataType = { + Customers: "customers", +} as const; +export type AccountingCreateDirectCostResponseDataDataType = (typeof AccountingCreateDirectCostResponseDataDataType)[keyof typeof AccountingCreateDirectCostResponseDataDataType]; +export const AccountingCreateDirectCostResponseDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateDirectCostResponseDataType = (typeof AccountingCreateDirectCostResponseDataType)[keyof typeof AccountingCreateDirectCostResponseDataType]; +export const AccountingCreateDirectCostResponseDataType1 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingCreateDirectCostResponseDataType1 = (typeof AccountingCreateDirectCostResponseDataType1)[keyof typeof AccountingCreateDirectCostResponseDataType1]; +export const AccountingCreateDirectCostResponseDataType2 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingCreateDirectCostResponseDataType2 = (typeof AccountingCreateDirectCostResponseDataType2)[keyof typeof AccountingCreateDirectCostResponseDataType2]; +export const AccountingCreateDirectCostResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateDirectCostResponseDataTypeDataTypes = (typeof AccountingCreateDirectCostResponseDataTypeDataTypes)[keyof typeof AccountingCreateDirectCostResponseDataTypeDataTypes]; +export const AccountingCreateDirectCostResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateDirectCostResponseDataTypes = (typeof AccountingCreateDirectCostResponseDataTypes)[keyof typeof AccountingCreateDirectCostResponseDataTypes]; +export const AccountingCreateDirectCostResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateDirectCostResponsePushChangeType = (typeof AccountingCreateDirectCostResponsePushChangeType)[keyof typeof AccountingCreateDirectCostResponsePushChangeType]; +export const AccountingCreateDirectCostResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateDirectCostResponsePushOperationStatus = (typeof AccountingCreateDirectCostResponsePushOperationStatus)[keyof typeof AccountingCreateDirectCostResponsePushOperationStatus]; +export const AccountingCreateDirectCostResponseRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingCreateDirectCostResponseRecordRefsDataType = (typeof AccountingCreateDirectCostResponseRecordRefsDataType)[keyof typeof AccountingCreateDirectCostResponseRecordRefsDataType]; +export const AccountingCreateDirectCostResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateDirectCostResponseStatusPushOperationStatus = (typeof AccountingCreateDirectCostResponseStatusPushOperationStatus)[keyof typeof AccountingCreateDirectCostResponseStatusPushOperationStatus]; +export const AccountingCreateDirectCostResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateDirectCostResponseTypePushChangeType = (typeof AccountingCreateDirectCostResponseTypePushChangeType)[keyof typeof AccountingCreateDirectCostResponseTypePushChangeType]; +export const AccountingCreatePaymentResponseDataPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingCreatePaymentResponseDataPaymentLinkType = (typeof AccountingCreatePaymentResponseDataPaymentLinkType)[keyof typeof AccountingCreatePaymentResponseDataPaymentLinkType]; +export const AccountingCreatePaymentResponseDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreatePaymentResponseDataType = (typeof AccountingCreatePaymentResponseDataType)[keyof typeof AccountingCreatePaymentResponseDataType]; +export const AccountingCreatePaymentResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreatePaymentResponseDataTypeDataTypes = (typeof AccountingCreatePaymentResponseDataTypeDataTypes)[keyof typeof AccountingCreatePaymentResponseDataTypeDataTypes]; +export const AccountingCreatePaymentResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreatePaymentResponseDataTypes = (typeof AccountingCreatePaymentResponseDataTypes)[keyof typeof AccountingCreatePaymentResponseDataTypes]; +export const AccountingCreatePaymentResponsePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingCreatePaymentResponsePaymentLinkType = (typeof AccountingCreatePaymentResponsePaymentLinkType)[keyof typeof AccountingCreatePaymentResponsePaymentLinkType]; +export const AccountingCreatePaymentResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreatePaymentResponsePushChangeType = (typeof AccountingCreatePaymentResponsePushChangeType)[keyof typeof AccountingCreatePaymentResponsePushChangeType]; +export const AccountingCreatePaymentResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreatePaymentResponsePushOperationStatus = (typeof AccountingCreatePaymentResponsePushOperationStatus)[keyof typeof AccountingCreatePaymentResponsePushOperationStatus]; +export const AccountingCreatePaymentResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreatePaymentResponseStatusPushOperationStatus = (typeof AccountingCreatePaymentResponseStatusPushOperationStatus)[keyof typeof AccountingCreatePaymentResponseStatusPushOperationStatus]; +export const AccountingCreatePaymentResponseTypePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingCreatePaymentResponseTypePaymentLinkType = (typeof AccountingCreatePaymentResponseTypePaymentLinkType)[keyof typeof AccountingCreatePaymentResponseTypePaymentLinkType]; +export const AccountingCreatePaymentResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreatePaymentResponseTypePushChangeType = (typeof AccountingCreatePaymentResponseTypePushChangeType)[keyof typeof AccountingCreatePaymentResponseTypePushChangeType]; +export const AccountingCreateSupplierResponseAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCreateSupplierResponseAccountingAddressType = (typeof AccountingCreateSupplierResponseAccountingAddressType)[keyof typeof AccountingCreateSupplierResponseAccountingAddressType]; +export const AccountingCreateSupplierResponseAddressesAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCreateSupplierResponseAddressesAccountingAddressType = (typeof AccountingCreateSupplierResponseAddressesAccountingAddressType)[keyof typeof AccountingCreateSupplierResponseAddressesAccountingAddressType]; +export const AccountingCreateSupplierResponseDataSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingCreateSupplierResponseDataSupplierStatus = (typeof AccountingCreateSupplierResponseDataSupplierStatus)[keyof typeof AccountingCreateSupplierResponseDataSupplierStatus]; +export const AccountingCreateSupplierResponseDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateSupplierResponseDataType = (typeof AccountingCreateSupplierResponseDataType)[keyof typeof AccountingCreateSupplierResponseDataType]; +export const AccountingCreateSupplierResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateSupplierResponseDataTypeDataTypes = (typeof AccountingCreateSupplierResponseDataTypeDataTypes)[keyof typeof AccountingCreateSupplierResponseDataTypeDataTypes]; +export const AccountingCreateSupplierResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateSupplierResponseDataTypes = (typeof AccountingCreateSupplierResponseDataTypes)[keyof typeof AccountingCreateSupplierResponseDataTypes]; +export const AccountingCreateSupplierResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateSupplierResponsePushChangeType = (typeof AccountingCreateSupplierResponsePushChangeType)[keyof typeof AccountingCreateSupplierResponsePushChangeType]; +export const AccountingCreateSupplierResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateSupplierResponsePushOperationStatus = (typeof AccountingCreateSupplierResponsePushOperationStatus)[keyof typeof AccountingCreateSupplierResponsePushOperationStatus]; +export const AccountingCreateSupplierResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateSupplierResponseStatusPushOperationStatus = (typeof AccountingCreateSupplierResponseStatusPushOperationStatus)[keyof typeof AccountingCreateSupplierResponseStatusPushOperationStatus]; +export const AccountingCreateSupplierResponseStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingCreateSupplierResponseStatusSupplierStatus = (typeof AccountingCreateSupplierResponseStatusSupplierStatus)[keyof typeof AccountingCreateSupplierResponseStatusSupplierStatus]; +export const AccountingCreateSupplierResponseSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingCreateSupplierResponseSupplierStatus = (typeof AccountingCreateSupplierResponseSupplierStatus)[keyof typeof AccountingCreateSupplierResponseSupplierStatus]; +export const AccountingCreateSupplierResponseTypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCreateSupplierResponseTypeAccountingAddressType = (typeof AccountingCreateSupplierResponseTypeAccountingAddressType)[keyof typeof AccountingCreateSupplierResponseTypeAccountingAddressType]; +export const AccountingCreateSupplierResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateSupplierResponseTypePushChangeType = (typeof AccountingCreateSupplierResponseTypePushChangeType)[keyof typeof AccountingCreateSupplierResponseTypePushChangeType]; +export const AccountingCreateTransferResponseContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingCreateTransferResponseContactRefDataType = (typeof AccountingCreateTransferResponseContactRefDataType)[keyof typeof AccountingCreateTransferResponseContactRefDataType]; +export const AccountingCreateTransferResponseDataStatus = { + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type AccountingCreateTransferResponseDataStatus = (typeof AccountingCreateTransferResponseDataStatus)[keyof typeof AccountingCreateTransferResponseDataStatus]; +export const AccountingCreateTransferResponseDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateTransferResponseDataType = (typeof AccountingCreateTransferResponseDataType)[keyof typeof AccountingCreateTransferResponseDataType]; +export const AccountingCreateTransferResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateTransferResponseDataTypeDataTypes = (typeof AccountingCreateTransferResponseDataTypeDataTypes)[keyof typeof AccountingCreateTransferResponseDataTypeDataTypes]; +export const AccountingCreateTransferResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingCreateTransferResponseDataTypes = (typeof AccountingCreateTransferResponseDataTypes)[keyof typeof AccountingCreateTransferResponseDataTypes]; +export const AccountingCreateTransferResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateTransferResponsePushChangeType = (typeof AccountingCreateTransferResponsePushChangeType)[keyof typeof AccountingCreateTransferResponsePushChangeType]; +export const AccountingCreateTransferResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateTransferResponsePushOperationStatus = (typeof AccountingCreateTransferResponsePushOperationStatus)[keyof typeof AccountingCreateTransferResponsePushOperationStatus]; +export const AccountingCreateTransferResponseStatus = { + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type AccountingCreateTransferResponseStatus = (typeof AccountingCreateTransferResponseStatus)[keyof typeof AccountingCreateTransferResponseStatus]; +export const AccountingCreateTransferResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type AccountingCreateTransferResponseStatusPushOperationStatus = (typeof AccountingCreateTransferResponseStatusPushOperationStatus)[keyof typeof AccountingCreateTransferResponseStatusPushOperationStatus]; +export const AccountingCreateTransferResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type AccountingCreateTransferResponseTypePushChangeType = (typeof AccountingCreateTransferResponseTypePushChangeType)[keyof typeof AccountingCreateTransferResponseTypePushChangeType]; +export const AccountingCreditNoteBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingCreditNoteBilledToType1 = (typeof AccountingCreditNoteBilledToType1)[keyof typeof AccountingCreditNoteBilledToType1]; +export const AccountingCreditNoteInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingCreditNoteInvoiceStatus = (typeof AccountingCreditNoteInvoiceStatus)[keyof typeof AccountingCreditNoteInvoiceStatus]; +export const AccountingCreditNoteIsBilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingCreditNoteIsBilledToBilledToType1 = (typeof AccountingCreditNoteIsBilledToBilledToType1)[keyof typeof AccountingCreditNoteIsBilledToBilledToType1]; +export const AccountingCreditNoteIsRebilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingCreditNoteIsRebilledToBilledToType1 = (typeof AccountingCreditNoteIsRebilledToBilledToType1)[keyof typeof AccountingCreditNoteIsRebilledToBilledToType1]; +export const AccountingCreditNoteStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingCreditNoteStatusInvoiceStatus = (typeof AccountingCreditNoteStatusInvoiceStatus)[keyof typeof AccountingCreditNoteStatusInvoiceStatus]; +export const AccountingCreditNoteTrackingBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingCreditNoteTrackingBilledToType1 = (typeof AccountingCreditNoteTrackingBilledToType1)[keyof typeof AccountingCreditNoteTrackingBilledToType1]; +export const AccountingCreditNotesBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingCreditNotesBilledToType1 = (typeof AccountingCreditNotesBilledToType1)[keyof typeof AccountingCreditNotesBilledToType1]; +export const AccountingCreditNotesInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingCreditNotesInvoiceStatus = (typeof AccountingCreditNotesInvoiceStatus)[keyof typeof AccountingCreditNotesInvoiceStatus]; +export const AccountingCreditNotesIsBilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingCreditNotesIsBilledToBilledToType1 = (typeof AccountingCreditNotesIsBilledToBilledToType1)[keyof typeof AccountingCreditNotesIsBilledToBilledToType1]; +export const AccountingCreditNotesIsRebilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingCreditNotesIsRebilledToBilledToType1 = (typeof AccountingCreditNotesIsRebilledToBilledToType1)[keyof typeof AccountingCreditNotesIsRebilledToBilledToType1]; +export const AccountingCreditNotesResultsInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingCreditNotesResultsInvoiceStatus = (typeof AccountingCreditNotesResultsInvoiceStatus)[keyof typeof AccountingCreditNotesResultsInvoiceStatus]; +export const AccountingCreditNotesStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingCreditNotesStatusInvoiceStatus = (typeof AccountingCreditNotesStatusInvoiceStatus)[keyof typeof AccountingCreditNotesStatusInvoiceStatus]; +export const AccountingCreditNotesTrackingBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingCreditNotesTrackingBilledToType1 = (typeof AccountingCreditNotesTrackingBilledToType1)[keyof typeof AccountingCreditNotesTrackingBilledToType1]; +export const AccountingCustomerAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCustomerAccountingAddressType = (typeof AccountingCustomerAccountingAddressType)[keyof typeof AccountingCustomerAccountingAddressType]; +export const AccountingCustomerAddressAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCustomerAddressAccountingAddressType = (typeof AccountingCustomerAddressAccountingAddressType)[keyof typeof AccountingCustomerAddressAccountingAddressType]; +export const AccountingCustomerAddressesAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCustomerAddressesAccountingAddressType = (typeof AccountingCustomerAddressesAccountingAddressType)[keyof typeof AccountingCustomerAddressesAccountingAddressType]; +export const AccountingCustomerPhoneType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type AccountingCustomerPhoneType = (typeof AccountingCustomerPhoneType)[keyof typeof AccountingCustomerPhoneType]; +export const AccountingCustomerStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingCustomerStatusSupplierStatus = (typeof AccountingCustomerStatusSupplierStatus)[keyof typeof AccountingCustomerStatusSupplierStatus]; +export const AccountingCustomerSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingCustomerSupplierStatus = (typeof AccountingCustomerSupplierStatus)[keyof typeof AccountingCustomerSupplierStatus]; +export const AccountingCustomerType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type AccountingCustomerType = (typeof AccountingCustomerType)[keyof typeof AccountingCustomerType]; +export const AccountingCustomerTypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCustomerTypeAccountingAddressType = (typeof AccountingCustomerTypeAccountingAddressType)[keyof typeof AccountingCustomerTypeAccountingAddressType]; +export const AccountingCustomersAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCustomersAccountingAddressType = (typeof AccountingCustomersAccountingAddressType)[keyof typeof AccountingCustomersAccountingAddressType]; +export const AccountingCustomersAddressAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCustomersAddressAccountingAddressType = (typeof AccountingCustomersAddressAccountingAddressType)[keyof typeof AccountingCustomersAddressAccountingAddressType]; +export const AccountingCustomersAddressesAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCustomersAddressesAccountingAddressType = (typeof AccountingCustomersAddressesAccountingAddressType)[keyof typeof AccountingCustomersAddressesAccountingAddressType]; +export const AccountingCustomersPhoneType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type AccountingCustomersPhoneType = (typeof AccountingCustomersPhoneType)[keyof typeof AccountingCustomersPhoneType]; +export const AccountingCustomersResultsSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingCustomersResultsSupplierStatus = (typeof AccountingCustomersResultsSupplierStatus)[keyof typeof AccountingCustomersResultsSupplierStatus]; +export const AccountingCustomersStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingCustomersStatusSupplierStatus = (typeof AccountingCustomersStatusSupplierStatus)[keyof typeof AccountingCustomersStatusSupplierStatus]; +export const AccountingCustomersSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingCustomersSupplierStatus = (typeof AccountingCustomersSupplierStatus)[keyof typeof AccountingCustomersSupplierStatus]; +export const AccountingCustomersType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type AccountingCustomersType = (typeof AccountingCustomersType)[keyof typeof AccountingCustomersType]; +export const AccountingCustomersTypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingCustomersTypeAccountingAddressType = (typeof AccountingCustomersTypeAccountingAddressType)[keyof typeof AccountingCustomersTypeAccountingAddressType]; +export const AccountingDirectCostContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingDirectCostContactRefDataType = (typeof AccountingDirectCostContactRefDataType)[keyof typeof AccountingDirectCostContactRefDataType]; +export const AccountingDirectCostDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingDirectCostDataType = (typeof AccountingDirectCostDataType)[keyof typeof AccountingDirectCostDataType]; +export const AccountingDirectCostDataType1 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingDirectCostDataType1 = (typeof AccountingDirectCostDataType1)[keyof typeof AccountingDirectCostDataType1]; +export const AccountingDirectCostDataType2 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingDirectCostDataType2 = (typeof AccountingDirectCostDataType2)[keyof typeof AccountingDirectCostDataType2]; +export const AccountingDirectCostRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingDirectCostRecordRefsDataType = (typeof AccountingDirectCostRecordRefsDataType)[keyof typeof AccountingDirectCostRecordRefsDataType]; +export const AccountingDirectCostsContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingDirectCostsContactRefDataType = (typeof AccountingDirectCostsContactRefDataType)[keyof typeof AccountingDirectCostsContactRefDataType]; +export const AccountingDirectCostsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingDirectCostsDataType = (typeof AccountingDirectCostsDataType)[keyof typeof AccountingDirectCostsDataType]; +export const AccountingDirectCostsDataType1 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingDirectCostsDataType1 = (typeof AccountingDirectCostsDataType1)[keyof typeof AccountingDirectCostsDataType1]; +export const AccountingDirectCostsDataType2 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingDirectCostsDataType2 = (typeof AccountingDirectCostsDataType2)[keyof typeof AccountingDirectCostsDataType2]; +export const AccountingDirectCostsRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingDirectCostsRecordRefsDataType = (typeof AccountingDirectCostsRecordRefsDataType)[keyof typeof AccountingDirectCostsRecordRefsDataType]; +export const AccountingDirectCostsResultsDataType = { + Customers: "customers", +} as const; +export type AccountingDirectCostsResultsDataType = (typeof AccountingDirectCostsResultsDataType)[keyof typeof AccountingDirectCostsResultsDataType]; +export const AccountingDirectIncomeContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingDirectIncomeContactRefDataType = (typeof AccountingDirectIncomeContactRefDataType)[keyof typeof AccountingDirectIncomeContactRefDataType]; +export const AccountingDirectIncomeDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingDirectIncomeDataType = (typeof AccountingDirectIncomeDataType)[keyof typeof AccountingDirectIncomeDataType]; +export const AccountingDirectIncomesContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingDirectIncomesContactRefDataType = (typeof AccountingDirectIncomesContactRefDataType)[keyof typeof AccountingDirectIncomesContactRefDataType]; +export const AccountingDirectIncomesDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingDirectIncomesDataType = (typeof AccountingDirectIncomesDataType)[keyof typeof AccountingDirectIncomesDataType]; +export const AccountingInvoiceBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingInvoiceBilledToType1 = (typeof AccountingInvoiceBilledToType1)[keyof typeof AccountingInvoiceBilledToType1]; +export const AccountingInvoiceDataType = { + SalesOrders: "salesOrders", +} as const; +export type AccountingInvoiceDataType = (typeof AccountingInvoiceDataType)[keyof typeof AccountingInvoiceDataType]; +export const AccountingInvoiceInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingInvoiceInvoiceStatus = (typeof AccountingInvoiceInvoiceStatus)[keyof typeof AccountingInvoiceInvoiceStatus]; +export const AccountingInvoiceIsBilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingInvoiceIsBilledToBilledToType1 = (typeof AccountingInvoiceIsBilledToBilledToType1)[keyof typeof AccountingInvoiceIsBilledToBilledToType1]; +export const AccountingInvoiceIsRebilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingInvoiceIsRebilledToBilledToType1 = (typeof AccountingInvoiceIsRebilledToBilledToType1)[keyof typeof AccountingInvoiceIsRebilledToBilledToType1]; +export const AccountingInvoiceSalesOrderRefsDataType = { + SalesOrders: "salesOrders", +} as const; +export type AccountingInvoiceSalesOrderRefsDataType = (typeof AccountingInvoiceSalesOrderRefsDataType)[keyof typeof AccountingInvoiceSalesOrderRefsDataType]; +export const AccountingInvoiceStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingInvoiceStatusInvoiceStatus = (typeof AccountingInvoiceStatusInvoiceStatus)[keyof typeof AccountingInvoiceStatusInvoiceStatus]; +export const AccountingInvoiceTrackingBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingInvoiceTrackingBilledToType1 = (typeof AccountingInvoiceTrackingBilledToType1)[keyof typeof AccountingInvoiceTrackingBilledToType1]; +export const AccountingInvoicesBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingInvoicesBilledToType1 = (typeof AccountingInvoicesBilledToType1)[keyof typeof AccountingInvoicesBilledToType1]; +export const AccountingInvoicesDataType = { + SalesOrders: "salesOrders", +} as const; +export type AccountingInvoicesDataType = (typeof AccountingInvoicesDataType)[keyof typeof AccountingInvoicesDataType]; +export const AccountingInvoicesInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingInvoicesInvoiceStatus = (typeof AccountingInvoicesInvoiceStatus)[keyof typeof AccountingInvoicesInvoiceStatus]; +export const AccountingInvoicesIsBilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingInvoicesIsBilledToBilledToType1 = (typeof AccountingInvoicesIsBilledToBilledToType1)[keyof typeof AccountingInvoicesIsBilledToBilledToType1]; +export const AccountingInvoicesIsRebilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingInvoicesIsRebilledToBilledToType1 = (typeof AccountingInvoicesIsRebilledToBilledToType1)[keyof typeof AccountingInvoicesIsRebilledToBilledToType1]; +export const AccountingInvoicesResultsInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingInvoicesResultsInvoiceStatus = (typeof AccountingInvoicesResultsInvoiceStatus)[keyof typeof AccountingInvoicesResultsInvoiceStatus]; +export const AccountingInvoicesSalesOrderRefsDataType = { + SalesOrders: "salesOrders", +} as const; +export type AccountingInvoicesSalesOrderRefsDataType = (typeof AccountingInvoicesSalesOrderRefsDataType)[keyof typeof AccountingInvoicesSalesOrderRefsDataType]; +export const AccountingInvoicesStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type AccountingInvoicesStatusInvoiceStatus = (typeof AccountingInvoicesStatusInvoiceStatus)[keyof typeof AccountingInvoicesStatusInvoiceStatus]; +export const AccountingInvoicesTrackingBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountingInvoicesTrackingBilledToType1 = (typeof AccountingInvoicesTrackingBilledToType1)[keyof typeof AccountingInvoicesTrackingBilledToType1]; +export const AccountingJournalEntriesContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingJournalEntriesContactRefDataType = (typeof AccountingJournalEntriesContactRefDataType)[keyof typeof AccountingJournalEntriesContactRefDataType]; +export const AccountingJournalEntriesDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingJournalEntriesDataType = (typeof AccountingJournalEntriesDataType)[keyof typeof AccountingJournalEntriesDataType]; +export const AccountingJournalEntriesDataType1 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingJournalEntriesDataType1 = (typeof AccountingJournalEntriesDataType1)[keyof typeof AccountingJournalEntriesDataType1]; +export const AccountingJournalEntriesDataType2 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingJournalEntriesDataType2 = (typeof AccountingJournalEntriesDataType2)[keyof typeof AccountingJournalEntriesDataType2]; +export const AccountingJournalEntriesRecordRefDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountingJournalEntriesRecordRefDataType = (typeof AccountingJournalEntriesRecordRefDataType)[keyof typeof AccountingJournalEntriesRecordRefDataType]; +export const AccountingJournalEntriesRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingJournalEntriesRecordRefsDataType = (typeof AccountingJournalEntriesRecordRefsDataType)[keyof typeof AccountingJournalEntriesRecordRefsDataType]; +export const AccountingJournalEntriesResultsDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountingJournalEntriesResultsDataType = (typeof AccountingJournalEntriesResultsDataType)[keyof typeof AccountingJournalEntriesResultsDataType]; +export const AccountingJournalEntriesTrackingDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingJournalEntriesTrackingDataType = (typeof AccountingJournalEntriesTrackingDataType)[keyof typeof AccountingJournalEntriesTrackingDataType]; +export const AccountingJournalEntryContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingJournalEntryContactRefDataType = (typeof AccountingJournalEntryContactRefDataType)[keyof typeof AccountingJournalEntryContactRefDataType]; +export const AccountingJournalEntryDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingJournalEntryDataType = (typeof AccountingJournalEntryDataType)[keyof typeof AccountingJournalEntryDataType]; +export const AccountingJournalEntryDataType1 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingJournalEntryDataType1 = (typeof AccountingJournalEntryDataType1)[keyof typeof AccountingJournalEntryDataType1]; +export const AccountingJournalEntryDataType2 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type AccountingJournalEntryDataType2 = (typeof AccountingJournalEntryDataType2)[keyof typeof AccountingJournalEntryDataType2]; +export const AccountingJournalEntryRecordRefDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type AccountingJournalEntryRecordRefDataType = (typeof AccountingJournalEntryRecordRefDataType)[keyof typeof AccountingJournalEntryRecordRefDataType]; +export const AccountingJournalEntryRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingJournalEntryRecordRefsDataType = (typeof AccountingJournalEntryRecordRefsDataType)[keyof typeof AccountingJournalEntryRecordRefsDataType]; +export const AccountingJournalEntryTrackingDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type AccountingJournalEntryTrackingDataType = (typeof AccountingJournalEntryTrackingDataType)[keyof typeof AccountingJournalEntryTrackingDataType]; +export const AccountingJournalStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingJournalStatusSupplierStatus = (typeof AccountingJournalStatusSupplierStatus)[keyof typeof AccountingJournalStatusSupplierStatus]; +export const AccountingJournalSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingJournalSupplierStatus = (typeof AccountingJournalSupplierStatus)[keyof typeof AccountingJournalSupplierStatus]; +export const AccountingJournalsResultsSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingJournalsResultsSupplierStatus = (typeof AccountingJournalsResultsSupplierStatus)[keyof typeof AccountingJournalsResultsSupplierStatus]; +export const AccountingJournalsStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingJournalsStatusSupplierStatus = (typeof AccountingJournalsStatusSupplierStatus)[keyof typeof AccountingJournalsStatusSupplierStatus]; +export const AccountingJournalsSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingJournalsSupplierStatus = (typeof AccountingJournalsSupplierStatus)[keyof typeof AccountingJournalsSupplierStatus]; +export const AccountingPaymentMethodPaymentMethodType = { + BankTransfer: "BankTransfer", + Cash: "Cash", + Check: "Check", + CreditCard: "CreditCard", + DebitCard: "DebitCard", + Other: "Other", + Unknown: "Unknown", +} as const; +export type AccountingPaymentMethodPaymentMethodType = (typeof AccountingPaymentMethodPaymentMethodType)[keyof typeof AccountingPaymentMethodPaymentMethodType]; +export const AccountingPaymentMethodTypePaymentMethodType = { + BankTransfer: "BankTransfer", + Cash: "Cash", + Check: "Check", + CreditCard: "CreditCard", + DebitCard: "DebitCard", + Other: "Other", + Unknown: "Unknown", +} as const; +export type AccountingPaymentMethodTypePaymentMethodType = (typeof AccountingPaymentMethodTypePaymentMethodType)[keyof typeof AccountingPaymentMethodTypePaymentMethodType]; +export const AccountingPaymentPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingPaymentPaymentLinkType = (typeof AccountingPaymentPaymentLinkType)[keyof typeof AccountingPaymentPaymentLinkType]; +export const AccountingPaymentTypePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingPaymentTypePaymentLinkType = (typeof AccountingPaymentTypePaymentLinkType)[keyof typeof AccountingPaymentTypePaymentLinkType]; +export const AccountingPaymentsPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingPaymentsPaymentLinkType = (typeof AccountingPaymentsPaymentLinkType)[keyof typeof AccountingPaymentsPaymentLinkType]; +export const AccountingPaymentsResultsPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingPaymentsResultsPaymentLinkType = (typeof AccountingPaymentsResultsPaymentLinkType)[keyof typeof AccountingPaymentsResultsPaymentLinkType]; +export const AccountingPaymentsTypePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type AccountingPaymentsTypePaymentLinkType = (typeof AccountingPaymentsTypePaymentLinkType)[keyof typeof AccountingPaymentsTypePaymentLinkType]; +export const AccountingProfitAndLossReportReportBasis = { + Accrual: "Accrual", + Cash: "Cash", + Unknown: "Unknown", +} as const; +export type AccountingProfitAndLossReportReportBasis = (typeof AccountingProfitAndLossReportReportBasis)[keyof typeof AccountingProfitAndLossReportReportBasis]; +export const AccountingSupplierAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingSupplierAccountingAddressType = (typeof AccountingSupplierAccountingAddressType)[keyof typeof AccountingSupplierAccountingAddressType]; +export const AccountingSupplierAddressesAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingSupplierAddressesAccountingAddressType = (typeof AccountingSupplierAddressesAccountingAddressType)[keyof typeof AccountingSupplierAddressesAccountingAddressType]; +export const AccountingSupplierStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingSupplierStatusSupplierStatus = (typeof AccountingSupplierStatusSupplierStatus)[keyof typeof AccountingSupplierStatusSupplierStatus]; +export const AccountingSupplierSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingSupplierSupplierStatus = (typeof AccountingSupplierSupplierStatus)[keyof typeof AccountingSupplierSupplierStatus]; +export const AccountingSupplierTypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingSupplierTypeAccountingAddressType = (typeof AccountingSupplierTypeAccountingAddressType)[keyof typeof AccountingSupplierTypeAccountingAddressType]; +export const AccountingSuppliersAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingSuppliersAccountingAddressType = (typeof AccountingSuppliersAccountingAddressType)[keyof typeof AccountingSuppliersAccountingAddressType]; +export const AccountingSuppliersAddressesAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingSuppliersAddressesAccountingAddressType = (typeof AccountingSuppliersAddressesAccountingAddressType)[keyof typeof AccountingSuppliersAddressesAccountingAddressType]; +export const AccountingSuppliersResultsSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingSuppliersResultsSupplierStatus = (typeof AccountingSuppliersResultsSupplierStatus)[keyof typeof AccountingSuppliersResultsSupplierStatus]; +export const AccountingSuppliersStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingSuppliersStatusSupplierStatus = (typeof AccountingSuppliersStatusSupplierStatus)[keyof typeof AccountingSuppliersStatusSupplierStatus]; +export const AccountingSuppliersSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingSuppliersSupplierStatus = (typeof AccountingSuppliersSupplierStatus)[keyof typeof AccountingSuppliersSupplierStatus]; +export const AccountingSuppliersTypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AccountingSuppliersTypeAccountingAddressType = (typeof AccountingSuppliersTypeAccountingAddressType)[keyof typeof AccountingSuppliersTypeAccountingAddressType]; +export const AccountingTrackingCategoryStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingTrackingCategoryStatusSupplierStatus = (typeof AccountingTrackingCategoryStatusSupplierStatus)[keyof typeof AccountingTrackingCategoryStatusSupplierStatus]; +export const AccountingTrackingCategorySupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type AccountingTrackingCategorySupplierStatus = (typeof AccountingTrackingCategorySupplierStatus)[keyof typeof AccountingTrackingCategorySupplierStatus]; +export const AccountingTransferContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingTransferContactRefDataType = (typeof AccountingTransferContactRefDataType)[keyof typeof AccountingTransferContactRefDataType]; +export const AccountingTransferDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingTransferDataType = (typeof AccountingTransferDataType)[keyof typeof AccountingTransferDataType]; +export const AccountingTransferStatus = { + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type AccountingTransferStatus = (typeof AccountingTransferStatus)[keyof typeof AccountingTransferStatus]; +export const AccountingTransfersContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingTransfersContactRefDataType = (typeof AccountingTransfersContactRefDataType)[keyof typeof AccountingTransfersContactRefDataType]; +export const AccountingTransfersDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type AccountingTransfersDataType = (typeof AccountingTransfersDataType)[keyof typeof AccountingTransfersDataType]; +export const AccountingTransfersResultsStatus = { + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type AccountingTransfersResultsStatus = (typeof AccountingTransfersResultsStatus)[keyof typeof AccountingTransfersResultsStatus]; +export const AccountingTransfersStatus = { + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type AccountingTransfersStatus = (typeof AccountingTransfersStatus)[keyof typeof AccountingTransfersStatus]; +export const AccountsPayableTrackingBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountsPayableTrackingBilledToType = (typeof AccountsPayableTrackingBilledToType)[keyof typeof AccountsPayableTrackingBilledToType]; +export const AccountsPayableTrackingIsBilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountsPayableTrackingIsBilledToBilledToType = (typeof AccountsPayableTrackingIsBilledToBilledToType)[keyof typeof AccountsPayableTrackingIsBilledToBilledToType]; +export const AccountsPayableTrackingIsRebilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountsPayableTrackingIsRebilledToBilledToType = (typeof AccountsPayableTrackingIsRebilledToBilledToType)[keyof typeof AccountsPayableTrackingIsRebilledToBilledToType]; +export const AccountsReceivableTrackingBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountsReceivableTrackingBilledToType1 = (typeof AccountsReceivableTrackingBilledToType1)[keyof typeof AccountsReceivableTrackingBilledToType1]; +export const AccountsReceivableTrackingIsBilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountsReceivableTrackingIsBilledToBilledToType1 = (typeof AccountsReceivableTrackingIsBilledToBilledToType1)[keyof typeof AccountsReceivableTrackingIsBilledToBilledToType1]; +export const AccountsReceivableTrackingIsRebilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type AccountsReceivableTrackingIsRebilledToBilledToType1 = (typeof AccountsReceivableTrackingIsRebilledToBilledToType1)[keyof typeof AccountsReceivableTrackingIsRebilledToBilledToType1]; +export const AddressAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AddressAccountingAddressType = (typeof AddressAccountingAddressType)[keyof typeof AddressAccountingAddressType]; +export const AddressCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type AddressCommerceAddressType = (typeof AddressCommerceAddressType)[keyof typeof AddressCommerceAddressType]; +export const AddressesAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type AddressesAccountingAddressType = (typeof AddressesAccountingAddressType)[keyof typeof AddressesAccountingAddressType]; +export const AddressesCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type AddressesCommerceAddressType = (typeof AddressesCommerceAddressType)[keyof typeof AddressesCommerceAddressType]; +export const BankAccountCreateResponseAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountCreateResponseAccountStatus = (typeof BankAccountCreateResponseAccountStatus)[keyof typeof BankAccountCreateResponseAccountStatus]; +export const BankAccountCreateResponseAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankAccountCreateResponseAccountTypeAccountingBankAccountType = (typeof BankAccountCreateResponseAccountTypeAccountingBankAccountType)[keyof typeof BankAccountCreateResponseAccountTypeAccountingBankAccountType]; +export const BankAccountCreateResponseAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankAccountCreateResponseAccountingBankAccountType = (typeof BankAccountCreateResponseAccountingBankAccountType)[keyof typeof BankAccountCreateResponseAccountingBankAccountType]; +export const BankAccountCreateResponseDataAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountCreateResponseDataAccountStatus = (typeof BankAccountCreateResponseDataAccountStatus)[keyof typeof BankAccountCreateResponseDataAccountStatus]; +export const BankAccountCreateResponseDataPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type BankAccountCreateResponseDataPushChangeType = (typeof BankAccountCreateResponseDataPushChangeType)[keyof typeof BankAccountCreateResponseDataPushChangeType]; +export const BankAccountCreateResponseDataPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type BankAccountCreateResponseDataPushOperationStatus = (typeof BankAccountCreateResponseDataPushOperationStatus)[keyof typeof BankAccountCreateResponseDataPushOperationStatus]; +export const BankAccountCreateResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type BankAccountCreateResponseDataTypeDataTypes = (typeof BankAccountCreateResponseDataTypeDataTypes)[keyof typeof BankAccountCreateResponseDataTypeDataTypes]; +export const BankAccountCreateResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type BankAccountCreateResponseDataTypes = (typeof BankAccountCreateResponseDataTypes)[keyof typeof BankAccountCreateResponseDataTypes]; +export const BankAccountCreateResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type BankAccountCreateResponsePushChangeType = (typeof BankAccountCreateResponsePushChangeType)[keyof typeof BankAccountCreateResponsePushChangeType]; +export const BankAccountCreateResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type BankAccountCreateResponsePushOperationStatus = (typeof BankAccountCreateResponsePushOperationStatus)[keyof typeof BankAccountCreateResponsePushOperationStatus]; +export const BankAccountCreateResponseStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountCreateResponseStatusAccountStatus = (typeof BankAccountCreateResponseStatusAccountStatus)[keyof typeof BankAccountCreateResponseStatusAccountStatus]; +export const BankAccountCreateResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type BankAccountCreateResponseStatusPushOperationStatus = (typeof BankAccountCreateResponseStatusPushOperationStatus)[keyof typeof BankAccountCreateResponseStatusPushOperationStatus]; +export const BankAccountCreateResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type BankAccountCreateResponseTypePushChangeType = (typeof BankAccountCreateResponseTypePushChangeType)[keyof typeof BankAccountCreateResponseTypePushChangeType]; +export const BankAccountPrototypeAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountPrototypeAccountStatus = (typeof BankAccountPrototypeAccountStatus)[keyof typeof BankAccountPrototypeAccountStatus]; +export const BankAccountPrototypeAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankAccountPrototypeAccountTypeAccountingBankAccountType = (typeof BankAccountPrototypeAccountTypeAccountingBankAccountType)[keyof typeof BankAccountPrototypeAccountTypeAccountingBankAccountType]; +export const BankAccountPrototypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankAccountPrototypeAccountingBankAccountType = (typeof BankAccountPrototypeAccountingBankAccountType)[keyof typeof BankAccountPrototypeAccountingBankAccountType]; +export const BankAccountPrototypeStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountPrototypeStatusAccountStatus = (typeof BankAccountPrototypeStatusAccountStatus)[keyof typeof BankAccountPrototypeStatusAccountStatus]; +export const BankAccountStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountStatusAccountStatus = (typeof BankAccountStatusAccountStatus)[keyof typeof BankAccountStatusAccountStatus]; +export const BankAccountStatusBankAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountStatusBankAccountStatus = (typeof BankAccountStatusBankAccountStatus)[keyof typeof BankAccountStatusBankAccountStatus]; +export const BankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankAccountType = (typeof BankAccountType)[keyof typeof BankAccountType]; +export const BankAccountsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountsAccountStatus = (typeof BankAccountsAccountStatus)[keyof typeof BankAccountsAccountStatus]; +export const BankAccountsAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankAccountsAccountTypeAccountingBankAccountType = (typeof BankAccountsAccountTypeAccountingBankAccountType)[keyof typeof BankAccountsAccountTypeAccountingBankAccountType]; +export const BankAccountsAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankAccountsAccountingBankAccountType = (typeof BankAccountsAccountingBankAccountType)[keyof typeof BankAccountsAccountingBankAccountType]; +export const BankAccountsDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type BankAccountsDataTypeDataTypes = (typeof BankAccountsDataTypeDataTypes)[keyof typeof BankAccountsDataTypeDataTypes]; +export const BankAccountsDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type BankAccountsDataTypes = (typeof BankAccountsDataTypes)[keyof typeof BankAccountsDataTypes]; +export const BankAccountsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type BankAccountsPushChangeType = (typeof BankAccountsPushChangeType)[keyof typeof BankAccountsPushChangeType]; +export const BankAccountsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type BankAccountsPushOperationStatus = (typeof BankAccountsPushOperationStatus)[keyof typeof BankAccountsPushOperationStatus]; +export const BankAccountsResultsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountsResultsAccountStatus = (typeof BankAccountsResultsAccountStatus)[keyof typeof BankAccountsResultsAccountStatus]; +export const BankAccountsResultsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type BankAccountsResultsPushChangeType = (typeof BankAccountsResultsPushChangeType)[keyof typeof BankAccountsResultsPushChangeType]; +export const BankAccountsResultsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type BankAccountsResultsPushOperationStatus = (typeof BankAccountsResultsPushOperationStatus)[keyof typeof BankAccountsResultsPushOperationStatus]; +export const BankAccountsStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type BankAccountsStatusAccountStatus = (typeof BankAccountsStatusAccountStatus)[keyof typeof BankAccountsStatusAccountStatus]; +export const BankAccountsStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type BankAccountsStatusPushOperationStatus = (typeof BankAccountsStatusPushOperationStatus)[keyof typeof BankAccountsStatusPushOperationStatus]; +export const BankAccountsTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type BankAccountsTypePushChangeType = (typeof BankAccountsTypePushChangeType)[keyof typeof BankAccountsTypePushChangeType]; +export const BankStatementUploadConfigurationSource = { + Codat: "codat", +} as const; +export type BankStatementUploadConfigurationSource = (typeof BankStatementUploadConfigurationSource)[keyof typeof BankStatementUploadConfigurationSource]; +export const BankTransactionTypeBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type BankTransactionTypeBankTransactionType = (typeof BankTransactionTypeBankTransactionType)[keyof typeof BankTransactionTypeBankTransactionType]; +export const BankingAccountAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type BankingAccountAccountIdentifierType = (typeof BankingAccountAccountIdentifierType)[keyof typeof BankingAccountAccountIdentifierType]; +export const BankingAccountAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankingAccountAccountingBankAccountType = (typeof BankingAccountAccountingBankAccountType)[keyof typeof BankingAccountAccountingBankAccountType]; +export const BankingAccountTypeAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type BankingAccountTypeAccountIdentifierType = (typeof BankingAccountTypeAccountIdentifierType)[keyof typeof BankingAccountTypeAccountIdentifierType]; +export const BankingAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankingAccountTypeAccountingBankAccountType = (typeof BankingAccountTypeAccountingBankAccountType)[keyof typeof BankingAccountTypeAccountingBankAccountType]; +export const BankingAccountsAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type BankingAccountsAccountIdentifierType = (typeof BankingAccountsAccountIdentifierType)[keyof typeof BankingAccountsAccountIdentifierType]; +export const BankingAccountsAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankingAccountsAccountingBankAccountType = (typeof BankingAccountsAccountingBankAccountType)[keyof typeof BankingAccountsAccountingBankAccountType]; +export const BankingAccountsResultsAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type BankingAccountsResultsAccountIdentifierType = (typeof BankingAccountsResultsAccountIdentifierType)[keyof typeof BankingAccountsResultsAccountIdentifierType]; +export const BankingAccountsTypeAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type BankingAccountsTypeAccountIdentifierType = (typeof BankingAccountsTypeAccountIdentifierType)[keyof typeof BankingAccountsTypeAccountIdentifierType]; +export const BankingAccountsTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type BankingAccountsTypeAccountingBankAccountType = (typeof BankingAccountsTypeAccountingBankAccountType)[keyof typeof BankingAccountsTypeAccountingBankAccountType]; +export const BankingTransactionCategoriesResultsSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type BankingTransactionCategoriesResultsSupplierStatus = (typeof BankingTransactionCategoriesResultsSupplierStatus)[keyof typeof BankingTransactionCategoriesResultsSupplierStatus]; +export const BankingTransactionCategoriesStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type BankingTransactionCategoriesStatusSupplierStatus = (typeof BankingTransactionCategoriesStatusSupplierStatus)[keyof typeof BankingTransactionCategoriesStatusSupplierStatus]; +export const BankingTransactionCategoriesSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type BankingTransactionCategoriesSupplierStatus = (typeof BankingTransactionCategoriesSupplierStatus)[keyof typeof BankingTransactionCategoriesSupplierStatus]; +export const BankingTransactionCategoryStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type BankingTransactionCategoryStatusSupplierStatus = (typeof BankingTransactionCategoryStatusSupplierStatus)[keyof typeof BankingTransactionCategoryStatusSupplierStatus]; +export const BankingTransactionCategorySupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type BankingTransactionCategorySupplierStatus = (typeof BankingTransactionCategorySupplierStatus)[keyof typeof BankingTransactionCategorySupplierStatus]; +export const BankingTransactionCodeTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type BankingTransactionCodeTransactionCode = (typeof BankingTransactionCodeTransactionCode)[keyof typeof BankingTransactionCodeTransactionCode]; +export const BankingTransactionTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type BankingTransactionTransactionCode = (typeof BankingTransactionTransactionCode)[keyof typeof BankingTransactionTransactionCode]; +export const BankingTransactionsCodeTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type BankingTransactionsCodeTransactionCode = (typeof BankingTransactionsCodeTransactionCode)[keyof typeof BankingTransactionsCodeTransactionCode]; +export const BankingTransactionsResultsTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type BankingTransactionsResultsTransactionCode = (typeof BankingTransactionsResultsTransactionCode)[keyof typeof BankingTransactionsResultsTransactionCode]; +export const BankingTransactionsTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type BankingTransactionsTransactionCode = (typeof BankingTransactionsTransactionCode)[keyof typeof BankingTransactionsTransactionCode]; +export const BillCreditNoteLineItemBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BillCreditNoteLineItemBilledToType = (typeof BillCreditNoteLineItemBilledToType)[keyof typeof BillCreditNoteLineItemBilledToType]; +export const BillCreditNoteLineItemCreatedFromLineRefDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type BillCreditNoteLineItemCreatedFromLineRefDataType = (typeof BillCreditNoteLineItemCreatedFromLineRefDataType)[keyof typeof BillCreditNoteLineItemCreatedFromLineRefDataType]; +export const BillCreditNoteLineItemDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type BillCreditNoteLineItemDataType = (typeof BillCreditNoteLineItemDataType)[keyof typeof BillCreditNoteLineItemDataType]; +export const BillCreditNoteLineItemIsBilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BillCreditNoteLineItemIsBilledToBilledToType = (typeof BillCreditNoteLineItemIsBilledToBilledToType)[keyof typeof BillCreditNoteLineItemIsBilledToBilledToType]; +export const BillCreditNoteLineItemIsRebilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BillCreditNoteLineItemIsRebilledToBilledToType = (typeof BillCreditNoteLineItemIsRebilledToBilledToType)[keyof typeof BillCreditNoteLineItemIsRebilledToBilledToType]; +export const BillCreditNoteLineItemTrackingBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BillCreditNoteLineItemTrackingBilledToType = (typeof BillCreditNoteLineItemTrackingBilledToType)[keyof typeof BillCreditNoteLineItemTrackingBilledToType]; +export const BillCreditNoteStatusBillCreditNoteStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type BillCreditNoteStatusBillCreditNoteStatus = (typeof BillCreditNoteStatusBillCreditNoteStatus)[keyof typeof BillCreditNoteStatusBillCreditNoteStatus]; +export const BillCreditNoteStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type BillCreditNoteStatusInvoiceStatus = (typeof BillCreditNoteStatusInvoiceStatus)[keyof typeof BillCreditNoteStatusInvoiceStatus]; +export const BillLineItemBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BillLineItemBilledToType = (typeof BillLineItemBilledToType)[keyof typeof BillLineItemBilledToType]; +export const BillLineItemDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type BillLineItemDataType = (typeof BillLineItemDataType)[keyof typeof BillLineItemDataType]; +export const BillLineItemIsBilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BillLineItemIsBilledToBilledToType = (typeof BillLineItemIsBilledToBilledToType)[keyof typeof BillLineItemIsBilledToBilledToType]; +export const BillLineItemIsRebilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BillLineItemIsRebilledToBilledToType = (typeof BillLineItemIsRebilledToBilledToType)[keyof typeof BillLineItemIsRebilledToBilledToType]; +export const BillLineItemPurchaseOrderLineRefDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type BillLineItemPurchaseOrderLineRefDataType = (typeof BillLineItemPurchaseOrderLineRefDataType)[keyof typeof BillLineItemPurchaseOrderLineRefDataType]; +export const BillLineItemTrackingBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BillLineItemTrackingBilledToType = (typeof BillLineItemTrackingBilledToType)[keyof typeof BillLineItemTrackingBilledToType]; +export const BillPaymentLineBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type BillPaymentLineBillPaymentLineLinkType = (typeof BillPaymentLineBillPaymentLineLinkType)[keyof typeof BillPaymentLineBillPaymentLineLinkType]; +export const BillPaymentLineLinkBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type BillPaymentLineLinkBillPaymentLineLinkType = (typeof BillPaymentLineLinkBillPaymentLineLinkType)[keyof typeof BillPaymentLineLinkBillPaymentLineLinkType]; +export const BillPaymentLineLinkTypeBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type BillPaymentLineLinkTypeBillPaymentLineLinkType = (typeof BillPaymentLineLinkTypeBillPaymentLineLinkType)[keyof typeof BillPaymentLineLinkTypeBillPaymentLineLinkType]; +export const BillPaymentLineTypeBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type BillPaymentLineTypeBillPaymentLineLinkType = (typeof BillPaymentLineTypeBillPaymentLineLinkType)[keyof typeof BillPaymentLineTypeBillPaymentLineLinkType]; +export const BillStatusBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type BillStatusBillStatus = (typeof BillStatusBillStatus)[keyof typeof BillStatusBillStatus]; +export const BilledToType1BilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BilledToType1BilledToType1 = (typeof BilledToType1BilledToType1)[keyof typeof BilledToType1BilledToType1]; +export const BilledToTypeBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type BilledToTypeBilledToType = (typeof BilledToTypeBilledToType)[keyof typeof BilledToTypeBilledToType]; +export const CategorizedBankStatementAccountsAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type CategorizedBankStatementAccountsAccountIdentifierType = (typeof CategorizedBankStatementAccountsAccountIdentifierType)[keyof typeof CategorizedBankStatementAccountsAccountIdentifierType]; +export const CategorizedBankStatementAccountsTypeAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type CategorizedBankStatementAccountsTypeAccountIdentifierType = (typeof CategorizedBankStatementAccountsTypeAccountIdentifierType)[keyof typeof CategorizedBankStatementAccountsTypeAccountIdentifierType]; +export const CodeTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type CodeTransactionCode = (typeof CodeTransactionCode)[keyof typeof CodeTransactionCode]; +export const CommerceAddressCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceAddressCommerceAddressType = (typeof CommerceAddressCommerceAddressType)[keyof typeof CommerceAddressCommerceAddressType]; +export const CommerceAddressTypeCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceAddressTypeCommerceAddressType = (typeof CommerceAddressTypeCommerceAddressType)[keyof typeof CommerceAddressTypeCommerceAddressType]; +export const CommerceCompanyInfoAddressesCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCompanyInfoAddressesCommerceAddressType = (typeof CommerceCompanyInfoAddressesCommerceAddressType)[keyof typeof CommerceCompanyInfoAddressesCommerceAddressType]; +export const CommerceCompanyInfoCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCompanyInfoCommerceAddressType = (typeof CommerceCompanyInfoCommerceAddressType)[keyof typeof CommerceCompanyInfoCommerceAddressType]; +export const CommerceCompanyInfoPhoneNumbersType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type CommerceCompanyInfoPhoneNumbersType = (typeof CommerceCompanyInfoPhoneNumbersType)[keyof typeof CommerceCompanyInfoPhoneNumbersType]; +export const CommerceCompanyInfoType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type CommerceCompanyInfoType = (typeof CommerceCompanyInfoType)[keyof typeof CommerceCompanyInfoType]; +export const CommerceCompanyInfoType1 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type CommerceCompanyInfoType1 = (typeof CommerceCompanyInfoType1)[keyof typeof CommerceCompanyInfoType1]; +export const CommerceCompanyInfoType2 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type CommerceCompanyInfoType2 = (typeof CommerceCompanyInfoType2)[keyof typeof CommerceCompanyInfoType2]; +export const CommerceCompanyInfoTypeCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCompanyInfoTypeCommerceAddressType = (typeof CommerceCompanyInfoTypeCommerceAddressType)[keyof typeof CommerceCompanyInfoTypeCommerceAddressType]; +export const CommerceCompanyInfoWebLinksType = { + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type CommerceCompanyInfoWebLinksType = (typeof CommerceCompanyInfoWebLinksType)[keyof typeof CommerceCompanyInfoWebLinksType]; +export const CommerceCustomerAddressesCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCustomerAddressesCommerceAddressType = (typeof CommerceCustomerAddressesCommerceAddressType)[keyof typeof CommerceCustomerAddressesCommerceAddressType]; +export const CommerceCustomerCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCustomerCommerceAddressType = (typeof CommerceCustomerCommerceAddressType)[keyof typeof CommerceCustomerCommerceAddressType]; +export const CommerceCustomerTypeCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCustomerTypeCommerceAddressType = (typeof CommerceCustomerTypeCommerceAddressType)[keyof typeof CommerceCustomerTypeCommerceAddressType]; +export const CommerceCustomersAddressesCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCustomersAddressesCommerceAddressType = (typeof CommerceCustomersAddressesCommerceAddressType)[keyof typeof CommerceCustomersAddressesCommerceAddressType]; +export const CommerceCustomersCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCustomersCommerceAddressType = (typeof CommerceCustomersCommerceAddressType)[keyof typeof CommerceCustomersCommerceAddressType]; +export const CommerceCustomersTypeCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceCustomersTypeCommerceAddressType = (typeof CommerceCustomersTypeCommerceAddressType)[keyof typeof CommerceCustomersTypeCommerceAddressType]; +export const CommerceDisputeDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type CommerceDisputeDisputeStatus = (typeof CommerceDisputeDisputeStatus)[keyof typeof CommerceDisputeDisputeStatus]; +export const CommerceDisputeStatusDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type CommerceDisputeStatusDisputeStatus = (typeof CommerceDisputeStatusDisputeStatus)[keyof typeof CommerceDisputeStatusDisputeStatus]; +export const CommerceDisputeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceDisputeTransactionSourceType = (typeof CommerceDisputeTransactionSourceType)[keyof typeof CommerceDisputeTransactionSourceType]; +export const CommerceDisputeTypeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceDisputeTypeTransactionSourceType = (typeof CommerceDisputeTypeTransactionSourceType)[keyof typeof CommerceDisputeTypeTransactionSourceType]; +export const CommerceDisputesDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type CommerceDisputesDisputeStatus = (typeof CommerceDisputesDisputeStatus)[keyof typeof CommerceDisputesDisputeStatus]; +export const CommerceDisputesResultsDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type CommerceDisputesResultsDisputeStatus = (typeof CommerceDisputesResultsDisputeStatus)[keyof typeof CommerceDisputesResultsDisputeStatus]; +export const CommerceDisputesStatusDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type CommerceDisputesStatusDisputeStatus = (typeof CommerceDisputesStatusDisputeStatus)[keyof typeof CommerceDisputesStatusDisputeStatus]; +export const CommerceDisputesTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceDisputesTransactionSourceType = (typeof CommerceDisputesTransactionSourceType)[keyof typeof CommerceDisputesTransactionSourceType]; +export const CommerceDisputesTypeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceDisputesTypeTransactionSourceType = (typeof CommerceDisputesTypeTransactionSourceType)[keyof typeof CommerceDisputesTypeTransactionSourceType]; +export const CommerceLocationAddressCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceLocationAddressCommerceAddressType = (typeof CommerceLocationAddressCommerceAddressType)[keyof typeof CommerceLocationAddressCommerceAddressType]; +export const CommerceLocationCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceLocationCommerceAddressType = (typeof CommerceLocationCommerceAddressType)[keyof typeof CommerceLocationCommerceAddressType]; +export const CommerceLocationTypeCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceLocationTypeCommerceAddressType = (typeof CommerceLocationTypeCommerceAddressType)[keyof typeof CommerceLocationTypeCommerceAddressType]; +export const CommerceLocationsAddressCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceLocationsAddressCommerceAddressType = (typeof CommerceLocationsAddressCommerceAddressType)[keyof typeof CommerceLocationsAddressCommerceAddressType]; +export const CommerceLocationsCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceLocationsCommerceAddressType = (typeof CommerceLocationsCommerceAddressType)[keyof typeof CommerceLocationsCommerceAddressType]; +export const CommerceLocationsTypeCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type CommerceLocationsTypeCommerceAddressType = (typeof CommerceLocationsTypeCommerceAddressType)[keyof typeof CommerceLocationsTypeCommerceAddressType]; +export const CommerceOrderPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommerceOrderPaymentStatus = (typeof CommerceOrderPaymentStatus)[keyof typeof CommerceOrderPaymentStatus]; +export const CommerceOrderPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommerceOrderPaymentType = (typeof CommerceOrderPaymentType)[keyof typeof CommerceOrderPaymentType]; +export const CommerceOrderServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type CommerceOrderServiceChargeType = (typeof CommerceOrderServiceChargeType)[keyof typeof CommerceOrderServiceChargeType]; +export const CommerceOrderStatusPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommerceOrderStatusPaymentStatus = (typeof CommerceOrderStatusPaymentStatus)[keyof typeof CommerceOrderStatusPaymentStatus]; +export const CommerceOrderTypePaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommerceOrderTypePaymentType = (typeof CommerceOrderTypePaymentType)[keyof typeof CommerceOrderTypePaymentType]; +export const CommerceOrderTypeServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type CommerceOrderTypeServiceChargeType = (typeof CommerceOrderTypeServiceChargeType)[keyof typeof CommerceOrderTypeServiceChargeType]; +export const CommerceOrdersPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommerceOrdersPaymentStatus = (typeof CommerceOrdersPaymentStatus)[keyof typeof CommerceOrdersPaymentStatus]; +export const CommerceOrdersPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommerceOrdersPaymentType = (typeof CommerceOrdersPaymentType)[keyof typeof CommerceOrdersPaymentType]; +export const CommerceOrdersResultsServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type CommerceOrdersResultsServiceChargeType = (typeof CommerceOrdersResultsServiceChargeType)[keyof typeof CommerceOrdersResultsServiceChargeType]; +export const CommerceOrdersServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type CommerceOrdersServiceChargeType = (typeof CommerceOrdersServiceChargeType)[keyof typeof CommerceOrdersServiceChargeType]; +export const CommerceOrdersStatusPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommerceOrdersStatusPaymentStatus = (typeof CommerceOrdersStatusPaymentStatus)[keyof typeof CommerceOrdersStatusPaymentStatus]; +export const CommerceOrdersTypePaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommerceOrdersTypePaymentType = (typeof CommerceOrdersTypePaymentType)[keyof typeof CommerceOrdersTypePaymentType]; +export const CommerceOrdersTypeServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type CommerceOrdersTypeServiceChargeType = (typeof CommerceOrdersTypeServiceChargeType)[keyof typeof CommerceOrdersTypeServiceChargeType]; +export const CommercePaymentMethodStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type CommercePaymentMethodStatus = (typeof CommercePaymentMethodStatus)[keyof typeof CommercePaymentMethodStatus]; +export const CommercePaymentMethodStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type CommercePaymentMethodStatusSupplierStatus = (typeof CommercePaymentMethodStatusSupplierStatus)[keyof typeof CommercePaymentMethodStatusSupplierStatus]; +export const CommercePaymentMethodSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type CommercePaymentMethodSupplierStatus = (typeof CommercePaymentMethodSupplierStatus)[keyof typeof CommercePaymentMethodSupplierStatus]; +export const CommercePaymentMethodsStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type CommercePaymentMethodsStatusSupplierStatus = (typeof CommercePaymentMethodsStatusSupplierStatus)[keyof typeof CommercePaymentMethodsStatusSupplierStatus]; +export const CommercePaymentMethodsSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type CommercePaymentMethodsSupplierStatus = (typeof CommercePaymentMethodsSupplierStatus)[keyof typeof CommercePaymentMethodsSupplierStatus]; +export const CommercePaymentPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommercePaymentPaymentStatus = (typeof CommercePaymentPaymentStatus)[keyof typeof CommercePaymentPaymentStatus]; +export const CommercePaymentPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommercePaymentPaymentType = (typeof CommercePaymentPaymentType)[keyof typeof CommercePaymentPaymentType]; +export const CommercePaymentStatusPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommercePaymentStatusPaymentStatus = (typeof CommercePaymentStatusPaymentStatus)[keyof typeof CommercePaymentStatusPaymentStatus]; +export const CommercePaymentTypePaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommercePaymentTypePaymentType = (typeof CommercePaymentTypePaymentType)[keyof typeof CommercePaymentTypePaymentType]; +export const CommercePaymentsPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommercePaymentsPaymentStatus = (typeof CommercePaymentsPaymentStatus)[keyof typeof CommercePaymentsPaymentStatus]; +export const CommercePaymentsPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommercePaymentsPaymentType = (typeof CommercePaymentsPaymentType)[keyof typeof CommercePaymentsPaymentType]; +export const CommercePaymentsResultsPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommercePaymentsResultsPaymentStatus = (typeof CommercePaymentsResultsPaymentStatus)[keyof typeof CommercePaymentsResultsPaymentStatus]; +export const CommercePaymentsResultsPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommercePaymentsResultsPaymentType = (typeof CommercePaymentsResultsPaymentType)[keyof typeof CommercePaymentsResultsPaymentType]; +export const CommercePaymentsStatusPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CommercePaymentsStatusPaymentStatus = (typeof CommercePaymentsStatusPaymentStatus)[keyof typeof CommercePaymentsStatusPaymentStatus]; +export const CommercePaymentsTypePaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type CommercePaymentsTypePaymentType = (typeof CommercePaymentsTypePaymentType)[keyof typeof CommercePaymentsTypePaymentType]; +export const CommerceProductProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type CommerceProductProductVariantStatus = (typeof CommerceProductProductVariantStatus)[keyof typeof CommerceProductProductVariantStatus]; +export const CommerceProductStatusProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type CommerceProductStatusProductVariantStatus = (typeof CommerceProductStatusProductVariantStatus)[keyof typeof CommerceProductStatusProductVariantStatus]; +export const CommerceProductsProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type CommerceProductsProductVariantStatus = (typeof CommerceProductsProductVariantStatus)[keyof typeof CommerceProductsProductVariantStatus]; +export const CommerceProductsResultsProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type CommerceProductsResultsProductVariantStatus = (typeof CommerceProductsResultsProductVariantStatus)[keyof typeof CommerceProductsResultsProductVariantStatus]; +export const CommerceProductsStatusProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type CommerceProductsStatusProductVariantStatus = (typeof CommerceProductsStatusProductVariantStatus)[keyof typeof CommerceProductsStatusProductVariantStatus]; +export const CommerceTransactionTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceTransactionTransactionSourceType = (typeof CommerceTransactionTransactionSourceType)[keyof typeof CommerceTransactionTransactionSourceType]; +export const CommerceTransactionTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type CommerceTransactionTransactionType = (typeof CommerceTransactionTransactionType)[keyof typeof CommerceTransactionTransactionType]; +export const CommerceTransactionTypeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceTransactionTypeTransactionSourceType = (typeof CommerceTransactionTypeTransactionSourceType)[keyof typeof CommerceTransactionTypeTransactionSourceType]; +export const CommerceTransactionTypeTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type CommerceTransactionTypeTransactionType = (typeof CommerceTransactionTypeTransactionType)[keyof typeof CommerceTransactionTypeTransactionType]; +export const CommerceTransactionsResultsTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceTransactionsResultsTransactionSourceType = (typeof CommerceTransactionsResultsTransactionSourceType)[keyof typeof CommerceTransactionsResultsTransactionSourceType]; +export const CommerceTransactionsResultsTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type CommerceTransactionsResultsTransactionType = (typeof CommerceTransactionsResultsTransactionType)[keyof typeof CommerceTransactionsResultsTransactionType]; +export const CommerceTransactionsTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceTransactionsTransactionSourceType = (typeof CommerceTransactionsTransactionSourceType)[keyof typeof CommerceTransactionsTransactionSourceType]; +export const CommerceTransactionsTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type CommerceTransactionsTransactionType = (typeof CommerceTransactionsTransactionType)[keyof typeof CommerceTransactionsTransactionType]; +export const CommerceTransactionsTypeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type CommerceTransactionsTypeTransactionSourceType = (typeof CommerceTransactionsTypeTransactionSourceType)[keyof typeof CommerceTransactionsTypeTransactionSourceType]; +export const CommerceTransactionsTypeTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type CommerceTransactionsTypeTransactionType = (typeof CommerceTransactionsTypeTransactionType)[keyof typeof CommerceTransactionsTypeTransactionType]; +export const CompaniesDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type CompaniesDataConnectionSourceType = (typeof CompaniesDataConnectionSourceType)[keyof typeof CompaniesDataConnectionSourceType]; +export const CompaniesDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type CompaniesDataConnectionStatus = (typeof CompaniesDataConnectionStatus)[keyof typeof CompaniesDataConnectionStatus]; +export const CompaniesDataConnectionsDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type CompaniesDataConnectionsDataConnectionSourceType = (typeof CompaniesDataConnectionsDataConnectionSourceType)[keyof typeof CompaniesDataConnectionsDataConnectionSourceType]; +export const CompaniesDataConnectionsDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type CompaniesDataConnectionsDataConnectionStatus = (typeof CompaniesDataConnectionsDataConnectionStatus)[keyof typeof CompaniesDataConnectionsDataConnectionStatus]; +export const CompaniesErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type CompaniesErrorStatus = (typeof CompaniesErrorStatus)[keyof typeof CompaniesErrorStatus]; +export const CompaniesSourceTypeDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type CompaniesSourceTypeDataConnectionSourceType = (typeof CompaniesSourceTypeDataConnectionSourceType)[keyof typeof CompaniesSourceTypeDataConnectionSourceType]; +export const CompaniesStatusDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type CompaniesStatusDataConnectionStatus = (typeof CompaniesStatusDataConnectionStatus)[keyof typeof CompaniesStatusDataConnectionStatus]; +export const CompaniesStatusErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type CompaniesStatusErrorStatus = (typeof CompaniesStatusErrorStatus)[keyof typeof CompaniesStatusErrorStatus]; +export const CompanyDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type CompanyDataConnectionSourceType = (typeof CompanyDataConnectionSourceType)[keyof typeof CompanyDataConnectionSourceType]; +export const CompanyDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type CompanyDataConnectionStatus = (typeof CompanyDataConnectionStatus)[keyof typeof CompanyDataConnectionStatus]; +export const CompanyDataConnectionsDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type CompanyDataConnectionsDataConnectionSourceType = (typeof CompanyDataConnectionsDataConnectionSourceType)[keyof typeof CompanyDataConnectionsDataConnectionSourceType]; +export const CompanyDataConnectionsDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type CompanyDataConnectionsDataConnectionStatus = (typeof CompanyDataConnectionsDataConnectionStatus)[keyof typeof CompanyDataConnectionsDataConnectionStatus]; +export const CompanyErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type CompanyErrorStatus = (typeof CompanyErrorStatus)[keyof typeof CompanyErrorStatus]; +export const CompanySourceTypeDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type CompanySourceTypeDataConnectionSourceType = (typeof CompanySourceTypeDataConnectionSourceType)[keyof typeof CompanySourceTypeDataConnectionSourceType]; +export const CompanyStatusDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type CompanyStatusDataConnectionStatus = (typeof CompanyStatusDataConnectionStatus)[keyof typeof CompanyStatusDataConnectionStatus]; +export const CompanyStatusErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type CompanyStatusErrorStatus = (typeof CompanyStatusErrorStatus)[keyof typeof CompanyStatusErrorStatus]; +export const ConnectionDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ConnectionDataConnectionSourceType = (typeof ConnectionDataConnectionSourceType)[keyof typeof ConnectionDataConnectionSourceType]; +export const ConnectionDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type ConnectionDataConnectionStatus = (typeof ConnectionDataConnectionStatus)[keyof typeof ConnectionDataConnectionStatus]; +export const ConnectionErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type ConnectionErrorStatus = (typeof ConnectionErrorStatus)[keyof typeof ConnectionErrorStatus]; +export const ConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ConnectionSourceType = (typeof ConnectionSourceType)[keyof typeof ConnectionSourceType]; +export const ConnectionSourceTypeDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ConnectionSourceTypeDataConnectionSourceType = (typeof ConnectionSourceTypeDataConnectionSourceType)[keyof typeof ConnectionSourceTypeDataConnectionSourceType]; +export const ConnectionStatusDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type ConnectionStatusDataConnectionStatus = (typeof ConnectionStatusDataConnectionStatus)[keyof typeof ConnectionStatusDataConnectionStatus]; +export const ConnectionStatusErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type ConnectionStatusErrorStatus = (typeof ConnectionStatusErrorStatus)[keyof typeof ConnectionStatusErrorStatus]; +export const ConnectionsDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ConnectionsDataConnectionSourceType = (typeof ConnectionsDataConnectionSourceType)[keyof typeof ConnectionsDataConnectionSourceType]; +export const ConnectionsDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type ConnectionsDataConnectionStatus = (typeof ConnectionsDataConnectionStatus)[keyof typeof ConnectionsDataConnectionStatus]; +export const ConnectionsErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type ConnectionsErrorStatus = (typeof ConnectionsErrorStatus)[keyof typeof ConnectionsErrorStatus]; +export const ConnectionsResultsDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ConnectionsResultsDataConnectionSourceType = (typeof ConnectionsResultsDataConnectionSourceType)[keyof typeof ConnectionsResultsDataConnectionSourceType]; +export const ConnectionsResultsDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type ConnectionsResultsDataConnectionStatus = (typeof ConnectionsResultsDataConnectionStatus)[keyof typeof ConnectionsResultsDataConnectionStatus]; +export const ConnectionsSourceTypeDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ConnectionsSourceTypeDataConnectionSourceType = (typeof ConnectionsSourceTypeDataConnectionSourceType)[keyof typeof ConnectionsSourceTypeDataConnectionSourceType]; +export const ConnectionsStatusDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type ConnectionsStatusDataConnectionStatus = (typeof ConnectionsStatusDataConnectionStatus)[keyof typeof ConnectionsStatusDataConnectionStatus]; +export const ConnectionsStatusErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type ConnectionsStatusErrorStatus = (typeof ConnectionsStatusErrorStatus)[keyof typeof ConnectionsStatusErrorStatus]; +export const ContactAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type ContactAccountingAddressType = (typeof ContactAccountingAddressType)[keyof typeof ContactAccountingAddressType]; +export const ContactAddressAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type ContactAddressAccountingAddressType = (typeof ContactAddressAccountingAddressType)[keyof typeof ContactAddressAccountingAddressType]; +export const ContactPhoneType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type ContactPhoneType = (typeof ContactPhoneType)[keyof typeof ContactPhoneType]; +export const ContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type ContactRefDataType = (typeof ContactRefDataType)[keyof typeof ContactRefDataType]; +export const ContactReferenceDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type ContactReferenceDataType = (typeof ContactReferenceDataType)[keyof typeof ContactReferenceDataType]; +export const ContactStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type ContactStatusSupplierStatus = (typeof ContactStatusSupplierStatus)[keyof typeof ContactStatusSupplierStatus]; +export const ContactSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type ContactSupplierStatus = (typeof ContactSupplierStatus)[keyof typeof ContactSupplierStatus]; +export const ContactType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type ContactType = (typeof ContactType)[keyof typeof ContactType]; +export const ContactTypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type ContactTypeAccountingAddressType = (typeof ContactTypeAccountingAddressType)[keyof typeof ContactTypeAccountingAddressType]; +export const CreateBankAccountResponseAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CreateBankAccountResponseAccountStatus = (typeof CreateBankAccountResponseAccountStatus)[keyof typeof CreateBankAccountResponseAccountStatus]; +export const CreateBankAccountResponseAccountTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type CreateBankAccountResponseAccountTypeAccountingBankAccountType = (typeof CreateBankAccountResponseAccountTypeAccountingBankAccountType)[keyof typeof CreateBankAccountResponseAccountTypeAccountingBankAccountType]; +export const CreateBankAccountResponseAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type CreateBankAccountResponseAccountingBankAccountType = (typeof CreateBankAccountResponseAccountingBankAccountType)[keyof typeof CreateBankAccountResponseAccountingBankAccountType]; +export const CreateBankAccountResponseDataAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CreateBankAccountResponseDataAccountStatus = (typeof CreateBankAccountResponseDataAccountStatus)[keyof typeof CreateBankAccountResponseDataAccountStatus]; +export const CreateBankAccountResponseDataPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type CreateBankAccountResponseDataPushChangeType = (typeof CreateBankAccountResponseDataPushChangeType)[keyof typeof CreateBankAccountResponseDataPushChangeType]; +export const CreateBankAccountResponseDataPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type CreateBankAccountResponseDataPushOperationStatus = (typeof CreateBankAccountResponseDataPushOperationStatus)[keyof typeof CreateBankAccountResponseDataPushOperationStatus]; +export const CreateBankAccountResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type CreateBankAccountResponseDataTypeDataTypes = (typeof CreateBankAccountResponseDataTypeDataTypes)[keyof typeof CreateBankAccountResponseDataTypeDataTypes]; +export const CreateBankAccountResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type CreateBankAccountResponseDataTypes = (typeof CreateBankAccountResponseDataTypes)[keyof typeof CreateBankAccountResponseDataTypes]; +export const CreateBankAccountResponsePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type CreateBankAccountResponsePushChangeType = (typeof CreateBankAccountResponsePushChangeType)[keyof typeof CreateBankAccountResponsePushChangeType]; +export const CreateBankAccountResponsePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type CreateBankAccountResponsePushOperationStatus = (typeof CreateBankAccountResponsePushOperationStatus)[keyof typeof CreateBankAccountResponsePushOperationStatus]; +export const CreateBankAccountResponseStatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type CreateBankAccountResponseStatusAccountStatus = (typeof CreateBankAccountResponseStatusAccountStatus)[keyof typeof CreateBankAccountResponseStatusAccountStatus]; +export const CreateBankAccountResponseStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type CreateBankAccountResponseStatusPushOperationStatus = (typeof CreateBankAccountResponseStatusPushOperationStatus)[keyof typeof CreateBankAccountResponseStatusPushOperationStatus]; +export const CreateBankAccountResponseTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type CreateBankAccountResponseTypePushChangeType = (typeof CreateBankAccountResponseTypePushChangeType)[keyof typeof CreateBankAccountResponseTypePushChangeType]; +export const CreateSourceAccountRequestBodyAccountType = { + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type CreateSourceAccountRequestBodyAccountType = (typeof CreateSourceAccountRequestBodyAccountType)[keyof typeof CreateSourceAccountRequestBodyAccountType]; +export const CreateSourceAccountRequestBodyRoutingInfoType = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type CreateSourceAccountRequestBodyRoutingInfoType = (typeof CreateSourceAccountRequestBodyRoutingInfoType)[keyof typeof CreateSourceAccountRequestBodyRoutingInfoType]; +export const CreateSourceAccountRequestBodyType = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type CreateSourceAccountRequestBodyType = (typeof CreateSourceAccountRequestBodyType)[keyof typeof CreateSourceAccountRequestBodyType]; +export const CreatedFromLineRefDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type CreatedFromLineRefDataType = (typeof CreatedFromLineRefDataType)[keyof typeof CreatedFromLineRefDataType]; +export const CreditNoteLineItemBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type CreditNoteLineItemBilledToType1 = (typeof CreditNoteLineItemBilledToType1)[keyof typeof CreditNoteLineItemBilledToType1]; +export const CreditNoteLineItemIsBilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type CreditNoteLineItemIsBilledToBilledToType1 = (typeof CreditNoteLineItemIsBilledToBilledToType1)[keyof typeof CreditNoteLineItemIsBilledToBilledToType1]; +export const CreditNoteLineItemIsRebilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type CreditNoteLineItemIsRebilledToBilledToType1 = (typeof CreditNoteLineItemIsRebilledToBilledToType1)[keyof typeof CreditNoteLineItemIsRebilledToBilledToType1]; +export const CreditNoteLineItemTrackingBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type CreditNoteLineItemTrackingBilledToType1 = (typeof CreditNoteLineItemTrackingBilledToType1)[keyof typeof CreditNoteLineItemTrackingBilledToType1]; +export const CreditNoteStatusCreditNoteStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type CreditNoteStatusCreditNoteStatus = (typeof CreditNoteStatusCreditNoteStatus)[keyof typeof CreditNoteStatusCreditNoteStatus]; +export const CreditNoteStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type CreditNoteStatusInvoiceStatus = (typeof CreditNoteStatusInvoiceStatus)[keyof typeof CreditNoteStatusInvoiceStatus]; +export const CurrentStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type CurrentStatus = (typeof CurrentStatus)[keyof typeof CurrentStatus]; +export const CurrentStatusDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type CurrentStatusDatasetStatus = (typeof CurrentStatusDatasetStatus)[keyof typeof CurrentStatusDatasetStatus]; +export const CurrentStatusIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type CurrentStatusIntegrityStatus = (typeof CurrentStatusIntegrityStatus)[keyof typeof CurrentStatusIntegrityStatus]; +export const CustomerStatusCustomerStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type CustomerStatusCustomerStatus = (typeof CustomerStatusCustomerStatus)[keyof typeof CustomerStatusCustomerStatus]; +export const CustomerStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type CustomerStatusSupplierStatus = (typeof CustomerStatusSupplierStatus)[keyof typeof CustomerStatusSupplierStatus]; +export const DataAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type DataAccountStatus = (typeof DataAccountStatus)[keyof typeof DataAccountStatus]; +export const DataAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type DataAccountType = (typeof DataAccountType)[keyof typeof DataAccountType]; +export const DataConnectionErrorErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type DataConnectionErrorErrorStatus = (typeof DataConnectionErrorErrorStatus)[keyof typeof DataConnectionErrorErrorStatus]; +export const DataConnectionErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type DataConnectionErrorStatus = (typeof DataConnectionErrorStatus)[keyof typeof DataConnectionErrorStatus]; +export const DataConnectionErrorStatusErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type DataConnectionErrorStatusErrorStatus = (typeof DataConnectionErrorStatusErrorStatus)[keyof typeof DataConnectionErrorStatusErrorStatus]; +export const DataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type DataConnectionSourceType = (typeof DataConnectionSourceType)[keyof typeof DataConnectionSourceType]; +export const DataConnectionStatusDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type DataConnectionStatusDataConnectionStatus = (typeof DataConnectionStatusDataConnectionStatus)[keyof typeof DataConnectionStatusDataConnectionStatus]; +export const DataConnectionsDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type DataConnectionsDataConnectionSourceType = (typeof DataConnectionsDataConnectionSourceType)[keyof typeof DataConnectionsDataConnectionSourceType]; +export const DataConnectionsDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type DataConnectionsDataConnectionStatus = (typeof DataConnectionsDataConnectionStatus)[keyof typeof DataConnectionsDataConnectionStatus]; +export const DataDataType = { + Customers: "customers", +} as const; +export type DataDataType = (typeof DataDataType)[keyof typeof DataDataType]; +export const DataIntegrityDataType = { + AccountTransactions: "accountTransactions", + BankAccounts: "bankAccounts", + BankingAccounts: "banking-accounts", + BankingTransactions: "banking-transactions", +} as const; +export type DataIntegrityDataType = (typeof DataIntegrityDataType)[keyof typeof DataIntegrityDataType]; +export const DataIntegrityStatusCurrentStatusIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type DataIntegrityStatusCurrentStatusIntegrityStatus = (typeof DataIntegrityStatusCurrentStatusIntegrityStatus)[keyof typeof DataIntegrityStatusCurrentStatusIntegrityStatus]; +export const DataIntegrityStatusInfoCurrentStatusIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type DataIntegrityStatusInfoCurrentStatusIntegrityStatus = (typeof DataIntegrityStatusInfoCurrentStatusIntegrityStatus)[keyof typeof DataIntegrityStatusInfoCurrentStatusIntegrityStatus]; +export const DataIntegrityStatusInfoIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type DataIntegrityStatusInfoIntegrityStatus = (typeof DataIntegrityStatusInfoIntegrityStatus)[keyof typeof DataIntegrityStatusInfoIntegrityStatus]; +export const DataIntegrityStatusIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type DataIntegrityStatusIntegrityStatus = (typeof DataIntegrityStatusIntegrityStatus)[keyof typeof DataIntegrityStatusIntegrityStatus]; +export const DataIntegrityStatusesCurrentStatusIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type DataIntegrityStatusesCurrentStatusIntegrityStatus = (typeof DataIntegrityStatusesCurrentStatusIntegrityStatus)[keyof typeof DataIntegrityStatusesCurrentStatusIntegrityStatus]; +export const DataIntegrityStatusesIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type DataIntegrityStatusesIntegrityStatus = (typeof DataIntegrityStatusesIntegrityStatus)[keyof typeof DataIntegrityStatusesIntegrityStatus]; +export const DataIntegrityStatusesMetadataIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type DataIntegrityStatusesMetadataIntegrityStatus = (typeof DataIntegrityStatusesMetadataIntegrityStatus)[keyof typeof DataIntegrityStatusesMetadataIntegrityStatus]; +export const DataPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type DataPaymentLinkType = (typeof DataPaymentLinkType)[keyof typeof DataPaymentLinkType]; +export const DataPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type DataPushChangeType = (typeof DataPushChangeType)[keyof typeof DataPushChangeType]; +export const DataPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type DataPushOperationStatus = (typeof DataPushOperationStatus)[keyof typeof DataPushOperationStatus]; +export const DataStatusCurrentStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type DataStatusCurrentStatus = (typeof DataStatusCurrentStatus)[keyof typeof DataStatusCurrentStatus]; +export const DataStatusCurrentStatusDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type DataStatusCurrentStatusDatasetStatus = (typeof DataStatusCurrentStatusDatasetStatus)[keyof typeof DataStatusCurrentStatusDatasetStatus]; +export const DataStatusDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataStatusDataType = (typeof DataStatusDataType)[keyof typeof DataStatusDataType]; +export const DataStatusDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataStatusDataTypeDataTypes = (typeof DataStatusDataTypeDataTypes)[keyof typeof DataStatusDataTypeDataTypes]; +export const DataStatusDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataStatusDataTypes = (typeof DataStatusDataTypes)[keyof typeof DataStatusDataTypes]; +export const DataStatusDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type DataStatusDatasetStatus = (typeof DataStatusDatasetStatus)[keyof typeof DataStatusDatasetStatus]; +export const DataStatusResponseCurrentStatusDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type DataStatusResponseCurrentStatusDatasetStatus = (typeof DataStatusResponseCurrentStatusDatasetStatus)[keyof typeof DataStatusResponseCurrentStatusDatasetStatus]; +export const DataStatusResponseDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataStatusResponseDataTypeDataTypes = (typeof DataStatusResponseDataTypeDataTypes)[keyof typeof DataStatusResponseDataTypeDataTypes]; +export const DataStatusResponseDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataStatusResponseDataTypes = (typeof DataStatusResponseDataTypes)[keyof typeof DataStatusResponseDataTypes]; +export const DataStatusResponseDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type DataStatusResponseDatasetStatus = (typeof DataStatusResponseDatasetStatus)[keyof typeof DataStatusResponseDatasetStatus]; +export const DataSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type DataSupplierStatus = (typeof DataSupplierStatus)[keyof typeof DataSupplierStatus]; +export const DataType1 = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataType1 = (typeof DataType1)[keyof typeof DataType1]; +export const DataType2 = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataType2 = (typeof DataType2)[keyof typeof DataType2]; +export const DataTypeDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataTypeDataType = (typeof DataTypeDataType)[keyof typeof DataTypeDataType]; +export const DataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataTypeDataTypes = (typeof DataTypeDataTypes)[keyof typeof DataTypeDataTypes]; +export const DataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type DataTypes = (typeof DataTypes)[keyof typeof DataTypes]; +export const DatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type DatasetStatus = (typeof DatasetStatus)[keyof typeof DatasetStatus]; +export const DirectCostLineItemDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type DirectCostLineItemDataType = (typeof DirectCostLineItemDataType)[keyof typeof DirectCostLineItemDataType]; +export const DirectCostLineItemRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type DirectCostLineItemRecordRefsDataType = (typeof DirectCostLineItemRecordRefsDataType)[keyof typeof DirectCostLineItemRecordRefsDataType]; +export const DirectCostPrototypeContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type DirectCostPrototypeContactRefDataType = (typeof DirectCostPrototypeContactRefDataType)[keyof typeof DirectCostPrototypeContactRefDataType]; +export const DirectCostPrototypeDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type DirectCostPrototypeDataType = (typeof DirectCostPrototypeDataType)[keyof typeof DirectCostPrototypeDataType]; +export const DirectCostPrototypeDataType1 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type DirectCostPrototypeDataType1 = (typeof DirectCostPrototypeDataType1)[keyof typeof DirectCostPrototypeDataType1]; +export const DirectCostPrototypeDataType2 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type DirectCostPrototypeDataType2 = (typeof DirectCostPrototypeDataType2)[keyof typeof DirectCostPrototypeDataType2]; +export const DirectCostPrototypeRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type DirectCostPrototypeRecordRefsDataType = (typeof DirectCostPrototypeRecordRefsDataType)[keyof typeof DirectCostPrototypeRecordRefsDataType]; +export const DisputeStatusDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type DisputeStatusDisputeStatus = (typeof DisputeStatusDisputeStatus)[keyof typeof DisputeStatusDisputeStatus]; +export const EndUploadSessionRequestStatus = { + Cancel: "Cancel", + Process: "Process", +} as const; +export type EndUploadSessionRequestStatus = (typeof EndUploadSessionRequestStatus)[keyof typeof EndUploadSessionRequestStatus]; +export const EnhancedInvoiceReportItemInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type EnhancedInvoiceReportItemInvoiceStatus = (typeof EnhancedInvoiceReportItemInvoiceStatus)[keyof typeof EnhancedInvoiceReportItemInvoiceStatus]; +export const EnhancedInvoiceReportItemStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type EnhancedInvoiceReportItemStatusInvoiceStatus = (typeof EnhancedInvoiceReportItemStatusInvoiceStatus)[keyof typeof EnhancedInvoiceReportItemStatusInvoiceStatus]; +export const EnhancedInvoicesReportInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type EnhancedInvoicesReportInvoiceStatus = (typeof EnhancedInvoicesReportInvoiceStatus)[keyof typeof EnhancedInvoicesReportInvoiceStatus]; +export const EnhancedInvoicesReportStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type EnhancedInvoicesReportStatusInvoiceStatus = (typeof EnhancedInvoicesReportStatusInvoiceStatus)[keyof typeof EnhancedInvoicesReportStatusInvoiceStatus]; +export const ErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type ErrorStatus = (typeof ErrorStatus)[keyof typeof ErrorStatus]; +export const ExcelReportTypesExcelReportTypes = { + Audit: "audit", + EnhancedCashFlow: "enhancedCashFlow", + EnhancedFinancials: "enhancedFinancials", + EnhancedInvoices: "enhancedInvoices", +} as const; +export type ExcelReportTypesExcelReportTypes = (typeof ExcelReportTypesExcelReportTypes)[keyof typeof ExcelReportTypesExcelReportTypes]; +export const ExcelStatusExcelReportTypes = { + Audit: "audit", + EnhancedCashFlow: "enhancedCashFlow", + EnhancedFinancials: "enhancedFinancials", + EnhancedInvoices: "enhancedInvoices", +} as const; +export type ExcelStatusExcelReportTypes = (typeof ExcelStatusExcelReportTypes)[keyof typeof ExcelStatusExcelReportTypes]; +export const ExcelStatusReportTypeExcelReportTypes = { + Audit: "audit", + EnhancedCashFlow: "enhancedCashFlow", + EnhancedFinancials: "enhancedFinancials", + EnhancedInvoices: "enhancedInvoices", +} as const; +export type ExcelStatusReportTypeExcelReportTypes = (typeof ExcelStatusReportTypeExcelReportTypes)[keyof typeof ExcelStatusReportTypeExcelReportTypes]; +export const GenerateLoanSummaryQueryParamSourceType = { + Accounting: "accounting", + Banking: "banking", + Commerce: "commerce", +} as const; +export type GenerateLoanSummaryQueryParamSourceType = (typeof GenerateLoanSummaryQueryParamSourceType)[keyof typeof GenerateLoanSummaryQueryParamSourceType]; +export const GenerateLoanTransactionsQueryParamSourceType = { + Accounting: "accounting", + Banking: "banking", + Commerce: "commerce", +} as const; +export type GenerateLoanTransactionsQueryParamSourceType = (typeof GenerateLoanTransactionsQueryParamSourceType)[keyof typeof GenerateLoanTransactionsQueryParamSourceType]; +export const GenerateReportPathParamReportType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", +} as const; +export type GenerateReportPathParamReportType = (typeof GenerateReportPathParamReportType)[keyof typeof GenerateReportPathParamReportType]; +export const GetCommerceCustomerRetentionMetricsQueryParamPeriodUnit = { + Day: "Day", + Month: "Month", + Week: "Week", + Year: "Year", +} as const; +export type GetCommerceCustomerRetentionMetricsQueryParamPeriodUnit = (typeof GetCommerceCustomerRetentionMetricsQueryParamPeriodUnit)[keyof typeof GetCommerceCustomerRetentionMetricsQueryParamPeriodUnit]; +export const GetCommerceLifetimeValueMetricsQueryParamPeriodUnit = { + Day: "Day", + Month: "Month", + Week: "Week", + Year: "Year", +} as const; +export type GetCommerceLifetimeValueMetricsQueryParamPeriodUnit = (typeof GetCommerceLifetimeValueMetricsQueryParamPeriodUnit)[keyof typeof GetCommerceLifetimeValueMetricsQueryParamPeriodUnit]; +export const GetCommerceOrdersReportQueryParamPeriodUnit = { + Day: "Day", + Month: "Month", + Week: "Week", + Year: "Year", +} as const; +export type GetCommerceOrdersReportQueryParamPeriodUnit = (typeof GetCommerceOrdersReportQueryParamPeriodUnit)[keyof typeof GetCommerceOrdersReportQueryParamPeriodUnit]; +export const GetCommerceRefundsReportQueryParamPeriodUnit = { + Day: "Day", + Month: "Month", + Week: "Week", + Year: "Year", +} as const; +export type GetCommerceRefundsReportQueryParamPeriodUnit = (typeof GetCommerceRefundsReportQueryParamPeriodUnit)[keyof typeof GetCommerceRefundsReportQueryParamPeriodUnit]; +export const GetCommerceRevenueMetricsQueryParamPeriodUnit = { + Day: "Day", + Month: "Month", + Week: "Week", + Year: "Year", +} as const; +export type GetCommerceRevenueMetricsQueryParamPeriodUnit = (typeof GetCommerceRevenueMetricsQueryParamPeriodUnit)[keyof typeof GetCommerceRevenueMetricsQueryParamPeriodUnit]; +export const GetDataIntegrityStatusPathParamDataType = { + AccountTransactions: "accountTransactions", + BankAccounts: "bankAccounts", + BankingAccounts: "banking-accounts", + BankingTransactions: "banking-transactions", +} as const; +export type GetDataIntegrityStatusPathParamDataType = (typeof GetDataIntegrityStatusPathParamDataType)[keyof typeof GetDataIntegrityStatusPathParamDataType]; +export const GetDataIntegritySummariesPathParamDataType = { + AccountTransactions: "accountTransactions", + BankAccounts: "bankAccounts", + BankingAccounts: "banking-accounts", + BankingTransactions: "banking-transactions", +} as const; +export type GetDataIntegritySummariesPathParamDataType = (typeof GetDataIntegritySummariesPathParamDataType)[keyof typeof GetDataIntegritySummariesPathParamDataType]; +export const GetLoanSummaryQueryParamSourceType = { + Accounting: "accounting", + Banking: "banking", + Commerce: "commerce", +} as const; +export type GetLoanSummaryQueryParamSourceType = (typeof GetLoanSummaryQueryParamSourceType)[keyof typeof GetLoanSummaryQueryParamSourceType]; +export const GetReportStatusPathParamReportType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", +} as const; +export type GetReportStatusPathParamReportType = (typeof GetReportStatusPathParamReportType)[keyof typeof GetReportStatusPathParamReportType]; +export const IntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type IntegrationType = (typeof IntegrationType)[keyof typeof IntegrationType]; +export const IntegrationTypeLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type IntegrationTypeLoanSummaryIntegrationType = (typeof IntegrationTypeLoanSummaryIntegrationType)[keyof typeof IntegrationTypeLoanSummaryIntegrationType]; +export const IntegrityStatusIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type IntegrityStatusIntegrityStatus = (typeof IntegrityStatusIntegrityStatus)[keyof typeof IntegrityStatusIntegrityStatus]; +export const InvoiceLineItemBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type InvoiceLineItemBilledToType1 = (typeof InvoiceLineItemBilledToType1)[keyof typeof InvoiceLineItemBilledToType1]; +export const InvoiceLineItemIsBilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type InvoiceLineItemIsBilledToBilledToType1 = (typeof InvoiceLineItemIsBilledToBilledToType1)[keyof typeof InvoiceLineItemIsBilledToBilledToType1]; +export const InvoiceLineItemIsRebilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type InvoiceLineItemIsRebilledToBilledToType1 = (typeof InvoiceLineItemIsRebilledToBilledToType1)[keyof typeof InvoiceLineItemIsRebilledToBilledToType1]; +export const InvoiceLineItemTrackingBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type InvoiceLineItemTrackingBilledToType1 = (typeof InvoiceLineItemTrackingBilledToType1)[keyof typeof InvoiceLineItemTrackingBilledToType1]; +export const InvoiceStatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type InvoiceStatusInvoiceStatus = (typeof InvoiceStatusInvoiceStatus)[keyof typeof InvoiceStatusInvoiceStatus]; +export const InvoiceToDataType = { + Customers: "customers", +} as const; +export type InvoiceToDataType = (typeof InvoiceToDataType)[keyof typeof InvoiceToDataType]; +export const InvoiceableTrackingDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type InvoiceableTrackingDataType = (typeof InvoiceableTrackingDataType)[keyof typeof InvoiceableTrackingDataType]; +export const InvoiceableTrackingRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type InvoiceableTrackingRecordRefsDataType = (typeof InvoiceableTrackingRecordRefsDataType)[keyof typeof InvoiceableTrackingRecordRefsDataType]; +export const IsBilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type IsBilledToBilledToType = (typeof IsBilledToBilledToType)[keyof typeof IsBilledToBilledToType]; +export const IsBilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type IsBilledToBilledToType1 = (typeof IsBilledToBilledToType1)[keyof typeof IsBilledToBilledToType1]; +export const IsRebilledToBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type IsRebilledToBilledToType = (typeof IsRebilledToBilledToType)[keyof typeof IsRebilledToBilledToType]; +export const IsRebilledToBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type IsRebilledToBilledToType1 = (typeof IsRebilledToBilledToType1)[keyof typeof IsRebilledToBilledToType1]; +export const ItemReferenceIntegrationTypeLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type ItemReferenceIntegrationTypeLoanSummaryIntegrationType = (typeof ItemReferenceIntegrationTypeLoanSummaryIntegrationType)[keyof typeof ItemReferenceIntegrationTypeLoanSummaryIntegrationType]; +export const ItemReferenceLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type ItemReferenceLoanSummaryIntegrationType = (typeof ItemReferenceLoanSummaryIntegrationType)[keyof typeof ItemReferenceLoanSummaryIntegrationType]; +export const ItemReferenceLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type ItemReferenceLoanSummaryRecordRefType = (typeof ItemReferenceLoanSummaryRecordRefType)[keyof typeof ItemReferenceLoanSummaryRecordRefType]; +export const ItemReferenceRecordRefTypeLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type ItemReferenceRecordRefTypeLoanSummaryRecordRefType = (typeof ItemReferenceRecordRefTypeLoanSummaryRecordRefType)[keyof typeof ItemReferenceRecordRefTypeLoanSummaryRecordRefType]; +export const ItemsAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type ItemsAccountIdentifierType = (typeof ItemsAccountIdentifierType)[keyof typeof ItemsAccountIdentifierType]; +export const ItemsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type ItemsAccountStatus = (typeof ItemsAccountStatus)[keyof typeof ItemsAccountStatus]; +export const ItemsAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type ItemsAccountType = (typeof ItemsAccountType)[keyof typeof ItemsAccountType]; +export const ItemsAccountType1 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type ItemsAccountType1 = (typeof ItemsAccountType1)[keyof typeof ItemsAccountType1]; +export const ItemsAccountType2 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type ItemsAccountType2 = (typeof ItemsAccountType2)[keyof typeof ItemsAccountType2]; +export const ItemsAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type ItemsAccountingAddressType = (typeof ItemsAccountingAddressType)[keyof typeof ItemsAccountingAddressType]; +export const ItemsAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type ItemsAccountingBankAccountType = (typeof ItemsAccountingBankAccountType)[keyof typeof ItemsAccountingBankAccountType]; +export const ItemsBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type ItemsBankTransactionType = (typeof ItemsBankTransactionType)[keyof typeof ItemsBankTransactionType]; +export const ItemsBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type ItemsBillPaymentLineLinkType = (typeof ItemsBillPaymentLineLinkType)[keyof typeof ItemsBillPaymentLineLinkType]; +export const ItemsBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type ItemsBillStatus = (typeof ItemsBillStatus)[keyof typeof ItemsBillStatus]; +export const ItemsBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type ItemsBilledToType = (typeof ItemsBilledToType)[keyof typeof ItemsBilledToType]; +export const ItemsBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type ItemsBilledToType1 = (typeof ItemsBilledToType1)[keyof typeof ItemsBilledToType1]; +export const ItemsCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type ItemsCommerceAddressType = (typeof ItemsCommerceAddressType)[keyof typeof ItemsCommerceAddressType]; +export const ItemsDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ItemsDataConnectionSourceType = (typeof ItemsDataConnectionSourceType)[keyof typeof ItemsDataConnectionSourceType]; +export const ItemsDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type ItemsDataConnectionStatus = (typeof ItemsDataConnectionStatus)[keyof typeof ItemsDataConnectionStatus]; +export const ItemsDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type ItemsDataType = (typeof ItemsDataType)[keyof typeof ItemsDataType]; +export const ItemsDataType1 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type ItemsDataType1 = (typeof ItemsDataType1)[keyof typeof ItemsDataType1]; +export const ItemsDataType2 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type ItemsDataType2 = (typeof ItemsDataType2)[keyof typeof ItemsDataType2]; +export const ItemsDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type ItemsDataTypes = (typeof ItemsDataTypes)[keyof typeof ItemsDataTypes]; +export const ItemsDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type ItemsDatasetStatus = (typeof ItemsDatasetStatus)[keyof typeof ItemsDatasetStatus]; +export const ItemsDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type ItemsDisputeStatus = (typeof ItemsDisputeStatus)[keyof typeof ItemsDisputeStatus]; +export const ItemsErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type ItemsErrorStatus = (typeof ItemsErrorStatus)[keyof typeof ItemsErrorStatus]; +export const ItemsIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type ItemsIntegrityStatus = (typeof ItemsIntegrityStatus)[keyof typeof ItemsIntegrityStatus]; +export const ItemsInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type ItemsInvoiceStatus = (typeof ItemsInvoiceStatus)[keyof typeof ItemsInvoiceStatus]; +export const ItemsLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type ItemsLoanSummaryIntegrationType = (typeof ItemsLoanSummaryIntegrationType)[keyof typeof ItemsLoanSummaryIntegrationType]; +export const ItemsLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type ItemsLoanSummaryRecordRefType = (typeof ItemsLoanSummaryRecordRefType)[keyof typeof ItemsLoanSummaryRecordRefType]; +export const ItemsLoanTransactionType = { + AccuredInterest: "AccuredInterest", + Interest: "Interest", + Investment: "Investment", + Repayment: "Repayment", +} as const; +export type ItemsLoanTransactionType = (typeof ItemsLoanTransactionType)[keyof typeof ItemsLoanTransactionType]; +export const ItemsPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type ItemsPaymentLinkType = (typeof ItemsPaymentLinkType)[keyof typeof ItemsPaymentLinkType]; +export const ItemsPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type ItemsPaymentStatus = (typeof ItemsPaymentStatus)[keyof typeof ItemsPaymentStatus]; +export const ItemsPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type ItemsPaymentType = (typeof ItemsPaymentType)[keyof typeof ItemsPaymentType]; +export const ItemsProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type ItemsProductVariantStatus = (typeof ItemsProductVariantStatus)[keyof typeof ItemsProductVariantStatus]; +export const ItemsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type ItemsPushChangeType = (typeof ItemsPushChangeType)[keyof typeof ItemsPushChangeType]; +export const ItemsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type ItemsPushOperationStatus = (typeof ItemsPushOperationStatus)[keyof typeof ItemsPushOperationStatus]; +export const ItemsPushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type ItemsPushOptionType = (typeof ItemsPushOptionType)[keyof typeof ItemsPushOptionType]; +export const ItemsServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type ItemsServiceChargeType = (typeof ItemsServiceChargeType)[keyof typeof ItemsServiceChargeType]; +export const ItemsStatus = { + Connected: "connected", + Connecting: "connecting", + Disconnected: "disconnected", + Pending: "pending", + Unknown: "unknown", +} as const; +export type ItemsStatus = "Complete" | "Error" | "InProgress" | "Reconciled" | "Unknown" | "Unreconciled" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const ItemsStatus1 = { + Connected: "connected", + Connecting: "connecting", + Disconnected: "disconnected", + Pending: "pending", + Unknown: "unknown", +} as const; +export type ItemsStatus1 = "Complete" | "Error" | "InProgress" | "Reconciled" | "Unknown" | "Unreconciled" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const ItemsStatus2 = { + Connected: "connected", + Connecting: "connecting", + Disconnected: "disconnected", + Pending: "pending", + Unknown: "unknown", +} as const; +export type ItemsStatus2 = "Complete" | "Error" | "InProgress" | "Reconciled" | "Unknown" | "Unreconciled" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const ItemsSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type ItemsSupplierStatus = (typeof ItemsSupplierStatus)[keyof typeof ItemsSupplierStatus]; +export const ItemsTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type ItemsTransactionCode = (typeof ItemsTransactionCode)[keyof typeof ItemsTransactionCode]; +export const ItemsTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type ItemsTransactionSourceType = (typeof ItemsTransactionSourceType)[keyof typeof ItemsTransactionSourceType]; +export const ItemsTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type ItemsTransactionType = (typeof ItemsTransactionType)[keyof typeof ItemsTransactionType]; +export const ItemsType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + CategorizedBankStatement: "categorizedBankStatement", + Clabe: "clabe", + CreditModel: "creditModel", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + SpendAnalysis: "spendAnalysis", + Swift: "swift", + Trno: "trno", +} as const; +export type ItemsType = (typeof ItemsType)[keyof typeof ItemsType]; +export const ItemsType1 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + CategorizedBankStatement: "categorizedBankStatement", + Clabe: "clabe", + CreditModel: "creditModel", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + SpendAnalysis: "spendAnalysis", + Swift: "swift", + Trno: "trno", +} as const; +export type ItemsType1 = (typeof ItemsType1)[keyof typeof ItemsType1]; +export const ItemsType2 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + CategorizedBankStatement: "categorizedBankStatement", + Clabe: "clabe", + CreditModel: "creditModel", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + SpendAnalysis: "spendAnalysis", + Swift: "swift", + Trno: "trno", +} as const; +export type ItemsType2 = (typeof ItemsType2)[keyof typeof ItemsType2]; +export const JournalEntryRecordRefDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type JournalEntryRecordRefDataType = (typeof JournalEntryRecordRefDataType)[keyof typeof JournalEntryRecordRefDataType]; +export const JournalLineContactRefDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type JournalLineContactRefDataType = (typeof JournalLineContactRefDataType)[keyof typeof JournalLineContactRefDataType]; +export const JournalLineDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +export type JournalLineDataType = (typeof JournalLineDataType)[keyof typeof JournalLineDataType]; +export const JournalLineDataType1 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type JournalLineDataType1 = (typeof JournalLineDataType1)[keyof typeof JournalLineDataType1]; +export const JournalLineDataType2 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type JournalLineDataType2 = (typeof JournalLineDataType2)[keyof typeof JournalLineDataType2]; +export const JournalLineRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type JournalLineRecordRefsDataType = (typeof JournalLineRecordRefsDataType)[keyof typeof JournalLineRecordRefsDataType]; +export const JournalLineTrackingDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type JournalLineTrackingDataType = (typeof JournalLineTrackingDataType)[keyof typeof JournalLineTrackingDataType]; +export const JournalLineTrackingRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type JournalLineTrackingRecordRefsDataType = (typeof JournalLineTrackingRecordRefsDataType)[keyof typeof JournalLineTrackingRecordRefsDataType]; +export const JournalPrototypeStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type JournalPrototypeStatusSupplierStatus = (typeof JournalPrototypeStatusSupplierStatus)[keyof typeof JournalPrototypeStatusSupplierStatus]; +export const JournalPrototypeSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type JournalPrototypeSupplierStatus = (typeof JournalPrototypeSupplierStatus)[keyof typeof JournalPrototypeSupplierStatus]; +export const JournalStatusJournalStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type JournalStatusJournalStatus = (typeof JournalStatusJournalStatus)[keyof typeof JournalStatusJournalStatus]; +export const JournalStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type JournalStatusSupplierStatus = (typeof JournalStatusSupplierStatus)[keyof typeof JournalStatusSupplierStatus]; +export const ListDataIntegrityDetailsPathParamDataType = { + AccountTransactions: "accountTransactions", + BankAccounts: "bankAccounts", + BankingAccounts: "banking-accounts", + BankingTransactions: "banking-transactions", +} as const; +export type ListDataIntegrityDetailsPathParamDataType = (typeof ListDataIntegrityDetailsPathParamDataType)[keyof typeof ListDataIntegrityDetailsPathParamDataType]; +export const ListLoanTransactionsQueryParamSourceType = { + Accounting: "accounting", + Banking: "banking", + Commerce: "commerce", +} as const; +export type ListLoanTransactionsQueryParamSourceType = (typeof ListLoanTransactionsQueryParamSourceType)[keyof typeof ListLoanTransactionsQueryParamSourceType]; +export const LoanSummaryIntegrationTypeLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type LoanSummaryIntegrationTypeLoanSummaryIntegrationType = (typeof LoanSummaryIntegrationTypeLoanSummaryIntegrationType)[keyof typeof LoanSummaryIntegrationTypeLoanSummaryIntegrationType]; +export const LoanSummaryLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type LoanSummaryLoanSummaryIntegrationType = (typeof LoanSummaryLoanSummaryIntegrationType)[keyof typeof LoanSummaryLoanSummaryIntegrationType]; +export const LoanSummaryLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type LoanSummaryLoanSummaryRecordRefType = (typeof LoanSummaryLoanSummaryRecordRefType)[keyof typeof LoanSummaryLoanSummaryRecordRefType]; +export const LoanSummaryRecordRefIntegrationTypeLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type LoanSummaryRecordRefIntegrationTypeLoanSummaryIntegrationType = (typeof LoanSummaryRecordRefIntegrationTypeLoanSummaryIntegrationType)[keyof typeof LoanSummaryRecordRefIntegrationTypeLoanSummaryIntegrationType]; +export const LoanSummaryRecordRefLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type LoanSummaryRecordRefLoanSummaryIntegrationType = (typeof LoanSummaryRecordRefLoanSummaryIntegrationType)[keyof typeof LoanSummaryRecordRefLoanSummaryIntegrationType]; +export const LoanSummaryRecordRefLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type LoanSummaryRecordRefLoanSummaryRecordRefType = (typeof LoanSummaryRecordRefLoanSummaryRecordRefType)[keyof typeof LoanSummaryRecordRefLoanSummaryRecordRefType]; +export const LoanSummaryRecordRefRecordRefTypeLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type LoanSummaryRecordRefRecordRefTypeLoanSummaryRecordRefType = (typeof LoanSummaryRecordRefRecordRefTypeLoanSummaryRecordRefType)[keyof typeof LoanSummaryRecordRefRecordRefTypeLoanSummaryRecordRefType]; +export const LoanSummaryRecordRefTypeLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type LoanSummaryRecordRefTypeLoanSummaryRecordRefType = (typeof LoanSummaryRecordRefTypeLoanSummaryRecordRefType)[keyof typeof LoanSummaryRecordRefTypeLoanSummaryRecordRefType]; +export const LoanSummaryReportItemIntegrationTypeLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type LoanSummaryReportItemIntegrationTypeLoanSummaryIntegrationType = (typeof LoanSummaryReportItemIntegrationTypeLoanSummaryIntegrationType)[keyof typeof LoanSummaryReportItemIntegrationTypeLoanSummaryIntegrationType]; +export const LoanSummaryReportItemLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type LoanSummaryReportItemLoanSummaryIntegrationType = (typeof LoanSummaryReportItemLoanSummaryIntegrationType)[keyof typeof LoanSummaryReportItemLoanSummaryIntegrationType]; +export const LoanSummaryReportItemLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type LoanSummaryReportItemLoanSummaryRecordRefType = (typeof LoanSummaryReportItemLoanSummaryRecordRefType)[keyof typeof LoanSummaryReportItemLoanSummaryRecordRefType]; +export const LoanSummaryReportItemRecordRefTypeLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type LoanSummaryReportItemRecordRefTypeLoanSummaryRecordRefType = (typeof LoanSummaryReportItemRecordRefTypeLoanSummaryRecordRefType)[keyof typeof LoanSummaryReportItemRecordRefTypeLoanSummaryRecordRefType]; +export const LoanTransactionType = { + AccuredInterest: "AccuredInterest", + Interest: "Interest", + Investment: "Investment", + Repayment: "Repayment", +} as const; +export type LoanTransactionType = (typeof LoanTransactionType)[keyof typeof LoanTransactionType]; +export const LoanTransactionsLoanTransactionType = { + AccuredInterest: "AccuredInterest", + Interest: "Interest", + Investment: "Investment", + Repayment: "Repayment", +} as const; +export type LoanTransactionsLoanTransactionType = (typeof LoanTransactionsLoanTransactionType)[keyof typeof LoanTransactionsLoanTransactionType]; +export const LoanTransactionsReportItemsLoanTransactionType = { + AccuredInterest: "AccuredInterest", + Interest: "Interest", + Investment: "Investment", + Repayment: "Repayment", +} as const; +export type LoanTransactionsReportItemsLoanTransactionType = (typeof LoanTransactionsReportItemsLoanTransactionType)[keyof typeof LoanTransactionsReportItemsLoanTransactionType]; +export const MetadataIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type MetadataIntegrityStatus = (typeof MetadataIntegrityStatus)[keyof typeof MetadataIntegrityStatus]; +export const OneAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type OneAccountStatus = (typeof OneAccountStatus)[keyof typeof OneAccountStatus]; +export const OneAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type OneAccountType = (typeof OneAccountType)[keyof typeof OneAccountType]; +export const OneAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type OneAccountingBankAccountType = (typeof OneAccountingBankAccountType)[keyof typeof OneAccountingBankAccountType]; +export const OneCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type OneCommerceAddressType = (typeof OneCommerceAddressType)[keyof typeof OneCommerceAddressType]; +export const OneDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type OneDataConnectionSourceType = (typeof OneDataConnectionSourceType)[keyof typeof OneDataConnectionSourceType]; +export const OneDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type OneDataConnectionStatus = (typeof OneDataConnectionStatus)[keyof typeof OneDataConnectionStatus]; +export const OneDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type OneDataType = (typeof OneDataType)[keyof typeof OneDataType]; +export const OneDataType1 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type OneDataType1 = (typeof OneDataType1)[keyof typeof OneDataType1]; +export const OneDataType2 = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type OneDataType2 = (typeof OneDataType2)[keyof typeof OneDataType2]; +export const OneDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type OneDataTypes = (typeof OneDataTypes)[keyof typeof OneDataTypes]; +export const OneDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type OneDisputeStatus = (typeof OneDisputeStatus)[keyof typeof OneDisputeStatus]; +export const OneErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type OneErrorStatus = (typeof OneErrorStatus)[keyof typeof OneErrorStatus]; +export const OneIntegrityStatus = { + Complete: "Complete", + DoesNotExist: "DoesNotExist", + Error: "Error", + Unknown: "Unknown", +} as const; +export type OneIntegrityStatus = (typeof OneIntegrityStatus)[keyof typeof OneIntegrityStatus]; +export const OnePaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type OnePaymentStatus = (typeof OnePaymentStatus)[keyof typeof OnePaymentStatus]; +export const OnePaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type OnePaymentType = (typeof OnePaymentType)[keyof typeof OnePaymentType]; +export const OneProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type OneProductVariantStatus = (typeof OneProductVariantStatus)[keyof typeof OneProductVariantStatus]; +export const OnePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type OnePushChangeType = (typeof OnePushChangeType)[keyof typeof OnePushChangeType]; +export const OnePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type OnePushOperationStatus = (typeof OnePushOperationStatus)[keyof typeof OnePushOperationStatus]; +export const OneServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type OneServiceChargeType = (typeof OneServiceChargeType)[keyof typeof OneServiceChargeType]; +export const OneSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type OneSupplierStatus = (typeof OneSupplierStatus)[keyof typeof OneSupplierStatus]; +export const OneTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type OneTransactionCode = (typeof OneTransactionCode)[keyof typeof OneTransactionCode]; +export const OneTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type OneTransactionSourceType = (typeof OneTransactionSourceType)[keyof typeof OneTransactionSourceType]; +export const OneTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type OneTransactionType = (typeof OneTransactionType)[keyof typeof OneTransactionType]; +export const OptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type OptionType = (typeof OptionType)[keyof typeof OptionType]; +export const OptionTypePushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type OptionTypePushOptionType = (typeof OptionTypePushOptionType)[keyof typeof OptionTypePushOptionType]; +export const Path = { + AuthGet: "auth/get", +} as const; +export type Path = (typeof Path)[keyof typeof Path]; +export const PathParamDataType = { + AccountTransactions: "accountTransactions", + BankAccounts: "bankAccounts", + BankingAccounts: "banking-accounts", + BankingTransactions: "banking-transactions", +} as const; +export type PathParamDataType = (typeof PathParamDataType)[keyof typeof PathParamDataType]; +export const PathParamReportType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", +} as const; +export type PathParamReportType = (typeof PathParamReportType)[keyof typeof PathParamReportType]; +export const PaymentLineLinkPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type PaymentLineLinkPaymentLinkType = (typeof PaymentLineLinkPaymentLinkType)[keyof typeof PaymentLineLinkPaymentLinkType]; +export const PaymentLineLinkTypePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type PaymentLineLinkTypePaymentLinkType = (typeof PaymentLineLinkTypePaymentLinkType)[keyof typeof PaymentLineLinkTypePaymentLinkType]; +export const PaymentLinePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type PaymentLinePaymentLinkType = (typeof PaymentLinePaymentLinkType)[keyof typeof PaymentLinePaymentLinkType]; +export const PaymentLineTypePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type PaymentLineTypePaymentLinkType = (typeof PaymentLineTypePaymentLinkType)[keyof typeof PaymentLineTypePaymentLinkType]; +export const PaymentLinkTypePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type PaymentLinkTypePaymentLinkType = (typeof PaymentLinkTypePaymentLinkType)[keyof typeof PaymentLinkTypePaymentLinkType]; +export const PaymentMethodTypePaymentMethodType = { + BankTransfer: "BankTransfer", + Cash: "Cash", + Check: "Check", + CreditCard: "CreditCard", + DebitCard: "DebitCard", + Other: "Other", + Unknown: "Unknown", +} as const; +export type PaymentMethodTypePaymentMethodType = (typeof PaymentMethodTypePaymentMethodType)[keyof typeof PaymentMethodTypePaymentMethodType]; +export const PaymentRefPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type PaymentRefPaymentStatus = (typeof PaymentRefPaymentStatus)[keyof typeof PaymentRefPaymentStatus]; +export const PaymentRefPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type PaymentRefPaymentType = (typeof PaymentRefPaymentType)[keyof typeof PaymentRefPaymentType]; +export const PaymentRefStatusPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type PaymentRefStatusPaymentStatus = (typeof PaymentRefStatusPaymentStatus)[keyof typeof PaymentRefStatusPaymentStatus]; +export const PaymentRefTypePaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type PaymentRefTypePaymentType = (typeof PaymentRefTypePaymentType)[keyof typeof PaymentRefTypePaymentType]; +export const PaymentStatusPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type PaymentStatusPaymentStatus = (typeof PaymentStatusPaymentStatus)[keyof typeof PaymentStatusPaymentStatus]; +export const PaymentTypePaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type PaymentTypePaymentType = (typeof PaymentTypePaymentType)[keyof typeof PaymentTypePaymentType]; +export const PeriodUnit = { + Day: "Day", + Month: "Month", + Week: "Week", + Year: "Year", +} as const; +export type PeriodUnit = (typeof PeriodUnit)[keyof typeof PeriodUnit]; +export const PhoneNumberType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type PhoneNumberType = (typeof PhoneNumberType)[keyof typeof PhoneNumberType]; +export const PhoneNumbersType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type PhoneNumbersType = (typeof PhoneNumbersType)[keyof typeof PhoneNumbersType]; +export const PhoneType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type PhoneType = (typeof PhoneType)[keyof typeof PhoneType]; +export const ProductVariantProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type ProductVariantProductVariantStatus = (typeof ProductVariantProductVariantStatus)[keyof typeof ProductVariantProductVariantStatus]; +export const ProductVariantStatusProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type ProductVariantStatusProductVariantStatus = (typeof ProductVariantStatusProductVariantStatus)[keyof typeof ProductVariantStatusProductVariantStatus]; +export const PropertieAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type PropertieAccountStatus = (typeof PropertieAccountStatus)[keyof typeof PropertieAccountStatus]; +export const PropertieAccountType = { + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type PropertieAccountType = (typeof PropertieAccountType)[keyof typeof PropertieAccountType]; +export const PropertieAccountType1 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type PropertieAccountType1 = (typeof PropertieAccountType1)[keyof typeof PropertieAccountType1]; +export const PropertieAccountType2 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type PropertieAccountType2 = (typeof PropertieAccountType2)[keyof typeof PropertieAccountType2]; +export const PropertieAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type PropertieAccountingBankAccountType = (typeof PropertieAccountingBankAccountType)[keyof typeof PropertieAccountingBankAccountType]; +export const PropertieBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type PropertieBankAccountType = (typeof PropertieBankAccountType)[keyof typeof PropertieBankAccountType]; +export const PropertieBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type PropertieBankTransactionType = (typeof PropertieBankTransactionType)[keyof typeof PropertieBankTransactionType]; +export const PropertieCreditNoteStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type PropertieCreditNoteStatus = (typeof PropertieCreditNoteStatus)[keyof typeof PropertieCreditNoteStatus]; +export const PropertieCurrentStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PropertieCurrentStatus = (typeof PropertieCurrentStatus)[keyof typeof PropertieCurrentStatus]; +export const PropertieDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type PropertieDataConnectionSourceType = (typeof PropertieDataConnectionSourceType)[keyof typeof PropertieDataConnectionSourceType]; +export const PropertieDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type PropertieDataConnectionStatus = (typeof PropertieDataConnectionStatus)[keyof typeof PropertieDataConnectionStatus]; +export const PropertieDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PropertieDataType = (typeof PropertieDataType)[keyof typeof PropertieDataType]; +export const PropertieDataType1 = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PropertieDataType1 = (typeof PropertieDataType1)[keyof typeof PropertieDataType1]; +export const PropertieDataType2 = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PropertieDataType2 = (typeof PropertieDataType2)[keyof typeof PropertieDataType2]; +export const PropertieDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PropertieDataTypes = (typeof PropertieDataTypes)[keyof typeof PropertieDataTypes]; +export const PropertieDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PropertieDatasetStatus = (typeof PropertieDatasetStatus)[keyof typeof PropertieDatasetStatus]; +export const PropertieErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type PropertieErrorStatus = (typeof PropertieErrorStatus)[keyof typeof PropertieErrorStatus]; +export const PropertieIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type PropertieIntegrationType = (typeof PropertieIntegrationType)[keyof typeof PropertieIntegrationType]; +export const PropertieInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type PropertieInvoiceStatus = (typeof PropertieInvoiceStatus)[keyof typeof PropertieInvoiceStatus]; +export const PropertieLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type PropertieLoanSummaryIntegrationType = (typeof PropertieLoanSummaryIntegrationType)[keyof typeof PropertieLoanSummaryIntegrationType]; +export const PropertieLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type PropertieLoanSummaryRecordRefType = (typeof PropertieLoanSummaryRecordRefType)[keyof typeof PropertieLoanSummaryRecordRefType]; +export const PropertieOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type PropertieOptionType = (typeof PropertieOptionType)[keyof typeof PropertieOptionType]; +export const PropertiePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type PropertiePaymentLinkType = (typeof PropertiePaymentLinkType)[keyof typeof PropertiePaymentLinkType]; +export const PropertiePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PropertiePushChangeType = (typeof PropertiePushChangeType)[keyof typeof PropertiePushChangeType]; +export const PropertiePushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type PropertiePushOperationStatus = (typeof PropertiePushOperationStatus)[keyof typeof PropertiePushOperationStatus]; +export const PropertiePushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type PropertiePushOptionType = (typeof PropertiePushOptionType)[keyof typeof PropertiePushOptionType]; +export const PropertieRecordReferenceType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type PropertieRecordReferenceType = (typeof PropertieRecordReferenceType)[keyof typeof PropertieRecordReferenceType]; +export const PropertieReportBasis = { + Accrual: "Accrual", + Cash: "Cash", + Unknown: "Unknown", +} as const; +export type PropertieReportBasis = (typeof PropertieReportBasis)[keyof typeof PropertieReportBasis]; +export const PropertieSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type PropertieSourceType = (typeof PropertieSourceType)[keyof typeof PropertieSourceType]; +export const PropertieStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PropertieStatus = "Active" | "Archived" | "AuthError" | "Cancelled" | "Complete" | "FetchError" | "Fetching" | "Initial" | "InternalError" | "MapError" | "MapQueued" | "Mapping" | "NotSupported" | "PermissionsError" | "PrerequisiteNotMet" | "Processing" | "ProcessingError" | "ProcessingQueued" | "Queued" | "RateLimitError" | "Reconciled" | "Resolved" | "Unknown" | "Unreconciled" | "Validating" | "ValidationError" | "ValidationQueued" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const PropertieStatus1 = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PropertieStatus1 = "Active" | "Archived" | "AuthError" | "Cancelled" | "Complete" | "FetchError" | "Fetching" | "Initial" | "InternalError" | "MapError" | "MapQueued" | "Mapping" | "NotSupported" | "PermissionsError" | "PrerequisiteNotMet" | "Processing" | "ProcessingError" | "ProcessingQueued" | "Queued" | "RateLimitError" | "Reconciled" | "Resolved" | "Unknown" | "Unreconciled" | "Validating" | "ValidationError" | "ValidationQueued" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const PropertieStatus2 = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PropertieStatus2 = "Active" | "Archived" | "AuthError" | "Cancelled" | "Complete" | "FetchError" | "Fetching" | "Initial" | "InternalError" | "MapError" | "MapQueued" | "Mapping" | "NotSupported" | "PermissionsError" | "PrerequisiteNotMet" | "Processing" | "ProcessingError" | "ProcessingQueued" | "Queued" | "RateLimitError" | "Reconciled" | "Resolved" | "Unknown" | "Unreconciled" | "Validating" | "ValidationError" | "ValidationQueued" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const PropertieSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type PropertieSupplierStatus = (typeof PropertieSupplierStatus)[keyof typeof PropertieSupplierStatus]; +export const PropertieTrackingCategoryStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type PropertieTrackingCategoryStatus = (typeof PropertieTrackingCategoryStatus)[keyof typeof PropertieTrackingCategoryStatus]; +export const PropertieType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type PropertieType = (typeof PropertieType)[keyof typeof PropertieType]; +export const PropertieType1 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type PropertieType1 = (typeof PropertieType1)[keyof typeof PropertieType1]; +export const PropertieType2 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type PropertieType2 = (typeof PropertieType2)[keyof typeof PropertieType2]; +export const PullOperationDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PullOperationDatasetStatus = (typeof PullOperationDatasetStatus)[keyof typeof PullOperationDatasetStatus]; +export const PullOperationStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PullOperationStatus = (typeof PullOperationStatus)[keyof typeof PullOperationStatus]; +export const PullOperationStatusDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PullOperationStatusDatasetStatus = (typeof PullOperationStatusDatasetStatus)[keyof typeof PullOperationStatusDatasetStatus]; +export const PullOperationsDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PullOperationsDatasetStatus = (typeof PullOperationsDatasetStatus)[keyof typeof PullOperationsDatasetStatus]; +export const PullOperationsStatusDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type PullOperationsStatusDatasetStatus = (typeof PullOperationsStatusDatasetStatus)[keyof typeof PullOperationsStatusDatasetStatus]; +export const PurchaseOrderLineRefDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type PurchaseOrderLineRefDataType = (typeof PurchaseOrderLineRefDataType)[keyof typeof PurchaseOrderLineRefDataType]; +export const PushChangeTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PushChangeTypePushChangeType = (typeof PushChangeTypePushChangeType)[keyof typeof PushChangeTypePushChangeType]; +export const PushOperationChangeDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationChangeDataTypeDataTypes = (typeof PushOperationChangeDataTypeDataTypes)[keyof typeof PushOperationChangeDataTypeDataTypes]; +export const PushOperationChangeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationChangeDataTypes = (typeof PushOperationChangeDataTypes)[keyof typeof PushOperationChangeDataTypes]; +export const PushOperationChangePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PushOperationChangePushChangeType = (typeof PushOperationChangePushChangeType)[keyof typeof PushOperationChangePushChangeType]; +export const PushOperationChangeTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PushOperationChangeTypePushChangeType = (typeof PushOperationChangeTypePushChangeType)[keyof typeof PushOperationChangeTypePushChangeType]; +export const PushOperationDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationDataType = (typeof PushOperationDataType)[keyof typeof PushOperationDataType]; +export const PushOperationDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationDataTypeDataTypes = (typeof PushOperationDataTypeDataTypes)[keyof typeof PushOperationDataTypeDataTypes]; +export const PushOperationDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationDataTypes = (typeof PushOperationDataTypes)[keyof typeof PushOperationDataTypes]; +export const PushOperationPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PushOperationPushChangeType = (typeof PushOperationPushChangeType)[keyof typeof PushOperationPushChangeType]; +export const PushOperationPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type PushOperationPushOperationStatus = (typeof PushOperationPushOperationStatus)[keyof typeof PushOperationPushOperationStatus]; +export const PushOperationRefDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationRefDataType = (typeof PushOperationRefDataType)[keyof typeof PushOperationRefDataType]; +export const PushOperationRefDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationRefDataTypeDataTypes = (typeof PushOperationRefDataTypeDataTypes)[keyof typeof PushOperationRefDataTypeDataTypes]; +export const PushOperationRefDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationRefDataTypes = (typeof PushOperationRefDataTypes)[keyof typeof PushOperationRefDataTypes]; +export const PushOperationReferenceDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationReferenceDataTypeDataTypes = (typeof PushOperationReferenceDataTypeDataTypes)[keyof typeof PushOperationReferenceDataTypeDataTypes]; +export const PushOperationReferenceDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationReferenceDataTypes = (typeof PushOperationReferenceDataTypes)[keyof typeof PushOperationReferenceDataTypes]; +export const PushOperationStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type PushOperationStatusPushOperationStatus = (typeof PushOperationStatusPushOperationStatus)[keyof typeof PushOperationStatusPushOperationStatus]; +export const PushOperationTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PushOperationTypePushChangeType = (typeof PushOperationTypePushChangeType)[keyof typeof PushOperationTypePushChangeType]; +export const PushOperationsDataTypeDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationsDataTypeDataTypes = (typeof PushOperationsDataTypeDataTypes)[keyof typeof PushOperationsDataTypeDataTypes]; +export const PushOperationsDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type PushOperationsDataTypes = (typeof PushOperationsDataTypes)[keyof typeof PushOperationsDataTypes]; +export const PushOperationsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PushOperationsPushChangeType = (typeof PushOperationsPushChangeType)[keyof typeof PushOperationsPushChangeType]; +export const PushOperationsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type PushOperationsPushOperationStatus = (typeof PushOperationsPushOperationStatus)[keyof typeof PushOperationsPushOperationStatus]; +export const PushOperationsResultsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PushOperationsResultsPushChangeType = (typeof PushOperationsResultsPushChangeType)[keyof typeof PushOperationsResultsPushChangeType]; +export const PushOperationsResultsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type PushOperationsResultsPushOperationStatus = (typeof PushOperationsResultsPushOperationStatus)[keyof typeof PushOperationsResultsPushOperationStatus]; +export const PushOperationsStatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type PushOperationsStatusPushOperationStatus = (typeof PushOperationsStatusPushOperationStatus)[keyof typeof PushOperationsStatusPushOperationStatus]; +export const PushOperationsTypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type PushOperationsTypePushChangeType = (typeof PushOperationsTypePushChangeType)[keyof typeof PushOperationsTypePushChangeType]; +export const PushOptionChoicePushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type PushOptionChoicePushOptionType = (typeof PushOptionChoicePushOptionType)[keyof typeof PushOptionChoicePushOptionType]; +export const PushOptionChoiceTypePushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type PushOptionChoiceTypePushOptionType = (typeof PushOptionChoiceTypePushOptionType)[keyof typeof PushOptionChoiceTypePushOptionType]; +export const PushOptionPropertyPushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type PushOptionPropertyPushOptionType = (typeof PushOptionPropertyPushOptionType)[keyof typeof PushOptionPropertyPushOptionType]; +export const PushOptionPropertyTypePushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type PushOptionPropertyTypePushOptionType = (typeof PushOptionPropertyTypePushOptionType)[keyof typeof PushOptionPropertyTypePushOptionType]; +export const PushOptionPushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type PushOptionPushOptionType = (typeof PushOptionPushOptionType)[keyof typeof PushOptionPushOptionType]; +export const PushOptionTypePushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type PushOptionTypePushOptionType = (typeof PushOptionTypePushOptionType)[keyof typeof PushOptionTypePushOptionType]; +export const QueryParamPath = { + AuthGet: "auth/get", +} as const; +export type QueryParamPath = (typeof QueryParamPath)[keyof typeof QueryParamPath]; +export const QueryParamPeriodUnit = { + Day: "Day", + Month: "Month", + Week: "Week", + Year: "Year", +} as const; +export type QueryParamPeriodUnit = (typeof QueryParamPeriodUnit)[keyof typeof QueryParamPeriodUnit]; +export const QueryParamSourceType = { + Accounting: "accounting", + Banking: "banking", + Commerce: "commerce", +} as const; +export type QueryParamSourceType = (typeof QueryParamSourceType)[keyof typeof QueryParamSourceType]; +export const RecordLineReferenceDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type RecordLineReferenceDataType = (typeof RecordLineReferenceDataType)[keyof typeof RecordLineReferenceDataType]; +export const RecordRefDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type RecordRefDataType = (typeof RecordRefDataType)[keyof typeof RecordRefDataType]; +export const RecordRefTypeLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type RecordRefTypeLoanSummaryRecordRefType = (typeof RecordRefTypeLoanSummaryRecordRefType)[keyof typeof RecordRefTypeLoanSummaryRecordRefType]; +export const RecordReferenceDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type RecordReferenceDataType = (typeof RecordReferenceDataType)[keyof typeof RecordReferenceDataType]; +export const RecordReferenceDataType1 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type RecordReferenceDataType1 = (typeof RecordReferenceDataType1)[keyof typeof RecordReferenceDataType1]; +export const RecordReferenceDataType2 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type RecordReferenceDataType2 = (typeof RecordReferenceDataType2)[keyof typeof RecordReferenceDataType2]; +export const RecordReferenceType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type RecordReferenceType = (typeof RecordReferenceType)[keyof typeof RecordReferenceType]; +export const RecordReferenceTypeLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type RecordReferenceTypeLoanSummaryRecordRefType = (typeof RecordReferenceTypeLoanSummaryRecordRefType)[keyof typeof RecordReferenceTypeLoanSummaryRecordRefType]; +export const RecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type RecordRefsDataType = (typeof RecordRefsDataType)[keyof typeof RecordRefsDataType]; +export const ReportBasisReportBasis = { + Accrual: "Accrual", + Cash: "Cash", + Unknown: "Unknown", +} as const; +export type ReportBasisReportBasis = (typeof ReportBasisReportBasis)[keyof typeof ReportBasisReportBasis]; +export const ReportInputReportInput = { + Direct: "Direct", + Indirect: "Indirect", + Unknown: "Unknown", +} as const; +export type ReportInputReportInput = (typeof ReportInputReportInput)[keyof typeof ReportInputReportInput]; +export const ReportItemsLoanTransactionType = { + AccuredInterest: "AccuredInterest", + Interest: "Interest", + Investment: "Investment", + Repayment: "Repayment", +} as const; +export type ReportItemsLoanTransactionType = (typeof ReportItemsLoanTransactionType)[keyof typeof ReportItemsLoanTransactionType]; +export const ReportOperationResultsStatus = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", +} as const; +export type ReportOperationResultsStatus = (typeof ReportOperationResultsStatus)[keyof typeof ReportOperationResultsStatus]; +export const ReportOperationResultsType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", + SpendAnalysis: "spendAnalysis", +} as const; +export type ReportOperationResultsType = (typeof ReportOperationResultsType)[keyof typeof ReportOperationResultsType]; +export const ReportOperationStatus = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", +} as const; +export type ReportOperationStatus = (typeof ReportOperationStatus)[keyof typeof ReportOperationStatus]; +export const ReportOperationType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", + SpendAnalysis: "spendAnalysis", +} as const; +export type ReportOperationType = (typeof ReportOperationType)[keyof typeof ReportOperationType]; +export const ReportType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", +} as const; +export type ReportType = (typeof ReportType)[keyof typeof ReportType]; +export const ReportTypeExcelReportTypes = { + Audit: "audit", + EnhancedCashFlow: "enhancedCashFlow", + EnhancedFinancials: "enhancedFinancials", + EnhancedInvoices: "enhancedInvoices", +} as const; +export type ReportTypeExcelReportTypes = (typeof ReportTypeExcelReportTypes)[keyof typeof ReportTypeExcelReportTypes]; +export const ReportsResultsStatus = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", +} as const; +export type ReportsResultsStatus = (typeof ReportsResultsStatus)[keyof typeof ReportsResultsStatus]; +export const ReportsResultsType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", + SpendAnalysis: "spendAnalysis", +} as const; +export type ReportsResultsType = (typeof ReportsResultsType)[keyof typeof ReportsResultsType]; +export const ReportsStatus = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", +} as const; +export type ReportsStatus = (typeof ReportsStatus)[keyof typeof ReportsStatus]; +export const ReportsType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", + SpendAnalysis: "spendAnalysis", +} as const; +export type ReportsType = (typeof ReportsType)[keyof typeof ReportsType]; +export const ResultsAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type ResultsAccountIdentifierType = (typeof ResultsAccountIdentifierType)[keyof typeof ResultsAccountIdentifierType]; +export const ResultsAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type ResultsAccountStatus = (typeof ResultsAccountStatus)[keyof typeof ResultsAccountStatus]; +export const ResultsAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type ResultsAccountType = (typeof ResultsAccountType)[keyof typeof ResultsAccountType]; +export const ResultsBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type ResultsBankTransactionType = (typeof ResultsBankTransactionType)[keyof typeof ResultsBankTransactionType]; +export const ResultsBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type ResultsBillPaymentLineLinkType = (typeof ResultsBillPaymentLineLinkType)[keyof typeof ResultsBillPaymentLineLinkType]; +export const ResultsBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type ResultsBillStatus = (typeof ResultsBillStatus)[keyof typeof ResultsBillStatus]; +export const ResultsDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ResultsDataConnectionSourceType = (typeof ResultsDataConnectionSourceType)[keyof typeof ResultsDataConnectionSourceType]; +export const ResultsDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type ResultsDataConnectionStatus = (typeof ResultsDataConnectionStatus)[keyof typeof ResultsDataConnectionStatus]; +export const ResultsDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type ResultsDataType = (typeof ResultsDataType)[keyof typeof ResultsDataType]; +export const ResultsDataType1 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type ResultsDataType1 = (typeof ResultsDataType1)[keyof typeof ResultsDataType1]; +export const ResultsDataType2 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +export type ResultsDataType2 = (typeof ResultsDataType2)[keyof typeof ResultsDataType2]; +export const ResultsDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type ResultsDisputeStatus = (typeof ResultsDisputeStatus)[keyof typeof ResultsDisputeStatus]; +export const ResultsInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type ResultsInvoiceStatus = (typeof ResultsInvoiceStatus)[keyof typeof ResultsInvoiceStatus]; +export const ResultsPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type ResultsPaymentLinkType = (typeof ResultsPaymentLinkType)[keyof typeof ResultsPaymentLinkType]; +export const ResultsPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type ResultsPaymentStatus = (typeof ResultsPaymentStatus)[keyof typeof ResultsPaymentStatus]; +export const ResultsPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type ResultsPaymentType = (typeof ResultsPaymentType)[keyof typeof ResultsPaymentType]; +export const ResultsProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type ResultsProductVariantStatus = (typeof ResultsProductVariantStatus)[keyof typeof ResultsProductVariantStatus]; +export const ResultsPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type ResultsPushChangeType = (typeof ResultsPushChangeType)[keyof typeof ResultsPushChangeType]; +export const ResultsPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type ResultsPushOperationStatus = (typeof ResultsPushOperationStatus)[keyof typeof ResultsPushOperationStatus]; +export const ResultsServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type ResultsServiceChargeType = (typeof ResultsServiceChargeType)[keyof typeof ResultsServiceChargeType]; +export const ResultsStatus = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type ResultsStatus = (typeof ResultsStatus)[keyof typeof ResultsStatus]; +export const ResultsStatus1 = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type ResultsStatus1 = (typeof ResultsStatus1)[keyof typeof ResultsStatus1]; +export const ResultsStatus2 = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type ResultsStatus2 = (typeof ResultsStatus2)[keyof typeof ResultsStatus2]; +export const ResultsSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type ResultsSupplierStatus = (typeof ResultsSupplierStatus)[keyof typeof ResultsSupplierStatus]; +export const ResultsTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type ResultsTransactionCode = (typeof ResultsTransactionCode)[keyof typeof ResultsTransactionCode]; +export const ResultsTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type ResultsTransactionSourceType = (typeof ResultsTransactionSourceType)[keyof typeof ResultsTransactionSourceType]; +export const ResultsTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type ResultsTransactionType = (typeof ResultsTransactionType)[keyof typeof ResultsTransactionType]; +export const ResultsType = { + CategorizedBankStatement: "categorizedBankStatement", + CreditModel: "creditModel", + SpendAnalysis: "spendAnalysis", +} as const; +export type ResultsType = (typeof ResultsType)[keyof typeof ResultsType]; +export const RoutingInfoType = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type RoutingInfoType = (typeof RoutingInfoType)[keyof typeof RoutingInfoType]; +export const SalesOrderReferenceDataType = { + SalesOrders: "salesOrders", +} as const; +export type SalesOrderReferenceDataType = (typeof SalesOrderReferenceDataType)[keyof typeof SalesOrderReferenceDataType]; +export const SalesOrderRefsDataType = { + SalesOrders: "salesOrders", +} as const; +export type SalesOrderRefsDataType = (typeof SalesOrderRefsDataType)[keyof typeof SalesOrderRefsDataType]; +export const SchemaAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type SchemaAccountStatus = (typeof SchemaAccountStatus)[keyof typeof SchemaAccountStatus]; +export const SchemaAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type SchemaAccountType = (typeof SchemaAccountType)[keyof typeof SchemaAccountType]; +export const SchemaAccountType1 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type SchemaAccountType1 = (typeof SchemaAccountType1)[keyof typeof SchemaAccountType1]; +export const SchemaAccountType2 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type SchemaAccountType2 = (typeof SchemaAccountType2)[keyof typeof SchemaAccountType2]; +export const SchemaAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type SchemaAccountingBankAccountType = (typeof SchemaAccountingBankAccountType)[keyof typeof SchemaAccountingBankAccountType]; +export const SchemaBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type SchemaBankAccountType = (typeof SchemaBankAccountType)[keyof typeof SchemaBankAccountType]; +export const SchemaBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type SchemaBankTransactionType = (typeof SchemaBankTransactionType)[keyof typeof SchemaBankTransactionType]; +export const SchemaCreditNoteStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type SchemaCreditNoteStatus = (typeof SchemaCreditNoteStatus)[keyof typeof SchemaCreditNoteStatus]; +export const SchemaCurrentStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type SchemaCurrentStatus = (typeof SchemaCurrentStatus)[keyof typeof SchemaCurrentStatus]; +export const SchemaDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type SchemaDataConnectionSourceType = (typeof SchemaDataConnectionSourceType)[keyof typeof SchemaDataConnectionSourceType]; +export const SchemaDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type SchemaDataConnectionStatus = (typeof SchemaDataConnectionStatus)[keyof typeof SchemaDataConnectionStatus]; +export const SchemaDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type SchemaDataType = (typeof SchemaDataType)[keyof typeof SchemaDataType]; +export const SchemaDataType1 = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type SchemaDataType1 = (typeof SchemaDataType1)[keyof typeof SchemaDataType1]; +export const SchemaDataType2 = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type SchemaDataType2 = (typeof SchemaDataType2)[keyof typeof SchemaDataType2]; +export const SchemaDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type SchemaDataTypes = (typeof SchemaDataTypes)[keyof typeof SchemaDataTypes]; +export const SchemaDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type SchemaDatasetStatus = (typeof SchemaDatasetStatus)[keyof typeof SchemaDatasetStatus]; +export const SchemaErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type SchemaErrorStatus = (typeof SchemaErrorStatus)[keyof typeof SchemaErrorStatus]; +export const SchemaIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type SchemaIntegrationType = (typeof SchemaIntegrationType)[keyof typeof SchemaIntegrationType]; +export const SchemaInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type SchemaInvoiceStatus = (typeof SchemaInvoiceStatus)[keyof typeof SchemaInvoiceStatus]; +export const SchemaLoanSummaryIntegrationType = { + Accounting: "Accounting", + Banking: "Banking", + Commerce: "Commerce", +} as const; +export type SchemaLoanSummaryIntegrationType = (typeof SchemaLoanSummaryIntegrationType)[keyof typeof SchemaLoanSummaryIntegrationType]; +export const SchemaLoanSummaryRecordRefType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type SchemaLoanSummaryRecordRefType = (typeof SchemaLoanSummaryRecordRefType)[keyof typeof SchemaLoanSummaryRecordRefType]; +export const SchemaOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type SchemaOptionType = (typeof SchemaOptionType)[keyof typeof SchemaOptionType]; +export const SchemaPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type SchemaPaymentLinkType = (typeof SchemaPaymentLinkType)[keyof typeof SchemaPaymentLinkType]; +export const SchemaPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type SchemaPushChangeType = (typeof SchemaPushChangeType)[keyof typeof SchemaPushChangeType]; +export const SchemaPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type SchemaPushOperationStatus = (typeof SchemaPushOperationStatus)[keyof typeof SchemaPushOperationStatus]; +export const SchemaPushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type SchemaPushOptionType = (typeof SchemaPushOptionType)[keyof typeof SchemaPushOptionType]; +export const SchemaRecordReferenceType = { + Accounts: "accounts", + BankingAccounts: "banking-accounts", + CommerceTransactions: "commerce-transactions", +} as const; +export type SchemaRecordReferenceType = (typeof SchemaRecordReferenceType)[keyof typeof SchemaRecordReferenceType]; +export const SchemaReportBasis = { + Accrual: "Accrual", + Cash: "Cash", + Unknown: "Unknown", +} as const; +export type SchemaReportBasis = (typeof SchemaReportBasis)[keyof typeof SchemaReportBasis]; +export const SchemaSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type SchemaSourceType = (typeof SchemaSourceType)[keyof typeof SchemaSourceType]; +export const SchemaStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type SchemaStatus = "Active" | "Archived" | "AuthError" | "Cancelled" | "Complete" | "FetchError" | "Fetching" | "Initial" | "InternalError" | "MapError" | "MapQueued" | "Mapping" | "NotSupported" | "PermissionsError" | "PrerequisiteNotMet" | "Processing" | "ProcessingError" | "ProcessingQueued" | "Queued" | "RateLimitError" | "Reconciled" | "Resolved" | "Unknown" | "Unreconciled" | "Validating" | "ValidationError" | "ValidationQueued" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const SchemaStatus1 = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type SchemaStatus1 = "Active" | "Archived" | "AuthError" | "Cancelled" | "Complete" | "FetchError" | "Fetching" | "Initial" | "InternalError" | "MapError" | "MapQueued" | "Mapping" | "NotSupported" | "PermissionsError" | "PrerequisiteNotMet" | "Processing" | "ProcessingError" | "ProcessingQueued" | "Queued" | "RateLimitError" | "Reconciled" | "Resolved" | "Unknown" | "Unreconciled" | "Validating" | "ValidationError" | "ValidationQueued" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const SchemaStatus2 = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type SchemaStatus2 = "Active" | "Archived" | "AuthError" | "Cancelled" | "Complete" | "FetchError" | "Fetching" | "Initial" | "InternalError" | "MapError" | "MapQueued" | "Mapping" | "NotSupported" | "PermissionsError" | "PrerequisiteNotMet" | "Processing" | "ProcessingError" | "ProcessingQueued" | "Queued" | "RateLimitError" | "Reconciled" | "Resolved" | "Unknown" | "Unreconciled" | "Validating" | "ValidationError" | "ValidationQueued" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const SchemaSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type SchemaSupplierStatus = (typeof SchemaSupplierStatus)[keyof typeof SchemaSupplierStatus]; +export const SchemaTrackingCategoryStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type SchemaTrackingCategoryStatus = (typeof SchemaTrackingCategoryStatus)[keyof typeof SchemaTrackingCategoryStatus]; +export const SchemaType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SchemaType = (typeof SchemaType)[keyof typeof SchemaType]; +export const SchemaType1 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SchemaType1 = (typeof SchemaType1)[keyof typeof SchemaType1]; +export const SchemaType2 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SchemaType2 = (typeof SchemaType2)[keyof typeof SchemaType2]; +export const ServiceChargeServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type ServiceChargeServiceChargeType = (typeof ServiceChargeServiceChargeType)[keyof typeof ServiceChargeServiceChargeType]; +export const ServiceChargeTypeServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type ServiceChargeTypeServiceChargeType = (typeof ServiceChargeTypeServiceChargeType)[keyof typeof ServiceChargeTypeServiceChargeType]; +export const Source = { + Codat: "codat", +} as const; +export type Source = (typeof Source)[keyof typeof Source]; +export const SourceAccountStatus = { + Connected: "connected", + Connecting: "connecting", + Disconnected: "disconnected", + Pending: "pending", + Unknown: "unknown", +} as const; +export type SourceAccountStatus = (typeof SourceAccountStatus)[keyof typeof SourceAccountStatus]; +export const SourceAccountV2AccountType = { + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type SourceAccountV2AccountType = (typeof SourceAccountV2AccountType)[keyof typeof SourceAccountV2AccountType]; +export const SourceAccountV2PrototypeAccountType = { + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type SourceAccountV2PrototypeAccountType = (typeof SourceAccountV2PrototypeAccountType)[keyof typeof SourceAccountV2PrototypeAccountType]; +export const SourceAccountV2PrototypeRoutingInfoType = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SourceAccountV2PrototypeRoutingInfoType = (typeof SourceAccountV2PrototypeRoutingInfoType)[keyof typeof SourceAccountV2PrototypeRoutingInfoType]; +export const SourceAccountV2PrototypeType = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SourceAccountV2PrototypeType = (typeof SourceAccountV2PrototypeType)[keyof typeof SourceAccountV2PrototypeType]; +export const SourceAccountV2RoutingInfoType = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SourceAccountV2RoutingInfoType = (typeof SourceAccountV2RoutingInfoType)[keyof typeof SourceAccountV2RoutingInfoType]; +export const SourceAccountV2Status = { + Connected: "connected", + Connecting: "connecting", + Disconnected: "disconnected", + Pending: "pending", + Unknown: "unknown", +} as const; +export type SourceAccountV2Status = (typeof SourceAccountV2Status)[keyof typeof SourceAccountV2Status]; +export const SourceAccountV2Type = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SourceAccountV2Type = (typeof SourceAccountV2Type)[keyof typeof SourceAccountV2Type]; +export const SourceAccountsAccountType = { + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type SourceAccountsAccountType = (typeof SourceAccountsAccountType)[keyof typeof SourceAccountsAccountType]; +export const SourceAccountsRoutingInfoType = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SourceAccountsRoutingInfoType = (typeof SourceAccountsRoutingInfoType)[keyof typeof SourceAccountsRoutingInfoType]; +export const SourceAccountsStatus = { + Connected: "connected", + Connecting: "connecting", + Disconnected: "disconnected", + Pending: "pending", + Unknown: "unknown", +} as const; +export type SourceAccountsStatus = (typeof SourceAccountsStatus)[keyof typeof SourceAccountsStatus]; +export const SourceAccountsType = { + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + Clabe: "clabe", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + Swift: "swift", + Trno: "trno", +} as const; +export type SourceAccountsType = (typeof SourceAccountsType)[keyof typeof SourceAccountsType]; +export const SourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type SourceType = "Accounting" | "BankFeed" | "Banking" | "Commerce" | "Expense" | "Other" | "Unknown" | "accounting" | "banking" | "commerce"; +export const SourceType1 = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type SourceType1 = "Accounting" | "BankFeed" | "Banking" | "Commerce" | "Expense" | "Other" | "Unknown" | "accounting" | "banking" | "commerce"; +export const SourceType2 = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type SourceType2 = "Accounting" | "BankFeed" | "Banking" | "Commerce" | "Expense" | "Other" | "Unknown" | "accounting" | "banking" | "commerce"; +export const SourceTypeDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type SourceTypeDataConnectionSourceType = (typeof SourceTypeDataConnectionSourceType)[keyof typeof SourceTypeDataConnectionSourceType]; +export const StartUploadSessionRequestDataType = { + BankingAccounts: "banking-accounts", + BankingTransactions: "banking-transactions", +} as const; +export type StartUploadSessionRequestDataType = (typeof StartUploadSessionRequestDataType)[keyof typeof StartUploadSessionRequestDataType]; +export const Status1 = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type Status1 = "Active" | "Archived" | "AuthError" | "Cancel" | "Cancelled" | "Complete" | "Error" | "FetchError" | "Fetching" | "InProgress" | "Initial" | "InternalError" | "MapError" | "MapQueued" | "Mapping" | "NotSupported" | "PermissionsError" | "PrerequisiteNotMet" | "Process" | "Processing" | "ProcessingError" | "ProcessingQueued" | "Queued" | "RateLimitError" | "Reconciled" | "Resolved" | "Unknown" | "Unreconciled" | "Validating" | "ValidationError" | "ValidationQueued" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const Status2 = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type Status2 = "Active" | "Archived" | "AuthError" | "Cancel" | "Cancelled" | "Complete" | "Error" | "FetchError" | "Fetching" | "InProgress" | "Initial" | "InternalError" | "MapError" | "MapQueued" | "Mapping" | "NotSupported" | "PermissionsError" | "PrerequisiteNotMet" | "Process" | "Processing" | "ProcessingError" | "ProcessingQueued" | "Queued" | "RateLimitError" | "Reconciled" | "Resolved" | "Unknown" | "Unreconciled" | "Validating" | "ValidationError" | "ValidationQueued" | "Void" | "connected" | "connecting" | "disconnected" | "pending" | "unknown"; +export const StatusAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type StatusAccountStatus = (typeof StatusAccountStatus)[keyof typeof StatusAccountStatus]; +export const StatusBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type StatusBillStatus = (typeof StatusBillStatus)[keyof typeof StatusBillStatus]; +export const StatusDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type StatusDataConnectionStatus = (typeof StatusDataConnectionStatus)[keyof typeof StatusDataConnectionStatus]; +export const StatusDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type StatusDatasetStatus = (typeof StatusDatasetStatus)[keyof typeof StatusDatasetStatus]; +export const StatusDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type StatusDisputeStatus = (typeof StatusDisputeStatus)[keyof typeof StatusDisputeStatus]; +export const StatusErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type StatusErrorStatus = (typeof StatusErrorStatus)[keyof typeof StatusErrorStatus]; +export const StatusInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type StatusInvoiceStatus = (typeof StatusInvoiceStatus)[keyof typeof StatusInvoiceStatus]; +export const StatusPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type StatusPaymentStatus = (typeof StatusPaymentStatus)[keyof typeof StatusPaymentStatus]; +export const StatusProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type StatusProductVariantStatus = (typeof StatusProductVariantStatus)[keyof typeof StatusProductVariantStatus]; +export const StatusPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type StatusPushOperationStatus = (typeof StatusPushOperationStatus)[keyof typeof StatusPushOperationStatus]; +export const StatusStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type StatusStatus = (typeof StatusStatus)[keyof typeof StatusStatus]; +export const StatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type StatusSupplierStatus = (typeof StatusSupplierStatus)[keyof typeof StatusSupplierStatus]; +export const SupplierStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type SupplierStatusSupplierStatus = (typeof SupplierStatusSupplierStatus)[keyof typeof SupplierStatusSupplierStatus]; +export const TrackingBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type TrackingBilledToType = (typeof TrackingBilledToType)[keyof typeof TrackingBilledToType]; +export const TrackingBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type TrackingBilledToType1 = (typeof TrackingBilledToType1)[keyof typeof TrackingBilledToType1]; +export const TrackingCategoryStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type TrackingCategoryStatus = (typeof TrackingCategoryStatus)[keyof typeof TrackingCategoryStatus]; +export const TrackingCategoryStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type TrackingCategoryStatusSupplierStatus = (typeof TrackingCategoryStatusSupplierStatus)[keyof typeof TrackingCategoryStatusSupplierStatus]; +export const TrackingDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type TrackingDataType = (typeof TrackingDataType)[keyof typeof TrackingDataType]; +export const TrackingRecordRefDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type TrackingRecordRefDataType = (typeof TrackingRecordRefDataType)[keyof typeof TrackingRecordRefDataType]; +export const TrackingRecordRefsDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +export type TrackingRecordRefsDataType = (typeof TrackingRecordRefsDataType)[keyof typeof TrackingRecordRefsDataType]; +export const TransactionCategoryStatusSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type TransactionCategoryStatusSupplierStatus = (typeof TransactionCategoryStatusSupplierStatus)[keyof typeof TransactionCategoryStatusSupplierStatus]; +export const TransactionCategoryStatusTransactionCategoryStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type TransactionCategoryStatusTransactionCategoryStatus = (typeof TransactionCategoryStatusTransactionCategoryStatus)[keyof typeof TransactionCategoryStatusTransactionCategoryStatus]; +export const TransactionCodeTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type TransactionCodeTransactionCode = (typeof TransactionCodeTransactionCode)[keyof typeof TransactionCodeTransactionCode]; +export const TransactionSourceRefTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type TransactionSourceRefTransactionSourceType = (typeof TransactionSourceRefTransactionSourceType)[keyof typeof TransactionSourceRefTransactionSourceType]; +export const TransactionSourceRefTypeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type TransactionSourceRefTypeTransactionSourceType = (typeof TransactionSourceRefTypeTransactionSourceType)[keyof typeof TransactionSourceRefTypeTransactionSourceType]; +export const TransactionSourceReferenceTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type TransactionSourceReferenceTransactionSourceType = (typeof TransactionSourceReferenceTransactionSourceType)[keyof typeof TransactionSourceReferenceTransactionSourceType]; +export const TransactionSourceReferenceTypeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type TransactionSourceReferenceTypeTransactionSourceType = (typeof TransactionSourceReferenceTypeTransactionSourceType)[keyof typeof TransactionSourceReferenceTypeTransactionSourceType]; +export const TransactionSourceTypeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type TransactionSourceTypeTransactionSourceType = (typeof TransactionSourceTypeTransactionSourceType)[keyof typeof TransactionSourceTypeTransactionSourceType]; +export const TransactionTypeBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type TransactionTypeBankTransactionType = (typeof TransactionTypeBankTransactionType)[keyof typeof TransactionTypeBankTransactionType]; +export const TransactionTypeTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type TransactionTypeTransactionType = (typeof TransactionTypeTransactionType)[keyof typeof TransactionTypeTransactionType]; +export const Type = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Unknown: "Unknown", +} as const; +export type Type = (typeof Type)[keyof typeof Type]; +export const Type1 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + CategorizedBankStatement: "categorizedBankStatement", + Clabe: "clabe", + CreditModel: "creditModel", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + SpendAnalysis: "spendAnalysis", + Swift: "swift", + Trno: "trno", +} as const; +export type Type1 = (typeof Type1)[keyof typeof Type1]; +export const Type2 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + CategorizedBankStatement: "categorizedBankStatement", + Clabe: "clabe", + CreditModel: "creditModel", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + SpendAnalysis: "spendAnalysis", + Swift: "swift", + Trno: "trno", +} as const; +export type Type2 = (typeof Type2)[keyof typeof Type2]; +export const TypeAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type TypeAccountIdentifierType = (typeof TypeAccountIdentifierType)[keyof typeof TypeAccountIdentifierType]; +export const TypeAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", +} as const; +export type TypeAccountType = (typeof TypeAccountType)[keyof typeof TypeAccountType]; +export const TypeAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type TypeAccountingAddressType = (typeof TypeAccountingAddressType)[keyof typeof TypeAccountingAddressType]; +export const TypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type TypeAccountingBankAccountType = (typeof TypeAccountingBankAccountType)[keyof typeof TypeAccountingBankAccountType]; +export const TypeBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type TypeBillPaymentLineLinkType = (typeof TypeBillPaymentLineLinkType)[keyof typeof TypeBillPaymentLineLinkType]; +export const TypeCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type TypeCommerceAddressType = (typeof TypeCommerceAddressType)[keyof typeof TypeCommerceAddressType]; +export const TypePaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type TypePaymentLinkType = (typeof TypePaymentLinkType)[keyof typeof TypePaymentLinkType]; +export const TypePaymentMethodType = { + BankTransfer: "BankTransfer", + Cash: "Cash", + Check: "Check", + CreditCard: "CreditCard", + DebitCard: "DebitCard", + Other: "Other", + Unknown: "Unknown", +} as const; +export type TypePaymentMethodType = (typeof TypePaymentMethodType)[keyof typeof TypePaymentMethodType]; +export const TypePaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type TypePaymentType = (typeof TypePaymentType)[keyof typeof TypePaymentType]; +export const TypePushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type TypePushChangeType = (typeof TypePushChangeType)[keyof typeof TypePushChangeType]; +export const TypePushOptionType = { + Array: "Array", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", + Number: "Number", + Object: "Object", + String: "String", +} as const; +export type TypePushOptionType = (typeof TypePushOptionType)[keyof typeof TypePushOptionType]; +export const TypeServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type TypeServiceChargeType = (typeof TypeServiceChargeType)[keyof typeof TypeServiceChargeType]; +export const TypeTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type TypeTransactionSourceType = (typeof TypeTransactionSourceType)[keyof typeof TypeTransactionSourceType]; +export const TypeTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type TypeTransactionType = (typeof TypeTransactionType)[keyof typeof TypeTransactionType]; +export const UploadBankStatementDataQueryParamPath = { + AuthGet: "auth/get", +} as const; +export type UploadBankStatementDataQueryParamPath = (typeof UploadBankStatementDataQueryParamPath)[keyof typeof UploadBankStatementDataQueryParamPath]; +export const UploadBankStatementDataRequestBodyAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type UploadBankStatementDataRequestBodyAccountIdentifierType = (typeof UploadBankStatementDataRequestBodyAccountIdentifierType)[keyof typeof UploadBankStatementDataRequestBodyAccountIdentifierType]; +export const UploadBankStatementDataRequestBodyAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type UploadBankStatementDataRequestBodyAccountingBankAccountType = (typeof UploadBankStatementDataRequestBodyAccountingBankAccountType)[keyof typeof UploadBankStatementDataRequestBodyAccountingBankAccountType]; +export const UploadBankStatementDataRequestBodyCodeTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type UploadBankStatementDataRequestBodyCodeTransactionCode = (typeof UploadBankStatementDataRequestBodyCodeTransactionCode)[keyof typeof UploadBankStatementDataRequestBodyCodeTransactionCode]; +export const UploadBankStatementDataRequestBodyResultsTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type UploadBankStatementDataRequestBodyResultsTransactionCode = (typeof UploadBankStatementDataRequestBodyResultsTransactionCode)[keyof typeof UploadBankStatementDataRequestBodyResultsTransactionCode]; +export const UploadBankStatementDataRequestBodyTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type UploadBankStatementDataRequestBodyTransactionCode = (typeof UploadBankStatementDataRequestBodyTransactionCode)[keyof typeof UploadBankStatementDataRequestBodyTransactionCode]; +export const UploadBankStatementDataRequestBodyTypeAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type UploadBankStatementDataRequestBodyTypeAccountIdentifierType = (typeof UploadBankStatementDataRequestBodyTypeAccountIdentifierType)[keyof typeof UploadBankStatementDataRequestBodyTypeAccountIdentifierType]; +export const UploadBankStatementDataRequestBodyTypeAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type UploadBankStatementDataRequestBodyTypeAccountingBankAccountType = (typeof UploadBankStatementDataRequestBodyTypeAccountingBankAccountType)[keyof typeof UploadBankStatementDataRequestBodyTypeAccountingBankAccountType]; +export const WebLinkType = { + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type WebLinkType = (typeof WebLinkType)[keyof typeof WebLinkType]; +export const WebLinksType = { + Social: "Social", + Unknown: "Unknown", + Website: "Website", +} as const; +export type WebLinksType = (typeof WebLinksType)[keyof typeof WebLinksType]; +export const ZeroAccountIdentifierType = { + Account: "Account", + Card: "Card", + Credit: "Credit", + Depository: "Depository", + Investment: "Investment", + Loan: "Loan", + Other: "Other", +} as const; +export type ZeroAccountIdentifierType = (typeof ZeroAccountIdentifierType)[keyof typeof ZeroAccountIdentifierType]; +export const ZeroAccountStatus = { + Active: "Active", + Archived: "Archived", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type ZeroAccountStatus = (typeof ZeroAccountStatus)[keyof typeof ZeroAccountStatus]; +export const ZeroAccountType = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type ZeroAccountType = (typeof ZeroAccountType)[keyof typeof ZeroAccountType]; +export const ZeroAccountType1 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type ZeroAccountType1 = (typeof ZeroAccountType1)[keyof typeof ZeroAccountType1]; +export const ZeroAccountType2 = { + Asset: "Asset", + Equity: "Equity", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Unknown: "Unknown", + Checking: "checking", + CreditCard: "creditCard", + Loan: "loan", + PrepaidCard: "prepaidCard", + Savings: "savings", +} as const; +export type ZeroAccountType2 = (typeof ZeroAccountType2)[keyof typeof ZeroAccountType2]; +export const ZeroAccountingAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Unknown: "Unknown", +} as const; +export type ZeroAccountingAddressType = (typeof ZeroAccountingAddressType)[keyof typeof ZeroAccountingAddressType]; +export const ZeroAccountingBankAccountType = { + Credit: "Credit", + Debit: "Debit", + Unknown: "Unknown", +} as const; +export type ZeroAccountingBankAccountType = (typeof ZeroAccountingBankAccountType)[keyof typeof ZeroAccountingBankAccountType]; +export const ZeroBankTransactionType = { + Atm: "Atm", + Cash: "Cash", + Check: "Check", + Credit: "Credit", + Debit: "Debit", + Dep: "Dep", + DirectDebit: "DirectDebit", + DirectDep: "DirectDep", + Div: "Div", + Fee: "Fee", + Int: "Int", + Other: "Other", + Payment: "Payment", + Pos: "Pos", + RepeatPmt: "RepeatPmt", + SerChg: "SerChg", + Unknown: "Unknown", + Xfer: "Xfer", +} as const; +export type ZeroBankTransactionType = (typeof ZeroBankTransactionType)[keyof typeof ZeroBankTransactionType]; +export const ZeroBillPaymentLineLinkType = { + Bill: "Bill", + BillPayment: "BillPayment", + CreditNote: "CreditNote", + Discount: "Discount", + ManualJournal: "ManualJournal", + Other: "Other", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type ZeroBillPaymentLineLinkType = (typeof ZeroBillPaymentLineLinkType)[keyof typeof ZeroBillPaymentLineLinkType]; +export const ZeroBillStatus = { + Draft: "Draft", + Open: "Open", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Unknown: "Unknown", + Void: "Void", +} as const; +export type ZeroBillStatus = (typeof ZeroBillStatus)[keyof typeof ZeroBillStatus]; +export const ZeroBilledToType = { + Customer: "Customer", + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type ZeroBilledToType = (typeof ZeroBilledToType)[keyof typeof ZeroBilledToType]; +export const ZeroBilledToType1 = { + NotApplicable: "NotApplicable", + Project: "Project", + Unknown: "Unknown", +} as const; +export type ZeroBilledToType1 = (typeof ZeroBilledToType1)[keyof typeof ZeroBilledToType1]; +export const ZeroCommerceAddressType = { + Billing: "Billing", + Delivery: "Delivery", + Inventory: "Inventory", + Order: "Order", + Unknown: "Unknown", +} as const; +export type ZeroCommerceAddressType = (typeof ZeroCommerceAddressType)[keyof typeof ZeroCommerceAddressType]; +export const ZeroDataConnectionSourceType = { + Accounting: "Accounting", + BankFeed: "BankFeed", + Banking: "Banking", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ZeroDataConnectionSourceType = (typeof ZeroDataConnectionSourceType)[keyof typeof ZeroDataConnectionSourceType]; +export const ZeroDataConnectionStatus = { + Deauthorized: "Deauthorized", + Linked: "Linked", + PendingAuth: "PendingAuth", + Unlinked: "Unlinked", +} as const; +export type ZeroDataConnectionStatus = (typeof ZeroDataConnectionStatus)[keyof typeof ZeroDataConnectionStatus]; +export const ZeroDataType = { + Bills: "bills", + PurchaseOrders: "purchaseOrders", +} as const; +export type ZeroDataType = (typeof ZeroDataType)[keyof typeof ZeroDataType]; +export const ZeroDataType1 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type ZeroDataType1 = (typeof ZeroDataType1)[keyof typeof ZeroDataType1]; +export const ZeroDataType2 = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type ZeroDataType2 = (typeof ZeroDataType2)[keyof typeof ZeroDataType2]; +export const ZeroDataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BankingAccountBalances: "banking-accountBalances", + BankingAccounts: "banking-accounts", + BankingTransactionCategories: "banking-transactionCategories", + BankingTransactions: "banking-transactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + CommerceCompanyInfo: "commerce-companyInfo", + CommerceCustomers: "commerce-customers", + CommerceDisputes: "commerce-disputes", + CommerceLocations: "commerce-locations", + CommerceOrders: "commerce-orders", + CommercePaymentMethods: "commerce-paymentMethods", + CommercePayments: "commerce-payments", + CommerceProductCategories: "commerce-productCategories", + CommerceProducts: "commerce-products", + CommerceTaxComponents: "commerce-taxComponents", + CommerceTransactions: "commerce-transactions", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", +} as const; +export type ZeroDataTypes = (typeof ZeroDataTypes)[keyof typeof ZeroDataTypes]; +export const ZeroDatasetStatus = { + AuthError: "AuthError", + Cancelled: "Cancelled", + Complete: "Complete", + FetchError: "FetchError", + Fetching: "Fetching", + Initial: "Initial", + InternalError: "InternalError", + MapError: "MapError", + MapQueued: "MapQueued", + Mapping: "Mapping", + NotSupported: "NotSupported", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", + Processing: "Processing", + ProcessingError: "ProcessingError", + ProcessingQueued: "ProcessingQueued", + Queued: "Queued", + RateLimitError: "RateLimitError", + Validating: "Validating", + ValidationError: "ValidationError", + ValidationQueued: "ValidationQueued", +} as const; +export type ZeroDatasetStatus = (typeof ZeroDatasetStatus)[keyof typeof ZeroDatasetStatus]; +export const ZeroDisputeStatus = { + Accepted: "Accepted", + ChargeRefunded: "ChargeRefunded", + EvidenceRequired: "EvidenceRequired", + InquiryClosed: "InquiryClosed", + InquiryEvidenceRequired: "InquiryEvidenceRequired", + InquiryProcessing: "InquiryProcessing", + Lost: "Lost", + Processing: "Processing", + Unknown: "Unknown", + WaitingThirdParty: "WaitingThirdParty", + Won: "Won", +} as const; +export type ZeroDisputeStatus = (typeof ZeroDisputeStatus)[keyof typeof ZeroDisputeStatus]; +export const ZeroErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +export type ZeroErrorStatus = (typeof ZeroErrorStatus)[keyof typeof ZeroErrorStatus]; +export const ZeroInvoiceStatus = { + Draft: "Draft", + Paid: "Paid", + PartiallyPaid: "PartiallyPaid", + Submitted: "Submitted", + Unknown: "Unknown", + Void: "Void", +} as const; +export type ZeroInvoiceStatus = (typeof ZeroInvoiceStatus)[keyof typeof ZeroInvoiceStatus]; +export const ZeroPaymentLinkType = { + CreditNote: "CreditNote", + Discount: "Discount", + Invoice: "Invoice", + ManualJournal: "ManualJournal", + Other: "Other", + Payment: "Payment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + Unknown: "Unknown", + Unlinked: "Unlinked", +} as const; +export type ZeroPaymentLinkType = (typeof ZeroPaymentLinkType)[keyof typeof ZeroPaymentLinkType]; +export const ZeroPaymentMethodType = { + BankTransfer: "BankTransfer", + Cash: "Cash", + Check: "Check", + CreditCard: "CreditCard", + DebitCard: "DebitCard", + Other: "Other", + Unknown: "Unknown", +} as const; +export type ZeroPaymentMethodType = (typeof ZeroPaymentMethodType)[keyof typeof ZeroPaymentMethodType]; +export const ZeroPaymentStatus = { + Authorized: "Authorized", + Cancelled: "Cancelled", + Failed: "Failed", + Paid: "Paid", + Pending: "Pending", + Unknown: "Unknown", +} as const; +export type ZeroPaymentStatus = (typeof ZeroPaymentStatus)[keyof typeof ZeroPaymentStatus]; +export const ZeroPaymentType = { + Card: "Card", + Cash: "Cash", + Custom: "Custom", + Invoice: "Invoice", + Mobile: "Mobile", + OnlineCard: "OnlineCard", + Paypal: "Paypal", + Prepaid: "Prepaid", + StoreCredit: "StoreCredit", + Swish: "Swish", + Unknown: "Unknown", + Vipps: "Vipps", +} as const; +export type ZeroPaymentType = (typeof ZeroPaymentType)[keyof typeof ZeroPaymentType]; +export const ZeroProductVariantStatus = { + Published: "Published", + Unknown: "Unknown", + Unpublished: "Unpublished", +} as const; +export type ZeroProductVariantStatus = (typeof ZeroProductVariantStatus)[keyof typeof ZeroProductVariantStatus]; +export const ZeroPushChangeType = { + AttachmentUploaded: "AttachmentUploaded", + Created: "Created", + Deleted: "Deleted", + Modified: "Modified", + Unknown: "Unknown", +} as const; +export type ZeroPushChangeType = (typeof ZeroPushChangeType)[keyof typeof ZeroPushChangeType]; +export const ZeroPushOperationStatus = { + Failed: "Failed", + Pending: "Pending", + Success: "Success", + TimedOut: "TimedOut", +} as const; +export type ZeroPushOperationStatus = (typeof ZeroPushOperationStatus)[keyof typeof ZeroPushOperationStatus]; +export const ZeroServiceChargeType = { + Generic: "Generic", + Overpayment: "Overpayment", + Shipping: "Shipping", + Unknown: "Unknown", +} as const; +export type ZeroServiceChargeType = (typeof ZeroServiceChargeType)[keyof typeof ZeroServiceChargeType]; +export const ZeroStatus = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type ZeroStatus = (typeof ZeroStatus)[keyof typeof ZeroStatus]; +export const ZeroStatus1 = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type ZeroStatus1 = (typeof ZeroStatus1)[keyof typeof ZeroStatus1]; +export const ZeroStatus2 = { + Complete: "Complete", + Error: "Error", + InProgress: "InProgress", + Reconciled: "Reconciled", + Unknown: "Unknown", + Unreconciled: "Unreconciled", + Void: "Void", +} as const; +export type ZeroStatus2 = (typeof ZeroStatus2)[keyof typeof ZeroStatus2]; +export const ZeroSupplierStatus = { + Active: "Active", + Archived: "Archived", + Unknown: "Unknown", +} as const; +export type ZeroSupplierStatus = (typeof ZeroSupplierStatus)[keyof typeof ZeroSupplierStatus]; +export const ZeroTransactionCode = { + Adjustment: "Adjustment", + Cash: "Cash", + Cashback: "Cashback", + Cheque: "Cheque", + Credit: "Credit", + DirectDebit: "DirectDebit", + Fee: "Fee", + Interest: "Interest", + NotSupported: "NotSupported", + Other: "Other", + Payment: "Payment", + Purchase: "Purchase", + StandingOrder: "StandingOrder", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type ZeroTransactionCode = (typeof ZeroTransactionCode)[keyof typeof ZeroTransactionCode]; +export const ZeroTransactionSourceType = { + Fee: "Fee", + Order: "Order", + Payment: "Payment", + ServiceCharge: "ServiceCharge", + Unknown: "Unknown", +} as const; +export type ZeroTransactionSourceType = (typeof ZeroTransactionSourceType)[keyof typeof ZeroTransactionSourceType]; +export const ZeroTransactionType = { + FailedPayout: "FailedPayout", + Payment: "Payment", + PaymentFee: "PaymentFee", + PaymentFeeRefund: "PaymentFeeRefund", + Payout: "Payout", + Refund: "Refund", + Transfer: "Transfer", + Unknown: "Unknown", +} as const; +export type ZeroTransactionType = (typeof ZeroTransactionType)[keyof typeof ZeroTransactionType]; +export const ZeroType = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + CategorizedBankStatement: "categorizedBankStatement", + Clabe: "clabe", + CreditModel: "creditModel", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + SpendAnalysis: "spendAnalysis", + Swift: "swift", + Trno: "trno", +} as const; +export type ZeroType = (typeof ZeroType)[keyof typeof ZeroType]; +export const ZeroType1 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + CategorizedBankStatement: "categorizedBankStatement", + Clabe: "clabe", + CreditModel: "creditModel", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + SpendAnalysis: "spendAnalysis", + Swift: "swift", + Trno: "trno", +} as const; +export type ZeroType1 = (typeof ZeroType1)[keyof typeof ZeroType1]; +export const ZeroType2 = { + Fax: "Fax", + Landline: "Landline", + Mobile: "Mobile", + Primary: "Primary", + Social: "Social", + Unknown: "Unknown", + Website: "Website", + Aba: "aba", + Apca: "apca", + Bankcode: "bankcode", + Blz: "blz", + Bsb: "bsb", + CategorizedBankStatement: "categorizedBankStatement", + Clabe: "clabe", + CreditModel: "creditModel", + Iban: "iban", + Ifsc: "ifsc", + Nz2: "nz2", + Rtn: "rtn", + Sortcode: "sortcode", + SpendAnalysis: "spendAnalysis", + Swift: "swift", + Trno: "trno", +} as const; +export type ZeroType2 = (typeof ZeroType2)[keyof typeof ZeroType2]; diff --git a/lending/src/sdk/models/_speakeasy_hoisted.ts b/lending/src/sdk/models/_speakeasy_hoisted.ts new file mode 100644 index 000000000..08380871f --- /dev/null +++ b/lending/src/sdk/models/_speakeasy_hoisted.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type * as shared from './index'; + + +export interface AccountPrototypeValidDataTypeLinks { + links?: Array | null; + property?: string | null; +} + +export interface ConnectionInfo {} + +export interface Content {} + +export interface Details {} + +export interface PropertieItemRef { + id: string; + name?: string | null; +} + +export interface Properties {} + +export interface SourceUrls {} + +export interface Tags {} + +export interface Zero { + dataType?: shared.BillLineItemDataType; + id?: string; + lineNumber?: string; +} diff --git a/lending/src/sdk/models/_speakeasy_operations.ts b/lending/src/sdk/models/_speakeasy_operations.ts new file mode 100644 index 000000000..77bf0c014 --- /dev/null +++ b/lending/src/sdk/models/_speakeasy_operations.ts @@ -0,0 +1,6 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type * as shared from './index'; + +export type CreateSourceAccountResponseBody = shared.CreateSourceAccount200Response; diff --git a/lending/src/sdk/models/errors/codatlendingerror.ts b/lending/src/sdk/models/errors/codatlendingerror.ts index bf612ad8a..ec0d9ed97 100644 --- a/lending/src/sdk/models/errors/codatlendingerror.ts +++ b/lending/src/sdk/models/errors/codatlendingerror.ts @@ -1,35 +1,20 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -/** The base class for all HTTP error responses */ export class CodatLendingError extends Error { - /** HTTP status code */ - public readonly statusCode: number; - /** HTTP body */ - public readonly body: string; - /** HTTP headers */ - public readonly headers: Headers; - /** HTTP content type */ - public readonly contentType: string; - /** Raw response */ - public readonly rawResponse: Response; + readonly body: string; + readonly statusCode: number; + readonly contentType: string; + readonly headers: Headers; + readonly rawResponse: Response; - constructor( - message: string, - httpMeta: { - response: Response; - request: Request; - body: string; - }, - ) { - super(message); - this.statusCode = httpMeta.response.status; - this.body = httpMeta.body; - this.headers = httpMeta.response.headers; - this.contentType = httpMeta.response.headers.get("content-type") || ""; - this.rawResponse = httpMeta.response; - - this.name = "CodatLendingError"; - } + constructor(message: string, httpMeta: { response: Response; request: Request; body: string }) { + super(message); + this.name = "CodatLendingError"; + this.body = httpMeta.body; + this.statusCode = httpMeta.response.status; + this.contentType = httpMeta.response.headers.get("content-type") ?? ""; + this.headers = httpMeta.response.headers; + this.rawResponse = httpMeta.response; + } } diff --git a/lending/src/sdk/models/errors/errormessage.ts b/lending/src/sdk/models/errors/errormessage.ts index 9693761f6..7361f7683 100644 --- a/lending/src/sdk/models/errors/errormessage.ts +++ b/lending/src/sdk/models/errors/errormessage.ts @@ -1,120 +1,38 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; -import { CodatLendingError } from "./codatlendingerror.js"; +import { CodatLendingError } from "./codatlendingerror"; +import type { ErrorMessageData } from "../ErrorMessage"; +import type { ErrorValidation } from "../shared/errorvalidation"; -/** - * Your `query` parameter was not correctly formed - */ -export type ErrorMessageData = { - /** - * The HTTP status code returned by the error. - */ - statusCode?: number | undefined; - /** - * Codat's service the returned the error. - */ - service?: string | undefined; - /** - * A brief description of the error. - */ - error?: string | undefined; - /** - * Unique identifier used to propagate to all downstream services and determine the source of the error. - */ - correlationId?: string | undefined; - /** - * A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. - */ - validation?: shared.ErrorValidation | null | undefined; - /** - * `True` if the error occurred transiently and can be retried. - */ - canBeRetried?: string | undefined; - /** - * Machine readable error code used to automate processes based on the code returned. - */ - detailedErrorCode?: number | undefined; -}; +export type { ErrorMessageData }; -/** - * Your `query` parameter was not correctly formed - */ export class ErrorMessage extends CodatLendingError { - /** - * Codat's service the returned the error. - */ - service?: string | undefined; - /** - * A brief description of the error. - */ - error?: string | undefined; - /** - * Unique identifier used to propagate to all downstream services and determine the source of the error. - */ - correlationId?: string | undefined; - /** - * A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. - */ - validation?: shared.ErrorValidation | null | undefined; - /** - * `True` if the error occurred transiently and can be retried. - */ - canBeRetried?: string | undefined; - /** - * Machine readable error code used to automate processes based on the code returned. - */ - detailedErrorCode?: number | undefined; + service?: string | undefined; + error?: string | undefined; + correlationId?: string | undefined; + validation?: ErrorValidation | null | undefined; + canBeRetried?: string | undefined; + detailedErrorCode?: number | undefined; - /** The original data that was passed to this error instance. */ - data$: ErrorMessageData; + data$: ErrorMessageData; - constructor( - err: ErrorMessageData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.service != null) this.service = err.service; - if (err.error != null) this.error = err.error; - if (err.correlationId != null) this.correlationId = err.correlationId; - if (err.validation != null) this.validation = err.validation; - if (err.canBeRetried != null) this.canBeRetried = err.canBeRetried; - if (err.detailedErrorCode != null) { - this.detailedErrorCode = err.detailedErrorCode; + constructor( + err: ErrorMessageData, + httpMeta: { response: Response; request: Request; body: string }, + ) { + const data = err as ErrorMessageData & { message?: unknown }; + const message = typeof data.message === "string" + ? data.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message, httpMeta); + this.data$ = err; + if (err.service != null) this.service = err.service; + if (err.error != null) this.error = err.error; + if (err.correlationId != null) this.correlationId = err.correlationId; + if (err.validation != null) this.validation = err.validation; + if (err.canBeRetried != null) this.canBeRetried = err.canBeRetried; + if (err.detailedErrorCode != null) this.detailedErrorCode = err.detailedErrorCode; + this.name = "ErrorMessage"; } - - this.name = "ErrorMessage"; - } } - -/** @internal */ -export const ErrorMessage$inboundSchema: z.ZodType< - ErrorMessage, - z.ZodTypeDef, - unknown -> = z.object({ - statusCode: z.number().int().optional(), - service: z.string().optional(), - error: z.string().optional(), - correlationId: z.string().optional(), - validation: z.nullable(shared.ErrorValidation$inboundSchema).optional(), - canBeRetried: z.string().optional(), - detailedErrorCode: z.number().int().optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - return new ErrorMessage(v, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); diff --git a/lending/src/sdk/models/errors/httpclienterrors.ts b/lending/src/sdk/models/errors/httpclienterrors.ts index b34f61212..0bfc5af09 100644 --- a/lending/src/sdk/models/errors/httpclienterrors.ts +++ b/lending/src/sdk/models/errors/httpclienterrors.ts @@ -1,62 +1,47 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -/** - * Base class for all HTTP errors. - */ export class HTTPClientError extends Error { - /** The underlying cause of the error. */ - override readonly cause: unknown; - override name = "HTTPClientError"; - constructor(message: string, opts?: { cause?: unknown }) { - let msg = message; - if (opts?.cause) { - msg += `: ${opts.cause}`; - } + readonly cause: unknown; - super(msg, opts); - // In older runtimes, the cause field would not have been assigned through - // the super() call. - if (typeof this.cause === "undefined") { - this.cause = opts?.cause; + constructor(message: string, opts?: { cause?: unknown }) { + super(message); + this.name = "HTTPClientError"; + this.cause = opts?.cause; } - } } -/** - * An error to capture unrecognised or unexpected errors when making HTTP calls. - */ export class UnexpectedClientError extends HTTPClientError { - override name = "UnexpectedClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + super(message, opts); + this.name = "UnexpectedClientError"; + } } -/** - * An error that is raised when any inputs used to create a request are invalid. - */ export class InvalidRequestError extends HTTPClientError { - override name = "InvalidRequestError"; + constructor(message: string, opts?: { cause?: unknown }) { + super(message, opts); + this.name = "InvalidRequestError"; + } } -/** - * An error that is raised when a HTTP request was aborted by the client error. - */ export class RequestAbortedError extends HTTPClientError { - override readonly name = "RequestAbortedError"; + constructor(message: string, opts?: { cause?: unknown }) { + super(message, opts); + this.name = "RequestAbortedError"; + } } -/** - * An error that is raised when a HTTP request timed out due to an AbortSignal - * signal timeout. - */ export class RequestTimeoutError extends HTTPClientError { - override readonly name = "RequestTimeoutError"; + constructor(message: string, opts?: { cause?: unknown }) { + super(message, opts); + this.name = "RequestTimeoutError"; + } } -/** - * An error that is raised when a HTTP client is unable to make a request to - * a server. - */ export class ConnectionError extends HTTPClientError { - override readonly name = "ConnectionError"; + constructor(message: string, opts?: { cause?: unknown }) { + super(message, opts); + this.name = "ConnectionError"; + } } diff --git a/lending/src/sdk/models/errors/index.ts b/lending/src/sdk/models/errors/index.ts index 9d5107ffe..ff73e902d 100644 --- a/lending/src/sdk/models/errors/index.ts +++ b/lending/src/sdk/models/errors/index.ts @@ -1,10 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -export * from "./codatlendingerror.js"; -export * from "./errormessage.js"; -export * from "./httpclienterrors.js"; -export * from "./responsevalidationerror.js"; -export * from "./sdkerror.js"; -export * from "./sdkvalidationerror.js"; +export * from './codatlendingerror'; +export * from './errormessage'; +export * from './httpclienterrors'; +export * from './responsevalidationerror'; +export * from './sdkerror'; +export * from './sdkvalidationerror'; diff --git a/lending/src/sdk/models/errors/responsevalidationerror.ts b/lending/src/sdk/models/errors/responsevalidationerror.ts index 4e8894caf..b08b26007 100644 --- a/lending/src/sdk/models/errors/responsevalidationerror.ts +++ b/lending/src/sdk/models/errors/responsevalidationerror.ts @@ -1,50 +1,25 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { CodatLendingError } from "./codatlendingerror.js"; -import { formatZodError } from "./sdkvalidationerror.js"; +import { CodatLendingError } from "./codatlendingerror"; export class ResponseValidationError extends CodatLendingError { - /** - * The raw value that failed validation. - */ - public readonly rawValue: unknown; + readonly cause: unknown; + readonly rawMessage: unknown; + readonly rawValue: unknown; - /** - * The raw message that failed validation. - */ - public readonly rawMessage: unknown; - - constructor( - message: string, - extra: { - response: Response; - request: Request; - body: string; - cause: unknown; - rawValue: unknown; - rawMessage: unknown; - }, - ) { - super(message, extra); - this.name = "ResponseValidationError"; - this.cause = extra.cause; - this.rawValue = extra.rawValue; - this.rawMessage = extra.rawMessage; - } + constructor( + message: string, + extra: { response: Response; request: Request; body: string; cause: unknown; rawValue: unknown; rawMessage: unknown }, + ) { + super(message, extra); + this.name = "ResponseValidationError"; + this.cause = extra.cause; + this.rawMessage = extra.rawMessage; + this.rawValue = extra.rawValue; + } - /** - * Return a pretty-formatted error message if the underlying validation error - * is a ZodError or some other recognized error type, otherwise return the - * default error message. - */ - public pretty(): string { - if (this.cause instanceof z.ZodError) { - return `${this.rawMessage}\n${formatZodError(this.cause)}`; - } else { - return this.toString(); + pretty(): string { + return this.message; } - } } diff --git a/lending/src/sdk/models/errors/sdkerror.ts b/lending/src/sdk/models/errors/sdkerror.ts index 210439227..e0a878374 100644 --- a/lending/src/sdk/models/errors/sdkerror.ts +++ b/lending/src/sdk/models/errors/sdkerror.ts @@ -1,40 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import { CodatLendingError } from "./codatlendingerror.js"; +import { CodatLendingError } from "./codatlendingerror"; -/** The fallback error class if no more specific error class is matched */ export class SDKError extends CodatLendingError { - constructor( - message: string, - httpMeta: { - response: Response; - request: Request; - body: string; - }, - ) { - if (message) { - message += `: `; + constructor(message: string, httpMeta: { response: Response; request: Request; body: string }) { + super(message, httpMeta); + this.name = "SDKError"; } - message += `Status ${httpMeta.response.status}`; - const contentType = httpMeta.response.headers.get("content-type") || `""`; - if (contentType !== "application/json") { - message += ` Content-Type ${ - contentType.includes(" ") ? `"${contentType}"` : contentType - }`; - } - const body = httpMeta.body || `""`; - message += body.length > 100 ? "\n" : ". "; - let bodyDisplay = body; - if (body.length > 10000) { - const truncated = body.substring(0, 10000); - const remaining = body.length - 10000; - bodyDisplay = `${truncated}...and ${remaining} more chars`; - } - message += `Body: ${bodyDisplay}`; - message = message.trim(); - super(message, httpMeta); - this.name = "SDKError"; - } } diff --git a/lending/src/sdk/models/errors/sdkvalidationerror.ts b/lending/src/sdk/models/errors/sdkvalidationerror.ts index 6826e1208..23a011c8c 100644 --- a/lending/src/sdk/models/errors/sdkvalidationerror.ts +++ b/lending/src/sdk/models/errors/sdkvalidationerror.ts @@ -1,109 +1,26 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; +/* tslint:disable */ +/* eslint-disable */ export class SDKValidationError extends Error { - /** - * The raw value that failed validation. - */ - public readonly rawValue: unknown; - - /** - * The raw message that failed validation. - */ - public readonly rawMessage: unknown; - - // Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError` - static override [Symbol.hasInstance]( - instance: unknown, - ): instance is SDKValidationError { - if (!(instance instanceof Error)) return false; - if (!("rawValue" in instance)) return false; - if (!("rawMessage" in instance)) return false; - if (!("pretty" in instance)) return false; - if (typeof instance.pretty !== "function") return false; - return true; - } - - constructor(message: string, cause: unknown, rawValue: unknown) { - super(`${message}: ${cause}`); - this.name = "SDKValidationError"; - this.cause = cause; - this.rawValue = rawValue; - this.rawMessage = message; - } - - /** - * Return a pretty-formatted error message if the underlying validation error - * is a ZodError or some other recognized error type, otherwise return the - * default error message. - */ - public pretty(): string { - if (this.cause instanceof z.ZodError) { - return `${this.rawMessage}\n${formatZodError(this.cause)}`; - } else { - return this.toString(); + readonly cause: unknown; + readonly rawValue: unknown; + readonly rawMessage: unknown; + + constructor(message: string, cause: unknown, rawValue: unknown) { + super(message); + this.name = "SDKValidationError"; + this.cause = cause; + this.rawValue = rawValue; + this.rawMessage = message; } - } -} -export function formatZodError(err: z.ZodError, level = 0): string { - let pre = " ".repeat(level); - pre = level > 0 ? `│${pre}` : pre; - pre += " ".repeat(level); - - let message = ""; - const append = (str: string) => (message += `\n${pre}${str}`); - - const len = err.issues.length; - const headline = len === 1 ? `${len} issue found` : `${len} issues found`; - - if (len) { - append(`┌ ${headline}:`); - } - - for (const issue of err.issues) { - let path = issue.path.join("."); - path = path ? `.${path}` : ""; - append(`│ • [${path}]: ${issue.message} (${issue.code})`); - switch (issue.code) { - case "invalid_literal": - case "invalid_type": { - append(`│ Want: ${issue.expected}`); - append(`│ Got: ${issue.received}`); - break; - } - case "unrecognized_keys": { - append(`│ Keys: ${issue.keys.join(", ")}`); - break; - } - case "invalid_enum_value": { - append(`│ Allowed: ${issue.options.join(", ")}`); - append(`│ Got: ${issue.received}`); - break; - } - case "invalid_union_discriminator": { - append(`│ Allowed: ${issue.options.join(", ")}`); - break; - } - case "invalid_union": { - const len = issue.unionErrors.length; - append( - `│ ✖︎ Attemped to deserialize into one of ${len} union members:`, - ); - issue.unionErrors.forEach((err, i) => { - append(`│ ✖︎ Member ${i + 1} of ${len}`); - append(`${formatZodError(err, level + 1)}`); - }); - } + pretty(): string { + return this.message; } - } - - if (err.issues.length) { - append(`└─*`); - } +} - return message.slice(1); +export function formatZodError(err: unknown, level?: number): string { + void err; + void level; + return ""; } diff --git a/lending/src/sdk/models/index.ts b/lending/src/sdk/models/index.ts new file mode 100644 index 000000000..630bfe6de --- /dev/null +++ b/lending/src/sdk/models/index.ts @@ -0,0 +1,499 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './Account'; +export * from './shared/accountbalance'; +export * from './shared/accountbalanceamounts'; +export * from './shared/accountcategoriesupdatedwebhook'; +export * from './shared/accountcategoriesupdatedwebhookdata'; +export * from './shared/accountcategorylevel'; +export * from './shared/accountidentifiertype'; +export * from './shared/accountidentifiers'; +export * from './shared/accountinfo'; +export * from './shared/accountinstitution'; +export * from './shared/accountprototype'; +export * from './shared/accountref'; +export * from './shared/accountstatus'; +export * from './shared/accounttransactionline'; +export * from './shared/accounttransactionlinerecordref'; +export * from './shared/accountingaccount'; +export * from './shared/accountingaccounttransaction'; +export * from './shared/accountingaccounttransactions'; +export * from './shared/accountingaccounts'; +export * from './shared/accountingaddress'; +export * from './shared/accountingaddresstype'; +export * from './shared/accountingagedcreditorreport'; +export * from './shared/accountingageddebtorreport'; +export * from './shared/accountingattachment'; +export * from './shared/accountingbalancesheet'; +export * from './shared/accountingbankaccount'; +export * from './shared/accountingbankaccounttype'; +export * from './shared/accountingbankaccounts'; +export * from './shared/accountingbanktransaction'; +export * from './shared/accountingbanktransactions'; +export * from './shared/accountingbill'; +export * from './shared/accountingbillcreditnote'; +export * from './shared/accountingbillcreditnotes'; +export * from './shared/accountingbillpayment'; +export * from './AccountingBillPaymentAllOfPaymentMethodRef'; +export * from './AccountingBillPaymentAllOfSupplierRef'; +export * from './shared/accountingbillpayments'; +export * from './shared/accountingbills'; +export * from './shared/accountingcashflowstatement'; +export * from './shared/accountingcompanyinfo'; +export * from './shared/accountingcreateaccountresponse'; +export * from './AccountingCreateAccountResponseAllOfData'; +export * from './shared/accountingcreatebankaccountresponse'; +export * from './AccountingCreateBankAccountResponseAllOfData'; +export * from './shared/accountingcreatebanktransactions'; +export * from './shared/accountingcreatebanktransactionsresponse'; +export * from './AccountingCreateBankTransactionsResponseAllOfData'; +export * from './shared/accountingcreatedirectcostresponse'; +export * from './AccountingCreateDirectCostResponseAllOfData'; +export * from './shared/accountingcreatepaymentresponse'; +export * from './AccountingCreatePaymentResponseAllOfData'; +export * from './shared/accountingcreatesupplierresponse'; +export * from './AccountingCreateSupplierResponseAllOfData'; +export * from './shared/accountingcreatetransferresponse'; +export * from './AccountingCreateTransferResponseAllOfData'; +export * from './shared/accountingcreditnote'; +export * from './shared/accountingcreditnotes'; +export * from './shared/accountingcustomer'; +export * from './shared/accountingcustomerref'; +export * from './shared/accountingcustomers'; +export * from './shared/accountingdirectcost'; +export * from './shared/accountingdirectcosts'; +export * from './shared/accountingdirectincome'; +export * from './shared/accountingdirectincomes'; +export * from './shared/accountinginvoice'; +export * from './shared/accountinginvoices'; +export * from './shared/accountingjournal'; +export * from './shared/accountingjournalentries'; +export * from './shared/accountingjournalentry'; +export * from './shared/accountingjournals'; +export * from './shared/accountingpayment'; +export * from './shared/accountingpaymentallocation'; +export * from './AccountingPaymentAllocationAllocation'; +export * from './AccountingPaymentMethod'; +export * from './shared/accountingpayments'; +export * from './shared/accountingprofitandlossreport'; +export * from './shared/accountingrecordref'; +export * from './shared/accountingsupplier'; +export * from './shared/accountingsuppliers'; +export * from './AccountingTrackingCategory'; +export * from './shared/accountingtransfer'; +export * from './shared/accountingtransfers'; +export * from './shared/accounts'; +export * from './shared/accountspayabletracking'; +export * from './shared/accountsreceivabletracking'; +export * from './shared/agedcreditor'; +export * from './shared/agedcurrencyoutstanding'; +export * from './shared/ageddebtor'; +export * from './shared/agedoutstandingamount'; +export * from './shared/agedoutstandingamountdetail'; +export * from './shared/attachments'; +export * from './shared/balancesheet'; +export * from './BankAccountPrototype'; +export * from './shared/bankaccountref'; +export * from './shared/bankaccountstatus'; +export * from './shared/bankfeedbankaccountmapping'; +export * from './shared/bankfeedbankaccountmappingresponse'; +export * from './shared/bankfeedmapping'; +export * from './shared/bankstatementuploadconfiguration'; +export * from './shared/banktransactiontype'; +export * from './shared/bankingaccount'; +export * from './shared/bankingaccountbalance'; +export * from './shared/bankingaccountbalances'; +export * from './shared/bankingaccounts'; +export * from './shared/bankingtransaction'; +export * from './shared/bankingtransactioncategories'; +export * from './shared/bankingtransactioncategory'; +export * from './shared/bankingtransactionref'; +export * from './shared/bankingtransactions'; +export * from './shared/billcreditnotelineitem'; +export * from './shared/billcreditnotestatus'; +export * from './shared/billlineitem'; +export * from './BillLineItemPurchaseOrderLineRef'; +export * from './shared/billpaymentline'; +export * from './shared/billpaymentlinelink'; +export * from './shared/billpaymentlinelinktype'; +export * from './shared/billstatus'; +export * from './shared/billedtotype'; +export * from './shared/billedtotype1'; +export * from './shared/cashflowstatement'; +export * from './shared/cashflowtransaction'; +export * from './CategorizedBankStatementAccounts'; +export * from './CategorizedBankStatementTransactions'; +export * from './shared/clientratelimitwebhook'; +export * from './shared/clientratelimitwebhookpayload'; +export * from './shared/commerceaddress'; +export * from './shared/commerceaddresstype'; +export * from './shared/commercecompanyinfo'; +export * from './shared/commercecustomer'; +export * from './shared/commercecustomerref'; +export * from './shared/commercecustomers'; +export * from './shared/commercedispute'; +export * from './shared/commercedisputes'; +export * from './shared/commercelocation'; +export * from './shared/commercelocations'; +export * from './shared/commerceorder'; +export * from './shared/commerceorders'; +export * from './shared/commercepayment'; +export * from './shared/commercepaymentmethod'; +export * from './shared/commercepaymentmethods'; +export * from './shared/commercepayments'; +export * from './shared/commerceproduct'; +export * from './shared/commerceproductcategories'; +export * from './shared/commerceproductcategory'; +export * from './shared/commerceproducts'; +export * from './shared/commercerecordref'; +export * from './shared/commercereport'; +export * from './shared/commercereportcomponent'; +export * from './shared/commercereportdimension'; +export * from './shared/commercereportdimensionitems'; +export * from './shared/commercereporterror'; +export * from './shared/commercereportmeasure'; +export * from './CommerceTaxComponent'; +export * from './shared/commercetransaction'; +export * from './shared/commercetransactions'; +export * from './shared/companies'; +export * from './shared/company'; +export * from './CompanyDetails'; +export * from './shared/companyreference'; +export * from './shared/companyreferencelinks'; +export * from './shared/companyrequestbody'; +export * from './shared/companyupdaterequest'; +export * from './shared/connection'; +export * from './shared/connections'; +export * from './shared/contact'; +export * from './shared/contactref'; +export * from './shared/contactreference'; +export * from './shared/createbankaccounttransaction'; +export * from './operations/createconnectionrequestbody'; +export * from './CreateSourceAccount200Response'; +export * from './operations/createsourceaccountrequestbody'; +export * from './CreatedDate'; +export * from './shared/creditnotelineitem'; +export * from './shared/creditnotestatus'; +export * from './shared/customerstatus'; +export * from './shared/dataconnectionerror'; +export * from './shared/dataconnectionstatus'; +export * from './shared/dataintegrityamounts'; +export * from './shared/dataintegritybyamount'; +export * from './shared/dataintegritybycount'; +export * from './shared/dataintegrityconnectionid'; +export * from './shared/dataintegritydates'; +export * from './shared/dataintegritydetail'; +export * from './shared/dataintegritydetails'; +export * from './shared/dataintegritymatch'; +export * from './shared/dataintegritystatus'; +export * from './shared/dataintegritystatusinfo'; +export * from './shared/dataintegritystatuses'; +export * from './shared/dataintegritysummaries'; +export * from './shared/dataintegritysummary'; +export * from './DataIntegrityType'; +export * from './shared/datasource'; +export * from './shared/datastatus'; +export * from './DataStatuses'; +export * from './shared/datatype'; +export * from './shared/directcostlineitem'; +export * from './shared/directcostprototype'; +export * from './shared/directincomelineitem'; +export * from './shared/disputestatus'; +export * from './shared/enduploadsessionrequest'; +export * from './shared/enhancedcashflowitem'; +export * from './shared/enhancedcashflowtransactions'; +export * from './shared/enhancedfinancialreport'; +export * from './shared/enhancedinvoicereportitem'; +export * from './shared/enhancedinvoicesreport'; +export * from './shared/enhancedreportaccountcategory'; +export * from './shared/enhancedreportinfo'; +export * from './ErrorMessage'; +export * from './shared/errorvalidation'; +export * from './shared/errorvalidationitem'; +export * from './shared/excelreporttypes'; +export * from './shared/excelstatus'; +export * from './FinancialSummary'; +export * from './FinancialSummaryAccountingScore'; +export * from './FinancialSummaryBooksClosedDate'; +export * from './GetReportStatusReportIdParameter'; +export * from './shared/halref'; +export * from './shared/integritystatus'; +export * from './shared/invoicelineitem'; +export * from './shared/invoicestatus'; +export * from './shared/itemref'; +export * from './shared/itemreference'; +export * from './shared/items'; +export * from './shared/journalentryrecordref'; +export * from './shared/journalline'; +export * from './shared/journallinetracking'; +export * from './JournalPrototype'; +export * from './shared/journalref'; +export * from './shared/journalstatus'; +export * from './shared/lendingcustomerref'; +export * from './shared/links'; +export * from './shared/loanref'; +export * from './shared/loansummary'; +export * from './shared/loansummaryintegrationtype'; +export * from './shared/loansummaryrecordref'; +export * from './shared/loansummaryrecordreftype'; +export * from './shared/loansummaryreportinfo'; +export * from './shared/loansummaryreportitem'; +export * from './shared/loantransactions'; +export * from './shared/loantransactionsreportinfo'; +export * from './shared/locationref'; +export * from './shared/metadata'; +export * from './Model0'; +export * from './Model3'; +export * from './ModelFile'; +export * from './shared/orderdiscountallocation'; +export * from './shared/orderlineitem'; +export * from './PagingInfo'; +export * from './shared/payment'; +export * from './shared/paymentallocationpayment'; +export * from './shared/paymentline'; +export * from './shared/paymentlinelink'; +export * from './shared/paymentlinktype'; +export * from './shared/paymentmethodref'; +export * from './PaymentMethodType'; +export * from './shared/paymentref'; +export * from './shared/paymentstatus'; +export * from './shared/paymenttype'; +export * from './shared/phonenumber'; +export * from './shared/productinventory'; +export * from './shared/productinventorylocation'; +export * from './shared/productprice'; +export * from './shared/productref'; +export * from './shared/productvariant'; +export * from './shared/productvariantref'; +export * from './shared/productvariantstatus'; +export * from './shared/profitandlossreport'; +export * from './shared/projectref'; +export * from './shared/pulloperation'; +export * from './shared/pulloperations'; +export * from './shared/purchaseorderreference'; +export * from './shared/pushchangetype'; +export * from './shared/pushfieldvalidation'; +export * from './shared/pushoperation'; +export * from './shared/pushoperationchange'; +export * from './shared/pushoperationref'; +export * from './shared/pushoperationstatus'; +export * from './shared/pushoperations'; +export * from './shared/pushoption'; +export * from './shared/pushoptionchoice'; +export * from './shared/pushoptionproperty'; +export * from './shared/pushoptiontype'; +export * from './shared/pushvalidationinfo'; +export * from './shared/recordlinereference'; +export * from './shared/reportbasis'; +export * from './shared/reportcomponentmeasure'; +export * from './shared/reportinfo'; +export * from './shared/reportinput'; +export * from './shared/reportitem'; +export * from './shared/reportitems'; +export * from './shared/reportline'; +export * from './shared/reportoperation'; +export * from './shared/reportsourcereference'; +export * from './shared/reports'; +export * from './shared/routinginfo'; +export * from './shared/salesorderreference'; +export * from './shared/servicecharge'; +export * from './shared/servicechargetype'; +export * from './shared/sourceaccount'; +export * from './shared/sourceaccountprototype'; +export * from './shared/sourceaccountv2'; +export * from './shared/sourceaccountv2prototype'; +export * from './shared/sourceref'; +export * from './shared/startuploadsessionrequest'; +export * from './shared/status'; +export * from './shared/supplementaldata'; +export * from './shared/supplierref'; +export * from './shared/supplierstatus'; +export * from './shared/targetaccountoption'; +export * from './shared/taxcomponentallocation'; +export * from './shared/taxcomponentref'; +export * from './shared/taxrateref'; +export * from './shared/taxratereference'; +export * from './shared/tracking'; +export * from './shared/trackingcategoryref'; +export * from './shared/trackingrecordref'; +export * from './shared/transactioncategory'; +export * from './shared/transactioncategoryref'; +export * from './shared/transactioncategorystatus'; +export * from './shared/transactioncode'; +export * from './shared/transactionsourceref'; +export * from './shared/transactionsourcetype'; +export * from './shared/transactiontype'; +export * from './shared/transferaccount'; +export * from './UpdateConnection'; +export * from './operations/uploadbankstatementdatarequestbody'; +export * from './shared/validdatatypelinks'; +export * from './shared/validation'; +export * from './shared/validationitem'; +export * from './shared/weblink'; +export * from './shared/withholdingtax'; +export * from './shared/codatfile'; +export * from './shared/fileupload'; +export * from './_speakeasy_enums'; +export * from './_speakeasy_hoisted'; +export * from './shared/schema'; +export * from './shared/reportgenerationpayload'; +export type { Security } from '../../lib/sdkconfig'; + +export type { ListCompaniesRequest } from './operations/listcompanies'; +export type { GetCompanyRequest } from './operations/getcompany'; +export type { ReplaceCompanyRequest } from './operations/replacecompany'; +export type { UpdateCompanyRequest } from './operations/updatecompany'; +export type { DeleteCompanyRequest } from './operations/deletecompany'; +export type { ListConnectionsRequest } from './operations/listconnections'; +export type { CreateConnectionRequest } from './operations/createconnection'; +export type { GetConnectionRequest } from './operations/getconnection'; +export type { UnlinkConnectionRequest } from './operations/unlinkconnection'; +export type { DeleteConnectionRequest } from './operations/deleteconnection'; +export type { RefreshAllDataTypesRequest } from './operations/refreshalldatatypes'; +export type { GetDataStatusRequest } from './operations/getdatastatus'; +export type { RefreshDataTypeRequest } from './operations/refreshdatatype'; +export type { ListPullOperationsRequest } from './operations/listpulloperations'; +export type { GetPullOperationRequest } from './operations/getpulloperation'; +export type { GetDataIntegrityStatusRequest } from './operations/getdataintegritystatus'; +export type { GetDataIntegritySummariesRequest } from './operations/getdataintegritysummaries'; +export type { ListDataIntegrityDetailsRequest } from './operations/listdataintegritydetails'; +export type { GetCategorizedProfitAndLossStatementRequest } from './operations/getcategorizedprofitandlossstatement'; +export type { GetCategorizedBalanceSheetStatementRequest } from './operations/getcategorizedbalancesheetstatement'; +export type { GetCategorizedBankStatementRequest } from './operations/getcategorizedbankstatement'; +export type { ListReconciledInvoicesRequest } from './operations/listreconciledinvoices'; +export type { ListLoanTransactionsRequest } from './operations/listloantransactions'; +export type { GenerateLoanTransactionsRequest } from './operations/generateloantransactions'; +export type { GetLoanSummaryRequest } from './operations/getloansummary'; +export type { GenerateLoanSummaryRequest } from './operations/generateloansummary'; +export type { GetCommerceRevenueMetricsRequest } from './operations/getcommercerevenuemetrics'; +export type { GetCommerceOrdersReportRequest } from './operations/getcommerceordersreport'; +export type { GetCommerceRefundsReportRequest } from './operations/getcommercerefundsreport'; +export type { GetCommerceCustomerRetentionMetricsRequest } from './operations/getcommercecustomerretentionmetrics'; +export type { GetCommerceLifetimeValueMetricsRequest } from './operations/getcommercelifetimevaluemetrics'; +export type { GetExcelReportGenerationStatusRequest } from './operations/getexcelreportgenerationstatus'; +export type { GenerateExcelReportRequest } from './operations/generateexcelreport'; +export type { DownloadExcelReportRequest } from './operations/downloadexcelreport'; +export type { ListAccountingAccountTransactionsRequest } from './operations/listaccountingaccounttransactions'; +export type { GetAccountingAccountTransactionRequest } from './operations/getaccountingaccounttransaction'; +export type { ListAccountingAccountsRequest } from './operations/listaccountingaccounts'; +export type { GetAccountingAccountRequest } from './operations/getaccountingaccount'; +export type { ListAccountingBillCreditNotesRequest } from './operations/listaccountingbillcreditnotes'; +export type { GetAccountingBillCreditNoteRequest } from './operations/getaccountingbillcreditnote'; +export type { ListAccountingBillPaymentsRequest } from './operations/listaccountingbillpayments'; +export type { GetAccountingBillPaymentRequest } from './operations/getaccountingbillpayment'; +export type { ListAccountingBillsRequest } from './operations/listaccountingbills'; +export type { GetAccountingBillRequest } from './operations/getaccountingbill'; +export type { ListAccountingBillAttachmentsRequest } from './operations/listaccountingbillattachments'; +export type { GetAccountingBillAttachmentRequest } from './operations/getaccountingbillattachment'; +export type { DownloadAccountingBillAttachmentRequest } from './operations/downloadaccountingbillattachment'; +export type { ListAccountingCreditNotesRequest } from './operations/listaccountingcreditnotes'; +export type { GetAccountingCreditNoteRequest } from './operations/getaccountingcreditnote'; +export type { ListAccountingCustomersRequest } from './operations/listaccountingcustomers'; +export type { GetAccountingCustomerRequest } from './operations/getaccountingcustomer'; +export type { ListAccountingCustomerAttachmentsRequest } from './operations/listaccountingcustomerattachments'; +export type { GetAccountingCustomerAttachmentRequest } from './operations/getaccountingcustomerattachment'; +export type { DownloadAccountingCustomerAttachmentRequest } from './operations/downloadaccountingcustomerattachment'; +export type { ListAccountingDirectCostsRequest } from './operations/listaccountingdirectcosts'; +export type { GetAccountingDirectCostRequest } from './operations/getaccountingdirectcost'; +export type { GetAccountingDirectCostAttachmentRequest } from './operations/getaccountingdirectcostattachment'; +export type { DownloadAccountingDirectCostAttachmentRequest } from './operations/downloadaccountingdirectcostattachment'; +export type { ListAccountingDirectCostAttachmentsRequest } from './operations/listaccountingdirectcostattachments'; +export type { ListAccountingDirectIncomesRequest } from './operations/listaccountingdirectincomes'; +export type { GetAccountingDirectIncomeRequest } from './operations/getaccountingdirectincome'; +export type { GetAccountingDirectIncomeAttachmentRequest } from './operations/getaccountingdirectincomeattachment'; +export type { DownloadAccountingDirectIncomeAttachmentRequest } from './operations/downloadaccountingdirectincomeattachment'; +export type { ListAccountingDirectIncomeAttachmentsRequest } from './operations/listaccountingdirectincomeattachments'; +export type { GetAccountingProfileRequest } from './operations/getaccountingprofile'; +export type { ListAccountingInvoicesRequest } from './operations/listaccountinginvoices'; +export type { GetAccountingInvoiceRequest } from './operations/getaccountinginvoice'; +export type { DownloadAccountingInvoicePdfRequest } from './operations/downloadaccountinginvoicepdf'; +export type { ListAccountingInvoiceAttachmentsRequest } from './operations/listaccountinginvoiceattachments'; +export type { GetAccountingInvoiceAttachmentRequest } from './operations/getaccountinginvoiceattachment'; +export type { DownloadAccountingInvoiceAttachmentRequest } from './operations/downloadaccountinginvoiceattachment'; +export type { ListAccountingJournalEntriesRequest } from './operations/listaccountingjournalentries'; +export type { GetAccountingJournalEntryRequest } from './operations/getaccountingjournalentry'; +export type { ListAccountingJournalsRequest } from './operations/listaccountingjournals'; +export type { GetAccountingJournalRequest } from './operations/getaccountingjournal'; +export type { ListAccountingPaymentsRequest } from './operations/listaccountingpayments'; +export type { GetAccountingPaymentRequest } from './operations/getaccountingpayment'; +export type { ListAccountingSuppliersRequest } from './operations/listaccountingsuppliers'; +export type { GetAccountingSupplierRequest } from './operations/getaccountingsupplier'; +export type { ListAccountingSupplierAttachmentsRequest } from './operations/listaccountingsupplierattachments'; +export type { GetAccountingSupplierAttachmentRequest } from './operations/getaccountingsupplierattachment'; +export type { DownloadAccountingSupplierAttachmentRequest } from './operations/downloadaccountingsupplierattachment'; +export type { ListAccountingTransfersRequest } from './operations/listaccountingtransfers'; +export type { GetAccountingTransferRequest } from './operations/getaccountingtransfer'; +export type { ListAccountingBankAccountsRequest } from './operations/listaccountingbankaccounts'; +export type { GetAccountingBankAccountRequest } from './operations/getaccountingbankaccount'; +export type { ListAccountingBankAccountTransactionsRequest } from './operations/listaccountingbankaccounttransactions'; +export type { IsAgedDebtorsReportAvailableRequest } from './operations/isageddebtorsreportavailable'; +export type { GetAccountingAgedDebtorsReportRequest } from './operations/getaccountingageddebtorsreport'; +export type { IsAgedCreditorsReportAvailableRequest } from './operations/isagedcreditorsreportavailable'; +export type { GetAccountingAgedCreditorsReportRequest } from './operations/getaccountingagedcreditorsreport'; +export type { GetAccountingBalanceSheetRequest } from './operations/getaccountingbalancesheet'; +export type { GetAccountingProfitAndLossRequest } from './operations/getaccountingprofitandloss'; +export type { GetAccountingCashFlowStatementRequest } from './operations/getaccountingcashflowstatement'; +export type { ListBankingAccountBalancesRequest } from './operations/listbankingaccountbalances'; +export type { ListBankingAccountsRequest } from './operations/listbankingaccounts'; +export type { GetBankingAccountRequest } from './operations/getbankingaccount'; +export type { ListBankingTransactionsRequest } from './operations/listbankingtransactions'; +export type { GetBankingTransactionRequest } from './operations/getbankingtransaction'; +export type { ListBankingTransactionCategoriesRequest } from './operations/listbankingtransactioncategories'; +export type { GetBankingTransactionCategoryRequest } from './operations/getbankingtransactioncategory'; +export type { ListCommerceCustomersRequest } from './operations/listcommercecustomers'; +export type { GetCommerceCustomerRequest } from './operations/getcommercecustomer'; +export type { ListCommerceDisputesRequest } from './operations/listcommercedisputes'; +export type { GetCommerceDisputeRequest } from './operations/getcommercedispute'; +export type { GetCommerceProfileRequest } from './operations/getcommerceprofile'; +export type { ListCommerceLocationsRequest } from './operations/listcommercelocations'; +export type { GetCommerceLocationRequest } from './operations/getcommercelocation'; +export type { ListCommerceOrdersRequest } from './operations/listcommerceorders'; +export type { GetCommerceOrderRequest } from './operations/getcommerceorder'; +export type { ListCommercePaymentMethodsRequest } from './operations/listcommercepaymentmethods'; +export type { GetCommercePaymentMethodRequest } from './operations/getcommercepaymentmethod'; +export type { ListCommercePaymentsRequest } from './operations/listcommercepayments'; +export type { GetCommercePaymentRequest } from './operations/getcommercepayment'; +export type { ListCommerceProductCategoriesRequest } from './operations/listcommerceproductcategories'; +export type { GetCommerceProductCategoryRequest } from './operations/getcommerceproductcategory'; +export type { ListCommerceProductsRequest } from './operations/listcommerceproducts'; +export type { GetCommerceProductRequest } from './operations/getcommerceproduct'; +export type { ListCommerceTransactionsRequest } from './operations/listcommercetransactions'; +export type { GetCommerceTransactionRequest } from './operations/getcommercetransaction'; +export type { ListFilesRequest } from './operations/listfiles'; +export type { DownloadFilesRequest } from './operations/downloadfiles'; +export type { UploadFilesRequest } from './operations/uploadfiles'; +export type { GetCreateUpdateBankAccountsModelRequest } from './operations/getcreateupdatebankaccountsmodel'; +export type { CreateBankAccountRequest } from './operations/createbankaccount'; +export type { GetCreateChartOfAccountsModelRequest } from './operations/getcreatechartofaccountsmodel'; +export type { CreateAccountRequest } from './operations/createaccount'; +export type { CreateSourceAccountRequest } from './operations/createsourceaccount'; +export type { GetBankAccountMappingRequest } from './operations/getbankaccountmapping'; +export type { CreateBankAccountMappingRequest } from './operations/createbankaccountmapping'; +export type { GetCreateUpdateSuppliersModelRequest } from './operations/getcreateupdatesuppliersmodel'; +export type { CreateSupplierRequest } from './operations/createsupplier'; +export type { GetCreateTransfersModelRequest } from './operations/getcreatetransfersmodel'; +export type { CreateTransferRequest } from './operations/createtransfer'; +export type { GetCreateBankTransactionsModelRequest } from './operations/getcreatebanktransactionsmodel'; +export type { CreateBankTransactionsRequest } from './operations/createbanktransactions'; +export type { GetCreateDirectCostsModelRequest } from './operations/getcreatedirectcostsmodel'; +export type { CreateDirectCostRequest } from './operations/createdirectcost'; +export type { GetCreatePaymentModelRequest } from './operations/getcreatepaymentmodel'; +export type { CreatePaymentRequest } from './operations/createpayment'; +export type { GetCreateOperationRequest } from './operations/getcreateoperation'; +export type { ListCreateOperationsRequest } from './operations/listcreateoperations'; +export type { GetBankStatementUploadConfigurationRequest } from './operations/getbankstatementuploadconfiguration'; +export type { SetBankStatementUploadConfigurationRequest } from './operations/setbankstatementuploadconfiguration'; +export type { StartBankStatementUploadSessionRequest } from './operations/startbankstatementuploadsession'; +export type { UploadBankStatementDataRequest } from './operations/uploadbankstatementdata'; +export type { EndBankStatementUploadSessionRequest } from './operations/endbankstatementuploadsession'; +export type { GenerateReportRequest } from './operations/generatereport'; +export type { GetReportStatusRequest } from './GetReportStatusRequest'; +export type { GetCategorizedBankStatementTransactionsRequest } from './GetCategorizedBankStatementTransactionsRequest'; +export type { ListCategorizedBankStatementAccountsRequest } from './ListCategorizedBankStatementAccountsRequest'; +export type { DownloadCategorizedBankStatementExcelRequest } from './DownloadCategorizedBankStatementExcelRequest'; +export type { DownloadCreditModelExcelRequest } from './DownloadCreditModelExcelRequest'; +export type { ListReportsRequest } from './operations/listreports'; +export type { GetFinancialSummaryRequest } from './GetFinancialSummaryRequest'; + +export * as operations from './operations'; +export * as shared from './shared'; diff --git a/lending/src/sdk/models/operations/createaccount.ts b/lending/src/sdk/models/operations/createaccount.ts index d8d3f68e1..e54daa854 100644 --- a/lending/src/sdk/models/operations/createaccount.ts +++ b/lending/src/sdk/models/operations/createaccount.ts @@ -1,56 +1,12 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { AccountPrototype } from '../shared/accountprototype'; +/* eslint-disable */ -export type CreateAccountRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Time limit for the push operation to complete before it is timed out. - */ - timeoutInMinutes?: number | undefined; - /** - * Allow a sync upon push completion. - */ - allowSyncOnPushComplete?: boolean | undefined; - accountPrototype?: shared.AccountPrototype | undefined; -}; - -/** @internal */ -export type CreateAccountRequest$Outbound = { - companyId: string; - connectionId: string; - timeoutInMinutes?: number | undefined; - allowSyncOnPushComplete: boolean; - accountPrototype?: shared.AccountPrototype$Outbound | undefined; -}; - -/** @internal */ -export const CreateAccountRequest$outboundSchema: z.ZodType< - CreateAccountRequest$Outbound, - z.ZodTypeDef, - CreateAccountRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - accountPrototype: shared.AccountPrototype$outboundSchema.optional(), -}); - -export function createAccountRequestToJSON( - createAccountRequest: CreateAccountRequest, -): string { - return JSON.stringify( - CreateAccountRequest$outboundSchema.parse(createAccountRequest), - ); +export interface CreateAccountRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountPrototype?: AccountPrototype | undefined; } diff --git a/lending/src/sdk/models/operations/createbankaccount.ts b/lending/src/sdk/models/operations/createbankaccount.ts index c2108cc2b..29608530b 100644 --- a/lending/src/sdk/models/operations/createbankaccount.ts +++ b/lending/src/sdk/models/operations/createbankaccount.ts @@ -1,65 +1,12 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { AccountingBankAccount } from '../shared/accountingbankaccount'; +/* eslint-disable */ -export type CreateBankAccountRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Time limit for the push operation to complete before it is timed out. - */ - timeoutInMinutes?: number | undefined; - /** - * Allow a sync upon push completion. - */ - allowSyncOnPushComplete?: boolean | undefined; - accountingBankAccount?: shared.AccountingBankAccount | null | undefined; -}; - -/** @internal */ -export type CreateBankAccountRequest$Outbound = { - companyId: string; - connectionId: string; - timeoutInMinutes?: number | undefined; - allowSyncOnPushComplete: boolean; - AccountingBankAccount?: - | shared.AccountingBankAccount$Outbound - | null - | undefined; -}; - -/** @internal */ -export const CreateBankAccountRequest$outboundSchema: z.ZodType< - CreateBankAccountRequest$Outbound, - z.ZodTypeDef, - CreateBankAccountRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - accountingBankAccount: z.nullable(shared.AccountingBankAccount$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - accountingBankAccount: "AccountingBankAccount", - }); -}); - -export function createBankAccountRequestToJSON( - createBankAccountRequest: CreateBankAccountRequest, -): string { - return JSON.stringify( - CreateBankAccountRequest$outboundSchema.parse(createBankAccountRequest), - ); +export interface CreateBankAccountRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingBankAccount?: AccountingBankAccount | undefined; } diff --git a/lending/src/sdk/models/operations/createbankaccountmapping.ts b/lending/src/sdk/models/operations/createbankaccountmapping.ts index a6b45b09f..0befc17b5 100644 --- a/lending/src/sdk/models/operations/createbankaccountmapping.ts +++ b/lending/src/sdk/models/operations/createbankaccountmapping.ts @@ -1,54 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { BankFeedBankAccountMapping } from '../shared/bankfeedbankaccountmapping'; +/* eslint-disable */ -export type CreateBankAccountMappingRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - bankFeedBankAccountMapping?: shared.BankFeedBankAccountMapping | undefined; -}; - -/** @internal */ -export type CreateBankAccountMappingRequest$Outbound = { - companyId: string; - connectionId: string; - BankFeedBankAccountMapping?: - | shared.BankFeedBankAccountMapping$Outbound - | undefined; -}; - -/** @internal */ -export const CreateBankAccountMappingRequest$outboundSchema: z.ZodType< - CreateBankAccountMappingRequest$Outbound, - z.ZodTypeDef, - CreateBankAccountMappingRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - bankFeedBankAccountMapping: shared.BankFeedBankAccountMapping$outboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - bankFeedBankAccountMapping: "BankFeedBankAccountMapping", - }); -}); - -export function createBankAccountMappingRequestToJSON( - createBankAccountMappingRequest: CreateBankAccountMappingRequest, -): string { - return JSON.stringify( - CreateBankAccountMappingRequest$outboundSchema.parse( - createBankAccountMappingRequest, - ), - ); +export interface CreateBankAccountMappingRequest { + companyId: string; + connectionId: string; + bankFeedBankAccountMapping?: BankFeedBankAccountMapping | undefined; } diff --git a/lending/src/sdk/models/operations/createbanktransactions.ts b/lending/src/sdk/models/operations/createbanktransactions.ts index 23214e2fa..221921980 100644 --- a/lending/src/sdk/models/operations/createbanktransactions.ts +++ b/lending/src/sdk/models/operations/createbanktransactions.ts @@ -1,74 +1,13 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; - -export type CreateBankTransactionsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an account. - */ - accountId: string; - /** - * Time limit for the push operation to complete before it is timed out. - */ - timeoutInMinutes?: number | undefined; - /** - * Allow a sync upon push completion. - */ - allowSyncOnPushComplete?: boolean | undefined; - accountingCreateBankTransactions?: - | shared.AccountingCreateBankTransactions - | undefined; -}; - -/** @internal */ -export type CreateBankTransactionsRequest$Outbound = { - companyId: string; - connectionId: string; - accountId: string; - timeoutInMinutes?: number | undefined; - allowSyncOnPushComplete: boolean; - AccountingCreateBankTransactions?: - | shared.AccountingCreateBankTransactions$Outbound - | undefined; -}; - -/** @internal */ -export const CreateBankTransactionsRequest$outboundSchema: z.ZodType< - CreateBankTransactionsRequest$Outbound, - z.ZodTypeDef, - CreateBankTransactionsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - accountId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - accountingCreateBankTransactions: shared - .AccountingCreateBankTransactions$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - accountingCreateBankTransactions: "AccountingCreateBankTransactions", - }); -}); - -export function createBankTransactionsRequestToJSON( - createBankTransactionsRequest: CreateBankTransactionsRequest, -): string { - return JSON.stringify( - CreateBankTransactionsRequest$outboundSchema.parse( - createBankTransactionsRequest, - ), - ); +/* tslint:disable */ + +import type { AccountingCreateBankTransactions } from '../shared/accountingcreatebanktransactions'; +/* eslint-disable */ + +export interface CreateBankTransactionsRequest { + companyId: string; + connectionId: string; + accountId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingCreateBankTransactions?: AccountingCreateBankTransactions | undefined; } diff --git a/lending/src/sdk/models/operations/createconnection.ts b/lending/src/sdk/models/operations/createconnection.ts index dc5bcac12..99117b45a 100644 --- a/lending/src/sdk/models/operations/createconnection.ts +++ b/lending/src/sdk/models/operations/createconnection.ts @@ -1,74 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; +import type { CreateConnectionRequestBody } from './createconnectionrequestbody'; +/* eslint-disable */ -export type CreateConnectionRequestBody = { - /** - * A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys. - */ - platformKey?: string | undefined; -}; - -export type CreateConnectionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - requestBody?: CreateConnectionRequestBody | undefined; -}; - -/** @internal */ -export type CreateConnectionRequestBody$Outbound = { - platformKey?: string | undefined; -}; - -/** @internal */ -export const CreateConnectionRequestBody$outboundSchema: z.ZodType< - CreateConnectionRequestBody$Outbound, - z.ZodTypeDef, - CreateConnectionRequestBody -> = z.object({ - platformKey: z.string().optional(), -}); - -export function createConnectionRequestBodyToJSON( - createConnectionRequestBody: CreateConnectionRequestBody, -): string { - return JSON.stringify( - CreateConnectionRequestBody$outboundSchema.parse( - createConnectionRequestBody, - ), - ); -} - -/** @internal */ -export type CreateConnectionRequest$Outbound = { - companyId: string; - RequestBody?: CreateConnectionRequestBody$Outbound | undefined; -}; - -/** @internal */ -export const CreateConnectionRequest$outboundSchema: z.ZodType< - CreateConnectionRequest$Outbound, - z.ZodTypeDef, - CreateConnectionRequest -> = z.object({ - companyId: z.string(), - requestBody: z.lazy(() => CreateConnectionRequestBody$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); -}); - -export function createConnectionRequestToJSON( - createConnectionRequest: CreateConnectionRequest, -): string { - return JSON.stringify( - CreateConnectionRequest$outboundSchema.parse(createConnectionRequest), - ); +export interface CreateConnectionRequest { + companyId: string; + requestBody?: CreateConnectionRequestBody | undefined; } diff --git a/lending/src/sdk/models/operations/createconnectionrequestbody.ts b/lending/src/sdk/models/operations/createconnectionrequestbody.ts new file mode 100644 index 000000000..d7bf74b2c --- /dev/null +++ b/lending/src/sdk/models/operations/createconnectionrequestbody.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface CreateConnectionRequestBody + */ +export interface CreateConnectionRequestBody { + /** + * A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys. + * @type {string} + * @memberof CreateConnectionRequestBody + */ + platformKey?: string; +} + +/** + * Check if a given object implements the CreateConnectionRequestBody interface. + */ +export function instanceOfCreateConnectionRequestBody(value: object): value is CreateConnectionRequestBody { + return true; +} + +export function CreateConnectionRequestBodyFromJSON(json: any): CreateConnectionRequestBody { + return CreateConnectionRequestBodyFromJSONTyped(json, false); +} + +export function CreateConnectionRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateConnectionRequestBody { + if (json == null) { + return json; + } + return { + + 'platformKey': json['platformKey'] == null ? undefined : json['platformKey'], + }; +} + +export function CreateConnectionRequestBodyToJSON(json: any): CreateConnectionRequestBody { + return CreateConnectionRequestBodyToJSONTyped(json, false); +} + +export function CreateConnectionRequestBodyToJSONTyped(value?: CreateConnectionRequestBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'platformKey': value['platformKey'], + }; +} + + +export interface ConnectionCreateRequestBody { + /** + * A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys. + * @type {string} + * @memberof CreateConnectionRequestBody + */ + platformKey?: string; +} + +export interface CreateConnectionCreateConnectionRequestBody { + /** + * A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys. + * @type {string} + * @memberof CreateConnectionRequestBody + */ + platformKey?: string; +} diff --git a/lending/src/sdk/models/operations/createdirectcost.ts b/lending/src/sdk/models/operations/createdirectcost.ts index 54373b6fb..46f0dc113 100644 --- a/lending/src/sdk/models/operations/createdirectcost.ts +++ b/lending/src/sdk/models/operations/createdirectcost.ts @@ -1,56 +1,12 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { DirectCostPrototype } from '../shared/directcostprototype'; +/* eslint-disable */ -export type CreateDirectCostRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Time limit for the push operation to complete before it is timed out. - */ - timeoutInMinutes?: number | undefined; - /** - * Allow a sync upon push completion. - */ - allowSyncOnPushComplete?: boolean | undefined; - directCostPrototype?: shared.DirectCostPrototype | undefined; -}; - -/** @internal */ -export type CreateDirectCostRequest$Outbound = { - companyId: string; - connectionId: string; - timeoutInMinutes?: number | undefined; - allowSyncOnPushComplete: boolean; - directCostPrototype?: shared.DirectCostPrototype$Outbound | undefined; -}; - -/** @internal */ -export const CreateDirectCostRequest$outboundSchema: z.ZodType< - CreateDirectCostRequest$Outbound, - z.ZodTypeDef, - CreateDirectCostRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - directCostPrototype: shared.DirectCostPrototype$outboundSchema.optional(), -}); - -export function createDirectCostRequestToJSON( - createDirectCostRequest: CreateDirectCostRequest, -): string { - return JSON.stringify( - CreateDirectCostRequest$outboundSchema.parse(createDirectCostRequest), - ); +export interface CreateDirectCostRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + directCostPrototype?: DirectCostPrototype | undefined; } diff --git a/lending/src/sdk/models/operations/createpayment.ts b/lending/src/sdk/models/operations/createpayment.ts index ffcfbc68a..6471e6060 100644 --- a/lending/src/sdk/models/operations/createpayment.ts +++ b/lending/src/sdk/models/operations/createpayment.ts @@ -1,62 +1,12 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { AccountingPayment } from '../shared/accountingpayment'; +/* eslint-disable */ -export type CreatePaymentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Time limit for the push operation to complete before it is timed out. - */ - timeoutInMinutes?: number | undefined; - /** - * Allow a sync upon push completion. - */ - allowSyncOnPushComplete?: boolean | undefined; - accountingPayment?: shared.AccountingPayment | null | undefined; -}; - -/** @internal */ -export type CreatePaymentRequest$Outbound = { - companyId: string; - connectionId: string; - timeoutInMinutes?: number | undefined; - allowSyncOnPushComplete: boolean; - AccountingPayment?: shared.AccountingPayment$Outbound | null | undefined; -}; - -/** @internal */ -export const CreatePaymentRequest$outboundSchema: z.ZodType< - CreatePaymentRequest$Outbound, - z.ZodTypeDef, - CreatePaymentRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - accountingPayment: z.nullable(shared.AccountingPayment$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - accountingPayment: "AccountingPayment", - }); -}); - -export function createPaymentRequestToJSON( - createPaymentRequest: CreatePaymentRequest, -): string { - return JSON.stringify( - CreatePaymentRequest$outboundSchema.parse(createPaymentRequest), - ); +export interface CreatePaymentRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingPayment?: AccountingPayment | undefined; } diff --git a/lending/src/sdk/models/operations/createsourceaccount.ts b/lending/src/sdk/models/operations/createsourceaccount.ts index d0b3bc729..4c4e5bcbd 100644 --- a/lending/src/sdk/models/operations/createsourceaccount.ts +++ b/lending/src/sdk/models/operations/createsourceaccount.ts @@ -1,117 +1,16 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import * as shared from "../shared/index.js"; +import type { CreateSourceAccountRequestBody } from './createsourceaccountrequestbody'; +/* eslint-disable */ -export type CreateSourceAccountRequestBody = - | shared.SourceAccountV2Prototype - | shared.SourceAccountPrototype; - -export type CreateSourceAccountRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - requestBody?: - | shared.SourceAccountV2Prototype - | shared.SourceAccountPrototype - | undefined; -}; - -/** - * Success - */ -export type CreateSourceAccountResponseBody = - | shared.SourceAccountV2 - | shared.SourceAccount; - -/** @internal */ -export type CreateSourceAccountRequestBody$Outbound = - | shared.SourceAccountV2Prototype$Outbound - | shared.SourceAccountPrototype$Outbound; - -/** @internal */ -export const CreateSourceAccountRequestBody$outboundSchema: z.ZodType< - CreateSourceAccountRequestBody$Outbound, - z.ZodTypeDef, - CreateSourceAccountRequestBody -> = z.union([ - shared.SourceAccountV2Prototype$outboundSchema, - shared.SourceAccountPrototype$outboundSchema, -]); - -export function createSourceAccountRequestBodyToJSON( - createSourceAccountRequestBody: CreateSourceAccountRequestBody, -): string { - return JSON.stringify( - CreateSourceAccountRequestBody$outboundSchema.parse( - createSourceAccountRequestBody, - ), - ); +export interface CreateSourceAccountRequest { + companyId: string; + connectionId: string; + requestBody?: CreateSourceAccountRequestBody | undefined; } -/** @internal */ -export type CreateSourceAccountRequest$Outbound = { - companyId: string; - connectionId: string; - RequestBody?: - | shared.SourceAccountV2Prototype$Outbound - | shared.SourceAccountPrototype$Outbound - | undefined; -}; - -/** @internal */ -export const CreateSourceAccountRequest$outboundSchema: z.ZodType< - CreateSourceAccountRequest$Outbound, - z.ZodTypeDef, - CreateSourceAccountRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - requestBody: z.union([ - shared.SourceAccountV2Prototype$outboundSchema, - shared.SourceAccountPrototype$outboundSchema, - ]).optional(), -}).transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); -}); - -export function createSourceAccountRequestToJSON( - createSourceAccountRequest: CreateSourceAccountRequest, -): string { - return JSON.stringify( - CreateSourceAccountRequest$outboundSchema.parse(createSourceAccountRequest), - ); -} - -/** @internal */ -export const CreateSourceAccountResponseBody$inboundSchema: z.ZodType< - CreateSourceAccountResponseBody, - z.ZodTypeDef, - unknown -> = z.union([ - shared.SourceAccountV2$inboundSchema, - shared.SourceAccount$inboundSchema, -]); - -export function createSourceAccountResponseBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateSourceAccountResponseBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateSourceAccountResponseBody' from JSON`, - ); +export interface SourceAccountCreateRequestBody { + companyId: string; + connectionId: string; + requestBody?: CreateSourceAccountRequestBody | undefined; } diff --git a/lending/src/sdk/models/operations/createsourceaccountrequestbody.ts b/lending/src/sdk/models/operations/createsourceaccountrequestbody.ts new file mode 100644 index 000000000..b98eee7de --- /dev/null +++ b/lending/src/sdk/models/operations/createsourceaccountrequestbody.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { SourceAccountPrototype } from '../shared/sourceaccountprototype'; +import { + instanceOfSourceAccountPrototype, + SourceAccountPrototypeFromJSON, + SourceAccountPrototypeFromJSONTyped, + SourceAccountPrototypeToJSON, +} from '../shared/sourceaccountprototype'; +import type { SourceAccountV2Prototype } from '../shared/sourceaccountv2prototype'; +import { + instanceOfSourceAccountV2Prototype, + SourceAccountV2PrototypeFromJSON, + SourceAccountV2PrototypeFromJSONTyped, + SourceAccountV2PrototypeToJSON, +} from '../shared/sourceaccountv2prototype'; + +/** + * @type CreateSourceAccountRequestBody + * + * @export + */ +export type CreateSourceAccountRequestBody = SourceAccountPrototype | SourceAccountV2Prototype; + +export function CreateSourceAccountRequestBodyFromJSON(json: any): CreateSourceAccountRequestBody { + return CreateSourceAccountRequestBodyFromJSONTyped(json, false); +} + +export function CreateSourceAccountRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSourceAccountRequestBody { + if (json == null) { + return json; + } + if (instanceOfSourceAccountPrototype(json)) { + return SourceAccountPrototypeFromJSONTyped(json, true); + } + if (instanceOfSourceAccountV2Prototype(json)) { + return SourceAccountV2PrototypeFromJSONTyped(json, true); + } + + return {} as any; +} + +export function CreateSourceAccountRequestBodyToJSON(json: any): any { + return CreateSourceAccountRequestBodyToJSONTyped(json, false); +} + +export function CreateSourceAccountRequestBodyToJSONTyped(value?: CreateSourceAccountRequestBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + if (instanceOfSourceAccountPrototype(value)) { + return SourceAccountPrototypeToJSON(value as SourceAccountPrototype); + } + if (instanceOfSourceAccountV2Prototype(value)) { + return SourceAccountV2PrototypeToJSON(value as SourceAccountV2Prototype); + } + + return {}; +} + diff --git a/lending/src/sdk/models/operations/createsupplier.ts b/lending/src/sdk/models/operations/createsupplier.ts index 5d77bc506..f374ea4fd 100644 --- a/lending/src/sdk/models/operations/createsupplier.ts +++ b/lending/src/sdk/models/operations/createsupplier.ts @@ -1,62 +1,12 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { AccountingSupplier } from '../shared/accountingsupplier'; +/* eslint-disable */ -export type CreateSupplierRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Time limit for the push operation to complete before it is timed out. - */ - timeoutInMinutes?: number | undefined; - /** - * Allow a sync upon push completion. - */ - allowSyncOnPushComplete?: boolean | undefined; - accountingSupplier?: shared.AccountingSupplier | null | undefined; -}; - -/** @internal */ -export type CreateSupplierRequest$Outbound = { - companyId: string; - connectionId: string; - timeoutInMinutes?: number | undefined; - allowSyncOnPushComplete: boolean; - AccountingSupplier?: shared.AccountingSupplier$Outbound | null | undefined; -}; - -/** @internal */ -export const CreateSupplierRequest$outboundSchema: z.ZodType< - CreateSupplierRequest$Outbound, - z.ZodTypeDef, - CreateSupplierRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - accountingSupplier: z.nullable(shared.AccountingSupplier$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - accountingSupplier: "AccountingSupplier", - }); -}); - -export function createSupplierRequestToJSON( - createSupplierRequest: CreateSupplierRequest, -): string { - return JSON.stringify( - CreateSupplierRequest$outboundSchema.parse(createSupplierRequest), - ); +export interface CreateSupplierRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingSupplier?: AccountingSupplier | undefined; } diff --git a/lending/src/sdk/models/operations/createtransfer.ts b/lending/src/sdk/models/operations/createtransfer.ts index 97c85bf4f..bf04501f6 100644 --- a/lending/src/sdk/models/operations/createtransfer.ts +++ b/lending/src/sdk/models/operations/createtransfer.ts @@ -1,62 +1,12 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { AccountingTransfer } from '../shared/accountingtransfer'; +/* eslint-disable */ -export type CreateTransferRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Time limit for the push operation to complete before it is timed out. - */ - timeoutInMinutes?: number | undefined; - /** - * Allow a sync upon push completion. - */ - allowSyncOnPushComplete?: boolean | undefined; - accountingTransfer?: shared.AccountingTransfer | null | undefined; -}; - -/** @internal */ -export type CreateTransferRequest$Outbound = { - companyId: string; - connectionId: string; - timeoutInMinutes?: number | undefined; - allowSyncOnPushComplete: boolean; - AccountingTransfer?: shared.AccountingTransfer$Outbound | null | undefined; -}; - -/** @internal */ -export const CreateTransferRequest$outboundSchema: z.ZodType< - CreateTransferRequest$Outbound, - z.ZodTypeDef, - CreateTransferRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - accountingTransfer: z.nullable(shared.AccountingTransfer$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - accountingTransfer: "AccountingTransfer", - }); -}); - -export function createTransferRequestToJSON( - createTransferRequest: CreateTransferRequest, -): string { - return JSON.stringify( - CreateTransferRequest$outboundSchema.parse(createTransferRequest), - ); +export interface CreateTransferRequest { + companyId: string; + connectionId: string; + timeoutInMinutes?: number; + allowSyncOnPushComplete?: boolean; + accountingTransfer?: AccountingTransfer | undefined; } diff --git a/lending/src/sdk/models/operations/deletecompany.ts b/lending/src/sdk/models/operations/deletecompany.ts index dbe555534..84680d5e6 100644 --- a/lending/src/sdk/models/operations/deletecompany.ts +++ b/lending/src/sdk/models/operations/deletecompany.ts @@ -1,34 +1,6 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type DeleteCompanyRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; -}; - -/** @internal */ -export type DeleteCompanyRequest$Outbound = { - companyId: string; -}; - -/** @internal */ -export const DeleteCompanyRequest$outboundSchema: z.ZodType< - DeleteCompanyRequest$Outbound, - z.ZodTypeDef, - DeleteCompanyRequest -> = z.object({ - companyId: z.string(), -}); - -export function deleteCompanyRequestToJSON( - deleteCompanyRequest: DeleteCompanyRequest, -): string { - return JSON.stringify( - DeleteCompanyRequest$outboundSchema.parse(deleteCompanyRequest), - ); +export interface DeleteCompanyRequest { + companyId: string; } diff --git a/lending/src/sdk/models/operations/deleteconnection.ts b/lending/src/sdk/models/operations/deleteconnection.ts index 83f759970..9a9aeb05b 100644 --- a/lending/src/sdk/models/operations/deleteconnection.ts +++ b/lending/src/sdk/models/operations/deleteconnection.ts @@ -1,40 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type DeleteConnectionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type DeleteConnectionRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const DeleteConnectionRequest$outboundSchema: z.ZodType< - DeleteConnectionRequest$Outbound, - z.ZodTypeDef, - DeleteConnectionRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function deleteConnectionRequestToJSON( - deleteConnectionRequest: DeleteConnectionRequest, -): string { - return JSON.stringify( - DeleteConnectionRequest$outboundSchema.parse(deleteConnectionRequest), - ); +export interface DeleteConnectionRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/downloadaccountingbillattachment.ts b/lending/src/sdk/models/operations/downloadaccountingbillattachment.ts index 786017ecb..3b8a6830c 100644 --- a/lending/src/sdk/models/operations/downloadaccountingbillattachment.ts +++ b/lending/src/sdk/models/operations/downloadaccountingbillattachment.ts @@ -1,55 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type DownloadAccountingBillAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a bill. - */ - billId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type DownloadAccountingBillAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - billId: string; - attachmentId: string; -}; - -/** @internal */ -export const DownloadAccountingBillAttachmentRequest$outboundSchema: z.ZodType< - DownloadAccountingBillAttachmentRequest$Outbound, - z.ZodTypeDef, - DownloadAccountingBillAttachmentRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - billId: z.string(), - attachmentId: z.string(), -}); - -export function downloadAccountingBillAttachmentRequestToJSON( - downloadAccountingBillAttachmentRequest: - DownloadAccountingBillAttachmentRequest, -): string { - return JSON.stringify( - DownloadAccountingBillAttachmentRequest$outboundSchema.parse( - downloadAccountingBillAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface DownloadAccountingBillAttachmentRequest { + companyId: string; + connectionId: string; + billId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/downloadaccountingcustomerattachment.ts b/lending/src/sdk/models/operations/downloadaccountingcustomerattachment.ts index dc8d44adf..e5b382d2c 100644 --- a/lending/src/sdk/models/operations/downloadaccountingcustomerattachment.ts +++ b/lending/src/sdk/models/operations/downloadaccountingcustomerattachment.ts @@ -1,56 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type DownloadAccountingCustomerAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a customer. - */ - customerId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type DownloadAccountingCustomerAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - customerId: string; - attachmentId: string; -}; - -/** @internal */ -export const DownloadAccountingCustomerAttachmentRequest$outboundSchema: - z.ZodType< - DownloadAccountingCustomerAttachmentRequest$Outbound, - z.ZodTypeDef, - DownloadAccountingCustomerAttachmentRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - customerId: z.string(), - attachmentId: z.string(), - }); - -export function downloadAccountingCustomerAttachmentRequestToJSON( - downloadAccountingCustomerAttachmentRequest: - DownloadAccountingCustomerAttachmentRequest, -): string { - return JSON.stringify( - DownloadAccountingCustomerAttachmentRequest$outboundSchema.parse( - downloadAccountingCustomerAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface DownloadAccountingCustomerAttachmentRequest { + companyId: string; + connectionId: string; + customerId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/downloadaccountingdirectcostattachment.ts b/lending/src/sdk/models/operations/downloadaccountingdirectcostattachment.ts index 4db314736..e86434530 100644 --- a/lending/src/sdk/models/operations/downloadaccountingdirectcostattachment.ts +++ b/lending/src/sdk/models/operations/downloadaccountingdirectcostattachment.ts @@ -1,56 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type DownloadAccountingDirectCostAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a direct cost. - */ - directCostId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type DownloadAccountingDirectCostAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - directCostId: string; - attachmentId: string; -}; - -/** @internal */ -export const DownloadAccountingDirectCostAttachmentRequest$outboundSchema: - z.ZodType< - DownloadAccountingDirectCostAttachmentRequest$Outbound, - z.ZodTypeDef, - DownloadAccountingDirectCostAttachmentRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - directCostId: z.string(), - attachmentId: z.string(), - }); - -export function downloadAccountingDirectCostAttachmentRequestToJSON( - downloadAccountingDirectCostAttachmentRequest: - DownloadAccountingDirectCostAttachmentRequest, -): string { - return JSON.stringify( - DownloadAccountingDirectCostAttachmentRequest$outboundSchema.parse( - downloadAccountingDirectCostAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface DownloadAccountingDirectCostAttachmentRequest { + companyId: string; + connectionId: string; + directCostId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/downloadaccountingdirectincomeattachment.ts b/lending/src/sdk/models/operations/downloadaccountingdirectincomeattachment.ts index b236a903f..7a06549b4 100644 --- a/lending/src/sdk/models/operations/downloadaccountingdirectincomeattachment.ts +++ b/lending/src/sdk/models/operations/downloadaccountingdirectincomeattachment.ts @@ -1,56 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type DownloadAccountingDirectIncomeAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a direct income. - */ - directIncomeId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type DownloadAccountingDirectIncomeAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - directIncomeId: string; - attachmentId: string; -}; - -/** @internal */ -export const DownloadAccountingDirectIncomeAttachmentRequest$outboundSchema: - z.ZodType< - DownloadAccountingDirectIncomeAttachmentRequest$Outbound, - z.ZodTypeDef, - DownloadAccountingDirectIncomeAttachmentRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - directIncomeId: z.string(), - attachmentId: z.string(), - }); - -export function downloadAccountingDirectIncomeAttachmentRequestToJSON( - downloadAccountingDirectIncomeAttachmentRequest: - DownloadAccountingDirectIncomeAttachmentRequest, -): string { - return JSON.stringify( - DownloadAccountingDirectIncomeAttachmentRequest$outboundSchema.parse( - downloadAccountingDirectIncomeAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface DownloadAccountingDirectIncomeAttachmentRequest { + companyId: string; + connectionId: string; + directIncomeId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/downloadaccountinginvoiceattachment.ts b/lending/src/sdk/models/operations/downloadaccountinginvoiceattachment.ts index 0d0dcb06a..5ffeeeed4 100644 --- a/lending/src/sdk/models/operations/downloadaccountinginvoiceattachment.ts +++ b/lending/src/sdk/models/operations/downloadaccountinginvoiceattachment.ts @@ -1,56 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type DownloadAccountingInvoiceAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an invoice. - */ - invoiceId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type DownloadAccountingInvoiceAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - invoiceId: string; - attachmentId: string; -}; - -/** @internal */ -export const DownloadAccountingInvoiceAttachmentRequest$outboundSchema: - z.ZodType< - DownloadAccountingInvoiceAttachmentRequest$Outbound, - z.ZodTypeDef, - DownloadAccountingInvoiceAttachmentRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - invoiceId: z.string(), - attachmentId: z.string(), - }); - -export function downloadAccountingInvoiceAttachmentRequestToJSON( - downloadAccountingInvoiceAttachmentRequest: - DownloadAccountingInvoiceAttachmentRequest, -): string { - return JSON.stringify( - DownloadAccountingInvoiceAttachmentRequest$outboundSchema.parse( - downloadAccountingInvoiceAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface DownloadAccountingInvoiceAttachmentRequest { + companyId: string; + connectionId: string; + invoiceId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/downloadaccountinginvoicepdf.ts b/lending/src/sdk/models/operations/downloadaccountinginvoicepdf.ts index e1296f3fd..96e16ba63 100644 --- a/lending/src/sdk/models/operations/downloadaccountinginvoicepdf.ts +++ b/lending/src/sdk/models/operations/downloadaccountinginvoicepdf.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type DownloadAccountingInvoicePdfRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for an invoice. - */ - invoiceId: string; -}; - -/** @internal */ -export type DownloadAccountingInvoicePdfRequest$Outbound = { - companyId: string; - invoiceId: string; -}; - -/** @internal */ -export const DownloadAccountingInvoicePdfRequest$outboundSchema: z.ZodType< - DownloadAccountingInvoicePdfRequest$Outbound, - z.ZodTypeDef, - DownloadAccountingInvoicePdfRequest -> = z.object({ - companyId: z.string(), - invoiceId: z.string(), -}); - -export function downloadAccountingInvoicePdfRequestToJSON( - downloadAccountingInvoicePdfRequest: DownloadAccountingInvoicePdfRequest, -): string { - return JSON.stringify( - DownloadAccountingInvoicePdfRequest$outboundSchema.parse( - downloadAccountingInvoicePdfRequest, - ), - ); +export interface DownloadAccountingInvoicePdfRequest { + companyId: string; + invoiceId: string; } diff --git a/lending/src/sdk/models/operations/downloadaccountingsupplierattachment.ts b/lending/src/sdk/models/operations/downloadaccountingsupplierattachment.ts index bac3e7863..565c746d1 100644 --- a/lending/src/sdk/models/operations/downloadaccountingsupplierattachment.ts +++ b/lending/src/sdk/models/operations/downloadaccountingsupplierattachment.ts @@ -1,56 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type DownloadAccountingSupplierAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a supplier. - */ - supplierId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type DownloadAccountingSupplierAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - supplierId: string; - attachmentId: string; -}; - -/** @internal */ -export const DownloadAccountingSupplierAttachmentRequest$outboundSchema: - z.ZodType< - DownloadAccountingSupplierAttachmentRequest$Outbound, - z.ZodTypeDef, - DownloadAccountingSupplierAttachmentRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - supplierId: z.string(), - attachmentId: z.string(), - }); - -export function downloadAccountingSupplierAttachmentRequestToJSON( - downloadAccountingSupplierAttachmentRequest: - DownloadAccountingSupplierAttachmentRequest, -): string { - return JSON.stringify( - DownloadAccountingSupplierAttachmentRequest$outboundSchema.parse( - downloadAccountingSupplierAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface DownloadAccountingSupplierAttachmentRequest { + companyId: string; + connectionId: string; + supplierId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/downloadexcelreport.ts b/lending/src/sdk/models/operations/downloadexcelreport.ts index 468a62dc1..369474cee 100644 --- a/lending/src/sdk/models/operations/downloadexcelreport.ts +++ b/lending/src/sdk/models/operations/downloadexcelreport.ts @@ -1,41 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { ExcelReportTypes } from '../shared/excelreporttypes'; +/* eslint-disable */ -export type DownloadExcelReportRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * The type of report you want to generate and download. - */ - reportType: shared.ExcelReportTypes; -}; - -/** @internal */ -export type DownloadExcelReportRequest$Outbound = { - companyId: string; - reportType: string; -}; - -/** @internal */ -export const DownloadExcelReportRequest$outboundSchema: z.ZodType< - DownloadExcelReportRequest$Outbound, - z.ZodTypeDef, - DownloadExcelReportRequest -> = z.object({ - companyId: z.string(), - reportType: shared.ExcelReportTypes$outboundSchema, -}); - -export function downloadExcelReportRequestToJSON( - downloadExcelReportRequest: DownloadExcelReportRequest, -): string { - return JSON.stringify( - DownloadExcelReportRequest$outboundSchema.parse(downloadExcelReportRequest), - ); +export interface DownloadExcelReportRequest { + companyId: string; + reportType: ExcelReportTypes; } diff --git a/lending/src/sdk/models/operations/downloadfiles.ts b/lending/src/sdk/models/operations/downloadfiles.ts index 1489d1eb2..c170e24f1 100644 --- a/lending/src/sdk/models/operations/downloadfiles.ts +++ b/lending/src/sdk/models/operations/downloadfiles.ts @@ -1,40 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type DownloadFilesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Only download files uploaded on this date. - */ - date?: string | undefined; -}; - -/** @internal */ -export type DownloadFilesRequest$Outbound = { - companyId: string; - date?: string | undefined; -}; - -/** @internal */ -export const DownloadFilesRequest$outboundSchema: z.ZodType< - DownloadFilesRequest$Outbound, - z.ZodTypeDef, - DownloadFilesRequest -> = z.object({ - companyId: z.string(), - date: z.string().optional(), -}); - -export function downloadFilesRequestToJSON( - downloadFilesRequest: DownloadFilesRequest, -): string { - return JSON.stringify( - DownloadFilesRequest$outboundSchema.parse(downloadFilesRequest), - ); +export interface DownloadFilesRequest { + companyId: string; + date?: string; } diff --git a/lending/src/sdk/models/operations/endbankstatementuploadsession.ts b/lending/src/sdk/models/operations/endbankstatementuploadsession.ts index 6d16bb4a3..756c7808b 100644 --- a/lending/src/sdk/models/operations/endbankstatementuploadsession.ts +++ b/lending/src/sdk/models/operations/endbankstatementuploadsession.ts @@ -1,58 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { EndUploadSessionRequest } from '../shared/enduploadsessionrequest'; +/* eslint-disable */ -export type EndBankStatementUploadSessionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for the dataset that completed its sync. - */ - datasetId: string; - endUploadSessionRequest?: shared.EndUploadSessionRequest | undefined; -}; - -/** @internal */ -export type EndBankStatementUploadSessionRequest$Outbound = { - companyId: string; - connectionId: string; - datasetId: string; - EndUploadSessionRequest?: shared.EndUploadSessionRequest$Outbound | undefined; -}; - -/** @internal */ -export const EndBankStatementUploadSessionRequest$outboundSchema: z.ZodType< - EndBankStatementUploadSessionRequest$Outbound, - z.ZodTypeDef, - EndBankStatementUploadSessionRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - datasetId: z.string(), - endUploadSessionRequest: shared.EndUploadSessionRequest$outboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - endUploadSessionRequest: "EndUploadSessionRequest", - }); -}); - -export function endBankStatementUploadSessionRequestToJSON( - endBankStatementUploadSessionRequest: EndBankStatementUploadSessionRequest, -): string { - return JSON.stringify( - EndBankStatementUploadSessionRequest$outboundSchema.parse( - endBankStatementUploadSessionRequest, - ), - ); +export interface EndBankStatementUploadSessionRequest { + companyId: string; + connectionId: string; + datasetId: string; + endUploadSessionRequest?: EndUploadSessionRequest | undefined; } diff --git a/lending/src/sdk/models/operations/generateexcelreport.ts b/lending/src/sdk/models/operations/generateexcelreport.ts index 39e9e7076..b9095bb3b 100644 --- a/lending/src/sdk/models/operations/generateexcelreport.ts +++ b/lending/src/sdk/models/operations/generateexcelreport.ts @@ -1,41 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { ExcelReportTypes } from '../shared/excelreporttypes'; +/* eslint-disable */ -export type GenerateExcelReportRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * The type of report you want to generate and download. - */ - reportType: shared.ExcelReportTypes; -}; - -/** @internal */ -export type GenerateExcelReportRequest$Outbound = { - companyId: string; - reportType: string; -}; - -/** @internal */ -export const GenerateExcelReportRequest$outboundSchema: z.ZodType< - GenerateExcelReportRequest$Outbound, - z.ZodTypeDef, - GenerateExcelReportRequest -> = z.object({ - companyId: z.string(), - reportType: shared.ExcelReportTypes$outboundSchema, -}); - -export function generateExcelReportRequestToJSON( - generateExcelReportRequest: GenerateExcelReportRequest, -): string { - return JSON.stringify( - GenerateExcelReportRequest$outboundSchema.parse(generateExcelReportRequest), - ); +export interface GenerateExcelReportRequest { + companyId: string; + reportType: ExcelReportTypes; } diff --git a/lending/src/sdk/models/operations/generateloansummary.ts b/lending/src/sdk/models/operations/generateloansummary.ts index 5b579f7da..48ca86427 100644 --- a/lending/src/sdk/models/operations/generateloansummary.ts +++ b/lending/src/sdk/models/operations/generateloansummary.ts @@ -1,61 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; +import type { GenerateLoanSummaryQueryParamSourceType } from '../_speakeasy_enums'; +/* eslint-disable */ -/** - * Data source type. - */ -export const GenerateLoanSummaryQueryParamSourceType = { - Banking: "banking", - Commerce: "commerce", - Accounting: "accounting", -} as const; -/** - * Data source type. - */ -export type GenerateLoanSummaryQueryParamSourceType = ClosedEnum< - typeof GenerateLoanSummaryQueryParamSourceType ->; - -export type GenerateLoanSummaryRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Data source type. - */ - sourceType: GenerateLoanSummaryQueryParamSourceType; -}; - -/** @internal */ -export const GenerateLoanSummaryQueryParamSourceType$outboundSchema: - z.ZodNativeEnum = z - .nativeEnum(GenerateLoanSummaryQueryParamSourceType); - -/** @internal */ -export type GenerateLoanSummaryRequest$Outbound = { - companyId: string; - sourceType: string; -}; - -/** @internal */ -export const GenerateLoanSummaryRequest$outboundSchema: z.ZodType< - GenerateLoanSummaryRequest$Outbound, - z.ZodTypeDef, - GenerateLoanSummaryRequest -> = z.object({ - companyId: z.string(), - sourceType: GenerateLoanSummaryQueryParamSourceType$outboundSchema, -}); - -export function generateLoanSummaryRequestToJSON( - generateLoanSummaryRequest: GenerateLoanSummaryRequest, -): string { - return JSON.stringify( - GenerateLoanSummaryRequest$outboundSchema.parse(generateLoanSummaryRequest), - ); +export interface GenerateLoanSummaryRequest { + companyId: string; + sourceType: GenerateLoanSummaryQueryParamSourceType; } diff --git a/lending/src/sdk/models/operations/generateloantransactions.ts b/lending/src/sdk/models/operations/generateloantransactions.ts index f0dff67d6..bbce8c09b 100644 --- a/lending/src/sdk/models/operations/generateloantransactions.ts +++ b/lending/src/sdk/models/operations/generateloantransactions.ts @@ -1,60 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; +import type { SourceType } from '../_speakeasy_enums'; +/* eslint-disable */ -/** - * Data source type. - */ -export const SourceType = { - Banking: "banking", - Commerce: "commerce", - Accounting: "accounting", -} as const; -/** - * Data source type. - */ -export type SourceType = ClosedEnum; - -export type GenerateLoanTransactionsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Data source type. - */ - sourceType: SourceType; -}; - -/** @internal */ -export const SourceType$outboundSchema: z.ZodNativeEnum = z - .nativeEnum(SourceType); - -/** @internal */ -export type GenerateLoanTransactionsRequest$Outbound = { - companyId: string; - sourceType: string; -}; - -/** @internal */ -export const GenerateLoanTransactionsRequest$outboundSchema: z.ZodType< - GenerateLoanTransactionsRequest$Outbound, - z.ZodTypeDef, - GenerateLoanTransactionsRequest -> = z.object({ - companyId: z.string(), - sourceType: SourceType$outboundSchema, -}); - -export function generateLoanTransactionsRequestToJSON( - generateLoanTransactionsRequest: GenerateLoanTransactionsRequest, -): string { - return JSON.stringify( - GenerateLoanTransactionsRequest$outboundSchema.parse( - generateLoanTransactionsRequest, - ), - ); +export interface GenerateLoanTransactionsRequest { + companyId: string; + sourceType: SourceType; } diff --git a/lending/src/sdk/models/operations/generatereport.ts b/lending/src/sdk/models/operations/generatereport.ts index 656d4d3bb..92f736275 100644 --- a/lending/src/sdk/models/operations/generatereport.ts +++ b/lending/src/sdk/models/operations/generatereport.ts @@ -1,41 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { ReportType } from '../_speakeasy_enums'; +/* eslint-disable */ -export type GenerateReportRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * The type of the report - */ - reportType: shared.ReportType; -}; - -/** @internal */ -export type GenerateReportRequest$Outbound = { - companyId: string; - reportType: string; -}; - -/** @internal */ -export const GenerateReportRequest$outboundSchema: z.ZodType< - GenerateReportRequest$Outbound, - z.ZodTypeDef, - GenerateReportRequest -> = z.object({ - companyId: z.string(), - reportType: shared.ReportType$outboundSchema, -}); - -export function generateReportRequestToJSON( - generateReportRequest: GenerateReportRequest, -): string { - return JSON.stringify( - GenerateReportRequest$outboundSchema.parse(generateReportRequest), - ); +export interface GenerateReportRequest { + companyId: string; + reportType: ReportType; } diff --git a/lending/src/sdk/models/operations/getaccountingaccount.ts b/lending/src/sdk/models/operations/getaccountingaccount.ts index cfb358814..6ce806c46 100644 --- a/lending/src/sdk/models/operations/getaccountingaccount.ts +++ b/lending/src/sdk/models/operations/getaccountingaccount.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingAccountRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for an account. - */ - accountId: string; -}; - -/** @internal */ -export type GetAccountingAccountRequest$Outbound = { - companyId: string; - accountId: string; -}; - -/** @internal */ -export const GetAccountingAccountRequest$outboundSchema: z.ZodType< - GetAccountingAccountRequest$Outbound, - z.ZodTypeDef, - GetAccountingAccountRequest -> = z.object({ - companyId: z.string(), - accountId: z.string(), -}); - -export function getAccountingAccountRequestToJSON( - getAccountingAccountRequest: GetAccountingAccountRequest, -): string { - return JSON.stringify( - GetAccountingAccountRequest$outboundSchema.parse( - getAccountingAccountRequest, - ), - ); +export interface GetAccountingAccountRequest { + companyId: string; + accountId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingaccounttransaction.ts b/lending/src/sdk/models/operations/getaccountingaccounttransaction.ts index c588a7b43..40171986a 100644 --- a/lending/src/sdk/models/operations/getaccountingaccounttransaction.ts +++ b/lending/src/sdk/models/operations/getaccountingaccounttransaction.ts @@ -1,49 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingAccountTransactionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an account transaction. - */ - accountTransactionId: string; -}; - -/** @internal */ -export type GetAccountingAccountTransactionRequest$Outbound = { - companyId: string; - connectionId: string; - accountTransactionId: string; -}; - -/** @internal */ -export const GetAccountingAccountTransactionRequest$outboundSchema: z.ZodType< - GetAccountingAccountTransactionRequest$Outbound, - z.ZodTypeDef, - GetAccountingAccountTransactionRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - accountTransactionId: z.string(), -}); - -export function getAccountingAccountTransactionRequestToJSON( - getAccountingAccountTransactionRequest: - GetAccountingAccountTransactionRequest, -): string { - return JSON.stringify( - GetAccountingAccountTransactionRequest$outboundSchema.parse( - getAccountingAccountTransactionRequest, - ), - ); +export interface GetAccountingAccountTransactionRequest { + companyId: string; + connectionId: string; + accountTransactionId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingagedcreditorsreport.ts b/lending/src/sdk/models/operations/getaccountingagedcreditorsreport.ts index b99e6928b..a858a5a48 100644 --- a/lending/src/sdk/models/operations/getaccountingagedcreditorsreport.ts +++ b/lending/src/sdk/models/operations/getaccountingagedcreditorsreport.ts @@ -1,56 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { RFCDate } from "../../types/rfcdate.js"; +import { RFCDate } from '../../types/rfcdate'; -export type GetAccountingAgedCreditorsReportRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Date the report is generated up to. - */ - reportDate?: RFCDate | undefined; - /** - * Number of periods to include in the report. - */ - numberOfPeriods?: number | undefined; - /** - * The length of period in days. - */ - periodLengthDays?: number | undefined; -}; - -/** @internal */ -export type GetAccountingAgedCreditorsReportRequest$Outbound = { - companyId: string; - reportDate?: string | undefined; - numberOfPeriods?: number | undefined; - periodLengthDays?: number | undefined; -}; - -/** @internal */ -export const GetAccountingAgedCreditorsReportRequest$outboundSchema: z.ZodType< - GetAccountingAgedCreditorsReportRequest$Outbound, - z.ZodTypeDef, - GetAccountingAgedCreditorsReportRequest -> = z.object({ - companyId: z.string(), - reportDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - numberOfPeriods: z.number().int().optional(), - periodLengthDays: z.number().int().optional(), -}); - -export function getAccountingAgedCreditorsReportRequestToJSON( - getAccountingAgedCreditorsReportRequest: - GetAccountingAgedCreditorsReportRequest, -): string { - return JSON.stringify( - GetAccountingAgedCreditorsReportRequest$outboundSchema.parse( - getAccountingAgedCreditorsReportRequest, - ), - ); +export interface GetAccountingAgedCreditorsReportRequest { + companyId: string; + reportDate?: RFCDate; + numberOfPeriods?: number; + periodLengthDays?: number; } diff --git a/lending/src/sdk/models/operations/getaccountingageddebtorsreport.ts b/lending/src/sdk/models/operations/getaccountingageddebtorsreport.ts index 875c77915..9184d6a2d 100644 --- a/lending/src/sdk/models/operations/getaccountingageddebtorsreport.ts +++ b/lending/src/sdk/models/operations/getaccountingageddebtorsreport.ts @@ -1,55 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { RFCDate } from "../../types/rfcdate.js"; +import { RFCDate } from '../../types/rfcdate'; -export type GetAccountingAgedDebtorsReportRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Date the report is generated up to. - */ - reportDate?: RFCDate | undefined; - /** - * Number of periods to include in the report. - */ - numberOfPeriods?: number | undefined; - /** - * The length of period in days. - */ - periodLengthDays?: number | undefined; -}; - -/** @internal */ -export type GetAccountingAgedDebtorsReportRequest$Outbound = { - companyId: string; - reportDate?: string | undefined; - numberOfPeriods?: number | undefined; - periodLengthDays?: number | undefined; -}; - -/** @internal */ -export const GetAccountingAgedDebtorsReportRequest$outboundSchema: z.ZodType< - GetAccountingAgedDebtorsReportRequest$Outbound, - z.ZodTypeDef, - GetAccountingAgedDebtorsReportRequest -> = z.object({ - companyId: z.string(), - reportDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - numberOfPeriods: z.number().int().optional(), - periodLengthDays: z.number().int().optional(), -}); - -export function getAccountingAgedDebtorsReportRequestToJSON( - getAccountingAgedDebtorsReportRequest: GetAccountingAgedDebtorsReportRequest, -): string { - return JSON.stringify( - GetAccountingAgedDebtorsReportRequest$outboundSchema.parse( - getAccountingAgedDebtorsReportRequest, - ), - ); +export interface GetAccountingAgedDebtorsReportRequest { + companyId: string; + reportDate?: RFCDate; + numberOfPeriods?: number; + periodLengthDays?: number; } diff --git a/lending/src/sdk/models/operations/getaccountingbalancesheet.ts b/lending/src/sdk/models/operations/getaccountingbalancesheet.ts index 7be6b8418..4d9ffaa7f 100644 --- a/lending/src/sdk/models/operations/getaccountingbalancesheet.ts +++ b/lending/src/sdk/models/operations/getaccountingbalancesheet.ts @@ -1,54 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingBalanceSheetRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Number of months defining the period of interest. - */ - periodLength: number; - /** - * Number of periods with `periodLength` to compare. - */ - periodsToCompare: number; - /** - * The month the report starts from. - */ - startMonth?: string | undefined; -}; - -/** @internal */ -export type GetAccountingBalanceSheetRequest$Outbound = { - companyId: string; - periodLength: number; - periodsToCompare: number; - startMonth?: string | undefined; -}; - -/** @internal */ -export const GetAccountingBalanceSheetRequest$outboundSchema: z.ZodType< - GetAccountingBalanceSheetRequest$Outbound, - z.ZodTypeDef, - GetAccountingBalanceSheetRequest -> = z.object({ - companyId: z.string(), - periodLength: z.number().int(), - periodsToCompare: z.number().int(), - startMonth: z.string().optional(), -}); - -export function getAccountingBalanceSheetRequestToJSON( - getAccountingBalanceSheetRequest: GetAccountingBalanceSheetRequest, -): string { - return JSON.stringify( - GetAccountingBalanceSheetRequest$outboundSchema.parse( - getAccountingBalanceSheetRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingBalanceSheetRequest { + companyId: string; + periodLength: number; + periodsToCompare: number; + startMonth?: string; } diff --git a/lending/src/sdk/models/operations/getaccountingbankaccount.ts b/lending/src/sdk/models/operations/getaccountingbankaccount.ts index c38e603b5..f2ea93156 100644 --- a/lending/src/sdk/models/operations/getaccountingbankaccount.ts +++ b/lending/src/sdk/models/operations/getaccountingbankaccount.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingBankAccountRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an account. - */ - accountId: string; -}; - -/** @internal */ -export type GetAccountingBankAccountRequest$Outbound = { - companyId: string; - connectionId: string; - accountId: string; -}; - -/** @internal */ -export const GetAccountingBankAccountRequest$outboundSchema: z.ZodType< - GetAccountingBankAccountRequest$Outbound, - z.ZodTypeDef, - GetAccountingBankAccountRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - accountId: z.string(), -}); - -export function getAccountingBankAccountRequestToJSON( - getAccountingBankAccountRequest: GetAccountingBankAccountRequest, -): string { - return JSON.stringify( - GetAccountingBankAccountRequest$outboundSchema.parse( - getAccountingBankAccountRequest, - ), - ); +export interface GetAccountingBankAccountRequest { + companyId: string; + connectionId: string; + accountId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingbill.ts b/lending/src/sdk/models/operations/getaccountingbill.ts index 51c4f85ef..ad78e3102 100644 --- a/lending/src/sdk/models/operations/getaccountingbill.ts +++ b/lending/src/sdk/models/operations/getaccountingbill.ts @@ -1,40 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingBillRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a bill. - */ - billId: string; -}; - -/** @internal */ -export type GetAccountingBillRequest$Outbound = { - companyId: string; - billId: string; -}; - -/** @internal */ -export const GetAccountingBillRequest$outboundSchema: z.ZodType< - GetAccountingBillRequest$Outbound, - z.ZodTypeDef, - GetAccountingBillRequest -> = z.object({ - companyId: z.string(), - billId: z.string(), -}); - -export function getAccountingBillRequestToJSON( - getAccountingBillRequest: GetAccountingBillRequest, -): string { - return JSON.stringify( - GetAccountingBillRequest$outboundSchema.parse(getAccountingBillRequest), - ); +export interface GetAccountingBillRequest { + companyId: string; + billId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingbillattachment.ts b/lending/src/sdk/models/operations/getaccountingbillattachment.ts index c0fdb526a..28113e6bc 100644 --- a/lending/src/sdk/models/operations/getaccountingbillattachment.ts +++ b/lending/src/sdk/models/operations/getaccountingbillattachment.ts @@ -1,54 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingBillAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a bill. - */ - billId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type GetAccountingBillAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - billId: string; - attachmentId: string; -}; - -/** @internal */ -export const GetAccountingBillAttachmentRequest$outboundSchema: z.ZodType< - GetAccountingBillAttachmentRequest$Outbound, - z.ZodTypeDef, - GetAccountingBillAttachmentRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - billId: z.string(), - attachmentId: z.string(), -}); - -export function getAccountingBillAttachmentRequestToJSON( - getAccountingBillAttachmentRequest: GetAccountingBillAttachmentRequest, -): string { - return JSON.stringify( - GetAccountingBillAttachmentRequest$outboundSchema.parse( - getAccountingBillAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingBillAttachmentRequest { + companyId: string; + connectionId: string; + billId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingbillcreditnote.ts b/lending/src/sdk/models/operations/getaccountingbillcreditnote.ts index 1ccc26e60..a1c7f3950 100644 --- a/lending/src/sdk/models/operations/getaccountingbillcreditnote.ts +++ b/lending/src/sdk/models/operations/getaccountingbillcreditnote.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingBillCreditNoteRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a bill credit note. - */ - billCreditNoteId: string; -}; - -/** @internal */ -export type GetAccountingBillCreditNoteRequest$Outbound = { - companyId: string; - billCreditNoteId: string; -}; - -/** @internal */ -export const GetAccountingBillCreditNoteRequest$outboundSchema: z.ZodType< - GetAccountingBillCreditNoteRequest$Outbound, - z.ZodTypeDef, - GetAccountingBillCreditNoteRequest -> = z.object({ - companyId: z.string(), - billCreditNoteId: z.string(), -}); - -export function getAccountingBillCreditNoteRequestToJSON( - getAccountingBillCreditNoteRequest: GetAccountingBillCreditNoteRequest, -): string { - return JSON.stringify( - GetAccountingBillCreditNoteRequest$outboundSchema.parse( - getAccountingBillCreditNoteRequest, - ), - ); +export interface GetAccountingBillCreditNoteRequest { + companyId: string; + billCreditNoteId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingbillpayment.ts b/lending/src/sdk/models/operations/getaccountingbillpayment.ts index 7beb14caf..af20a13e3 100644 --- a/lending/src/sdk/models/operations/getaccountingbillpayment.ts +++ b/lending/src/sdk/models/operations/getaccountingbillpayment.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingBillPaymentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a bill payment. - */ - billPaymentId: string; -}; - -/** @internal */ -export type GetAccountingBillPaymentRequest$Outbound = { - companyId: string; - billPaymentId: string; -}; - -/** @internal */ -export const GetAccountingBillPaymentRequest$outboundSchema: z.ZodType< - GetAccountingBillPaymentRequest$Outbound, - z.ZodTypeDef, - GetAccountingBillPaymentRequest -> = z.object({ - companyId: z.string(), - billPaymentId: z.string(), -}); - -export function getAccountingBillPaymentRequestToJSON( - getAccountingBillPaymentRequest: GetAccountingBillPaymentRequest, -): string { - return JSON.stringify( - GetAccountingBillPaymentRequest$outboundSchema.parse( - getAccountingBillPaymentRequest, - ), - ); +export interface GetAccountingBillPaymentRequest { + companyId: string; + billPaymentId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingcashflowstatement.ts b/lending/src/sdk/models/operations/getaccountingcashflowstatement.ts index 0b61b138f..5e09d0362 100644 --- a/lending/src/sdk/models/operations/getaccountingcashflowstatement.ts +++ b/lending/src/sdk/models/operations/getaccountingcashflowstatement.ts @@ -1,54 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingCashFlowStatementRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Number of months defining the period of interest. - */ - periodLength: number; - /** - * Number of periods with `periodLength` to compare. - */ - periodsToCompare: number; - /** - * The month the report starts from. - */ - startMonth?: string | undefined; -}; - -/** @internal */ -export type GetAccountingCashFlowStatementRequest$Outbound = { - companyId: string; - periodLength: number; - periodsToCompare: number; - startMonth?: string | undefined; -}; - -/** @internal */ -export const GetAccountingCashFlowStatementRequest$outboundSchema: z.ZodType< - GetAccountingCashFlowStatementRequest$Outbound, - z.ZodTypeDef, - GetAccountingCashFlowStatementRequest -> = z.object({ - companyId: z.string(), - periodLength: z.number().int(), - periodsToCompare: z.number().int(), - startMonth: z.string().optional(), -}); - -export function getAccountingCashFlowStatementRequestToJSON( - getAccountingCashFlowStatementRequest: GetAccountingCashFlowStatementRequest, -): string { - return JSON.stringify( - GetAccountingCashFlowStatementRequest$outboundSchema.parse( - getAccountingCashFlowStatementRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingCashFlowStatementRequest { + companyId: string; + periodLength: number; + periodsToCompare: number; + startMonth?: string; } diff --git a/lending/src/sdk/models/operations/getaccountingcreditnote.ts b/lending/src/sdk/models/operations/getaccountingcreditnote.ts index 728bd2e27..d1b2ceae3 100644 --- a/lending/src/sdk/models/operations/getaccountingcreditnote.ts +++ b/lending/src/sdk/models/operations/getaccountingcreditnote.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingCreditNoteRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a credit note. - */ - creditNoteId: string; -}; - -/** @internal */ -export type GetAccountingCreditNoteRequest$Outbound = { - companyId: string; - creditNoteId: string; -}; - -/** @internal */ -export const GetAccountingCreditNoteRequest$outboundSchema: z.ZodType< - GetAccountingCreditNoteRequest$Outbound, - z.ZodTypeDef, - GetAccountingCreditNoteRequest -> = z.object({ - companyId: z.string(), - creditNoteId: z.string(), -}); - -export function getAccountingCreditNoteRequestToJSON( - getAccountingCreditNoteRequest: GetAccountingCreditNoteRequest, -): string { - return JSON.stringify( - GetAccountingCreditNoteRequest$outboundSchema.parse( - getAccountingCreditNoteRequest, - ), - ); +export interface GetAccountingCreditNoteRequest { + companyId: string; + creditNoteId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingcustomer.ts b/lending/src/sdk/models/operations/getaccountingcustomer.ts index 293937ee2..13c80242b 100644 --- a/lending/src/sdk/models/operations/getaccountingcustomer.ts +++ b/lending/src/sdk/models/operations/getaccountingcustomer.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingCustomerRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a customer. - */ - customerId: string; -}; - -/** @internal */ -export type GetAccountingCustomerRequest$Outbound = { - companyId: string; - customerId: string; -}; - -/** @internal */ -export const GetAccountingCustomerRequest$outboundSchema: z.ZodType< - GetAccountingCustomerRequest$Outbound, - z.ZodTypeDef, - GetAccountingCustomerRequest -> = z.object({ - companyId: z.string(), - customerId: z.string(), -}); - -export function getAccountingCustomerRequestToJSON( - getAccountingCustomerRequest: GetAccountingCustomerRequest, -): string { - return JSON.stringify( - GetAccountingCustomerRequest$outboundSchema.parse( - getAccountingCustomerRequest, - ), - ); +export interface GetAccountingCustomerRequest { + companyId: string; + customerId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingcustomerattachment.ts b/lending/src/sdk/models/operations/getaccountingcustomerattachment.ts index 1d8897a62..9a881ae94 100644 --- a/lending/src/sdk/models/operations/getaccountingcustomerattachment.ts +++ b/lending/src/sdk/models/operations/getaccountingcustomerattachment.ts @@ -1,55 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingCustomerAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a customer. - */ - customerId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type GetAccountingCustomerAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - customerId: string; - attachmentId: string; -}; - -/** @internal */ -export const GetAccountingCustomerAttachmentRequest$outboundSchema: z.ZodType< - GetAccountingCustomerAttachmentRequest$Outbound, - z.ZodTypeDef, - GetAccountingCustomerAttachmentRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - customerId: z.string(), - attachmentId: z.string(), -}); - -export function getAccountingCustomerAttachmentRequestToJSON( - getAccountingCustomerAttachmentRequest: - GetAccountingCustomerAttachmentRequest, -): string { - return JSON.stringify( - GetAccountingCustomerAttachmentRequest$outboundSchema.parse( - getAccountingCustomerAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingCustomerAttachmentRequest { + companyId: string; + connectionId: string; + customerId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingdirectcost.ts b/lending/src/sdk/models/operations/getaccountingdirectcost.ts index 4f0752c97..3327135a0 100644 --- a/lending/src/sdk/models/operations/getaccountingdirectcost.ts +++ b/lending/src/sdk/models/operations/getaccountingdirectcost.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingDirectCostRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a direct cost. - */ - directCostId: string; -}; - -/** @internal */ -export type GetAccountingDirectCostRequest$Outbound = { - companyId: string; - connectionId: string; - directCostId: string; -}; - -/** @internal */ -export const GetAccountingDirectCostRequest$outboundSchema: z.ZodType< - GetAccountingDirectCostRequest$Outbound, - z.ZodTypeDef, - GetAccountingDirectCostRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - directCostId: z.string(), -}); - -export function getAccountingDirectCostRequestToJSON( - getAccountingDirectCostRequest: GetAccountingDirectCostRequest, -): string { - return JSON.stringify( - GetAccountingDirectCostRequest$outboundSchema.parse( - getAccountingDirectCostRequest, - ), - ); +export interface GetAccountingDirectCostRequest { + companyId: string; + connectionId: string; + directCostId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingdirectcostattachment.ts b/lending/src/sdk/models/operations/getaccountingdirectcostattachment.ts index 6a38f548f..03b417891 100644 --- a/lending/src/sdk/models/operations/getaccountingdirectcostattachment.ts +++ b/lending/src/sdk/models/operations/getaccountingdirectcostattachment.ts @@ -1,55 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingDirectCostAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a direct cost. - */ - directCostId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type GetAccountingDirectCostAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - directCostId: string; - attachmentId: string; -}; - -/** @internal */ -export const GetAccountingDirectCostAttachmentRequest$outboundSchema: z.ZodType< - GetAccountingDirectCostAttachmentRequest$Outbound, - z.ZodTypeDef, - GetAccountingDirectCostAttachmentRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - directCostId: z.string(), - attachmentId: z.string(), -}); - -export function getAccountingDirectCostAttachmentRequestToJSON( - getAccountingDirectCostAttachmentRequest: - GetAccountingDirectCostAttachmentRequest, -): string { - return JSON.stringify( - GetAccountingDirectCostAttachmentRequest$outboundSchema.parse( - getAccountingDirectCostAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingDirectCostAttachmentRequest { + companyId: string; + connectionId: string; + directCostId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingdirectincome.ts b/lending/src/sdk/models/operations/getaccountingdirectincome.ts index 8ccb64b13..9c65b3441 100644 --- a/lending/src/sdk/models/operations/getaccountingdirectincome.ts +++ b/lending/src/sdk/models/operations/getaccountingdirectincome.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingDirectIncomeRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a direct income. - */ - directIncomeId: string; -}; - -/** @internal */ -export type GetAccountingDirectIncomeRequest$Outbound = { - companyId: string; - connectionId: string; - directIncomeId: string; -}; - -/** @internal */ -export const GetAccountingDirectIncomeRequest$outboundSchema: z.ZodType< - GetAccountingDirectIncomeRequest$Outbound, - z.ZodTypeDef, - GetAccountingDirectIncomeRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - directIncomeId: z.string(), -}); - -export function getAccountingDirectIncomeRequestToJSON( - getAccountingDirectIncomeRequest: GetAccountingDirectIncomeRequest, -): string { - return JSON.stringify( - GetAccountingDirectIncomeRequest$outboundSchema.parse( - getAccountingDirectIncomeRequest, - ), - ); +export interface GetAccountingDirectIncomeRequest { + companyId: string; + connectionId: string; + directIncomeId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingdirectincomeattachment.ts b/lending/src/sdk/models/operations/getaccountingdirectincomeattachment.ts index 25b6ec0a6..88ab91f45 100644 --- a/lending/src/sdk/models/operations/getaccountingdirectincomeattachment.ts +++ b/lending/src/sdk/models/operations/getaccountingdirectincomeattachment.ts @@ -1,62 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingDirectIncomeAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a direct income. - */ - directIncomeId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; - /** - * Time limit for the push operation to complete before it is timed out. - */ - timeoutInMinutes?: number | undefined; -}; - -/** @internal */ -export type GetAccountingDirectIncomeAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - directIncomeId: string; - attachmentId: string; - timeoutInMinutes?: number | undefined; -}; - -/** @internal */ -export const GetAccountingDirectIncomeAttachmentRequest$outboundSchema: - z.ZodType< - GetAccountingDirectIncomeAttachmentRequest$Outbound, - z.ZodTypeDef, - GetAccountingDirectIncomeAttachmentRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - directIncomeId: z.string(), - attachmentId: z.string(), - timeoutInMinutes: z.number().int().optional(), - }); - -export function getAccountingDirectIncomeAttachmentRequestToJSON( - getAccountingDirectIncomeAttachmentRequest: - GetAccountingDirectIncomeAttachmentRequest, -): string { - return JSON.stringify( - GetAccountingDirectIncomeAttachmentRequest$outboundSchema.parse( - getAccountingDirectIncomeAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingDirectIncomeAttachmentRequest { + companyId: string; + connectionId: string; + directIncomeId: string; + attachmentId: string; + timeoutInMinutes?: number; } diff --git a/lending/src/sdk/models/operations/getaccountinginvoice.ts b/lending/src/sdk/models/operations/getaccountinginvoice.ts index 09b8ea9c0..5fe4362d6 100644 --- a/lending/src/sdk/models/operations/getaccountinginvoice.ts +++ b/lending/src/sdk/models/operations/getaccountinginvoice.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingInvoiceRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for an invoice. - */ - invoiceId: string; -}; - -/** @internal */ -export type GetAccountingInvoiceRequest$Outbound = { - companyId: string; - invoiceId: string; -}; - -/** @internal */ -export const GetAccountingInvoiceRequest$outboundSchema: z.ZodType< - GetAccountingInvoiceRequest$Outbound, - z.ZodTypeDef, - GetAccountingInvoiceRequest -> = z.object({ - companyId: z.string(), - invoiceId: z.string(), -}); - -export function getAccountingInvoiceRequestToJSON( - getAccountingInvoiceRequest: GetAccountingInvoiceRequest, -): string { - return JSON.stringify( - GetAccountingInvoiceRequest$outboundSchema.parse( - getAccountingInvoiceRequest, - ), - ); +export interface GetAccountingInvoiceRequest { + companyId: string; + invoiceId: string; } diff --git a/lending/src/sdk/models/operations/getaccountinginvoiceattachment.ts b/lending/src/sdk/models/operations/getaccountinginvoiceattachment.ts index 1ec2b17a5..c4e03ac63 100644 --- a/lending/src/sdk/models/operations/getaccountinginvoiceattachment.ts +++ b/lending/src/sdk/models/operations/getaccountinginvoiceattachment.ts @@ -1,54 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingInvoiceAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an invoice. - */ - invoiceId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type GetAccountingInvoiceAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - invoiceId: string; - attachmentId: string; -}; - -/** @internal */ -export const GetAccountingInvoiceAttachmentRequest$outboundSchema: z.ZodType< - GetAccountingInvoiceAttachmentRequest$Outbound, - z.ZodTypeDef, - GetAccountingInvoiceAttachmentRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - invoiceId: z.string(), - attachmentId: z.string(), -}); - -export function getAccountingInvoiceAttachmentRequestToJSON( - getAccountingInvoiceAttachmentRequest: GetAccountingInvoiceAttachmentRequest, -): string { - return JSON.stringify( - GetAccountingInvoiceAttachmentRequest$outboundSchema.parse( - getAccountingInvoiceAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingInvoiceAttachmentRequest { + companyId: string; + connectionId: string; + invoiceId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingjournal.ts b/lending/src/sdk/models/operations/getaccountingjournal.ts index 48e2012f6..92903e652 100644 --- a/lending/src/sdk/models/operations/getaccountingjournal.ts +++ b/lending/src/sdk/models/operations/getaccountingjournal.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingJournalRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a journal. - */ - journalId: string; -}; - -/** @internal */ -export type GetAccountingJournalRequest$Outbound = { - companyId: string; - journalId: string; -}; - -/** @internal */ -export const GetAccountingJournalRequest$outboundSchema: z.ZodType< - GetAccountingJournalRequest$Outbound, - z.ZodTypeDef, - GetAccountingJournalRequest -> = z.object({ - companyId: z.string(), - journalId: z.string(), -}); - -export function getAccountingJournalRequestToJSON( - getAccountingJournalRequest: GetAccountingJournalRequest, -): string { - return JSON.stringify( - GetAccountingJournalRequest$outboundSchema.parse( - getAccountingJournalRequest, - ), - ); +export interface GetAccountingJournalRequest { + companyId: string; + journalId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingjournalentry.ts b/lending/src/sdk/models/operations/getaccountingjournalentry.ts index bfccd0295..fb9111b7d 100644 --- a/lending/src/sdk/models/operations/getaccountingjournalentry.ts +++ b/lending/src/sdk/models/operations/getaccountingjournalentry.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingJournalEntryRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a journal entry. - */ - journalEntryId: string; -}; - -/** @internal */ -export type GetAccountingJournalEntryRequest$Outbound = { - companyId: string; - journalEntryId: string; -}; - -/** @internal */ -export const GetAccountingJournalEntryRequest$outboundSchema: z.ZodType< - GetAccountingJournalEntryRequest$Outbound, - z.ZodTypeDef, - GetAccountingJournalEntryRequest -> = z.object({ - companyId: z.string(), - journalEntryId: z.string(), -}); - -export function getAccountingJournalEntryRequestToJSON( - getAccountingJournalEntryRequest: GetAccountingJournalEntryRequest, -): string { - return JSON.stringify( - GetAccountingJournalEntryRequest$outboundSchema.parse( - getAccountingJournalEntryRequest, - ), - ); +export interface GetAccountingJournalEntryRequest { + companyId: string; + journalEntryId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingpayment.ts b/lending/src/sdk/models/operations/getaccountingpayment.ts index 88b0fb386..42b318c61 100644 --- a/lending/src/sdk/models/operations/getaccountingpayment.ts +++ b/lending/src/sdk/models/operations/getaccountingpayment.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingPaymentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a payment. - */ - paymentId: string; -}; - -/** @internal */ -export type GetAccountingPaymentRequest$Outbound = { - companyId: string; - paymentId: string; -}; - -/** @internal */ -export const GetAccountingPaymentRequest$outboundSchema: z.ZodType< - GetAccountingPaymentRequest$Outbound, - z.ZodTypeDef, - GetAccountingPaymentRequest -> = z.object({ - companyId: z.string(), - paymentId: z.string(), -}); - -export function getAccountingPaymentRequestToJSON( - getAccountingPaymentRequest: GetAccountingPaymentRequest, -): string { - return JSON.stringify( - GetAccountingPaymentRequest$outboundSchema.parse( - getAccountingPaymentRequest, - ), - ); +export interface GetAccountingPaymentRequest { + companyId: string; + paymentId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingprofile.ts b/lending/src/sdk/models/operations/getaccountingprofile.ts index 9547b4347..fadc4479a 100644 --- a/lending/src/sdk/models/operations/getaccountingprofile.ts +++ b/lending/src/sdk/models/operations/getaccountingprofile.ts @@ -1,36 +1,6 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingProfileRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; -}; - -/** @internal */ -export type GetAccountingProfileRequest$Outbound = { - companyId: string; -}; - -/** @internal */ -export const GetAccountingProfileRequest$outboundSchema: z.ZodType< - GetAccountingProfileRequest$Outbound, - z.ZodTypeDef, - GetAccountingProfileRequest -> = z.object({ - companyId: z.string(), -}); - -export function getAccountingProfileRequestToJSON( - getAccountingProfileRequest: GetAccountingProfileRequest, -): string { - return JSON.stringify( - GetAccountingProfileRequest$outboundSchema.parse( - getAccountingProfileRequest, - ), - ); +export interface GetAccountingProfileRequest { + companyId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingprofitandloss.ts b/lending/src/sdk/models/operations/getaccountingprofitandloss.ts index fc0a7a426..36d08738b 100644 --- a/lending/src/sdk/models/operations/getaccountingprofitandloss.ts +++ b/lending/src/sdk/models/operations/getaccountingprofitandloss.ts @@ -1,54 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingProfitAndLossRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Number of months defining the period of interest. - */ - periodLength: number; - /** - * Number of periods with `periodLength` to compare. - */ - periodsToCompare: number; - /** - * The month the report starts from. - */ - startMonth?: string | undefined; -}; - -/** @internal */ -export type GetAccountingProfitAndLossRequest$Outbound = { - companyId: string; - periodLength: number; - periodsToCompare: number; - startMonth?: string | undefined; -}; - -/** @internal */ -export const GetAccountingProfitAndLossRequest$outboundSchema: z.ZodType< - GetAccountingProfitAndLossRequest$Outbound, - z.ZodTypeDef, - GetAccountingProfitAndLossRequest -> = z.object({ - companyId: z.string(), - periodLength: z.number().int(), - periodsToCompare: z.number().int(), - startMonth: z.string().optional(), -}); - -export function getAccountingProfitAndLossRequestToJSON( - getAccountingProfitAndLossRequest: GetAccountingProfitAndLossRequest, -): string { - return JSON.stringify( - GetAccountingProfitAndLossRequest$outboundSchema.parse( - getAccountingProfitAndLossRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingProfitAndLossRequest { + companyId: string; + periodLength: number; + periodsToCompare: number; + startMonth?: string; } diff --git a/lending/src/sdk/models/operations/getaccountingsupplier.ts b/lending/src/sdk/models/operations/getaccountingsupplier.ts index 0023ea59c..b7c751cf5 100644 --- a/lending/src/sdk/models/operations/getaccountingsupplier.ts +++ b/lending/src/sdk/models/operations/getaccountingsupplier.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingSupplierRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a supplier. - */ - supplierId: string; -}; - -/** @internal */ -export type GetAccountingSupplierRequest$Outbound = { - companyId: string; - supplierId: string; -}; - -/** @internal */ -export const GetAccountingSupplierRequest$outboundSchema: z.ZodType< - GetAccountingSupplierRequest$Outbound, - z.ZodTypeDef, - GetAccountingSupplierRequest -> = z.object({ - companyId: z.string(), - supplierId: z.string(), -}); - -export function getAccountingSupplierRequestToJSON( - getAccountingSupplierRequest: GetAccountingSupplierRequest, -): string { - return JSON.stringify( - GetAccountingSupplierRequest$outboundSchema.parse( - getAccountingSupplierRequest, - ), - ); +export interface GetAccountingSupplierRequest { + companyId: string; + supplierId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingsupplierattachment.ts b/lending/src/sdk/models/operations/getaccountingsupplierattachment.ts index dc125e4e3..cf0ce240e 100644 --- a/lending/src/sdk/models/operations/getaccountingsupplierattachment.ts +++ b/lending/src/sdk/models/operations/getaccountingsupplierattachment.ts @@ -1,55 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetAccountingSupplierAttachmentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a supplier. - */ - supplierId: string; - /** - * Unique identifier for an attachment. - */ - attachmentId: string; -}; - -/** @internal */ -export type GetAccountingSupplierAttachmentRequest$Outbound = { - companyId: string; - connectionId: string; - supplierId: string; - attachmentId: string; -}; - -/** @internal */ -export const GetAccountingSupplierAttachmentRequest$outboundSchema: z.ZodType< - GetAccountingSupplierAttachmentRequest$Outbound, - z.ZodTypeDef, - GetAccountingSupplierAttachmentRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - supplierId: z.string(), - attachmentId: z.string(), -}); - -export function getAccountingSupplierAttachmentRequestToJSON( - getAccountingSupplierAttachmentRequest: - GetAccountingSupplierAttachmentRequest, -): string { - return JSON.stringify( - GetAccountingSupplierAttachmentRequest$outboundSchema.parse( - getAccountingSupplierAttachmentRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetAccountingSupplierAttachmentRequest { + companyId: string; + connectionId: string; + supplierId: string; + attachmentId: string; } diff --git a/lending/src/sdk/models/operations/getaccountingtransfer.ts b/lending/src/sdk/models/operations/getaccountingtransfer.ts index bbcbab86b..5bc9d4afe 100644 --- a/lending/src/sdk/models/operations/getaccountingtransfer.ts +++ b/lending/src/sdk/models/operations/getaccountingtransfer.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetAccountingTransferRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a transfer. - */ - transferId: string; -}; - -/** @internal */ -export type GetAccountingTransferRequest$Outbound = { - companyId: string; - connectionId: string; - transferId: string; -}; - -/** @internal */ -export const GetAccountingTransferRequest$outboundSchema: z.ZodType< - GetAccountingTransferRequest$Outbound, - z.ZodTypeDef, - GetAccountingTransferRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - transferId: z.string(), -}); - -export function getAccountingTransferRequestToJSON( - getAccountingTransferRequest: GetAccountingTransferRequest, -): string { - return JSON.stringify( - GetAccountingTransferRequest$outboundSchema.parse( - getAccountingTransferRequest, - ), - ); +export interface GetAccountingTransferRequest { + companyId: string; + connectionId: string; + transferId: string; } diff --git a/lending/src/sdk/models/operations/getbankaccountmapping.ts b/lending/src/sdk/models/operations/getbankaccountmapping.ts index acfa54967..86ac7b74a 100644 --- a/lending/src/sdk/models/operations/getbankaccountmapping.ts +++ b/lending/src/sdk/models/operations/getbankaccountmapping.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetBankAccountMappingRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetBankAccountMappingRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetBankAccountMappingRequest$outboundSchema: z.ZodType< - GetBankAccountMappingRequest$Outbound, - z.ZodTypeDef, - GetBankAccountMappingRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getBankAccountMappingRequestToJSON( - getBankAccountMappingRequest: GetBankAccountMappingRequest, -): string { - return JSON.stringify( - GetBankAccountMappingRequest$outboundSchema.parse( - getBankAccountMappingRequest, - ), - ); +export interface GetBankAccountMappingRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getbankingaccount.ts b/lending/src/sdk/models/operations/getbankingaccount.ts index 0e30d1a13..9b9deff55 100644 --- a/lending/src/sdk/models/operations/getbankingaccount.ts +++ b/lending/src/sdk/models/operations/getbankingaccount.ts @@ -1,46 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetBankingAccountRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an account. - */ - accountId: string; -}; - -/** @internal */ -export type GetBankingAccountRequest$Outbound = { - companyId: string; - connectionId: string; - accountId: string; -}; - -/** @internal */ -export const GetBankingAccountRequest$outboundSchema: z.ZodType< - GetBankingAccountRequest$Outbound, - z.ZodTypeDef, - GetBankingAccountRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - accountId: z.string(), -}); - -export function getBankingAccountRequestToJSON( - getBankingAccountRequest: GetBankingAccountRequest, -): string { - return JSON.stringify( - GetBankingAccountRequest$outboundSchema.parse(getBankingAccountRequest), - ); +export interface GetBankingAccountRequest { + companyId: string; + connectionId: string; + accountId: string; } diff --git a/lending/src/sdk/models/operations/getbankingtransaction.ts b/lending/src/sdk/models/operations/getbankingtransaction.ts index 784a9afbe..2297d990b 100644 --- a/lending/src/sdk/models/operations/getbankingtransaction.ts +++ b/lending/src/sdk/models/operations/getbankingtransaction.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetBankingTransactionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * The unique identifier for a transaction - */ - transactionId: string; -}; - -/** @internal */ -export type GetBankingTransactionRequest$Outbound = { - companyId: string; - connectionId: string; - transactionId: string; -}; - -/** @internal */ -export const GetBankingTransactionRequest$outboundSchema: z.ZodType< - GetBankingTransactionRequest$Outbound, - z.ZodTypeDef, - GetBankingTransactionRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - transactionId: z.string(), -}); - -export function getBankingTransactionRequestToJSON( - getBankingTransactionRequest: GetBankingTransactionRequest, -): string { - return JSON.stringify( - GetBankingTransactionRequest$outboundSchema.parse( - getBankingTransactionRequest, - ), - ); +export interface GetBankingTransactionRequest { + companyId: string; + connectionId: string; + transactionId: string; } diff --git a/lending/src/sdk/models/operations/getbankingtransactioncategory.ts b/lending/src/sdk/models/operations/getbankingtransactioncategory.ts index e501dbce2..21a38bbbb 100644 --- a/lending/src/sdk/models/operations/getbankingtransactioncategory.ts +++ b/lending/src/sdk/models/operations/getbankingtransactioncategory.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetBankingTransactionCategoryRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * The unique identifier for a banking transaction category - */ - transactionCategoryId: string; -}; - -/** @internal */ -export type GetBankingTransactionCategoryRequest$Outbound = { - companyId: string; - connectionId: string; - transactionCategoryId: string; -}; - -/** @internal */ -export const GetBankingTransactionCategoryRequest$outboundSchema: z.ZodType< - GetBankingTransactionCategoryRequest$Outbound, - z.ZodTypeDef, - GetBankingTransactionCategoryRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - transactionCategoryId: z.string(), -}); - -export function getBankingTransactionCategoryRequestToJSON( - getBankingTransactionCategoryRequest: GetBankingTransactionCategoryRequest, -): string { - return JSON.stringify( - GetBankingTransactionCategoryRequest$outboundSchema.parse( - getBankingTransactionCategoryRequest, - ), - ); +export interface GetBankingTransactionCategoryRequest { + companyId: string; + connectionId: string; + transactionCategoryId: string; } diff --git a/lending/src/sdk/models/operations/getbankstatementuploadconfiguration.ts b/lending/src/sdk/models/operations/getbankstatementuploadconfiguration.ts index a109b894c..e769f49c6 100644 --- a/lending/src/sdk/models/operations/getbankstatementuploadconfiguration.ts +++ b/lending/src/sdk/models/operations/getbankstatementuploadconfiguration.ts @@ -1,44 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetBankStatementUploadConfigurationRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetBankStatementUploadConfigurationRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetBankStatementUploadConfigurationRequest$outboundSchema: - z.ZodType< - GetBankStatementUploadConfigurationRequest$Outbound, - z.ZodTypeDef, - GetBankStatementUploadConfigurationRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - }); - -export function getBankStatementUploadConfigurationRequestToJSON( - getBankStatementUploadConfigurationRequest: - GetBankStatementUploadConfigurationRequest, -): string { - return JSON.stringify( - GetBankStatementUploadConfigurationRequest$outboundSchema.parse( - getBankStatementUploadConfigurationRequest, - ), - ); +export interface GetBankStatementUploadConfigurationRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getcategorizedbalancesheetstatement.ts b/lending/src/sdk/models/operations/getcategorizedbalancesheetstatement.ts index b98e34a3e..d09a23ae9 100644 --- a/lending/src/sdk/models/operations/getcategorizedbalancesheetstatement.ts +++ b/lending/src/sdk/models/operations/getcategorizedbalancesheetstatement.ts @@ -1,50 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCategorizedBalanceSheetStatementRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. - */ - reportDate: string; - /** - * The number of periods to return. If not provided, 12 periods will be used as the default value. - */ - numberOfPeriods?: number | undefined; -}; - -/** @internal */ -export type GetCategorizedBalanceSheetStatementRequest$Outbound = { - companyId: string; - reportDate: string; - numberOfPeriods?: number | undefined; -}; - -/** @internal */ -export const GetCategorizedBalanceSheetStatementRequest$outboundSchema: - z.ZodType< - GetCategorizedBalanceSheetStatementRequest$Outbound, - z.ZodTypeDef, - GetCategorizedBalanceSheetStatementRequest - > = z.object({ - companyId: z.string(), - reportDate: z.string(), - numberOfPeriods: z.number().int().optional(), - }); - -export function getCategorizedBalanceSheetStatementRequestToJSON( - getCategorizedBalanceSheetStatementRequest: - GetCategorizedBalanceSheetStatementRequest, -): string { - return JSON.stringify( - GetCategorizedBalanceSheetStatementRequest$outboundSchema.parse( - getCategorizedBalanceSheetStatementRequest, - ), - ); +export interface GetCategorizedBalanceSheetStatementRequest { + companyId: string; + reportDate: string; + numberOfPeriods?: number; } diff --git a/lending/src/sdk/models/operations/getcategorizedbankstatement.ts b/lending/src/sdk/models/operations/getcategorizedbankstatement.ts index c8060bd0e..6963f3a59 100644 --- a/lending/src/sdk/models/operations/getcategorizedbankstatement.ts +++ b/lending/src/sdk/models/operations/getcategorizedbankstatement.ts @@ -1,54 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type GetCategorizedBankStatementRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; -}; - -/** @internal */ -export type GetCategorizedBankStatementRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; -}; - -/** @internal */ -export const GetCategorizedBankStatementRequest$outboundSchema: z.ZodType< - GetCategorizedBankStatementRequest$Outbound, - z.ZodTypeDef, - GetCategorizedBankStatementRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), -}); - -export function getCategorizedBankStatementRequestToJSON( - getCategorizedBankStatementRequest: GetCategorizedBankStatementRequest, -): string { - return JSON.stringify( - GetCategorizedBankStatementRequest$outboundSchema.parse( - getCategorizedBankStatementRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface GetCategorizedBankStatementRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; } diff --git a/lending/src/sdk/models/operations/getcategorizedprofitandlossstatement.ts b/lending/src/sdk/models/operations/getcategorizedprofitandlossstatement.ts index a49705b36..eb78522a9 100644 --- a/lending/src/sdk/models/operations/getcategorizedprofitandlossstatement.ts +++ b/lending/src/sdk/models/operations/getcategorizedprofitandlossstatement.ts @@ -1,50 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCategorizedProfitAndLossStatementRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. - */ - reportDate?: string | undefined; - /** - * The number of periods to return. If not provided, 12 periods will be used as the default value. - */ - numberOfPeriods?: number | undefined; -}; - -/** @internal */ -export type GetCategorizedProfitAndLossStatementRequest$Outbound = { - companyId: string; - reportDate?: string | undefined; - numberOfPeriods?: number | undefined; -}; - -/** @internal */ -export const GetCategorizedProfitAndLossStatementRequest$outboundSchema: - z.ZodType< - GetCategorizedProfitAndLossStatementRequest$Outbound, - z.ZodTypeDef, - GetCategorizedProfitAndLossStatementRequest - > = z.object({ - companyId: z.string(), - reportDate: z.string().optional(), - numberOfPeriods: z.number().int().optional(), - }); - -export function getCategorizedProfitAndLossStatementRequestToJSON( - getCategorizedProfitAndLossStatementRequest: - GetCategorizedProfitAndLossStatementRequest, -): string { - return JSON.stringify( - GetCategorizedProfitAndLossStatementRequest$outboundSchema.parse( - getCategorizedProfitAndLossStatementRequest, - ), - ); +export interface GetCategorizedProfitAndLossStatementRequest { + companyId: string; + reportDate?: string; + numberOfPeriods?: number; } diff --git a/lending/src/sdk/models/operations/getcommercecustomer.ts b/lending/src/sdk/models/operations/getcommercecustomer.ts index b69da18a5..250b0847e 100644 --- a/lending/src/sdk/models/operations/getcommercecustomer.ts +++ b/lending/src/sdk/models/operations/getcommercecustomer.ts @@ -1,46 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommerceCustomerRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a customer. - */ - customerId: string; -}; - -/** @internal */ -export type GetCommerceCustomerRequest$Outbound = { - companyId: string; - connectionId: string; - customerId: string; -}; - -/** @internal */ -export const GetCommerceCustomerRequest$outboundSchema: z.ZodType< - GetCommerceCustomerRequest$Outbound, - z.ZodTypeDef, - GetCommerceCustomerRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - customerId: z.string(), -}); - -export function getCommerceCustomerRequestToJSON( - getCommerceCustomerRequest: GetCommerceCustomerRequest, -): string { - return JSON.stringify( - GetCommerceCustomerRequest$outboundSchema.parse(getCommerceCustomerRequest), - ); +export interface GetCommerceCustomerRequest { + companyId: string; + connectionId: string; + customerId: string; } diff --git a/lending/src/sdk/models/operations/getcommercecustomerretentionmetrics.ts b/lending/src/sdk/models/operations/getcommercecustomerretentionmetrics.ts index d6cdae51f..eab499194 100644 --- a/lending/src/sdk/models/operations/getcommercecustomerretentionmetrics.ts +++ b/lending/src/sdk/models/operations/getcommercecustomerretentionmetrics.ts @@ -1,75 +1,14 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; - -export type GetCommerceCustomerRetentionMetricsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. - */ - reportDate: string; - /** - * The number of months per period. E.g. 2 = 2 months per period. - */ - periodLength: number; - /** - * The number of periods to return. There will be no pagination as a query parameter. - */ - numberOfPeriods: number; - /** - * The period unit of time returned. - */ - periodUnit: shared.PeriodUnit; - /** - * Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. - */ - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export type GetCommerceCustomerRetentionMetricsRequest$Outbound = { - companyId: string; - connectionId: string; - reportDate: string; - periodLength: number; - numberOfPeriods: number; - periodUnit: string; - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export const GetCommerceCustomerRetentionMetricsRequest$outboundSchema: - z.ZodType< - GetCommerceCustomerRetentionMetricsRequest$Outbound, - z.ZodTypeDef, - GetCommerceCustomerRetentionMetricsRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - reportDate: z.string(), - periodLength: z.number().int(), - numberOfPeriods: z.number().int(), - periodUnit: shared.PeriodUnit$outboundSchema, - includeDisplayNames: z.boolean().optional(), - }); - -export function getCommerceCustomerRetentionMetricsRequestToJSON( - getCommerceCustomerRetentionMetricsRequest: - GetCommerceCustomerRetentionMetricsRequest, -): string { - return JSON.stringify( - GetCommerceCustomerRetentionMetricsRequest$outboundSchema.parse( - getCommerceCustomerRetentionMetricsRequest, - ), - ); +/* tslint:disable */ + +import type { PeriodUnit } from '../_speakeasy_enums'; +/* eslint-disable */ + +export interface GetCommerceCustomerRetentionMetricsRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; } diff --git a/lending/src/sdk/models/operations/getcommercedispute.ts b/lending/src/sdk/models/operations/getcommercedispute.ts index fa377c6ad..67b2b2bf7 100644 --- a/lending/src/sdk/models/operations/getcommercedispute.ts +++ b/lending/src/sdk/models/operations/getcommercedispute.ts @@ -1,46 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommerceDisputeRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a dispute. - */ - disputeId: string; -}; - -/** @internal */ -export type GetCommerceDisputeRequest$Outbound = { - companyId: string; - connectionId: string; - disputeId: string; -}; - -/** @internal */ -export const GetCommerceDisputeRequest$outboundSchema: z.ZodType< - GetCommerceDisputeRequest$Outbound, - z.ZodTypeDef, - GetCommerceDisputeRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - disputeId: z.string(), -}); - -export function getCommerceDisputeRequestToJSON( - getCommerceDisputeRequest: GetCommerceDisputeRequest, -): string { - return JSON.stringify( - GetCommerceDisputeRequest$outboundSchema.parse(getCommerceDisputeRequest), - ); +export interface GetCommerceDisputeRequest { + companyId: string; + connectionId: string; + disputeId: string; } diff --git a/lending/src/sdk/models/operations/getcommercelifetimevaluemetrics.ts b/lending/src/sdk/models/operations/getcommercelifetimevaluemetrics.ts index 0bcbfb659..27f724c90 100644 --- a/lending/src/sdk/models/operations/getcommercelifetimevaluemetrics.ts +++ b/lending/src/sdk/models/operations/getcommercelifetimevaluemetrics.ts @@ -1,74 +1,14 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; - -export type GetCommerceLifetimeValueMetricsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. - */ - reportDate: string; - /** - * The number of months per period. E.g. 2 = 2 months per period. - */ - periodLength: number; - /** - * The number of periods to return. There will be no pagination as a query parameter. - */ - numberOfPeriods: number; - /** - * The period unit of time returned. - */ - periodUnit: shared.PeriodUnit; - /** - * Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. - */ - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export type GetCommerceLifetimeValueMetricsRequest$Outbound = { - companyId: string; - connectionId: string; - reportDate: string; - periodLength: number; - numberOfPeriods: number; - periodUnit: string; - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export const GetCommerceLifetimeValueMetricsRequest$outboundSchema: z.ZodType< - GetCommerceLifetimeValueMetricsRequest$Outbound, - z.ZodTypeDef, - GetCommerceLifetimeValueMetricsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - reportDate: z.string(), - periodLength: z.number().int(), - numberOfPeriods: z.number().int(), - periodUnit: shared.PeriodUnit$outboundSchema, - includeDisplayNames: z.boolean().optional(), -}); - -export function getCommerceLifetimeValueMetricsRequestToJSON( - getCommerceLifetimeValueMetricsRequest: - GetCommerceLifetimeValueMetricsRequest, -): string { - return JSON.stringify( - GetCommerceLifetimeValueMetricsRequest$outboundSchema.parse( - getCommerceLifetimeValueMetricsRequest, - ), - ); +/* tslint:disable */ + +import type { PeriodUnit } from '../_speakeasy_enums'; +/* eslint-disable */ + +export interface GetCommerceLifetimeValueMetricsRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; } diff --git a/lending/src/sdk/models/operations/getcommercelocation.ts b/lending/src/sdk/models/operations/getcommercelocation.ts index 849d55cb6..d7316628d 100644 --- a/lending/src/sdk/models/operations/getcommercelocation.ts +++ b/lending/src/sdk/models/operations/getcommercelocation.ts @@ -1,46 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommerceLocationRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a location. - */ - locationId: string; -}; - -/** @internal */ -export type GetCommerceLocationRequest$Outbound = { - companyId: string; - connectionId: string; - locationId: string; -}; - -/** @internal */ -export const GetCommerceLocationRequest$outboundSchema: z.ZodType< - GetCommerceLocationRequest$Outbound, - z.ZodTypeDef, - GetCommerceLocationRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - locationId: z.string(), -}); - -export function getCommerceLocationRequestToJSON( - getCommerceLocationRequest: GetCommerceLocationRequest, -): string { - return JSON.stringify( - GetCommerceLocationRequest$outboundSchema.parse(getCommerceLocationRequest), - ); +export interface GetCommerceLocationRequest { + companyId: string; + connectionId: string; + locationId: string; } diff --git a/lending/src/sdk/models/operations/getcommerceorder.ts b/lending/src/sdk/models/operations/getcommerceorder.ts index 97c433513..b7bac3f71 100644 --- a/lending/src/sdk/models/operations/getcommerceorder.ts +++ b/lending/src/sdk/models/operations/getcommerceorder.ts @@ -1,46 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommerceOrderRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an order. - */ - orderId: string; -}; - -/** @internal */ -export type GetCommerceOrderRequest$Outbound = { - companyId: string; - connectionId: string; - orderId: string; -}; - -/** @internal */ -export const GetCommerceOrderRequest$outboundSchema: z.ZodType< - GetCommerceOrderRequest$Outbound, - z.ZodTypeDef, - GetCommerceOrderRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - orderId: z.string(), -}); - -export function getCommerceOrderRequestToJSON( - getCommerceOrderRequest: GetCommerceOrderRequest, -): string { - return JSON.stringify( - GetCommerceOrderRequest$outboundSchema.parse(getCommerceOrderRequest), - ); +export interface GetCommerceOrderRequest { + companyId: string; + connectionId: string; + orderId: string; } diff --git a/lending/src/sdk/models/operations/getcommerceordersreport.ts b/lending/src/sdk/models/operations/getcommerceordersreport.ts index 5cd6c23d7..a7ee4d8f0 100644 --- a/lending/src/sdk/models/operations/getcommerceordersreport.ts +++ b/lending/src/sdk/models/operations/getcommerceordersreport.ts @@ -1,73 +1,14 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; - -export type GetCommerceOrdersReportRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. - */ - reportDate: string; - /** - * The number of months per period. E.g. 2 = 2 months per period. - */ - periodLength: number; - /** - * The number of periods to return. There will be no pagination as a query parameter. - */ - numberOfPeriods: number; - /** - * The period unit of time returned. - */ - periodUnit: shared.PeriodUnit; - /** - * Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. - */ - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export type GetCommerceOrdersReportRequest$Outbound = { - companyId: string; - connectionId: string; - reportDate: string; - periodLength: number; - numberOfPeriods: number; - periodUnit: string; - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export const GetCommerceOrdersReportRequest$outboundSchema: z.ZodType< - GetCommerceOrdersReportRequest$Outbound, - z.ZodTypeDef, - GetCommerceOrdersReportRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - reportDate: z.string(), - periodLength: z.number().int(), - numberOfPeriods: z.number().int(), - periodUnit: shared.PeriodUnit$outboundSchema, - includeDisplayNames: z.boolean().optional(), -}); - -export function getCommerceOrdersReportRequestToJSON( - getCommerceOrdersReportRequest: GetCommerceOrdersReportRequest, -): string { - return JSON.stringify( - GetCommerceOrdersReportRequest$outboundSchema.parse( - getCommerceOrdersReportRequest, - ), - ); +/* tslint:disable */ + +import type { PeriodUnit } from '../_speakeasy_enums'; +/* eslint-disable */ + +export interface GetCommerceOrdersReportRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; } diff --git a/lending/src/sdk/models/operations/getcommercepayment.ts b/lending/src/sdk/models/operations/getcommercepayment.ts index 5f471e24e..6615bdf33 100644 --- a/lending/src/sdk/models/operations/getcommercepayment.ts +++ b/lending/src/sdk/models/operations/getcommercepayment.ts @@ -1,46 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommercePaymentRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a payment. - */ - paymentId: string; -}; - -/** @internal */ -export type GetCommercePaymentRequest$Outbound = { - companyId: string; - connectionId: string; - paymentId: string; -}; - -/** @internal */ -export const GetCommercePaymentRequest$outboundSchema: z.ZodType< - GetCommercePaymentRequest$Outbound, - z.ZodTypeDef, - GetCommercePaymentRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - paymentId: z.string(), -}); - -export function getCommercePaymentRequestToJSON( - getCommercePaymentRequest: GetCommercePaymentRequest, -): string { - return JSON.stringify( - GetCommercePaymentRequest$outboundSchema.parse(getCommercePaymentRequest), - ); +export interface GetCommercePaymentRequest { + companyId: string; + connectionId: string; + paymentId: string; } diff --git a/lending/src/sdk/models/operations/getcommercepaymentmethod.ts b/lending/src/sdk/models/operations/getcommercepaymentmethod.ts index 69df6ba54..79dcb117b 100644 --- a/lending/src/sdk/models/operations/getcommercepaymentmethod.ts +++ b/lending/src/sdk/models/operations/getcommercepaymentmethod.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommercePaymentMethodRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a payment method. - */ - paymentMethodId: string; -}; - -/** @internal */ -export type GetCommercePaymentMethodRequest$Outbound = { - companyId: string; - connectionId: string; - paymentMethodId: string; -}; - -/** @internal */ -export const GetCommercePaymentMethodRequest$outboundSchema: z.ZodType< - GetCommercePaymentMethodRequest$Outbound, - z.ZodTypeDef, - GetCommercePaymentMethodRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - paymentMethodId: z.string(), -}); - -export function getCommercePaymentMethodRequestToJSON( - getCommercePaymentMethodRequest: GetCommercePaymentMethodRequest, -): string { - return JSON.stringify( - GetCommercePaymentMethodRequest$outboundSchema.parse( - getCommercePaymentMethodRequest, - ), - ); +export interface GetCommercePaymentMethodRequest { + companyId: string; + connectionId: string; + paymentMethodId: string; } diff --git a/lending/src/sdk/models/operations/getcommerceproduct.ts b/lending/src/sdk/models/operations/getcommerceproduct.ts index 783fd2809..496e5b84d 100644 --- a/lending/src/sdk/models/operations/getcommerceproduct.ts +++ b/lending/src/sdk/models/operations/getcommerceproduct.ts @@ -1,46 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommerceProductRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a product. - */ - productId: string; -}; - -/** @internal */ -export type GetCommerceProductRequest$Outbound = { - companyId: string; - connectionId: string; - productId: string; -}; - -/** @internal */ -export const GetCommerceProductRequest$outboundSchema: z.ZodType< - GetCommerceProductRequest$Outbound, - z.ZodTypeDef, - GetCommerceProductRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - productId: z.string(), -}); - -export function getCommerceProductRequestToJSON( - getCommerceProductRequest: GetCommerceProductRequest, -): string { - return JSON.stringify( - GetCommerceProductRequest$outboundSchema.parse(getCommerceProductRequest), - ); +export interface GetCommerceProductRequest { + companyId: string; + connectionId: string; + productId: string; } diff --git a/lending/src/sdk/models/operations/getcommerceproductcategory.ts b/lending/src/sdk/models/operations/getcommerceproductcategory.ts index e7dc0c14a..aace70da1 100644 --- a/lending/src/sdk/models/operations/getcommerceproductcategory.ts +++ b/lending/src/sdk/models/operations/getcommerceproductcategory.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommerceProductCategoryRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a product. - */ - productId: string; -}; - -/** @internal */ -export type GetCommerceProductCategoryRequest$Outbound = { - companyId: string; - connectionId: string; - productId: string; -}; - -/** @internal */ -export const GetCommerceProductCategoryRequest$outboundSchema: z.ZodType< - GetCommerceProductCategoryRequest$Outbound, - z.ZodTypeDef, - GetCommerceProductCategoryRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - productId: z.string(), -}); - -export function getCommerceProductCategoryRequestToJSON( - getCommerceProductCategoryRequest: GetCommerceProductCategoryRequest, -): string { - return JSON.stringify( - GetCommerceProductCategoryRequest$outboundSchema.parse( - getCommerceProductCategoryRequest, - ), - ); +export interface GetCommerceProductCategoryRequest { + companyId: string; + connectionId: string; + productId: string; } diff --git a/lending/src/sdk/models/operations/getcommerceprofile.ts b/lending/src/sdk/models/operations/getcommerceprofile.ts index b4a156de6..f2db4516b 100644 --- a/lending/src/sdk/models/operations/getcommerceprofile.ts +++ b/lending/src/sdk/models/operations/getcommerceprofile.ts @@ -1,40 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommerceProfileRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetCommerceProfileRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetCommerceProfileRequest$outboundSchema: z.ZodType< - GetCommerceProfileRequest$Outbound, - z.ZodTypeDef, - GetCommerceProfileRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getCommerceProfileRequestToJSON( - getCommerceProfileRequest: GetCommerceProfileRequest, -): string { - return JSON.stringify( - GetCommerceProfileRequest$outboundSchema.parse(getCommerceProfileRequest), - ); +export interface GetCommerceProfileRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getcommercerefundsreport.ts b/lending/src/sdk/models/operations/getcommercerefundsreport.ts index 462333938..950e7757e 100644 --- a/lending/src/sdk/models/operations/getcommercerefundsreport.ts +++ b/lending/src/sdk/models/operations/getcommercerefundsreport.ts @@ -1,73 +1,14 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; - -export type GetCommerceRefundsReportRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. - */ - reportDate: string; - /** - * The number of months per period. E.g. 2 = 2 months per period. - */ - periodLength: number; - /** - * The number of periods to return. There will be no pagination as a query parameter. - */ - numberOfPeriods: number; - /** - * The period unit of time returned. - */ - periodUnit: shared.PeriodUnit; - /** - * Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. - */ - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export type GetCommerceRefundsReportRequest$Outbound = { - companyId: string; - connectionId: string; - reportDate: string; - periodLength: number; - numberOfPeriods: number; - periodUnit: string; - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export const GetCommerceRefundsReportRequest$outboundSchema: z.ZodType< - GetCommerceRefundsReportRequest$Outbound, - z.ZodTypeDef, - GetCommerceRefundsReportRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - reportDate: z.string(), - periodLength: z.number().int(), - numberOfPeriods: z.number().int(), - periodUnit: shared.PeriodUnit$outboundSchema, - includeDisplayNames: z.boolean().optional(), -}); - -export function getCommerceRefundsReportRequestToJSON( - getCommerceRefundsReportRequest: GetCommerceRefundsReportRequest, -): string { - return JSON.stringify( - GetCommerceRefundsReportRequest$outboundSchema.parse( - getCommerceRefundsReportRequest, - ), - ); +/* tslint:disable */ + +import type { PeriodUnit } from '../_speakeasy_enums'; +/* eslint-disable */ + +export interface GetCommerceRefundsReportRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; } diff --git a/lending/src/sdk/models/operations/getcommercerevenuemetrics.ts b/lending/src/sdk/models/operations/getcommercerevenuemetrics.ts index 00131d7ee..73364ec84 100644 --- a/lending/src/sdk/models/operations/getcommercerevenuemetrics.ts +++ b/lending/src/sdk/models/operations/getcommercerevenuemetrics.ts @@ -1,73 +1,14 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; - -export type GetCommerceRevenueMetricsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month. - */ - reportDate: string; - /** - * The number of months per period. E.g. 2 = 2 months per period. - */ - periodLength: number; - /** - * The number of periods to return. There will be no pagination as a query parameter. - */ - numberOfPeriods: number; - /** - * The period unit of time returned. - */ - periodUnit: shared.PeriodUnit; - /** - * Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable. - */ - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export type GetCommerceRevenueMetricsRequest$Outbound = { - companyId: string; - connectionId: string; - reportDate: string; - periodLength: number; - numberOfPeriods: number; - periodUnit: string; - includeDisplayNames?: boolean | undefined; -}; - -/** @internal */ -export const GetCommerceRevenueMetricsRequest$outboundSchema: z.ZodType< - GetCommerceRevenueMetricsRequest$Outbound, - z.ZodTypeDef, - GetCommerceRevenueMetricsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - reportDate: z.string(), - periodLength: z.number().int(), - numberOfPeriods: z.number().int(), - periodUnit: shared.PeriodUnit$outboundSchema, - includeDisplayNames: z.boolean().optional(), -}); - -export function getCommerceRevenueMetricsRequestToJSON( - getCommerceRevenueMetricsRequest: GetCommerceRevenueMetricsRequest, -): string { - return JSON.stringify( - GetCommerceRevenueMetricsRequest$outboundSchema.parse( - getCommerceRevenueMetricsRequest, - ), - ); +/* tslint:disable */ + +import type { PeriodUnit } from '../_speakeasy_enums'; +/* eslint-disable */ + +export interface GetCommerceRevenueMetricsRequest { + companyId: string; + connectionId: string; + reportDate: string; + periodLength: number; + numberOfPeriods: number; + periodUnit: PeriodUnit; + includeDisplayNames?: boolean; } diff --git a/lending/src/sdk/models/operations/getcommercetransaction.ts b/lending/src/sdk/models/operations/getcommercetransaction.ts index 35969102f..4f8707a47 100644 --- a/lending/src/sdk/models/operations/getcommercetransaction.ts +++ b/lending/src/sdk/models/operations/getcommercetransaction.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCommerceTransactionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a transaction. - */ - transactionId: string; -}; - -/** @internal */ -export type GetCommerceTransactionRequest$Outbound = { - companyId: string; - connectionId: string; - transactionId: string; -}; - -/** @internal */ -export const GetCommerceTransactionRequest$outboundSchema: z.ZodType< - GetCommerceTransactionRequest$Outbound, - z.ZodTypeDef, - GetCommerceTransactionRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - transactionId: z.string(), -}); - -export function getCommerceTransactionRequestToJSON( - getCommerceTransactionRequest: GetCommerceTransactionRequest, -): string { - return JSON.stringify( - GetCommerceTransactionRequest$outboundSchema.parse( - getCommerceTransactionRequest, - ), - ); +export interface GetCommerceTransactionRequest { + companyId: string; + connectionId: string; + transactionId: string; } diff --git a/lending/src/sdk/models/operations/getcompany.ts b/lending/src/sdk/models/operations/getcompany.ts index 77734decc..fc2a6e4a5 100644 --- a/lending/src/sdk/models/operations/getcompany.ts +++ b/lending/src/sdk/models/operations/getcompany.ts @@ -1,34 +1,6 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCompanyRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; -}; - -/** @internal */ -export type GetCompanyRequest$Outbound = { - companyId: string; -}; - -/** @internal */ -export const GetCompanyRequest$outboundSchema: z.ZodType< - GetCompanyRequest$Outbound, - z.ZodTypeDef, - GetCompanyRequest -> = z.object({ - companyId: z.string(), -}); - -export function getCompanyRequestToJSON( - getCompanyRequest: GetCompanyRequest, -): string { - return JSON.stringify( - GetCompanyRequest$outboundSchema.parse(getCompanyRequest), - ); +export interface GetCompanyRequest { + companyId: string; } diff --git a/lending/src/sdk/models/operations/getconnection.ts b/lending/src/sdk/models/operations/getconnection.ts index 126d23b85..0c787e45b 100644 --- a/lending/src/sdk/models/operations/getconnection.ts +++ b/lending/src/sdk/models/operations/getconnection.ts @@ -1,40 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetConnectionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetConnectionRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetConnectionRequest$outboundSchema: z.ZodType< - GetConnectionRequest$Outbound, - z.ZodTypeDef, - GetConnectionRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getConnectionRequestToJSON( - getConnectionRequest: GetConnectionRequest, -): string { - return JSON.stringify( - GetConnectionRequest$outboundSchema.parse(getConnectionRequest), - ); +export interface GetConnectionRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getcreatebanktransactionsmodel.ts b/lending/src/sdk/models/operations/getcreatebanktransactionsmodel.ts index fa76cc44f..31137de22 100644 --- a/lending/src/sdk/models/operations/getcreatebanktransactionsmodel.ts +++ b/lending/src/sdk/models/operations/getcreatebanktransactionsmodel.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCreateBankTransactionsModelRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an account. - */ - accountId: string; -}; - -/** @internal */ -export type GetCreateBankTransactionsModelRequest$Outbound = { - companyId: string; - connectionId: string; - accountId: string; -}; - -/** @internal */ -export const GetCreateBankTransactionsModelRequest$outboundSchema: z.ZodType< - GetCreateBankTransactionsModelRequest$Outbound, - z.ZodTypeDef, - GetCreateBankTransactionsModelRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - accountId: z.string(), -}); - -export function getCreateBankTransactionsModelRequestToJSON( - getCreateBankTransactionsModelRequest: GetCreateBankTransactionsModelRequest, -): string { - return JSON.stringify( - GetCreateBankTransactionsModelRequest$outboundSchema.parse( - getCreateBankTransactionsModelRequest, - ), - ); +export interface GetCreateBankTransactionsModelRequest { + companyId: string; + connectionId: string; + accountId: string; } diff --git a/lending/src/sdk/models/operations/getcreatechartofaccountsmodel.ts b/lending/src/sdk/models/operations/getcreatechartofaccountsmodel.ts index d3b2a28a6..96d055c6c 100644 --- a/lending/src/sdk/models/operations/getcreatechartofaccountsmodel.ts +++ b/lending/src/sdk/models/operations/getcreatechartofaccountsmodel.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCreateChartOfAccountsModelRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetCreateChartOfAccountsModelRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetCreateChartOfAccountsModelRequest$outboundSchema: z.ZodType< - GetCreateChartOfAccountsModelRequest$Outbound, - z.ZodTypeDef, - GetCreateChartOfAccountsModelRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getCreateChartOfAccountsModelRequestToJSON( - getCreateChartOfAccountsModelRequest: GetCreateChartOfAccountsModelRequest, -): string { - return JSON.stringify( - GetCreateChartOfAccountsModelRequest$outboundSchema.parse( - getCreateChartOfAccountsModelRequest, - ), - ); +export interface GetCreateChartOfAccountsModelRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getcreatedirectcostsmodel.ts b/lending/src/sdk/models/operations/getcreatedirectcostsmodel.ts index b9bc85011..69811e11b 100644 --- a/lending/src/sdk/models/operations/getcreatedirectcostsmodel.ts +++ b/lending/src/sdk/models/operations/getcreatedirectcostsmodel.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCreateDirectCostsModelRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetCreateDirectCostsModelRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetCreateDirectCostsModelRequest$outboundSchema: z.ZodType< - GetCreateDirectCostsModelRequest$Outbound, - z.ZodTypeDef, - GetCreateDirectCostsModelRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getCreateDirectCostsModelRequestToJSON( - getCreateDirectCostsModelRequest: GetCreateDirectCostsModelRequest, -): string { - return JSON.stringify( - GetCreateDirectCostsModelRequest$outboundSchema.parse( - getCreateDirectCostsModelRequest, - ), - ); +export interface GetCreateDirectCostsModelRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getcreateoperation.ts b/lending/src/sdk/models/operations/getcreateoperation.ts index 626bbc6a8..83b68aeae 100644 --- a/lending/src/sdk/models/operations/getcreateoperation.ts +++ b/lending/src/sdk/models/operations/getcreateoperation.ts @@ -1,40 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCreateOperationRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for the push operation. - */ - pushOperationKey: string; -}; - -/** @internal */ -export type GetCreateOperationRequest$Outbound = { - companyId: string; - pushOperationKey: string; -}; - -/** @internal */ -export const GetCreateOperationRequest$outboundSchema: z.ZodType< - GetCreateOperationRequest$Outbound, - z.ZodTypeDef, - GetCreateOperationRequest -> = z.object({ - companyId: z.string(), - pushOperationKey: z.string(), -}); - -export function getCreateOperationRequestToJSON( - getCreateOperationRequest: GetCreateOperationRequest, -): string { - return JSON.stringify( - GetCreateOperationRequest$outboundSchema.parse(getCreateOperationRequest), - ); +export interface GetCreateOperationRequest { + companyId: string; + pushOperationKey: string; } diff --git a/lending/src/sdk/models/operations/getcreatepaymentmodel.ts b/lending/src/sdk/models/operations/getcreatepaymentmodel.ts index f1c1ed9f5..297d6bdf2 100644 --- a/lending/src/sdk/models/operations/getcreatepaymentmodel.ts +++ b/lending/src/sdk/models/operations/getcreatepaymentmodel.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCreatePaymentModelRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetCreatePaymentModelRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetCreatePaymentModelRequest$outboundSchema: z.ZodType< - GetCreatePaymentModelRequest$Outbound, - z.ZodTypeDef, - GetCreatePaymentModelRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getCreatePaymentModelRequestToJSON( - getCreatePaymentModelRequest: GetCreatePaymentModelRequest, -): string { - return JSON.stringify( - GetCreatePaymentModelRequest$outboundSchema.parse( - getCreatePaymentModelRequest, - ), - ); +export interface GetCreatePaymentModelRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getcreatetransfersmodel.ts b/lending/src/sdk/models/operations/getcreatetransfersmodel.ts index 14d366b9b..5977e361a 100644 --- a/lending/src/sdk/models/operations/getcreatetransfersmodel.ts +++ b/lending/src/sdk/models/operations/getcreatetransfersmodel.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCreateTransfersModelRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetCreateTransfersModelRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetCreateTransfersModelRequest$outboundSchema: z.ZodType< - GetCreateTransfersModelRequest$Outbound, - z.ZodTypeDef, - GetCreateTransfersModelRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getCreateTransfersModelRequestToJSON( - getCreateTransfersModelRequest: GetCreateTransfersModelRequest, -): string { - return JSON.stringify( - GetCreateTransfersModelRequest$outboundSchema.parse( - getCreateTransfersModelRequest, - ), - ); +export interface GetCreateTransfersModelRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getcreateupdatebankaccountsmodel.ts b/lending/src/sdk/models/operations/getcreateupdatebankaccountsmodel.ts index 69711691d..265b54823 100644 --- a/lending/src/sdk/models/operations/getcreateupdatebankaccountsmodel.ts +++ b/lending/src/sdk/models/operations/getcreateupdatebankaccountsmodel.ts @@ -1,43 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCreateUpdateBankAccountsModelRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetCreateUpdateBankAccountsModelRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetCreateUpdateBankAccountsModelRequest$outboundSchema: z.ZodType< - GetCreateUpdateBankAccountsModelRequest$Outbound, - z.ZodTypeDef, - GetCreateUpdateBankAccountsModelRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getCreateUpdateBankAccountsModelRequestToJSON( - getCreateUpdateBankAccountsModelRequest: - GetCreateUpdateBankAccountsModelRequest, -): string { - return JSON.stringify( - GetCreateUpdateBankAccountsModelRequest$outboundSchema.parse( - getCreateUpdateBankAccountsModelRequest, - ), - ); +export interface GetCreateUpdateBankAccountsModelRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getcreateupdatesuppliersmodel.ts b/lending/src/sdk/models/operations/getcreateupdatesuppliersmodel.ts index 08ed2ce07..1e641e3c2 100644 --- a/lending/src/sdk/models/operations/getcreateupdatesuppliersmodel.ts +++ b/lending/src/sdk/models/operations/getcreateupdatesuppliersmodel.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetCreateUpdateSuppliersModelRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type GetCreateUpdateSuppliersModelRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const GetCreateUpdateSuppliersModelRequest$outboundSchema: z.ZodType< - GetCreateUpdateSuppliersModelRequest$Outbound, - z.ZodTypeDef, - GetCreateUpdateSuppliersModelRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function getCreateUpdateSuppliersModelRequestToJSON( - getCreateUpdateSuppliersModelRequest: GetCreateUpdateSuppliersModelRequest, -): string { - return JSON.stringify( - GetCreateUpdateSuppliersModelRequest$outboundSchema.parse( - getCreateUpdateSuppliersModelRequest, - ), - ); +export interface GetCreateUpdateSuppliersModelRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/getdataintegritystatus.ts b/lending/src/sdk/models/operations/getdataintegritystatus.ts index cdfe4b08c..a65274b4e 100644 --- a/lending/src/sdk/models/operations/getdataintegritystatus.ts +++ b/lending/src/sdk/models/operations/getdataintegritystatus.ts @@ -1,43 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { DataIntegrityDataType } from '../_speakeasy_enums'; +/* eslint-disable */ -export type GetDataIntegrityStatusRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * A key for a Codat data type. - */ - dataType: shared.DataIntegrityDataType; -}; - -/** @internal */ -export type GetDataIntegrityStatusRequest$Outbound = { - companyId: string; - dataType: string; -}; - -/** @internal */ -export const GetDataIntegrityStatusRequest$outboundSchema: z.ZodType< - GetDataIntegrityStatusRequest$Outbound, - z.ZodTypeDef, - GetDataIntegrityStatusRequest -> = z.object({ - companyId: z.string(), - dataType: shared.DataIntegrityDataType$outboundSchema, -}); - -export function getDataIntegrityStatusRequestToJSON( - getDataIntegrityStatusRequest: GetDataIntegrityStatusRequest, -): string { - return JSON.stringify( - GetDataIntegrityStatusRequest$outboundSchema.parse( - getDataIntegrityStatusRequest, - ), - ); +export interface GetDataIntegrityStatusRequest { + companyId: string; + dataType: DataIntegrityDataType; } diff --git a/lending/src/sdk/models/operations/getdataintegritysummaries.ts b/lending/src/sdk/models/operations/getdataintegritysummaries.ts index 9a6226e4e..78af46b4e 100644 --- a/lending/src/sdk/models/operations/getdataintegritysummaries.ts +++ b/lending/src/sdk/models/operations/getdataintegritysummaries.ts @@ -1,49 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { DataIntegrityDataType } from '../_speakeasy_enums'; +/* eslint-disable */ -export type GetDataIntegritySummariesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * A key for a Codat data type. - */ - dataType: shared.DataIntegrityDataType; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; -}; - -/** @internal */ -export type GetDataIntegritySummariesRequest$Outbound = { - companyId: string; - dataType: string; - query?: string | undefined; -}; - -/** @internal */ -export const GetDataIntegritySummariesRequest$outboundSchema: z.ZodType< - GetDataIntegritySummariesRequest$Outbound, - z.ZodTypeDef, - GetDataIntegritySummariesRequest -> = z.object({ - companyId: z.string(), - dataType: shared.DataIntegrityDataType$outboundSchema, - query: z.string().optional(), -}); - -export function getDataIntegritySummariesRequestToJSON( - getDataIntegritySummariesRequest: GetDataIntegritySummariesRequest, -): string { - return JSON.stringify( - GetDataIntegritySummariesRequest$outboundSchema.parse( - getDataIntegritySummariesRequest, - ), - ); +export interface GetDataIntegritySummariesRequest { + companyId: string; + dataType: DataIntegrityDataType; + query?: string; } diff --git a/lending/src/sdk/models/operations/getdatastatus.ts b/lending/src/sdk/models/operations/getdatastatus.ts index e53d4c2a1..5803b76c8 100644 --- a/lending/src/sdk/models/operations/getdatastatus.ts +++ b/lending/src/sdk/models/operations/getdatastatus.ts @@ -1,296 +1,6 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import * as shared from "../shared/index.js"; - -export type GetDataStatusRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; -}; - -/** - * OK - */ -export type GetDataStatusDataStatuses = { - /** - * Describes the state of data in the Codat cache for a company and data type - */ - accountTransactions?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - balanceSheet?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - bankAccounts?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - bankTransactions?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - billCreditNotes?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - billPayments?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - bills?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - cashFlowStatement?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - chartOfAccounts?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - company?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - creditNotes?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - customers?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - directCosts?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - directIncomes?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - invoices?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - itemReceipts?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - items?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - journalEntries?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - journals?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - paymentMethods?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - payments?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - profitAndLoss?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - purchaseOrders?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - salesOrders?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - suppliers?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - taxRates?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - trackingCategories?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - transfers?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - bankingAccountBalances?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - bankingAccounts?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - bankingTransactionCategories?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - bankingTransactions?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceCompanyInfo?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceCustomers?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceDisputes?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceLocations?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceOrders?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commercePaymentMethods?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commercePayments?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceProductCategories?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceProducts?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceTaxComponents?: shared.DataStatus | undefined; - /** - * Describes the state of data in the Codat cache for a company and data type - */ - commerceTransactions?: shared.DataStatus | undefined; -}; - -/** @internal */ -export type GetDataStatusRequest$Outbound = { - companyId: string; -}; - -/** @internal */ -export const GetDataStatusRequest$outboundSchema: z.ZodType< - GetDataStatusRequest$Outbound, - z.ZodTypeDef, - GetDataStatusRequest -> = z.object({ - companyId: z.string(), -}); - -export function getDataStatusRequestToJSON( - getDataStatusRequest: GetDataStatusRequest, -): string { - return JSON.stringify( - GetDataStatusRequest$outboundSchema.parse(getDataStatusRequest), - ); -} - -/** @internal */ -export const GetDataStatusDataStatuses$inboundSchema: z.ZodType< - GetDataStatusDataStatuses, - z.ZodTypeDef, - unknown -> = z.object({ - accountTransactions: shared.DataStatus$inboundSchema.optional(), - balanceSheet: shared.DataStatus$inboundSchema.optional(), - bankAccounts: shared.DataStatus$inboundSchema.optional(), - bankTransactions: shared.DataStatus$inboundSchema.optional(), - billCreditNotes: shared.DataStatus$inboundSchema.optional(), - billPayments: shared.DataStatus$inboundSchema.optional(), - bills: shared.DataStatus$inboundSchema.optional(), - cashFlowStatement: shared.DataStatus$inboundSchema.optional(), - chartOfAccounts: shared.DataStatus$inboundSchema.optional(), - company: shared.DataStatus$inboundSchema.optional(), - creditNotes: shared.DataStatus$inboundSchema.optional(), - customers: shared.DataStatus$inboundSchema.optional(), - directCosts: shared.DataStatus$inboundSchema.optional(), - directIncomes: shared.DataStatus$inboundSchema.optional(), - invoices: shared.DataStatus$inboundSchema.optional(), - itemReceipts: shared.DataStatus$inboundSchema.optional(), - items: shared.DataStatus$inboundSchema.optional(), - journalEntries: shared.DataStatus$inboundSchema.optional(), - journals: shared.DataStatus$inboundSchema.optional(), - paymentMethods: shared.DataStatus$inboundSchema.optional(), - payments: shared.DataStatus$inboundSchema.optional(), - profitAndLoss: shared.DataStatus$inboundSchema.optional(), - purchaseOrders: shared.DataStatus$inboundSchema.optional(), - salesOrders: shared.DataStatus$inboundSchema.optional(), - suppliers: shared.DataStatus$inboundSchema.optional(), - taxRates: shared.DataStatus$inboundSchema.optional(), - trackingCategories: shared.DataStatus$inboundSchema.optional(), - transfers: shared.DataStatus$inboundSchema.optional(), - "banking-accountBalances": shared.DataStatus$inboundSchema.optional(), - "banking-accounts": shared.DataStatus$inboundSchema.optional(), - "banking-transactionCategories": shared.DataStatus$inboundSchema.optional(), - "banking-transactions": shared.DataStatus$inboundSchema.optional(), - "commerce-companyInfo": shared.DataStatus$inboundSchema.optional(), - "commerce-customers": shared.DataStatus$inboundSchema.optional(), - "commerce-disputes": shared.DataStatus$inboundSchema.optional(), - "commerce-locations": shared.DataStatus$inboundSchema.optional(), - "commerce-orders": shared.DataStatus$inboundSchema.optional(), - "commerce-paymentMethods": shared.DataStatus$inboundSchema.optional(), - "commerce-payments": shared.DataStatus$inboundSchema.optional(), - "commerce-productCategories": shared.DataStatus$inboundSchema.optional(), - "commerce-products": shared.DataStatus$inboundSchema.optional(), - "commerce-taxComponents": shared.DataStatus$inboundSchema.optional(), - "commerce-transactions": shared.DataStatus$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "banking-accountBalances": "bankingAccountBalances", - "banking-accounts": "bankingAccounts", - "banking-transactionCategories": "bankingTransactionCategories", - "banking-transactions": "bankingTransactions", - "commerce-companyInfo": "commerceCompanyInfo", - "commerce-customers": "commerceCustomers", - "commerce-disputes": "commerceDisputes", - "commerce-locations": "commerceLocations", - "commerce-orders": "commerceOrders", - "commerce-paymentMethods": "commercePaymentMethods", - "commerce-payments": "commercePayments", - "commerce-productCategories": "commerceProductCategories", - "commerce-products": "commerceProducts", - "commerce-taxComponents": "commerceTaxComponents", - "commerce-transactions": "commerceTransactions", - }); -}); - -export function getDataStatusDataStatusesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetDataStatusDataStatuses$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetDataStatusDataStatuses' from JSON`, - ); +export interface GetDataStatusRequest { + companyId: string; } diff --git a/lending/src/sdk/models/operations/getexcelreportgenerationstatus.ts b/lending/src/sdk/models/operations/getexcelreportgenerationstatus.ts index 48964d56e..1935d5b70 100644 --- a/lending/src/sdk/models/operations/getexcelreportgenerationstatus.ts +++ b/lending/src/sdk/models/operations/getexcelreportgenerationstatus.ts @@ -1,43 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { ExcelReportTypes } from '../shared/excelreporttypes'; +/* eslint-disable */ -export type GetExcelReportGenerationStatusRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * The type of report you want to generate and download. - */ - reportType: shared.ExcelReportTypes; -}; - -/** @internal */ -export type GetExcelReportGenerationStatusRequest$Outbound = { - companyId: string; - reportType: string; -}; - -/** @internal */ -export const GetExcelReportGenerationStatusRequest$outboundSchema: z.ZodType< - GetExcelReportGenerationStatusRequest$Outbound, - z.ZodTypeDef, - GetExcelReportGenerationStatusRequest -> = z.object({ - companyId: z.string(), - reportType: shared.ExcelReportTypes$outboundSchema, -}); - -export function getExcelReportGenerationStatusRequestToJSON( - getExcelReportGenerationStatusRequest: GetExcelReportGenerationStatusRequest, -): string { - return JSON.stringify( - GetExcelReportGenerationStatusRequest$outboundSchema.parse( - getExcelReportGenerationStatusRequest, - ), - ); +export interface GetExcelReportGenerationStatusRequest { + companyId: string; + reportType: ExcelReportTypes; } diff --git a/lending/src/sdk/models/operations/getloansummary.ts b/lending/src/sdk/models/operations/getloansummary.ts index 19343ac07..d70a9756f 100644 --- a/lending/src/sdk/models/operations/getloansummary.ts +++ b/lending/src/sdk/models/operations/getloansummary.ts @@ -1,61 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; +import type { GetLoanSummaryQueryParamSourceType } from '../_speakeasy_enums'; +/* eslint-disable */ -/** - * Data source type. - */ -export const GetLoanSummaryQueryParamSourceType = { - Banking: "banking", - Commerce: "commerce", - Accounting: "accounting", -} as const; -/** - * Data source type. - */ -export type GetLoanSummaryQueryParamSourceType = ClosedEnum< - typeof GetLoanSummaryQueryParamSourceType ->; - -export type GetLoanSummaryRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Data source type. - */ - sourceType: GetLoanSummaryQueryParamSourceType; -}; - -/** @internal */ -export const GetLoanSummaryQueryParamSourceType$outboundSchema: z.ZodNativeEnum< - typeof GetLoanSummaryQueryParamSourceType -> = z.nativeEnum(GetLoanSummaryQueryParamSourceType); - -/** @internal */ -export type GetLoanSummaryRequest$Outbound = { - companyId: string; - sourceType: string; -}; - -/** @internal */ -export const GetLoanSummaryRequest$outboundSchema: z.ZodType< - GetLoanSummaryRequest$Outbound, - z.ZodTypeDef, - GetLoanSummaryRequest -> = z.object({ - companyId: z.string(), - sourceType: GetLoanSummaryQueryParamSourceType$outboundSchema, -}); - -export function getLoanSummaryRequestToJSON( - getLoanSummaryRequest: GetLoanSummaryRequest, -): string { - return JSON.stringify( - GetLoanSummaryRequest$outboundSchema.parse(getLoanSummaryRequest), - ); +export interface GetLoanSummaryRequest { + companyId: string; + sourceType: GetLoanSummaryQueryParamSourceType; } diff --git a/lending/src/sdk/models/operations/getpulloperation.ts b/lending/src/sdk/models/operations/getpulloperation.ts index 2df9079da..3eda7bf20 100644 --- a/lending/src/sdk/models/operations/getpulloperation.ts +++ b/lending/src/sdk/models/operations/getpulloperation.ts @@ -1,40 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type GetPullOperationRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for the dataset that completed its sync. - */ - datasetId: string; -}; - -/** @internal */ -export type GetPullOperationRequest$Outbound = { - companyId: string; - datasetId: string; -}; - -/** @internal */ -export const GetPullOperationRequest$outboundSchema: z.ZodType< - GetPullOperationRequest$Outbound, - z.ZodTypeDef, - GetPullOperationRequest -> = z.object({ - companyId: z.string(), - datasetId: z.string(), -}); - -export function getPullOperationRequestToJSON( - getPullOperationRequest: GetPullOperationRequest, -): string { - return JSON.stringify( - GetPullOperationRequest$outboundSchema.parse(getPullOperationRequest), - ); +export interface GetPullOperationRequest { + companyId: string; + datasetId: string; } diff --git a/lending/src/sdk/models/operations/index.ts b/lending/src/sdk/models/operations/index.ts index 5eed5c486..c01b176bd 100644 --- a/lending/src/sdk/models/operations/index.ts +++ b/lending/src/sdk/models/operations/index.ts @@ -1,153 +1,162 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -export * from "./createaccount.js"; -export * from "./createbankaccount.js"; -export * from "./createbankaccountmapping.js"; -export * from "./createbanktransactions.js"; -export * from "./createconnection.js"; -export * from "./createdirectcost.js"; -export * from "./createpayment.js"; -export * from "./createsourceaccount.js"; -export * from "./createsupplier.js"; -export * from "./createtransfer.js"; -export * from "./deletecompany.js"; -export * from "./deleteconnection.js"; -export * from "./downloadaccountingbillattachment.js"; -export * from "./downloadaccountingcustomerattachment.js"; -export * from "./downloadaccountingdirectcostattachment.js"; -export * from "./downloadaccountingdirectincomeattachment.js"; -export * from "./downloadaccountinginvoiceattachment.js"; -export * from "./downloadaccountinginvoicepdf.js"; -export * from "./downloadaccountingsupplierattachment.js"; -export * from "./downloadexcelreport.js"; -export * from "./downloadfiles.js"; -export * from "./endbankstatementuploadsession.js"; -export * from "./generateexcelreport.js"; -export * from "./generateloansummary.js"; -export * from "./generateloantransactions.js"; -export * from "./generatereport.js"; -export * from "./getaccountingaccount.js"; -export * from "./getaccountingaccounttransaction.js"; -export * from "./getaccountingagedcreditorsreport.js"; -export * from "./getaccountingageddebtorsreport.js"; -export * from "./getaccountingbalancesheet.js"; -export * from "./getaccountingbankaccount.js"; -export * from "./getaccountingbill.js"; -export * from "./getaccountingbillattachment.js"; -export * from "./getaccountingbillcreditnote.js"; -export * from "./getaccountingbillpayment.js"; -export * from "./getaccountingcashflowstatement.js"; -export * from "./getaccountingcreditnote.js"; -export * from "./getaccountingcustomer.js"; -export * from "./getaccountingcustomerattachment.js"; -export * from "./getaccountingdirectcost.js"; -export * from "./getaccountingdirectcostattachment.js"; -export * from "./getaccountingdirectincome.js"; -export * from "./getaccountingdirectincomeattachment.js"; -export * from "./getaccountinginvoice.js"; -export * from "./getaccountinginvoiceattachment.js"; -export * from "./getaccountingjournal.js"; -export * from "./getaccountingjournalentry.js"; -export * from "./getaccountingpayment.js"; -export * from "./getaccountingprofile.js"; -export * from "./getaccountingprofitandloss.js"; -export * from "./getaccountingsupplier.js"; -export * from "./getaccountingsupplierattachment.js"; -export * from "./getaccountingtransfer.js"; -export * from "./getbankaccountmapping.js"; -export * from "./getbankingaccount.js"; -export * from "./getbankingtransaction.js"; -export * from "./getbankingtransactioncategory.js"; -export * from "./getbankstatementuploadconfiguration.js"; -export * from "./getcategorizedbalancesheetstatement.js"; -export * from "./getcategorizedbankstatement.js"; -export * from "./getcategorizedprofitandlossstatement.js"; -export * from "./getcommercecustomer.js"; -export * from "./getcommercecustomerretentionmetrics.js"; -export * from "./getcommercedispute.js"; -export * from "./getcommercelifetimevaluemetrics.js"; -export * from "./getcommercelocation.js"; -export * from "./getcommerceorder.js"; -export * from "./getcommerceordersreport.js"; -export * from "./getcommercepayment.js"; -export * from "./getcommercepaymentmethod.js"; -export * from "./getcommerceproduct.js"; -export * from "./getcommerceproductcategory.js"; -export * from "./getcommerceprofile.js"; -export * from "./getcommercerefundsreport.js"; -export * from "./getcommercerevenuemetrics.js"; -export * from "./getcommercetransaction.js"; -export * from "./getcompany.js"; -export * from "./getconnection.js"; -export * from "./getcreatebanktransactionsmodel.js"; -export * from "./getcreatechartofaccountsmodel.js"; -export * from "./getcreatedirectcostsmodel.js"; -export * from "./getcreateoperation.js"; -export * from "./getcreatepaymentmodel.js"; -export * from "./getcreatetransfersmodel.js"; -export * from "./getcreateupdatebankaccountsmodel.js"; -export * from "./getcreateupdatesuppliersmodel.js"; -export * from "./getdataintegritystatus.js"; -export * from "./getdataintegritysummaries.js"; -export * from "./getdatastatus.js"; -export * from "./getexcelreportgenerationstatus.js"; -export * from "./getloansummary.js"; -export * from "./getpulloperation.js"; -export * from "./isagedcreditorsreportavailable.js"; -export * from "./isageddebtorsreportavailable.js"; -export * from "./listaccountingaccounts.js"; -export * from "./listaccountingaccounttransactions.js"; -export * from "./listaccountingbankaccounts.js"; -export * from "./listaccountingbankaccounttransactions.js"; -export * from "./listaccountingbillattachments.js"; -export * from "./listaccountingbillcreditnotes.js"; -export * from "./listaccountingbillpayments.js"; -export * from "./listaccountingbills.js"; -export * from "./listaccountingcreditnotes.js"; -export * from "./listaccountingcustomerattachments.js"; -export * from "./listaccountingcustomers.js"; -export * from "./listaccountingdirectcostattachments.js"; -export * from "./listaccountingdirectcosts.js"; -export * from "./listaccountingdirectincomeattachments.js"; -export * from "./listaccountingdirectincomes.js"; -export * from "./listaccountinginvoiceattachments.js"; -export * from "./listaccountinginvoices.js"; -export * from "./listaccountingjournalentries.js"; -export * from "./listaccountingjournals.js"; -export * from "./listaccountingpayments.js"; -export * from "./listaccountingsupplierattachments.js"; -export * from "./listaccountingsuppliers.js"; -export * from "./listaccountingtransfers.js"; -export * from "./listbankingaccountbalances.js"; -export * from "./listbankingaccounts.js"; -export * from "./listbankingtransactioncategories.js"; -export * from "./listbankingtransactions.js"; -export * from "./listcommercecustomers.js"; -export * from "./listcommercedisputes.js"; -export * from "./listcommercelocations.js"; -export * from "./listcommerceorders.js"; -export * from "./listcommercepaymentmethods.js"; -export * from "./listcommercepayments.js"; -export * from "./listcommerceproductcategories.js"; -export * from "./listcommerceproducts.js"; -export * from "./listcommercetransactions.js"; -export * from "./listcompanies.js"; -export * from "./listconnections.js"; -export * from "./listcreateoperations.js"; -export * from "./listdataintegritydetails.js"; -export * from "./listfiles.js"; -export * from "./listloantransactions.js"; -export * from "./listpulloperations.js"; -export * from "./listreconciledinvoices.js"; -export * from "./listreports.js"; -export * from "./refreshalldatatypes.js"; -export * from "./refreshdatatype.js"; -export * from "./replacecompany.js"; -export * from "./setbankstatementuploadconfiguration.js"; -export * from "./startbankstatementuploadsession.js"; -export * from "./unlinkconnection.js"; -export * from "./updatecompany.js"; -export * from "./uploadbankstatementdata.js"; -export * from "./uploadfiles.js"; +export * from './createaccount'; +export * from './createbankaccountmapping'; +export * from './createbankaccount'; +export * from './createbanktransactions'; +export * from './createconnection'; +export * from './createconnectionrequestbody'; +export * from './createdirectcost'; +export * from './createpayment'; +export * from './createsourceaccount'; +export * from './createsourceaccountrequestbody'; +export * from './createsupplier'; +export * from './createtransfer'; +export * from './deletecompany'; +export * from './deleteconnection'; +export * from './downloadaccountingbillattachment'; +export * from './downloadaccountingcustomerattachment'; +export * from './downloadaccountingdirectcostattachment'; +export * from './downloadaccountingdirectincomeattachment'; +export * from './downloadaccountinginvoiceattachment'; +export * from './downloadaccountinginvoicepdf'; +export * from './downloadaccountingsupplierattachment'; +export * from './downloadexcelreport'; +export * from './downloadfiles'; +export * from './endbankstatementuploadsession'; +export * from './generateexcelreport'; +export * from './generateloansummary'; +export * from './generateloantransactions'; +export * from './generatereport'; +export * from './getaccountingaccount'; +export * from './getaccountingaccounttransaction'; +export * from './getaccountingagedcreditorsreport'; +export * from './getaccountingageddebtorsreport'; +export * from './getaccountingbalancesheet'; +export * from './getaccountingbankaccount'; +export * from './getaccountingbillattachment'; +export * from './getaccountingbillcreditnote'; +export * from './getaccountingbillpayment'; +export * from './getaccountingbill'; +export * from './getaccountingcashflowstatement'; +export * from './getaccountingcreditnote'; +export * from './getaccountingcustomerattachment'; +export * from './getaccountingcustomer'; +export * from './getaccountingdirectcostattachment'; +export * from './getaccountingdirectcost'; +export * from './getaccountingdirectincomeattachment'; +export * from './getaccountingdirectincome'; +export * from './getaccountinginvoiceattachment'; +export * from './getaccountinginvoice'; +export * from './getaccountingjournalentry'; +export * from './getaccountingjournal'; +export * from './getaccountingpayment'; +export * from './getaccountingprofile'; +export * from './getaccountingprofitandloss'; +export * from './getaccountingsupplierattachment'; +export * from './getaccountingsupplier'; +export * from './getaccountingtransfer'; +export * from './getbankaccountmapping'; +export * from './getbankstatementuploadconfiguration'; +export * from './getbankingaccount'; +export * from './getbankingtransactioncategory'; +export * from './getbankingtransaction'; +export * from './getcategorizedbalancesheetstatement'; +export * from './getcategorizedbankstatement'; +export * from './getcategorizedprofitandlossstatement'; +export * from './getcommercecustomer'; +export * from './getcommercecustomerretentionmetrics'; +export * from './getcommercedispute'; +export * from './getcommercelifetimevaluemetrics'; +export * from './getcommercelocation'; +export * from './getcommerceorder'; +export * from './getcommerceordersreport'; +export * from './getcommercepaymentmethod'; +export * from './getcommercepayment'; +export * from './getcommerceproductcategory'; +export * from './getcommerceproduct'; +export * from './getcommerceprofile'; +export * from './getcommercerefundsreport'; +export * from './getcommercerevenuemetrics'; +export * from './getcommercetransaction'; +export * from './getcompany'; +export * from './getconnection'; +export * from './getcreatebanktransactionsmodel'; +export * from './getcreatechartofaccountsmodel'; +export * from './getcreatedirectcostsmodel'; +export * from './getcreateoperation'; +export * from './getcreatepaymentmodel'; +export * from './getcreatetransfersmodel'; +export * from './getcreateupdatebankaccountsmodel'; +export * from './getcreateupdatesuppliersmodel'; +export * from './getdataintegritystatus'; +export * from './getdataintegritysummaries'; +export * from './getdatastatus'; +export * from './getexcelreportgenerationstatus'; +export * from './getloansummary'; +export * from './getpulloperation'; +export * from './isagedcreditorsreportavailable'; +export * from './isageddebtorsreportavailable'; +export * from './listaccountingaccounttransactions'; +export * from './listaccountingaccounts'; +export * from './listaccountingbankaccounttransactions'; +export * from './listaccountingbankaccounts'; +export * from './listaccountingbillattachments'; +export * from './listaccountingbillcreditnotes'; +export * from './listaccountingbillpayments'; +export * from './listaccountingbills'; +export * from './listaccountingcreditnotes'; +export * from './listaccountingcustomerattachments'; +export * from './listaccountingcustomers'; +export * from './listaccountingdirectcostattachments'; +export * from './listaccountingdirectcosts'; +export * from './listaccountingdirectincomeattachments'; +export * from './listaccountingdirectincomes'; +export * from './listaccountinginvoiceattachments'; +export * from './listaccountinginvoices'; +export * from './listaccountingjournalentries'; +export * from './listaccountingjournals'; +export * from './listaccountingpayments'; +export * from './listaccountingsupplierattachments'; +export * from './listaccountingsuppliers'; +export * from './listaccountingtransfers'; +export * from './listbankingaccountbalances'; +export * from './listbankingaccounts'; +export * from './listbankingtransactioncategories'; +export * from './listbankingtransactions'; +export * from './listcommercecustomers'; +export * from './listcommercedisputes'; +export * from './listcommercelocations'; +export * from './listcommerceorders'; +export * from './listcommercepaymentmethods'; +export * from './listcommercepayments'; +export * from './listcommerceproductcategories'; +export * from './listcommerceproducts'; +export * from './listcommercetransactions'; +export * from './listcompanies'; +export * from './listconnections'; +export * from './listcreateoperations'; +export * from './listdataintegritydetails'; +export * from './listfiles'; +export * from './listloantransactions'; +export * from './listpulloperations'; +export * from './listreconciledinvoices'; +export * from './listreports'; +export * from './refreshalldatatypes'; +export * from './refreshdatatype'; +export * from './replacecompany'; +export * from './setbankstatementuploadconfiguration'; +export * from './startbankstatementuploadsession'; +export * from './unlinkconnection'; +export * from './updatecompany'; +export * from './uploadbankstatementdata'; +export * from './uploadbankstatementdatarequestbody'; +export * from './uploadfiles'; +export { CreateSourceAccountResponseBody } from '../_speakeasy_operations'; +export { GenerateLoanSummaryQueryParamSourceType } from '../_speakeasy_enums'; +export { GetDataStatusDataStatuses } from '../DataStatuses'; +export { GetLoanSummaryQueryParamSourceType } from '../_speakeasy_enums'; +export { QueryParamSourceType } from '../_speakeasy_enums'; +export { SourceType } from '../_speakeasy_enums'; +export { UnlinkConnectionUpdateConnection } from '../UpdateConnection'; diff --git a/lending/src/sdk/models/operations/isagedcreditorsreportavailable.ts b/lending/src/sdk/models/operations/isagedcreditorsreportavailable.ts index cc414eed1..bb09ea43a 100644 --- a/lending/src/sdk/models/operations/isagedcreditorsreportavailable.ts +++ b/lending/src/sdk/models/operations/isagedcreditorsreportavailable.ts @@ -1,36 +1,6 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type IsAgedCreditorsReportAvailableRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; -}; - -/** @internal */ -export type IsAgedCreditorsReportAvailableRequest$Outbound = { - companyId: string; -}; - -/** @internal */ -export const IsAgedCreditorsReportAvailableRequest$outboundSchema: z.ZodType< - IsAgedCreditorsReportAvailableRequest$Outbound, - z.ZodTypeDef, - IsAgedCreditorsReportAvailableRequest -> = z.object({ - companyId: z.string(), -}); - -export function isAgedCreditorsReportAvailableRequestToJSON( - isAgedCreditorsReportAvailableRequest: IsAgedCreditorsReportAvailableRequest, -): string { - return JSON.stringify( - IsAgedCreditorsReportAvailableRequest$outboundSchema.parse( - isAgedCreditorsReportAvailableRequest, - ), - ); +export interface IsAgedCreditorsReportAvailableRequest { + companyId: string; } diff --git a/lending/src/sdk/models/operations/isageddebtorsreportavailable.ts b/lending/src/sdk/models/operations/isageddebtorsreportavailable.ts index cbf20bbdb..04be85381 100644 --- a/lending/src/sdk/models/operations/isageddebtorsreportavailable.ts +++ b/lending/src/sdk/models/operations/isageddebtorsreportavailable.ts @@ -1,36 +1,6 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type IsAgedDebtorsReportAvailableRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; -}; - -/** @internal */ -export type IsAgedDebtorsReportAvailableRequest$Outbound = { - companyId: string; -}; - -/** @internal */ -export const IsAgedDebtorsReportAvailableRequest$outboundSchema: z.ZodType< - IsAgedDebtorsReportAvailableRequest$Outbound, - z.ZodTypeDef, - IsAgedDebtorsReportAvailableRequest -> = z.object({ - companyId: z.string(), -}); - -export function isAgedDebtorsReportAvailableRequestToJSON( - isAgedDebtorsReportAvailableRequest: IsAgedDebtorsReportAvailableRequest, -): string { - return JSON.stringify( - IsAgedDebtorsReportAvailableRequest$outboundSchema.parse( - isAgedDebtorsReportAvailableRequest, - ), - ); +export interface IsAgedDebtorsReportAvailableRequest { + companyId: string; } diff --git a/lending/src/sdk/models/operations/listaccountingaccounts.ts b/lending/src/sdk/models/operations/listaccountingaccounts.ts index 4c338218e..a384fb488 100644 --- a/lending/src/sdk/models/operations/listaccountingaccounts.ts +++ b/lending/src/sdk/models/operations/listaccountingaccounts.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingAccountsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingAccountsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingAccountsRequest$outboundSchema: z.ZodType< - ListAccountingAccountsRequest$Outbound, - z.ZodTypeDef, - ListAccountingAccountsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingAccountsRequestToJSON( - listAccountingAccountsRequest: ListAccountingAccountsRequest, -): string { - return JSON.stringify( - ListAccountingAccountsRequest$outboundSchema.parse( - listAccountingAccountsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingAccountsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingaccounttransactions.ts b/lending/src/sdk/models/operations/listaccountingaccounttransactions.ts index 8f5faed7d..d94c872d6 100644 --- a/lending/src/sdk/models/operations/listaccountingaccounttransactions.ts +++ b/lending/src/sdk/models/operations/listaccountingaccounttransactions.ts @@ -1,67 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingAccountTransactionsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingAccountTransactionsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingAccountTransactionsRequest$outboundSchema: z.ZodType< - ListAccountingAccountTransactionsRequest$Outbound, - z.ZodTypeDef, - ListAccountingAccountTransactionsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingAccountTransactionsRequestToJSON( - listAccountingAccountTransactionsRequest: - ListAccountingAccountTransactionsRequest, -): string { - return JSON.stringify( - ListAccountingAccountTransactionsRequest$outboundSchema.parse( - listAccountingAccountTransactionsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingAccountTransactionsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingbankaccounts.ts b/lending/src/sdk/models/operations/listaccountingbankaccounts.ts index 735c6ef70..c11313943 100644 --- a/lending/src/sdk/models/operations/listaccountingbankaccounts.ts +++ b/lending/src/sdk/models/operations/listaccountingbankaccounts.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingBankAccountsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingBankAccountsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingBankAccountsRequest$outboundSchema: z.ZodType< - ListAccountingBankAccountsRequest$Outbound, - z.ZodTypeDef, - ListAccountingBankAccountsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingBankAccountsRequestToJSON( - listAccountingBankAccountsRequest: ListAccountingBankAccountsRequest, -): string { - return JSON.stringify( - ListAccountingBankAccountsRequest$outboundSchema.parse( - listAccountingBankAccountsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingBankAccountsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingbankaccounttransactions.ts b/lending/src/sdk/models/operations/listaccountingbankaccounttransactions.ts index b60d20206..abdea86cd 100644 --- a/lending/src/sdk/models/operations/listaccountingbankaccounttransactions.ts +++ b/lending/src/sdk/models/operations/listaccountingbankaccounttransactions.ts @@ -1,74 +1,12 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingBankAccountTransactionsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an account. - */ - accountId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingBankAccountTransactionsRequest$Outbound = { - companyId: string; - connectionId: string; - accountId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingBankAccountTransactionsRequest$outboundSchema: - z.ZodType< - ListAccountingBankAccountTransactionsRequest$Outbound, - z.ZodTypeDef, - ListAccountingBankAccountTransactionsRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - accountId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), - }); - -export function listAccountingBankAccountTransactionsRequestToJSON( - listAccountingBankAccountTransactionsRequest: - ListAccountingBankAccountTransactionsRequest, -): string { - return JSON.stringify( - ListAccountingBankAccountTransactionsRequest$outboundSchema.parse( - listAccountingBankAccountTransactionsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingBankAccountTransactionsRequest { + companyId: string; + connectionId: string; + accountId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingbillattachments.ts b/lending/src/sdk/models/operations/listaccountingbillattachments.ts index 39bb3dba8..0886d64f2 100644 --- a/lending/src/sdk/models/operations/listaccountingbillattachments.ts +++ b/lending/src/sdk/models/operations/listaccountingbillattachments.ts @@ -1,48 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type ListAccountingBillAttachmentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a bill. - */ - billId: string; -}; - -/** @internal */ -export type ListAccountingBillAttachmentsRequest$Outbound = { - companyId: string; - connectionId: string; - billId: string; -}; - -/** @internal */ -export const ListAccountingBillAttachmentsRequest$outboundSchema: z.ZodType< - ListAccountingBillAttachmentsRequest$Outbound, - z.ZodTypeDef, - ListAccountingBillAttachmentsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - billId: z.string(), -}); - -export function listAccountingBillAttachmentsRequestToJSON( - listAccountingBillAttachmentsRequest: ListAccountingBillAttachmentsRequest, -): string { - return JSON.stringify( - ListAccountingBillAttachmentsRequest$outboundSchema.parse( - listAccountingBillAttachmentsRequest, - ), - ); +export interface ListAccountingBillAttachmentsRequest { + companyId: string; + connectionId: string; + billId: string; } diff --git a/lending/src/sdk/models/operations/listaccountingbillcreditnotes.ts b/lending/src/sdk/models/operations/listaccountingbillcreditnotes.ts index 31cc8a2e6..3b140fa21 100644 --- a/lending/src/sdk/models/operations/listaccountingbillcreditnotes.ts +++ b/lending/src/sdk/models/operations/listaccountingbillcreditnotes.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingBillCreditNotesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingBillCreditNotesRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingBillCreditNotesRequest$outboundSchema: z.ZodType< - ListAccountingBillCreditNotesRequest$Outbound, - z.ZodTypeDef, - ListAccountingBillCreditNotesRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingBillCreditNotesRequestToJSON( - listAccountingBillCreditNotesRequest: ListAccountingBillCreditNotesRequest, -): string { - return JSON.stringify( - ListAccountingBillCreditNotesRequest$outboundSchema.parse( - listAccountingBillCreditNotesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingBillCreditNotesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingbillpayments.ts b/lending/src/sdk/models/operations/listaccountingbillpayments.ts index 2f5b0875c..3764aaa1a 100644 --- a/lending/src/sdk/models/operations/listaccountingbillpayments.ts +++ b/lending/src/sdk/models/operations/listaccountingbillpayments.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingBillPaymentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingBillPaymentsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingBillPaymentsRequest$outboundSchema: z.ZodType< - ListAccountingBillPaymentsRequest$Outbound, - z.ZodTypeDef, - ListAccountingBillPaymentsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingBillPaymentsRequestToJSON( - listAccountingBillPaymentsRequest: ListAccountingBillPaymentsRequest, -): string { - return JSON.stringify( - ListAccountingBillPaymentsRequest$outboundSchema.parse( - listAccountingBillPaymentsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingBillPaymentsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingbills.ts b/lending/src/sdk/models/operations/listaccountingbills.ts index ffb992688..5d174aa6d 100644 --- a/lending/src/sdk/models/operations/listaccountingbills.ts +++ b/lending/src/sdk/models/operations/listaccountingbills.ts @@ -1,58 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingBillsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingBillsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingBillsRequest$outboundSchema: z.ZodType< - ListAccountingBillsRequest$Outbound, - z.ZodTypeDef, - ListAccountingBillsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingBillsRequestToJSON( - listAccountingBillsRequest: ListAccountingBillsRequest, -): string { - return JSON.stringify( - ListAccountingBillsRequest$outboundSchema.parse(listAccountingBillsRequest), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingBillsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingcreditnotes.ts b/lending/src/sdk/models/operations/listaccountingcreditnotes.ts index 6a74aa73b..af65d589a 100644 --- a/lending/src/sdk/models/operations/listaccountingcreditnotes.ts +++ b/lending/src/sdk/models/operations/listaccountingcreditnotes.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingCreditNotesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingCreditNotesRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingCreditNotesRequest$outboundSchema: z.ZodType< - ListAccountingCreditNotesRequest$Outbound, - z.ZodTypeDef, - ListAccountingCreditNotesRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingCreditNotesRequestToJSON( - listAccountingCreditNotesRequest: ListAccountingCreditNotesRequest, -): string { - return JSON.stringify( - ListAccountingCreditNotesRequest$outboundSchema.parse( - listAccountingCreditNotesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingCreditNotesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingcustomerattachments.ts b/lending/src/sdk/models/operations/listaccountingcustomerattachments.ts index 35be945b2..57f232015 100644 --- a/lending/src/sdk/models/operations/listaccountingcustomerattachments.ts +++ b/lending/src/sdk/models/operations/listaccountingcustomerattachments.ts @@ -1,49 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type ListAccountingCustomerAttachmentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a customer. - */ - customerId: string; -}; - -/** @internal */ -export type ListAccountingCustomerAttachmentsRequest$Outbound = { - companyId: string; - connectionId: string; - customerId: string; -}; - -/** @internal */ -export const ListAccountingCustomerAttachmentsRequest$outboundSchema: z.ZodType< - ListAccountingCustomerAttachmentsRequest$Outbound, - z.ZodTypeDef, - ListAccountingCustomerAttachmentsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - customerId: z.string(), -}); - -export function listAccountingCustomerAttachmentsRequestToJSON( - listAccountingCustomerAttachmentsRequest: - ListAccountingCustomerAttachmentsRequest, -): string { - return JSON.stringify( - ListAccountingCustomerAttachmentsRequest$outboundSchema.parse( - listAccountingCustomerAttachmentsRequest, - ), - ); +export interface ListAccountingCustomerAttachmentsRequest { + companyId: string; + connectionId: string; + customerId: string; } diff --git a/lending/src/sdk/models/operations/listaccountingcustomers.ts b/lending/src/sdk/models/operations/listaccountingcustomers.ts index c778fc46d..7071e1c24 100644 --- a/lending/src/sdk/models/operations/listaccountingcustomers.ts +++ b/lending/src/sdk/models/operations/listaccountingcustomers.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingCustomersRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingCustomersRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingCustomersRequest$outboundSchema: z.ZodType< - ListAccountingCustomersRequest$Outbound, - z.ZodTypeDef, - ListAccountingCustomersRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingCustomersRequestToJSON( - listAccountingCustomersRequest: ListAccountingCustomersRequest, -): string { - return JSON.stringify( - ListAccountingCustomersRequest$outboundSchema.parse( - listAccountingCustomersRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingCustomersRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingdirectcostattachments.ts b/lending/src/sdk/models/operations/listaccountingdirectcostattachments.ts index 7e846a759..628c2ccf3 100644 --- a/lending/src/sdk/models/operations/listaccountingdirectcostattachments.ts +++ b/lending/src/sdk/models/operations/listaccountingdirectcostattachments.ts @@ -1,50 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type ListAccountingDirectCostAttachmentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a direct cost. - */ - directCostId: string; -}; - -/** @internal */ -export type ListAccountingDirectCostAttachmentsRequest$Outbound = { - companyId: string; - connectionId: string; - directCostId: string; -}; - -/** @internal */ -export const ListAccountingDirectCostAttachmentsRequest$outboundSchema: - z.ZodType< - ListAccountingDirectCostAttachmentsRequest$Outbound, - z.ZodTypeDef, - ListAccountingDirectCostAttachmentsRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - directCostId: z.string(), - }); - -export function listAccountingDirectCostAttachmentsRequestToJSON( - listAccountingDirectCostAttachmentsRequest: - ListAccountingDirectCostAttachmentsRequest, -): string { - return JSON.stringify( - ListAccountingDirectCostAttachmentsRequest$outboundSchema.parse( - listAccountingDirectCostAttachmentsRequest, - ), - ); +export interface ListAccountingDirectCostAttachmentsRequest { + companyId: string; + connectionId: string; + directCostId: string; } diff --git a/lending/src/sdk/models/operations/listaccountingdirectcosts.ts b/lending/src/sdk/models/operations/listaccountingdirectcosts.ts index 419f50f22..8ae283b73 100644 --- a/lending/src/sdk/models/operations/listaccountingdirectcosts.ts +++ b/lending/src/sdk/models/operations/listaccountingdirectcosts.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingDirectCostsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingDirectCostsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingDirectCostsRequest$outboundSchema: z.ZodType< - ListAccountingDirectCostsRequest$Outbound, - z.ZodTypeDef, - ListAccountingDirectCostsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingDirectCostsRequestToJSON( - listAccountingDirectCostsRequest: ListAccountingDirectCostsRequest, -): string { - return JSON.stringify( - ListAccountingDirectCostsRequest$outboundSchema.parse( - listAccountingDirectCostsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingDirectCostsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingdirectincomeattachments.ts b/lending/src/sdk/models/operations/listaccountingdirectincomeattachments.ts index 4b5861702..c863a8d36 100644 --- a/lending/src/sdk/models/operations/listaccountingdirectincomeattachments.ts +++ b/lending/src/sdk/models/operations/listaccountingdirectincomeattachments.ts @@ -1,50 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type ListAccountingDirectIncomeAttachmentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a direct income. - */ - directIncomeId: string; -}; - -/** @internal */ -export type ListAccountingDirectIncomeAttachmentsRequest$Outbound = { - companyId: string; - connectionId: string; - directIncomeId: string; -}; - -/** @internal */ -export const ListAccountingDirectIncomeAttachmentsRequest$outboundSchema: - z.ZodType< - ListAccountingDirectIncomeAttachmentsRequest$Outbound, - z.ZodTypeDef, - ListAccountingDirectIncomeAttachmentsRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - directIncomeId: z.string(), - }); - -export function listAccountingDirectIncomeAttachmentsRequestToJSON( - listAccountingDirectIncomeAttachmentsRequest: - ListAccountingDirectIncomeAttachmentsRequest, -): string { - return JSON.stringify( - ListAccountingDirectIncomeAttachmentsRequest$outboundSchema.parse( - listAccountingDirectIncomeAttachmentsRequest, - ), - ); +export interface ListAccountingDirectIncomeAttachmentsRequest { + companyId: string; + connectionId: string; + directIncomeId: string; } diff --git a/lending/src/sdk/models/operations/listaccountingdirectincomes.ts b/lending/src/sdk/models/operations/listaccountingdirectincomes.ts index 846d038f7..117ef7a76 100644 --- a/lending/src/sdk/models/operations/listaccountingdirectincomes.ts +++ b/lending/src/sdk/models/operations/listaccountingdirectincomes.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingDirectIncomesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingDirectIncomesRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingDirectIncomesRequest$outboundSchema: z.ZodType< - ListAccountingDirectIncomesRequest$Outbound, - z.ZodTypeDef, - ListAccountingDirectIncomesRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingDirectIncomesRequestToJSON( - listAccountingDirectIncomesRequest: ListAccountingDirectIncomesRequest, -): string { - return JSON.stringify( - ListAccountingDirectIncomesRequest$outboundSchema.parse( - listAccountingDirectIncomesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingDirectIncomesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountinginvoiceattachments.ts b/lending/src/sdk/models/operations/listaccountinginvoiceattachments.ts index b9a92cae9..76d0c6681 100644 --- a/lending/src/sdk/models/operations/listaccountinginvoiceattachments.ts +++ b/lending/src/sdk/models/operations/listaccountinginvoiceattachments.ts @@ -1,49 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type ListAccountingInvoiceAttachmentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for an invoice. - */ - invoiceId: string; -}; - -/** @internal */ -export type ListAccountingInvoiceAttachmentsRequest$Outbound = { - companyId: string; - connectionId: string; - invoiceId: string; -}; - -/** @internal */ -export const ListAccountingInvoiceAttachmentsRequest$outboundSchema: z.ZodType< - ListAccountingInvoiceAttachmentsRequest$Outbound, - z.ZodTypeDef, - ListAccountingInvoiceAttachmentsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - invoiceId: z.string(), -}); - -export function listAccountingInvoiceAttachmentsRequestToJSON( - listAccountingInvoiceAttachmentsRequest: - ListAccountingInvoiceAttachmentsRequest, -): string { - return JSON.stringify( - ListAccountingInvoiceAttachmentsRequest$outboundSchema.parse( - listAccountingInvoiceAttachmentsRequest, - ), - ); +export interface ListAccountingInvoiceAttachmentsRequest { + companyId: string; + connectionId: string; + invoiceId: string; } diff --git a/lending/src/sdk/models/operations/listaccountinginvoices.ts b/lending/src/sdk/models/operations/listaccountinginvoices.ts index e3fbd0c94..3c79875f5 100644 --- a/lending/src/sdk/models/operations/listaccountinginvoices.ts +++ b/lending/src/sdk/models/operations/listaccountinginvoices.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingInvoicesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingInvoicesRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingInvoicesRequest$outboundSchema: z.ZodType< - ListAccountingInvoicesRequest$Outbound, - z.ZodTypeDef, - ListAccountingInvoicesRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingInvoicesRequestToJSON( - listAccountingInvoicesRequest: ListAccountingInvoicesRequest, -): string { - return JSON.stringify( - ListAccountingInvoicesRequest$outboundSchema.parse( - listAccountingInvoicesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingInvoicesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingjournalentries.ts b/lending/src/sdk/models/operations/listaccountingjournalentries.ts index cb77fb248..306c65407 100644 --- a/lending/src/sdk/models/operations/listaccountingjournalentries.ts +++ b/lending/src/sdk/models/operations/listaccountingjournalentries.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingJournalEntriesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingJournalEntriesRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingJournalEntriesRequest$outboundSchema: z.ZodType< - ListAccountingJournalEntriesRequest$Outbound, - z.ZodTypeDef, - ListAccountingJournalEntriesRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingJournalEntriesRequestToJSON( - listAccountingJournalEntriesRequest: ListAccountingJournalEntriesRequest, -): string { - return JSON.stringify( - ListAccountingJournalEntriesRequest$outboundSchema.parse( - listAccountingJournalEntriesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingJournalEntriesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingjournals.ts b/lending/src/sdk/models/operations/listaccountingjournals.ts index 42203a991..1fb9ea4a1 100644 --- a/lending/src/sdk/models/operations/listaccountingjournals.ts +++ b/lending/src/sdk/models/operations/listaccountingjournals.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingJournalsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingJournalsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingJournalsRequest$outboundSchema: z.ZodType< - ListAccountingJournalsRequest$Outbound, - z.ZodTypeDef, - ListAccountingJournalsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingJournalsRequestToJSON( - listAccountingJournalsRequest: ListAccountingJournalsRequest, -): string { - return JSON.stringify( - ListAccountingJournalsRequest$outboundSchema.parse( - listAccountingJournalsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingJournalsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingpayments.ts b/lending/src/sdk/models/operations/listaccountingpayments.ts index 65f20036a..e56c02aa6 100644 --- a/lending/src/sdk/models/operations/listaccountingpayments.ts +++ b/lending/src/sdk/models/operations/listaccountingpayments.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingPaymentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingPaymentsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingPaymentsRequest$outboundSchema: z.ZodType< - ListAccountingPaymentsRequest$Outbound, - z.ZodTypeDef, - ListAccountingPaymentsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingPaymentsRequestToJSON( - listAccountingPaymentsRequest: ListAccountingPaymentsRequest, -): string { - return JSON.stringify( - ListAccountingPaymentsRequest$outboundSchema.parse( - listAccountingPaymentsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingPaymentsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingsupplierattachments.ts b/lending/src/sdk/models/operations/listaccountingsupplierattachments.ts index ad07dae22..ffcc1345c 100644 --- a/lending/src/sdk/models/operations/listaccountingsupplierattachments.ts +++ b/lending/src/sdk/models/operations/listaccountingsupplierattachments.ts @@ -1,49 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type ListAccountingSupplierAttachmentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for a supplier. - */ - supplierId: string; -}; - -/** @internal */ -export type ListAccountingSupplierAttachmentsRequest$Outbound = { - companyId: string; - connectionId: string; - supplierId: string; -}; - -/** @internal */ -export const ListAccountingSupplierAttachmentsRequest$outboundSchema: z.ZodType< - ListAccountingSupplierAttachmentsRequest$Outbound, - z.ZodTypeDef, - ListAccountingSupplierAttachmentsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - supplierId: z.string(), -}); - -export function listAccountingSupplierAttachmentsRequestToJSON( - listAccountingSupplierAttachmentsRequest: - ListAccountingSupplierAttachmentsRequest, -): string { - return JSON.stringify( - ListAccountingSupplierAttachmentsRequest$outboundSchema.parse( - listAccountingSupplierAttachmentsRequest, - ), - ); +export interface ListAccountingSupplierAttachmentsRequest { + companyId: string; + connectionId: string; + supplierId: string; } diff --git a/lending/src/sdk/models/operations/listaccountingsuppliers.ts b/lending/src/sdk/models/operations/listaccountingsuppliers.ts index 1e5866b93..66b78acc9 100644 --- a/lending/src/sdk/models/operations/listaccountingsuppliers.ts +++ b/lending/src/sdk/models/operations/listaccountingsuppliers.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingSuppliersRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingSuppliersRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingSuppliersRequest$outboundSchema: z.ZodType< - ListAccountingSuppliersRequest$Outbound, - z.ZodTypeDef, - ListAccountingSuppliersRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingSuppliersRequestToJSON( - listAccountingSuppliersRequest: ListAccountingSuppliersRequest, -): string { - return JSON.stringify( - ListAccountingSuppliersRequest$outboundSchema.parse( - listAccountingSuppliersRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingSuppliersRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listaccountingtransfers.ts b/lending/src/sdk/models/operations/listaccountingtransfers.ts index 55c501d28..fc0fed6d9 100644 --- a/lending/src/sdk/models/operations/listaccountingtransfers.ts +++ b/lending/src/sdk/models/operations/listaccountingtransfers.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListAccountingTransfersRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListAccountingTransfersRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListAccountingTransfersRequest$outboundSchema: z.ZodType< - ListAccountingTransfersRequest$Outbound, - z.ZodTypeDef, - ListAccountingTransfersRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listAccountingTransfersRequestToJSON( - listAccountingTransfersRequest: ListAccountingTransfersRequest, -): string { - return JSON.stringify( - ListAccountingTransfersRequest$outboundSchema.parse( - listAccountingTransfersRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListAccountingTransfersRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listbankingaccountbalances.ts b/lending/src/sdk/models/operations/listbankingaccountbalances.ts index 13b45ba07..4ac0818bf 100644 --- a/lending/src/sdk/models/operations/listbankingaccountbalances.ts +++ b/lending/src/sdk/models/operations/listbankingaccountbalances.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListBankingAccountBalancesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListBankingAccountBalancesRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListBankingAccountBalancesRequest$outboundSchema: z.ZodType< - ListBankingAccountBalancesRequest$Outbound, - z.ZodTypeDef, - ListBankingAccountBalancesRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listBankingAccountBalancesRequestToJSON( - listBankingAccountBalancesRequest: ListBankingAccountBalancesRequest, -): string { - return JSON.stringify( - ListBankingAccountBalancesRequest$outboundSchema.parse( - listBankingAccountBalancesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListBankingAccountBalancesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listbankingaccounts.ts b/lending/src/sdk/models/operations/listbankingaccounts.ts index 5738abcf7..84369a3ce 100644 --- a/lending/src/sdk/models/operations/listbankingaccounts.ts +++ b/lending/src/sdk/models/operations/listbankingaccounts.ts @@ -1,64 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListBankingAccountsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListBankingAccountsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListBankingAccountsRequest$outboundSchema: z.ZodType< - ListBankingAccountsRequest$Outbound, - z.ZodTypeDef, - ListBankingAccountsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listBankingAccountsRequestToJSON( - listBankingAccountsRequest: ListBankingAccountsRequest, -): string { - return JSON.stringify( - ListBankingAccountsRequest$outboundSchema.parse(listBankingAccountsRequest), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListBankingAccountsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listbankingtransactioncategories.ts b/lending/src/sdk/models/operations/listbankingtransactioncategories.ts index fd0858fc1..6e1870948 100644 --- a/lending/src/sdk/models/operations/listbankingtransactioncategories.ts +++ b/lending/src/sdk/models/operations/listbankingtransactioncategories.ts @@ -1,67 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListBankingTransactionCategoriesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListBankingTransactionCategoriesRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListBankingTransactionCategoriesRequest$outboundSchema: z.ZodType< - ListBankingTransactionCategoriesRequest$Outbound, - z.ZodTypeDef, - ListBankingTransactionCategoriesRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listBankingTransactionCategoriesRequestToJSON( - listBankingTransactionCategoriesRequest: - ListBankingTransactionCategoriesRequest, -): string { - return JSON.stringify( - ListBankingTransactionCategoriesRequest$outboundSchema.parse( - listBankingTransactionCategoriesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListBankingTransactionCategoriesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listbankingtransactions.ts b/lending/src/sdk/models/operations/listbankingtransactions.ts index 8500b0a82..332c4b821 100644 --- a/lending/src/sdk/models/operations/listbankingtransactions.ts +++ b/lending/src/sdk/models/operations/listbankingtransactions.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListBankingTransactionsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListBankingTransactionsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListBankingTransactionsRequest$outboundSchema: z.ZodType< - ListBankingTransactionsRequest$Outbound, - z.ZodTypeDef, - ListBankingTransactionsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listBankingTransactionsRequestToJSON( - listBankingTransactionsRequest: ListBankingTransactionsRequest, -): string { - return JSON.stringify( - ListBankingTransactionsRequest$outboundSchema.parse( - listBankingTransactionsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListBankingTransactionsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcommercecustomers.ts b/lending/src/sdk/models/operations/listcommercecustomers.ts index 667642877..cdcd88c12 100644 --- a/lending/src/sdk/models/operations/listcommercecustomers.ts +++ b/lending/src/sdk/models/operations/listcommercecustomers.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCommerceCustomersRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCommerceCustomersRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCommerceCustomersRequest$outboundSchema: z.ZodType< - ListCommerceCustomersRequest$Outbound, - z.ZodTypeDef, - ListCommerceCustomersRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCommerceCustomersRequestToJSON( - listCommerceCustomersRequest: ListCommerceCustomersRequest, -): string { - return JSON.stringify( - ListCommerceCustomersRequest$outboundSchema.parse( - listCommerceCustomersRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCommerceCustomersRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcommercedisputes.ts b/lending/src/sdk/models/operations/listcommercedisputes.ts index 889e402fb..8b3192dae 100644 --- a/lending/src/sdk/models/operations/listcommercedisputes.ts +++ b/lending/src/sdk/models/operations/listcommercedisputes.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCommerceDisputesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCommerceDisputesRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCommerceDisputesRequest$outboundSchema: z.ZodType< - ListCommerceDisputesRequest$Outbound, - z.ZodTypeDef, - ListCommerceDisputesRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCommerceDisputesRequestToJSON( - listCommerceDisputesRequest: ListCommerceDisputesRequest, -): string { - return JSON.stringify( - ListCommerceDisputesRequest$outboundSchema.parse( - listCommerceDisputesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCommerceDisputesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcommercelocations.ts b/lending/src/sdk/models/operations/listcommercelocations.ts index bf88920ff..dcdeb51a6 100644 --- a/lending/src/sdk/models/operations/listcommercelocations.ts +++ b/lending/src/sdk/models/operations/listcommercelocations.ts @@ -1,42 +1,7 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type ListCommerceLocationsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; -}; - -/** @internal */ -export type ListCommerceLocationsRequest$Outbound = { - companyId: string; - connectionId: string; -}; - -/** @internal */ -export const ListCommerceLocationsRequest$outboundSchema: z.ZodType< - ListCommerceLocationsRequest$Outbound, - z.ZodTypeDef, - ListCommerceLocationsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - -export function listCommerceLocationsRequestToJSON( - listCommerceLocationsRequest: ListCommerceLocationsRequest, -): string { - return JSON.stringify( - ListCommerceLocationsRequest$outboundSchema.parse( - listCommerceLocationsRequest, - ), - ); +export interface ListCommerceLocationsRequest { + companyId: string; + connectionId: string; } diff --git a/lending/src/sdk/models/operations/listcommerceorders.ts b/lending/src/sdk/models/operations/listcommerceorders.ts index 7804323af..8f28358f6 100644 --- a/lending/src/sdk/models/operations/listcommerceorders.ts +++ b/lending/src/sdk/models/operations/listcommerceorders.ts @@ -1,64 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCommerceOrdersRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCommerceOrdersRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCommerceOrdersRequest$outboundSchema: z.ZodType< - ListCommerceOrdersRequest$Outbound, - z.ZodTypeDef, - ListCommerceOrdersRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCommerceOrdersRequestToJSON( - listCommerceOrdersRequest: ListCommerceOrdersRequest, -): string { - return JSON.stringify( - ListCommerceOrdersRequest$outboundSchema.parse(listCommerceOrdersRequest), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCommerceOrdersRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcommercepaymentmethods.ts b/lending/src/sdk/models/operations/listcommercepaymentmethods.ts index 31c21f234..5c5f43f8b 100644 --- a/lending/src/sdk/models/operations/listcommercepaymentmethods.ts +++ b/lending/src/sdk/models/operations/listcommercepaymentmethods.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCommercePaymentMethodsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCommercePaymentMethodsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCommercePaymentMethodsRequest$outboundSchema: z.ZodType< - ListCommercePaymentMethodsRequest$Outbound, - z.ZodTypeDef, - ListCommercePaymentMethodsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCommercePaymentMethodsRequestToJSON( - listCommercePaymentMethodsRequest: ListCommercePaymentMethodsRequest, -): string { - return JSON.stringify( - ListCommercePaymentMethodsRequest$outboundSchema.parse( - listCommercePaymentMethodsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCommercePaymentMethodsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcommercepayments.ts b/lending/src/sdk/models/operations/listcommercepayments.ts index 08dccdffa..c40eeb6ed 100644 --- a/lending/src/sdk/models/operations/listcommercepayments.ts +++ b/lending/src/sdk/models/operations/listcommercepayments.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCommercePaymentsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCommercePaymentsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCommercePaymentsRequest$outboundSchema: z.ZodType< - ListCommercePaymentsRequest$Outbound, - z.ZodTypeDef, - ListCommercePaymentsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCommercePaymentsRequestToJSON( - listCommercePaymentsRequest: ListCommercePaymentsRequest, -): string { - return JSON.stringify( - ListCommercePaymentsRequest$outboundSchema.parse( - listCommercePaymentsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCommercePaymentsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcommerceproductcategories.ts b/lending/src/sdk/models/operations/listcommerceproductcategories.ts index 189f7a1f0..8c718eeb8 100644 --- a/lending/src/sdk/models/operations/listcommerceproductcategories.ts +++ b/lending/src/sdk/models/operations/listcommerceproductcategories.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCommerceProductCategoriesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCommerceProductCategoriesRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCommerceProductCategoriesRequest$outboundSchema: z.ZodType< - ListCommerceProductCategoriesRequest$Outbound, - z.ZodTypeDef, - ListCommerceProductCategoriesRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCommerceProductCategoriesRequestToJSON( - listCommerceProductCategoriesRequest: ListCommerceProductCategoriesRequest, -): string { - return JSON.stringify( - ListCommerceProductCategoriesRequest$outboundSchema.parse( - listCommerceProductCategoriesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCommerceProductCategoriesRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcommerceproducts.ts b/lending/src/sdk/models/operations/listcommerceproducts.ts index 5ac1ba972..d68542932 100644 --- a/lending/src/sdk/models/operations/listcommerceproducts.ts +++ b/lending/src/sdk/models/operations/listcommerceproducts.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCommerceProductsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCommerceProductsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCommerceProductsRequest$outboundSchema: z.ZodType< - ListCommerceProductsRequest$Outbound, - z.ZodTypeDef, - ListCommerceProductsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCommerceProductsRequestToJSON( - listCommerceProductsRequest: ListCommerceProductsRequest, -): string { - return JSON.stringify( - ListCommerceProductsRequest$outboundSchema.parse( - listCommerceProductsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCommerceProductsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcommercetransactions.ts b/lending/src/sdk/models/operations/listcommercetransactions.ts index d97e0fac7..2edc03101 100644 --- a/lending/src/sdk/models/operations/listcommercetransactions.ts +++ b/lending/src/sdk/models/operations/listcommercetransactions.ts @@ -1,66 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCommerceTransactionsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCommerceTransactionsRequest$Outbound = { - companyId: string; - connectionId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCommerceTransactionsRequest$outboundSchema: z.ZodType< - ListCommerceTransactionsRequest$Outbound, - z.ZodTypeDef, - ListCommerceTransactionsRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCommerceTransactionsRequestToJSON( - listCommerceTransactionsRequest: ListCommerceTransactionsRequest, -): string { - return JSON.stringify( - ListCommerceTransactionsRequest$outboundSchema.parse( - listCommerceTransactionsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCommerceTransactionsRequest { + companyId: string; + connectionId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcompanies.ts b/lending/src/sdk/models/operations/listcompanies.ts index 837a6aae5..939f42b3f 100644 --- a/lending/src/sdk/models/operations/listcompanies.ts +++ b/lending/src/sdk/models/operations/listcompanies.ts @@ -1,58 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCompaniesRequest = { - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; - /** - * Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying). - */ - tags?: string | undefined; -}; - -/** @internal */ -export type ListCompaniesRequest$Outbound = { - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; - tags?: string | undefined; -}; - -/** @internal */ -export const ListCompaniesRequest$outboundSchema: z.ZodType< - ListCompaniesRequest$Outbound, - z.ZodTypeDef, - ListCompaniesRequest -> = z.object({ - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), - tags: z.string().optional(), -}); - -export function listCompaniesRequestToJSON( - listCompaniesRequest: ListCompaniesRequest, -): string { - return JSON.stringify( - ListCompaniesRequest$outboundSchema.parse(listCompaniesRequest), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCompaniesRequest { + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; + tags?: string; } diff --git a/lending/src/sdk/models/operations/listconnections.ts b/lending/src/sdk/models/operations/listconnections.ts index d1be0d942..47d6ac043 100644 --- a/lending/src/sdk/models/operations/listconnections.ts +++ b/lending/src/sdk/models/operations/listconnections.ts @@ -1,58 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListConnectionsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListConnectionsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListConnectionsRequest$outboundSchema: z.ZodType< - ListConnectionsRequest$Outbound, - z.ZodTypeDef, - ListConnectionsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listConnectionsRequestToJSON( - listConnectionsRequest: ListConnectionsRequest, -): string { - return JSON.stringify( - ListConnectionsRequest$outboundSchema.parse(listConnectionsRequest), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListConnectionsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listcreateoperations.ts b/lending/src/sdk/models/operations/listcreateoperations.ts index 069bc8d41..cb58bf4c4 100644 --- a/lending/src/sdk/models/operations/listcreateoperations.ts +++ b/lending/src/sdk/models/operations/listcreateoperations.ts @@ -1,60 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListCreateOperationsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListCreateOperationsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListCreateOperationsRequest$outboundSchema: z.ZodType< - ListCreateOperationsRequest$Outbound, - z.ZodTypeDef, - ListCreateOperationsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listCreateOperationsRequestToJSON( - listCreateOperationsRequest: ListCreateOperationsRequest, -): string { - return JSON.stringify( - ListCreateOperationsRequest$outboundSchema.parse( - listCreateOperationsRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListCreateOperationsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listdataintegritydetails.ts b/lending/src/sdk/models/operations/listdataintegritydetails.ts index c98543f76..c30b110a6 100644 --- a/lending/src/sdk/models/operations/listdataintegritydetails.ts +++ b/lending/src/sdk/models/operations/listdataintegritydetails.ts @@ -1,67 +1,13 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; - -export type ListDataIntegrityDetailsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * A key for a Codat data type. - */ - dataType: shared.DataIntegrityDataType; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListDataIntegrityDetailsRequest$Outbound = { - companyId: string; - dataType: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListDataIntegrityDetailsRequest$outboundSchema: z.ZodType< - ListDataIntegrityDetailsRequest$Outbound, - z.ZodTypeDef, - ListDataIntegrityDetailsRequest -> = z.object({ - companyId: z.string(), - dataType: shared.DataIntegrityDataType$outboundSchema, - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listDataIntegrityDetailsRequestToJSON( - listDataIntegrityDetailsRequest: ListDataIntegrityDetailsRequest, -): string { - return JSON.stringify( - ListDataIntegrityDetailsRequest$outboundSchema.parse( - listDataIntegrityDetailsRequest, - ), - ); +/* tslint:disable */ + +import type { DataIntegrityDataType } from '../_speakeasy_enums'; +/* eslint-disable */ + +export interface ListDataIntegrityDetailsRequest { + companyId: string; + dataType: DataIntegrityDataType; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listfiles.ts b/lending/src/sdk/models/operations/listfiles.ts index ebf517796..6f9adc3ff 100644 --- a/lending/src/sdk/models/operations/listfiles.ts +++ b/lending/src/sdk/models/operations/listfiles.ts @@ -1,34 +1,6 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type ListFilesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; -}; - -/** @internal */ -export type ListFilesRequest$Outbound = { - companyId: string; -}; - -/** @internal */ -export const ListFilesRequest$outboundSchema: z.ZodType< - ListFilesRequest$Outbound, - z.ZodTypeDef, - ListFilesRequest -> = z.object({ - companyId: z.string(), -}); - -export function listFilesRequestToJSON( - listFilesRequest: ListFilesRequest, -): string { - return JSON.stringify( - ListFilesRequest$outboundSchema.parse(listFilesRequest), - ); +export interface ListFilesRequest { + companyId: string; } diff --git a/lending/src/sdk/models/operations/listloantransactions.ts b/lending/src/sdk/models/operations/listloantransactions.ts index 3e6262e34..be35f15a6 100644 --- a/lending/src/sdk/models/operations/listloantransactions.ts +++ b/lending/src/sdk/models/operations/listloantransactions.ts @@ -1,61 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; +import type { QueryParamSourceType } from '../_speakeasy_enums'; +/* eslint-disable */ -/** - * Data source type. - */ -export const QueryParamSourceType = { - Banking: "banking", - Commerce: "commerce", - Accounting: "accounting", -} as const; -/** - * Data source type. - */ -export type QueryParamSourceType = ClosedEnum; - -export type ListLoanTransactionsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Data source type. - */ - sourceType: QueryParamSourceType; -}; - -/** @internal */ -export const QueryParamSourceType$outboundSchema: z.ZodNativeEnum< - typeof QueryParamSourceType -> = z.nativeEnum(QueryParamSourceType); - -/** @internal */ -export type ListLoanTransactionsRequest$Outbound = { - companyId: string; - sourceType: string; -}; - -/** @internal */ -export const ListLoanTransactionsRequest$outboundSchema: z.ZodType< - ListLoanTransactionsRequest$Outbound, - z.ZodTypeDef, - ListLoanTransactionsRequest -> = z.object({ - companyId: z.string(), - sourceType: QueryParamSourceType$outboundSchema, -}); - -export function listLoanTransactionsRequestToJSON( - listLoanTransactionsRequest: ListLoanTransactionsRequest, -): string { - return JSON.stringify( - ListLoanTransactionsRequest$outboundSchema.parse( - listLoanTransactionsRequest, - ), - ); +export interface ListLoanTransactionsRequest { + companyId: string; + sourceType: QueryParamSourceType; } diff --git a/lending/src/sdk/models/operations/listpulloperations.ts b/lending/src/sdk/models/operations/listpulloperations.ts index d12f7bd86..e29c613bf 100644 --- a/lending/src/sdk/models/operations/listpulloperations.ts +++ b/lending/src/sdk/models/operations/listpulloperations.ts @@ -1,58 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListPullOperationsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListPullOperationsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListPullOperationsRequest$outboundSchema: z.ZodType< - ListPullOperationsRequest$Outbound, - z.ZodTypeDef, - ListPullOperationsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listPullOperationsRequestToJSON( - listPullOperationsRequest: ListPullOperationsRequest, -): string { - return JSON.stringify( - ListPullOperationsRequest$outboundSchema.parse(listPullOperationsRequest), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListPullOperationsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/listreconciledinvoices.ts b/lending/src/sdk/models/operations/listreconciledinvoices.ts index e757008e7..b49f2e5c3 100644 --- a/lending/src/sdk/models/operations/listreconciledinvoices.ts +++ b/lending/src/sdk/models/operations/listreconciledinvoices.ts @@ -1,54 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListReconciledInvoicesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; -}; - -/** @internal */ -export type ListReconciledInvoicesRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; -}; - -/** @internal */ -export const ListReconciledInvoicesRequest$outboundSchema: z.ZodType< - ListReconciledInvoicesRequest$Outbound, - z.ZodTypeDef, - ListReconciledInvoicesRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), -}); - -export function listReconciledInvoicesRequestToJSON( - listReconciledInvoicesRequest: ListReconciledInvoicesRequest, -): string { - return JSON.stringify( - ListReconciledInvoicesRequest$outboundSchema.parse( - listReconciledInvoicesRequest, - ), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListReconciledInvoicesRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; } diff --git a/lending/src/sdk/models/operations/listreports.ts b/lending/src/sdk/models/operations/listreports.ts index 68c7f6c30..fef135b2d 100644 --- a/lending/src/sdk/models/operations/listreports.ts +++ b/lending/src/sdk/models/operations/listreports.ts @@ -1,58 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export type ListReportsRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - page?: number | undefined; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - pageSize?: number | undefined; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - query?: string | undefined; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - orderBy?: string | undefined; -}; - -/** @internal */ -export type ListReportsRequest$Outbound = { - companyId: string; - page: number; - pageSize: number; - query?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const ListReportsRequest$outboundSchema: z.ZodType< - ListReportsRequest$Outbound, - z.ZodTypeDef, - ListReportsRequest -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - -export function listReportsRequestToJSON( - listReportsRequest: ListReportsRequest, -): string { - return JSON.stringify( - ListReportsRequest$outboundSchema.parse(listReportsRequest), - ); +/* tslint:disable */ +/* eslint-disable */ + +export interface ListReportsRequest { + companyId: string; + page?: number; + pageSize?: number; + query?: string; + orderBy?: string; } diff --git a/lending/src/sdk/models/operations/refreshalldatatypes.ts b/lending/src/sdk/models/operations/refreshalldatatypes.ts index de184ca9a..7a4934589 100644 --- a/lending/src/sdk/models/operations/refreshalldatatypes.ts +++ b/lending/src/sdk/models/operations/refreshalldatatypes.ts @@ -1,34 +1,6 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; - -export type RefreshAllDataTypesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; -}; - -/** @internal */ -export type RefreshAllDataTypesRequest$Outbound = { - companyId: string; -}; - -/** @internal */ -export const RefreshAllDataTypesRequest$outboundSchema: z.ZodType< - RefreshAllDataTypesRequest$Outbound, - z.ZodTypeDef, - RefreshAllDataTypesRequest -> = z.object({ - companyId: z.string(), -}); - -export function refreshAllDataTypesRequestToJSON( - refreshAllDataTypesRequest: RefreshAllDataTypesRequest, -): string { - return JSON.stringify( - RefreshAllDataTypesRequest$outboundSchema.parse(refreshAllDataTypesRequest), - ); +export interface RefreshAllDataTypesRequest { + companyId: string; } diff --git a/lending/src/sdk/models/operations/refreshdatatype.ts b/lending/src/sdk/models/operations/refreshdatatype.ts index 8c4dce88a..5bb731207 100644 --- a/lending/src/sdk/models/operations/refreshdatatype.ts +++ b/lending/src/sdk/models/operations/refreshdatatype.ts @@ -1,47 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import * as shared from "../shared/index.js"; +import type { DataType } from '../shared/datatype'; +/* eslint-disable */ -export type RefreshDataTypeRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * A key for a Codat data type. - */ - dataType: shared.DataType; - /** - * Optionally, provide a data connection id to only queue pull operations on that connection. - */ - connectionId?: string | undefined; -}; - -/** @internal */ -export type RefreshDataTypeRequest$Outbound = { - companyId: string; - dataType: string; - connectionId?: string | undefined; -}; - -/** @internal */ -export const RefreshDataTypeRequest$outboundSchema: z.ZodType< - RefreshDataTypeRequest$Outbound, - z.ZodTypeDef, - RefreshDataTypeRequest -> = z.object({ - companyId: z.string(), - dataType: shared.DataType$outboundSchema, - connectionId: z.string().optional(), -}); - -export function refreshDataTypeRequestToJSON( - refreshDataTypeRequest: RefreshDataTypeRequest, -): string { - return JSON.stringify( - RefreshDataTypeRequest$outboundSchema.parse(refreshDataTypeRequest), - ); +export interface RefreshDataTypeRequest { + companyId: string; + dataType: DataType; + connectionId?: string; } diff --git a/lending/src/sdk/models/operations/replacecompany.ts b/lending/src/sdk/models/operations/replacecompany.ts index 5ee35551d..6add5d7c2 100644 --- a/lending/src/sdk/models/operations/replacecompany.ts +++ b/lending/src/sdk/models/operations/replacecompany.ts @@ -1,43 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { CompanyRequestBody } from '../shared/companyrequestbody'; +/* eslint-disable */ -export type ReplaceCompanyRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - companyRequestBody?: shared.CompanyRequestBody | undefined; -}; - -/** @internal */ -export type ReplaceCompanyRequest$Outbound = { - companyId: string; - CompanyRequestBody?: shared.CompanyRequestBody$Outbound | undefined; -}; - -/** @internal */ -export const ReplaceCompanyRequest$outboundSchema: z.ZodType< - ReplaceCompanyRequest$Outbound, - z.ZodTypeDef, - ReplaceCompanyRequest -> = z.object({ - companyId: z.string(), - companyRequestBody: shared.CompanyRequestBody$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - companyRequestBody: "CompanyRequestBody", - }); -}); - -export function replaceCompanyRequestToJSON( - replaceCompanyRequest: ReplaceCompanyRequest, -): string { - return JSON.stringify( - ReplaceCompanyRequest$outboundSchema.parse(replaceCompanyRequest), - ); +export interface ReplaceCompanyRequest { + companyId: string; + companyRequestBody?: CompanyRequestBody | undefined; } diff --git a/lending/src/sdk/models/operations/setbankstatementuploadconfiguration.ts b/lending/src/sdk/models/operations/setbankstatementuploadconfiguration.ts index 0d82052b1..d69832eda 100644 --- a/lending/src/sdk/models/operations/setbankstatementuploadconfiguration.ts +++ b/lending/src/sdk/models/operations/setbankstatementuploadconfiguration.ts @@ -1,58 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { BankStatementUploadConfiguration } from '../shared/bankstatementuploadconfiguration'; +/* eslint-disable */ -export type SetBankStatementUploadConfigurationRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - bankStatementUploadConfiguration?: - | shared.BankStatementUploadConfiguration - | undefined; -}; - -/** @internal */ -export type SetBankStatementUploadConfigurationRequest$Outbound = { - companyId: string; - connectionId: string; - BankStatementUploadConfiguration?: - | shared.BankStatementUploadConfiguration$Outbound - | undefined; -}; - -/** @internal */ -export const SetBankStatementUploadConfigurationRequest$outboundSchema: - z.ZodType< - SetBankStatementUploadConfigurationRequest$Outbound, - z.ZodTypeDef, - SetBankStatementUploadConfigurationRequest - > = z.object({ - companyId: z.string(), - connectionId: z.string(), - bankStatementUploadConfiguration: shared - .BankStatementUploadConfiguration$outboundSchema.optional(), - }).transform((v) => { - return remap$(v, { - bankStatementUploadConfiguration: "BankStatementUploadConfiguration", - }); - }); - -export function setBankStatementUploadConfigurationRequestToJSON( - setBankStatementUploadConfigurationRequest: - SetBankStatementUploadConfigurationRequest, -): string { - return JSON.stringify( - SetBankStatementUploadConfigurationRequest$outboundSchema.parse( - setBankStatementUploadConfigurationRequest, - ), - ); +export interface SetBankStatementUploadConfigurationRequest { + companyId: string; + connectionId: string; + bankStatementUploadConfiguration?: BankStatementUploadConfiguration | undefined; } diff --git a/lending/src/sdk/models/operations/startbankstatementuploadsession.ts b/lending/src/sdk/models/operations/startbankstatementuploadsession.ts index 92e53ef2a..c9dac3437 100644 --- a/lending/src/sdk/models/operations/startbankstatementuploadsession.ts +++ b/lending/src/sdk/models/operations/startbankstatementuploadsession.ts @@ -1,55 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { StartUploadSessionRequest } from '../shared/startuploadsessionrequest'; +/* eslint-disable */ -export type StartBankStatementUploadSessionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - startUploadSessionRequest?: shared.StartUploadSessionRequest | undefined; -}; - -/** @internal */ -export type StartBankStatementUploadSessionRequest$Outbound = { - companyId: string; - connectionId: string; - StartUploadSessionRequest?: - | shared.StartUploadSessionRequest$Outbound - | undefined; -}; - -/** @internal */ -export const StartBankStatementUploadSessionRequest$outboundSchema: z.ZodType< - StartBankStatementUploadSessionRequest$Outbound, - z.ZodTypeDef, - StartBankStatementUploadSessionRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - startUploadSessionRequest: shared.StartUploadSessionRequest$outboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - startUploadSessionRequest: "StartUploadSessionRequest", - }); -}); - -export function startBankStatementUploadSessionRequestToJSON( - startBankStatementUploadSessionRequest: - StartBankStatementUploadSessionRequest, -): string { - return JSON.stringify( - StartBankStatementUploadSessionRequest$outboundSchema.parse( - startBankStatementUploadSessionRequest, - ), - ); +export interface StartBankStatementUploadSessionRequest { + companyId: string; + connectionId: string; + startUploadSessionRequest?: StartUploadSessionRequest | undefined; } diff --git a/lending/src/sdk/models/operations/unlinkconnection.ts b/lending/src/sdk/models/operations/unlinkconnection.ts index dbdba4a38..6bd02ed51 100644 --- a/lending/src/sdk/models/operations/unlinkconnection.ts +++ b/lending/src/sdk/models/operations/unlinkconnection.ts @@ -1,81 +1,10 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { UnlinkConnectionUpdateConnection } from '../UpdateConnection'; +/* eslint-disable */ -export type UnlinkConnectionUpdateConnection = { - /** - * The current authorization status of the data connection. - */ - status?: shared.DataConnectionStatus | undefined; -}; - -export type UnlinkConnectionRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - requestBody?: UnlinkConnectionUpdateConnection | undefined; -}; - -/** @internal */ -export type UnlinkConnectionUpdateConnection$Outbound = { - status?: string | undefined; -}; - -/** @internal */ -export const UnlinkConnectionUpdateConnection$outboundSchema: z.ZodType< - UnlinkConnectionUpdateConnection$Outbound, - z.ZodTypeDef, - UnlinkConnectionUpdateConnection -> = z.object({ - status: shared.DataConnectionStatus$outboundSchema.optional(), -}); - -export function unlinkConnectionUpdateConnectionToJSON( - unlinkConnectionUpdateConnection: UnlinkConnectionUpdateConnection, -): string { - return JSON.stringify( - UnlinkConnectionUpdateConnection$outboundSchema.parse( - unlinkConnectionUpdateConnection, - ), - ); -} - -/** @internal */ -export type UnlinkConnectionRequest$Outbound = { - companyId: string; - connectionId: string; - RequestBody?: UnlinkConnectionUpdateConnection$Outbound | undefined; -}; - -/** @internal */ -export const UnlinkConnectionRequest$outboundSchema: z.ZodType< - UnlinkConnectionRequest$Outbound, - z.ZodTypeDef, - UnlinkConnectionRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - requestBody: z.lazy(() => UnlinkConnectionUpdateConnection$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); -}); - -export function unlinkConnectionRequestToJSON( - unlinkConnectionRequest: UnlinkConnectionRequest, -): string { - return JSON.stringify( - UnlinkConnectionRequest$outboundSchema.parse(unlinkConnectionRequest), - ); +export interface UnlinkConnectionRequest { + companyId: string; + connectionId: string; + requestBody?: UnlinkConnectionUpdateConnection; } diff --git a/lending/src/sdk/models/operations/updatecompany.ts b/lending/src/sdk/models/operations/updatecompany.ts index 37ead4428..618928d50 100644 --- a/lending/src/sdk/models/operations/updatecompany.ts +++ b/lending/src/sdk/models/operations/updatecompany.ts @@ -1,43 +1,14 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { CompanyUpdateRequest } from '../shared/companyupdaterequest'; +/* eslint-disable */ -export type UpdateCompanyRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - companyUpdateRequest?: shared.CompanyUpdateRequest | undefined; -}; - -/** @internal */ -export type UpdateCompanyRequest$Outbound = { - companyId: string; - CompanyUpdateRequest?: shared.CompanyUpdateRequest$Outbound | undefined; -}; - -/** @internal */ -export const UpdateCompanyRequest$outboundSchema: z.ZodType< - UpdateCompanyRequest$Outbound, - z.ZodTypeDef, - UpdateCompanyRequest -> = z.object({ - companyId: z.string(), - companyUpdateRequest: shared.CompanyUpdateRequest$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - companyUpdateRequest: "CompanyUpdateRequest", - }); -}); +export interface UpdateCompanyRequest { + companyId: string; + companyUpdateRequest?: CompanyUpdateRequest | undefined; +} -export function updateCompanyRequestToJSON( - updateCompanyRequest: UpdateCompanyRequest, -): string { - return JSON.stringify( - UpdateCompanyRequest$outboundSchema.parse(updateCompanyRequest), - ); +export interface CompanyUpdateRequestUpdateCompanyRequest { + companyId: string; + companyUpdateRequest?: CompanyUpdateRequest | undefined; } diff --git a/lending/src/sdk/models/operations/uploadbankstatementdata.ts b/lending/src/sdk/models/operations/uploadbankstatementdata.ts index 3afe1c912..ea69d72d3 100644 --- a/lending/src/sdk/models/operations/uploadbankstatementdata.ts +++ b/lending/src/sdk/models/operations/uploadbankstatementdata.ts @@ -1,107 +1,21 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; - -export type UploadBankStatementDataRequestBody = - | shared.BankingAccount - | shared.BankingTransactions - | any; - -export type UploadBankStatementDataRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - /** - * Unique identifier for the dataset that completed its sync. - */ - datasetId: string; - /** - * The endpoint path of the third-party banking service that the request body originates from. Only required if the source is not `codat`. - */ - path?: shared.Path | undefined; - requestBody?: - | shared.BankingAccount - | shared.BankingTransactions - | any - | undefined; -}; - -/** @internal */ -export type UploadBankStatementDataRequestBody$Outbound = - | shared.BankingAccount$Outbound - | shared.BankingTransactions$Outbound - | any; - -/** @internal */ -export const UploadBankStatementDataRequestBody$outboundSchema: z.ZodType< - UploadBankStatementDataRequestBody$Outbound, - z.ZodTypeDef, - UploadBankStatementDataRequestBody -> = z.union([ - shared.BankingAccount$outboundSchema, - shared.BankingTransactions$outboundSchema, - z.any(), -]); - -export function uploadBankStatementDataRequestBodyToJSON( - uploadBankStatementDataRequestBody: UploadBankStatementDataRequestBody, -): string { - return JSON.stringify( - UploadBankStatementDataRequestBody$outboundSchema.parse( - uploadBankStatementDataRequestBody, - ), - ); +/* tslint:disable */ + +import type { Path } from '../_speakeasy_enums'; +import type { UploadBankStatementDataRequestBody } from './uploadbankstatementdatarequestbody'; +/* eslint-disable */ + +export interface UploadBankStatementDataRequest { + companyId: string; + connectionId: string; + datasetId: string; + path?: Path; + requestBody?: UploadBankStatementDataRequestBody; } -/** @internal */ -export type UploadBankStatementDataRequest$Outbound = { - companyId: string; - connectionId: string; - datasetId: string; - path?: string | undefined; - RequestBody?: - | shared.BankingAccount$Outbound - | shared.BankingTransactions$Outbound - | any - | undefined; -}; - -/** @internal */ -export const UploadBankStatementDataRequest$outboundSchema: z.ZodType< - UploadBankStatementDataRequest$Outbound, - z.ZodTypeDef, - UploadBankStatementDataRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - datasetId: z.string(), - path: shared.Path$outboundSchema.optional(), - requestBody: z.union([ - shared.BankingAccount$outboundSchema, - shared.BankingTransactions$outboundSchema, - z.any(), - ]).optional(), -}).transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); -}); - -export function uploadBankStatementDataRequestToJSON( - uploadBankStatementDataRequest: UploadBankStatementDataRequest, -): string { - return JSON.stringify( - UploadBankStatementDataRequest$outboundSchema.parse( - uploadBankStatementDataRequest, - ), - ); +export interface BankStatementDataUploadRequestBody { + companyId: string; + connectionId: string; + datasetId: string; + path?: string; + requestBody?: UploadBankStatementDataRequestBody; } diff --git a/lending/src/sdk/models/operations/uploadbankstatementdatarequestbody.ts b/lending/src/sdk/models/operations/uploadbankstatementdatarequestbody.ts new file mode 100644 index 000000000..5885e42d9 --- /dev/null +++ b/lending/src/sdk/models/operations/uploadbankstatementdatarequestbody.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { BankingAccount } from '../shared/bankingaccount'; +import { + instanceOfBankingAccount, + BankingAccountFromJSON, + BankingAccountFromJSONTyped, + BankingAccountToJSON, +} from '../shared/bankingaccount'; +import type { BankingTransactions } from '../shared/bankingtransactions'; +import { + instanceOfBankingTransactions, + BankingTransactionsFromJSON, + BankingTransactionsFromJSONTyped, + BankingTransactionsToJSON, +} from '../shared/bankingtransactions'; + +/** + * @type UploadBankStatementDataRequestBody + * + * @export + */ +export type UploadBankStatementDataRequestBody = BankingAccount | BankingTransactions | object; + +export function UploadBankStatementDataRequestBodyFromJSON(json: any): UploadBankStatementDataRequestBody { + return UploadBankStatementDataRequestBodyFromJSONTyped(json, false); +} + +export function UploadBankStatementDataRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadBankStatementDataRequestBody { + if (json == null) { + return json; + } + if (instanceOfBankingAccount(json)) { + return BankingAccountFromJSONTyped(json, true); + } + if (instanceOfBankingTransactions(json)) { + return BankingTransactionsFromJSONTyped(json, true); + } + + return {} as any; +} + +export function UploadBankStatementDataRequestBodyToJSON(json: any): any { + return UploadBankStatementDataRequestBodyToJSONTyped(json, false); +} + +export function UploadBankStatementDataRequestBodyToJSONTyped(value?: UploadBankStatementDataRequestBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + if (instanceOfBankingAccount(value)) { + return BankingAccountToJSON(value as BankingAccount); + } + if (instanceOfBankingTransactions(value)) { + return BankingTransactionsToJSON(value as BankingTransactions); + } + + return {}; +} + diff --git a/lending/src/sdk/models/operations/uploadfiles.ts b/lending/src/sdk/models/operations/uploadfiles.ts index 41b6a66de..0359dd9a7 100644 --- a/lending/src/sdk/models/operations/uploadfiles.ts +++ b/lending/src/sdk/models/operations/uploadfiles.ts @@ -1,49 +1,22 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as shared from "../shared/index.js"; +import type { FileUpload } from '../shared/fileupload'; +/* eslint-disable */ -export type UploadFilesRequest = { - /** - * Unique identifier for a company. - */ - companyId: string; - /** - * Unique identifier for a connection. - */ - connectionId: string; - fileUpload?: shared.FileUpload | undefined; -}; - -/** @internal */ -export type UploadFilesRequest$Outbound = { - companyId: string; - connectionId: string; - FileUpload?: shared.FileUpload$Outbound | undefined; -}; +export interface UploadFilesRequest { + companyId: string; + connectionId: string; + fileUpload?: FileUpload | undefined; +} -/** @internal */ -export const UploadFilesRequest$outboundSchema: z.ZodType< - UploadFilesRequest$Outbound, - z.ZodTypeDef, - UploadFilesRequest -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - fileUpload: shared.FileUpload$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - fileUpload: "FileUpload", - }); -}); +export interface FilesUploadRequestBody { + companyId: string; + connectionId: string; + fileUpload?: FileUpload | undefined; +} -export function uploadFilesRequestToJSON( - uploadFilesRequest: UploadFilesRequest, -): string { - return JSON.stringify( - UploadFilesRequest$outboundSchema.parse(uploadFilesRequest), - ); +export interface UploadFilesRequestBody { + companyId: string; + connectionId: string; + fileUpload?: FileUpload | undefined; } diff --git a/lending/src/sdk/models/shared/accountbalance.ts b/lending/src/sdk/models/shared/accountbalance.ts index b010094c1..61ac05956 100644 --- a/lending/src/sdk/models/shared/accountbalance.ts +++ b/lending/src/sdk/models/shared/accountbalance.ts @@ -1,50 +1,198 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type AccountBalance = { - /** - * The account's current balance - */ - available?: Decimal$ | number | undefined; - /** - * Funds that are not yet available in the balance - */ - pending?: Decimal$ | number | undefined; - /** - * Funds reserved as holdings - */ - reserved?: any | undefined; - /** - * The currency of the account - */ - currency?: string | undefined; -}; - -/** @internal */ -export const AccountBalance$inboundSchema: z.ZodType< - AccountBalance, - z.ZodTypeDef, - unknown -> = z.object({ - available: z.number().transform(v => new Decimal$(v)).optional(), - pending: z.number().transform(v => new Decimal$(v)).optional(), - reserved: z.any().optional(), - currency: z.string().optional(), -}); - -export function accountBalanceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountBalance$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountBalance' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface AccountBalance + */ +export interface AccountBalance { + /** + * The account's current balance + * @type {string} + * @memberof AccountBalance + */ + available?: Decimal | number; + /** + * Funds that are not yet available in the balance + * @type {string} + * @memberof AccountBalance + */ + pending?: Decimal | number; + /** + * + * @type {any} + * @memberof AccountBalance + */ + reserved?: any | null; + /** + * The currency of the account + * @type {string} + * @memberof AccountBalance + */ + currency?: string; +} + +/** + * Check if a given object implements the AccountBalance interface. + */ +export function instanceOfAccountBalance(value: object): value is AccountBalance { + return true; +} + +export function AccountBalanceFromJSON(json: any): AccountBalance { + return AccountBalanceFromJSONTyped(json, false); +} + +export function AccountBalanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountBalance { + if (json == null) { + return json; + } + return { + + 'available': json['available'] == null ? undefined : toDecimal(json['available']), + 'pending': json['pending'] == null ? undefined : toDecimal(json['pending']), + 'reserved': json['reserved'] == null ? undefined : toDecimal(json['reserved']), + 'currency': json['currency'] == null ? undefined : json['currency'], + }; +} + +export function AccountBalanceToJSON(json: any): AccountBalance { + return AccountBalanceToJSONTyped(json, false); +} + +export function AccountBalanceToJSONTyped(value?: AccountBalance | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'available': fromDecimal(value['available']), + 'pending': fromDecimal(value['pending']), + 'reserved': fromDecimal(value['reserved']), + 'currency': value['currency'], + }; +} + + +export interface CommerceCompanyInfoAccountBalance { + /** + * The account's current balance + * @type {string} + * @memberof AccountBalance + */ + available?: Decimal | number; + /** + * Funds that are not yet available in the balance + * @type {string} + * @memberof AccountBalance + */ + pending?: Decimal | number; + /** + * + * @type {any} + * @memberof AccountBalance + */ + reserved?: any | null; + /** + * The currency of the account + * @type {string} + * @memberof AccountBalance + */ + currency?: string; +} + +export interface CommerceCompanyProfileAccountBalance { + /** + * The account's current balance + * @type {string} + * @memberof AccountBalance + */ + available?: Decimal | number; + /** + * Funds that are not yet available in the balance + * @type {string} + * @memberof AccountBalance + */ + pending?: Decimal | number; + /** + * + * @type {any} + * @memberof AccountBalance + */ + reserved?: any | null; + /** + * The currency of the account + * @type {string} + * @memberof AccountBalance + */ + currency?: string; +} + +export interface CommerceProfileGetResponseAccountBalance { + /** + * The account's current balance + * @type {string} + * @memberof AccountBalance + */ + available?: Decimal | number; + /** + * Funds that are not yet available in the balance + * @type {string} + * @memberof AccountBalance + */ + pending?: Decimal | number; + /** + * + * @type {any} + * @memberof AccountBalance + */ + reserved?: any | null; + /** + * The currency of the account + * @type {string} + * @memberof AccountBalance + */ + currency?: string; +} + +export interface GetCommerceProfileResponseAccountBalance { + /** + * The account's current balance + * @type {string} + * @memberof AccountBalance + */ + available?: Decimal | number; + /** + * Funds that are not yet available in the balance + * @type {string} + * @memberof AccountBalance + */ + pending?: Decimal | number; + /** + * + * @type {any} + * @memberof AccountBalance + */ + reserved?: any | null; + /** + * The currency of the account + * @type {string} + * @memberof AccountBalance + */ + currency?: string; } diff --git a/lending/src/sdk/models/shared/accountbalanceamounts.ts b/lending/src/sdk/models/shared/accountbalanceamounts.ts index 2b2685f21..7667c0fbe 100644 --- a/lending/src/sdk/models/shared/accountbalanceamounts.ts +++ b/lending/src/sdk/models/shared/accountbalanceamounts.ts @@ -1,82 +1,283 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; /** * Depending on the data provided by the underlying bank, not all balances are always available. + * @export + * @interface AccountBalanceAmounts */ -export type AccountBalanceAmounts = { - /** - * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. - */ - available?: Decimal$ | number | null | undefined; - /** - * The balance of the account only including cleared transactions. - */ - current?: Decimal$ | number | undefined; - /** - * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. - */ - limit?: Decimal$ | number | null | undefined; -}; - -/** @internal */ -export const AccountBalanceAmounts$inboundSchema: z.ZodType< - AccountBalanceAmounts, - z.ZodTypeDef, - unknown -> = z.object({ - available: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - current: z.number().transform(v => new Decimal$(v)).optional(), - limit: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), -}); -/** @internal */ -export type AccountBalanceAmounts$Outbound = { - available?: number | null | undefined; - current?: number | undefined; - limit?: number | null | undefined; -}; - -/** @internal */ -export const AccountBalanceAmounts$outboundSchema: z.ZodType< - AccountBalanceAmounts$Outbound, - z.ZodTypeDef, - AccountBalanceAmounts -> = z.object({ - available: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - current: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), - limit: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), -}); - -export function accountBalanceAmountsToJSON( - accountBalanceAmounts: AccountBalanceAmounts, -): string { - return JSON.stringify( - AccountBalanceAmounts$outboundSchema.parse(accountBalanceAmounts), - ); +export interface AccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; } -export function accountBalanceAmountsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountBalanceAmounts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountBalanceAmounts' from JSON`, - ); + +/** + * Check if a given object implements the AccountBalanceAmounts interface. + */ +export function instanceOfAccountBalanceAmounts(value: object): value is AccountBalanceAmounts { + return true; +} + +export function AccountBalanceAmountsFromJSON(json: any): AccountBalanceAmounts { + return AccountBalanceAmountsFromJSONTyped(json, false); +} + +export function AccountBalanceAmountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountBalanceAmounts { + if (json == null) { + return json; + } + return { + + ...json, + 'available': json['available'] == null ? undefined : toDecimal(json['available']), + 'current': json['current'] == null ? undefined : toDecimal(json['current']), + 'limit': json['limit'] == null ? undefined : toDecimal(json['limit']), + }; +} + +export function AccountBalanceAmountsToJSON(json: any): AccountBalanceAmounts { + return AccountBalanceAmountsToJSONTyped(json, false); +} + +export function AccountBalanceAmountsToJSONTyped(value?: AccountBalanceAmounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'available': fromDecimal(value['available']), + 'current': fromDecimal(value['current']), + 'limit': fromDecimal(value['limit']), + }; +} + + +export interface BankingAccountAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; +} + +export interface BankingAccountBalanceAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; +} + +export interface BankingAccountBalancesAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; +} + +export interface BankingAccountGetResponseAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; +} + +export interface BankingAccountsAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; +} + +export interface BankingBankAccountAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; +} + +export interface BankingBankAccountsAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; +} + +export interface GetBankingAccountResponseAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; +} + +export interface UploadBankStatementDataRequestBodyAccountBalanceAmounts { + [key: string]: any | any; + /** + * The balance available in the account, including any pending transactions. This doesn't include additional funds available from any overdrafts. + * @type {string} + * @memberof AccountBalanceAmounts + */ + available?: Decimal | number | null; + /** + * The balance of the account only including cleared transactions. + * @type {string} + * @memberof AccountBalanceAmounts + */ + current?: Decimal | number; + /** + * The minimum allowed balance for the account. For example, a $100.00 overdraft would show as a limit of `-100.00`. + * @type {string} + * @memberof AccountBalanceAmounts + */ + limit?: Decimal | number | null; } diff --git a/lending/src/sdk/models/shared/accountcategoriesupdatedwebhook.ts b/lending/src/sdk/models/shared/accountcategoriesupdatedwebhook.ts index c4b05931d..ee5f63946 100644 --- a/lending/src/sdk/models/shared/accountcategoriesupdatedwebhook.ts +++ b/lending/src/sdk/models/shared/accountcategoriesupdatedwebhook.ts @@ -1,145 +1,138 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountCategoriesUpdatedWebhookData } from './accountcategoriesupdatedwebhookdata'; import { - AccountCategoriesUpdatedWebhookData, - AccountCategoriesUpdatedWebhookData$inboundSchema, - AccountCategoriesUpdatedWebhookData$Outbound, - AccountCategoriesUpdatedWebhookData$outboundSchema, -} from "./accountcategoriesupdatedwebhookdata.js"; + AccountCategoriesUpdatedWebhookDataFromJSON, + AccountCategoriesUpdatedWebhookDataFromJSONTyped, + AccountCategoriesUpdatedWebhookDataToJSON, + AccountCategoriesUpdatedWebhookDataToJSONTyped, +} from './accountcategoriesupdatedwebhookdata'; /** * Webhook request body for the "Account categories updated" event. + * @export + * @interface AccountCategoriesUpdatedWebhook */ -export type AccountCategoriesUpdatedWebhook = { - /** - * Unique identifier for your client in Codat. - */ - clientId?: string | undefined; - /** - * Name of your client in Codat. - */ - clientName?: string | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId?: string | undefined; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionId?: string | undefined; - /** - * Unique identifier for the rule. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - ruleId?: string | undefined; - /** - * The type of rule. - */ - ruleType?: string | undefined; - /** - * Unique identifier of the webhook event. - */ - alertId?: string | undefined; - /** - * A human-readable message about the webhook. - */ - message?: string | undefined; - data?: AccountCategoriesUpdatedWebhookData | undefined; -}; +export interface AccountCategoriesUpdatedWebhook { + /** + * Unique identifier for your client in Codat. + * @type {string} + * @memberof AccountCategoriesUpdatedWebhook + */ + clientId?: string; + /** + * Name of your client in Codat. + * @type {string} + * @memberof AccountCategoriesUpdatedWebhook + */ + clientName?: string; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountCategoriesUpdatedWebhook + */ + companyId?: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountCategoriesUpdatedWebhook + */ + dataConnectionId?: string; + /** + * Unique identifier for the rule. + * @type {string} + * @memberof AccountCategoriesUpdatedWebhook + * @deprecated + */ + ruleId?: string; + /** + * The type of rule. + * @type {string} + * @memberof AccountCategoriesUpdatedWebhook + */ + ruleType?: string; + /** + * Unique identifier of the webhook event. + * @type {string} + * @memberof AccountCategoriesUpdatedWebhook + */ + alertId?: string; + /** + * A human-readable message about the webhook. + * @type {string} + * @memberof AccountCategoriesUpdatedWebhook + */ + message?: string; + /** + * + * @type {AccountCategoriesUpdatedWebhookData} + * @memberof AccountCategoriesUpdatedWebhook + */ + data?: AccountCategoriesUpdatedWebhookData; +} -/** @internal */ -export const AccountCategoriesUpdatedWebhook$inboundSchema: z.ZodType< - AccountCategoriesUpdatedWebhook, - z.ZodTypeDef, - unknown -> = z.object({ - ClientId: z.string().optional(), - ClientName: z.string().optional(), - CompanyId: z.string().optional(), - DataConnectionId: z.string().optional(), - RuleId: z.string().optional(), - RuleType: z.string().optional(), - AlertId: z.string().optional(), - Message: z.string().optional(), - Data: AccountCategoriesUpdatedWebhookData$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "ClientId": "clientId", - "ClientName": "clientName", - "CompanyId": "companyId", - "DataConnectionId": "dataConnectionId", - "RuleId": "ruleId", - "RuleType": "ruleType", - "AlertId": "alertId", - "Message": "message", - "Data": "data", - }); -}); -/** @internal */ -export type AccountCategoriesUpdatedWebhook$Outbound = { - ClientId?: string | undefined; - ClientName?: string | undefined; - CompanyId?: string | undefined; - DataConnectionId?: string | undefined; - RuleId?: string | undefined; - RuleType?: string | undefined; - AlertId?: string | undefined; - Message?: string | undefined; - Data?: AccountCategoriesUpdatedWebhookData$Outbound | undefined; -}; +/** + * Check if a given object implements the AccountCategoriesUpdatedWebhook interface. + */ +export function instanceOfAccountCategoriesUpdatedWebhook(value: object): value is AccountCategoriesUpdatedWebhook { + return true; +} -/** @internal */ -export const AccountCategoriesUpdatedWebhook$outboundSchema: z.ZodType< - AccountCategoriesUpdatedWebhook$Outbound, - z.ZodTypeDef, - AccountCategoriesUpdatedWebhook -> = z.object({ - clientId: z.string().optional(), - clientName: z.string().optional(), - companyId: z.string().optional(), - dataConnectionId: z.string().optional(), - ruleId: z.string().optional(), - ruleType: z.string().optional(), - alertId: z.string().optional(), - message: z.string().optional(), - data: AccountCategoriesUpdatedWebhookData$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - clientId: "ClientId", - clientName: "ClientName", - companyId: "CompanyId", - dataConnectionId: "DataConnectionId", - ruleId: "RuleId", - ruleType: "RuleType", - alertId: "AlertId", - message: "Message", - data: "Data", - }); -}); +export function AccountCategoriesUpdatedWebhookFromJSON(json: any): AccountCategoriesUpdatedWebhook { + return AccountCategoriesUpdatedWebhookFromJSONTyped(json, false); +} -export function accountCategoriesUpdatedWebhookToJSON( - accountCategoriesUpdatedWebhook: AccountCategoriesUpdatedWebhook, -): string { - return JSON.stringify( - AccountCategoriesUpdatedWebhook$outboundSchema.parse( - accountCategoriesUpdatedWebhook, - ), - ); +export function AccountCategoriesUpdatedWebhookFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountCategoriesUpdatedWebhook { + if (json == null) { + return json; + } + return { + + 'clientId': json['ClientId'] == null ? undefined : json['ClientId'], + 'clientName': json['ClientName'] == null ? undefined : json['ClientName'], + 'companyId': json['CompanyId'] == null ? undefined : json['CompanyId'], + 'dataConnectionId': json['DataConnectionId'] == null ? undefined : json['DataConnectionId'], + 'ruleId': json['RuleId'] == null ? undefined : json['RuleId'], + 'ruleType': json['RuleType'] == null ? undefined : json['RuleType'], + 'alertId': json['AlertId'] == null ? undefined : json['AlertId'], + 'message': json['Message'] == null ? undefined : json['Message'], + 'data': json['Data'] == null ? undefined : AccountCategoriesUpdatedWebhookDataFromJSON(json['Data']), + }; } -export function accountCategoriesUpdatedWebhookFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountCategoriesUpdatedWebhook$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountCategoriesUpdatedWebhook' from JSON`, - ); + +export function AccountCategoriesUpdatedWebhookToJSON(json: any): AccountCategoriesUpdatedWebhook { + return AccountCategoriesUpdatedWebhookToJSONTyped(json, false); } + +export function AccountCategoriesUpdatedWebhookToJSONTyped(value?: AccountCategoriesUpdatedWebhook | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'ClientId': value['clientId'], + 'ClientName': value['clientName'], + 'CompanyId': value['companyId'], + 'DataConnectionId': value['dataConnectionId'], + 'RuleId': value['ruleId'], + 'RuleType': value['ruleType'], + 'AlertId': value['alertId'], + 'Message': value['message'], + 'Data': AccountCategoriesUpdatedWebhookDataToJSON(value['data']), + }; +} + diff --git a/lending/src/sdk/models/shared/accountcategoriesupdatedwebhookdata.ts b/lending/src/sdk/models/shared/accountcategoriesupdatedwebhookdata.ts index 8acb84cf6..7a8298ace 100644 --- a/lending/src/sdk/models/shared/accountcategoriesupdatedwebhookdata.ts +++ b/lending/src/sdk/models/shared/accountcategoriesupdatedwebhookdata.ts @@ -1,62 +1,80 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type AccountCategoriesUpdatedWebhookData = { - /** - * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: - * - * @remarks - * ``` - * 2020-10-08 - * ``` - */ - modifiedDate?: string | null | undefined; -}; - -/** @internal */ -export const AccountCategoriesUpdatedWebhookData$inboundSchema: z.ZodType< - AccountCategoriesUpdatedWebhookData, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.nullable(z.string()).optional(), -}); -/** @internal */ -export type AccountCategoriesUpdatedWebhookData$Outbound = { - modifiedDate?: string | null | undefined; -}; - -/** @internal */ -export const AccountCategoriesUpdatedWebhookData$outboundSchema: z.ZodType< - AccountCategoriesUpdatedWebhookData$Outbound, - z.ZodTypeDef, - AccountCategoriesUpdatedWebhookData -> = z.object({ - modifiedDate: z.nullable(z.string()).optional(), -}); - -export function accountCategoriesUpdatedWebhookDataToJSON( - accountCategoriesUpdatedWebhookData: AccountCategoriesUpdatedWebhookData, -): string { - return JSON.stringify( - AccountCategoriesUpdatedWebhookData$outboundSchema.parse( - accountCategoriesUpdatedWebhookData, - ), - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface AccountCategoriesUpdatedWebhookData + */ +export interface AccountCategoriesUpdatedWebhookData { + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof AccountCategoriesUpdatedWebhookData + */ + modifiedDate?: string | null; +} + +/** + * Check if a given object implements the AccountCategoriesUpdatedWebhookData interface. + */ +export function instanceOfAccountCategoriesUpdatedWebhookData(value: object): value is AccountCategoriesUpdatedWebhookData { + return true; +} + +export function AccountCategoriesUpdatedWebhookDataFromJSON(json: any): AccountCategoriesUpdatedWebhookData { + return AccountCategoriesUpdatedWebhookDataFromJSONTyped(json, false); +} + +export function AccountCategoriesUpdatedWebhookDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountCategoriesUpdatedWebhookData { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + }; } -export function accountCategoriesUpdatedWebhookDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - AccountCategoriesUpdatedWebhookData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountCategoriesUpdatedWebhookData' from JSON`, - ); + +export function AccountCategoriesUpdatedWebhookDataToJSON(json: any): AccountCategoriesUpdatedWebhookData { + return AccountCategoriesUpdatedWebhookDataToJSONTyped(json, false); +} + +export function AccountCategoriesUpdatedWebhookDataToJSONTyped(value?: AccountCategoriesUpdatedWebhookData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + }; +} + + +export interface AccountCategoriesUpdatedWebhookAccountCategoriesUpdatedWebhookData { + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof AccountCategoriesUpdatedWebhookData + */ + modifiedDate?: string | null; } diff --git a/lending/src/sdk/models/shared/accountcategorylevel.ts b/lending/src/sdk/models/shared/accountcategorylevel.ts index fe643b878..5f95e0c73 100644 --- a/lending/src/sdk/models/shared/accountcategorylevel.ts +++ b/lending/src/sdk/models/shared/accountcategorylevel.ts @@ -1,43 +1,74 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; /** * An object containing an ordered list of account category levels. + * @export + * @interface AccountCategoryLevel + */ +export interface AccountCategoryLevel { + /** + * Account category name. + * @type {string} + * @memberof AccountCategoryLevel + */ + levelName?: string; + /** + * Confidence level of the category. This will only be populated where `status` is `Suggested`. + * @type {string} + * @memberof AccountCategoryLevel + */ + confidence?: Decimal | number; +} + +/** + * Check if a given object implements the AccountCategoryLevel interface. */ -export type AccountCategoryLevel = { - /** - * Account category name. - */ - levelName?: string | undefined; - /** - * Confidence level of the category. This will only be populated where `status` is `Suggested`. - */ - confidence?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const AccountCategoryLevel$inboundSchema: z.ZodType< - AccountCategoryLevel, - z.ZodTypeDef, - unknown -> = z.object({ - levelName: z.string().optional(), - confidence: z.number().transform(v => new Decimal$(v)).optional(), -}); - -export function accountCategoryLevelFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountCategoryLevel$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountCategoryLevel' from JSON`, - ); +export function instanceOfAccountCategoryLevel(value: object): value is AccountCategoryLevel { + return true; +} + +export function AccountCategoryLevelFromJSON(json: any): AccountCategoryLevel { + return AccountCategoryLevelFromJSONTyped(json, false); } + +export function AccountCategoryLevelFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountCategoryLevel { + if (json == null) { + return json; + } + return { + + 'levelName': json['levelName'] == null ? undefined : json['levelName'], + 'confidence': json['confidence'] == null ? undefined : toDecimal(json['confidence']), + }; +} + +export function AccountCategoryLevelToJSON(json: any): AccountCategoryLevel { + return AccountCategoryLevelToJSONTyped(json, false); +} + +export function AccountCategoryLevelToJSONTyped(value?: AccountCategoryLevel | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'levelName': value['levelName'], + 'confidence': fromDecimal(value['confidence']), + }; +} + diff --git a/lending/src/sdk/models/shared/accountidentifiers.ts b/lending/src/sdk/models/shared/accountidentifiers.ts index 290db19da..48960eb42 100644 --- a/lending/src/sdk/models/shared/accountidentifiers.ts +++ b/lending/src/sdk/models/shared/accountidentifiers.ts @@ -1,111 +1,540 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountIdentifierType } from './accountidentifiertype'; import { - AccountIdentifierType, - AccountIdentifierType$inboundSchema, - AccountIdentifierType$outboundSchema, -} from "./accountidentifiertype.js"; + AccountIdentifierTypeFromJSON, + AccountIdentifierTypeFromJSONTyped, + AccountIdentifierTypeToJSON, + AccountIdentifierTypeToJSONTyped, +} from './accountidentifiertype'; /** * An object containing bank account identification information. + * @export + * @interface AccountIdentifiers + */ +export interface AccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; +} + + + +/** + * Check if a given object implements the AccountIdentifiers interface. */ -export type AccountIdentifiers = { - /** - * Type of account - */ - type: AccountIdentifierType; - /** - * Detailed account category - */ - subtype?: string | null | undefined; - /** - * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. - */ - number?: string | null | undefined; - /** - * The local (usually national) routing number for the account. - * - * @remarks - * - * This is known by different names in different countries: - * * BSB code (Australia) - * * routing number (Canada, USA) - * * sort code (UK) - */ - bankCode?: string | null | undefined; - /** - * The international bank account number (IBAN) for the account, if known. - */ - iban?: string | null | undefined; - /** - * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. - */ - bic?: string | null | undefined; - /** - * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) - */ - maskedAccountNumber?: string | null | undefined; -}; - -/** @internal */ -export const AccountIdentifiers$inboundSchema: z.ZodType< - AccountIdentifiers, - z.ZodTypeDef, - unknown -> = z.object({ - type: AccountIdentifierType$inboundSchema, - subtype: z.nullable(z.string()).optional(), - number: z.nullable(z.string()).optional(), - bankCode: z.nullable(z.string()).optional(), - iban: z.nullable(z.string()).optional(), - bic: z.nullable(z.string()).optional(), - maskedAccountNumber: z.nullable(z.string()).optional(), -}); -/** @internal */ -export type AccountIdentifiers$Outbound = { - type: string; - subtype?: string | null | undefined; - number?: string | null | undefined; - bankCode?: string | null | undefined; - iban?: string | null | undefined; - bic?: string | null | undefined; - maskedAccountNumber?: string | null | undefined; -}; - -/** @internal */ -export const AccountIdentifiers$outboundSchema: z.ZodType< - AccountIdentifiers$Outbound, - z.ZodTypeDef, - AccountIdentifiers -> = z.object({ - type: AccountIdentifierType$outboundSchema, - subtype: z.nullable(z.string()).optional(), - number: z.nullable(z.string()).optional(), - bankCode: z.nullable(z.string()).optional(), - iban: z.nullable(z.string()).optional(), - bic: z.nullable(z.string()).optional(), - maskedAccountNumber: z.nullable(z.string()).optional(), -}); - -export function accountIdentifiersToJSON( - accountIdentifiers: AccountIdentifiers, -): string { - return JSON.stringify( - AccountIdentifiers$outboundSchema.parse(accountIdentifiers), - ); +export function instanceOfAccountIdentifiers(value: object): value is AccountIdentifiers { + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function AccountIdentifiersFromJSON(json: any): AccountIdentifiers { + return AccountIdentifiersFromJSONTyped(json, false); +} + +export function AccountIdentifiersFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountIdentifiers { + if (json == null) { + return json; + } + return { + + ...json, + 'type': AccountIdentifierTypeFromJSON(json['type']), + 'subtype': json['subtype'] == null ? undefined : json['subtype'], + 'number': json['number'] == null ? undefined : json['number'], + 'bankCode': json['bankCode'] == null ? undefined : json['bankCode'], + 'iban': json['iban'] == null ? undefined : json['iban'], + 'bic': json['bic'] == null ? undefined : json['bic'], + 'maskedAccountNumber': json['maskedAccountNumber'] == null ? undefined : json['maskedAccountNumber'], + }; +} + +export function AccountIdentifiersToJSON(json: any): AccountIdentifiers { + return AccountIdentifiersToJSONTyped(json, false); +} + +export function AccountIdentifiersToJSONTyped(value?: AccountIdentifiers | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'type': AccountIdentifierTypeToJSON(value['type']), + 'subtype': value['subtype'], + 'number': value['number'], + 'bankCode': value['bankCode'], + 'iban': value['iban'], + 'bic': value['bic'], + 'maskedAccountNumber': value['maskedAccountNumber'], + }; } -export function accountIdentifiersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountIdentifiers$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountIdentifiers' from JSON`, - ); + + +export interface BankingAccountAccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; +} + +export interface BankingAccountGetResponseAccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; +} + +export interface BankingAccountsAccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; +} + +export interface BankingBankAccountAccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; +} + +export interface BankingBankAccountsAccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; +} + +export interface CategorizedBankStatementAccountsAccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; +} + +export interface GetBankingAccountResponseAccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; +} + +export interface UploadBankStatementDataRequestBodyAccountIdentifiers { + [key: string]: any | any; + /** + * + * @type {AccountIdentifierType} + * @memberof AccountIdentifiers + */ + type: AccountIdentifierType; + /** + * Detailed account category + * @type {string} + * @memberof AccountIdentifiers + */ + subtype?: string | null; + /** + * The account number for the account. When combined with the`bankCode`, this is usually enough to uniquely identify an account within a jurisdiction. + * @type {string} + * @memberof AccountIdentifiers + */ + number?: string | null; + /** + * The local (usually national) routing number for the account. + * + * This is known by different names in different countries: + * * BSB code (Australia) + * * routing number (Canada, USA) + * * sort code (UK) + * @type {string} + * @memberof AccountIdentifiers + */ + bankCode?: string | null; + /** + * The international bank account number (IBAN) for the account, if known. + * @type {string} + * @memberof AccountIdentifiers + */ + iban?: string | null; + /** + * The ISO 9362 code (commonly called SWIFT code, SWIFT-BIC or BIC) for the account. + * @type {string} + * @memberof AccountIdentifiers + */ + bic?: string | null; + /** + * A portion of the actual account `number` to help account identification where number is tokenised (Plaid only) + * @type {string} + * @memberof AccountIdentifiers + */ + maskedAccountNumber?: string | null; } diff --git a/lending/src/sdk/models/shared/accountidentifiertype.ts b/lending/src/sdk/models/shared/accountidentifiertype.ts index 373207e40..4c8c2de69 100644 --- a/lending/src/sdk/models/shared/accountidentifiertype.ts +++ b/lending/src/sdk/models/shared/accountidentifiertype.ts @@ -1,32 +1,60 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ + +import type { Account } from '../Account'; +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Type of account + * @export */ export const AccountIdentifierType = { - Account: "Account", - Card: "Card", - Credit: "Credit", - Depository: "Depository", - Investment: "Investment", - Loan: "Loan", - Other: "Other", + Account: 'Account', + Card: 'Card', + Credit: 'Credit', + Depository: 'Depository', + Investment: 'Investment', + Loan: 'Loan', + Other: 'Other' } as const; -/** - * Type of account - */ -export type AccountIdentifierType = ClosedEnum; - -/** @internal */ -export const AccountIdentifierType$inboundSchema: z.ZodNativeEnum< - typeof AccountIdentifierType -> = z.nativeEnum(AccountIdentifierType); -/** @internal */ -export const AccountIdentifierType$outboundSchema: z.ZodNativeEnum< - typeof AccountIdentifierType -> = AccountIdentifierType$inboundSchema; +export type AccountIdentifierType = typeof AccountIdentifierType[keyof typeof AccountIdentifierType]; + + +export function instanceOfAccountIdentifierType(value: any): boolean { + for (const key in AccountIdentifierType) { + if (Object.prototype.hasOwnProperty.call(AccountIdentifierType, key)) { + if (AccountIdentifierType[key as keyof typeof AccountIdentifierType] === value) { + return true; + } + } + } + return false; +} + +export function AccountIdentifierTypeFromJSON(json: any): AccountIdentifierType { + return AccountIdentifierTypeFromJSONTyped(json, false); +} + +export function AccountIdentifierTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountIdentifierType { + return json as AccountIdentifierType; +} + +export function AccountIdentifierTypeToJSON(value?: AccountIdentifierType | null): any { + return value as any; +} + +export function AccountIdentifierTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): AccountIdentifierType { + return value as AccountIdentifierType; +} + diff --git a/lending/src/sdk/models/shared/accountinfo.ts b/lending/src/sdk/models/shared/accountinfo.ts index 3bc959020..211b3d67f 100644 --- a/lending/src/sdk/models/shared/accountinfo.ts +++ b/lending/src/sdk/models/shared/accountinfo.ts @@ -1,82 +1,213 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface AccountInfo + */ +export interface AccountInfo { + /** + * Description of the account. + * @type {string} + * @memberof AccountInfo + */ + description?: string | null; + /** + * Name given to the account by the user. Used in UIs to assist in account selection. + * @type {string} + * @memberof AccountInfo + */ + nickname?: string | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof AccountInfo + */ + accountOpenDate?: string | null; + /** + * Balance of funds available for use. This includes pending activity. + * @type {string} + * @memberof AccountInfo + */ + availableBalance?: Decimal | number | null; +} -export type AccountInfo = { - /** - * Description of the account. - */ - description?: string | null | undefined; - /** - * Name given to the account by the user. Used in UIs to assist in account selection. - */ - nickname?: string | null | undefined; - /** - * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: - * - * @remarks - * ``` - * 2020-10-08 - * ``` - */ - accountOpenDate?: string | null | undefined; - /** - * Balance of funds available for use. This includes pending activity. - */ - availableBalance?: Decimal$ | number | null | undefined; -}; +/** + * Check if a given object implements the AccountInfo interface. + */ +export function instanceOfAccountInfo(value: object): value is AccountInfo { + return true; +} -/** @internal */ -export const AccountInfo$inboundSchema: z.ZodType< - AccountInfo, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.nullable(z.string()).optional(), - nickname: z.nullable(z.string()).optional(), - accountOpenDate: z.nullable(z.string()).optional(), - availableBalance: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), -}); -/** @internal */ -export type AccountInfo$Outbound = { - description?: string | null | undefined; - nickname?: string | null | undefined; - accountOpenDate?: string | null | undefined; - availableBalance?: number | null | undefined; -}; +export function AccountInfoFromJSON(json: any): AccountInfo { + return AccountInfoFromJSONTyped(json, false); +} + +export function AccountInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountInfo { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'nickname': json['nickname'] == null ? undefined : json['nickname'], + 'accountOpenDate': json['accountOpenDate'] == null ? undefined : json['accountOpenDate'], + 'availableBalance': json['availableBalance'] == null ? undefined : toDecimal(json['availableBalance']), + }; +} + +export function AccountInfoToJSON(json: any): AccountInfo { + return AccountInfoToJSONTyped(json, false); +} -/** @internal */ -export const AccountInfo$outboundSchema: z.ZodType< - AccountInfo$Outbound, - z.ZodTypeDef, - AccountInfo -> = z.object({ - description: z.nullable(z.string()).optional(), - nickname: z.nullable(z.string()).optional(), - accountOpenDate: z.nullable(z.string()).optional(), - availableBalance: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), -}); +export function AccountInfoToJSONTyped(value?: AccountInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function accountInfoToJSON(accountInfo: AccountInfo): string { - return JSON.stringify(AccountInfo$outboundSchema.parse(accountInfo)); + return { + + 'description': value['description'], + 'nickname': value['nickname'], + 'accountOpenDate': value['accountOpenDate'], + 'availableBalance': fromDecimal(value['availableBalance']), + }; } -export function accountInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountInfo' from JSON`, - ); + + +export interface CreateSourceAccountRequestBodyAccountInfo { + /** + * Description of the account. + * @type {string} + * @memberof AccountInfo + */ + description?: string | null; + /** + * Name given to the account by the user. Used in UIs to assist in account selection. + * @type {string} + * @memberof AccountInfo + */ + nickname?: string | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof AccountInfo + */ + accountOpenDate?: string | null; + /** + * Balance of funds available for use. This includes pending activity. + * @type {string} + * @memberof AccountInfo + */ + availableBalance?: Decimal | number | null; +} + +export interface CreateSourceAccountResponseAccountInfo { + /** + * Description of the account. + * @type {string} + * @memberof AccountInfo + */ + description?: string | null; + /** + * Name given to the account by the user. Used in UIs to assist in account selection. + * @type {string} + * @memberof AccountInfo + */ + nickname?: string | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof AccountInfo + */ + accountOpenDate?: string | null; + /** + * Balance of funds available for use. This includes pending activity. + * @type {string} + * @memberof AccountInfo + */ + availableBalance?: Decimal | number | null; +} + +export interface SourceAccountCreateResponseAccountInfo { + /** + * Description of the account. + * @type {string} + * @memberof AccountInfo + */ + description?: string | null; + /** + * Name given to the account by the user. Used in UIs to assist in account selection. + * @type {string} + * @memberof AccountInfo + */ + nickname?: string | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof AccountInfo + */ + accountOpenDate?: string | null; + /** + * Balance of funds available for use. This includes pending activity. + * @type {string} + * @memberof AccountInfo + */ + availableBalance?: Decimal | number | null; +} + +export interface SourceAccountV2AccountInfo { + /** + * Description of the account. + * @type {string} + * @memberof AccountInfo + */ + description?: string | null; + /** + * Name given to the account by the user. Used in UIs to assist in account selection. + * @type {string} + * @memberof AccountInfo + */ + nickname?: string | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof AccountInfo + */ + accountOpenDate?: string | null; + /** + * Balance of funds available for use. This includes pending activity. + * @type {string} + * @memberof AccountInfo + */ + availableBalance?: Decimal | number | null; } diff --git a/lending/src/sdk/models/shared/accountingaccount.ts b/lending/src/sdk/models/shared/accountingaccount.ts index b9db5fc8d..47e66d1e7 100644 --- a/lending/src/sdk/models/shared/accountingaccount.ts +++ b/lending/src/sdk/models/shared/accountingaccount.ts @@ -1,235 +1,1261 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountStatus, AccountStatus$inboundSchema } from "./accountstatus.js"; -import { AccountType, AccountType$inboundSchema } from "./accounttype.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; -import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; - +/* tslint:disable */ +/* eslint-disable */ /** - * 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. - * - * @remarks - * - * 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. + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | * - * You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io * - * ## `validDatatypeLinks` example - * - * The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. - * - * ```json validDatatypeLinks for an account - * { - * "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - * "nominalCode": "090", - * "name": "Business Bank Account", - * #... - * "validDatatypeLinks": [ - * { - * "property": "Id", - * "links": [ - * "Payment.AccountRef.Id", - * "BillPayment.AccountRef.Id", - * "DirectIncome.LineItems.AccountRef.Id", - * "DirectCost.LineItems.AccountRef.Id" - * ] - * } - * ] - * } - * ``` - * - * ## Support for `validDatatypeLinks` - * - * Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. - * - * If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -export type ValidDataTypeLinks = { - /** - * The property from the account that can be linked. - */ - property?: string | null | undefined; - /** - * Supported `dataTypes` that the record can be linked to. - */ - links?: Array | null | undefined; -}; + +import type { AccountingCreateAccountResponseValidDataTypeLinks } from './validdatatypelinks'; +import type { AccountType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountStatus } from './accountstatus'; +import { + AccountStatusFromJSON, + AccountStatusFromJSONTyped, + AccountStatusToJSON, + AccountStatusToJSONTyped, +} from './accountstatus'; +import type { SupplementalData } from './supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { Metadata } from './metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { ValidDataTypeLinks } from './validdatatypelinks'; +import { + ValidDataTypeLinksFromJSON, + ValidDataTypeLinksFromJSONTyped, + ValidDataTypeLinksToJSON, + ValidDataTypeLinksToJSONTyped, +} from './validdatatypelinks'; /** - * > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. - * - * @remarks - * + * > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. + * * ## 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/lending-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. + * @export + * @interface AccountingAccount */ -export type AccountingAccount = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the account, unique for the company. - */ - id?: string | undefined; - /** - * 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. - */ - nominalCode?: string | null | undefined; - /** - * Name of the account. - */ - name?: string | null | undefined; - /** - * Description for the account. - */ - description?: string | null | undefined; - /** - * Full category of the account. - * - * @remarks - * - * 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. - */ - fullyQualifiedCategory?: string | null | undefined; - /** - * Full name of the account, for example: - * - * @remarks - * - `Cash On Hand` - * - `Rents Held In Trust` - * - `Fixed Asset` - */ - fullyQualifiedName?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Current balance in the account. - */ - currentBalance?: Decimal$ | number | null | undefined; - /** - * Type of account - */ - type?: AccountType | undefined; - /** - * Status of the account - */ - status?: AccountStatus | undefined; - /** - * Confirms whether the account is a bank account or not. - */ - isBankAccount?: boolean | undefined; - /** - * 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](/lending-api#/schemas/ValidDataTypeLinks). - */ - validDatatypeLinks?: Array | null | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; - metadata?: Metadata | undefined; -}; - -/** @internal */ -export const ValidDataTypeLinks$inboundSchema: z.ZodType< - ValidDataTypeLinks, - z.ZodTypeDef, - unknown -> = z.object({ - property: z.nullable(z.string()).optional(), - links: z.nullable(z.array(z.string())).optional(), -}); - -export function validDataTypeLinksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ValidDataTypeLinks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ValidDataTypeLinks' from JSON`, - ); +export interface AccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: AccountType; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; +} + + + +/** + * Check if a given object implements the AccountingAccount interface. + */ +export function instanceOfAccountingAccount(value: object): value is AccountingAccount { + return true; +} + +export function AccountingAccountFromJSON(json: any): AccountingAccount { + return AccountingAccountFromJSONTyped(json, false); +} + +export function AccountingAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAccount { + if (json == null) { + return json; + } + return { + + 'nominalCode': json['nominalCode'] == null ? undefined : json['nominalCode'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'fullyQualifiedCategory': json['fullyQualifiedCategory'] == null ? undefined : json['fullyQualifiedCategory'], + 'fullyQualifiedName': json['fullyQualifiedName'] == null ? undefined : json['fullyQualifiedName'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currentBalance': json['currentBalance'] == null ? undefined : toDecimal(json['currentBalance']), + 'type': json['type'] == null ? undefined : json['type'], + 'status': json['status'] == null ? undefined : AccountStatusFromJSON(json['status']), + 'isBankAccount': json['isBankAccount'] == null ? undefined : json['isBankAccount'], + 'validDatatypeLinks': json['validDatatypeLinks'] == null ? undefined : ((json['validDatatypeLinks'] as Array).map(ValidDataTypeLinksFromJSON)), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + }; +} + +export function AccountingAccountToJSON(json: any): AccountingAccount { + return AccountingAccountToJSONTyped(json, false); +} + +export function AccountingAccountToJSONTyped(value?: AccountingAccount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'nominalCode': value['nominalCode'], + 'name': value['name'], + 'description': value['description'], + 'fullyQualifiedCategory': value['fullyQualifiedCategory'], + 'fullyQualifiedName': value['fullyQualifiedName'], + 'currency': value['currency'], + 'currentBalance': fromDecimal(value['currentBalance']), + 'type': value['type'], + 'status': AccountStatusToJSON(value['status']), + 'isBankAccount': value['isBankAccount'], + 'validDatatypeLinks': value['validDatatypeLinks'] == null ? undefined : ((value['validDatatypeLinks'] as Array).map(ValidDataTypeLinksToJSON)), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'metadata': MetadataToJSON(value['metadata']), + }; +} + + +export interface AccountCreateResponseAccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; +} + +export interface AccountingAccountGetResponseAccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; +} + +export interface AccountingAccountsAccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; +} + +export interface AccountingAccountsListResponseAccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; +} + +export interface AccountingCreateAccountResponseAccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: AccountType; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; +} + +export interface CreateAccountResponseAccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; +} + +export interface GetAccountingAccountResponseAccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; } -/** @internal */ -export const AccountingAccount$inboundSchema: z.ZodType< - AccountingAccount, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - nominalCode: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - description: z.nullable(z.string()).optional(), - fullyQualifiedCategory: z.nullable(z.string()).optional(), - fullyQualifiedName: z.nullable(z.string()).optional(), - currency: z.string().optional(), - currentBalance: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - type: AccountType$inboundSchema.optional(), - status: AccountStatus$inboundSchema.optional(), - isBankAccount: z.boolean().optional(), - validDatatypeLinks: z.nullable( - z.array(z.lazy(() => ValidDataTypeLinks$inboundSchema)), - ).optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), -}); - -export function accountingAccountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingAccount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingAccount' from JSON`, - ); +export interface ListAccountingAccountsResponseAccountingAccount { + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountingAccount + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountingAccount + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountingAccount + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAccount + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountingAccount + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountingAccount + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountingAccount + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountingAccount + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountingAccount + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingAccount + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company. + * @type {string} + * @memberof AccountingAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingAccount + */ + metadata?: Metadata; } diff --git a/lending/src/sdk/models/shared/accountingaccounts.ts b/lending/src/sdk/models/shared/accountingaccounts.ts index 0589ab1e9..4d2e40980 100644 --- a/lending/src/sdk/models/shared/accountingaccounts.ts +++ b/lending/src/sdk/models/shared/accountingaccounts.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingAccount, - AccountingAccount$inboundSchema, -} from "./accountingaccount.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingAccounts = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingAccounts$inboundSchema: z.ZodType< - AccountingAccounts, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingAccount$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingAccountsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingAccounts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingAccounts' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingAccount } from './accountingaccount'; +import { + AccountingAccountFromJSON, + AccountingAccountFromJSONTyped, + AccountingAccountToJSON, + AccountingAccountToJSONTyped, +} from './accountingaccount'; + +/** + * + * @export + * @interface AccountingAccounts + */ +export interface AccountingAccounts { + /** + * Current page number. + * @type {number} + * @memberof AccountingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingAccounts + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingAccounts interface. + */ +export function instanceOfAccountingAccounts(value: object): value is AccountingAccounts { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingAccountsFromJSON(json: any): AccountingAccounts { + return AccountingAccountsFromJSONTyped(json, false); +} + +export function AccountingAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAccounts { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingAccountFromJSON)), + }; +} + +export function AccountingAccountsToJSON(json: any): AccountingAccounts { + return AccountingAccountsToJSONTyped(json, false); +} + +export function AccountingAccountsToJSONTyped(value?: AccountingAccounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingAccountToJSON)), + }; +} + + +export interface AccountingAccountsListResponseAccountingAccounts { + /** + * Current page number. + * @type {number} + * @memberof AccountingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingAccounts + */ + results?: Array; +} + +export interface ListAccountingAccountsResponseAccountingAccounts { + /** + * Current page number. + * @type {number} + * @memberof AccountingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingAccounts + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingaccounttransaction.ts b/lending/src/sdk/models/shared/accountingaccounttransaction.ts index cc6938150..b9d3b5695 100644 --- a/lending/src/sdk/models/shared/accountingaccounttransaction.ts +++ b/lending/src/sdk/models/shared/accountingaccounttransaction.ts @@ -1,195 +1,1031 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { AccountingAccountTransactionStatus } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { Metadata } from './metadata'; import { - AccountTransactionLine, - AccountTransactionLine$inboundSchema, -} from "./accounttransactionline.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { BankAccountRef } from './bankaccountref'; import { - BankAccountRef, - BankAccountRef$inboundSchema, -} from "./bankaccountref.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; - -/** - * The status of the account transaction. - */ -export const AccountingAccountTransactionStatus = { - Unknown: "Unknown", - Unreconciled: "Unreconciled", - Reconciled: "Reconciled", - Void: "Void", -} as const; -/** - * The status of the account transaction. - */ -export type AccountingAccountTransactionStatus = ClosedEnum< - typeof AccountingAccountTransactionStatus ->; + BankAccountRefFromJSON, + BankAccountRefFromJSONTyped, + BankAccountRefToJSON, + BankAccountRefToJSONTyped, +} from './bankaccountref'; +import type { AccountTransactionLine } from './accounttransactionline'; +import { + AccountTransactionLineFromJSON, + AccountTransactionLineFromJSONTyped, + AccountTransactionLineToJSON, + AccountTransactionLineToJSONTyped, +} from './accounttransactionline'; /** * > **Language tip:** In Codat, account transactions represent all transactions posted to a bank account within an accounting software. For bank transactions posted within a banking platform, refer to [Banking transactions](https://docs.codat.io/lending-api#/operations/list-all-banking-transactions). - * - * @remarks - * + * * ## Overview - * + * * In Codat’s data model, account transactions represent bank activity within an accounting software. 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/lending-api#/schemas/Payment), [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment), [direct costs](https://docs.codat.io/lending-api#/schemas/DirectCost), [direct incomes](https://docs.codat.io/lending-api#/schemas/DirectIncome), and [transfers](https://docs.codat.io/lending-api#/schemas/Transfer). + * @export + * @interface AccountingAccountTransaction + */ +export interface AccountingAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + id?: string; + /** + * Identifier of the transaction (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + transactionId?: string | null; + /** + * Additional information about the account transaction, if available. + * @type {string} + * @memberof AccountingAccountTransaction + */ + note?: string | null; + /** + * Reference to the bank account the account transaction is recorded against. + * @type {BankAccountRef} + * @memberof AccountingAccountTransaction + */ + bankAccountRef?: BankAccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + date?: string; + /** + * The status of the account transaction. + * @type {string} + * @memberof AccountingAccountTransaction + */ + status?: AccountingAccountTransactionStatus; + /** + * 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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingAccountTransaction + */ + currencyRate?: Decimal | number | null; + /** + * Array of account transaction lines. + * @type {Array} + * @memberof AccountingAccountTransaction + */ + lines?: Array | null; + /** + * Total amount of the account transactions, inclusive of tax. + * @type {string} + * @memberof AccountingAccountTransaction + */ + totalAmount?: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingAccountTransaction + */ + metadata?: Metadata; +} + + +/** + * @export + */ +export const AccountingAccountTransactionStatusEnum = { + Unknown: 'Unknown', + Unreconciled: 'Unreconciled', + Reconciled: 'Reconciled', + Void: 'Void' +} as const; +export type AccountingAccountTransactionStatusEnum = typeof AccountingAccountTransactionStatusEnum[keyof typeof AccountingAccountTransactionStatusEnum]; + + +/** + * Check if a given object implements the AccountingAccountTransaction interface. */ -export type AccountingAccountTransaction = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier of the direct cost (unique to the company). - */ - id?: string | undefined; - /** - * Identifier of the transaction (unique to the company). - */ - transactionId?: string | null | undefined; - /** - * Additional information about the account transaction, if available. - */ - note?: string | null | undefined; - /** - * Links to the Account transactions data type. - */ - bankAccountRef?: BankAccountRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * The status of the account transaction. - */ - status?: AccountingAccountTransactionStatus | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * Array of account transaction lines. - */ - lines?: Array | null | undefined; - /** - * Total amount of the account transactions, inclusive of tax. - */ - totalAmount?: Decimal$ | number | undefined; - metadata?: Metadata | undefined; -}; - -/** @internal */ -export const AccountingAccountTransactionStatus$inboundSchema: z.ZodNativeEnum< - typeof AccountingAccountTransactionStatus -> = z.nativeEnum(AccountingAccountTransactionStatus); - -/** @internal */ -export const AccountingAccountTransaction$inboundSchema: z.ZodType< - AccountingAccountTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - transactionId: z.nullable(z.string()).optional(), - note: z.nullable(z.string()).optional(), - bankAccountRef: BankAccountRef$inboundSchema.optional(), - date: z.string().optional(), - status: AccountingAccountTransactionStatus$inboundSchema.optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - lines: z.nullable(z.array(AccountTransactionLine$inboundSchema)).optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - metadata: Metadata$inboundSchema.optional(), -}); - -export function accountingAccountTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingAccountTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingAccountTransaction' from JSON`, - ); +export function instanceOfAccountingAccountTransaction(value: object): value is AccountingAccountTransaction { + return true; +} + +export function AccountingAccountTransactionFromJSON(json: any): AccountingAccountTransaction { + return AccountingAccountTransactionFromJSONTyped(json, false); +} + +export function AccountingAccountTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAccountTransaction { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'transactionId': json['transactionId'] == null ? undefined : json['transactionId'], + 'note': json['note'] == null ? undefined : json['note'], + 'bankAccountRef': json['bankAccountRef'] == null ? undefined : BankAccountRefFromJSON(json['bankAccountRef']), + 'date': json['date'] == null ? undefined : json['date'], + 'status': json['status'] == null ? undefined : json['status'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lines': json['lines'] == null ? undefined : ((json['lines'] as Array).map(AccountTransactionLineFromJSON)), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + }; +} + +export function AccountingAccountTransactionToJSON(json: any): AccountingAccountTransaction { + return AccountingAccountTransactionToJSONTyped(json, false); +} + +export function AccountingAccountTransactionToJSONTyped(value?: AccountingAccountTransaction | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'transactionId': value['transactionId'], + 'note': value['note'], + 'bankAccountRef': BankAccountRefToJSON(value['bankAccountRef']), + 'date': value['date'], + 'status': value['status'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lines': value['lines'] == null ? undefined : ((value['lines'] as Array).map(AccountTransactionLineToJSON)), + 'totalAmount': fromDecimal(value['totalAmount']), + 'metadata': MetadataToJSON(value['metadata']), + }; +} + + +export interface AccountingAccountTransactionGetResponseAccountingAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + id?: string; + /** + * Identifier of the transaction (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + transactionId?: string | null; + /** + * Additional information about the account transaction, if available. + * @type {string} + * @memberof AccountingAccountTransaction + */ + note?: string | null; + /** + * Reference to the bank account the account transaction is recorded against. + * @type {BankAccountRef} + * @memberof AccountingAccountTransaction + */ + bankAccountRef?: BankAccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + date?: string; + /** + * The status of the account transaction. + * @type {string} + * @memberof AccountingAccountTransaction + */ + status?: AccountingAccountTransactionStatus; + /** + * 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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingAccountTransaction + */ + currencyRate?: Decimal | number | null; + /** + * Array of account transaction lines. + * @type {Array} + * @memberof AccountingAccountTransaction + */ + lines?: Array | null; + /** + * Total amount of the account transactions, inclusive of tax. + * @type {string} + * @memberof AccountingAccountTransaction + */ + totalAmount?: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingAccountTransaction + */ + metadata?: Metadata; +} + +export interface AccountingAccountTransactionsAccountingAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + id?: string; + /** + * Identifier of the transaction (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + transactionId?: string | null; + /** + * Additional information about the account transaction, if available. + * @type {string} + * @memberof AccountingAccountTransaction + */ + note?: string | null; + /** + * Reference to the bank account the account transaction is recorded against. + * @type {BankAccountRef} + * @memberof AccountingAccountTransaction + */ + bankAccountRef?: BankAccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + date?: string; + /** + * The status of the account transaction. + * @type {string} + * @memberof AccountingAccountTransaction + */ + status?: AccountingAccountTransactionStatus; + /** + * 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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingAccountTransaction + */ + currencyRate?: Decimal | number | null; + /** + * Array of account transaction lines. + * @type {Array} + * @memberof AccountingAccountTransaction + */ + lines?: Array | null; + /** + * Total amount of the account transactions, inclusive of tax. + * @type {string} + * @memberof AccountingAccountTransaction + */ + totalAmount?: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingAccountTransaction + */ + metadata?: Metadata; +} + +export interface AccountingAccountTransactionsListResponseAccountingAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + id?: string; + /** + * Identifier of the transaction (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + transactionId?: string | null; + /** + * Additional information about the account transaction, if available. + * @type {string} + * @memberof AccountingAccountTransaction + */ + note?: string | null; + /** + * Reference to the bank account the account transaction is recorded against. + * @type {BankAccountRef} + * @memberof AccountingAccountTransaction + */ + bankAccountRef?: BankAccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + date?: string; + /** + * The status of the account transaction. + * @type {string} + * @memberof AccountingAccountTransaction + */ + status?: AccountingAccountTransactionStatus; + /** + * 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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingAccountTransaction + */ + currencyRate?: Decimal | number | null; + /** + * Array of account transaction lines. + * @type {Array} + * @memberof AccountingAccountTransaction + */ + lines?: Array | null; + /** + * Total amount of the account transactions, inclusive of tax. + * @type {string} + * @memberof AccountingAccountTransaction + */ + totalAmount?: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingAccountTransaction + */ + metadata?: Metadata; +} + +export interface GetAccountingAccountTransactionResponseAccountingAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + id?: string; + /** + * Identifier of the transaction (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + transactionId?: string | null; + /** + * Additional information about the account transaction, if available. + * @type {string} + * @memberof AccountingAccountTransaction + */ + note?: string | null; + /** + * Reference to the bank account the account transaction is recorded against. + * @type {BankAccountRef} + * @memberof AccountingAccountTransaction + */ + bankAccountRef?: BankAccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + date?: string; + /** + * The status of the account transaction. + * @type {string} + * @memberof AccountingAccountTransaction + */ + status?: AccountingAccountTransactionStatus; + /** + * 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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingAccountTransaction + */ + currencyRate?: Decimal | number | null; + /** + * Array of account transaction lines. + * @type {Array} + * @memberof AccountingAccountTransaction + */ + lines?: Array | null; + /** + * Total amount of the account transactions, inclusive of tax. + * @type {string} + * @memberof AccountingAccountTransaction + */ + totalAmount?: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingAccountTransaction + */ + metadata?: Metadata; +} + +export interface ListAccountingAccountTransactionsResponseAccountingAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAccountTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + id?: string; + /** + * Identifier of the transaction (unique to the company). + * @type {string} + * @memberof AccountingAccountTransaction + */ + transactionId?: string | null; + /** + * Additional information about the account transaction, if available. + * @type {string} + * @memberof AccountingAccountTransaction + */ + note?: string | null; + /** + * Reference to the bank account the account transaction is recorded against. + * @type {BankAccountRef} + * @memberof AccountingAccountTransaction + */ + bankAccountRef?: BankAccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + date?: string; + /** + * The status of the account transaction. + * @type {string} + * @memberof AccountingAccountTransaction + */ + status?: AccountingAccountTransactionStatus; + /** + * 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. + * @type {string} + * @memberof AccountingAccountTransaction + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingAccountTransaction + */ + currencyRate?: Decimal | number | null; + /** + * Array of account transaction lines. + * @type {Array} + * @memberof AccountingAccountTransaction + */ + lines?: Array | null; + /** + * Total amount of the account transactions, inclusive of tax. + * @type {string} + * @memberof AccountingAccountTransaction + */ + totalAmount?: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingAccountTransaction + */ + metadata?: Metadata; } diff --git a/lending/src/sdk/models/shared/accountingaccounttransactions.ts b/lending/src/sdk/models/shared/accountingaccounttransactions.ts index 82dae8952..9b0ed954f 100644 --- a/lending/src/sdk/models/shared/accountingaccounttransactions.ts +++ b/lending/src/sdk/models/shared/accountingaccounttransactions.ts @@ -1,59 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingAccountTransaction } from './accountingaccounttransaction'; import { - AccountingAccountTransaction, - AccountingAccountTransaction$inboundSchema, -} from "./accountingaccounttransaction.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingAccountTransactions = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingAccountTransactions$inboundSchema: z.ZodType< - AccountingAccountTransactions, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingAccountTransaction$inboundSchema)) - .optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingAccountTransactionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingAccountTransactions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingAccountTransactions' from JSON`, - ); + AccountingAccountTransactionFromJSON, + AccountingAccountTransactionFromJSONTyped, + AccountingAccountTransactionToJSON, + AccountingAccountTransactionToJSONTyped, +} from './accountingaccounttransaction'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface AccountingAccountTransactions + */ +export interface AccountingAccountTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingAccountTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingAccountTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingAccountTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingAccountTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingAccountTransactions + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingAccountTransactions interface. + */ +export function instanceOfAccountingAccountTransactions(value: object): value is AccountingAccountTransactions { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingAccountTransactionsFromJSON(json: any): AccountingAccountTransactions { + return AccountingAccountTransactionsFromJSONTyped(json, false); +} + +export function AccountingAccountTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAccountTransactions { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingAccountTransactionFromJSON)), + }; +} + +export function AccountingAccountTransactionsToJSON(json: any): AccountingAccountTransactions { + return AccountingAccountTransactionsToJSONTyped(json, false); +} + +export function AccountingAccountTransactionsToJSONTyped(value?: AccountingAccountTransactions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingAccountTransactionToJSON)), + }; +} + + +export interface AccountingAccountTransactionsListResponseAccountingAccountTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingAccountTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingAccountTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingAccountTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingAccountTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingAccountTransactions + */ + results?: Array; +} + +export interface ListAccountingAccountTransactionsResponseAccountingAccountTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingAccountTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingAccountTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingAccountTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingAccountTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingAccountTransactions + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingaddress.ts b/lending/src/sdk/models/shared/accountingaddress.ts index eb9e7e67f..335c39872 100644 --- a/lending/src/sdk/models/shared/accountingaddress.ts +++ b/lending/src/sdk/models/shared/accountingaddress.ts @@ -1,101 +1,619 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingAddressType } from './accountingaddresstype'; import { - AccountingAddressType, - AccountingAddressType$inboundSchema, - AccountingAddressType$outboundSchema, -} from "./accountingaddresstype.js"; - -export type AccountingAddress = { - /** - * The type of the address - */ - type: AccountingAddressType; - /** - * Line 1 of the customer address. - */ - line1?: string | null | undefined; - /** - * Line 2 of the customer address. - */ - line2?: string | null | undefined; - /** - * City of the customer address. - */ - city?: string | null | undefined; - /** - * Region of the customer address. - */ - region?: string | null | undefined; - /** - * Country of the customer address. - */ - country?: string | null | undefined; - /** - * Postal code or zip code. - */ - postalCode?: string | null | undefined; -}; - -/** @internal */ -export const AccountingAddress$inboundSchema: z.ZodType< - AccountingAddress, - z.ZodTypeDef, - unknown -> = z.object({ - type: AccountingAddressType$inboundSchema, - line1: z.nullable(z.string()).optional(), - line2: z.nullable(z.string()).optional(), - city: z.nullable(z.string()).optional(), - region: z.nullable(z.string()).optional(), - country: z.nullable(z.string()).optional(), - postalCode: z.nullable(z.string()).optional(), -}); -/** @internal */ -export type AccountingAddress$Outbound = { - type: string; - line1?: string | null | undefined; - line2?: string | null | undefined; - city?: string | null | undefined; - region?: string | null | undefined; - country?: string | null | undefined; - postalCode?: string | null | undefined; -}; - -/** @internal */ -export const AccountingAddress$outboundSchema: z.ZodType< - AccountingAddress$Outbound, - z.ZodTypeDef, - AccountingAddress -> = z.object({ - type: AccountingAddressType$outboundSchema, - line1: z.nullable(z.string()).optional(), - line2: z.nullable(z.string()).optional(), - city: z.nullable(z.string()).optional(), - region: z.nullable(z.string()).optional(), - country: z.nullable(z.string()).optional(), - postalCode: z.nullable(z.string()).optional(), -}); - -export function accountingAddressToJSON( - accountingAddress: AccountingAddress, -): string { - return JSON.stringify( - AccountingAddress$outboundSchema.parse(accountingAddress), - ); -} -export function accountingAddressFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingAddress$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingAddress' from JSON`, - ); + AccountingAddressTypeFromJSON, + AccountingAddressTypeFromJSONTyped, + AccountingAddressTypeToJSON, + AccountingAddressTypeToJSONTyped, +} from './accountingaddresstype'; + +/** + * + * @export + * @interface AccountingAddress + */ +export interface AccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + + + +/** + * Check if a given object implements the AccountingAddress interface. + */ +export function instanceOfAccountingAddress(value: object): value is AccountingAddress { + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function AccountingAddressFromJSON(json: any): AccountingAddress { + return AccountingAddressFromJSONTyped(json, false); +} + +export function AccountingAddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAddress { + if (json == null) { + return json; + } + return { + + 'type': AccountingAddressTypeFromJSON(json['type']), + 'line1': json['line1'] == null ? undefined : json['line1'], + 'line2': json['line2'] == null ? undefined : json['line2'], + 'city': json['city'] == null ? undefined : json['city'], + 'region': json['region'] == null ? undefined : json['region'], + 'country': json['country'] == null ? undefined : json['country'], + 'postalCode': json['postalCode'] == null ? undefined : json['postalCode'], + }; +} + +export function AccountingAddressToJSON(json: any): AccountingAddress { + return AccountingAddressToJSONTyped(json, false); +} + +export function AccountingAddressToJSONTyped(value?: AccountingAddress | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': AccountingAddressTypeToJSON(value['type']), + 'line1': value['line1'], + 'line2': value['line2'], + 'city': value['city'], + 'region': value['region'], + 'country': value['country'], + 'postalCode': value['postalCode'], + }; +} + + +export interface AccountingCompanyInfoAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface AccountingCompanyInformationAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface AccountingCreateSupplierResponseAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface AccountingCustomerAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface AccountingCustomerGetResponseAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface AccountingProfileGetResponseAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface AccountingSupplierAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface AccountingSupplierGetResponseAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface GetAccountingCustomerResponseAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface GetAccountingProfileResponseAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; +} + +export interface GetAccountingSupplierResponseAccountingAddress { + /** + * + * @type {AccountingAddressType} + * @memberof AccountingAddress + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line1?: string | null; + /** + * Line 2 of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + line2?: string | null; + /** + * City of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + city?: string | null; + /** + * Region of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + region?: string | null; + /** + * Country of the customer address. + * @type {string} + * @memberof AccountingAddress + */ + country?: string | null; + /** + * Postal code or zip code. + * @type {string} + * @memberof AccountingAddress + */ + postalCode?: string | null; } diff --git a/lending/src/sdk/models/shared/accountingaddresstype.ts b/lending/src/sdk/models/shared/accountingaddresstype.ts index 2f4e3b7a6..f4064a161 100644 --- a/lending/src/sdk/models/shared/accountingaddresstype.ts +++ b/lending/src/sdk/models/shared/accountingaddresstype.ts @@ -1,28 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The type of the address + * @export */ export const AccountingAddressType = { - Unknown: "Unknown", - Billing: "Billing", - Delivery: "Delivery", + Unknown: 'Unknown', + Billing: 'Billing', + Delivery: 'Delivery' } as const; -/** - * The type of the address - */ -export type AccountingAddressType = ClosedEnum; - -/** @internal */ -export const AccountingAddressType$inboundSchema: z.ZodNativeEnum< - typeof AccountingAddressType -> = z.nativeEnum(AccountingAddressType); -/** @internal */ -export const AccountingAddressType$outboundSchema: z.ZodNativeEnum< - typeof AccountingAddressType -> = AccountingAddressType$inboundSchema; +export type AccountingAddressType = typeof AccountingAddressType[keyof typeof AccountingAddressType]; + + +export function instanceOfAccountingAddressType(value: any): boolean { + for (const key in AccountingAddressType) { + if (Object.prototype.hasOwnProperty.call(AccountingAddressType, key)) { + if (AccountingAddressType[key as keyof typeof AccountingAddressType] === value) { + return true; + } + } + } + return false; +} + +export function AccountingAddressTypeFromJSON(json: any): AccountingAddressType { + return AccountingAddressTypeFromJSONTyped(json, false); +} + +export function AccountingAddressTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAddressType { + return json as AccountingAddressType; +} + +export function AccountingAddressTypeToJSON(value?: AccountingAddressType | null): any { + return value as any; +} + +export function AccountingAddressTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): AccountingAddressType { + return value as AccountingAddressType; +} + diff --git a/lending/src/sdk/models/shared/accountingagedcreditorreport.ts b/lending/src/sdk/models/shared/accountingagedcreditorreport.ts index 4e600e8ad..0b43db0ad 100644 --- a/lending/src/sdk/models/shared/accountingagedcreditorreport.ts +++ b/lending/src/sdk/models/shared/accountingagedcreditorreport.ts @@ -1,117 +1,498 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AgedCreditor, AgedCreditor$inboundSchema } from "./agedcreditor.js"; +import { mapValues } from '../../../runtime'; +import type { AgedCreditor } from './agedcreditor'; +import { + AgedCreditorFromJSON, + AgedCreditorFromJSONTyped, + AgedCreditorToJSON, + AgedCreditorToJSONTyped, +} from './agedcreditor'; /** * The Aged Creditors report shows the total balance owed by a business to its suppliers over time. - * - * @remarks - * + * * You can generate it for a company based on recently synced data from your customers' accounting software. 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/lending-api#/schemas/Supplier), [Bills](https://docs.codat.io/lending-api#/schemas/Bill), [Bill credit notes](https://docs.codat.io/lending-api#/schemas/BillCreditNote), and [Bill payments](https://docs.codat.io/lending-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**. * 4. Select **Aged Creditors**. * 5. _(Optional)_ Edit the default reporting parameters. - * a. You can change the report date in the **Date** box. By default, the report includes transactions that occurred up to, but not including, today's date. To include transactions for today, enter tomorrow's date. + * a. You can change the report date in the **Date** box. By default, the report includes transactions that occurred up to, but not including, today's date. To include transactions for today, enter tomorrow's date. * b. In the **Period Length Days** box, select the default period length for each column (the default is 30 days). * 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. + * @export + * @interface AccountingAgedCreditorReport */ -export type AccountingAgedCreditorReport = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - generated?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - reportDate?: string | undefined; - /** - * Array of aged creditor. - */ - data?: Array | undefined; -}; +export interface AccountingAgedCreditorReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + reportDate?: string; + /** + * Array of aged creditor. + * @type {Array} + * @memberof AccountingAgedCreditorReport + */ + data?: Array; +} + +/** + * Check if a given object implements the AccountingAgedCreditorReport interface. + */ +export function instanceOfAccountingAgedCreditorReport(value: object): value is AccountingAgedCreditorReport { + return true; +} -/** @internal */ -export const AccountingAgedCreditorReport$inboundSchema: z.ZodType< - AccountingAgedCreditorReport, - z.ZodTypeDef, - unknown -> = z.object({ - generated: z.string().optional(), - reportDate: z.string().optional(), - data: z.array(AgedCreditor$inboundSchema).optional(), -}); +export function AccountingAgedCreditorReportFromJSON(json: any): AccountingAgedCreditorReport { + return AccountingAgedCreditorReportFromJSONTyped(json, false); +} + +export function AccountingAgedCreditorReportFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAgedCreditorReport { + if (json == null) { + return json; + } + return { + + 'generated': json['generated'] == null ? undefined : json['generated'], + 'reportDate': json['reportDate'] == null ? undefined : json['reportDate'], + 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(AgedCreditorFromJSON)), + }; +} + +export function AccountingAgedCreditorReportToJSON(json: any): AccountingAgedCreditorReport { + return AccountingAgedCreditorReportToJSONTyped(json, false); +} + +export function AccountingAgedCreditorReportToJSONTyped(value?: AccountingAgedCreditorReport | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'generated': value['generated'], + 'reportDate': value['reportDate'], + 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(AgedCreditorToJSON)), + }; +} + + +export interface AccountingAgedCreditorReportAccountingAgedCreditorsReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + reportDate?: string; + /** + * Array of aged creditor. + * @type {Array} + * @memberof AccountingAgedCreditorReport + */ + data?: Array; +} + +export interface AccountingAgedCreditorsReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + reportDate?: string; + /** + * Array of aged creditor. + * @type {Array} + * @memberof AccountingAgedCreditorReport + */ + data?: Array; +} + +export interface AccountingAgedCreditorsReportGetResponseAccountingAgedCreditorReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + reportDate?: string; + /** + * Array of aged creditor. + * @type {Array} + * @memberof AccountingAgedCreditorReport + */ + data?: Array; +} + +export interface AccountingAgedCreditorsReportGetResponseAccountingAgedCreditorsReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + reportDate?: string; + /** + * Array of aged creditor. + * @type {Array} + * @memberof AccountingAgedCreditorReport + */ + data?: Array; +} + +export interface GetAccountingAgedCreditorsReportResponseAccountingAgedCreditorReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + reportDate?: string; + /** + * Array of aged creditor. + * @type {Array} + * @memberof AccountingAgedCreditorReport + */ + data?: Array; +} -export function accountingAgedCreditorReportFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingAgedCreditorReport$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingAgedCreditorReport' from JSON`, - ); +export interface GetAccountingAgedCreditorsReportResponseAccountingAgedCreditorsReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedCreditorReport + */ + reportDate?: string; + /** + * Array of aged creditor. + * @type {Array} + * @memberof AccountingAgedCreditorReport + */ + data?: Array; } diff --git a/lending/src/sdk/models/shared/accountingageddebtorreport.ts b/lending/src/sdk/models/shared/accountingageddebtorreport.ts index d958af8ee..5a81b9dcf 100644 --- a/lending/src/sdk/models/shared/accountingageddebtorreport.ts +++ b/lending/src/sdk/models/shared/accountingageddebtorreport.ts @@ -1,117 +1,498 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AgedDebtor, AgedDebtor$inboundSchema } from "./ageddebtor.js"; +import { mapValues } from '../../../runtime'; +import type { AgedDebtor } from './ageddebtor'; +import { + AgedDebtorFromJSON, + AgedDebtorFromJSONTyped, + AgedDebtorToJSON, + AgedDebtorToJSONTyped, +} from './ageddebtor'; /** - * The Aged Debtors report shows the total outstanding balance due from customers to the business over time. - * - * @remarks - * + * 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 software. 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/lending-api#/schemas/Customer), [Invoices](https://docs.codat.io/lending-api#/schemas/Invoice), [Credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote), and [Payments](https://docs.codat.io/lending-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**. * 4. Select **Aged Debtors**. * 5. _(Optional)_ Edit the default reporting parameters. - * a. You can change the report date in the **Date** box. By default, the report includes transactions that occurred up to, but not including, today's date. To include transactions for today, enter tomorrow's date. + * a. You can change the report date in the **Date** box. By default, the report includes transactions that occurred up to, but not including, today's date. To include transactions for today, enter tomorrow's date. * b. In the **Period Length Days** box, select the default period length for each column (the default is 30 days). * 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. + * @export + * @interface AccountingAgedDebtorReport */ -export type AccountingAgedDebtorReport = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - generated?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - reportDate?: string | undefined; - /** - * Array of aged debtors. - */ - data?: Array | undefined; -}; +export interface AccountingAgedDebtorReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + reportDate?: string; + /** + * Array of aged debtors. + * @type {Array} + * @memberof AccountingAgedDebtorReport + */ + data?: Array; +} + +/** + * Check if a given object implements the AccountingAgedDebtorReport interface. + */ +export function instanceOfAccountingAgedDebtorReport(value: object): value is AccountingAgedDebtorReport { + return true; +} -/** @internal */ -export const AccountingAgedDebtorReport$inboundSchema: z.ZodType< - AccountingAgedDebtorReport, - z.ZodTypeDef, - unknown -> = z.object({ - generated: z.string().optional(), - reportDate: z.string().optional(), - data: z.array(AgedDebtor$inboundSchema).optional(), -}); +export function AccountingAgedDebtorReportFromJSON(json: any): AccountingAgedDebtorReport { + return AccountingAgedDebtorReportFromJSONTyped(json, false); +} + +export function AccountingAgedDebtorReportFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAgedDebtorReport { + if (json == null) { + return json; + } + return { + + 'generated': json['generated'] == null ? undefined : json['generated'], + 'reportDate': json['reportDate'] == null ? undefined : json['reportDate'], + 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(AgedDebtorFromJSON)), + }; +} + +export function AccountingAgedDebtorReportToJSON(json: any): AccountingAgedDebtorReport { + return AccountingAgedDebtorReportToJSONTyped(json, false); +} + +export function AccountingAgedDebtorReportToJSONTyped(value?: AccountingAgedDebtorReport | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'generated': value['generated'], + 'reportDate': value['reportDate'], + 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(AgedDebtorToJSON)), + }; +} + + +export interface AccountingAgedDebtorReportAccountingAgedDebtorsReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + reportDate?: string; + /** + * Array of aged debtors. + * @type {Array} + * @memberof AccountingAgedDebtorReport + */ + data?: Array; +} + +export interface AccountingAgedDebtorsReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + reportDate?: string; + /** + * Array of aged debtors. + * @type {Array} + * @memberof AccountingAgedDebtorReport + */ + data?: Array; +} + +export interface AccountingAgedDebtorsReportGetResponseAccountingAgedDebtorReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + reportDate?: string; + /** + * Array of aged debtors. + * @type {Array} + * @memberof AccountingAgedDebtorReport + */ + data?: Array; +} + +export interface AccountingAgedDebtorsReportGetResponseAccountingAgedDebtorsReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + reportDate?: string; + /** + * Array of aged debtors. + * @type {Array} + * @memberof AccountingAgedDebtorReport + */ + data?: Array; +} + +export interface GetAccountingAgedDebtorsReportResponseAccountingAgedDebtorReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + reportDate?: string; + /** + * Array of aged debtors. + * @type {Array} + * @memberof AccountingAgedDebtorReport + */ + data?: Array; +} -export function accountingAgedDebtorReportFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingAgedDebtorReport$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingAgedDebtorReport' from JSON`, - ); +export interface GetAccountingAgedDebtorsReportResponseAccountingAgedDebtorsReport { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + generated?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAgedDebtorReport + */ + reportDate?: string; + /** + * Array of aged debtors. + * @type {Array} + * @memberof AccountingAgedDebtorReport + */ + data?: Array; } diff --git a/lending/src/sdk/models/shared/accountingattachment.ts b/lending/src/sdk/models/shared/accountingattachment.ts index def0f1784..707695857 100644 --- a/lending/src/sdk/models/shared/accountingattachment.ts +++ b/lending/src/sdk/models/shared/accountingattachment.ts @@ -1,105 +1,2381 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * The Codat API supports pulling and pushing of file attachments for invoices, bills, direct costs, and direct incomes. - * - * @remarks - * + * * > **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](https://docs.codat.io/knowledge-base/advanced-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 | * | Dynamics 365 Business Central | 350 MB | Dynamics do not explicitly outline which file types are supported but they do state here that "You can attach any type of file, such as text, image, or video files". | + * + * @export + * @interface AccountingAttachment */ -export type AccountingAttachment = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the attachment, unique for the company in the accounting software. - */ - id?: string | undefined; - /** - * Name of the attachment file. - */ - name?: string | null | undefined; - /** - * 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**. - * - * @remarks - * - * Supported file types vary per platform. - */ - contentType?: string | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - dateCreated?: string | undefined; - /** - * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. - */ - fileSize?: number | null | undefined; - /** - * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. - */ - includeWhenSent?: boolean | undefined; -}; - -/** @internal */ -export const AccountingAttachment$inboundSchema: z.ZodType< - AccountingAttachment, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - name: z.nullable(z.string()).optional(), - contentType: z.nullable(z.string()).optional(), - dateCreated: z.string().optional(), - fileSize: z.nullable(z.number().int()).optional(), - includeWhenSent: z.boolean().optional(), -}); - -export function accountingAttachmentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingAttachment$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingAttachment' from JSON`, - ); +export interface AccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +/** + * Check if a given object implements the AccountingAttachment interface. + */ +export function instanceOfAccountingAttachment(value: object): value is AccountingAttachment { + return true; +} + +export function AccountingAttachmentFromJSON(json: any): AccountingAttachment { + return AccountingAttachmentFromJSONTyped(json, false); +} + +export function AccountingAttachmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingAttachment { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'contentType': json['contentType'] == null ? undefined : json['contentType'], + 'dateCreated': json['dateCreated'] == null ? undefined : json['dateCreated'], + 'fileSize': json['fileSize'] == null ? undefined : json['fileSize'], + 'includeWhenSent': json['includeWhenSent'] == null ? undefined : json['includeWhenSent'], + }; +} + +export function AccountingAttachmentToJSON(json: any): AccountingAttachment { + return AccountingAttachmentToJSONTyped(json, false); +} + +export function AccountingAttachmentToJSONTyped(value?: AccountingAttachment | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'name': value['name'], + 'contentType': value['contentType'], + 'dateCreated': value['dateCreated'], + 'fileSize': value['fileSize'], + 'includeWhenSent': value['includeWhenSent'], + }; +} + + +export interface AccountingBillAttachmentGetResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingBillAttachmentsListResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingCustomerAttachmentGetResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingCustomerAttachmentsListResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingDirectCostAttachmentGetResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingDirectCostAttachmentsListResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingDirectIncomeAttachmentGetResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingDirectIncomeAttachmentsListResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingInvoiceAttachmentGetResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingInvoiceAttachmentsListResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingSupplierAttachmentGetResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AccountingSupplierAttachmentsListResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface Attachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface AttachmentsAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface GetAccountingBillAttachmentResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface GetAccountingCustomerAttachmentResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface GetAccountingDirectCostAttachmentResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface GetAccountingDirectIncomeAttachmentResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface GetAccountingInvoiceAttachmentResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface GetAccountingSupplierAttachmentResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface ListAccountingBillAttachmentsResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface ListAccountingCustomerAttachmentsResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface ListAccountingDirectCostAttachmentsResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface ListAccountingDirectIncomeAttachmentsResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface ListAccountingInvoiceAttachmentsResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; +} + +export interface ListAccountingSupplierAttachmentsResponseAccountingAttachment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingAttachment + */ + sourceModifiedDate?: string; + /** + * Identifier for the attachment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingAttachment + */ + id?: string; + /** + * Name of the attachment file. + * @type {string} + * @memberof AccountingAttachment + */ + name?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingAttachment + */ + contentType?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingAttachment + */ + dateCreated?: string; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + * @type {number} + * @memberof AccountingAttachment + */ + fileSize?: number | null; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + * @type {boolean} + * @memberof AccountingAttachment + */ + includeWhenSent?: boolean; } diff --git a/lending/src/sdk/models/shared/accountingbalancesheet.ts b/lending/src/sdk/models/shared/accountingbalancesheet.ts index 168a629d3..b6c919f18 100644 --- a/lending/src/sdk/models/shared/accountingbalancesheet.ts +++ b/lending/src/sdk/models/shared/accountingbalancesheet.ts @@ -1,114 +1,298 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { BalanceSheet, BalanceSheet$inboundSchema } from "./balancesheet.js"; +import { mapValues } from '../../../runtime'; +import type { BalanceSheet } from './balancesheet'; +import { + BalanceSheetFromJSON, + BalanceSheetFromJSONTyped, + BalanceSheetToJSON, + BalanceSheetToJSONTyped, +} from './balancesheet'; /** * ## Overview - * - * @remarks - * + * * 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 software. - * + * * **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/lending-api#/operations/update-sync-settings). - * + * * **Want to pull this in a standardised structure?** * Our [Enhanced Financials](https://docs.codat.io/lending/features/financial-statements-overview) endpoints provide the same report under standardized headings, allowing you to pull it in the same format for all of your business customers. + * @export + * @interface AccountingBalanceSheet */ -export type AccountingBalanceSheet = { - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * An array of balance sheet reports. - */ - reports: Array; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - mostRecentAvailableMonth?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - earliestAvailableMonth?: string | undefined; -}; +export interface AccountingBalanceSheet { + [key: string]: any | any; + /** + * 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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + currency?: string; + /** + * An array of balance sheet reports. + * @type {Array} + * @memberof AccountingBalanceSheet + */ + reports: Array; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + earliestAvailableMonth?: string; +} -/** @internal */ -export const AccountingBalanceSheet$inboundSchema: z.ZodType< - AccountingBalanceSheet, - z.ZodTypeDef, - unknown -> = z.object({ - currency: z.string().optional(), - reports: z.array(BalanceSheet$inboundSchema), - mostRecentAvailableMonth: z.string().optional(), - earliestAvailableMonth: z.string().optional(), -}); +/** + * Check if a given object implements the AccountingBalanceSheet interface. + */ +export function instanceOfAccountingBalanceSheet(value: object): value is AccountingBalanceSheet { + if (!('reports' in value) || value['reports'] === undefined) return false; + return true; +} + +export function AccountingBalanceSheetFromJSON(json: any): AccountingBalanceSheet { + return AccountingBalanceSheetFromJSONTyped(json, false); +} + +export function AccountingBalanceSheetFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBalanceSheet { + if (json == null) { + return json; + } + return { + + ...json, + 'currency': json['currency'] == null ? undefined : json['currency'], + 'reports': ((json['reports'] as Array).map(BalanceSheetFromJSON)), + 'mostRecentAvailableMonth': json['mostRecentAvailableMonth'] == null ? undefined : json['mostRecentAvailableMonth'], + 'earliestAvailableMonth': json['earliestAvailableMonth'] == null ? undefined : json['earliestAvailableMonth'], + }; +} + +export function AccountingBalanceSheetToJSON(json: any): AccountingBalanceSheet { + return AccountingBalanceSheetToJSONTyped(json, false); +} + +export function AccountingBalanceSheetToJSONTyped(value?: AccountingBalanceSheet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'currency': value['currency'], + 'reports': ((value['reports'] as Array).map(BalanceSheetToJSON)), + 'mostRecentAvailableMonth': value['mostRecentAvailableMonth'], + 'earliestAvailableMonth': value['earliestAvailableMonth'], + }; +} + + +export interface AccountingBalanceSheetGetResponseAccountingBalanceSheet { + [key: string]: any | any; + /** + * 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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + currency?: string; + /** + * An array of balance sheet reports. + * @type {Array} + * @memberof AccountingBalanceSheet + */ + reports: Array; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + earliestAvailableMonth?: string; +} -export function accountingBalanceSheetFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBalanceSheet$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBalanceSheet' from JSON`, - ); +export interface GetAccountingBalanceSheetResponseAccountingBalanceSheet { + [key: string]: any | any; + /** + * 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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + currency?: string; + /** + * An array of balance sheet reports. + * @type {Array} + * @memberof AccountingBalanceSheet + */ + reports: Array; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBalanceSheet + */ + earliestAvailableMonth?: string; } diff --git a/lending/src/sdk/models/shared/accountingbankaccount.ts b/lending/src/sdk/models/shared/accountingbankaccount.ts index 45c17698f..551da45dd 100644 --- a/lending/src/sdk/models/shared/accountingbankaccount.ts +++ b/lending/src/sdk/models/shared/accountingbankaccount.ts @@ -1,245 +1,1765 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountingBankAccountType } from './accountingbankaccounttype'; import { - AccountingBankAccountType, - AccountingBankAccountType$inboundSchema, - AccountingBankAccountType$outboundSchema, -} from "./accountingbankaccounttype.js"; + AccountingBankAccountTypeFromJSON, + AccountingBankAccountTypeFromJSONTyped, + AccountingBankAccountTypeToJSON, + AccountingBankAccountTypeToJSONTyped, +} from './accountingbankaccounttype'; +import type { SupplementalData } from './supplementaldata'; import { - BankAccountStatus, - BankAccountStatus$inboundSchema, - BankAccountStatus$outboundSchema, -} from "./bankaccountstatus.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { Metadata } from './metadata'; import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { BankAccountStatus } from './bankaccountstatus'; import { - SupplementalData, - SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, -} from "./supplementaldata.js"; + BankAccountStatusFromJSON, + BankAccountStatusFromJSONTyped, + BankAccountStatusToJSON, + BankAccountStatusToJSONTyped, +} from './bankaccountstatus'; /** * > **Accessing Bank Accounts through Banking API** - * - * @remarks - * > - * > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. - * > + * > + * > 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 [Banking: Account](https://docs.codat.io/lending-api#/schemas/Account) data type. - * + * * ## 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 software. * * The currency and balance of the account. * * The sort code and account number. + * @export + * @interface AccountingBankAccount */ -export type AccountingBankAccount = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the account, unique for the company in the accounting software. - */ - id?: string | undefined; - /** - * Name of the bank account in the accounting software. - */ - accountName?: string | null | undefined; - /** - * The type of transactions and balances on the account. - * - * @remarks - * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. - * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. - */ - accountType?: AccountingBankAccountType | undefined; - /** - * Code used to identify each nominal account for a business. - */ - nominalCode?: string | null | undefined; - /** - * Sort code for the bank account. - * - * @remarks - * - * 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. - */ - sortCode?: string | null | undefined; - /** - * Account number for the bank account. - * - * @remarks - * - * 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. - */ - accountNumber?: string | null | undefined; - /** - * International bank account number of the account. Often used when making or receiving international payments. - */ - iBan?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Balance of the bank account. - */ - balance?: Decimal$ | number | null | undefined; - /** - * The institution of the bank account. - */ - institution?: string | null | undefined; - /** - * 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. - */ - availableBalance?: Decimal$ | number | null | undefined; - /** - * Pre-arranged overdraft limit of the account. - * - * @remarks - * - * The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. - */ - overdraftLimit?: Decimal$ | number | null | undefined; - /** - * Status of the bank account. - */ - status?: BankAccountStatus | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; - -/** @internal */ -export const AccountingBankAccount$inboundSchema: z.ZodType< - AccountingBankAccount, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - accountName: z.nullable(z.string()).optional(), - accountType: AccountingBankAccountType$inboundSchema.optional(), - nominalCode: z.nullable(z.string()).optional(), - sortCode: z.nullable(z.string()).optional(), - accountNumber: z.nullable(z.string()).optional(), - iBan: z.nullable(z.string()).optional(), - currency: z.string().optional(), - balance: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - institution: z.nullable(z.string()).optional(), - availableBalance: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - overdraftLimit: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - status: BankAccountStatus$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); -/** @internal */ -export type AccountingBankAccount$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - accountName?: string | null | undefined; - accountType?: string | undefined; - nominalCode?: string | null | undefined; - sortCode?: string | null | undefined; - accountNumber?: string | null | undefined; - iBan?: string | null | undefined; - currency?: string | undefined; - balance?: number | null | undefined; - institution?: string | null | undefined; - availableBalance?: number | null | undefined; - overdraftLimit?: number | null | undefined; - status?: string | undefined; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const AccountingBankAccount$outboundSchema: z.ZodType< - AccountingBankAccount$Outbound, - z.ZodTypeDef, - AccountingBankAccount -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - accountName: z.nullable(z.string()).optional(), - accountType: AccountingBankAccountType$outboundSchema.optional(), - nominalCode: z.nullable(z.string()).optional(), - sortCode: z.nullable(z.string()).optional(), - accountNumber: z.nullable(z.string()).optional(), - iBan: z.nullable(z.string()).optional(), - currency: z.string().optional(), - balance: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - institution: z.nullable(z.string()).optional(), - availableBalance: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - overdraftLimit: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - status: BankAccountStatus$outboundSchema.optional(), - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -export function accountingBankAccountToJSON( - accountingBankAccount: AccountingBankAccount, -): string { - return JSON.stringify( - AccountingBankAccount$outboundSchema.parse(accountingBankAccount), - ); -} -export function accountingBankAccountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBankAccount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBankAccount' from JSON`, - ); +export interface AccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + + + +/** + * Check if a given object implements the AccountingBankAccount interface. + */ +export function instanceOfAccountingBankAccount(value: object): value is AccountingBankAccount { + return true; +} + +export function AccountingBankAccountFromJSON(json: any): AccountingBankAccount { + return AccountingBankAccountFromJSONTyped(json, false); +} + +export function AccountingBankAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBankAccount { + if (json == null) { + return json; + } + return { + + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'accountType': json['accountType'] == null ? undefined : AccountingBankAccountTypeFromJSON(json['accountType']), + 'nominalCode': json['nominalCode'] == null ? undefined : json['nominalCode'], + 'sortCode': json['sortCode'] == null ? undefined : json['sortCode'], + 'accountNumber': json['accountNumber'] == null ? undefined : json['accountNumber'], + 'iBan': json['iBan'] == null ? undefined : json['iBan'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'institution': json['institution'] == null ? undefined : json['institution'], + 'availableBalance': json['availableBalance'] == null ? undefined : toDecimal(json['availableBalance']), + 'overdraftLimit': json['overdraftLimit'] == null ? undefined : toDecimal(json['overdraftLimit']), + 'status': json['status'] == null ? undefined : BankAccountStatusFromJSON(json['status']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingBankAccountToJSON(json: any): AccountingBankAccount { + return AccountingBankAccountToJSONTyped(json, false); +} + +export function AccountingBankAccountToJSONTyped(value?: AccountingBankAccount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'accountName': value['accountName'], + 'accountType': AccountingBankAccountTypeToJSON(value['accountType']), + 'nominalCode': value['nominalCode'], + 'sortCode': value['sortCode'], + 'accountNumber': value['accountNumber'], + 'iBan': value['iBan'], + 'currency': value['currency'], + 'balance': fromDecimal(value['balance']), + 'institution': value['institution'], + 'availableBalance': fromDecimal(value['availableBalance']), + 'overdraftLimit': fromDecimal(value['overdraftLimit']), + 'status': BankAccountStatusToJSON(value['status']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingBankAccountGetResponseAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface AccountingBankAccountsAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface AccountingBankAccountsListResponseAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface AccountingCreateBankAccountResponseAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface BankAccountCreateRequestBody { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface BankAccountCreateResponseAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface CreateBankAccountAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface CreateBankAccountRequestBody { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface CreateBankAccountResponseAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingBankAccountResponseAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingBankAccountsResponseAccountingBankAccount { + /** + * Name of the bank account in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + accountName?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof AccountingBankAccount + */ + accountType?: AccountingBankAccountType; + /** + * Code used to identify each nominal account for a business. + * @type {string} + * @memberof AccountingBankAccount + */ + nominalCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + accountNumber?: string | null; + /** + * International bank account number of the account. Often used when making or receiving international payments. + * @type {string} + * @memberof AccountingBankAccount + */ + iBan?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + currency?: string; + /** + * Balance of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + balance?: Decimal | number | null; + /** + * The institution of the bank account. + * @type {string} + * @memberof AccountingBankAccount + */ + institution?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingBankAccount + */ + availableBalance?: Decimal | number | null; + /** + * 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`. + * @type {string} + * @memberof AccountingBankAccount + */ + overdraftLimit?: Decimal | number | null; + /** + * + * @type {BankAccountStatus} + * @memberof AccountingBankAccount + */ + status?: BankAccountStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankAccount + */ + sourceModifiedDate?: string; + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBankAccount + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingBankAccount + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBankAccount + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingbankaccounts.ts b/lending/src/sdk/models/shared/accountingbankaccounts.ts index 125278c60..e4b2fd820 100644 --- a/lending/src/sdk/models/shared/accountingbankaccounts.ts +++ b/lending/src/sdk/models/shared/accountingbankaccounts.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingBankAccount, - AccountingBankAccount$inboundSchema, -} from "./accountingbankaccount.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingBankAccounts = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingBankAccounts$inboundSchema: z.ZodType< - AccountingBankAccounts, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingBankAccount$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingBankAccountsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBankAccounts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBankAccounts' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingBankAccount } from './accountingbankaccount'; +import { + AccountingBankAccountFromJSON, + AccountingBankAccountFromJSONTyped, + AccountingBankAccountToJSON, + AccountingBankAccountToJSONTyped, +} from './accountingbankaccount'; + +/** + * + * @export + * @interface AccountingBankAccounts + */ +export interface AccountingBankAccounts { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankAccounts + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingBankAccounts interface. + */ +export function instanceOfAccountingBankAccounts(value: object): value is AccountingBankAccounts { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingBankAccountsFromJSON(json: any): AccountingBankAccounts { + return AccountingBankAccountsFromJSONTyped(json, false); +} + +export function AccountingBankAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBankAccounts { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingBankAccountFromJSON)), + }; +} + +export function AccountingBankAccountsToJSON(json: any): AccountingBankAccounts { + return AccountingBankAccountsToJSONTyped(json, false); +} + +export function AccountingBankAccountsToJSONTyped(value?: AccountingBankAccounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingBankAccountToJSON)), + }; +} + + +export interface AccountingBankAccountsListResponseAccountingBankAccounts { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankAccounts + */ + results?: Array; +} + +export interface ListAccountingBankAccountsResponseAccountingBankAccounts { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankAccounts + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingbankaccounttype.ts b/lending/src/sdk/models/shared/accountingbankaccounttype.ts index d14de7cbb..8c43f0467 100644 --- a/lending/src/sdk/models/shared/accountingbankaccounttype.ts +++ b/lending/src/sdk/models/shared/accountingbankaccounttype.ts @@ -1,38 +1,56 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** - * The type of transactions and balances on the account. - * - * @remarks - * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + * 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. + * @export */ export const AccountingBankAccountType = { - Unknown: "Unknown", - Credit: "Credit", - Debit: "Debit", + Unknown: 'Unknown', + Credit: 'Credit', + Debit: 'Debit' } as const; -/** - * The type of transactions and balances on the account. - * - * @remarks - * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. - * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. - */ -export type AccountingBankAccountType = ClosedEnum< - typeof AccountingBankAccountType ->; - -/** @internal */ -export const AccountingBankAccountType$inboundSchema: z.ZodNativeEnum< - typeof AccountingBankAccountType -> = z.nativeEnum(AccountingBankAccountType); -/** @internal */ -export const AccountingBankAccountType$outboundSchema: z.ZodNativeEnum< - typeof AccountingBankAccountType -> = AccountingBankAccountType$inboundSchema; +export type AccountingBankAccountType = typeof AccountingBankAccountType[keyof typeof AccountingBankAccountType]; + + +export function instanceOfAccountingBankAccountType(value: any): boolean { + for (const key in AccountingBankAccountType) { + if (Object.prototype.hasOwnProperty.call(AccountingBankAccountType, key)) { + if (AccountingBankAccountType[key as keyof typeof AccountingBankAccountType] === value) { + return true; + } + } + } + return false; +} + +export function AccountingBankAccountTypeFromJSON(json: any): AccountingBankAccountType { + return AccountingBankAccountTypeFromJSONTyped(json, false); +} + +export function AccountingBankAccountTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBankAccountType { + return json as AccountingBankAccountType; +} + +export function AccountingBankAccountTypeToJSON(value?: AccountingBankAccountType | null): any { + return value as any; +} + +export function AccountingBankAccountTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): AccountingBankAccountType { + return value as AccountingBankAccountType; +} + diff --git a/lending/src/sdk/models/shared/accountingbanktransaction.ts b/lending/src/sdk/models/shared/accountingbanktransaction.ts index a62f9b7d7..ee630faaf 100644 --- a/lending/src/sdk/models/shared/accountingbanktransaction.ts +++ b/lending/src/sdk/models/shared/accountingbanktransaction.ts @@ -1,114 +1,1143 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { BankTransactionType } from './banktransactiontype'; import { - BankTransactionType, - BankTransactionType$inboundSchema, -} from "./banktransactiontype.js"; + BankTransactionTypeFromJSON, + BankTransactionTypeFromJSONTyped, + BankTransactionTypeToJSON, + BankTransactionTypeToJSONTyped, +} from './banktransactiontype'; /** * > **Accessing Bank Accounts through Banking API** - * - * @remarks - * > - * > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. + * > + * > 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 [Banking: Transaction](https://docs.codat.io/lending-api#/operations/list-transactions) data type. - * + * * ## 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. + * @export + * @interface AccountingBankTransaction + */ +export interface AccountingBankTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + + + +/** + * Check if a given object implements the AccountingBankTransaction interface. */ -export type AccountingBankTransaction = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the bank transaction, unique to the company in the accounting software. - */ - id?: string | undefined; - /** - * Unique identifier to the `accountId` the bank transactions originates from. - */ - accountId?: string | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - clearedOnDate?: string | undefined; - /** - * Description of the bank transaction. - */ - description?: string | null | undefined; - /** - * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. - */ - reconciled?: boolean | undefined; - /** - * The amount transacted in the bank transaction. - */ - amount?: Decimal$ | number | undefined; - /** - * The remaining balance in the account with ID `accountId`. - */ - balance?: Decimal$ | number | undefined; - /** - * Type of transaction for the bank statement line. - */ - transactionType?: BankTransactionType | undefined; -}; - -/** @internal */ -export const AccountingBankTransaction$inboundSchema: z.ZodType< - AccountingBankTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - accountId: z.nullable(z.string()).optional(), - clearedOnDate: z.string().optional(), - description: z.nullable(z.string()).optional(), - reconciled: z.boolean().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - balance: z.number().transform(v => new Decimal$(v)).optional(), - transactionType: BankTransactionType$inboundSchema.optional(), -}); - -export function accountingBankTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBankTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBankTransaction' from JSON`, - ); +export function instanceOfAccountingBankTransaction(value: object): value is AccountingBankTransaction { + return true; +} + +export function AccountingBankTransactionFromJSON(json: any): AccountingBankTransaction { + return AccountingBankTransactionFromJSONTyped(json, false); +} + +export function AccountingBankTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBankTransaction { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'accountId': json['accountId'] == null ? undefined : json['accountId'], + 'clearedOnDate': json['clearedOnDate'] == null ? undefined : json['clearedOnDate'], + 'description': json['description'] == null ? undefined : json['description'], + 'reconciled': json['reconciled'] == null ? undefined : json['reconciled'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'transactionType': json['transactionType'] == null ? undefined : BankTransactionTypeFromJSON(json['transactionType']), + }; +} + +export function AccountingBankTransactionToJSON(json: any): AccountingBankTransaction { + return AccountingBankTransactionToJSONTyped(json, false); +} + +export function AccountingBankTransactionToJSONTyped(value?: AccountingBankTransaction | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'accountId': value['accountId'], + 'clearedOnDate': value['clearedOnDate'], + 'description': value['description'], + 'reconciled': value['reconciled'], + 'amount': fromDecimal(value['amount']), + 'balance': fromDecimal(value['balance']), + 'transactionType': BankTransactionTypeToJSON(value['transactionType']), + }; +} + + +export interface AccountingAccountingBankTransactionsAccountingBankAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface AccountingAccountingBankTransactionsAccountingBankTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface AccountingBankAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface AccountingBankAccountTransactionsListResponseAccountingBankAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface AccountingBankAccountTransactionsListResponseAccountingBankTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface AccountingBankTransactionAccountingBankAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface AccountingBankTransactionsAccountingBankAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface AccountingBankTransactionsAccountingBankTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface ListAccountingBankAccountTransactionsResponseAccountingBankAccountTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; +} + +export interface ListAccountingBankAccountTransactionsResponseAccountingBankTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBankTransaction + */ + sourceModifiedDate?: string; + /** + * Identifier for the bank transaction, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingBankTransaction + */ + id?: string; + /** + * Unique identifier to the `accountId` the bank transactions originates from. + * @type {string} + * @memberof AccountingBankTransaction + */ + accountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBankTransaction + */ + clearedOnDate?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + description?: string | null; + /** + * `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. + * @type {boolean} + * @memberof AccountingBankTransaction + */ + reconciled?: boolean; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof AccountingBankTransaction + */ + amount?: Decimal | number; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof AccountingBankTransaction + */ + balance?: Decimal | number; + /** + * + * @type {BankTransactionType} + * @memberof AccountingBankTransaction + */ + transactionType?: BankTransactionType; } diff --git a/lending/src/sdk/models/shared/accountingbanktransactions.ts b/lending/src/sdk/models/shared/accountingbanktransactions.ts index d13889db7..8ade78751 100644 --- a/lending/src/sdk/models/shared/accountingbanktransactions.ts +++ b/lending/src/sdk/models/shared/accountingbanktransactions.ts @@ -1,59 +1,314 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingBankTransaction } from './accountingbanktransaction'; import { - AccountingBankTransaction, - AccountingBankTransaction$inboundSchema, -} from "./accountingbanktransaction.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingBankTransactions = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingBankTransactions$inboundSchema: z.ZodType< - AccountingBankTransactions, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingBankTransaction$inboundSchema)) - .optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingBankTransactionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBankTransactions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBankTransactions' from JSON`, - ); + AccountingBankTransactionFromJSON, + AccountingBankTransactionFromJSONTyped, + AccountingBankTransactionToJSON, + AccountingBankTransactionToJSONTyped, +} from './accountingbanktransaction'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface AccountingBankTransactions + */ +export interface AccountingBankTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankTransactions + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingBankTransactions interface. + */ +export function instanceOfAccountingBankTransactions(value: object): value is AccountingBankTransactions { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingBankTransactionsFromJSON(json: any): AccountingBankTransactions { + return AccountingBankTransactionsFromJSONTyped(json, false); +} + +export function AccountingBankTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBankTransactions { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingBankTransactionFromJSON)), + }; +} + +export function AccountingBankTransactionsToJSON(json: any): AccountingBankTransactions { + return AccountingBankTransactionsToJSONTyped(json, false); +} + +export function AccountingBankTransactionsToJSONTyped(value?: AccountingBankTransactions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingBankTransactionToJSON)), + }; +} + + +export interface AccountingAccountingBankTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankTransactions + */ + results?: Array; +} + +export interface AccountingBankAccountTransactionsListResponseAccountingAccountingBankTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankTransactions + */ + results?: Array; +} + +export interface AccountingBankAccountTransactionsListResponseAccountingBankTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankTransactions + */ + results?: Array; +} + +export interface AccountingBankTransactionsAccountingAccountingBankTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankTransactions + */ + results?: Array; +} + +export interface ListAccountingBankAccountTransactionsResponseAccountingAccountingBankTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankTransactions + */ + results?: Array; +} + +export interface ListAccountingBankAccountTransactionsResponseAccountingBankTransactions { + /** + * Current page number. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBankTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBankTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBankTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBankTransactions + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingbill.ts b/lending/src/sdk/models/shared/accountingbill.ts index 41a504c63..536e05e43 100644 --- a/lending/src/sdk/models/shared/accountingbill.ts +++ b/lending/src/sdk/models/shared/accountingbill.ts @@ -1,260 +1,1257 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { WithholdingTax } from './withholdingtax'; import { - AccountingPaymentAllocation, - AccountingPaymentAllocation$inboundSchema, -} from "./accountingpaymentallocation.js"; -import { BillLineItem, BillLineItem$inboundSchema } from "./billlineitem.js"; -import { BillStatus, BillStatus$inboundSchema } from "./billstatus.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + WithholdingTaxFromJSON, + WithholdingTaxFromJSONTyped, + WithholdingTaxToJSON, + WithholdingTaxToJSONTyped, +} from './withholdingtax'; +import type { PurchaseOrderReference } from './purchaseorderreference'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { SupplierRef, SupplierRef$inboundSchema } from "./supplierref.js"; - -export type PurchaseOrderReference = { - /** - * Identifier for the purchase order, unique for the company in the accounting software. - */ - id?: string | undefined; - /** - * Friendly reference for the purchase order, commonly generated by the accounting software. - */ - purchaseOrderNumber?: string | null | undefined; -}; - -export type WithholdingTax = { - /** - * Name assigned to withheld tax. - */ - name: string; - /** - * Amount of tax withheld. - */ - amount: Decimal$ | number; -}; + PurchaseOrderReferenceFromJSON, + PurchaseOrderReferenceFromJSONTyped, + PurchaseOrderReferenceToJSON, + PurchaseOrderReferenceToJSONTyped, +} from './purchaseorderreference'; +import type { SupplementalData } from './supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { Metadata } from './metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { BillStatus } from './billstatus'; +import { + BillStatusFromJSON, + BillStatusFromJSONTyped, + BillStatusToJSON, + BillStatusToJSONTyped, +} from './billstatus'; +import type { SupplierRef } from './supplierref'; +import { + SupplierRefFromJSON, + SupplierRefFromJSONTyped, + SupplierRefToJSON, + SupplierRefToJSONTyped, +} from './supplierref'; +import type { BillLineItem } from './billlineitem'; +import { + BillLineItemFromJSON, + BillLineItemFromJSONTyped, + BillLineItemToJSON, + BillLineItemToJSONTyped, +} from './billlineitem'; +import type { AccountingPaymentAllocation } from './accountingpaymentallocation'; +import { + AccountingPaymentAllocationFromJSON, + AccountingPaymentAllocationFromJSONTyped, + AccountingPaymentAllocationToJSON, + AccountingPaymentAllocationToJSONTyped, +} from './accountingpaymentallocation'; /** * > **Invoices or bills?** - * - * @remarks * > * > 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/lending-api#/schemas/Invoice) for the accounts receivable equivalent of bills. - * + * * ## 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 software 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/lending-api#/schemas/DirectCost) data model. + * @export + * @interface AccountingBill + */ +export interface AccountingBill { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + id?: string; + /** + * User-friendly reference for the bill. + * @type {string} + * @memberof AccountingBill + */ + reference?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBill + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + purchaseOrderRefs?: Array | null; + /** + * Date of the bill as recorded in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + issueDate: string; + /** + * Date the supplier is due to be paid. + * @type {string} + * @memberof AccountingBill + */ + dueDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBill + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBill + */ + currencyRate?: Decimal | number | null; + /** + * Array of Bill line items. + * @type {Array} + * @memberof AccountingBill + */ + lineItems?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + withholdingTax?: Array | null; + /** + * + * @type {BillStatus} + * @memberof AccountingBill + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + * @type {string} + * @memberof AccountingBill + */ + subTotal: Decimal | number; + /** + * Amount of tax on the bill. + * @type {string} + * @memberof AccountingBill + */ + taxAmount: Decimal | number; + /** + * Amount of the bill, including tax. + * @type {string} + * @memberof AccountingBill + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the bill. + * @type {string} + * @memberof AccountingBill + */ + amountDue?: Decimal | number | null; + /** + * Any private, company notes about the bill, such as payment information. + * @type {string} + * @memberof AccountingBill + */ + note?: string | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBill + */ + paymentAllocations?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingBill + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBill + */ + supplementalData?: SupplementalData; +} + + + +/** + * Check if a given object implements the AccountingBill interface. */ -export type AccountingBill = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the bill, unique for the company in the accounting software. - */ - id?: string | undefined; - /** - * User-friendly reference for the bill. - */ - reference?: string | null | undefined; - /** - * Reference to the supplier the record relates to. - */ - supplierRef?: SupplierRef | undefined; - purchaseOrderRefs?: Array | null | undefined; - issueDate: string; - dueDate?: string | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * Array of Bill line items. - */ - lineItems?: Array | null | undefined; - withholdingTax?: Array | null | undefined; - /** - * Current state of the bill. - */ - status: BillStatus; - /** - * Total amount of the bill, excluding any taxes. - */ - subTotal: Decimal$ | number; - /** - * Amount of tax on the bill. - */ - taxAmount: Decimal$ | number; - /** - * Amount of the bill, including tax. - */ - totalAmount: Decimal$ | number; - /** - * Amount outstanding on the bill. - */ - amountDue?: Decimal$ | number | null | undefined; - /** - * Any private, company notes about the bill, such as payment information. - */ - note?: string | null | undefined; - /** - * An array of payment allocations. - */ - paymentAllocations?: Array | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export function instanceOfAccountingBill(value: object): value is AccountingBill { + if (!('issueDate' in value) || value['issueDate'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('subTotal' in value) || value['subTotal'] === undefined) return false; + if (!('taxAmount' in value) || value['taxAmount'] === undefined) return false; + if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false; + return true; +} + +export function AccountingBillFromJSON(json: any): AccountingBill { + return AccountingBillFromJSONTyped(json, false); +} -/** @internal */ -export const PurchaseOrderReference$inboundSchema: z.ZodType< - PurchaseOrderReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - purchaseOrderNumber: z.nullable(z.string()).optional(), -}); +export function AccountingBillFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBill { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'reference': json['reference'] == null ? undefined : json['reference'], + 'supplierRef': json['supplierRef'] == null ? undefined : SupplierRefFromJSON(json['supplierRef']), + 'purchaseOrderRefs': json['purchaseOrderRefs'] == null ? undefined : ((json['purchaseOrderRefs'] as Array).map(PurchaseOrderReferenceFromJSON)), + 'issueDate': json['issueDate'], + 'dueDate': json['dueDate'] == null ? undefined : json['dueDate'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lineItems': json['lineItems'] == null ? undefined : ((json['lineItems'] as Array).map(BillLineItemFromJSON)), + 'withholdingTax': json['withholdingTax'] == null ? undefined : ((json['withholdingTax'] as Array).map(WithholdingTaxFromJSON)), + 'status': BillStatusFromJSON(json['status']), + 'subTotal': json['subTotal'], + 'taxAmount': json['taxAmount'], + 'totalAmount': json['totalAmount'], + 'amountDue': json['amountDue'] == null ? undefined : toDecimal(json['amountDue']), + 'note': json['note'] == null ? undefined : json['note'], + 'paymentAllocations': json['paymentAllocations'] == null ? undefined : ((json['paymentAllocations'] as Array).map(AccountingPaymentAllocationFromJSON)), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} -export function purchaseOrderReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PurchaseOrderReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PurchaseOrderReference' from JSON`, - ); +export function AccountingBillToJSON(json: any): AccountingBill { + return AccountingBillToJSONTyped(json, false); } -/** @internal */ -export const WithholdingTax$inboundSchema: z.ZodType< - WithholdingTax, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - amount: z.number().transform(v => new Decimal$(v)), -}); +export function AccountingBillToJSONTyped(value?: AccountingBill | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function withholdingTaxFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => WithholdingTax$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'WithholdingTax' from JSON`, - ); + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'reference': value['reference'], + 'supplierRef': SupplierRefToJSON(value['supplierRef']), + 'purchaseOrderRefs': value['purchaseOrderRefs'] == null ? undefined : ((value['purchaseOrderRefs'] as Array).map(PurchaseOrderReferenceToJSON)), + 'issueDate': value['issueDate'], + 'dueDate': value['dueDate'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lineItems': value['lineItems'] == null ? undefined : ((value['lineItems'] as Array).map(BillLineItemToJSON)), + 'withholdingTax': value['withholdingTax'] == null ? undefined : ((value['withholdingTax'] as Array).map(WithholdingTaxToJSON)), + 'status': BillStatusToJSON(value['status']), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'amountDue': fromDecimal(value['amountDue']), + 'note': value['note'], + 'paymentAllocations': value['paymentAllocations'] == null ? undefined : ((value['paymentAllocations'] as Array).map(AccountingPaymentAllocationToJSON)), + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; } -/** @internal */ -export const AccountingBill$inboundSchema: z.ZodType< - AccountingBill, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - reference: z.nullable(z.string()).optional(), - supplierRef: SupplierRef$inboundSchema.optional(), - purchaseOrderRefs: z.nullable( - z.array(z.lazy(() => PurchaseOrderReference$inboundSchema)), - ).optional(), - issueDate: z.string(), - dueDate: z.string().optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - lineItems: z.nullable(z.array(BillLineItem$inboundSchema)).optional(), - withholdingTax: z.nullable( - z.array(z.lazy(() => WithholdingTax$inboundSchema)), - ).optional(), - status: BillStatus$inboundSchema, - subTotal: z.number().transform(v => new Decimal$(v)), - taxAmount: z.number().transform(v => new Decimal$(v)), - totalAmount: z.number().transform(v => new Decimal$(v)), - amountDue: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - note: z.nullable(z.string()).optional(), - paymentAllocations: z.nullable( - z.array(AccountingPaymentAllocation$inboundSchema), - ).optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); -export function accountingBillFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBill$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBill' from JSON`, - ); +export interface AccountingBillGetResponseAccountingBill { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + id?: string; + /** + * User-friendly reference for the bill. + * @type {string} + * @memberof AccountingBill + */ + reference?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBill + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + purchaseOrderRefs?: Array | null; + /** + * Date of the bill as recorded in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + issueDate: string; + /** + * Date the supplier is due to be paid. + * @type {string} + * @memberof AccountingBill + */ + dueDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBill + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBill + */ + currencyRate?: Decimal | number | null; + /** + * Array of Bill line items. + * @type {Array} + * @memberof AccountingBill + */ + lineItems?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + withholdingTax?: Array | null; + /** + * + * @type {BillStatus} + * @memberof AccountingBill + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + * @type {string} + * @memberof AccountingBill + */ + subTotal: Decimal | number; + /** + * Amount of tax on the bill. + * @type {string} + * @memberof AccountingBill + */ + taxAmount: Decimal | number; + /** + * Amount of the bill, including tax. + * @type {string} + * @memberof AccountingBill + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the bill. + * @type {string} + * @memberof AccountingBill + */ + amountDue?: Decimal | number | null; + /** + * Any private, company notes about the bill, such as payment information. + * @type {string} + * @memberof AccountingBill + */ + note?: string | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBill + */ + paymentAllocations?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingBill + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBill + */ + supplementalData?: SupplementalData; +} + +export interface AccountingBillsAccountingBill { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + id?: string; + /** + * User-friendly reference for the bill. + * @type {string} + * @memberof AccountingBill + */ + reference?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBill + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + purchaseOrderRefs?: Array | null; + /** + * Date of the bill as recorded in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + issueDate: string; + /** + * Date the supplier is due to be paid. + * @type {string} + * @memberof AccountingBill + */ + dueDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBill + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBill + */ + currencyRate?: Decimal | number | null; + /** + * Array of Bill line items. + * @type {Array} + * @memberof AccountingBill + */ + lineItems?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + withholdingTax?: Array | null; + /** + * + * @type {BillStatus} + * @memberof AccountingBill + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + * @type {string} + * @memberof AccountingBill + */ + subTotal: Decimal | number; + /** + * Amount of tax on the bill. + * @type {string} + * @memberof AccountingBill + */ + taxAmount: Decimal | number; + /** + * Amount of the bill, including tax. + * @type {string} + * @memberof AccountingBill + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the bill. + * @type {string} + * @memberof AccountingBill + */ + amountDue?: Decimal | number | null; + /** + * Any private, company notes about the bill, such as payment information. + * @type {string} + * @memberof AccountingBill + */ + note?: string | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBill + */ + paymentAllocations?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingBill + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBill + */ + supplementalData?: SupplementalData; +} + +export interface AccountingBillsListResponseAccountingBill { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + id?: string; + /** + * User-friendly reference for the bill. + * @type {string} + * @memberof AccountingBill + */ + reference?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBill + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + purchaseOrderRefs?: Array | null; + /** + * Date of the bill as recorded in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + issueDate: string; + /** + * Date the supplier is due to be paid. + * @type {string} + * @memberof AccountingBill + */ + dueDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBill + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBill + */ + currencyRate?: Decimal | number | null; + /** + * Array of Bill line items. + * @type {Array} + * @memberof AccountingBill + */ + lineItems?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + withholdingTax?: Array | null; + /** + * + * @type {BillStatus} + * @memberof AccountingBill + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + * @type {string} + * @memberof AccountingBill + */ + subTotal: Decimal | number; + /** + * Amount of tax on the bill. + * @type {string} + * @memberof AccountingBill + */ + taxAmount: Decimal | number; + /** + * Amount of the bill, including tax. + * @type {string} + * @memberof AccountingBill + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the bill. + * @type {string} + * @memberof AccountingBill + */ + amountDue?: Decimal | number | null; + /** + * Any private, company notes about the bill, such as payment information. + * @type {string} + * @memberof AccountingBill + */ + note?: string | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBill + */ + paymentAllocations?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingBill + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBill + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingBillResponseAccountingBill { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + id?: string; + /** + * User-friendly reference for the bill. + * @type {string} + * @memberof AccountingBill + */ + reference?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBill + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + purchaseOrderRefs?: Array | null; + /** + * Date of the bill as recorded in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + issueDate: string; + /** + * Date the supplier is due to be paid. + * @type {string} + * @memberof AccountingBill + */ + dueDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBill + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBill + */ + currencyRate?: Decimal | number | null; + /** + * Array of Bill line items. + * @type {Array} + * @memberof AccountingBill + */ + lineItems?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + withholdingTax?: Array | null; + /** + * + * @type {BillStatus} + * @memberof AccountingBill + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + * @type {string} + * @memberof AccountingBill + */ + subTotal: Decimal | number; + /** + * Amount of tax on the bill. + * @type {string} + * @memberof AccountingBill + */ + taxAmount: Decimal | number; + /** + * Amount of the bill, including tax. + * @type {string} + * @memberof AccountingBill + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the bill. + * @type {string} + * @memberof AccountingBill + */ + amountDue?: Decimal | number | null; + /** + * Any private, company notes about the bill, such as payment information. + * @type {string} + * @memberof AccountingBill + */ + note?: string | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBill + */ + paymentAllocations?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingBill + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBill + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingBillsResponseAccountingBill { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBill + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + id?: string; + /** + * User-friendly reference for the bill. + * @type {string} + * @memberof AccountingBill + */ + reference?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBill + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + purchaseOrderRefs?: Array | null; + /** + * Date of the bill as recorded in the accounting software. + * @type {string} + * @memberof AccountingBill + */ + issueDate: string; + /** + * Date the supplier is due to be paid. + * @type {string} + * @memberof AccountingBill + */ + dueDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBill + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBill + */ + currencyRate?: Decimal | number | null; + /** + * Array of Bill line items. + * @type {Array} + * @memberof AccountingBill + */ + lineItems?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingBill + */ + withholdingTax?: Array | null; + /** + * + * @type {BillStatus} + * @memberof AccountingBill + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + * @type {string} + * @memberof AccountingBill + */ + subTotal: Decimal | number; + /** + * Amount of tax on the bill. + * @type {string} + * @memberof AccountingBill + */ + taxAmount: Decimal | number; + /** + * Amount of the bill, including tax. + * @type {string} + * @memberof AccountingBill + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the bill. + * @type {string} + * @memberof AccountingBill + */ + amountDue?: Decimal | number | null; + /** + * Any private, company notes about the bill, such as payment information. + * @type {string} + * @memberof AccountingBill + */ + note?: string | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBill + */ + paymentAllocations?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingBill + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBill + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingbillcreditnote.ts b/lending/src/sdk/models/shared/accountingbillcreditnote.ts index 4aa919291..8e8f64c3e 100644 --- a/lending/src/sdk/models/shared/accountingbillcreditnote.ts +++ b/lending/src/sdk/models/shared/accountingbillcreditnote.ts @@ -1,259 +1,1547 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { BillCreditNoteLineItem } from './billcreditnotelineitem'; +import { + BillCreditNoteLineItemFromJSON, + BillCreditNoteLineItemFromJSONTyped, + BillCreditNoteLineItemToJSON, + BillCreditNoteLineItemToJSONTyped, +} from './billcreditnotelineitem'; +import type { AccountingRecordRef } from './accountingrecordref'; +import { + AccountingRecordRefFromJSON, + AccountingRecordRefFromJSONTyped, + AccountingRecordRefToJSON, + AccountingRecordRefToJSONTyped, +} from './accountingrecordref'; +import type { SupplementalData } from './supplementaldata'; import { - AccountingPaymentAllocation, - AccountingPaymentAllocation$inboundSchema, -} from "./accountingpaymentallocation.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { BillCreditNoteStatus } from './billcreditnotestatus'; import { - AccountingRecordRef, - AccountingRecordRef$inboundSchema, -} from "./accountingrecordref.js"; + BillCreditNoteStatusFromJSON, + BillCreditNoteStatusFromJSONTyped, + BillCreditNoteStatusToJSON, + BillCreditNoteStatusToJSONTyped, +} from './billcreditnotestatus'; +import type { Metadata } from './metadata'; import { - BillCreditNoteLineItem, - BillCreditNoteLineItem$inboundSchema, -} from "./billcreditnotelineitem.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { Items } from './items'; import { - BillCreditNoteStatus, - BillCreditNoteStatus$inboundSchema, -} from "./billcreditnotestatus.js"; -import { Items, Items$inboundSchema } from "./items.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + ItemsFromJSON, + ItemsFromJSONTyped, + ItemsToJSON, + ItemsToJSONTyped, +} from './items'; +import type { SupplierRef } from './supplierref'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { SupplierRef, SupplierRef$inboundSchema } from "./supplierref.js"; + SupplierRefFromJSON, + SupplierRefFromJSONTyped, + SupplierRefToJSON, + SupplierRefToJSONTyped, +} from './supplierref'; +import type { AccountingPaymentAllocation } from './accountingpaymentallocation'; +import { + AccountingPaymentAllocationFromJSON, + AccountingPaymentAllocationFromJSONTyped, + AccountingPaymentAllocationToJSON, + AccountingPaymentAllocationToJSONTyped, +} from './accountingpaymentallocation'; /** * > **Bill credit notes or credit notes?** - * - * @remarks - * > + * > * > In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote). - * + * * ## 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/lending-api#/schemas/Supplier). - * + * + * In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/lending-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/lending-api#/schemas/Bill). * * The supplier that issued the bill credit note. + * @export + * @interface AccountingBillCreditNote */ -export type AccountingBillCreditNote = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the bill credit note that is unique to a company in the accounting software. - */ - id?: string | undefined; - /** - * Friendly reference for the bill credit note. - */ - billCreditNoteNumber?: string | null | undefined; - /** - * Reference to the supplier the record relates to. - */ - supplierRef?: SupplierRef | undefined; - withholdingTax?: Array | null | undefined; - /** - * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. - */ - totalAmount: Decimal$ | number; - /** - * Total value of any discounts applied. - */ - totalDiscount: Decimal$ | number; - /** - * Total amount of the bill credit note, including discounts but excluding tax. - */ - subTotal: Decimal$ | number; - /** - * Amount of tax included in the bill credit note. - */ - totalTaxAmount: Decimal$ | number; - /** - * Percentage rate of any discount applied to the bill credit note. - */ - discountPercentage: Decimal$ | number; - /** - * Amount of the bill credit note that is still outstanding. - */ - remainingCredit?: Decimal$ | number | undefined; - /** - * Current state of the bill credit note - */ - status: BillCreditNoteStatus; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - issueDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - allocatedOnDate?: string | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * An array of line - */ - lineItems?: Array | null | undefined; - /** - * An array of payment allocations. - */ - paymentAllocations?: Array | null | undefined; - /** - * An array of records the credit note was created from. - */ - createdFromRefs?: Array | null | undefined; - /** - * Any additional information about the bill credit note. - */ - note?: string | null | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; - metadata?: Metadata | undefined; -}; +export interface AccountingBillCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + * @type {string} + * @memberof AccountingBillCreditNote + */ + id?: string; + /** + * Friendly reference for the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + billCreditNoteNumber?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBillCreditNote + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalAmount: Decimal | number; + /** + * Total value of any discounts applied. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalDiscount: Decimal | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + subTotal: Decimal | number; + /** + * Amount of tax included in the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate of any discount applied to the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + discountPercentage: Decimal | number; + /** + * Amount of the bill credit note that is still outstanding. + * @type {string} + * @memberof AccountingBillCreditNote + */ + remainingCredit?: Decimal | number; + /** + * + * @type {BillCreditNoteStatus} + * @memberof AccountingBillCreditNote + */ + status: BillCreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * An array of line + * @type {Array} + * @memberof AccountingBillCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + paymentAllocations?: Array | null; + /** + * An array of records the credit note was created from. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + createdFromRefs?: Array | null; + /** + * Any additional information about the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + note?: string | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillCreditNote + */ + supplementalData?: SupplementalData; + /** + * + * @type {Metadata} + * @memberof AccountingBillCreditNote + */ + metadata?: Metadata; +} + + + +/** + * Check if a given object implements the AccountingBillCreditNote interface. + */ +export function instanceOfAccountingBillCreditNote(value: object): value is AccountingBillCreditNote { + if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false; + if (!('totalDiscount' in value) || value['totalDiscount'] === undefined) return false; + if (!('subTotal' in value) || value['subTotal'] === undefined) return false; + if (!('totalTaxAmount' in value) || value['totalTaxAmount'] === undefined) return false; + if (!('discountPercentage' in value) || value['discountPercentage'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} -/** @internal */ -export const AccountingBillCreditNote$inboundSchema: z.ZodType< - AccountingBillCreditNote, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - billCreditNoteNumber: z.nullable(z.string()).optional(), - supplierRef: SupplierRef$inboundSchema.optional(), - withholdingTax: z.nullable(z.array(Items$inboundSchema)).optional(), - totalAmount: z.number().transform(v => new Decimal$(v)), - totalDiscount: z.number().transform(v => new Decimal$(v)), - subTotal: z.number().transform(v => new Decimal$(v)), - totalTaxAmount: z.number().transform(v => new Decimal$(v)), - discountPercentage: z.number().transform(v => new Decimal$(v)), - remainingCredit: z.number().transform(v => new Decimal$(v)).optional(), - status: BillCreditNoteStatus$inboundSchema, - issueDate: z.string().optional(), - allocatedOnDate: z.string().optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - lineItems: z.nullable(z.array(BillCreditNoteLineItem$inboundSchema)) - .optional(), - paymentAllocations: z.nullable( - z.array(AccountingPaymentAllocation$inboundSchema), - ).optional(), - createdFromRefs: z.nullable(z.array(AccountingRecordRef$inboundSchema)) - .optional(), - note: z.nullable(z.string()).optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), -}); +export function AccountingBillCreditNoteFromJSON(json: any): AccountingBillCreditNote { + return AccountingBillCreditNoteFromJSONTyped(json, false); +} + +export function AccountingBillCreditNoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBillCreditNote { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'billCreditNoteNumber': json['billCreditNoteNumber'] == null ? undefined : json['billCreditNoteNumber'], + 'supplierRef': json['supplierRef'] == null ? undefined : SupplierRefFromJSON(json['supplierRef']), + 'withholdingTax': json['withholdingTax'] == null ? undefined : ((json['withholdingTax'] as Array).map(ItemsFromJSON)), + 'totalAmount': json['totalAmount'], + 'totalDiscount': json['totalDiscount'], + 'subTotal': json['subTotal'], + 'totalTaxAmount': json['totalTaxAmount'], + 'discountPercentage': json['discountPercentage'], + 'remainingCredit': json['remainingCredit'] == null ? undefined : toDecimal(json['remainingCredit']), + 'status': BillCreditNoteStatusFromJSON(json['status']), + 'issueDate': json['issueDate'] == null ? undefined : json['issueDate'], + 'allocatedOnDate': json['allocatedOnDate'] == null ? undefined : json['allocatedOnDate'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lineItems': json['lineItems'] == null ? undefined : ((json['lineItems'] as Array).map(BillCreditNoteLineItemFromJSON)), + 'paymentAllocations': json['paymentAllocations'] == null ? undefined : ((json['paymentAllocations'] as Array).map(AccountingPaymentAllocationFromJSON)), + 'createdFromRefs': json['createdFromRefs'] == null ? undefined : ((json['createdFromRefs'] as Array).map(AccountingRecordRefFromJSON)), + 'note': json['note'] == null ? undefined : json['note'], + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + }; +} + +export function AccountingBillCreditNoteToJSON(json: any): AccountingBillCreditNote { + return AccountingBillCreditNoteToJSONTyped(json, false); +} + +export function AccountingBillCreditNoteToJSONTyped(value?: AccountingBillCreditNote | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'billCreditNoteNumber': value['billCreditNoteNumber'], + 'supplierRef': SupplierRefToJSON(value['supplierRef']), + 'withholdingTax': value['withholdingTax'] == null ? undefined : ((value['withholdingTax'] as Array).map(ItemsToJSON)), + 'totalAmount': fromDecimal(value['totalAmount']), + 'totalDiscount': fromDecimal(value['totalDiscount']), + 'subTotal': fromDecimal(value['subTotal']), + 'totalTaxAmount': fromDecimal(value['totalTaxAmount']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'remainingCredit': fromDecimal(value['remainingCredit']), + 'status': BillCreditNoteStatusToJSON(value['status']), + 'issueDate': value['issueDate'], + 'allocatedOnDate': value['allocatedOnDate'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lineItems': value['lineItems'] == null ? undefined : ((value['lineItems'] as Array).map(BillCreditNoteLineItemToJSON)), + 'paymentAllocations': value['paymentAllocations'] == null ? undefined : ((value['paymentAllocations'] as Array).map(AccountingPaymentAllocationToJSON)), + 'createdFromRefs': value['createdFromRefs'] == null ? undefined : ((value['createdFromRefs'] as Array).map(AccountingRecordRefToJSON)), + 'note': value['note'], + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'metadata': MetadataToJSON(value['metadata']), + }; +} + + +export interface AccountingBillCreditNoteGetResponseAccountingBillCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + * @type {string} + * @memberof AccountingBillCreditNote + */ + id?: string; + /** + * Friendly reference for the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + billCreditNoteNumber?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBillCreditNote + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalAmount: Decimal | number; + /** + * Total value of any discounts applied. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalDiscount: Decimal | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + subTotal: Decimal | number; + /** + * Amount of tax included in the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate of any discount applied to the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + discountPercentage: Decimal | number; + /** + * Amount of the bill credit note that is still outstanding. + * @type {string} + * @memberof AccountingBillCreditNote + */ + remainingCredit?: Decimal | number; + /** + * + * @type {BillCreditNoteStatus} + * @memberof AccountingBillCreditNote + */ + status: BillCreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * An array of line + * @type {Array} + * @memberof AccountingBillCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + paymentAllocations?: Array | null; + /** + * An array of records the credit note was created from. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + createdFromRefs?: Array | null; + /** + * Any additional information about the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + note?: string | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillCreditNote + */ + supplementalData?: SupplementalData; + /** + * + * @type {Metadata} + * @memberof AccountingBillCreditNote + */ + metadata?: Metadata; +} + +export interface AccountingBillCreditNotesAccountingBillCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + * @type {string} + * @memberof AccountingBillCreditNote + */ + id?: string; + /** + * Friendly reference for the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + billCreditNoteNumber?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBillCreditNote + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalAmount: Decimal | number; + /** + * Total value of any discounts applied. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalDiscount: Decimal | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + subTotal: Decimal | number; + /** + * Amount of tax included in the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate of any discount applied to the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + discountPercentage: Decimal | number; + /** + * Amount of the bill credit note that is still outstanding. + * @type {string} + * @memberof AccountingBillCreditNote + */ + remainingCredit?: Decimal | number; + /** + * + * @type {BillCreditNoteStatus} + * @memberof AccountingBillCreditNote + */ + status: BillCreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * An array of line + * @type {Array} + * @memberof AccountingBillCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + paymentAllocations?: Array | null; + /** + * An array of records the credit note was created from. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + createdFromRefs?: Array | null; + /** + * Any additional information about the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + note?: string | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillCreditNote + */ + supplementalData?: SupplementalData; + /** + * + * @type {Metadata} + * @memberof AccountingBillCreditNote + */ + metadata?: Metadata; +} + +export interface AccountingBillCreditNotesListResponseAccountingBillCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + * @type {string} + * @memberof AccountingBillCreditNote + */ + id?: string; + /** + * Friendly reference for the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + billCreditNoteNumber?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBillCreditNote + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalAmount: Decimal | number; + /** + * Total value of any discounts applied. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalDiscount: Decimal | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + subTotal: Decimal | number; + /** + * Amount of tax included in the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate of any discount applied to the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + discountPercentage: Decimal | number; + /** + * Amount of the bill credit note that is still outstanding. + * @type {string} + * @memberof AccountingBillCreditNote + */ + remainingCredit?: Decimal | number; + /** + * + * @type {BillCreditNoteStatus} + * @memberof AccountingBillCreditNote + */ + status: BillCreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * An array of line + * @type {Array} + * @memberof AccountingBillCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + paymentAllocations?: Array | null; + /** + * An array of records the credit note was created from. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + createdFromRefs?: Array | null; + /** + * Any additional information about the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + note?: string | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillCreditNote + */ + supplementalData?: SupplementalData; + /** + * + * @type {Metadata} + * @memberof AccountingBillCreditNote + */ + metadata?: Metadata; +} + +export interface GetAccountingBillCreditNoteResponseAccountingBillCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + * @type {string} + * @memberof AccountingBillCreditNote + */ + id?: string; + /** + * Friendly reference for the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + billCreditNoteNumber?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBillCreditNote + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalAmount: Decimal | number; + /** + * Total value of any discounts applied. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalDiscount: Decimal | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + subTotal: Decimal | number; + /** + * Amount of tax included in the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate of any discount applied to the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + discountPercentage: Decimal | number; + /** + * Amount of the bill credit note that is still outstanding. + * @type {string} + * @memberof AccountingBillCreditNote + */ + remainingCredit?: Decimal | number; + /** + * + * @type {BillCreditNoteStatus} + * @memberof AccountingBillCreditNote + */ + status: BillCreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * An array of line + * @type {Array} + * @memberof AccountingBillCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + paymentAllocations?: Array | null; + /** + * An array of records the credit note was created from. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + createdFromRefs?: Array | null; + /** + * Any additional information about the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + note?: string | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillCreditNote + */ + supplementalData?: SupplementalData; + /** + * + * @type {Metadata} + * @memberof AccountingBillCreditNote + */ + metadata?: Metadata; +} -export function accountingBillCreditNoteFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBillCreditNote$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBillCreditNote' from JSON`, - ); +export interface ListAccountingBillCreditNotesResponseAccountingBillCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + * @type {string} + * @memberof AccountingBillCreditNote + */ + id?: string; + /** + * Friendly reference for the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + billCreditNoteNumber?: string | null; + /** + * + * @type {SupplierRef} + * @memberof AccountingBillCreditNote + */ + supplierRef?: SupplierRef; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalAmount: Decimal | number; + /** + * Total value of any discounts applied. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalDiscount: Decimal | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + * @type {string} + * @memberof AccountingBillCreditNote + */ + subTotal: Decimal | number; + /** + * Amount of tax included in the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate of any discount applied to the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + discountPercentage: Decimal | number; + /** + * Amount of the bill credit note that is still outstanding. + * @type {string} + * @memberof AccountingBillCreditNote + */ + remainingCredit?: Decimal | number; + /** + * + * @type {BillCreditNoteStatus} + * @memberof AccountingBillCreditNote + */ + status: BillCreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingBillCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * An array of line + * @type {Array} + * @memberof AccountingBillCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + paymentAllocations?: Array | null; + /** + * An array of records the credit note was created from. + * @type {Array} + * @memberof AccountingBillCreditNote + */ + createdFromRefs?: Array | null; + /** + * Any additional information about the bill credit note. + * @type {string} + * @memberof AccountingBillCreditNote + */ + note?: string | null; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillCreditNote + */ + supplementalData?: SupplementalData; + /** + * + * @type {Metadata} + * @memberof AccountingBillCreditNote + */ + metadata?: Metadata; } diff --git a/lending/src/sdk/models/shared/accountingbillcreditnotes.ts b/lending/src/sdk/models/shared/accountingbillcreditnotes.ts index 582ad7ed2..5b4e18d89 100644 --- a/lending/src/sdk/models/shared/accountingbillcreditnotes.ts +++ b/lending/src/sdk/models/shared/accountingbillcreditnotes.ts @@ -1,59 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingBillCreditNote, - AccountingBillCreditNote$inboundSchema, -} from "./accountingbillcreditnote.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingBillCreditNotes = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingBillCreditNotes$inboundSchema: z.ZodType< - AccountingBillCreditNotes, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingBillCreditNote$inboundSchema)) - .optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingBillCreditNotesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBillCreditNotes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBillCreditNotes' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingBillCreditNote } from './accountingbillcreditnote'; +import { + AccountingBillCreditNoteFromJSON, + AccountingBillCreditNoteFromJSONTyped, + AccountingBillCreditNoteToJSON, + AccountingBillCreditNoteToJSONTyped, +} from './accountingbillcreditnote'; + +/** + * + * @export + * @interface AccountingBillCreditNotes + */ +export interface AccountingBillCreditNotes { + /** + * Current page number. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBillCreditNotes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNotes + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingBillCreditNotes interface. + */ +export function instanceOfAccountingBillCreditNotes(value: object): value is AccountingBillCreditNotes { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingBillCreditNotesFromJSON(json: any): AccountingBillCreditNotes { + return AccountingBillCreditNotesFromJSONTyped(json, false); +} + +export function AccountingBillCreditNotesFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBillCreditNotes { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingBillCreditNoteFromJSON)), + }; +} + +export function AccountingBillCreditNotesToJSON(json: any): AccountingBillCreditNotes { + return AccountingBillCreditNotesToJSONTyped(json, false); +} + +export function AccountingBillCreditNotesToJSONTyped(value?: AccountingBillCreditNotes | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingBillCreditNoteToJSON)), + }; +} + + +export interface AccountingBillCreditNotesListResponseAccountingBillCreditNotes { + /** + * Current page number. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBillCreditNotes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNotes + */ + results?: Array; +} + +export interface ListAccountingBillCreditNotesResponseAccountingBillCreditNotes { + /** + * Current page number. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBillCreditNotes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBillCreditNotes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBillCreditNotes + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingbillpayment.ts b/lending/src/sdk/models/shared/accountingbillpayment.ts index 0118707da..f246493e4 100644 --- a/lending/src/sdk/models/shared/accountingbillpayment.ts +++ b/lending/src/sdk/models/shared/accountingbillpayment.ts @@ -1,68 +1,102 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; +import type { PaymentMethodRef } from './paymentmethodref'; +import type { SupplierRef } from './supplierref'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountingBillPaymentAllOfSupplierRef } from '../AccountingBillPaymentAllOfSupplierRef'; +import { + AccountingBillPaymentAllOfSupplierRefFromJSON, + AccountingBillPaymentAllOfSupplierRefFromJSONTyped, + AccountingBillPaymentAllOfSupplierRefToJSON, + AccountingBillPaymentAllOfSupplierRefToJSONTyped, +} from '../AccountingBillPaymentAllOfSupplierRef'; +import type { BillPaymentLine } from './billpaymentline'; +import { + BillPaymentLineFromJSON, + BillPaymentLineFromJSONTyped, + BillPaymentLineToJSON, + BillPaymentLineToJSONTyped, +} from './billpaymentline'; +import type { SupplementalData } from './supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { AccountingBillPaymentAllOfPaymentMethodRef } from '../AccountingBillPaymentAllOfPaymentMethodRef'; import { - BillPaymentLine, - BillPaymentLine$inboundSchema, -} from "./billpaymentline.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + AccountingBillPaymentAllOfPaymentMethodRefFromJSON, + AccountingBillPaymentAllOfPaymentMethodRefFromJSONTyped, + AccountingBillPaymentAllOfPaymentMethodRefToJSON, + AccountingBillPaymentAllOfPaymentMethodRefToJSONTyped, +} from '../AccountingBillPaymentAllOfPaymentMethodRef'; +import type { Metadata } from './metadata'; import { - PaymentMethodRef, - PaymentMethodRef$inboundSchema, -} from "./paymentmethodref.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { AccountRef } from './accountref'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { SupplierRef, SupplierRef$inboundSchema } from "./supplierref.js"; + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; /** - * > **Bill payments or payments?** - * - * @remarks - * > + * > **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/lending-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-api#/schemas/CreditNote). - * + * * ## Overview - * + * * Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/lending-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/lending-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 software, 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_. - * + * - The types of bill payments, the _line items_. + * * Some accounting software 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/lending-api#/schemas/DirectCost) data model. - * + * * Bill payments is a child data type of [account transactions](https://docs.codat.io/lending-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. @@ -70,38 +104,38 @@ import { SupplierRef, SupplierRef$inboundSchema } from "./supplierref.js"; * - 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: @@ -110,179 +144,964 @@ import { SupplierRef, SupplierRef$inboundSchema } from "./supplierref.js"; * - 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: - * + * + * 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: - * + * + * 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 software 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: - * + * + * 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: - * + * + * 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 base currency for the accounts payable account. * - The currency of the item. + * + * @export + * @interface AccountingBillPayment */ -export type AccountingBillPayment = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the bill payment, unique for the company in the accounting software. - */ - id?: string | undefined; - supplierRef?: SupplierRef | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * 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. - */ - totalAmount?: Decimal$ | number | undefined; - currency?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - date: string; - /** - * Additional information associated with the payment. - */ - note?: string | null | undefined; - paymentMethodRef?: PaymentMethodRef | undefined; - /** - * An array of bill payment lines. - */ - lines?: Array | null | undefined; - /** - * Additional information associated with the payment. - */ - reference?: string | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export interface AccountingBillPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill payment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + id?: string; + /** + * + * @type {AccountingBillPaymentAllOfSupplierRef} + * @memberof AccountingBillPayment + */ + supplierRef?: SupplierRef; + /** + * Account the payment is linked to in the accounting software. + * @type {AccountRef} + * @memberof AccountingBillPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof AccountingBillPayment + */ + totalAmount?: Decimal | number; + /** + * ISO currency code in which the bill payment is recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillPayment + */ + currencyRate?: Decimal | number | null; + /** + * Date the bill payment was recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + date: string; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + note?: string | null; + /** + * + * @type {AccountingBillPaymentAllOfPaymentMethodRef} + * @memberof AccountingBillPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * An array of bill payment lines. + * @type {Array} + * @memberof AccountingBillPayment + */ + lines?: Array | null; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingBillPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillPayment + */ + supplementalData?: SupplementalData; +} -/** @internal */ -export const AccountingBillPayment$inboundSchema: z.ZodType< - AccountingBillPayment, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - supplierRef: SupplierRef$inboundSchema.optional(), - accountRef: AccountRef$inboundSchema.optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - date: z.string(), - note: z.nullable(z.string()).optional(), - paymentMethodRef: PaymentMethodRef$inboundSchema.optional(), - lines: z.nullable(z.array(BillPaymentLine$inboundSchema)).optional(), - reference: z.nullable(z.string()).optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); +/** + * Check if a given object implements the AccountingBillPayment interface. + */ +export function instanceOfAccountingBillPayment(value: object): value is AccountingBillPayment { + if (!('date' in value) || value['date'] === undefined) return false; + return true; +} + +export function AccountingBillPaymentFromJSON(json: any): AccountingBillPayment { + return AccountingBillPaymentFromJSONTyped(json, false); +} + +export function AccountingBillPaymentFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBillPayment { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'supplierRef': json['supplierRef'] == null ? undefined : AccountingBillPaymentAllOfSupplierRefFromJSON(json['supplierRef']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'date': json['date'], + 'note': json['note'] == null ? undefined : json['note'], + 'paymentMethodRef': json['paymentMethodRef'] == null ? undefined : AccountingBillPaymentAllOfPaymentMethodRefFromJSON(json['paymentMethodRef']), + 'lines': json['lines'] == null ? undefined : ((json['lines'] as Array).map(BillPaymentLineFromJSON)), + 'reference': json['reference'] == null ? undefined : json['reference'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingBillPaymentToJSON(json: any): AccountingBillPayment { + return AccountingBillPaymentToJSONTyped(json, false); +} + +export function AccountingBillPaymentToJSONTyped(value?: AccountingBillPayment | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'supplierRef': AccountingBillPaymentAllOfSupplierRefToJSON(value['supplierRef']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'date': value['date'], + 'note': value['note'], + 'paymentMethodRef': AccountingBillPaymentAllOfPaymentMethodRefToJSON(value['paymentMethodRef']), + 'lines': value['lines'] == null ? undefined : ((value['lines'] as Array).map(BillPaymentLineToJSON)), + 'reference': value['reference'], + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingBillPaymentGetResponseAccountingBillPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill payment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + id?: string; + /** + * + * @type {AccountingBillPaymentAllOfSupplierRef} + * @memberof AccountingBillPayment + */ + supplierRef?: AccountingBillPaymentAllOfSupplierRef; + /** + * Account the payment is linked to in the accounting software. + * @type {AccountRef} + * @memberof AccountingBillPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof AccountingBillPayment + */ + totalAmount?: Decimal | number; + /** + * ISO currency code in which the bill payment is recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillPayment + */ + currencyRate?: Decimal | number | null; + /** + * Date the bill payment was recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + date: string; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + note?: string | null; + /** + * + * @type {AccountingBillPaymentAllOfPaymentMethodRef} + * @memberof AccountingBillPayment + */ + paymentMethodRef?: AccountingBillPaymentAllOfPaymentMethodRef; + /** + * An array of bill payment lines. + * @type {Array} + * @memberof AccountingBillPayment + */ + lines?: Array | null; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingBillPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillPayment + */ + supplementalData?: SupplementalData; +} + +export interface AccountingBillPaymentsAccountingBillPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill payment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + id?: string; + /** + * + * @type {AccountingBillPaymentAllOfSupplierRef} + * @memberof AccountingBillPayment + */ + supplierRef?: AccountingBillPaymentAllOfSupplierRef; + /** + * Account the payment is linked to in the accounting software. + * @type {AccountRef} + * @memberof AccountingBillPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof AccountingBillPayment + */ + totalAmount?: Decimal | number; + /** + * ISO currency code in which the bill payment is recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillPayment + */ + currencyRate?: Decimal | number | null; + /** + * Date the bill payment was recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + date: string; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + note?: string | null; + /** + * + * @type {AccountingBillPaymentAllOfPaymentMethodRef} + * @memberof AccountingBillPayment + */ + paymentMethodRef?: AccountingBillPaymentAllOfPaymentMethodRef; + /** + * An array of bill payment lines. + * @type {Array} + * @memberof AccountingBillPayment + */ + lines?: Array | null; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingBillPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillPayment + */ + supplementalData?: SupplementalData; +} + +export interface AccountingBillPaymentsListResponseAccountingBillPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill payment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + id?: string; + /** + * + * @type {AccountingBillPaymentAllOfSupplierRef} + * @memberof AccountingBillPayment + */ + supplierRef?: AccountingBillPaymentAllOfSupplierRef; + /** + * Account the payment is linked to in the accounting software. + * @type {AccountRef} + * @memberof AccountingBillPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof AccountingBillPayment + */ + totalAmount?: Decimal | number; + /** + * ISO currency code in which the bill payment is recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillPayment + */ + currencyRate?: Decimal | number | null; + /** + * Date the bill payment was recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + date: string; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + note?: string | null; + /** + * + * @type {AccountingBillPaymentAllOfPaymentMethodRef} + * @memberof AccountingBillPayment + */ + paymentMethodRef?: AccountingBillPaymentAllOfPaymentMethodRef; + /** + * An array of bill payment lines. + * @type {Array} + * @memberof AccountingBillPayment + */ + lines?: Array | null; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingBillPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillPayment + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingBillPaymentResponseAccountingBillPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill payment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + id?: string; + /** + * + * @type {AccountingBillPaymentAllOfSupplierRef} + * @memberof AccountingBillPayment + */ + supplierRef?: AccountingBillPaymentAllOfSupplierRef; + /** + * Account the payment is linked to in the accounting software. + * @type {AccountRef} + * @memberof AccountingBillPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof AccountingBillPayment + */ + totalAmount?: Decimal | number; + /** + * ISO currency code in which the bill payment is recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillPayment + */ + currencyRate?: Decimal | number | null; + /** + * Date the bill payment was recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + date: string; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + note?: string | null; + /** + * + * @type {AccountingBillPaymentAllOfPaymentMethodRef} + * @memberof AccountingBillPayment + */ + paymentMethodRef?: AccountingBillPaymentAllOfPaymentMethodRef; + /** + * An array of bill payment lines. + * @type {Array} + * @memberof AccountingBillPayment + */ + lines?: Array | null; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingBillPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillPayment + */ + supplementalData?: SupplementalData; +} -export function accountingBillPaymentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBillPayment$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBillPayment' from JSON`, - ); +export interface ListAccountingBillPaymentsResponseAccountingBillPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingBillPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the bill payment, unique for the company in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + id?: string; + /** + * + * @type {AccountingBillPaymentAllOfSupplierRef} + * @memberof AccountingBillPayment + */ + supplierRef?: AccountingBillPaymentAllOfSupplierRef; + /** + * Account the payment is linked to in the accounting software. + * @type {AccountRef} + * @memberof AccountingBillPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof AccountingBillPayment + */ + totalAmount?: Decimal | number; + /** + * ISO currency code in which the bill payment is recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingBillPayment + */ + currencyRate?: Decimal | number | null; + /** + * Date the bill payment was recorded in the accounting software. + * @type {string} + * @memberof AccountingBillPayment + */ + date: string; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + note?: string | null; + /** + * + * @type {AccountingBillPaymentAllOfPaymentMethodRef} + * @memberof AccountingBillPayment + */ + paymentMethodRef?: AccountingBillPaymentAllOfPaymentMethodRef; + /** + * An array of bill payment lines. + * @type {Array} + * @memberof AccountingBillPayment + */ + lines?: Array | null; + /** + * Additional information associated with the payment. + * @type {string} + * @memberof AccountingBillPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingBillPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingBillPayment + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingbillpayments.ts b/lending/src/sdk/models/shared/accountingbillpayments.ts index 2df3e4d3c..449112dc6 100644 --- a/lending/src/sdk/models/shared/accountingbillpayments.ts +++ b/lending/src/sdk/models/shared/accountingbillpayments.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingBillPayment } from './accountingbillpayment'; import { - AccountingBillPayment, - AccountingBillPayment$inboundSchema, -} from "./accountingbillpayment.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingBillPayments = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingBillPayments$inboundSchema: z.ZodType< - AccountingBillPayments, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingBillPayment$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingBillPaymentsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBillPayments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBillPayments' from JSON`, - ); + AccountingBillPaymentFromJSON, + AccountingBillPaymentFromJSONTyped, + AccountingBillPaymentToJSON, + AccountingBillPaymentToJSONTyped, +} from './accountingbillpayment'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface AccountingBillPayments + */ +export interface AccountingBillPayments { + /** + * Current page number. + * @type {number} + * @memberof AccountingBillPayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBillPayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBillPayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBillPayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBillPayments + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingBillPayments interface. + */ +export function instanceOfAccountingBillPayments(value: object): value is AccountingBillPayments { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingBillPaymentsFromJSON(json: any): AccountingBillPayments { + return AccountingBillPaymentsFromJSONTyped(json, false); +} + +export function AccountingBillPaymentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBillPayments { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingBillPaymentFromJSON)), + }; +} + +export function AccountingBillPaymentsToJSON(json: any): AccountingBillPayments { + return AccountingBillPaymentsToJSONTyped(json, false); +} + +export function AccountingBillPaymentsToJSONTyped(value?: AccountingBillPayments | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingBillPaymentToJSON)), + }; +} + + +export interface AccountingBillPaymentsListResponseAccountingBillPayments { + /** + * Current page number. + * @type {number} + * @memberof AccountingBillPayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBillPayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBillPayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBillPayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBillPayments + */ + results?: Array; +} + +export interface ListAccountingBillPaymentsResponseAccountingBillPayments { + /** + * Current page number. + * @type {number} + * @memberof AccountingBillPayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBillPayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBillPayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBillPayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBillPayments + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingbills.ts b/lending/src/sdk/models/shared/accountingbills.ts index 619f08dd1..afbaa9eff 100644 --- a/lending/src/sdk/models/shared/accountingbills.ts +++ b/lending/src/sdk/models/shared/accountingbills.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingBill, - AccountingBill$inboundSchema, -} from "./accountingbill.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingBills = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingBills$inboundSchema: z.ZodType< - AccountingBills, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingBill$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingBillsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingBills$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingBills' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingBill } from './accountingbill'; +import { + AccountingBillFromJSON, + AccountingBillFromJSONTyped, + AccountingBillToJSON, + AccountingBillToJSONTyped, +} from './accountingbill'; + +/** + * + * @export + * @interface AccountingBills + */ +export interface AccountingBills { + /** + * Current page number. + * @type {number} + * @memberof AccountingBills + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBills + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBills + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBills + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBills + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingBills interface. + */ +export function instanceOfAccountingBills(value: object): value is AccountingBills { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingBillsFromJSON(json: any): AccountingBills { + return AccountingBillsFromJSONTyped(json, false); +} + +export function AccountingBillsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingBills { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingBillFromJSON)), + }; +} + +export function AccountingBillsToJSON(json: any): AccountingBills { + return AccountingBillsToJSONTyped(json, false); +} + +export function AccountingBillsToJSONTyped(value?: AccountingBills | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingBillToJSON)), + }; +} + + +export interface AccountingBillsListResponseAccountingBills { + /** + * Current page number. + * @type {number} + * @memberof AccountingBills + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBills + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBills + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBills + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBills + */ + results?: Array; +} + +export interface ListAccountingBillsResponseAccountingBills { + /** + * Current page number. + * @type {number} + * @memberof AccountingBills + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingBills + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingBills + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingBills + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingBills + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingcashflowstatement.ts b/lending/src/sdk/models/shared/accountingcashflowstatement.ts index 93ebd9db8..789ac70b2 100644 --- a/lending/src/sdk/models/shared/accountingcashflowstatement.ts +++ b/lending/src/sdk/models/shared/accountingcashflowstatement.ts @@ -1,124 +1,346 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { ReportInput } from './reportinput'; +import { + ReportInputFromJSON, + ReportInputFromJSONTyped, + ReportInputToJSON, + ReportInputToJSONTyped, +} from './reportinput'; +import type { ReportBasis } from './reportbasis'; import { - CashFlowStatement, - CashFlowStatement$inboundSchema, -} from "./cashflowstatement.js"; -import { ReportBasis, ReportBasis$inboundSchema } from "./reportbasis.js"; -import { ReportInput, ReportInput$inboundSchema } from "./reportinput.js"; + ReportBasisFromJSON, + ReportBasisFromJSONTyped, + ReportBasisToJSON, + ReportBasisToJSONTyped, +} from './reportbasis'; +import type { CashFlowStatement } from './cashflowstatement'; +import { + CashFlowStatementFromJSON, + CashFlowStatementFromJSONTyped, + CashFlowStatementToJSON, + CashFlowStatementToJSONTyped, +} from './cashflowstatement'; /** - * > **Operating activities only** - * - * @remarks - * > + * > **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. + * @export + * @interface AccountingCashFlowStatement */ -export type AccountingCashFlowStatement = { - /** - * Array of cash flow statements. - */ - reports: Array; - /** - * Accounting method used when aggregating the report data. In this case, `Cash`. - */ - reportBasis: ReportBasis; - /** - * Accounting method used to prepare the cash flow statement. - */ - reportInput: ReportInput; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - mostRecentAvailableMonth?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - earliestAvailableMonth?: string | undefined; -}; +export interface AccountingCashFlowStatement { + /** + * Array of cash flow statements. + * @type {Array} + * @memberof AccountingCashFlowStatement + */ + reports: Array; + /** + * + * @type {ReportBasis} + * @memberof AccountingCashFlowStatement + */ + reportBasis: ReportBasis; + /** + * + * @type {ReportInput} + * @memberof AccountingCashFlowStatement + */ + reportInput: ReportInput; + /** + * 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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + earliestAvailableMonth?: string; +} + -/** @internal */ -export const AccountingCashFlowStatement$inboundSchema: z.ZodType< - AccountingCashFlowStatement, - z.ZodTypeDef, - unknown -> = z.object({ - reports: z.array(CashFlowStatement$inboundSchema), - reportBasis: ReportBasis$inboundSchema, - reportInput: ReportInput$inboundSchema, - currency: z.string().optional(), - mostRecentAvailableMonth: z.string().optional(), - earliestAvailableMonth: z.string().optional(), -}); -export function accountingCashFlowStatementFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCashFlowStatement$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCashFlowStatement' from JSON`, - ); +/** + * Check if a given object implements the AccountingCashFlowStatement interface. + */ +export function instanceOfAccountingCashFlowStatement(value: object): value is AccountingCashFlowStatement { + if (!('reports' in value) || value['reports'] === undefined) return false; + if (!('reportBasis' in value) || value['reportBasis'] === undefined) return false; + if (!('reportInput' in value) || value['reportInput'] === undefined) return false; + return true; +} + +export function AccountingCashFlowStatementFromJSON(json: any): AccountingCashFlowStatement { + return AccountingCashFlowStatementFromJSONTyped(json, false); +} + +export function AccountingCashFlowStatementFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCashFlowStatement { + if (json == null) { + return json; + } + return { + + 'reports': ((json['reports'] as Array).map(CashFlowStatementFromJSON)), + 'reportBasis': ReportBasisFromJSON(json['reportBasis']), + 'reportInput': ReportInputFromJSON(json['reportInput']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'mostRecentAvailableMonth': json['mostRecentAvailableMonth'] == null ? undefined : json['mostRecentAvailableMonth'], + 'earliestAvailableMonth': json['earliestAvailableMonth'] == null ? undefined : json['earliestAvailableMonth'], + }; +} + +export function AccountingCashFlowStatementToJSON(json: any): AccountingCashFlowStatement { + return AccountingCashFlowStatementToJSONTyped(json, false); +} + +export function AccountingCashFlowStatementToJSONTyped(value?: AccountingCashFlowStatement | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reports': ((value['reports'] as Array).map(CashFlowStatementToJSON)), + 'reportBasis': ReportBasisToJSON(value['reportBasis']), + 'reportInput': ReportInputToJSON(value['reportInput']), + 'currency': value['currency'], + 'mostRecentAvailableMonth': value['mostRecentAvailableMonth'], + 'earliestAvailableMonth': value['earliestAvailableMonth'], + }; +} + + +export interface AccountingCashFlowStatementGetResponseAccountingCashFlowStatement { + /** + * Array of cash flow statements. + * @type {Array} + * @memberof AccountingCashFlowStatement + */ + reports: Array; + /** + * + * @type {ReportBasis} + * @memberof AccountingCashFlowStatement + */ + reportBasis: ReportBasis; + /** + * + * @type {ReportInput} + * @memberof AccountingCashFlowStatement + */ + reportInput: ReportInput; + /** + * 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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + earliestAvailableMonth?: string; +} + +export interface GetAccountingCashFlowStatementResponseAccountingCashFlowStatement { + /** + * Array of cash flow statements. + * @type {Array} + * @memberof AccountingCashFlowStatement + */ + reports: Array; + /** + * + * @type {ReportBasis} + * @memberof AccountingCashFlowStatement + */ + reportBasis: ReportBasis; + /** + * + * @type {ReportInput} + * @memberof AccountingCashFlowStatement + */ + reportInput: ReportInput; + /** + * 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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCashFlowStatement + */ + earliestAvailableMonth?: string; } diff --git a/lending/src/sdk/models/shared/accountingcompanyinfo.ts b/lending/src/sdk/models/shared/accountingcompanyinfo.ts index c56d2bdff..015df3fb3 100644 --- a/lending/src/sdk/models/shared/accountingcompanyinfo.ts +++ b/lending/src/sdk/models/shared/accountingcompanyinfo.ts @@ -1,180 +1,1116 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { SupplementalData } from './supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { AccountingAddress } from './accountingaddress'; import { - AccountingAddress, - AccountingAddress$inboundSchema, -} from "./accountingaddress.js"; -import { PhoneNumber, PhoneNumber$inboundSchema } from "./phonenumber.js"; + AccountingAddressFromJSON, + AccountingAddressFromJSONTyped, + AccountingAddressToJSON, + AccountingAddressToJSONTyped, +} from './accountingaddress'; +import type { PhoneNumber } from './phonenumber'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { WebLink, WebLink$inboundSchema } from "./weblink.js"; + PhoneNumberFromJSON, + PhoneNumberFromJSONTyped, + PhoneNumberToJSON, + PhoneNumberToJSONTyped, +} from './phonenumber'; +import type { WebLink } from './weblink'; +import { + WebLinkFromJSON, + WebLinkFromJSONTyped, + WebLinkToJSON, + WebLinkToJSONTyped, +} from './weblink'; /** * Company info provides standard details about a linked company such as their address, phone number, and company registration. - * - * @remarks - * + * * > **Company information or companies?** - * > + * > * > Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources. + * @export + * @interface AccountingCompanyInfo + */ +export interface AccountingCompanyInfo { + /** + * Name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyName?: string | null; + /** + * Identifier or reference for the company in the accounting software. + * @type {string} + * @memberof AccountingCompanyInfo + */ + accountingPlatformRef?: string | null; + /** + * Registered legal name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyLegalName?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + addresses?: Array | null; + /** + * An array of phone numbers. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + phoneNumbers?: Array | null; + /** + * An array of weblinks. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + webLinks?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + ledgerLockDate?: string; + /** + * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + * @type {string} + * @memberof AccountingCompanyInfo + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCompanyInfo + */ + taxNumber?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + financialYearStartDate?: string; + /** + * Currency set in the accounting software of the linked company. Used by the currency rate. + * @type {string} + * @memberof AccountingCompanyInfo + */ + baseCurrency?: string | null; + /** + * 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). + * @type {{ [key: string]: string; }} + * @memberof AccountingCompanyInfo + */ + sourceUrls?: { [key: string]: string | null; } | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + createdDate?: string; + /** + * + * @type {SupplementalData} + * @memberof AccountingCompanyInfo + */ + supplementalData?: SupplementalData; +} + +/** + * Check if a given object implements the AccountingCompanyInfo interface. */ -export type AccountingCompanyInfo = { - /** - * Name of the linked company. - */ - companyName?: string | null | undefined; - /** - * Identifier or reference for the company in the accounting software. - */ - accountingPlatformRef?: string | null | undefined; - /** - * Registered legal name of the linked company. - */ - companyLegalName?: string | null | undefined; - /** - * An array of Addresses. - */ - addresses?: Array | null | undefined; - /** - * An array of phone numbers. - */ - phoneNumbers?: Array | null | undefined; - /** - * An array of weblinks. - */ - webLinks?: Array | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - ledgerLockDate?: string | undefined; - /** - * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. - */ - registrationNumber?: string | null | undefined; - /** - * Company tax number. - */ - taxNumber?: string | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - financialYearStartDate?: string | undefined; - /** - * Currency set in the accounting software of the linked company. Used by the currency rate. - */ - baseCurrency?: string | null | undefined; - /** - * URL addresses for the accounting source. - * - * @remarks - * - * 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). - */ - sourceUrls?: { [k: string]: string | null } | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export function instanceOfAccountingCompanyInfo(value: object): value is AccountingCompanyInfo { + return true; +} + +export function AccountingCompanyInfoFromJSON(json: any): AccountingCompanyInfo { + return AccountingCompanyInfoFromJSONTyped(json, false); +} + +export function AccountingCompanyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCompanyInfo { + if (json == null) { + return json; + } + return { + + 'companyName': json['companyName'] == null ? undefined : json['companyName'], + 'accountingPlatformRef': json['accountingPlatformRef'] == null ? undefined : json['accountingPlatformRef'], + 'companyLegalName': json['companyLegalName'] == null ? undefined : json['companyLegalName'], + 'addresses': json['addresses'] == null ? undefined : ((json['addresses'] as Array).map(AccountingAddressFromJSON)), + 'phoneNumbers': json['phoneNumbers'] == null ? undefined : ((json['phoneNumbers'] as Array).map(PhoneNumberFromJSON)), + 'webLinks': json['webLinks'] == null ? undefined : ((json['webLinks'] as Array).map(WebLinkFromJSON)), + 'ledgerLockDate': json['ledgerLockDate'] == null ? undefined : json['ledgerLockDate'], + 'registrationNumber': json['registrationNumber'] == null ? undefined : json['registrationNumber'], + 'taxNumber': json['taxNumber'] == null ? undefined : json['taxNumber'], + 'financialYearStartDate': json['financialYearStartDate'] == null ? undefined : json['financialYearStartDate'], + 'baseCurrency': json['baseCurrency'] == null ? undefined : json['baseCurrency'], + 'sourceUrls': json['sourceUrls'] == null ? undefined : json['sourceUrls'], + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} -/** @internal */ -export const AccountingCompanyInfo$inboundSchema: z.ZodType< - AccountingCompanyInfo, - z.ZodTypeDef, - unknown -> = z.object({ - companyName: z.nullable(z.string()).optional(), - accountingPlatformRef: z.nullable(z.string()).optional(), - companyLegalName: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(AccountingAddress$inboundSchema)).optional(), - phoneNumbers: z.nullable(z.array(PhoneNumber$inboundSchema)).optional(), - webLinks: z.nullable(z.array(WebLink$inboundSchema)).optional(), - ledgerLockDate: z.string().optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - financialYearStartDate: z.string().optional(), - baseCurrency: z.nullable(z.string()).optional(), - sourceUrls: z.nullable(z.record(z.nullable(z.string()))).optional(), - createdDate: z.string().optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); +export function AccountingCompanyInfoToJSON(json: any): AccountingCompanyInfo { + return AccountingCompanyInfoToJSONTyped(json, false); +} + +export function AccountingCompanyInfoToJSONTyped(value?: AccountingCompanyInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'companyName': value['companyName'], + 'accountingPlatformRef': value['accountingPlatformRef'], + 'companyLegalName': value['companyLegalName'], + 'addresses': value['addresses'] == null ? undefined : ((value['addresses'] as Array).map(AccountingAddressToJSON)), + 'phoneNumbers': value['phoneNumbers'] == null ? undefined : ((value['phoneNumbers'] as Array).map(PhoneNumberToJSON)), + 'webLinks': value['webLinks'] == null ? undefined : ((value['webLinks'] as Array).map(WebLinkToJSON)), + 'ledgerLockDate': value['ledgerLockDate'], + 'registrationNumber': value['registrationNumber'], + 'taxNumber': value['taxNumber'], + 'financialYearStartDate': value['financialYearStartDate'], + 'baseCurrency': value['baseCurrency'], + 'sourceUrls': value['sourceUrls'], + 'createdDate': value['createdDate'], + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingCompanyInfoAccountingCompanyInformation { + /** + * Name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyName?: string | null; + /** + * Identifier or reference for the company in the accounting software. + * @type {string} + * @memberof AccountingCompanyInfo + */ + accountingPlatformRef?: string | null; + /** + * Registered legal name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyLegalName?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + addresses?: Array | null; + /** + * An array of phone numbers. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + phoneNumbers?: Array | null; + /** + * An array of weblinks. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + webLinks?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + ledgerLockDate?: string; + /** + * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + * @type {string} + * @memberof AccountingCompanyInfo + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCompanyInfo + */ + taxNumber?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + financialYearStartDate?: string; + /** + * Currency set in the accounting software of the linked company. Used by the currency rate. + * @type {string} + * @memberof AccountingCompanyInfo + */ + baseCurrency?: string | null; + /** + * 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). + * @type {{ [key: string]: string; }} + * @memberof AccountingCompanyInfo + */ + sourceUrls?: { [key: string]: string | null; } | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + createdDate?: string; + /** + * + * @type {SupplementalData} + * @memberof AccountingCompanyInfo + */ + supplementalData?: SupplementalData; +} + +export interface AccountingCompanyInformation { + /** + * Name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyName?: string | null; + /** + * Identifier or reference for the company in the accounting software. + * @type {string} + * @memberof AccountingCompanyInfo + */ + accountingPlatformRef?: string | null; + /** + * Registered legal name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyLegalName?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + addresses?: Array | null; + /** + * An array of phone numbers. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + phoneNumbers?: Array | null; + /** + * An array of weblinks. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + webLinks?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + ledgerLockDate?: string; + /** + * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + * @type {string} + * @memberof AccountingCompanyInfo + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCompanyInfo + */ + taxNumber?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + financialYearStartDate?: string; + /** + * Currency set in the accounting software of the linked company. Used by the currency rate. + * @type {string} + * @memberof AccountingCompanyInfo + */ + baseCurrency?: string | null; + /** + * 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). + * @type {{ [key: string]: string; }} + * @memberof AccountingCompanyInfo + */ + sourceUrls?: { [key: string]: string | null; } | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + createdDate?: string; + /** + * + * @type {SupplementalData} + * @memberof AccountingCompanyInfo + */ + supplementalData?: SupplementalData; +} + +export interface AccountingProfileGetResponseAccountingCompanyInfo { + /** + * Name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyName?: string | null; + /** + * Identifier or reference for the company in the accounting software. + * @type {string} + * @memberof AccountingCompanyInfo + */ + accountingPlatformRef?: string | null; + /** + * Registered legal name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyLegalName?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + addresses?: Array | null; + /** + * An array of phone numbers. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + phoneNumbers?: Array | null; + /** + * An array of weblinks. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + webLinks?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + ledgerLockDate?: string; + /** + * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + * @type {string} + * @memberof AccountingCompanyInfo + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCompanyInfo + */ + taxNumber?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + financialYearStartDate?: string; + /** + * Currency set in the accounting software of the linked company. Used by the currency rate. + * @type {string} + * @memberof AccountingCompanyInfo + */ + baseCurrency?: string | null; + /** + * 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). + * @type {{ [key: string]: string; }} + * @memberof AccountingCompanyInfo + */ + sourceUrls?: { [key: string]: string | null; } | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + createdDate?: string; + /** + * + * @type {SupplementalData} + * @memberof AccountingCompanyInfo + */ + supplementalData?: SupplementalData; +} + +export interface AccountingProfileGetResponseAccountingCompanyInformation { + /** + * Name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyName?: string | null; + /** + * Identifier or reference for the company in the accounting software. + * @type {string} + * @memberof AccountingCompanyInfo + */ + accountingPlatformRef?: string | null; + /** + * Registered legal name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyLegalName?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + addresses?: Array | null; + /** + * An array of phone numbers. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + phoneNumbers?: Array | null; + /** + * An array of weblinks. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + webLinks?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + ledgerLockDate?: string; + /** + * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + * @type {string} + * @memberof AccountingCompanyInfo + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCompanyInfo + */ + taxNumber?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + financialYearStartDate?: string; + /** + * Currency set in the accounting software of the linked company. Used by the currency rate. + * @type {string} + * @memberof AccountingCompanyInfo + */ + baseCurrency?: string | null; + /** + * 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). + * @type {{ [key: string]: string; }} + * @memberof AccountingCompanyInfo + */ + sourceUrls?: { [key: string]: string | null; } | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + createdDate?: string; + /** + * + * @type {SupplementalData} + * @memberof AccountingCompanyInfo + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingProfileResponseAccountingCompanyInfo { + /** + * Name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyName?: string | null; + /** + * Identifier or reference for the company in the accounting software. + * @type {string} + * @memberof AccountingCompanyInfo + */ + accountingPlatformRef?: string | null; + /** + * Registered legal name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyLegalName?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + addresses?: Array | null; + /** + * An array of phone numbers. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + phoneNumbers?: Array | null; + /** + * An array of weblinks. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + webLinks?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + ledgerLockDate?: string; + /** + * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + * @type {string} + * @memberof AccountingCompanyInfo + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCompanyInfo + */ + taxNumber?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + financialYearStartDate?: string; + /** + * Currency set in the accounting software of the linked company. Used by the currency rate. + * @type {string} + * @memberof AccountingCompanyInfo + */ + baseCurrency?: string | null; + /** + * 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). + * @type {{ [key: string]: string; }} + * @memberof AccountingCompanyInfo + */ + sourceUrls?: { [key: string]: string | null; } | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + createdDate?: string; + /** + * + * @type {SupplementalData} + * @memberof AccountingCompanyInfo + */ + supplementalData?: SupplementalData; +} -export function accountingCompanyInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCompanyInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCompanyInfo' from JSON`, - ); +export interface GetAccountingProfileResponseAccountingCompanyInformation { + /** + * Name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyName?: string | null; + /** + * Identifier or reference for the company in the accounting software. + * @type {string} + * @memberof AccountingCompanyInfo + */ + accountingPlatformRef?: string | null; + /** + * Registered legal name of the linked company. + * @type {string} + * @memberof AccountingCompanyInfo + */ + companyLegalName?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + addresses?: Array | null; + /** + * An array of phone numbers. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + phoneNumbers?: Array | null; + /** + * An array of weblinks. + * @type {Array} + * @memberof AccountingCompanyInfo + */ + webLinks?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + ledgerLockDate?: string; + /** + * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + * @type {string} + * @memberof AccountingCompanyInfo + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCompanyInfo + */ + taxNumber?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + financialYearStartDate?: string; + /** + * Currency set in the accounting software of the linked company. Used by the currency rate. + * @type {string} + * @memberof AccountingCompanyInfo + */ + baseCurrency?: string | null; + /** + * 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). + * @type {{ [key: string]: string; }} + * @memberof AccountingCompanyInfo + */ + sourceUrls?: { [key: string]: string | null; } | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCompanyInfo + */ + createdDate?: string; + /** + * + * @type {SupplementalData} + * @memberof AccountingCompanyInfo + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingcreateaccountresponse.ts b/lending/src/sdk/models/shared/accountingcreateaccountresponse.ts index 7b8946498..c0b9d9c7c 100644 --- a/lending/src/sdk/models/shared/accountingcreateaccountresponse.ts +++ b/lending/src/sdk/models/shared/accountingcreateaccountresponse.ts @@ -1,399 +1,561 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountStatus, AccountStatus$inboundSchema } from "./accountstatus.js"; -import { AccountType, AccountType$inboundSchema } from "./accounttype.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; +import type { AccountingCreateAccountResponseAccountingAccount } from './accountingaccount'; +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +import type { Validation } from './validation'; import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; + ValidationFromJSON, + ValidationFromJSONTyped, + ValidationToJSON, + ValidationToJSONTyped, +} from './validation'; +import type { PushOperationStatus } from './pushoperationstatus'; import { - PushOperationChange, - PushOperationChange$inboundSchema, -} from "./pushoperationchange.js"; + PushOperationStatusFromJSON, + PushOperationStatusFromJSONTyped, + PushOperationStatusToJSON, + PushOperationStatusToJSONTyped, +} from './pushoperationstatus'; +import type { AccountingCreateAccountResponseAllOfData } from '../AccountingCreateAccountResponseAllOfData'; import { - PushOperationStatus, - PushOperationStatus$inboundSchema, -} from "./pushoperationstatus.js"; + AccountingCreateAccountResponseAllOfDataFromJSON, + AccountingCreateAccountResponseAllOfDataFromJSONTyped, + AccountingCreateAccountResponseAllOfDataToJSON, + AccountingCreateAccountResponseAllOfDataToJSONTyped, +} from '../AccountingCreateAccountResponseAllOfData'; +import type { PushOperationChange } from './pushoperationchange'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { Validation, Validation$inboundSchema } from "./validation.js"; + PushOperationChangeFromJSON, + PushOperationChangeFromJSONTyped, + PushOperationChangeToJSON, + PushOperationChangeToJSONTyped, +} from './pushoperationchange'; /** - * 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. - * - * @remarks - * - * For example, `validDatatypeLinks` might indicate the following references: - * - * - Which tax rates are valid to use on the line item of a bill. - * - Which items can be used when creating an invoice. - * - * You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. - * - * ## `validDatatypeLinks` example - * - * The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. - * - * ```json validDatatypeLinks for an account - * { - * "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - * "nominalCode": "090", - * "name": "Business Bank Account", - * #... - * "validDatatypeLinks": [ - * { - * "property": "Id", - * "links": [ - * "Payment.AccountRef.Id", - * "BillPayment.AccountRef.Id", - * "DirectIncome.LineItems.AccountRef.Id", - * "DirectCost.LineItems.AccountRef.Id" - * ] - * } - * ] - * } - * ``` - * - * ## Support for `validDatatypeLinks` - * - * Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. - * - * If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + * + * @export + * @interface AccountingCreateAccountResponse */ -export type AccountingCreateAccountResponseValidDataTypeLinks = { - /** - * The property from the account that can be linked. - */ - property?: string | null | undefined; - /** - * Supported `dataTypes` that the record can be linked to. - */ - links?: Array | null | undefined; -}; +export interface AccountingCreateAccountResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateAccountResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateAccountResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateAccountResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateAccountResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateAccountResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateAccountResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateAccountResponseAllOfData} + * @memberof AccountingCreateAccountResponse + */ + data?: AccountingCreateAccountResponseAccountingAccount | null; +} + /** - * > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. - * - * @remarks - * - * ## 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/lending-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. - * - * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + * @export + */ +export const AccountingCreateAccountResponseDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type AccountingCreateAccountResponseDataTypeEnum = typeof AccountingCreateAccountResponseDataTypeEnum[keyof typeof AccountingCreateAccountResponseDataTypeEnum]; + + +/** + * Check if a given object implements the AccountingCreateAccountResponse interface. */ -export type AccountingCreateAccountResponseAccountingAccount = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the account, unique for the company. - */ - id?: string | undefined; - /** - * 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. - */ - nominalCode?: string | null | undefined; - /** - * Name of the account. - */ - name?: string | null | undefined; - /** - * Description for the account. - */ - description?: string | null | undefined; - /** - * Full category of the account. - * - * @remarks - * - * 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. - */ - fullyQualifiedCategory?: string | null | undefined; - /** - * Full name of the account, for example: - * - * @remarks - * - `Cash On Hand` - * - `Rents Held In Trust` - * - `Fixed Asset` - */ - fullyQualifiedName?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Current balance in the account. - */ - currentBalance?: Decimal$ | number | null | undefined; - /** - * Type of account - */ - type?: AccountType | undefined; - /** - * Status of the account - */ - status?: AccountStatus | undefined; - /** - * Confirms whether the account is a bank account or not. - */ - isBankAccount?: boolean | undefined; - /** - * 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](/lending-api#/schemas/ValidDataTypeLinks). - */ - validDatatypeLinks?: - | Array - | null - | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; - metadata?: Metadata | undefined; -}; +export function instanceOfAccountingCreateAccountResponse(value: object): value is AccountingCreateAccountResponse { + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('pushOperationKey' in value) || value['pushOperationKey'] === undefined) return false; + if (!('dataConnectionKey' in value) || value['dataConnectionKey'] === undefined) return false; + if (!('requestedOnUtc' in value) || value['requestedOnUtc'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('statusCode' in value) || value['statusCode'] === undefined) return false; + return true; +} -export type AccountingCreateAccountResponse = { - data?: AccountingCreateAccountResponseAccountingAccount | null | undefined; - /** - * Contains a single entry that communicates which record has changed and the manner in which it changed. - */ - changes?: Array | null | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId: string; - /** - * 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. - */ - pushOperationKey: string; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionKey: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedOnUtc: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completedOnUtc?: string | undefined; - /** - * Number of minutes the push operation must complete within before it times out. - */ - timeoutInMinutes?: number | null | undefined; - /** - * Number of seconds the push operation must complete within before it times out. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - timeoutInSeconds?: number | null | undefined; - /** - * The current status of the push operation. - */ - status: PushOperationStatus; - /** - * A message about the error. - */ - errorMessage?: string | null | undefined; - /** - * 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. - */ - validation?: Validation | undefined; - /** - * Push status code. - */ - statusCode: number; -}; +export function AccountingCreateAccountResponseFromJSON(json: any): AccountingCreateAccountResponse { + return AccountingCreateAccountResponseFromJSONTyped(json, false); +} -/** @internal */ -export const AccountingCreateAccountResponseValidDataTypeLinks$inboundSchema: - z.ZodType< - AccountingCreateAccountResponseValidDataTypeLinks, - z.ZodTypeDef, - unknown - > = z.object({ - property: z.nullable(z.string()).optional(), - links: z.nullable(z.array(z.string())).optional(), - }); +export function AccountingCreateAccountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateAccountResponse { + if (json == null) { + return json; + } + return { + + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(PushOperationChangeFromJSON)), + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'companyId': json['companyId'], + 'pushOperationKey': json['pushOperationKey'], + 'dataConnectionKey': json['dataConnectionKey'], + 'requestedOnUtc': json['requestedOnUtc'], + 'completedOnUtc': json['completedOnUtc'] == null ? undefined : json['completedOnUtc'], + 'timeoutInMinutes': json['timeoutInMinutes'] == null ? undefined : json['timeoutInMinutes'], + 'timeoutInSeconds': json['timeoutInSeconds'] == null ? undefined : json['timeoutInSeconds'], + 'status': PushOperationStatusFromJSON(json['status']), + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'validation': json['validation'] == null ? undefined : ValidationFromJSON(json['validation']), + 'statusCode': json['statusCode'], + 'data': json['data'] == null ? undefined : AccountingCreateAccountResponseAllOfDataFromJSON(json['data']), + }; +} -export function accountingCreateAccountResponseValidDataTypeLinksFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreateAccountResponseValidDataTypeLinks, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreateAccountResponseValidDataTypeLinks$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AccountingCreateAccountResponseValidDataTypeLinks' from JSON`, - ); +export function AccountingCreateAccountResponseToJSON(json: any): AccountingCreateAccountResponse { + return AccountingCreateAccountResponseToJSONTyped(json, false); } -/** @internal */ -export const AccountingCreateAccountResponseAccountingAccount$inboundSchema: - z.ZodType< - AccountingCreateAccountResponseAccountingAccount, - z.ZodTypeDef, - unknown - > = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - nominalCode: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - description: z.nullable(z.string()).optional(), - fullyQualifiedCategory: z.nullable(z.string()).optional(), - fullyQualifiedName: z.nullable(z.string()).optional(), - currency: z.string().optional(), - currentBalance: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - type: AccountType$inboundSchema.optional(), - status: AccountStatus$inboundSchema.optional(), - isBankAccount: z.boolean().optional(), - validDatatypeLinks: z.nullable( - z.array(z.lazy(() => - AccountingCreateAccountResponseValidDataTypeLinks$inboundSchema - )), - ).optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), - }); +export function AccountingCreateAccountResponseToJSONTyped(value?: AccountingCreateAccountResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function accountingCreateAccountResponseAccountingAccountFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreateAccountResponseAccountingAccount, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreateAccountResponseAccountingAccount$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AccountingCreateAccountResponseAccountingAccount' from JSON`, - ); + return { + + 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(PushOperationChangeToJSON)), + 'dataType': value['dataType'], + 'companyId': value['companyId'], + 'pushOperationKey': value['pushOperationKey'], + 'dataConnectionKey': value['dataConnectionKey'], + 'requestedOnUtc': value['requestedOnUtc'], + 'completedOnUtc': value['completedOnUtc'], + 'timeoutInMinutes': value['timeoutInMinutes'], + 'timeoutInSeconds': value['timeoutInSeconds'], + 'status': PushOperationStatusToJSON(value['status']), + 'errorMessage': value['errorMessage'], + 'validation': ValidationToJSON(value['validation']), + 'statusCode': value['statusCode'], + 'data': AccountingCreateAccountResponseAllOfDataToJSON(value['data']), + }; } -/** @internal */ -export const AccountingCreateAccountResponse$inboundSchema: z.ZodType< - AccountingCreateAccountResponse, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.nullable( - z.lazy(() => - AccountingCreateAccountResponseAccountingAccount$inboundSchema - ), - ).optional(), - changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), - dataType: PropertieDataType$inboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$inboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$inboundSchema.optional(), - statusCode: z.number().int(), -}); -export function accountingCreateAccountResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCreateAccountResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCreateAccountResponse' from JSON`, - ); +export interface AccountCreateResponseAccountingCreateAccountResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateAccountResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateAccountResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateAccountResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateAccountResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateAccountResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateAccountResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateAccountResponseAllOfData} + * @memberof AccountingCreateAccountResponse + */ + data?: AccountingCreateAccountResponseAllOfData | null; +} + +export interface CreateAccountResponseAccountingCreateAccountResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateAccountResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateAccountResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateAccountResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateAccountResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateAccountResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateAccountResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateAccountResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateAccountResponseAllOfData} + * @memberof AccountingCreateAccountResponse + */ + data?: AccountingCreateAccountResponseAllOfData | null; } diff --git a/lending/src/sdk/models/shared/accountingcreatebankaccountresponse.ts b/lending/src/sdk/models/shared/accountingcreatebankaccountresponse.ts index 596cab962..8dd2198d6 100644 --- a/lending/src/sdk/models/shared/accountingcreatebankaccountresponse.ts +++ b/lending/src/sdk/models/shared/accountingcreatebankaccountresponse.ts @@ -1,327 +1,561 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AccountingBankAccountType, - AccountingBankAccountType$inboundSchema, -} from "./accountingbankaccounttype.js"; +import type { AccountingCreateBankAccountResponseAccountingBankAccount } from './accountingbankaccount'; +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +import type { Validation } from './validation'; import { - BankAccountStatus, - BankAccountStatus$inboundSchema, -} from "./bankaccountstatus.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + ValidationFromJSON, + ValidationFromJSONTyped, + ValidationToJSON, + ValidationToJSONTyped, +} from './validation'; +import type { AccountingCreateBankAccountResponseAllOfData } from '../AccountingCreateBankAccountResponseAllOfData'; import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; + AccountingCreateBankAccountResponseAllOfDataFromJSON, + AccountingCreateBankAccountResponseAllOfDataFromJSONTyped, + AccountingCreateBankAccountResponseAllOfDataToJSON, + AccountingCreateBankAccountResponseAllOfDataToJSONTyped, +} from '../AccountingCreateBankAccountResponseAllOfData'; +import type { PushOperationStatus } from './pushoperationstatus'; import { - PushOperationChange, - PushOperationChange$inboundSchema, -} from "./pushoperationchange.js"; + PushOperationStatusFromJSON, + PushOperationStatusFromJSONTyped, + PushOperationStatusToJSON, + PushOperationStatusToJSONTyped, +} from './pushoperationstatus'; +import type { PushOperationChange } from './pushoperationchange'; import { - PushOperationStatus, - PushOperationStatus$inboundSchema, -} from "./pushoperationstatus.js"; -import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { Validation, Validation$inboundSchema } from "./validation.js"; + PushOperationChangeFromJSON, + PushOperationChangeFromJSONTyped, + PushOperationChangeToJSON, + PushOperationChangeToJSONTyped, +} from './pushoperationchange'; /** - * > **Accessing Bank Accounts through Banking API** - * - * @remarks - * > - * > 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 [Banking: Account](https://docs.codat.io/lending-api#/schemas/Account) data type. - * - * ## 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 software. - * * The currency and balance of the account. - * * The sort code and account number. - * - * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + * + * @export + * @interface AccountingCreateBankAccountResponse */ -export type AccountingCreateBankAccountResponseAccountingBankAccount = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the account, unique for the company in the accounting software. - */ - id?: string | undefined; - /** - * Name of the bank account in the accounting software. - */ - accountName?: string | null | undefined; - /** - * The type of transactions and balances on the account. - * - * @remarks - * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. - * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. - */ - accountType?: AccountingBankAccountType | undefined; - /** - * Code used to identify each nominal account for a business. - */ - nominalCode?: string | null | undefined; - /** - * Sort code for the bank account. - * - * @remarks - * - * 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. - */ - sortCode?: string | null | undefined; - /** - * Account number for the bank account. - * - * @remarks - * - * 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. - */ - accountNumber?: string | null | undefined; - /** - * International bank account number of the account. Often used when making or receiving international payments. - */ - iBan?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Balance of the bank account. - */ - balance?: Decimal$ | number | null | undefined; - /** - * The institution of the bank account. - */ - institution?: string | null | undefined; - /** - * 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. - */ - availableBalance?: Decimal$ | number | null | undefined; - /** - * Pre-arranged overdraft limit of the account. - * - * @remarks - * - * The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. - */ - overdraftLimit?: Decimal$ | number | null | undefined; - /** - * Status of the bank account. - */ - status?: BankAccountStatus | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export interface AccountingCreateBankAccountResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankAccountResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankAccountResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankAccountResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankAccountResponseAllOfData} + * @memberof AccountingCreateBankAccountResponse + */ + data?: AccountingCreateBankAccountResponseAccountingBankAccount | null; +} -export type AccountingCreateBankAccountResponse = { - data?: - | AccountingCreateBankAccountResponseAccountingBankAccount - | null - | undefined; - /** - * Contains a single entry that communicates which record has changed and the manner in which it changed. - */ - changes?: Array | null | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId: string; - /** - * 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. - */ - pushOperationKey: string; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionKey: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedOnUtc: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completedOnUtc?: string | undefined; - /** - * Number of minutes the push operation must complete within before it times out. - */ - timeoutInMinutes?: number | null | undefined; - /** - * Number of seconds the push operation must complete within before it times out. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - timeoutInSeconds?: number | null | undefined; - /** - * The current status of the push operation. - */ - status: PushOperationStatus; - /** - * A message about the error. - */ - errorMessage?: string | null | undefined; - /** - * 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. - */ - validation?: Validation | undefined; - /** - * Push status code. - */ - statusCode: number; -}; -/** @internal */ -export const AccountingCreateBankAccountResponseAccountingBankAccount$inboundSchema: - z.ZodType< - AccountingCreateBankAccountResponseAccountingBankAccount, - z.ZodTypeDef, - unknown - > = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - accountName: z.nullable(z.string()).optional(), - accountType: AccountingBankAccountType$inboundSchema.optional(), - nominalCode: z.nullable(z.string()).optional(), - sortCode: z.nullable(z.string()).optional(), - accountNumber: z.nullable(z.string()).optional(), - iBan: z.nullable(z.string()).optional(), - currency: z.string().optional(), - balance: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - institution: z.nullable(z.string()).optional(), - availableBalance: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - overdraftLimit: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - status: BankAccountStatus$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - }); +/** + * @export + */ +export const AccountingCreateBankAccountResponseDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type AccountingCreateBankAccountResponseDataTypeEnum = typeof AccountingCreateBankAccountResponseDataTypeEnum[keyof typeof AccountingCreateBankAccountResponseDataTypeEnum]; + -export function accountingCreateBankAccountResponseAccountingBankAccountFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreateBankAccountResponseAccountingBankAccount, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreateBankAccountResponseAccountingBankAccount$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'AccountingCreateBankAccountResponseAccountingBankAccount' from JSON`, - ); +/** + * Check if a given object implements the AccountingCreateBankAccountResponse interface. + */ +export function instanceOfAccountingCreateBankAccountResponse(value: object): value is AccountingCreateBankAccountResponse { + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('pushOperationKey' in value) || value['pushOperationKey'] === undefined) return false; + if (!('dataConnectionKey' in value) || value['dataConnectionKey'] === undefined) return false; + if (!('requestedOnUtc' in value) || value['requestedOnUtc'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('statusCode' in value) || value['statusCode'] === undefined) return false; + return true; +} + +export function AccountingCreateBankAccountResponseFromJSON(json: any): AccountingCreateBankAccountResponse { + return AccountingCreateBankAccountResponseFromJSONTyped(json, false); } -/** @internal */ -export const AccountingCreateBankAccountResponse$inboundSchema: z.ZodType< - AccountingCreateBankAccountResponse, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.nullable( - z.lazy(() => - AccountingCreateBankAccountResponseAccountingBankAccount$inboundSchema - ), - ).optional(), - changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), - dataType: PropertieDataType$inboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$inboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$inboundSchema.optional(), - statusCode: z.number().int(), -}); +export function AccountingCreateBankAccountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateBankAccountResponse { + if (json == null) { + return json; + } + return { + + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(PushOperationChangeFromJSON)), + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'companyId': json['companyId'], + 'pushOperationKey': json['pushOperationKey'], + 'dataConnectionKey': json['dataConnectionKey'], + 'requestedOnUtc': json['requestedOnUtc'], + 'completedOnUtc': json['completedOnUtc'] == null ? undefined : json['completedOnUtc'], + 'timeoutInMinutes': json['timeoutInMinutes'] == null ? undefined : json['timeoutInMinutes'], + 'timeoutInSeconds': json['timeoutInSeconds'] == null ? undefined : json['timeoutInSeconds'], + 'status': PushOperationStatusFromJSON(json['status']), + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'validation': json['validation'] == null ? undefined : ValidationFromJSON(json['validation']), + 'statusCode': json['statusCode'], + 'data': json['data'] == null ? undefined : AccountingCreateBankAccountResponseAllOfDataFromJSON(json['data']), + }; +} + +export function AccountingCreateBankAccountResponseToJSON(json: any): AccountingCreateBankAccountResponse { + return AccountingCreateBankAccountResponseToJSONTyped(json, false); +} + +export function AccountingCreateBankAccountResponseToJSONTyped(value?: AccountingCreateBankAccountResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(PushOperationChangeToJSON)), + 'dataType': value['dataType'], + 'companyId': value['companyId'], + 'pushOperationKey': value['pushOperationKey'], + 'dataConnectionKey': value['dataConnectionKey'], + 'requestedOnUtc': value['requestedOnUtc'], + 'completedOnUtc': value['completedOnUtc'], + 'timeoutInMinutes': value['timeoutInMinutes'], + 'timeoutInSeconds': value['timeoutInSeconds'], + 'status': PushOperationStatusToJSON(value['status']), + 'errorMessage': value['errorMessage'], + 'validation': ValidationToJSON(value['validation']), + 'statusCode': value['statusCode'], + 'data': AccountingCreateBankAccountResponseAllOfDataToJSON(value['data']), + }; +} + + +export interface BankAccountCreateResponseAccountingCreateBankAccountResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankAccountResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankAccountResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankAccountResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankAccountResponseAllOfData} + * @memberof AccountingCreateBankAccountResponse + */ + data?: AccountingCreateBankAccountResponseAllOfData | null; +} -export function accountingCreateBankAccountResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - AccountingCreateBankAccountResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCreateBankAccountResponse' from JSON`, - ); +export interface CreateBankAccountResponseAccountingCreateBankAccountResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankAccountResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankAccountResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankAccountResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankAccountResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankAccountResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankAccountResponseAllOfData} + * @memberof AccountingCreateBankAccountResponse + */ + data?: AccountingCreateBankAccountResponseAllOfData | null; } diff --git a/lending/src/sdk/models/shared/accountingcreatebanktransactions.ts b/lending/src/sdk/models/shared/accountingcreatebanktransactions.ts index cc8203af2..8270f88bf 100644 --- a/lending/src/sdk/models/shared/accountingcreatebanktransactions.ts +++ b/lending/src/sdk/models/shared/accountingcreatebanktransactions.ts @@ -1,44 +1,276 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; +import { mapValues } from '../../../runtime'; +import type { CreateBankAccountTransaction } from './createbankaccounttransaction'; import { - CreateBankAccountTransaction, - CreateBankAccountTransaction$Outbound, - CreateBankAccountTransaction$outboundSchema, -} from "./createbankaccounttransaction.js"; - -export type AccountingCreateBankTransactions = { - /** - * Unique identifier for a bank account. - */ - accountId?: string | undefined; - transactions?: Array | undefined; -}; - -/** @internal */ -export type AccountingCreateBankTransactions$Outbound = { - accountId?: string | undefined; - transactions?: Array | undefined; -}; - -/** @internal */ -export const AccountingCreateBankTransactions$outboundSchema: z.ZodType< - AccountingCreateBankTransactions$Outbound, - z.ZodTypeDef, - AccountingCreateBankTransactions -> = z.object({ - accountId: z.string().optional(), - transactions: z.array(CreateBankAccountTransaction$outboundSchema).optional(), -}); - -export function accountingCreateBankTransactionsToJSON( - accountingCreateBankTransactions: AccountingCreateBankTransactions, -): string { - return JSON.stringify( - AccountingCreateBankTransactions$outboundSchema.parse( - accountingCreateBankTransactions, - ), - ); + CreateBankAccountTransactionFromJSON, + CreateBankAccountTransactionFromJSONTyped, + CreateBankAccountTransactionToJSON, + CreateBankAccountTransactionToJSONTyped, +} from './createbankaccounttransaction'; + +/** + * + * @export + * @interface AccountingCreateBankTransactions + */ +export interface AccountingCreateBankTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +/** + * Check if a given object implements the AccountingCreateBankTransactions interface. + */ +export function instanceOfAccountingCreateBankTransactions(value: object): value is AccountingCreateBankTransactions { + return true; +} + +export function AccountingCreateBankTransactionsFromJSON(json: any): AccountingCreateBankTransactions { + return AccountingCreateBankTransactionsFromJSONTyped(json, false); +} + +export function AccountingCreateBankTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateBankTransactions { + if (json == null) { + return json; + } + return { + + 'accountId': json['accountId'] == null ? undefined : json['accountId'], + 'transactions': json['transactions'] == null ? undefined : ((json['transactions'] as Array).map(CreateBankAccountTransactionFromJSON)), + }; +} + +export function AccountingCreateBankTransactionsToJSON(json: any): AccountingCreateBankTransactions { + return AccountingCreateBankTransactionsToJSONTyped(json, false); +} + +export function AccountingCreateBankTransactionsToJSONTyped(value?: AccountingCreateBankTransactions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'accountId': value['accountId'], + 'transactions': value['transactions'] == null ? undefined : ((value['transactions'] as Array).map(CreateBankAccountTransactionToJSON)), + }; +} + + +export interface AccountingCreateBankAccountTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface AccountingCreateBankTransactionsAccountingCreateBankAccountTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface AccountingCreateBankTransactionsResponseAccountingCreateBankAccountTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface AccountingCreateBankTransactionsResponseAccountingCreateBankTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface AccountingCreateUpdateBankTransactionResponseAccountingCreateBankAccountTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface AccountingCreateUpdateBankTransactionResponseAccountingCreateBankTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface BankTransactionsCreateRequestBody { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface BankTransactionsCreateResponseAccountingCreateBankAccountTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface BankTransactionsCreateResponseAccountingCreateBankTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface CreateBankTransactionsAccountingCreateBankTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface CreateBankTransactionsRequestBody { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface CreateBankTransactionsResponseAccountingCreateBankAccountTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; +} + +export interface CreateBankTransactionsResponseAccountingCreateBankTransactions { + /** + * Unique identifier for a bank account. + * @type {string} + * @memberof AccountingCreateBankTransactions + */ + accountId?: string; + /** + * + * @type {Array} + * @memberof AccountingCreateBankTransactions + */ + transactions?: Array; } diff --git a/lending/src/sdk/models/shared/accountingcreatebanktransactionsresponse.ts b/lending/src/sdk/models/shared/accountingcreatebanktransactionsresponse.ts index cc1e8806f..327d76bff 100644 --- a/lending/src/sdk/models/shared/accountingcreatebanktransactionsresponse.ts +++ b/lending/src/sdk/models/shared/accountingcreatebanktransactionsresponse.ts @@ -1,195 +1,1057 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { AccountingCreateBankAccountTransactions } from './accountingcreatebanktransactions'; +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +import type { Validation } from './validation'; import { - CreateBankAccountTransaction, - CreateBankAccountTransaction$inboundSchema, -} from "./createbankaccounttransaction.js"; + ValidationFromJSON, + ValidationFromJSONTyped, + ValidationToJSON, + ValidationToJSONTyped, +} from './validation'; +import type { PushOperationStatus } from './pushoperationstatus'; import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; + PushOperationStatusFromJSON, + PushOperationStatusFromJSONTyped, + PushOperationStatusToJSON, + PushOperationStatusToJSONTyped, +} from './pushoperationstatus'; +import type { AccountingCreateBankTransactionsResponseAllOfData } from '../AccountingCreateBankTransactionsResponseAllOfData'; import { - PushOperationChange, - PushOperationChange$inboundSchema, -} from "./pushoperationchange.js"; + AccountingCreateBankTransactionsResponseAllOfDataFromJSON, + AccountingCreateBankTransactionsResponseAllOfDataFromJSONTyped, + AccountingCreateBankTransactionsResponseAllOfDataToJSON, + AccountingCreateBankTransactionsResponseAllOfDataToJSONTyped, +} from '../AccountingCreateBankTransactionsResponseAllOfData'; +import type { PushOperationChange } from './pushoperationchange'; import { - PushOperationStatus, - PushOperationStatus$inboundSchema, -} from "./pushoperationstatus.js"; -import { Validation, Validation$inboundSchema } from "./validation.js"; + PushOperationChangeFromJSON, + PushOperationChangeFromJSONTyped, + PushOperationChangeToJSON, + PushOperationChangeToJSONTyped, +} from './pushoperationchange'; + +/** + * + * @export + * @interface AccountingCreateBankTransactionsResponse + */ +export interface AccountingCreateBankTransactionsResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankTransactionsResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankTransactionsResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankTransactionsResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankTransactionsResponseAllOfData} + * @memberof AccountingCreateBankTransactionsResponse + */ + data?: AccountingCreateBankAccountTransactions; +} + /** - * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + * @export */ -export type AccountingCreateBankAccountTransactions = { - /** - * Unique identifier for a bank account. - */ - accountId?: string | undefined; - transactions?: Array | undefined; -}; - -export type AccountingCreateBankTransactionsResponse = { - data?: AccountingCreateBankAccountTransactions | undefined; - /** - * Contains a single entry that communicates which record has changed and the manner in which it changed. - */ - changes?: Array | null | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId: string; - /** - * 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. - */ - pushOperationKey: string; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionKey: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedOnUtc: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completedOnUtc?: string | undefined; - /** - * Number of minutes the push operation must complete within before it times out. - */ - timeoutInMinutes?: number | null | undefined; - /** - * Number of seconds the push operation must complete within before it times out. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - timeoutInSeconds?: number | null | undefined; - /** - * The current status of the push operation. - */ - status: PushOperationStatus; - /** - * A message about the error. - */ - errorMessage?: string | null | undefined; - /** - * 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. - */ - validation?: Validation | undefined; - /** - * Push status code. - */ - statusCode: number; -}; - -/** @internal */ -export const AccountingCreateBankAccountTransactions$inboundSchema: z.ZodType< - AccountingCreateBankAccountTransactions, - z.ZodTypeDef, - unknown -> = z.object({ - accountId: z.string().optional(), - transactions: z.array(CreateBankAccountTransaction$inboundSchema).optional(), -}); - -export function accountingCreateBankAccountTransactionsFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreateBankAccountTransactions, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreateBankAccountTransactions$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AccountingCreateBankAccountTransactions' from JSON`, - ); +export const AccountingCreateBankTransactionsResponseDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type AccountingCreateBankTransactionsResponseDataTypeEnum = typeof AccountingCreateBankTransactionsResponseDataTypeEnum[keyof typeof AccountingCreateBankTransactionsResponseDataTypeEnum]; + + +/** + * Check if a given object implements the AccountingCreateBankTransactionsResponse interface. + */ +export function instanceOfAccountingCreateBankTransactionsResponse(value: object): value is AccountingCreateBankTransactionsResponse { + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('pushOperationKey' in value) || value['pushOperationKey'] === undefined) return false; + if (!('dataConnectionKey' in value) || value['dataConnectionKey'] === undefined) return false; + if (!('requestedOnUtc' in value) || value['requestedOnUtc'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('statusCode' in value) || value['statusCode'] === undefined) return false; + return true; +} + +export function AccountingCreateBankTransactionsResponseFromJSON(json: any): AccountingCreateBankTransactionsResponse { + return AccountingCreateBankTransactionsResponseFromJSONTyped(json, false); +} + +export function AccountingCreateBankTransactionsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateBankTransactionsResponse { + if (json == null) { + return json; + } + return { + + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(PushOperationChangeFromJSON)), + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'companyId': json['companyId'], + 'pushOperationKey': json['pushOperationKey'], + 'dataConnectionKey': json['dataConnectionKey'], + 'requestedOnUtc': json['requestedOnUtc'], + 'completedOnUtc': json['completedOnUtc'] == null ? undefined : json['completedOnUtc'], + 'timeoutInMinutes': json['timeoutInMinutes'] == null ? undefined : json['timeoutInMinutes'], + 'timeoutInSeconds': json['timeoutInSeconds'] == null ? undefined : json['timeoutInSeconds'], + 'status': PushOperationStatusFromJSON(json['status']), + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'validation': json['validation'] == null ? undefined : ValidationFromJSON(json['validation']), + 'statusCode': json['statusCode'], + 'data': json['data'] == null ? undefined : AccountingCreateBankTransactionsResponseAllOfDataFromJSON(json['data']), + }; +} + +export function AccountingCreateBankTransactionsResponseToJSON(json: any): AccountingCreateBankTransactionsResponse { + return AccountingCreateBankTransactionsResponseToJSONTyped(json, false); +} + +export function AccountingCreateBankTransactionsResponseToJSONTyped(value?: AccountingCreateBankTransactionsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(PushOperationChangeToJSON)), + 'dataType': value['dataType'], + 'companyId': value['companyId'], + 'pushOperationKey': value['pushOperationKey'], + 'dataConnectionKey': value['dataConnectionKey'], + 'requestedOnUtc': value['requestedOnUtc'], + 'completedOnUtc': value['completedOnUtc'], + 'timeoutInMinutes': value['timeoutInMinutes'], + 'timeoutInSeconds': value['timeoutInSeconds'], + 'status': PushOperationStatusToJSON(value['status']), + 'errorMessage': value['errorMessage'], + 'validation': ValidationToJSON(value['validation']), + 'statusCode': value['statusCode'], + 'data': AccountingCreateBankTransactionsResponseAllOfDataToJSON(value['data']), + }; +} + + +export interface AccountingCreateBankTransactionsResponseAccountingCreateUpdateBankTransactionResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankTransactionsResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankTransactionsResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankTransactionsResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankTransactionsResponseAllOfData} + * @memberof AccountingCreateBankTransactionsResponse + */ + data?: AccountingCreateBankTransactionsResponseAllOfData; +} + +export interface AccountingCreateUpdateBankTransactionResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankTransactionsResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankTransactionsResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankTransactionsResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankTransactionsResponseAllOfData} + * @memberof AccountingCreateBankTransactionsResponse + */ + data?: AccountingCreateBankTransactionsResponseAllOfData; +} + +export interface BankTransactionsCreateResponseAccountingCreateBankTransactionsResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankTransactionsResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankTransactionsResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankTransactionsResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankTransactionsResponseAllOfData} + * @memberof AccountingCreateBankTransactionsResponse + */ + data?: AccountingCreateBankTransactionsResponseAllOfData; +} + +export interface BankTransactionsCreateResponseAccountingCreateUpdateBankTransactionResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankTransactionsResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankTransactionsResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankTransactionsResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankTransactionsResponseAllOfData} + * @memberof AccountingCreateBankTransactionsResponse + */ + data?: AccountingCreateBankTransactionsResponseAllOfData; +} + +export interface CreateBankTransactionsResponseAccountingCreateBankTransactionsResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankTransactionsResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankTransactionsResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankTransactionsResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankTransactionsResponseAllOfData} + * @memberof AccountingCreateBankTransactionsResponse + */ + data?: AccountingCreateBankTransactionsResponseAllOfData; } -/** @internal */ -export const AccountingCreateBankTransactionsResponse$inboundSchema: z.ZodType< - AccountingCreateBankTransactionsResponse, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.lazy(() => AccountingCreateBankAccountTransactions$inboundSchema) - .optional(), - changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), - dataType: PropertieDataType$inboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$inboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$inboundSchema.optional(), - statusCode: z.number().int(), -}); - -export function accountingCreateBankTransactionsResponseFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreateBankTransactionsResponse, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreateBankTransactionsResponse$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AccountingCreateBankTransactionsResponse' from JSON`, - ); +export interface CreateBankTransactionsResponseAccountingCreateUpdateBankTransactionResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateBankTransactionsResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateBankTransactionsResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateBankTransactionsResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateBankTransactionsResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateBankTransactionsResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateBankTransactionsResponseAllOfData} + * @memberof AccountingCreateBankTransactionsResponse + */ + data?: AccountingCreateBankTransactionsResponseAllOfData; } diff --git a/lending/src/sdk/models/shared/accountingcreatedirectcostresponse.ts b/lending/src/sdk/models/shared/accountingcreatedirectcostresponse.ts index de68d685e..0415409d9 100644 --- a/lending/src/sdk/models/shared/accountingcreatedirectcostresponse.ts +++ b/lending/src/sdk/models/shared/accountingcreatedirectcostresponse.ts @@ -1,345 +1,561 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AccountingPaymentAllocation, - AccountingPaymentAllocation$inboundSchema, -} from "./accountingpaymentallocation.js"; -import { ContactRef, ContactRef$inboundSchema } from "./contactref.js"; +import type { AccountingCreateDirectCostResponseAccountingDirectCost } from './accountingdirectcost'; +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +import type { Validation } from './validation'; import { - DirectCostLineItem, - DirectCostLineItem$inboundSchema, -} from "./directcostlineitem.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + ValidationFromJSON, + ValidationFromJSONTyped, + ValidationToJSON, + ValidationToJSONTyped, +} from './validation'; +import type { PushOperationStatus } from './pushoperationstatus'; import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; + PushOperationStatusFromJSON, + PushOperationStatusFromJSONTyped, + PushOperationStatusToJSON, + PushOperationStatusToJSONTyped, +} from './pushoperationstatus'; +import type { AccountingCreateDirectCostResponseAllOfData } from '../AccountingCreateDirectCostResponseAllOfData'; import { - PushOperationChange, - PushOperationChange$inboundSchema, -} from "./pushoperationchange.js"; + AccountingCreateDirectCostResponseAllOfDataFromJSON, + AccountingCreateDirectCostResponseAllOfDataFromJSONTyped, + AccountingCreateDirectCostResponseAllOfDataToJSON, + AccountingCreateDirectCostResponseAllOfDataToJSONTyped, +} from '../AccountingCreateDirectCostResponseAllOfData'; +import type { PushOperationChange } from './pushoperationchange'; import { - PushOperationStatus, - PushOperationStatus$inboundSchema, -} from "./pushoperationstatus.js"; -import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { Validation, Validation$inboundSchema } from "./validation.js"; + PushOperationChangeFromJSON, + PushOperationChangeFromJSONTyped, + PushOperationChangeToJSON, + PushOperationChangeToJSONTyped, +} from './pushoperationchange'; /** - * > **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting software. - * - * @remarks - * - * ## Overview - * - * Direct costs are money that leave the business without impacting Accounts Payable, and refunds associated with such transactions. - * - * 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 - * - * Direct costs is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction). - * - * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + * + * @export + * @interface AccountingCreateDirectCostResponse + */ +export interface AccountingCreateDirectCostResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateDirectCostResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateDirectCostResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateDirectCostResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateDirectCostResponseAllOfData} + * @memberof AccountingCreateDirectCostResponse + */ + data?: AccountingCreateDirectCostResponseAccountingDirectCost | null; +} + + +/** + * @export */ -export type AccountingCreateDirectCostResponseAccountingDirectCost = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier of the direct cost, unique for the company. - */ - id?: string | undefined; - /** - * User-friendly reference for the direct cost. - */ - reference?: string | null | undefined; - /** - * A note attached to the direct cost. - */ - note?: string | null | undefined; - contactRef?: ContactRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - issueDate: string; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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: string; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * An array of line items. - */ - lineItems: Array; - /** - * An array of payment allocations. - */ - paymentAllocations: Array; - /** - * The total amount of the direct costs, excluding any taxes. - */ - subTotal: Decimal$ | number; - /** - * The total amount of tax on the direct costs. - */ - taxAmount: Decimal$ | number; - /** - * The amount of the direct costs, inclusive of tax. - */ - totalAmount: Decimal$ | number; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; - metadata?: Metadata | undefined; -}; +export const AccountingCreateDirectCostResponseDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type AccountingCreateDirectCostResponseDataTypeEnum = typeof AccountingCreateDirectCostResponseDataTypeEnum[keyof typeof AccountingCreateDirectCostResponseDataTypeEnum]; + + +/** + * Check if a given object implements the AccountingCreateDirectCostResponse interface. + */ +export function instanceOfAccountingCreateDirectCostResponse(value: object): value is AccountingCreateDirectCostResponse { + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('pushOperationKey' in value) || value['pushOperationKey'] === undefined) return false; + if (!('dataConnectionKey' in value) || value['dataConnectionKey'] === undefined) return false; + if (!('requestedOnUtc' in value) || value['requestedOnUtc'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('statusCode' in value) || value['statusCode'] === undefined) return false; + return true; +} -export type AccountingCreateDirectCostResponse = { - data?: - | AccountingCreateDirectCostResponseAccountingDirectCost - | null - | undefined; - /** - * Contains a single entry that communicates which record has changed and the manner in which it changed. - */ - changes?: Array | null | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId: string; - /** - * 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. - */ - pushOperationKey: string; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionKey: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedOnUtc: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completedOnUtc?: string | undefined; - /** - * Number of minutes the push operation must complete within before it times out. - */ - timeoutInMinutes?: number | null | undefined; - /** - * Number of seconds the push operation must complete within before it times out. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - timeoutInSeconds?: number | null | undefined; - /** - * The current status of the push operation. - */ - status: PushOperationStatus; - /** - * A message about the error. - */ - errorMessage?: string | null | undefined; - /** - * 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. - */ - validation?: Validation | undefined; - /** - * Push status code. - */ - statusCode: number; -}; +export function AccountingCreateDirectCostResponseFromJSON(json: any): AccountingCreateDirectCostResponse { + return AccountingCreateDirectCostResponseFromJSONTyped(json, false); +} -/** @internal */ -export const AccountingCreateDirectCostResponseAccountingDirectCost$inboundSchema: - z.ZodType< - AccountingCreateDirectCostResponseAccountingDirectCost, - z.ZodTypeDef, - unknown - > = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - reference: z.nullable(z.string()).optional(), - note: z.nullable(z.string()).optional(), - contactRef: ContactRef$inboundSchema.optional(), - issueDate: z.string(), - currency: z.string(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - lineItems: z.array(DirectCostLineItem$inboundSchema), - paymentAllocations: z.array(AccountingPaymentAllocation$inboundSchema), - subTotal: z.number().transform(v => new Decimal$(v)), - taxAmount: z.number().transform(v => new Decimal$(v)), - totalAmount: z.number().transform(v => new Decimal$(v)), - supplementalData: SupplementalData$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), - }); +export function AccountingCreateDirectCostResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateDirectCostResponse { + if (json == null) { + return json; + } + return { + + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(PushOperationChangeFromJSON)), + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'companyId': json['companyId'], + 'pushOperationKey': json['pushOperationKey'], + 'dataConnectionKey': json['dataConnectionKey'], + 'requestedOnUtc': json['requestedOnUtc'], + 'completedOnUtc': json['completedOnUtc'] == null ? undefined : json['completedOnUtc'], + 'timeoutInMinutes': json['timeoutInMinutes'] == null ? undefined : json['timeoutInMinutes'], + 'timeoutInSeconds': json['timeoutInSeconds'] == null ? undefined : json['timeoutInSeconds'], + 'status': PushOperationStatusFromJSON(json['status']), + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'validation': json['validation'] == null ? undefined : ValidationFromJSON(json['validation']), + 'statusCode': json['statusCode'], + 'data': json['data'] == null ? undefined : AccountingCreateDirectCostResponseAllOfDataFromJSON(json['data']), + }; +} -export function accountingCreateDirectCostResponseAccountingDirectCostFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreateDirectCostResponseAccountingDirectCost, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreateDirectCostResponseAccountingDirectCost$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'AccountingCreateDirectCostResponseAccountingDirectCost' from JSON`, - ); +export function AccountingCreateDirectCostResponseToJSON(json: any): AccountingCreateDirectCostResponse { + return AccountingCreateDirectCostResponseToJSONTyped(json, false); } -/** @internal */ -export const AccountingCreateDirectCostResponse$inboundSchema: z.ZodType< - AccountingCreateDirectCostResponse, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.nullable( - z.lazy(() => - AccountingCreateDirectCostResponseAccountingDirectCost$inboundSchema - ), - ).optional(), - changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), - dataType: PropertieDataType$inboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$inboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$inboundSchema.optional(), - statusCode: z.number().int(), -}); +export function AccountingCreateDirectCostResponseToJSONTyped(value?: AccountingCreateDirectCostResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(PushOperationChangeToJSON)), + 'dataType': value['dataType'], + 'companyId': value['companyId'], + 'pushOperationKey': value['pushOperationKey'], + 'dataConnectionKey': value['dataConnectionKey'], + 'requestedOnUtc': value['requestedOnUtc'], + 'completedOnUtc': value['completedOnUtc'], + 'timeoutInMinutes': value['timeoutInMinutes'], + 'timeoutInSeconds': value['timeoutInSeconds'], + 'status': PushOperationStatusToJSON(value['status']), + 'errorMessage': value['errorMessage'], + 'validation': ValidationToJSON(value['validation']), + 'statusCode': value['statusCode'], + 'data': AccountingCreateDirectCostResponseAllOfDataToJSON(value['data']), + }; +} + + +export interface CreateDirectCostResponseAccountingCreateDirectCostResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateDirectCostResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateDirectCostResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateDirectCostResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateDirectCostResponseAllOfData} + * @memberof AccountingCreateDirectCostResponse + */ + data?: AccountingCreateDirectCostResponseAllOfData | null; +} -export function accountingCreateDirectCostResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - AccountingCreateDirectCostResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCreateDirectCostResponse' from JSON`, - ); +export interface DirectCostCreateResponseAccountingCreateDirectCostResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateDirectCostResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateDirectCostResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateDirectCostResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateDirectCostResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateDirectCostResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateDirectCostResponseAllOfData} + * @memberof AccountingCreateDirectCostResponse + */ + data?: AccountingCreateDirectCostResponseAllOfData | null; } diff --git a/lending/src/sdk/models/shared/accountingcreatepaymentresponse.ts b/lending/src/sdk/models/shared/accountingcreatepaymentresponse.ts index f27943bd6..3e1d2dd04 100644 --- a/lending/src/sdk/models/shared/accountingcreatepaymentresponse.ts +++ b/lending/src/sdk/models/shared/accountingcreatepaymentresponse.ts @@ -1,975 +1,561 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { AccountingCreatePaymentResponseAccountingPayment } from './accountingpayment'; +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +import type { Validation } from './validation'; import { - AccountingCustomerRef, - AccountingCustomerRef$inboundSchema, -} from "./accountingcustomerref.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; -import { PaymentLine, PaymentLine$inboundSchema } from "./paymentline.js"; + ValidationFromJSON, + ValidationFromJSONTyped, + ValidationToJSON, + ValidationToJSONTyped, +} from './validation'; +import type { PushOperationStatus } from './pushoperationstatus'; import { - PaymentMethodRef, - PaymentMethodRef$inboundSchema, -} from "./paymentmethodref.js"; + PushOperationStatusFromJSON, + PushOperationStatusFromJSONTyped, + PushOperationStatusToJSON, + PushOperationStatusToJSONTyped, +} from './pushoperationstatus'; +import type { AccountingCreatePaymentResponseAllOfData } from '../AccountingCreatePaymentResponseAllOfData'; import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; + AccountingCreatePaymentResponseAllOfDataFromJSON, + AccountingCreatePaymentResponseAllOfDataFromJSONTyped, + AccountingCreatePaymentResponseAllOfDataToJSON, + AccountingCreatePaymentResponseAllOfDataToJSONTyped, +} from '../AccountingCreatePaymentResponseAllOfData'; +import type { PushOperationChange } from './pushoperationchange'; import { - PushOperationChange, - PushOperationChange$inboundSchema, -} from "./pushoperationchange.js"; -import { - PushOperationStatus, - PushOperationStatus$inboundSchema, -} from "./pushoperationstatus.js"; -import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { Validation, Validation$inboundSchema } from "./validation.js"; + PushOperationChangeFromJSON, + PushOperationChangeFromJSONTyped, + PushOperationChangeToJSON, + PushOperationChangeToJSONTyped, +} from './pushoperationchange'; /** - * > **Payments or bill payments?** - * - * @remarks - * > - * > In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/lending-api#/schemas/Bill) and credit notes against bills. - * - * ## Overview - * - * Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-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 software, 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/lending-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 software 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 - * } - * ] - * } - * ] - * } - * ``` - * - * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + * + * @export + * @interface AccountingCreatePaymentResponse */ -export type AccountingCreatePaymentResponseAccountingPayment = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the payment, unique to the company in the accounting software. - */ - id?: string | undefined; - customerRef?: AccountingCustomerRef | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * The payment method the record is linked to in the accounting or commerce software. - */ - paymentMethodRef?: PaymentMethodRef | undefined; - /** - * 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. - */ - totalAmount?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date: string; - /** - * Any additional information associated with the payment. - */ - note?: string | null | undefined; - /** - * An array of payment lines. - */ - lines?: Array | null | undefined; - /** - * Friendly reference for the payment. - */ - reference?: string | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export interface AccountingCreatePaymentResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreatePaymentResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreatePaymentResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreatePaymentResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreatePaymentResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreatePaymentResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreatePaymentResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreatePaymentResponseAllOfData} + * @memberof AccountingCreatePaymentResponse + */ + data?: AccountingCreatePaymentResponseAccountingPayment | null; +} + -export type AccountingCreatePaymentResponse = { - data?: AccountingCreatePaymentResponseAccountingPayment | null | undefined; - /** - * Contains a single entry that communicates which record has changed and the manner in which it changed. - */ - changes?: Array | null | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId: string; - /** - * 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. - */ - pushOperationKey: string; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionKey: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedOnUtc: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completedOnUtc?: string | undefined; - /** - * Number of minutes the push operation must complete within before it times out. - */ - timeoutInMinutes?: number | null | undefined; - /** - * Number of seconds the push operation must complete within before it times out. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - timeoutInSeconds?: number | null | undefined; - /** - * The current status of the push operation. - */ - status: PushOperationStatus; - /** - * A message about the error. - */ - errorMessage?: string | null | undefined; - /** - * 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. - */ - validation?: Validation | undefined; - /** - * Push status code. - */ - statusCode: number; -}; +/** + * @export + */ +export const AccountingCreatePaymentResponseDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type AccountingCreatePaymentResponseDataTypeEnum = typeof AccountingCreatePaymentResponseDataTypeEnum[keyof typeof AccountingCreatePaymentResponseDataTypeEnum]; -/** @internal */ -export const AccountingCreatePaymentResponseAccountingPayment$inboundSchema: - z.ZodType< - AccountingCreatePaymentResponseAccountingPayment, - z.ZodTypeDef, - unknown - > = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - customerRef: AccountingCustomerRef$inboundSchema.optional(), - accountRef: AccountRef$inboundSchema.optional(), - paymentMethodRef: PaymentMethodRef$inboundSchema.optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - date: z.string(), - note: z.nullable(z.string()).optional(), - lines: z.nullable(z.array(PaymentLine$inboundSchema)).optional(), - reference: z.nullable(z.string()).optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - }); -export function accountingCreatePaymentResponseAccountingPaymentFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreatePaymentResponseAccountingPayment, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreatePaymentResponseAccountingPayment$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AccountingCreatePaymentResponseAccountingPayment' from JSON`, - ); +/** + * Check if a given object implements the AccountingCreatePaymentResponse interface. + */ +export function instanceOfAccountingCreatePaymentResponse(value: object): value is AccountingCreatePaymentResponse { + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('pushOperationKey' in value) || value['pushOperationKey'] === undefined) return false; + if (!('dataConnectionKey' in value) || value['dataConnectionKey'] === undefined) return false; + if (!('requestedOnUtc' in value) || value['requestedOnUtc'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('statusCode' in value) || value['statusCode'] === undefined) return false; + return true; } -/** @internal */ -export const AccountingCreatePaymentResponse$inboundSchema: z.ZodType< - AccountingCreatePaymentResponse, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.nullable( - z.lazy(() => - AccountingCreatePaymentResponseAccountingPayment$inboundSchema - ), - ).optional(), - changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), - dataType: PropertieDataType$inboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$inboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$inboundSchema.optional(), - statusCode: z.number().int(), -}); +export function AccountingCreatePaymentResponseFromJSON(json: any): AccountingCreatePaymentResponse { + return AccountingCreatePaymentResponseFromJSONTyped(json, false); +} + +export function AccountingCreatePaymentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreatePaymentResponse { + if (json == null) { + return json; + } + return { + + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(PushOperationChangeFromJSON)), + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'companyId': json['companyId'], + 'pushOperationKey': json['pushOperationKey'], + 'dataConnectionKey': json['dataConnectionKey'], + 'requestedOnUtc': json['requestedOnUtc'], + 'completedOnUtc': json['completedOnUtc'] == null ? undefined : json['completedOnUtc'], + 'timeoutInMinutes': json['timeoutInMinutes'] == null ? undefined : json['timeoutInMinutes'], + 'timeoutInSeconds': json['timeoutInSeconds'] == null ? undefined : json['timeoutInSeconds'], + 'status': PushOperationStatusFromJSON(json['status']), + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'validation': json['validation'] == null ? undefined : ValidationFromJSON(json['validation']), + 'statusCode': json['statusCode'], + 'data': json['data'] == null ? undefined : AccountingCreatePaymentResponseAllOfDataFromJSON(json['data']), + }; +} + +export function AccountingCreatePaymentResponseToJSON(json: any): AccountingCreatePaymentResponse { + return AccountingCreatePaymentResponseToJSONTyped(json, false); +} + +export function AccountingCreatePaymentResponseToJSONTyped(value?: AccountingCreatePaymentResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(PushOperationChangeToJSON)), + 'dataType': value['dataType'], + 'companyId': value['companyId'], + 'pushOperationKey': value['pushOperationKey'], + 'dataConnectionKey': value['dataConnectionKey'], + 'requestedOnUtc': value['requestedOnUtc'], + 'completedOnUtc': value['completedOnUtc'], + 'timeoutInMinutes': value['timeoutInMinutes'], + 'timeoutInSeconds': value['timeoutInSeconds'], + 'status': PushOperationStatusToJSON(value['status']), + 'errorMessage': value['errorMessage'], + 'validation': ValidationToJSON(value['validation']), + 'statusCode': value['statusCode'], + 'data': AccountingCreatePaymentResponseAllOfDataToJSON(value['data']), + }; +} + + +export interface CreatePaymentResponseAccountingCreatePaymentResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreatePaymentResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreatePaymentResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreatePaymentResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreatePaymentResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreatePaymentResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreatePaymentResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreatePaymentResponseAllOfData} + * @memberof AccountingCreatePaymentResponse + */ + data?: AccountingCreatePaymentResponseAllOfData | null; +} -export function accountingCreatePaymentResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCreatePaymentResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCreatePaymentResponse' from JSON`, - ); +export interface PaymentCreateResponseAccountingCreatePaymentResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreatePaymentResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreatePaymentResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreatePaymentResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreatePaymentResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreatePaymentResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreatePaymentResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreatePaymentResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreatePaymentResponseAllOfData} + * @memberof AccountingCreatePaymentResponse + */ + data?: AccountingCreatePaymentResponseAllOfData | null; } diff --git a/lending/src/sdk/models/shared/accountingcreatesupplierresponse.ts b/lending/src/sdk/models/shared/accountingcreatesupplierresponse.ts index db9752e87..7195e2b1b 100644 --- a/lending/src/sdk/models/shared/accountingcreatesupplierresponse.ts +++ b/lending/src/sdk/models/shared/accountingcreatesupplierresponse.ts @@ -1,266 +1,561 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AccountingAddress, - AccountingAddress$inboundSchema, -} from "./accountingaddress.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; +import type { AccountingCreateSupplierResponseAccountingSupplier } from './accountingsupplier'; +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +import type { Validation } from './validation'; import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; + ValidationFromJSON, + ValidationFromJSONTyped, + ValidationToJSON, + ValidationToJSONTyped, +} from './validation'; +import type { PushOperationStatus } from './pushoperationstatus'; import { - PushOperationChange, - PushOperationChange$inboundSchema, -} from "./pushoperationchange.js"; + PushOperationStatusFromJSON, + PushOperationStatusFromJSONTyped, + PushOperationStatusToJSON, + PushOperationStatusToJSONTyped, +} from './pushoperationstatus'; +import type { AccountingCreateSupplierResponseAllOfData } from '../AccountingCreateSupplierResponseAllOfData'; import { - PushOperationStatus, - PushOperationStatus$inboundSchema, -} from "./pushoperationstatus.js"; + AccountingCreateSupplierResponseAllOfDataFromJSON, + AccountingCreateSupplierResponseAllOfDataFromJSONTyped, + AccountingCreateSupplierResponseAllOfDataToJSON, + AccountingCreateSupplierResponseAllOfDataToJSONTyped, +} from '../AccountingCreateSupplierResponseAllOfData'; +import type { PushOperationChange } from './pushoperationchange'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; -import { - SupplierStatus, - SupplierStatus$inboundSchema, -} from "./supplierstatus.js"; -import { Validation, Validation$inboundSchema } from "./validation.js"; + PushOperationChangeFromJSON, + PushOperationChangeFromJSONTyped, + PushOperationChangeToJSON, + PushOperationChangeToJSONTyped, +} from './pushoperationchange'; /** - * ## Overview - * - * @remarks - * - * From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/lending-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/lending-api#/schemas/Bill). - * - * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + * + * @export + * @interface AccountingCreateSupplierResponse */ -export type AccountingCreateSupplierResponseAccountingSupplier = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the supplier, unique to the company in the accounting software. - */ - id?: string | undefined; - /** - * Name of the supplier as recorded in the accounting system, typically the company name. - */ - supplierName?: string | null | undefined; - /** - * Name of the main contact for the supplier. - */ - contactName?: string | null | undefined; - /** - * Email address that the supplier may be contacted on. - */ - emailAddress?: string | null | undefined; - /** - * Phone number that the supplier may be contacted on. - */ - phone?: string | null | undefined; - /** - * An array of Addresses. - */ - addresses?: Array | null | undefined; - /** - * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. - */ - registrationNumber?: string | null | undefined; - /** - * Supplier's company tax number. - */ - taxNumber?: string | null | undefined; - /** - * Status of the supplier. - */ - status: SupplierStatus; - /** - * Default currency the supplier's transactional data is recorded in. - */ - defaultCurrency?: string | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export interface AccountingCreateSupplierResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateSupplierResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateSupplierResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateSupplierResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateSupplierResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateSupplierResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateSupplierResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateSupplierResponseAllOfData} + * @memberof AccountingCreateSupplierResponse + */ + data?: AccountingCreateSupplierResponseAccountingSupplier | null; +} + -export type AccountingCreateSupplierResponse = { - data?: AccountingCreateSupplierResponseAccountingSupplier | null | undefined; - /** - * Contains a single entry that communicates which record has changed and the manner in which it changed. - */ - changes?: Array | null | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId: string; - /** - * 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. - */ - pushOperationKey: string; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionKey: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedOnUtc: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completedOnUtc?: string | undefined; - /** - * Number of minutes the push operation must complete within before it times out. - */ - timeoutInMinutes?: number | null | undefined; - /** - * Number of seconds the push operation must complete within before it times out. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - timeoutInSeconds?: number | null | undefined; - /** - * The current status of the push operation. - */ - status: PushOperationStatus; - /** - * A message about the error. - */ - errorMessage?: string | null | undefined; - /** - * 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. - */ - validation?: Validation | undefined; - /** - * Push status code. - */ - statusCode: number; -}; +/** + * @export + */ +export const AccountingCreateSupplierResponseDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type AccountingCreateSupplierResponseDataTypeEnum = typeof AccountingCreateSupplierResponseDataTypeEnum[keyof typeof AccountingCreateSupplierResponseDataTypeEnum]; -/** @internal */ -export const AccountingCreateSupplierResponseAccountingSupplier$inboundSchema: - z.ZodType< - AccountingCreateSupplierResponseAccountingSupplier, - z.ZodTypeDef, - unknown - > = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - supplierName: z.nullable(z.string()).optional(), - contactName: z.nullable(z.string()).optional(), - emailAddress: z.nullable(z.string()).optional(), - phone: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(AccountingAddress$inboundSchema)).optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - status: SupplierStatus$inboundSchema, - defaultCurrency: z.nullable(z.string()).optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - }); -export function accountingCreateSupplierResponseAccountingSupplierFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreateSupplierResponseAccountingSupplier, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreateSupplierResponseAccountingSupplier$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AccountingCreateSupplierResponseAccountingSupplier' from JSON`, - ); +/** + * Check if a given object implements the AccountingCreateSupplierResponse interface. + */ +export function instanceOfAccountingCreateSupplierResponse(value: object): value is AccountingCreateSupplierResponse { + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('pushOperationKey' in value) || value['pushOperationKey'] === undefined) return false; + if (!('dataConnectionKey' in value) || value['dataConnectionKey'] === undefined) return false; + if (!('requestedOnUtc' in value) || value['requestedOnUtc'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('statusCode' in value) || value['statusCode'] === undefined) return false; + return true; +} + +export function AccountingCreateSupplierResponseFromJSON(json: any): AccountingCreateSupplierResponse { + return AccountingCreateSupplierResponseFromJSONTyped(json, false); +} + +export function AccountingCreateSupplierResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateSupplierResponse { + if (json == null) { + return json; + } + return { + + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(PushOperationChangeFromJSON)), + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'companyId': json['companyId'], + 'pushOperationKey': json['pushOperationKey'], + 'dataConnectionKey': json['dataConnectionKey'], + 'requestedOnUtc': json['requestedOnUtc'], + 'completedOnUtc': json['completedOnUtc'] == null ? undefined : json['completedOnUtc'], + 'timeoutInMinutes': json['timeoutInMinutes'] == null ? undefined : json['timeoutInMinutes'], + 'timeoutInSeconds': json['timeoutInSeconds'] == null ? undefined : json['timeoutInSeconds'], + 'status': PushOperationStatusFromJSON(json['status']), + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'validation': json['validation'] == null ? undefined : ValidationFromJSON(json['validation']), + 'statusCode': json['statusCode'], + 'data': json['data'] == null ? undefined : AccountingCreateSupplierResponseAllOfDataFromJSON(json['data']), + }; +} + +export function AccountingCreateSupplierResponseToJSON(json: any): AccountingCreateSupplierResponse { + return AccountingCreateSupplierResponseToJSONTyped(json, false); +} + +export function AccountingCreateSupplierResponseToJSONTyped(value?: AccountingCreateSupplierResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(PushOperationChangeToJSON)), + 'dataType': value['dataType'], + 'companyId': value['companyId'], + 'pushOperationKey': value['pushOperationKey'], + 'dataConnectionKey': value['dataConnectionKey'], + 'requestedOnUtc': value['requestedOnUtc'], + 'completedOnUtc': value['completedOnUtc'], + 'timeoutInMinutes': value['timeoutInMinutes'], + 'timeoutInSeconds': value['timeoutInSeconds'], + 'status': PushOperationStatusToJSON(value['status']), + 'errorMessage': value['errorMessage'], + 'validation': ValidationToJSON(value['validation']), + 'statusCode': value['statusCode'], + 'data': AccountingCreateSupplierResponseAllOfDataToJSON(value['data']), + }; } -/** @internal */ -export const AccountingCreateSupplierResponse$inboundSchema: z.ZodType< - AccountingCreateSupplierResponse, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.nullable( - z.lazy(() => - AccountingCreateSupplierResponseAccountingSupplier$inboundSchema - ), - ).optional(), - changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), - dataType: PropertieDataType$inboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$inboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$inboundSchema.optional(), - statusCode: z.number().int(), -}); -export function accountingCreateSupplierResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCreateSupplierResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCreateSupplierResponse' from JSON`, - ); +export interface CreateSupplierResponseAccountingCreateSupplierResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateSupplierResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateSupplierResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateSupplierResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateSupplierResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateSupplierResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateSupplierResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateSupplierResponseAllOfData} + * @memberof AccountingCreateSupplierResponse + */ + data?: AccountingCreateSupplierResponseAllOfData | null; +} + +export interface SupplierCreateResponseAccountingCreateSupplierResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateSupplierResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateSupplierResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateSupplierResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateSupplierResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateSupplierResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateSupplierResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateSupplierResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateSupplierResponseAllOfData} + * @memberof AccountingCreateSupplierResponse + */ + data?: AccountingCreateSupplierResponseAllOfData | null; } diff --git a/lending/src/sdk/models/shared/accountingcreatetransferresponse.ts b/lending/src/sdk/models/shared/accountingcreatetransferresponse.ts index d8ea02e5d..e7d8ebeb5 100644 --- a/lending/src/sdk/models/shared/accountingcreatetransferresponse.ts +++ b/lending/src/sdk/models/shared/accountingcreatetransferresponse.ts @@ -1,303 +1,561 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AccountingRecordRef, - AccountingRecordRef$inboundSchema, -} from "./accountingrecordref.js"; -import { ContactRef, ContactRef$inboundSchema } from "./contactref.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; -import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; +import type { AccountingCreateTransferResponseAccountingTransfer } from './accountingtransfer'; +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +import type { Validation } from './validation'; import { - PushOperationChange, - PushOperationChange$inboundSchema, -} from "./pushoperationchange.js"; + ValidationFromJSON, + ValidationFromJSONTyped, + ValidationToJSON, + ValidationToJSONTyped, +} from './validation'; +import type { PushOperationStatus } from './pushoperationstatus'; import { - PushOperationStatus, - PushOperationStatus$inboundSchema, -} from "./pushoperationstatus.js"; + PushOperationStatusFromJSON, + PushOperationStatusFromJSONTyped, + PushOperationStatusToJSON, + PushOperationStatusToJSONTyped, +} from './pushoperationstatus'; +import type { AccountingCreateTransferResponseAllOfData } from '../AccountingCreateTransferResponseAllOfData'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + AccountingCreateTransferResponseAllOfDataFromJSON, + AccountingCreateTransferResponseAllOfDataFromJSONTyped, + AccountingCreateTransferResponseAllOfDataToJSON, + AccountingCreateTransferResponseAllOfDataToJSONTyped, +} from '../AccountingCreateTransferResponseAllOfData'; +import type { PushOperationChange } from './pushoperationchange'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, -} from "./trackingcategoryref.js"; -import { - TransferAccount, - TransferAccount$inboundSchema, -} from "./transferaccount.js"; -import { Validation, Validation$inboundSchema } from "./validation.js"; + PushOperationChangeFromJSON, + PushOperationChangeFromJSONTyped, + PushOperationChangeToJSON, + PushOperationChangeToJSONTyped, +} from './pushoperationchange'; /** - * The status of the transfer in the account + * + * @export + * @interface AccountingCreateTransferResponse */ -export const AccountingCreateTransferResponseStatus = { - Unknown: "Unknown", - Unreconciled: "Unreconciled", - Reconciled: "Reconciled", - Void: "Void", -} as const; +export interface AccountingCreateTransferResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateTransferResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateTransferResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateTransferResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateTransferResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateTransferResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateTransferResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateTransferResponseAllOfData} + * @memberof AccountingCreateTransferResponse + */ + data?: AccountingCreateTransferResponseAccountingTransfer | null; +} + + /** - * The status of the transfer in the account + * @export */ -export type AccountingCreateTransferResponseStatus = ClosedEnum< - typeof AccountingCreateTransferResponseStatus ->; +export const AccountingCreateTransferResponseDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type AccountingCreateTransferResponseDataTypeEnum = typeof AccountingCreateTransferResponseDataTypeEnum[keyof typeof AccountingCreateTransferResponseDataTypeEnum]; + /** - * 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/lending-api#/schemas/AccountTransaction). - * - * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + * Check if a given object implements the AccountingCreateTransferResponse interface. */ -export type AccountingCreateTransferResponseAccountingTransfer = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Unique identifier for the transfer. - */ - id?: string | undefined; - /** - * Description of the transfer. - */ - description?: string | null | undefined; - contactRef?: ContactRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * Account details of the account sending or receiving the transfer. - */ - from?: TransferAccount | undefined; - /** - * Account details of the account sending or receiving the transfer. - */ - to?: TransferAccount | undefined; - /** - * The status of the transfer in the account - */ - status?: AccountingCreateTransferResponseStatus | null | undefined; - /** - * Reference to the tracking categories this transfer is being tracked against. - */ - trackingCategoryRefs?: Array | null | undefined; - /** - * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. - */ - depositedRecordRefs?: Array | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export function instanceOfAccountingCreateTransferResponse(value: object): value is AccountingCreateTransferResponse { + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('pushOperationKey' in value) || value['pushOperationKey'] === undefined) return false; + if (!('dataConnectionKey' in value) || value['dataConnectionKey'] === undefined) return false; + if (!('requestedOnUtc' in value) || value['requestedOnUtc'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('statusCode' in value) || value['statusCode'] === undefined) return false; + return true; +} + +export function AccountingCreateTransferResponseFromJSON(json: any): AccountingCreateTransferResponse { + return AccountingCreateTransferResponseFromJSONTyped(json, false); +} -export type AccountingCreateTransferResponse = { - data?: AccountingCreateTransferResponseAccountingTransfer | null | undefined; - /** - * Contains a single entry that communicates which record has changed and the manner in which it changed. - */ - changes?: Array | null | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId: string; - /** - * 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. - */ - pushOperationKey: string; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionKey: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedOnUtc: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completedOnUtc?: string | undefined; - /** - * Number of minutes the push operation must complete within before it times out. - */ - timeoutInMinutes?: number | null | undefined; - /** - * Number of seconds the push operation must complete within before it times out. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - timeoutInSeconds?: number | null | undefined; - /** - * The current status of the push operation. - */ - status: PushOperationStatus; - /** - * A message about the error. - */ - errorMessage?: string | null | undefined; - /** - * 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. - */ - validation?: Validation | undefined; - /** - * Push status code. - */ - statusCode: number; -}; +export function AccountingCreateTransferResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreateTransferResponse { + if (json == null) { + return json; + } + return { + + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(PushOperationChangeFromJSON)), + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'companyId': json['companyId'], + 'pushOperationKey': json['pushOperationKey'], + 'dataConnectionKey': json['dataConnectionKey'], + 'requestedOnUtc': json['requestedOnUtc'], + 'completedOnUtc': json['completedOnUtc'] == null ? undefined : json['completedOnUtc'], + 'timeoutInMinutes': json['timeoutInMinutes'] == null ? undefined : json['timeoutInMinutes'], + 'timeoutInSeconds': json['timeoutInSeconds'] == null ? undefined : json['timeoutInSeconds'], + 'status': PushOperationStatusFromJSON(json['status']), + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'validation': json['validation'] == null ? undefined : ValidationFromJSON(json['validation']), + 'statusCode': json['statusCode'], + 'data': json['data'] == null ? undefined : AccountingCreateTransferResponseAllOfDataFromJSON(json['data']), + }; +} -/** @internal */ -export const AccountingCreateTransferResponseStatus$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - AccountingCreateTransferResponseStatus, - ); +export function AccountingCreateTransferResponseToJSON(json: any): AccountingCreateTransferResponse { + return AccountingCreateTransferResponseToJSONTyped(json, false); +} -/** @internal */ -export const AccountingCreateTransferResponseAccountingTransfer$inboundSchema: - z.ZodType< - AccountingCreateTransferResponseAccountingTransfer, - z.ZodTypeDef, - unknown - > = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - description: z.nullable(z.string()).optional(), - contactRef: ContactRef$inboundSchema.optional(), - date: z.string().optional(), - from: TransferAccount$inboundSchema.optional(), - to: TransferAccount$inboundSchema.optional(), - status: z.nullable(AccountingCreateTransferResponseStatus$inboundSchema) - .optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) - .optional(), - depositedRecordRefs: z.nullable(z.array(AccountingRecordRef$inboundSchema)) - .optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - }); +export function AccountingCreateTransferResponseToJSONTyped(value?: AccountingCreateTransferResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function accountingCreateTransferResponseAccountingTransferFromJSON( - jsonString: string, -): SafeParseResult< - AccountingCreateTransferResponseAccountingTransfer, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AccountingCreateTransferResponseAccountingTransfer$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AccountingCreateTransferResponseAccountingTransfer' from JSON`, - ); + return { + + 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(PushOperationChangeToJSON)), + 'dataType': value['dataType'], + 'companyId': value['companyId'], + 'pushOperationKey': value['pushOperationKey'], + 'dataConnectionKey': value['dataConnectionKey'], + 'requestedOnUtc': value['requestedOnUtc'], + 'completedOnUtc': value['completedOnUtc'], + 'timeoutInMinutes': value['timeoutInMinutes'], + 'timeoutInSeconds': value['timeoutInSeconds'], + 'status': PushOperationStatusToJSON(value['status']), + 'errorMessage': value['errorMessage'], + 'validation': ValidationToJSON(value['validation']), + 'statusCode': value['statusCode'], + 'data': AccountingCreateTransferResponseAllOfDataToJSON(value['data']), + }; } -/** @internal */ -export const AccountingCreateTransferResponse$inboundSchema: z.ZodType< - AccountingCreateTransferResponse, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.nullable( - z.lazy(() => - AccountingCreateTransferResponseAccountingTransfer$inboundSchema - ), - ).optional(), - changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), - dataType: PropertieDataType$inboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$inboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$inboundSchema.optional(), - statusCode: z.number().int(), -}); -export function accountingCreateTransferResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCreateTransferResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCreateTransferResponse' from JSON`, - ); +export interface CreateTransferResponseAccountingCreateTransferResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateTransferResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateTransferResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateTransferResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateTransferResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateTransferResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateTransferResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateTransferResponseAllOfData} + * @memberof AccountingCreateTransferResponse + */ + data?: AccountingCreateTransferResponseAllOfData | null; +} + +export interface TransferCreateResponseAccountingCreateTransferResponse { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof AccountingCreateTransferResponse + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateTransferResponse + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof AccountingCreateTransferResponse + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof AccountingCreateTransferResponse + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof AccountingCreateTransferResponse + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof AccountingCreateTransferResponse + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof AccountingCreateTransferResponse + */ + statusCode: number; + /** + * + * @type {AccountingCreateTransferResponseAllOfData} + * @memberof AccountingCreateTransferResponse + */ + data?: AccountingCreateTransferResponseAllOfData | null; } diff --git a/lending/src/sdk/models/shared/accountingcreditnote.ts b/lending/src/sdk/models/shared/accountingcreditnote.ts index 5a876675c..01971c332 100644 --- a/lending/src/sdk/models/shared/accountingcreditnote.ts +++ b/lending/src/sdk/models/shared/accountingcreditnote.ts @@ -1,252 +1,1575 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { CreditNoteStatus } from './creditnotestatus'; +import { + CreditNoteStatusFromJSON, + CreditNoteStatusFromJSONTyped, + CreditNoteStatusToJSON, + CreditNoteStatusToJSONTyped, +} from './creditnotestatus'; +import type { AccountingCustomerRef } from './accountingcustomerref'; +import { + AccountingCustomerRefFromJSON, + AccountingCustomerRefFromJSONTyped, + AccountingCustomerRefToJSON, + AccountingCustomerRefToJSONTyped, +} from './accountingcustomerref'; +import type { SupplementalData } from './supplementaldata'; import { - AccountingCustomerRef, - AccountingCustomerRef$inboundSchema, -} from "./accountingcustomerref.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { Metadata } from './metadata'; import { - AccountingPaymentAllocation, - AccountingPaymentAllocation$inboundSchema, -} from "./accountingpaymentallocation.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { CreditNoteLineItem } from './creditnotelineitem'; import { - CreditNoteLineItem, - CreditNoteLineItem$inboundSchema, -} from "./creditnotelineitem.js"; + CreditNoteLineItemFromJSON, + CreditNoteLineItemFromJSONTyped, + CreditNoteLineItemToJSON, + CreditNoteLineItemToJSONTyped, +} from './creditnotelineitem'; +import type { Items } from './items'; import { - CreditNoteStatus, - CreditNoteStatus$inboundSchema, -} from "./creditnotestatus.js"; -import { Items, Items$inboundSchema } from "./items.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + ItemsFromJSON, + ItemsFromJSONTyped, + ItemsToJSON, + ItemsToJSONTyped, +} from './items'; +import type { AccountingPaymentAllocation } from './accountingpaymentallocation'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + AccountingPaymentAllocationFromJSON, + AccountingPaymentAllocationFromJSONTyped, + AccountingPaymentAllocationToJSON, + AccountingPaymentAllocationToJSONTyped, +} from './accountingpaymentallocation'; /** * ## Overview - * - * @remarks - * + * * 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/lending-api#/schemas/Customer) accounts receivable. - * + * + * In the Codat system a credit note is issued to a [customer's](https://docs.codat.io/lending-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. + * @export + * @interface AccountingCreditNote */ -export type AccountingCreditNote = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the credit note, unique to the company in the accounting software. - */ - id?: string | undefined; - /** - * Friendly reference for the credit note. - */ - creditNoteNumber?: string | null | undefined; - customerRef?: AccountingCustomerRef | undefined; - withholdingTax?: Array | null | undefined; - /** - * Total amount of credit that has been applied to the customer's accounts receivable - */ - totalAmount: Decimal$ | number; - /** - * Any discounts applied to the credit note amount. - */ - totalDiscount: Decimal$ | number; - /** - * Value of the credit note, including discounts and excluding tax. - */ - subTotal: Decimal$ | number; - /** - * Additional tax amount applied to credit note. - */ - additionalTaxAmount?: Decimal$ | number | undefined; - /** - * Percentage rate of any additional tax applied to the credit note. - */ - additionalTaxPercentage?: Decimal$ | number | undefined; - /** - * Any tax applied to the credit note amount. - */ - totalTaxAmount: Decimal$ | number; - /** - * Percentage rate (from 0 to 100) of discounts applied to the credit note. - */ - discountPercentage: Decimal$ | number; - /** - * Unused balance of totalAmount originally raised. - */ - remainingCredit: Decimal$ | number; - /** - * Current state of the credit note. - */ - status: CreditNoteStatus; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - issueDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - allocatedOnDate?: string | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - lineItems?: Array | null | undefined; - /** - * An array of payment allocations. - */ - paymentAllocations?: Array | null | undefined; - /** - * Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. - */ - note?: string | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; - -/** @internal */ -export const AccountingCreditNote$inboundSchema: z.ZodType< - AccountingCreditNote, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - creditNoteNumber: z.nullable(z.string()).optional(), - customerRef: AccountingCustomerRef$inboundSchema.optional(), - withholdingTax: z.nullable(z.array(Items$inboundSchema)).optional(), - totalAmount: z.number().transform(v => new Decimal$(v)), - totalDiscount: z.number().transform(v => new Decimal$(v)), - subTotal: z.number().transform(v => new Decimal$(v)), - additionalTaxAmount: z.number().transform(v => new Decimal$(v)).optional(), - additionalTaxPercentage: z.number().transform(v => new Decimal$(v)) - .optional(), - totalTaxAmount: z.number().transform(v => new Decimal$(v)), - discountPercentage: z.number().transform(v => new Decimal$(v)), - remainingCredit: z.number().transform(v => new Decimal$(v)), - status: CreditNoteStatus$inboundSchema, - issueDate: z.string().optional(), - allocatedOnDate: z.string().optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - lineItems: z.nullable(z.array(CreditNoteLineItem$inboundSchema)).optional(), - paymentAllocations: z.nullable( - z.array(AccountingPaymentAllocation$inboundSchema), - ).optional(), - note: z.nullable(z.string()).optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); - -export function accountingCreditNoteFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCreditNote$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCreditNote' from JSON`, - ); +export interface AccountingCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the credit note, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCreditNote + */ + id?: string; + /** + * Friendly reference for the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + creditNoteNumber?: string | null; + /** + * Reference to the customer the credit note has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingCreditNote + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the customer's accounts receivable + * @type {string} + * @memberof AccountingCreditNote + */ + totalAmount: Decimal | number; + /** + * Any discounts applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalDiscount: Decimal | number; + /** + * Value of the credit note, including discounts and excluding tax. + * @type {string} + * @memberof AccountingCreditNote + */ + subTotal: Decimal | number; + /** + * Additional tax amount applied to credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxPercentage?: Decimal | number; + /** + * Any tax applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate (from 0 to 100) of discounts applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + discountPercentage: Decimal | number; + /** + * Unused balance of totalAmount originally raised. + * @type {string} + * @memberof AccountingCreditNote + */ + remainingCredit: Decimal | number; + /** + * Current state of the credit note. + * @type {CreditNoteStatus} + * @memberof AccountingCreditNote + */ + status: CreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingCreditNote + */ + paymentAllocations?: Array | null; + /** + * Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingCreditNote + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreditNote + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreditNote + */ + supplementalData?: SupplementalData; +} + + + +/** + * Check if a given object implements the AccountingCreditNote interface. + */ +export function instanceOfAccountingCreditNote(value: object): value is AccountingCreditNote { + if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false; + if (!('totalDiscount' in value) || value['totalDiscount'] === undefined) return false; + if (!('subTotal' in value) || value['subTotal'] === undefined) return false; + if (!('totalTaxAmount' in value) || value['totalTaxAmount'] === undefined) return false; + if (!('discountPercentage' in value) || value['discountPercentage'] === undefined) return false; + if (!('remainingCredit' in value) || value['remainingCredit'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} + +export function AccountingCreditNoteFromJSON(json: any): AccountingCreditNote { + return AccountingCreditNoteFromJSONTyped(json, false); +} + +export function AccountingCreditNoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreditNote { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'creditNoteNumber': json['creditNoteNumber'] == null ? undefined : json['creditNoteNumber'], + 'customerRef': json['customerRef'] == null ? undefined : AccountingCustomerRefFromJSON(json['customerRef']), + 'withholdingTax': json['withholdingTax'] == null ? undefined : ((json['withholdingTax'] as Array).map(ItemsFromJSON)), + 'totalAmount': json['totalAmount'], + 'totalDiscount': json['totalDiscount'], + 'subTotal': json['subTotal'], + 'additionalTaxAmount': json['additionalTaxAmount'] == null ? undefined : toDecimal(json['additionalTaxAmount']), + 'additionalTaxPercentage': json['additionalTaxPercentage'] == null ? undefined : toDecimal(json['additionalTaxPercentage']), + 'totalTaxAmount': json['totalTaxAmount'], + 'discountPercentage': json['discountPercentage'], + 'remainingCredit': json['remainingCredit'], + 'status': CreditNoteStatusFromJSON(json['status']), + 'issueDate': json['issueDate'] == null ? undefined : json['issueDate'], + 'allocatedOnDate': json['allocatedOnDate'] == null ? undefined : json['allocatedOnDate'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lineItems': json['lineItems'] == null ? undefined : ((json['lineItems'] as Array).map(CreditNoteLineItemFromJSON)), + 'paymentAllocations': json['paymentAllocations'] == null ? undefined : ((json['paymentAllocations'] as Array).map(AccountingPaymentAllocationFromJSON)), + 'note': json['note'] == null ? undefined : json['note'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingCreditNoteToJSON(json: any): AccountingCreditNote { + return AccountingCreditNoteToJSONTyped(json, false); +} + +export function AccountingCreditNoteToJSONTyped(value?: AccountingCreditNote | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'creditNoteNumber': value['creditNoteNumber'], + 'customerRef': AccountingCustomerRefToJSON(value['customerRef']), + 'withholdingTax': value['withholdingTax'] == null ? undefined : ((value['withholdingTax'] as Array).map(ItemsToJSON)), + 'totalAmount': fromDecimal(value['totalAmount']), + 'totalDiscount': fromDecimal(value['totalDiscount']), + 'subTotal': fromDecimal(value['subTotal']), + 'additionalTaxAmount': fromDecimal(value['additionalTaxAmount']), + 'additionalTaxPercentage': fromDecimal(value['additionalTaxPercentage']), + 'totalTaxAmount': fromDecimal(value['totalTaxAmount']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'remainingCredit': fromDecimal(value['remainingCredit']), + 'status': CreditNoteStatusToJSON(value['status']), + 'issueDate': value['issueDate'], + 'allocatedOnDate': value['allocatedOnDate'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lineItems': value['lineItems'] == null ? undefined : ((value['lineItems'] as Array).map(CreditNoteLineItemToJSON)), + 'paymentAllocations': value['paymentAllocations'] == null ? undefined : ((value['paymentAllocations'] as Array).map(AccountingPaymentAllocationToJSON)), + 'note': value['note'], + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingCreditNoteGetResponseAccountingCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the credit note, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCreditNote + */ + id?: string; + /** + * Friendly reference for the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + creditNoteNumber?: string | null; + /** + * Reference to the customer the credit note has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingCreditNote + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the customer's accounts receivable + * @type {string} + * @memberof AccountingCreditNote + */ + totalAmount: Decimal | number; + /** + * Any discounts applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalDiscount: Decimal | number; + /** + * Value of the credit note, including discounts and excluding tax. + * @type {string} + * @memberof AccountingCreditNote + */ + subTotal: Decimal | number; + /** + * Additional tax amount applied to credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxPercentage?: Decimal | number; + /** + * Any tax applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate (from 0 to 100) of discounts applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + discountPercentage: Decimal | number; + /** + * Unused balance of totalAmount originally raised. + * @type {string} + * @memberof AccountingCreditNote + */ + remainingCredit: Decimal | number; + /** + * Current state of the credit note. + * @type {CreditNoteStatus} + * @memberof AccountingCreditNote + */ + status: CreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingCreditNote + */ + paymentAllocations?: Array | null; + /** + * Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingCreditNote + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreditNote + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreditNote + */ + supplementalData?: SupplementalData; +} + +export interface AccountingCreditNotesAccountingCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the credit note, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCreditNote + */ + id?: string; + /** + * Friendly reference for the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + creditNoteNumber?: string | null; + /** + * Reference to the customer the credit note has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingCreditNote + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the customer's accounts receivable + * @type {string} + * @memberof AccountingCreditNote + */ + totalAmount: Decimal | number; + /** + * Any discounts applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalDiscount: Decimal | number; + /** + * Value of the credit note, including discounts and excluding tax. + * @type {string} + * @memberof AccountingCreditNote + */ + subTotal: Decimal | number; + /** + * Additional tax amount applied to credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxPercentage?: Decimal | number; + /** + * Any tax applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate (from 0 to 100) of discounts applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + discountPercentage: Decimal | number; + /** + * Unused balance of totalAmount originally raised. + * @type {string} + * @memberof AccountingCreditNote + */ + remainingCredit: Decimal | number; + /** + * Current state of the credit note. + * @type {CreditNoteStatus} + * @memberof AccountingCreditNote + */ + status: CreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingCreditNote + */ + paymentAllocations?: Array | null; + /** + * Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingCreditNote + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreditNote + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreditNote + */ + supplementalData?: SupplementalData; +} + +export interface AccountingCreditNotesListResponseAccountingCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the credit note, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCreditNote + */ + id?: string; + /** + * Friendly reference for the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + creditNoteNumber?: string | null; + /** + * Reference to the customer the credit note has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingCreditNote + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the customer's accounts receivable + * @type {string} + * @memberof AccountingCreditNote + */ + totalAmount: Decimal | number; + /** + * Any discounts applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalDiscount: Decimal | number; + /** + * Value of the credit note, including discounts and excluding tax. + * @type {string} + * @memberof AccountingCreditNote + */ + subTotal: Decimal | number; + /** + * Additional tax amount applied to credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxPercentage?: Decimal | number; + /** + * Any tax applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate (from 0 to 100) of discounts applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + discountPercentage: Decimal | number; + /** + * Unused balance of totalAmount originally raised. + * @type {string} + * @memberof AccountingCreditNote + */ + remainingCredit: Decimal | number; + /** + * Current state of the credit note. + * @type {CreditNoteStatus} + * @memberof AccountingCreditNote + */ + status: CreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingCreditNote + */ + paymentAllocations?: Array | null; + /** + * Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingCreditNote + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreditNote + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreditNote + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingCreditNoteResponseAccountingCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the credit note, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCreditNote + */ + id?: string; + /** + * Friendly reference for the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + creditNoteNumber?: string | null; + /** + * Reference to the customer the credit note has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingCreditNote + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the customer's accounts receivable + * @type {string} + * @memberof AccountingCreditNote + */ + totalAmount: Decimal | number; + /** + * Any discounts applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalDiscount: Decimal | number; + /** + * Value of the credit note, including discounts and excluding tax. + * @type {string} + * @memberof AccountingCreditNote + */ + subTotal: Decimal | number; + /** + * Additional tax amount applied to credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxPercentage?: Decimal | number; + /** + * Any tax applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate (from 0 to 100) of discounts applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + discountPercentage: Decimal | number; + /** + * Unused balance of totalAmount originally raised. + * @type {string} + * @memberof AccountingCreditNote + */ + remainingCredit: Decimal | number; + /** + * Current state of the credit note. + * @type {CreditNoteStatus} + * @memberof AccountingCreditNote + */ + status: CreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingCreditNote + */ + paymentAllocations?: Array | null; + /** + * Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingCreditNote + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreditNote + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreditNote + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingCreditNotesResponseAccountingCreditNote { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCreditNote + */ + sourceModifiedDate?: string; + /** + * Identifier for the credit note, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCreditNote + */ + id?: string; + /** + * Friendly reference for the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + creditNoteNumber?: string | null; + /** + * Reference to the customer the credit note has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingCreditNote + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + withholdingTax?: Array | null; + /** + * Total amount of credit that has been applied to the customer's accounts receivable + * @type {string} + * @memberof AccountingCreditNote + */ + totalAmount: Decimal | number; + /** + * Any discounts applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalDiscount: Decimal | number; + /** + * Value of the credit note, including discounts and excluding tax. + * @type {string} + * @memberof AccountingCreditNote + */ + subTotal: Decimal | number; + /** + * Additional tax amount applied to credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + additionalTaxPercentage?: Decimal | number; + /** + * Any tax applied to the credit note amount. + * @type {string} + * @memberof AccountingCreditNote + */ + totalTaxAmount: Decimal | number; + /** + * Percentage rate (from 0 to 100) of discounts applied to the credit note. + * @type {string} + * @memberof AccountingCreditNote + */ + discountPercentage: Decimal | number; + /** + * Unused balance of totalAmount originally raised. + * @type {string} + * @memberof AccountingCreditNote + */ + remainingCredit: Decimal | number; + /** + * Current state of the credit note. + * @type {CreditNoteStatus} + * @memberof AccountingCreditNote + */ + status: CreditNoteStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingCreditNote + */ + allocatedOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingCreditNote + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingCreditNote + */ + currencyRate?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof AccountingCreditNote + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingCreditNote + */ + paymentAllocations?: Array | null; + /** + * Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingCreditNote + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingCreditNote + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCreditNote + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingcreditnotes.ts b/lending/src/sdk/models/shared/accountingcreditnotes.ts index 55b4d63d4..0da80d69a 100644 --- a/lending/src/sdk/models/shared/accountingcreditnotes.ts +++ b/lending/src/sdk/models/shared/accountingcreditnotes.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingCreditNote } from './accountingcreditnote'; import { - AccountingCreditNote, - AccountingCreditNote$inboundSchema, -} from "./accountingcreditnote.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingCreditNotes = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingCreditNotes$inboundSchema: z.ZodType< - AccountingCreditNotes, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingCreditNote$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingCreditNotesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCreditNotes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCreditNotes' from JSON`, - ); + AccountingCreditNoteFromJSON, + AccountingCreditNoteFromJSONTyped, + AccountingCreditNoteToJSON, + AccountingCreditNoteToJSONTyped, +} from './accountingcreditnote'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface AccountingCreditNotes + */ +export interface AccountingCreditNotes { + /** + * Current page number. + * @type {number} + * @memberof AccountingCreditNotes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingCreditNotes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingCreditNotes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingCreditNotes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingCreditNotes + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingCreditNotes interface. + */ +export function instanceOfAccountingCreditNotes(value: object): value is AccountingCreditNotes { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingCreditNotesFromJSON(json: any): AccountingCreditNotes { + return AccountingCreditNotesFromJSONTyped(json, false); +} + +export function AccountingCreditNotesFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCreditNotes { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingCreditNoteFromJSON)), + }; +} + +export function AccountingCreditNotesToJSON(json: any): AccountingCreditNotes { + return AccountingCreditNotesToJSONTyped(json, false); +} + +export function AccountingCreditNotesToJSONTyped(value?: AccountingCreditNotes | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingCreditNoteToJSON)), + }; +} + + +export interface AccountingCreditNotesListResponseAccountingCreditNotes { + /** + * Current page number. + * @type {number} + * @memberof AccountingCreditNotes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingCreditNotes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingCreditNotes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingCreditNotes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingCreditNotes + */ + results?: Array; +} + +export interface ListAccountingCreditNotesResponseAccountingCreditNotes { + /** + * Current page number. + * @type {number} + * @memberof AccountingCreditNotes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingCreditNotes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingCreditNotes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingCreditNotes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingCreditNotes + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingcustomer.ts b/lending/src/sdk/models/shared/accountingcustomer.ts index 978d3031d..2921d362e 100644 --- a/lending/src/sdk/models/shared/accountingcustomer.ts +++ b/lending/src/sdk/models/shared/accountingcustomer.ts @@ -1,130 +1,806 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { SupplementalData } from './supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { CustomerStatus } from './customerstatus'; +import { + CustomerStatusFromJSON, + CustomerStatusFromJSONTyped, + CustomerStatusToJSON, + CustomerStatusToJSONTyped, +} from './customerstatus'; +import type { AccountingAddress } from './accountingaddress'; import { - AccountingAddress, - AccountingAddress$inboundSchema, -} from "./accountingaddress.js"; -import { Contact, Contact$inboundSchema } from "./contact.js"; + AccountingAddressFromJSON, + AccountingAddressFromJSONTyped, + AccountingAddressToJSON, + AccountingAddressToJSONTyped, +} from './accountingaddress'; +import type { Metadata } from './metadata'; import { - CustomerStatus, - CustomerStatus$inboundSchema, -} from "./customerstatus.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { Contact } from './contact'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + ContactFromJSON, + ContactFromJSONTyped, + ContactToJSON, + ContactToJSONTyped, +} from './contact'; /** * ## Overview - * - * @remarks - * + * * 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/lending-api#/schemas/Invoice). + * + * @export + * @interface AccountingCustomer */ -export type AccountingCustomer = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the customer, unique to the company in the accounting software. - */ - id?: string | undefined; - /** - * Name of the customer as recorded in the accounting system, typically the company name. - */ - customerName?: string | null | undefined; - /** - * Name of the main contact for the identified customer. - */ - contactName?: string | null | undefined; - /** - * Email address the customer can be contacted by. - */ - emailAddress?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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. - */ - defaultCurrency?: string | undefined; - /** - * Phone number the customer can be contacted by. - */ - phone?: string | null | undefined; - /** - * An array of Addresses. - */ - addresses?: Array | null | undefined; - /** - * An array of Contacts. - */ - contacts?: Array | null | undefined; - /** - * Company number. In the UK, this is typically the Companies House company registration number. - */ - registrationNumber?: string | null | undefined; - /** - * Company tax number. - */ - taxNumber?: string | null | undefined; - /** - * Status of customer. - */ - status: CustomerStatus; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; - -/** @internal */ -export const AccountingCustomer$inboundSchema: z.ZodType< - AccountingCustomer, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - customerName: z.nullable(z.string()).optional(), - contactName: z.nullable(z.string()).optional(), - emailAddress: z.nullable(z.string()).optional(), - defaultCurrency: z.string().optional(), - phone: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(AccountingAddress$inboundSchema)).optional(), - contacts: z.nullable(z.array(Contact$inboundSchema)).optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - status: CustomerStatus$inboundSchema, - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); - -export function accountingCustomerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCustomer$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCustomer' from JSON`, - ); +export interface AccountingCustomer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + sourceModifiedDate?: string; + /** + * Identifier for the customer, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCustomer + */ + id?: string; + /** + * Name of the customer as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingCustomer + */ + customerName?: string | null; + /** + * Name of the main contact for the identified customer. + * @type {string} + * @memberof AccountingCustomer + */ + contactName?: string | null; + /** + * Email address the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + emailAddress?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCustomer + */ + defaultCurrency?: string; + /** + * Phone number the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCustomer + */ + addresses?: Array | null; + /** + * An array of Contacts. + * @type {Array} + * @memberof AccountingCustomer + */ + contacts?: Array | null; + /** + * Company number. In the UK, this is typically the Companies House company registration number. + * @type {string} + * @memberof AccountingCustomer + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCustomer + */ + taxNumber?: string | null; + /** + * Current state of the customer. + * @type {CustomerStatus} + * @memberof AccountingCustomer + */ + status: CustomerStatus; + /** + * + * @type {Metadata} + * @memberof AccountingCustomer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCustomer + */ + supplementalData?: SupplementalData; +} + + + +/** + * Check if a given object implements the AccountingCustomer interface. + */ +export function instanceOfAccountingCustomer(value: object): value is AccountingCustomer { + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} + +export function AccountingCustomerFromJSON(json: any): AccountingCustomer { + return AccountingCustomerFromJSONTyped(json, false); +} + +export function AccountingCustomerFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCustomer { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'customerName': json['customerName'] == null ? undefined : json['customerName'], + 'contactName': json['contactName'] == null ? undefined : json['contactName'], + 'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'], + 'defaultCurrency': json['defaultCurrency'] == null ? undefined : json['defaultCurrency'], + 'phone': json['phone'] == null ? undefined : json['phone'], + 'addresses': json['addresses'] == null ? undefined : ((json['addresses'] as Array).map(AccountingAddressFromJSON)), + 'contacts': json['contacts'] == null ? undefined : ((json['contacts'] as Array).map(ContactFromJSON)), + 'registrationNumber': json['registrationNumber'] == null ? undefined : json['registrationNumber'], + 'taxNumber': json['taxNumber'] == null ? undefined : json['taxNumber'], + 'status': CustomerStatusFromJSON(json['status']), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingCustomerToJSON(json: any): AccountingCustomer { + return AccountingCustomerToJSONTyped(json, false); +} + +export function AccountingCustomerToJSONTyped(value?: AccountingCustomer | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'customerName': value['customerName'], + 'contactName': value['contactName'], + 'emailAddress': value['emailAddress'], + 'defaultCurrency': value['defaultCurrency'], + 'phone': value['phone'], + 'addresses': value['addresses'] == null ? undefined : ((value['addresses'] as Array).map(AccountingAddressToJSON)), + 'contacts': value['contacts'] == null ? undefined : ((value['contacts'] as Array).map(ContactToJSON)), + 'registrationNumber': value['registrationNumber'], + 'taxNumber': value['taxNumber'], + 'status': CustomerStatusToJSON(value['status']), + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingCustomerGetResponseAccountingCustomer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + sourceModifiedDate?: string; + /** + * Identifier for the customer, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCustomer + */ + id?: string; + /** + * Name of the customer as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingCustomer + */ + customerName?: string | null; + /** + * Name of the main contact for the identified customer. + * @type {string} + * @memberof AccountingCustomer + */ + contactName?: string | null; + /** + * Email address the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + emailAddress?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCustomer + */ + defaultCurrency?: string; + /** + * Phone number the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCustomer + */ + addresses?: Array | null; + /** + * An array of Contacts. + * @type {Array} + * @memberof AccountingCustomer + */ + contacts?: Array | null; + /** + * Company number. In the UK, this is typically the Companies House company registration number. + * @type {string} + * @memberof AccountingCustomer + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCustomer + */ + taxNumber?: string | null; + /** + * Current state of the customer. + * @type {CustomerStatus} + * @memberof AccountingCustomer + */ + status: CustomerStatus; + /** + * + * @type {Metadata} + * @memberof AccountingCustomer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCustomer + */ + supplementalData?: SupplementalData; +} + +export interface AccountingCustomersAccountingCustomer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + sourceModifiedDate?: string; + /** + * Identifier for the customer, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCustomer + */ + id?: string; + /** + * Name of the customer as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingCustomer + */ + customerName?: string | null; + /** + * Name of the main contact for the identified customer. + * @type {string} + * @memberof AccountingCustomer + */ + contactName?: string | null; + /** + * Email address the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + emailAddress?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCustomer + */ + defaultCurrency?: string; + /** + * Phone number the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCustomer + */ + addresses?: Array | null; + /** + * An array of Contacts. + * @type {Array} + * @memberof AccountingCustomer + */ + contacts?: Array | null; + /** + * Company number. In the UK, this is typically the Companies House company registration number. + * @type {string} + * @memberof AccountingCustomer + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCustomer + */ + taxNumber?: string | null; + /** + * Current state of the customer. + * @type {CustomerStatus} + * @memberof AccountingCustomer + */ + status: CustomerStatus; + /** + * + * @type {Metadata} + * @memberof AccountingCustomer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCustomer + */ + supplementalData?: SupplementalData; +} + +export interface AccountingCustomersListResponseAccountingCustomer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + sourceModifiedDate?: string; + /** + * Identifier for the customer, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCustomer + */ + id?: string; + /** + * Name of the customer as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingCustomer + */ + customerName?: string | null; + /** + * Name of the main contact for the identified customer. + * @type {string} + * @memberof AccountingCustomer + */ + contactName?: string | null; + /** + * Email address the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + emailAddress?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCustomer + */ + defaultCurrency?: string; + /** + * Phone number the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCustomer + */ + addresses?: Array | null; + /** + * An array of Contacts. + * @type {Array} + * @memberof AccountingCustomer + */ + contacts?: Array | null; + /** + * Company number. In the UK, this is typically the Companies House company registration number. + * @type {string} + * @memberof AccountingCustomer + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCustomer + */ + taxNumber?: string | null; + /** + * Current state of the customer. + * @type {CustomerStatus} + * @memberof AccountingCustomer + */ + status: CustomerStatus; + /** + * + * @type {Metadata} + * @memberof AccountingCustomer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCustomer + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingCustomerResponseAccountingCustomer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + sourceModifiedDate?: string; + /** + * Identifier for the customer, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCustomer + */ + id?: string; + /** + * Name of the customer as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingCustomer + */ + customerName?: string | null; + /** + * Name of the main contact for the identified customer. + * @type {string} + * @memberof AccountingCustomer + */ + contactName?: string | null; + /** + * Email address the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + emailAddress?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCustomer + */ + defaultCurrency?: string; + /** + * Phone number the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCustomer + */ + addresses?: Array | null; + /** + * An array of Contacts. + * @type {Array} + * @memberof AccountingCustomer + */ + contacts?: Array | null; + /** + * Company number. In the UK, this is typically the Companies House company registration number. + * @type {string} + * @memberof AccountingCustomer + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCustomer + */ + taxNumber?: string | null; + /** + * Current state of the customer. + * @type {CustomerStatus} + * @memberof AccountingCustomer + */ + status: CustomerStatus; + /** + * + * @type {Metadata} + * @memberof AccountingCustomer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCustomer + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingCustomersResponseAccountingCustomer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingCustomer + */ + sourceModifiedDate?: string; + /** + * Identifier for the customer, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingCustomer + */ + id?: string; + /** + * Name of the customer as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingCustomer + */ + customerName?: string | null; + /** + * Name of the main contact for the identified customer. + * @type {string} + * @memberof AccountingCustomer + */ + contactName?: string | null; + /** + * Email address the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + emailAddress?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountingCustomer + */ + defaultCurrency?: string; + /** + * Phone number the customer can be contacted by. + * @type {string} + * @memberof AccountingCustomer + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingCustomer + */ + addresses?: Array | null; + /** + * An array of Contacts. + * @type {Array} + * @memberof AccountingCustomer + */ + contacts?: Array | null; + /** + * Company number. In the UK, this is typically the Companies House company registration number. + * @type {string} + * @memberof AccountingCustomer + */ + registrationNumber?: string | null; + /** + * Company tax number. + * @type {string} + * @memberof AccountingCustomer + */ + taxNumber?: string | null; + /** + * Current state of the customer. + * @type {CustomerStatus} + * @memberof AccountingCustomer + */ + status: CustomerStatus; + /** + * + * @type {Metadata} + * @memberof AccountingCustomer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingCustomer + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingcustomerref.ts b/lending/src/sdk/models/shared/accountingcustomerref.ts index 53b96ffc1..bd8c96338 100644 --- a/lending/src/sdk/models/shared/accountingcustomerref.ts +++ b/lending/src/sdk/models/shared/accountingcustomerref.ts @@ -1,61 +1,344 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type AccountingCustomerRef = { - /** - * `id` from the Customers data type - */ - id: string; - /** - * `customerName` from the Customer data type - */ - companyName?: string | null | undefined; -}; - -/** @internal */ -export const AccountingCustomerRef$inboundSchema: z.ZodType< - AccountingCustomerRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - companyName: z.nullable(z.string()).optional(), -}); -/** @internal */ -export type AccountingCustomerRef$Outbound = { - id: string; - companyName?: string | null | undefined; -}; - -/** @internal */ -export const AccountingCustomerRef$outboundSchema: z.ZodType< - AccountingCustomerRef$Outbound, - z.ZodTypeDef, - AccountingCustomerRef -> = z.object({ - id: z.string(), - companyName: z.nullable(z.string()).optional(), -}); - -export function accountingCustomerRefToJSON( - accountingCustomerRef: AccountingCustomerRef, -): string { - return JSON.stringify( - AccountingCustomerRef$outboundSchema.parse(accountingCustomerRef), - ); -} -export function accountingCustomerRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCustomerRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCustomerRef' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface AccountingCustomerRef + */ +export interface AccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +/** + * Check if a given object implements the AccountingCustomerRef interface. + */ +export function instanceOfAccountingCustomerRef(value: object): value is AccountingCustomerRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function AccountingCustomerRefFromJSON(json: any): AccountingCustomerRef { + return AccountingCustomerRefFromJSONTyped(json, false); +} + +export function AccountingCustomerRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCustomerRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'companyName': json['companyName'] == null ? undefined : json['companyName'], + }; +} + +export function AccountingCustomerRefToJSON(json: any): AccountingCustomerRef { + return AccountingCustomerRefToJSONTyped(json, false); +} + +export function AccountingCustomerRefToJSONTyped(value?: AccountingCustomerRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'companyName': value['companyName'], + }; +} + + +export interface AccountingCreatePaymentResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingCreditNoteAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingCreditNoteGetResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingCreditNotesAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingInvoiceAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingInvoiceGetResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingInvoicesAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingPaymentAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingPaymentGetResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountingPaymentsAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountsPayableTrackingAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface AccountsReceivableTrackingAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface CreatePaymentResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface GetAccountingCreditNoteResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface GetAccountingInvoiceResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface GetAccountingPaymentResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface PaymentCreateResponseAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; +} + +export interface TrackingAccountingCustomerRef { + /** + * `id` from the Customers data type + * @type {string} + * @memberof AccountingCustomerRef + */ + id: string; + /** + * `customerName` from the Customer data type + * @type {string} + * @memberof AccountingCustomerRef + */ + companyName?: string | null; } diff --git a/lending/src/sdk/models/shared/accountingcustomers.ts b/lending/src/sdk/models/shared/accountingcustomers.ts index 45cee2b53..31bd74cee 100644 --- a/lending/src/sdk/models/shared/accountingcustomers.ts +++ b/lending/src/sdk/models/shared/accountingcustomers.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingCustomer } from './accountingcustomer'; import { - AccountingCustomer, - AccountingCustomer$inboundSchema, -} from "./accountingcustomer.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingCustomers = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingCustomers$inboundSchema: z.ZodType< - AccountingCustomers, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingCustomer$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingCustomersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingCustomers$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingCustomers' from JSON`, - ); + AccountingCustomerFromJSON, + AccountingCustomerFromJSONTyped, + AccountingCustomerToJSON, + AccountingCustomerToJSONTyped, +} from './accountingcustomer'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface AccountingCustomers + */ +export interface AccountingCustomers { + /** + * Current page number. + * @type {number} + * @memberof AccountingCustomers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingCustomers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingCustomers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingCustomers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingCustomers + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingCustomers interface. + */ +export function instanceOfAccountingCustomers(value: object): value is AccountingCustomers { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingCustomersFromJSON(json: any): AccountingCustomers { + return AccountingCustomersFromJSONTyped(json, false); +} + +export function AccountingCustomersFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingCustomers { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingCustomerFromJSON)), + }; +} + +export function AccountingCustomersToJSON(json: any): AccountingCustomers { + return AccountingCustomersToJSONTyped(json, false); +} + +export function AccountingCustomersToJSONTyped(value?: AccountingCustomers | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingCustomerToJSON)), + }; +} + + +export interface AccountingCustomersListResponseAccountingCustomers { + /** + * Current page number. + * @type {number} + * @memberof AccountingCustomers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingCustomers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingCustomers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingCustomers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingCustomers + */ + results?: Array; +} + +export interface ListAccountingCustomersResponseAccountingCustomers { + /** + * Current page number. + * @type {number} + * @memberof AccountingCustomers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingCustomers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingCustomers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingCustomers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingCustomers + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingdirectcost.ts b/lending/src/sdk/models/shared/accountingdirectcost.ts index 4e8be13a1..6401ae1d6 100644 --- a/lending/src/sdk/models/shared/accountingdirectcost.ts +++ b/lending/src/sdk/models/shared/accountingdirectcost.ts @@ -1,190 +1,1652 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { DirectCostLineItem } from './directcostlineitem'; +import { + DirectCostLineItemFromJSON, + DirectCostLineItemFromJSONTyped, + DirectCostLineItemToJSON, + DirectCostLineItemToJSONTyped, +} from './directcostlineitem'; +import type { SupplementalData } from './supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { Metadata } from './metadata'; import { - AccountingPaymentAllocation, - AccountingPaymentAllocation$inboundSchema, -} from "./accountingpaymentallocation.js"; -import { ContactRef, ContactRef$inboundSchema } from "./contactref.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { ContactRef } from './contactref'; import { - DirectCostLineItem, - DirectCostLineItem$inboundSchema, -} from "./directcostlineitem.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + ContactRefFromJSON, + ContactRefFromJSONTyped, + ContactRefToJSON, + ContactRefToJSONTyped, +} from './contactref'; +import type { AccountingPaymentAllocation } from './accountingpaymentallocation'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + AccountingPaymentAllocationFromJSON, + AccountingPaymentAllocationFromJSONTyped, + AccountingPaymentAllocationToJSON, + AccountingPaymentAllocationToJSONTyped, +} from './accountingpaymentallocation'; /** * > **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting software. - * - * @remarks - * + * * ## Overview - * + * * Direct costs are money that leave the business without impacting Accounts Payable, and refunds associated with such transactions. - * + * * 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 - * + * * Direct costs is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction). + * @export + * @interface AccountingDirectCost */ -export type AccountingDirectCost = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier of the direct cost, unique for the company. - */ - id?: string | undefined; - /** - * User-friendly reference for the direct cost. - */ - reference?: string | null | undefined; - /** - * A note attached to the direct cost. - */ - note?: string | null | undefined; - contactRef?: ContactRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - issueDate: string; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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: string; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * An array of line items. - */ - lineItems: Array; - /** - * An array of payment allocations. - */ - paymentAllocations: Array; - /** - * The total amount of the direct costs, excluding any taxes. - */ - subTotal: Decimal$ | number; - /** - * The total amount of tax on the direct costs. - */ - taxAmount: Decimal$ | number; - /** - * The amount of the direct costs, inclusive of tax. - */ - totalAmount: Decimal$ | number; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; - metadata?: Metadata | undefined; -}; - -/** @internal */ -export const AccountingDirectCost$inboundSchema: z.ZodType< - AccountingDirectCost, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - reference: z.nullable(z.string()).optional(), - note: z.nullable(z.string()).optional(), - contactRef: ContactRef$inboundSchema.optional(), - issueDate: z.string(), - currency: z.string(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - lineItems: z.array(DirectCostLineItem$inboundSchema), - paymentAllocations: z.array(AccountingPaymentAllocation$inboundSchema), - subTotal: z.number().transform(v => new Decimal$(v)), - taxAmount: z.number().transform(v => new Decimal$(v)), - totalAmount: z.number().transform(v => new Decimal$(v)), - supplementalData: SupplementalData$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), -}); - -export function accountingDirectCostFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingDirectCost$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingDirectCost' from JSON`, - ); +export interface AccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; +} + +/** + * Check if a given object implements the AccountingDirectCost interface. + */ +export function instanceOfAccountingDirectCost(value: object): value is AccountingDirectCost { + if (!('issueDate' in value) || value['issueDate'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + if (!('lineItems' in value) || value['lineItems'] === undefined) return false; + if (!('paymentAllocations' in value) || value['paymentAllocations'] === undefined) return false; + if (!('subTotal' in value) || value['subTotal'] === undefined) return false; + if (!('taxAmount' in value) || value['taxAmount'] === undefined) return false; + if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false; + return true; +} + +export function AccountingDirectCostFromJSON(json: any): AccountingDirectCost { + return AccountingDirectCostFromJSONTyped(json, false); +} + +export function AccountingDirectCostFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingDirectCost { + if (json == null) { + return json; + } + return { + + 'reference': json['reference'] == null ? undefined : json['reference'], + 'note': json['note'] == null ? undefined : json['note'], + 'contactRef': json['contactRef'] == null ? undefined : ContactRefFromJSON(json['contactRef']), + 'issueDate': json['issueDate'], + 'currency': json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lineItems': ((json['lineItems'] as Array).map(DirectCostLineItemFromJSON)), + 'paymentAllocations': ((json['paymentAllocations'] as Array).map(AccountingPaymentAllocationFromJSON)), + 'subTotal': json['subTotal'], + 'taxAmount': json['taxAmount'], + 'totalAmount': json['totalAmount'], + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + }; +} + +export function AccountingDirectCostToJSON(json: any): AccountingDirectCost { + return AccountingDirectCostToJSONTyped(json, false); +} + +export function AccountingDirectCostToJSONTyped(value?: AccountingDirectCost | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reference': value['reference'], + 'note': value['note'], + 'contactRef': ContactRefToJSON(value['contactRef']), + 'issueDate': value['issueDate'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lineItems': ((value['lineItems'] as Array).map(DirectCostLineItemToJSON)), + 'paymentAllocations': ((value['paymentAllocations'] as Array).map(AccountingPaymentAllocationToJSON)), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'metadata': MetadataToJSON(value['metadata']), + }; +} + + +export interface AccountingCreateDirectCostResponseAccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; +} + +export interface AccountingDirectCostGetResponseAccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; +} + +export interface AccountingDirectCostsAccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; +} + +export interface AccountingDirectCostsListResponseAccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; +} + +export interface CreateDirectCostResponseAccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; +} + +export interface DirectCostCreateResponseAccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; +} + +export interface GetAccountingDirectCostResponseAccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; +} + +export interface ListAccountingDirectCostsResponseAccountingDirectCost { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof AccountingDirectCost + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof AccountingDirectCost + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectCost + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectCost + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectCost + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectCost + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingDirectCost + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof AccountingDirectCost + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof AccountingDirectCost + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof AccountingDirectCost + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectCost + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectCost + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct cost, unique for the company. + * @type {string} + * @memberof AccountingDirectCost + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingDirectCost + */ + metadata?: Metadata; } diff --git a/lending/src/sdk/models/shared/accountingdirectcosts.ts b/lending/src/sdk/models/shared/accountingdirectcosts.ts index e7d019a7c..f5f069ac5 100644 --- a/lending/src/sdk/models/shared/accountingdirectcosts.ts +++ b/lending/src/sdk/models/shared/accountingdirectcosts.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingDirectCost, - AccountingDirectCost$inboundSchema, -} from "./accountingdirectcost.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingDirectCosts = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingDirectCosts$inboundSchema: z.ZodType< - AccountingDirectCosts, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingDirectCost$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingDirectCostsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingDirectCosts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingDirectCosts' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingDirectCost } from './accountingdirectcost'; +import { + AccountingDirectCostFromJSON, + AccountingDirectCostFromJSONTyped, + AccountingDirectCostToJSON, + AccountingDirectCostToJSONTyped, +} from './accountingdirectcost'; + +/** + * + * @export + * @interface AccountingDirectCosts + */ +export interface AccountingDirectCosts { + /** + * Current page number. + * @type {number} + * @memberof AccountingDirectCosts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingDirectCosts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingDirectCosts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingDirectCosts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingDirectCosts + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingDirectCosts interface. + */ +export function instanceOfAccountingDirectCosts(value: object): value is AccountingDirectCosts { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingDirectCostsFromJSON(json: any): AccountingDirectCosts { + return AccountingDirectCostsFromJSONTyped(json, false); +} + +export function AccountingDirectCostsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingDirectCosts { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingDirectCostFromJSON)), + }; +} + +export function AccountingDirectCostsToJSON(json: any): AccountingDirectCosts { + return AccountingDirectCostsToJSONTyped(json, false); +} + +export function AccountingDirectCostsToJSONTyped(value?: AccountingDirectCosts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingDirectCostToJSON)), + }; +} + + +export interface AccountingDirectCostsListResponseAccountingDirectCosts { + /** + * Current page number. + * @type {number} + * @memberof AccountingDirectCosts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingDirectCosts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingDirectCosts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingDirectCosts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingDirectCosts + */ + results?: Array; +} + +export interface ListAccountingDirectCostsResponseAccountingDirectCosts { + /** + * Current page number. + * @type {number} + * @memberof AccountingDirectCosts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingDirectCosts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingDirectCosts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingDirectCosts + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingDirectCosts + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingdirectincome.ts b/lending/src/sdk/models/shared/accountingdirectincome.ts index dea9ac483..625284182 100644 --- a/lending/src/sdk/models/shared/accountingdirectincome.ts +++ b/lending/src/sdk/models/shared/accountingdirectincome.ts @@ -1,188 +1,1150 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { DirectIncomeLineItem } from './directincomelineitem'; +import { + DirectIncomeLineItemFromJSON, + DirectIncomeLineItemFromJSONTyped, + DirectIncomeLineItemToJSON, + DirectIncomeLineItemToJSONTyped, +} from './directincomelineitem'; +import type { SupplementalData } from './supplementaldata'; +import { + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { Metadata } from './metadata'; import { - AccountingPaymentAllocation, - AccountingPaymentAllocation$inboundSchema, -} from "./accountingpaymentallocation.js"; -import { ContactRef, ContactRef$inboundSchema } from "./contactref.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { ContactRef } from './contactref'; import { - DirectIncomeLineItem, - DirectIncomeLineItem$inboundSchema, -} from "./directincomelineitem.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + ContactRefFromJSON, + ContactRefFromJSONTyped, + ContactRefToJSON, + ContactRefToJSONTyped, +} from './contactref'; +import type { AccountingPaymentAllocation } from './accountingpaymentallocation'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + AccountingPaymentAllocationFromJSON, + AccountingPaymentAllocationFromJSONTyped, + AccountingPaymentAllocationToJSON, + AccountingPaymentAllocationToJSONTyped, +} from './accountingpaymentallocation'; /** * > **Language tip:** Direct incomes may also be referred to as **Receive transactions**, **Receive money transactions**, **Sales receipts**, or **Cash sales** in various accounting software. - * - * @remarks - * + * * ## 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 made at the point of sale. - * - * Direct incomes include: - * + * + * Direct incomes include: + * * - Selling an item directly to a contact, and receiving payment at the point of the sale. * - Refunding an item sold at the point of sale in cash to a contact. - * + * * Direct incomes is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction). + * + * @export + * @interface AccountingDirectIncome + */ +export interface AccountingDirectIncome { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct income, unique for the company. + * @type {string} + * @memberof AccountingDirectIncome + */ + id?: string; + /** + * User-friendly reference for the direct income. + * @type {string} + * @memberof AccountingDirectIncome + */ + reference?: string | null; + /** + * An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. + * @type {string} + * @memberof AccountingDirectIncome + */ + note?: string | null; + /** + * A customer or supplier associated with the direct income. + * @type {ContactRef} + * @memberof AccountingDirectIncome + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectIncome + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectIncome + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectIncome + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectIncome + */ + lineItems: Array; + /** + * + * @type {Array} + * @memberof AccountingDirectIncome + */ + paymentAllocations: Array; + /** + * The total amount of the direct incomes, excluding any taxes. + * @type {string} + * @memberof AccountingDirectIncome + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct incomes. + * @type {string} + * @memberof AccountingDirectIncome + */ + taxAmount: Decimal | number; + /** + * The amount of the direct incomes, inclusive of tax. + * @type {string} + * @memberof AccountingDirectIncome + */ + totalAmount: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingDirectIncome + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectIncome + */ + supplementalData?: SupplementalData; +} + +/** + * Check if a given object implements the AccountingDirectIncome interface. */ -export type AccountingDirectIncome = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier of the direct income, unique for the company. - */ - id?: string | undefined; - /** - * User-friendly reference for the direct income. - */ - reference?: string | null | undefined; - /** - * An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. - */ - note?: string | null | undefined; - contactRef?: ContactRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - issueDate: string; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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: string; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * An array of line items. - */ - lineItems: Array; - paymentAllocations: Array; - /** - * The total amount of the direct incomes, excluding any taxes. - */ - subTotal: Decimal$ | number; - /** - * The total amount of tax on the direct incomes. - */ - taxAmount: Decimal$ | number; - /** - * The amount of the direct incomes, inclusive of tax. - */ - totalAmount: Decimal$ | number; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export function instanceOfAccountingDirectIncome(value: object): value is AccountingDirectIncome { + if (!('issueDate' in value) || value['issueDate'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + if (!('lineItems' in value) || value['lineItems'] === undefined) return false; + if (!('paymentAllocations' in value) || value['paymentAllocations'] === undefined) return false; + if (!('subTotal' in value) || value['subTotal'] === undefined) return false; + if (!('taxAmount' in value) || value['taxAmount'] === undefined) return false; + if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false; + return true; +} -/** @internal */ -export const AccountingDirectIncome$inboundSchema: z.ZodType< - AccountingDirectIncome, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - reference: z.nullable(z.string()).optional(), - note: z.nullable(z.string()).optional(), - contactRef: ContactRef$inboundSchema.optional(), - issueDate: z.string(), - currency: z.string(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - lineItems: z.array(DirectIncomeLineItem$inboundSchema), - paymentAllocations: z.array(AccountingPaymentAllocation$inboundSchema), - subTotal: z.number().transform(v => new Decimal$(v)), - taxAmount: z.number().transform(v => new Decimal$(v)), - totalAmount: z.number().transform(v => new Decimal$(v)), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); +export function AccountingDirectIncomeFromJSON(json: any): AccountingDirectIncome { + return AccountingDirectIncomeFromJSONTyped(json, false); +} + +export function AccountingDirectIncomeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingDirectIncome { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'reference': json['reference'] == null ? undefined : json['reference'], + 'note': json['note'] == null ? undefined : json['note'], + 'contactRef': json['contactRef'] == null ? undefined : ContactRefFromJSON(json['contactRef']), + 'issueDate': json['issueDate'], + 'currency': json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lineItems': ((json['lineItems'] as Array).map(DirectIncomeLineItemFromJSON)), + 'paymentAllocations': ((json['paymentAllocations'] as Array).map(AccountingPaymentAllocationFromJSON)), + 'subTotal': json['subTotal'], + 'taxAmount': json['taxAmount'], + 'totalAmount': json['totalAmount'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingDirectIncomeToJSON(json: any): AccountingDirectIncome { + return AccountingDirectIncomeToJSONTyped(json, false); +} + +export function AccountingDirectIncomeToJSONTyped(value?: AccountingDirectIncome | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'reference': value['reference'], + 'note': value['note'], + 'contactRef': ContactRefToJSON(value['contactRef']), + 'issueDate': value['issueDate'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lineItems': ((value['lineItems'] as Array).map(DirectIncomeLineItemToJSON)), + 'paymentAllocations': ((value['paymentAllocations'] as Array).map(AccountingPaymentAllocationToJSON)), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingDirectIncomeGetResponseAccountingDirectIncome { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct income, unique for the company. + * @type {string} + * @memberof AccountingDirectIncome + */ + id?: string; + /** + * User-friendly reference for the direct income. + * @type {string} + * @memberof AccountingDirectIncome + */ + reference?: string | null; + /** + * An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. + * @type {string} + * @memberof AccountingDirectIncome + */ + note?: string | null; + /** + * A customer or supplier associated with the direct income. + * @type {ContactRef} + * @memberof AccountingDirectIncome + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectIncome + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectIncome + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectIncome + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectIncome + */ + lineItems: Array; + /** + * + * @type {Array} + * @memberof AccountingDirectIncome + */ + paymentAllocations: Array; + /** + * The total amount of the direct incomes, excluding any taxes. + * @type {string} + * @memberof AccountingDirectIncome + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct incomes. + * @type {string} + * @memberof AccountingDirectIncome + */ + taxAmount: Decimal | number; + /** + * The amount of the direct incomes, inclusive of tax. + * @type {string} + * @memberof AccountingDirectIncome + */ + totalAmount: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingDirectIncome + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectIncome + */ + supplementalData?: SupplementalData; +} + +export interface AccountingDirectIncomesAccountingDirectIncome { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct income, unique for the company. + * @type {string} + * @memberof AccountingDirectIncome + */ + id?: string; + /** + * User-friendly reference for the direct income. + * @type {string} + * @memberof AccountingDirectIncome + */ + reference?: string | null; + /** + * An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. + * @type {string} + * @memberof AccountingDirectIncome + */ + note?: string | null; + /** + * A customer or supplier associated with the direct income. + * @type {ContactRef} + * @memberof AccountingDirectIncome + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectIncome + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectIncome + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectIncome + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectIncome + */ + lineItems: Array; + /** + * + * @type {Array} + * @memberof AccountingDirectIncome + */ + paymentAllocations: Array; + /** + * The total amount of the direct incomes, excluding any taxes. + * @type {string} + * @memberof AccountingDirectIncome + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct incomes. + * @type {string} + * @memberof AccountingDirectIncome + */ + taxAmount: Decimal | number; + /** + * The amount of the direct incomes, inclusive of tax. + * @type {string} + * @memberof AccountingDirectIncome + */ + totalAmount: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingDirectIncome + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectIncome + */ + supplementalData?: SupplementalData; +} + +export interface AccountingDirectIncomesListResponseAccountingDirectIncome { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct income, unique for the company. + * @type {string} + * @memberof AccountingDirectIncome + */ + id?: string; + /** + * User-friendly reference for the direct income. + * @type {string} + * @memberof AccountingDirectIncome + */ + reference?: string | null; + /** + * An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. + * @type {string} + * @memberof AccountingDirectIncome + */ + note?: string | null; + /** + * A customer or supplier associated with the direct income. + * @type {ContactRef} + * @memberof AccountingDirectIncome + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectIncome + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectIncome + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectIncome + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectIncome + */ + lineItems: Array; + /** + * + * @type {Array} + * @memberof AccountingDirectIncome + */ + paymentAllocations: Array; + /** + * The total amount of the direct incomes, excluding any taxes. + * @type {string} + * @memberof AccountingDirectIncome + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct incomes. + * @type {string} + * @memberof AccountingDirectIncome + */ + taxAmount: Decimal | number; + /** + * The amount of the direct incomes, inclusive of tax. + * @type {string} + * @memberof AccountingDirectIncome + */ + totalAmount: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingDirectIncome + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectIncome + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingDirectIncomeResponseAccountingDirectIncome { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct income, unique for the company. + * @type {string} + * @memberof AccountingDirectIncome + */ + id?: string; + /** + * User-friendly reference for the direct income. + * @type {string} + * @memberof AccountingDirectIncome + */ + reference?: string | null; + /** + * An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. + * @type {string} + * @memberof AccountingDirectIncome + */ + note?: string | null; + /** + * A customer or supplier associated with the direct income. + * @type {ContactRef} + * @memberof AccountingDirectIncome + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectIncome + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectIncome + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectIncome + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectIncome + */ + lineItems: Array; + /** + * + * @type {Array} + * @memberof AccountingDirectIncome + */ + paymentAllocations: Array; + /** + * The total amount of the direct incomes, excluding any taxes. + * @type {string} + * @memberof AccountingDirectIncome + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct incomes. + * @type {string} + * @memberof AccountingDirectIncome + */ + taxAmount: Decimal | number; + /** + * The amount of the direct incomes, inclusive of tax. + * @type {string} + * @memberof AccountingDirectIncome + */ + totalAmount: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingDirectIncome + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectIncome + */ + supplementalData?: SupplementalData; +} -export function accountingDirectIncomeFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingDirectIncome$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingDirectIncome' from JSON`, - ); +export interface ListAccountingDirectIncomesResponseAccountingDirectIncome { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingDirectIncome + */ + sourceModifiedDate?: string; + /** + * Identifier of the direct income, unique for the company. + * @type {string} + * @memberof AccountingDirectIncome + */ + id?: string; + /** + * User-friendly reference for the direct income. + * @type {string} + * @memberof AccountingDirectIncome + */ + reference?: string | null; + /** + * An optional note on the direct income that can be used to assign the direct income with a reference ID in your application. + * @type {string} + * @memberof AccountingDirectIncome + */ + note?: string | null; + /** + * A customer or supplier associated with the direct income. + * @type {ContactRef} + * @memberof AccountingDirectIncome + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingDirectIncome + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof AccountingDirectIncome + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingDirectIncome + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingDirectIncome + */ + lineItems: Array; + /** + * + * @type {Array} + * @memberof AccountingDirectIncome + */ + paymentAllocations: Array; + /** + * The total amount of the direct incomes, excluding any taxes. + * @type {string} + * @memberof AccountingDirectIncome + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct incomes. + * @type {string} + * @memberof AccountingDirectIncome + */ + taxAmount: Decimal | number; + /** + * The amount of the direct incomes, inclusive of tax. + * @type {string} + * @memberof AccountingDirectIncome + */ + totalAmount: Decimal | number; + /** + * + * @type {Metadata} + * @memberof AccountingDirectIncome + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingDirectIncome + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingdirectincomes.ts b/lending/src/sdk/models/shared/accountingdirectincomes.ts index 35b115731..30a426bcd 100644 --- a/lending/src/sdk/models/shared/accountingdirectincomes.ts +++ b/lending/src/sdk/models/shared/accountingdirectincomes.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingDirectIncome, - AccountingDirectIncome$inboundSchema, -} from "./accountingdirectincome.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingDirectIncomes = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingDirectIncomes$inboundSchema: z.ZodType< - AccountingDirectIncomes, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingDirectIncome$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingDirectIncomesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingDirectIncomes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingDirectIncomes' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingDirectIncome } from './accountingdirectincome'; +import { + AccountingDirectIncomeFromJSON, + AccountingDirectIncomeFromJSONTyped, + AccountingDirectIncomeToJSON, + AccountingDirectIncomeToJSONTyped, +} from './accountingdirectincome'; + +/** + * + * @export + * @interface AccountingDirectIncomes + */ +export interface AccountingDirectIncomes { + /** + * Current page number. + * @type {number} + * @memberof AccountingDirectIncomes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingDirectIncomes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingDirectIncomes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingDirectIncomes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingDirectIncomes + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingDirectIncomes interface. + */ +export function instanceOfAccountingDirectIncomes(value: object): value is AccountingDirectIncomes { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingDirectIncomesFromJSON(json: any): AccountingDirectIncomes { + return AccountingDirectIncomesFromJSONTyped(json, false); +} + +export function AccountingDirectIncomesFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingDirectIncomes { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingDirectIncomeFromJSON)), + }; +} + +export function AccountingDirectIncomesToJSON(json: any): AccountingDirectIncomes { + return AccountingDirectIncomesToJSONTyped(json, false); +} + +export function AccountingDirectIncomesToJSONTyped(value?: AccountingDirectIncomes | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingDirectIncomeToJSON)), + }; +} + + +export interface AccountingDirectIncomesListResponseAccountingDirectIncomes { + /** + * Current page number. + * @type {number} + * @memberof AccountingDirectIncomes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingDirectIncomes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingDirectIncomes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingDirectIncomes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingDirectIncomes + */ + results?: Array; +} + +export interface ListAccountingDirectIncomesResponseAccountingDirectIncomes { + /** + * Current page number. + * @type {number} + * @memberof AccountingDirectIncomes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingDirectIncomes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingDirectIncomes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingDirectIncomes + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingDirectIncomes + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountinginvoice.ts b/lending/src/sdk/models/shared/accountinginvoice.ts index 482e9524f..a3e0d1d1d 100644 --- a/lending/src/sdk/models/shared/accountinginvoice.ts +++ b/lending/src/sdk/models/shared/accountinginvoice.ts @@ -1,359 +1,1781 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountingCustomerRef } from './accountingcustomerref'; import { - AccountingCustomerRef, - AccountingCustomerRef$inboundSchema, -} from "./accountingcustomerref.js"; + AccountingCustomerRefFromJSON, + AccountingCustomerRefFromJSONTyped, + AccountingCustomerRefToJSON, + AccountingCustomerRefToJSONTyped, +} from './accountingcustomerref'; +import type { SupplementalData } from './supplementaldata'; import { - AccountingPaymentAllocation, - AccountingPaymentAllocation$inboundSchema, -} from "./accountingpaymentallocation.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { InvoiceLineItem } from './invoicelineitem'; import { - InvoiceLineItem, - InvoiceLineItem$inboundSchema, -} from "./invoicelineitem.js"; -import { InvoiceStatus, InvoiceStatus$inboundSchema } from "./invoicestatus.js"; -import { Items, Items$inboundSchema } from "./items.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + InvoiceLineItemFromJSON, + InvoiceLineItemFromJSONTyped, + InvoiceLineItemToJSON, + InvoiceLineItemToJSONTyped, +} from './invoicelineitem'; +import type { Metadata } from './metadata'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; - -/** - * The underlying data type associated to the reference `id`. - */ -export const AccountingInvoiceDataType = { - SalesOrders: "salesOrders", -} as const; -/** - * The underlying data type associated to the reference `id`. - */ -export type AccountingInvoiceDataType = ClosedEnum< - typeof AccountingInvoiceDataType ->; - -export type SalesOrderReference = { - /** - * Unique identifier to a record in `dataType`. - */ - id?: string | undefined; - /** - * The underlying data type associated to the reference `id`. - */ - dataType?: AccountingInvoiceDataType | undefined; -}; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { Items } from './items'; +import { + ItemsFromJSON, + ItemsFromJSONTyped, + ItemsToJSON, + ItemsToJSONTyped, +} from './items'; +import type { InvoiceStatus } from './invoicestatus'; +import { + InvoiceStatusFromJSON, + InvoiceStatusFromJSONTyped, + InvoiceStatusToJSON, + InvoiceStatusToJSONTyped, +} from './invoicestatus'; +import type { AccountingPaymentAllocation } from './accountingpaymentallocation'; +import { + AccountingPaymentAllocationFromJSON, + AccountingPaymentAllocationFromJSONTyped, + AccountingPaymentAllocationToJSON, + AccountingPaymentAllocationToJSONTyped, +} from './accountingpaymentallocation'; +import type { SalesOrderReference } from './salesorderreference'; +import { + SalesOrderReferenceFromJSON, + SalesOrderReferenceFromJSONTyped, + SalesOrderReferenceToJSON, + SalesOrderReferenceToJSONTyped, +} from './salesorderreference'; /** * > **Invoices or bills?** - * - * @remarks * > * > 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/lending-api#/schemas/Bill) for the accounts payable equivalent of bills. - * + * * ## Overview - * + * * An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/lending-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. + * - 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/lending-api#/schemas/Payment) assigned to the invoice; the _payment allocations_. - * - * > **Invoice PDF downloads** + * + * > **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. + * @export + * @interface AccountingInvoice */ -export type AccountingInvoice = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the invoice, unique to the company in the accounting software. - */ - id?: string | undefined; - /** - * Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. - */ - invoiceNumber?: string | null | undefined; - customerRef?: AccountingCustomerRef | undefined; - /** - * List of references to related Sales orders. - */ - salesOrderRefs?: Array | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - issueDate: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - dueDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - paidOnDate?: string | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * An array of line items. - */ - lineItems?: Array | null | undefined; - /** - * An array of payment allocations. - */ - paymentAllocations?: Array | null | undefined; - withholdingTax?: Array | null | undefined; - /** - * Numerical value of discounts applied to the invoice. - */ - totalDiscount?: Decimal$ | number | null | undefined; - /** - * Total amount of the invoice excluding any taxes. - */ - subTotal?: Decimal$ | number | null | undefined; - /** - * Additional tax amount applied to invoice. - */ - additionalTaxAmount?: Decimal$ | number | undefined; - /** - * Percentage rate of any additional tax applied to the invoice. - */ - additionalTaxPercentage?: Decimal$ | number | undefined; - /** - * Amount of tax on the invoice. - */ - totalTaxAmount: Decimal$ | number; - /** - * Amount of the invoice, inclusive of tax. - */ - totalAmount: Decimal$ | number; - /** - * Amount outstanding on the invoice. - */ - amountDue: Decimal$ | number; - /** - * 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`. - */ - discountPercentage?: Decimal$ | number | null | undefined; - /** - * Current state of the invoice: - * - * @remarks - * - * - `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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld). - * - `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`. - * - `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. - */ - status: InvoiceStatus; - /** - * Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. - */ - note?: string | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export interface AccountingInvoice { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + sourceModifiedDate?: string; + /** + * Identifier for the invoice, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingInvoice + */ + id?: string; + /** + * Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. + * @type {string} + * @memberof AccountingInvoice + */ + invoiceNumber?: string | null; + /** + * Reference to the customer the invoice has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingInvoice + */ + customerRef?: AccountingCustomerRef; + /** + * List of references to related Sales orders. + * @type {Array} + * @memberof AccountingInvoice + */ + salesOrderRefs?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + issueDate: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + dueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + paidOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingInvoice + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingInvoice + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingInvoice + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingInvoice + */ + paymentAllocations?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingInvoice + */ + withholdingTax?: Array | null; + /** + * Numerical value of discounts applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalDiscount?: Decimal | number | null; + /** + * Total amount of the invoice excluding any taxes. + * @type {string} + * @memberof AccountingInvoice + */ + subTotal?: Decimal | number | null; + /** + * Additional tax amount applied to invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxPercentage?: Decimal | number; + /** + * Amount of tax on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalTaxAmount: Decimal | number; + /** + * Amount of the invoice, inclusive of tax. + * @type {string} + * @memberof AccountingInvoice + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + amountDue: Decimal | number; + /** + * 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`. + * @type {string} + * @memberof AccountingInvoice + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {InvoiceStatus} + * @memberof AccountingInvoice + */ + status: InvoiceStatus; + /** + * Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingInvoice + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingInvoice + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingInvoice + */ + supplementalData?: SupplementalData; +} + + + +/** + * Check if a given object implements the AccountingInvoice interface. + */ +export function instanceOfAccountingInvoice(value: object): value is AccountingInvoice { + if (!('issueDate' in value) || value['issueDate'] === undefined) return false; + if (!('totalTaxAmount' in value) || value['totalTaxAmount'] === undefined) return false; + if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false; + if (!('amountDue' in value) || value['amountDue'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} + +export function AccountingInvoiceFromJSON(json: any): AccountingInvoice { + return AccountingInvoiceFromJSONTyped(json, false); +} + +export function AccountingInvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingInvoice { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'invoiceNumber': json['invoiceNumber'] == null ? undefined : json['invoiceNumber'], + 'customerRef': json['customerRef'] == null ? undefined : AccountingCustomerRefFromJSON(json['customerRef']), + 'salesOrderRefs': json['salesOrderRefs'] == null ? undefined : ((json['salesOrderRefs'] as Array).map(SalesOrderReferenceFromJSON)), + 'issueDate': json['issueDate'], + 'dueDate': json['dueDate'] == null ? undefined : json['dueDate'], + 'paidOnDate': json['paidOnDate'] == null ? undefined : json['paidOnDate'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lineItems': json['lineItems'] == null ? undefined : ((json['lineItems'] as Array).map(InvoiceLineItemFromJSON)), + 'paymentAllocations': json['paymentAllocations'] == null ? undefined : ((json['paymentAllocations'] as Array).map(AccountingPaymentAllocationFromJSON)), + 'withholdingTax': json['withholdingTax'] == null ? undefined : ((json['withholdingTax'] as Array).map(ItemsFromJSON)), + 'totalDiscount': json['totalDiscount'] == null ? undefined : toDecimal(json['totalDiscount']), + 'subTotal': json['subTotal'] == null ? undefined : toDecimal(json['subTotal']), + 'additionalTaxAmount': json['additionalTaxAmount'] == null ? undefined : toDecimal(json['additionalTaxAmount']), + 'additionalTaxPercentage': json['additionalTaxPercentage'] == null ? undefined : toDecimal(json['additionalTaxPercentage']), + 'totalTaxAmount': json['totalTaxAmount'], + 'totalAmount': json['totalAmount'], + 'amountDue': json['amountDue'], + 'discountPercentage': json['discountPercentage'] == null ? undefined : toDecimal(json['discountPercentage']), + 'status': InvoiceStatusFromJSON(json['status']), + 'note': json['note'] == null ? undefined : json['note'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingInvoiceToJSON(json: any): AccountingInvoice { + return AccountingInvoiceToJSONTyped(json, false); +} + +export function AccountingInvoiceToJSONTyped(value?: AccountingInvoice | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'invoiceNumber': value['invoiceNumber'], + 'customerRef': AccountingCustomerRefToJSON(value['customerRef']), + 'salesOrderRefs': value['salesOrderRefs'] == null ? undefined : ((value['salesOrderRefs'] as Array).map(SalesOrderReferenceToJSON)), + 'issueDate': value['issueDate'], + 'dueDate': value['dueDate'], + 'paidOnDate': value['paidOnDate'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lineItems': value['lineItems'] == null ? undefined : ((value['lineItems'] as Array).map(InvoiceLineItemToJSON)), + 'paymentAllocations': value['paymentAllocations'] == null ? undefined : ((value['paymentAllocations'] as Array).map(AccountingPaymentAllocationToJSON)), + 'withholdingTax': value['withholdingTax'] == null ? undefined : ((value['withholdingTax'] as Array).map(ItemsToJSON)), + 'totalDiscount': fromDecimal(value['totalDiscount']), + 'subTotal': fromDecimal(value['subTotal']), + 'additionalTaxAmount': fromDecimal(value['additionalTaxAmount']), + 'additionalTaxPercentage': fromDecimal(value['additionalTaxPercentage']), + 'totalTaxAmount': fromDecimal(value['totalTaxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'amountDue': fromDecimal(value['amountDue']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'status': InvoiceStatusToJSON(value['status']), + 'note': value['note'], + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} -/** @internal */ -export const AccountingInvoiceDataType$inboundSchema: z.ZodNativeEnum< - typeof AccountingInvoiceDataType -> = z.nativeEnum(AccountingInvoiceDataType); -/** @internal */ -export const SalesOrderReference$inboundSchema: z.ZodType< - SalesOrderReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: AccountingInvoiceDataType$inboundSchema.optional(), -}); +export interface AccountingInvoiceGetResponseAccountingInvoice { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + sourceModifiedDate?: string; + /** + * Identifier for the invoice, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingInvoice + */ + id?: string; + /** + * Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. + * @type {string} + * @memberof AccountingInvoice + */ + invoiceNumber?: string | null; + /** + * Reference to the customer the invoice has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingInvoice + */ + customerRef?: AccountingCustomerRef; + /** + * List of references to related Sales orders. + * @type {Array} + * @memberof AccountingInvoice + */ + salesOrderRefs?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + issueDate: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + dueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + paidOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingInvoice + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingInvoice + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingInvoice + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingInvoice + */ + paymentAllocations?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingInvoice + */ + withholdingTax?: Array | null; + /** + * Numerical value of discounts applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalDiscount?: Decimal | number | null; + /** + * Total amount of the invoice excluding any taxes. + * @type {string} + * @memberof AccountingInvoice + */ + subTotal?: Decimal | number | null; + /** + * Additional tax amount applied to invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxPercentage?: Decimal | number; + /** + * Amount of tax on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalTaxAmount: Decimal | number; + /** + * Amount of the invoice, inclusive of tax. + * @type {string} + * @memberof AccountingInvoice + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + amountDue: Decimal | number; + /** + * 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`. + * @type {string} + * @memberof AccountingInvoice + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {InvoiceStatus} + * @memberof AccountingInvoice + */ + status: InvoiceStatus; + /** + * Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingInvoice + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingInvoice + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingInvoice + */ + supplementalData?: SupplementalData; +} -export function salesOrderReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SalesOrderReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SalesOrderReference' from JSON`, - ); +export interface AccountingInvoicesAccountingInvoice { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + sourceModifiedDate?: string; + /** + * Identifier for the invoice, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingInvoice + */ + id?: string; + /** + * Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. + * @type {string} + * @memberof AccountingInvoice + */ + invoiceNumber?: string | null; + /** + * Reference to the customer the invoice has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingInvoice + */ + customerRef?: AccountingCustomerRef; + /** + * List of references to related Sales orders. + * @type {Array} + * @memberof AccountingInvoice + */ + salesOrderRefs?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + issueDate: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + dueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + paidOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingInvoice + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingInvoice + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingInvoice + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingInvoice + */ + paymentAllocations?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingInvoice + */ + withholdingTax?: Array | null; + /** + * Numerical value of discounts applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalDiscount?: Decimal | number | null; + /** + * Total amount of the invoice excluding any taxes. + * @type {string} + * @memberof AccountingInvoice + */ + subTotal?: Decimal | number | null; + /** + * Additional tax amount applied to invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxPercentage?: Decimal | number; + /** + * Amount of tax on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalTaxAmount: Decimal | number; + /** + * Amount of the invoice, inclusive of tax. + * @type {string} + * @memberof AccountingInvoice + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + amountDue: Decimal | number; + /** + * 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`. + * @type {string} + * @memberof AccountingInvoice + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {InvoiceStatus} + * @memberof AccountingInvoice + */ + status: InvoiceStatus; + /** + * Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingInvoice + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingInvoice + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingInvoice + */ + supplementalData?: SupplementalData; } -/** @internal */ -export const AccountingInvoice$inboundSchema: z.ZodType< - AccountingInvoice, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - invoiceNumber: z.nullable(z.string()).optional(), - customerRef: AccountingCustomerRef$inboundSchema.optional(), - salesOrderRefs: z.nullable( - z.array(z.lazy(() => SalesOrderReference$inboundSchema)), - ).optional(), - issueDate: z.string(), - dueDate: z.string().optional(), - paidOnDate: z.string().optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - lineItems: z.nullable(z.array(InvoiceLineItem$inboundSchema)).optional(), - paymentAllocations: z.nullable( - z.array(AccountingPaymentAllocation$inboundSchema), - ).optional(), - withholdingTax: z.nullable(z.array(Items$inboundSchema)).optional(), - totalDiscount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - additionalTaxAmount: z.number().transform(v => new Decimal$(v)).optional(), - additionalTaxPercentage: z.number().transform(v => new Decimal$(v)) - .optional(), - totalTaxAmount: z.number().transform(v => new Decimal$(v)), - totalAmount: z.number().transform(v => new Decimal$(v)), - amountDue: z.number().transform(v => new Decimal$(v)), - discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - status: InvoiceStatus$inboundSchema, - note: z.nullable(z.string()).optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); +export interface AccountingInvoicesListResponseAccountingInvoice { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + sourceModifiedDate?: string; + /** + * Identifier for the invoice, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingInvoice + */ + id?: string; + /** + * Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. + * @type {string} + * @memberof AccountingInvoice + */ + invoiceNumber?: string | null; + /** + * Reference to the customer the invoice has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingInvoice + */ + customerRef?: AccountingCustomerRef; + /** + * List of references to related Sales orders. + * @type {Array} + * @memberof AccountingInvoice + */ + salesOrderRefs?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + issueDate: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + dueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + paidOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingInvoice + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingInvoice + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingInvoice + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingInvoice + */ + paymentAllocations?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingInvoice + */ + withholdingTax?: Array | null; + /** + * Numerical value of discounts applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalDiscount?: Decimal | number | null; + /** + * Total amount of the invoice excluding any taxes. + * @type {string} + * @memberof AccountingInvoice + */ + subTotal?: Decimal | number | null; + /** + * Additional tax amount applied to invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxPercentage?: Decimal | number; + /** + * Amount of tax on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalTaxAmount: Decimal | number; + /** + * Amount of the invoice, inclusive of tax. + * @type {string} + * @memberof AccountingInvoice + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + amountDue: Decimal | number; + /** + * 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`. + * @type {string} + * @memberof AccountingInvoice + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {InvoiceStatus} + * @memberof AccountingInvoice + */ + status: InvoiceStatus; + /** + * Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingInvoice + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingInvoice + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingInvoice + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingInvoiceResponseAccountingInvoice { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + sourceModifiedDate?: string; + /** + * Identifier for the invoice, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingInvoice + */ + id?: string; + /** + * Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. + * @type {string} + * @memberof AccountingInvoice + */ + invoiceNumber?: string | null; + /** + * Reference to the customer the invoice has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingInvoice + */ + customerRef?: AccountingCustomerRef; + /** + * List of references to related Sales orders. + * @type {Array} + * @memberof AccountingInvoice + */ + salesOrderRefs?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + issueDate: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + dueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + paidOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingInvoice + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingInvoice + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingInvoice + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingInvoice + */ + paymentAllocations?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingInvoice + */ + withholdingTax?: Array | null; + /** + * Numerical value of discounts applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalDiscount?: Decimal | number | null; + /** + * Total amount of the invoice excluding any taxes. + * @type {string} + * @memberof AccountingInvoice + */ + subTotal?: Decimal | number | null; + /** + * Additional tax amount applied to invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxPercentage?: Decimal | number; + /** + * Amount of tax on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalTaxAmount: Decimal | number; + /** + * Amount of the invoice, inclusive of tax. + * @type {string} + * @memberof AccountingInvoice + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + amountDue: Decimal | number; + /** + * 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`. + * @type {string} + * @memberof AccountingInvoice + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {InvoiceStatus} + * @memberof AccountingInvoice + */ + status: InvoiceStatus; + /** + * Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingInvoice + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingInvoice + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingInvoice + */ + supplementalData?: SupplementalData; +} -export function accountingInvoiceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingInvoice$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingInvoice' from JSON`, - ); +export interface ListAccountingInvoicesResponseAccountingInvoice { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingInvoice + */ + sourceModifiedDate?: string; + /** + * Identifier for the invoice, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingInvoice + */ + id?: string; + /** + * Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. + * @type {string} + * @memberof AccountingInvoice + */ + invoiceNumber?: string | null; + /** + * Reference to the customer the invoice has been issued to. + * @type {AccountingCustomerRef} + * @memberof AccountingInvoice + */ + customerRef?: AccountingCustomerRef; + /** + * List of references to related Sales orders. + * @type {Array} + * @memberof AccountingInvoice + */ + salesOrderRefs?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + issueDate: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + dueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingInvoice + */ + paidOnDate?: string; + /** + * 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. + * @type {string} + * @memberof AccountingInvoice + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingInvoice + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof AccountingInvoice + */ + lineItems?: Array | null; + /** + * An array of payment allocations. + * @type {Array} + * @memberof AccountingInvoice + */ + paymentAllocations?: Array | null; + /** + * + * @type {Array} + * @memberof AccountingInvoice + */ + withholdingTax?: Array | null; + /** + * Numerical value of discounts applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalDiscount?: Decimal | number | null; + /** + * Total amount of the invoice excluding any taxes. + * @type {string} + * @memberof AccountingInvoice + */ + subTotal?: Decimal | number | null; + /** + * Additional tax amount applied to invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxAmount?: Decimal | number; + /** + * Percentage rate of any additional tax applied to the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + additionalTaxPercentage?: Decimal | number; + /** + * Amount of tax on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + totalTaxAmount: Decimal | number; + /** + * Amount of the invoice, inclusive of tax. + * @type {string} + * @memberof AccountingInvoice + */ + totalAmount: Decimal | number; + /** + * Amount outstanding on the invoice. + * @type {string} + * @memberof AccountingInvoice + */ + amountDue: Decimal | number; + /** + * 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`. + * @type {string} + * @memberof AccountingInvoice + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {InvoiceStatus} + * @memberof AccountingInvoice + */ + status: InvoiceStatus; + /** + * Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer. + * @type {string} + * @memberof AccountingInvoice + */ + note?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingInvoice + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingInvoice + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountinginvoices.ts b/lending/src/sdk/models/shared/accountinginvoices.ts index e94220c24..0e298277b 100644 --- a/lending/src/sdk/models/shared/accountinginvoices.ts +++ b/lending/src/sdk/models/shared/accountinginvoices.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingInvoice, - AccountingInvoice$inboundSchema, -} from "./accountinginvoice.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingInvoices = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingInvoices$inboundSchema: z.ZodType< - AccountingInvoices, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingInvoice$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingInvoicesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingInvoices$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingInvoices' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingInvoice } from './accountinginvoice'; +import { + AccountingInvoiceFromJSON, + AccountingInvoiceFromJSONTyped, + AccountingInvoiceToJSON, + AccountingInvoiceToJSONTyped, +} from './accountinginvoice'; + +/** + * + * @export + * @interface AccountingInvoices + */ +export interface AccountingInvoices { + /** + * Current page number. + * @type {number} + * @memberof AccountingInvoices + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingInvoices + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingInvoices + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingInvoices + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingInvoices + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingInvoices interface. + */ +export function instanceOfAccountingInvoices(value: object): value is AccountingInvoices { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingInvoicesFromJSON(json: any): AccountingInvoices { + return AccountingInvoicesFromJSONTyped(json, false); +} + +export function AccountingInvoicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingInvoices { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingInvoiceFromJSON)), + }; +} + +export function AccountingInvoicesToJSON(json: any): AccountingInvoices { + return AccountingInvoicesToJSONTyped(json, false); +} + +export function AccountingInvoicesToJSONTyped(value?: AccountingInvoices | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingInvoiceToJSON)), + }; +} + + +export interface AccountingInvoicesListResponseAccountingInvoices { + /** + * Current page number. + * @type {number} + * @memberof AccountingInvoices + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingInvoices + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingInvoices + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingInvoices + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingInvoices + */ + results?: Array; +} + +export interface ListAccountingInvoicesResponseAccountingInvoices { + /** + * Current page number. + * @type {number} + * @memberof AccountingInvoices + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingInvoices + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingInvoices + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingInvoices + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingInvoices + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingjournal.ts b/lending/src/sdk/models/shared/accountingjournal.ts index 2e8af2dc9..240731c0b 100644 --- a/lending/src/sdk/models/shared/accountingjournal.ts +++ b/lending/src/sdk/models/shared/accountingjournal.ts @@ -1,125 +1,731 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { JournalStatus, JournalStatus$inboundSchema } from "./journalstatus.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; +import { mapValues } from '../../../runtime'; +import type { JournalStatus } from './journalstatus'; +import { + JournalStatusFromJSON, + JournalStatusFromJSONTyped, + JournalStatusToJSON, + JournalStatusToJSONTyped, +} from './journalstatus'; +import type { Metadata } from './metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; /** * > **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/lending-api#/schemas/JournalEntry) data type - * - * @remarks - * + * * ## 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/lending-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 software 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. + * + * @export + * @interface AccountingJournal */ -export type AccountingJournal = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Journal ID. - */ - id?: string | undefined; - /** - * Native journal number or code. - */ - journalCode?: string | null | undefined; - /** - * Journal name. - * - * @remarks - * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. - */ - name?: string | null | undefined; - /** - * The type of the journal. - */ - type?: string | null | undefined; - /** - * Parent journal ID. - * - * @remarks - * If the journal is a parent journal, this value is not present. - */ - parentId?: string | null | undefined; - /** - * If the journal has child journals, this value is true. If it doesn’t, it is false. - */ - hasChildren?: boolean | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdOn?: string | undefined; - /** - * Current journal status. - */ - status?: JournalStatus | undefined; - metadata?: Metadata | undefined; -}; - -/** @internal */ -export const AccountingJournal$inboundSchema: z.ZodType< - AccountingJournal, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - journalCode: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - type: z.nullable(z.string()).optional(), - parentId: z.nullable(z.string()).optional(), - hasChildren: z.boolean().optional(), - createdOn: z.string().optional(), - status: JournalStatus$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), -}); - -export function accountingJournalFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingJournal$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingJournal' from JSON`, - ); +export interface AccountingJournal { + /** + * Native journal number or code. + * @type {string} + * @memberof AccountingJournal + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof AccountingJournal + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof AccountingJournal + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof AccountingJournal + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof AccountingJournal + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournal + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof AccountingJournal + */ + status?: JournalStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + sourceModifiedDate?: string; + /** + * Journal ID. + * @type {string} + * @memberof AccountingJournal + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingJournal + */ + metadata?: Metadata; +} + + + +/** + * Check if a given object implements the AccountingJournal interface. + */ +export function instanceOfAccountingJournal(value: object): value is AccountingJournal { + return true; +} + +export function AccountingJournalFromJSON(json: any): AccountingJournal { + return AccountingJournalFromJSONTyped(json, false); +} + +export function AccountingJournalFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingJournal { + if (json == null) { + return json; + } + return { + + 'journalCode': json['journalCode'] == null ? undefined : json['journalCode'], + 'name': json['name'] == null ? undefined : json['name'], + 'type': json['type'] == null ? undefined : json['type'], + 'parentId': json['parentId'] == null ? undefined : json['parentId'], + 'hasChildren': json['hasChildren'] == null ? undefined : json['hasChildren'], + 'createdOn': json['createdOn'] == null ? undefined : json['createdOn'], + 'status': json['status'] == null ? undefined : JournalStatusFromJSON(json['status']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + }; +} + +export function AccountingJournalToJSON(json: any): AccountingJournal { + return AccountingJournalToJSONTyped(json, false); +} + +export function AccountingJournalToJSONTyped(value?: AccountingJournal | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'journalCode': value['journalCode'], + 'name': value['name'], + 'type': value['type'], + 'parentId': value['parentId'], + 'hasChildren': value['hasChildren'], + 'createdOn': value['createdOn'], + 'status': JournalStatusToJSON(value['status']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'metadata': MetadataToJSON(value['metadata']), + }; +} + + +export interface AccountingJournalGetResponseAccountingJournal { + /** + * Native journal number or code. + * @type {string} + * @memberof AccountingJournal + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof AccountingJournal + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof AccountingJournal + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof AccountingJournal + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof AccountingJournal + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournal + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof AccountingJournal + */ + status?: JournalStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + sourceModifiedDate?: string; + /** + * Journal ID. + * @type {string} + * @memberof AccountingJournal + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingJournal + */ + metadata?: Metadata; +} + +export interface AccountingJournalsAccountingJournal { + /** + * Native journal number or code. + * @type {string} + * @memberof AccountingJournal + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof AccountingJournal + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof AccountingJournal + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof AccountingJournal + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof AccountingJournal + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournal + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof AccountingJournal + */ + status?: JournalStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + sourceModifiedDate?: string; + /** + * Journal ID. + * @type {string} + * @memberof AccountingJournal + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingJournal + */ + metadata?: Metadata; +} + +export interface AccountingJournalsListResponseAccountingJournal { + /** + * Native journal number or code. + * @type {string} + * @memberof AccountingJournal + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof AccountingJournal + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof AccountingJournal + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof AccountingJournal + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof AccountingJournal + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournal + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof AccountingJournal + */ + status?: JournalStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + sourceModifiedDate?: string; + /** + * Journal ID. + * @type {string} + * @memberof AccountingJournal + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingJournal + */ + metadata?: Metadata; +} + +export interface GetAccountingJournalResponseAccountingJournal { + /** + * Native journal number or code. + * @type {string} + * @memberof AccountingJournal + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof AccountingJournal + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof AccountingJournal + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof AccountingJournal + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof AccountingJournal + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournal + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof AccountingJournal + */ + status?: JournalStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + sourceModifiedDate?: string; + /** + * Journal ID. + * @type {string} + * @memberof AccountingJournal + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingJournal + */ + metadata?: Metadata; +} + +export interface ListAccountingJournalsResponseAccountingJournal { + /** + * Native journal number or code. + * @type {string} + * @memberof AccountingJournal + */ + journalCode?: string | null; + /** + * Journal name. + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + * @type {string} + * @memberof AccountingJournal + */ + name?: string | null; + /** + * The type of the journal. + * @type {string} + * @memberof AccountingJournal + */ + type?: string | null; + /** + * Parent journal ID. + * If the journal is a parent journal, this value is not present. + * @type {string} + * @memberof AccountingJournal + */ + parentId?: string | null; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + * @type {boolean} + * @memberof AccountingJournal + */ + hasChildren?: boolean; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournal + */ + createdOn?: string; + /** + * + * @type {JournalStatus} + * @memberof AccountingJournal + */ + status?: JournalStatus; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournal + */ + sourceModifiedDate?: string; + /** + * Journal ID. + * @type {string} + * @memberof AccountingJournal + */ + id?: string; + /** + * + * @type {Metadata} + * @memberof AccountingJournal + */ + metadata?: Metadata; } diff --git a/lending/src/sdk/models/shared/accountingjournalentries.ts b/lending/src/sdk/models/shared/accountingjournalentries.ts index 39cb50cb4..15abade4d 100644 --- a/lending/src/sdk/models/shared/accountingjournalentries.ts +++ b/lending/src/sdk/models/shared/accountingjournalentries.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingJournalEntry, - AccountingJournalEntry$inboundSchema, -} from "./accountingjournalentry.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingJournalEntries = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingJournalEntries$inboundSchema: z.ZodType< - AccountingJournalEntries, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingJournalEntry$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingJournalEntriesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingJournalEntries$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingJournalEntries' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingJournalEntry } from './accountingjournalentry'; +import { + AccountingJournalEntryFromJSON, + AccountingJournalEntryFromJSONTyped, + AccountingJournalEntryToJSON, + AccountingJournalEntryToJSONTyped, +} from './accountingjournalentry'; + +/** + * + * @export + * @interface AccountingJournalEntries + */ +export interface AccountingJournalEntries { + /** + * Current page number. + * @type {number} + * @memberof AccountingJournalEntries + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingJournalEntries + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingJournalEntries + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingJournalEntries + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingJournalEntries + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingJournalEntries interface. + */ +export function instanceOfAccountingJournalEntries(value: object): value is AccountingJournalEntries { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingJournalEntriesFromJSON(json: any): AccountingJournalEntries { + return AccountingJournalEntriesFromJSONTyped(json, false); +} + +export function AccountingJournalEntriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingJournalEntries { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingJournalEntryFromJSON)), + }; +} + +export function AccountingJournalEntriesToJSON(json: any): AccountingJournalEntries { + return AccountingJournalEntriesToJSONTyped(json, false); +} + +export function AccountingJournalEntriesToJSONTyped(value?: AccountingJournalEntries | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingJournalEntryToJSON)), + }; +} + + +export interface AccountingJournalEntriesListResponseAccountingJournalEntries { + /** + * Current page number. + * @type {number} + * @memberof AccountingJournalEntries + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingJournalEntries + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingJournalEntries + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingJournalEntries + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingJournalEntries + */ + results?: Array; +} + +export interface ListAccountingJournalEntriesResponseAccountingJournalEntries { + /** + * Current page number. + * @type {number} + * @memberof AccountingJournalEntries + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingJournalEntries + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingJournalEntries + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingJournalEntries + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingJournalEntries + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingjournalentry.ts b/lending/src/sdk/models/shared/accountingjournalentry.ts index ce2fb52eb..9d4bb9f98 100644 --- a/lending/src/sdk/models/shared/accountingjournalentry.ts +++ b/lending/src/sdk/models/shared/accountingjournalentry.ts @@ -1,173 +1,991 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { JournalEntryRecordRef } from './journalentryrecordref'; +import { + JournalEntryRecordRefFromJSON, + JournalEntryRecordRefFromJSONTyped, + JournalEntryRecordRefToJSON, + JournalEntryRecordRefToJSONTyped, +} from './journalentryrecordref'; +import type { JournalLine } from './journalline'; +import { + JournalLineFromJSON, + JournalLineFromJSONTyped, + JournalLineToJSON, + JournalLineToJSONTyped, +} from './journalline'; +import type { SupplementalData } from './supplementaldata'; import { - JournalEntryRecordRef, - JournalEntryRecordRef$inboundSchema, -} from "./journalentryrecordref.js"; -import { JournalLine, JournalLine$inboundSchema } from "./journalline.js"; -import { JournalRef, JournalRef$inboundSchema } from "./journalref.js"; -import { Metadata, Metadata$inboundSchema } from "./metadata.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { Metadata } from './metadata'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { JournalRef } from './journalref'; +import { + JournalRefFromJSON, + JournalRefFromJSONTyped, + JournalRefToJSON, + JournalRefToJSONTyped, +} from './journalref'; /** * > **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/lending-api#/schemas/Journal) data type - * - * @remarks - * + * * ## Overview - * + * * A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/lending-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. + * + * 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** + * - 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. + * @export + * @interface AccountingJournalEntry + */ +export interface AccountingJournalEntry { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + sourceModifiedDate?: string; + /** + * Unique identifier of the journal entry for the company in the accounting software. + * @type {string} + * @memberof AccountingJournalEntry + */ + id?: string; + /** + * Optional description of the journal entry. + * @type {string} + * @memberof AccountingJournalEntry + */ + description?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + postedOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + createdOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + updatedOn?: string; + /** + * + * @type {JournalRef} + * @memberof AccountingJournalEntry + */ + journalRef?: JournalRef; + /** + * An array of journal lines. + * @type {Array} + * @memberof AccountingJournalEntry + */ + journalLines?: Array | null; + /** + * + * @type {JournalEntryRecordRef} + * @memberof AccountingJournalEntry + */ + recordRef?: JournalEntryRecordRef; + /** + * + * @type {Metadata} + * @memberof AccountingJournalEntry + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingJournalEntry + */ + supplementalData?: SupplementalData; +} + +/** + * Check if a given object implements the AccountingJournalEntry interface. */ -export type AccountingJournalEntry = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Unique identifier of the journal entry for the company in the accounting software. - */ - id?: string | undefined; - /** - * Optional description of the journal entry. - */ - description?: string | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - postedOn?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdOn?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - updatedOn?: string | undefined; - /** - * Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). - */ - journalRef?: JournalRef | undefined; - /** - * An array of journal lines. - */ - journalLines?: Array | null | undefined; - /** - * Links a journal entry to the underlying record that created it. - */ - recordRef?: JournalEntryRecordRef | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export function instanceOfAccountingJournalEntry(value: object): value is AccountingJournalEntry { + return true; +} + +export function AccountingJournalEntryFromJSON(json: any): AccountingJournalEntry { + return AccountingJournalEntryFromJSONTyped(json, false); +} + +export function AccountingJournalEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingJournalEntry { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'description': json['description'] == null ? undefined : json['description'], + 'postedOn': json['postedOn'] == null ? undefined : json['postedOn'], + 'createdOn': json['createdOn'] == null ? undefined : json['createdOn'], + 'updatedOn': json['updatedOn'] == null ? undefined : json['updatedOn'], + 'journalRef': json['journalRef'] == null ? undefined : JournalRefFromJSON(json['journalRef']), + 'journalLines': json['journalLines'] == null ? undefined : ((json['journalLines'] as Array).map(JournalLineFromJSON)), + 'recordRef': json['recordRef'] == null ? undefined : JournalEntryRecordRefFromJSON(json['recordRef']), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingJournalEntryToJSON(json: any): AccountingJournalEntry { + return AccountingJournalEntryToJSONTyped(json, false); +} + +export function AccountingJournalEntryToJSONTyped(value?: AccountingJournalEntry | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'description': value['description'], + 'postedOn': value['postedOn'], + 'createdOn': value['createdOn'], + 'updatedOn': value['updatedOn'], + 'journalRef': JournalRefToJSON(value['journalRef']), + 'journalLines': value['journalLines'] == null ? undefined : ((value['journalLines'] as Array).map(JournalLineToJSON)), + 'recordRef': JournalEntryRecordRefToJSON(value['recordRef']), + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + -/** @internal */ -export const AccountingJournalEntry$inboundSchema: z.ZodType< - AccountingJournalEntry, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - description: z.nullable(z.string()).optional(), - postedOn: z.string().optional(), - createdOn: z.string().optional(), - updatedOn: z.string().optional(), - journalRef: JournalRef$inboundSchema.optional(), - journalLines: z.nullable(z.array(JournalLine$inboundSchema)).optional(), - recordRef: JournalEntryRecordRef$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); +export interface AccountingJournalEntriesAccountingJournalEntry { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + sourceModifiedDate?: string; + /** + * Unique identifier of the journal entry for the company in the accounting software. + * @type {string} + * @memberof AccountingJournalEntry + */ + id?: string; + /** + * Optional description of the journal entry. + * @type {string} + * @memberof AccountingJournalEntry + */ + description?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + postedOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + createdOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + updatedOn?: string; + /** + * + * @type {JournalRef} + * @memberof AccountingJournalEntry + */ + journalRef?: JournalRef; + /** + * An array of journal lines. + * @type {Array} + * @memberof AccountingJournalEntry + */ + journalLines?: Array | null; + /** + * + * @type {JournalEntryRecordRef} + * @memberof AccountingJournalEntry + */ + recordRef?: JournalEntryRecordRef; + /** + * + * @type {Metadata} + * @memberof AccountingJournalEntry + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingJournalEntry + */ + supplementalData?: SupplementalData; +} + +export interface AccountingJournalEntriesListResponseAccountingJournalEntry { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + sourceModifiedDate?: string; + /** + * Unique identifier of the journal entry for the company in the accounting software. + * @type {string} + * @memberof AccountingJournalEntry + */ + id?: string; + /** + * Optional description of the journal entry. + * @type {string} + * @memberof AccountingJournalEntry + */ + description?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + postedOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + createdOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + updatedOn?: string; + /** + * + * @type {JournalRef} + * @memberof AccountingJournalEntry + */ + journalRef?: JournalRef; + /** + * An array of journal lines. + * @type {Array} + * @memberof AccountingJournalEntry + */ + journalLines?: Array | null; + /** + * + * @type {JournalEntryRecordRef} + * @memberof AccountingJournalEntry + */ + recordRef?: JournalEntryRecordRef; + /** + * + * @type {Metadata} + * @memberof AccountingJournalEntry + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingJournalEntry + */ + supplementalData?: SupplementalData; +} + +export interface AccountingJournalEntryGetResponseAccountingJournalEntry { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + sourceModifiedDate?: string; + /** + * Unique identifier of the journal entry for the company in the accounting software. + * @type {string} + * @memberof AccountingJournalEntry + */ + id?: string; + /** + * Optional description of the journal entry. + * @type {string} + * @memberof AccountingJournalEntry + */ + description?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + postedOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + createdOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + updatedOn?: string; + /** + * + * @type {JournalRef} + * @memberof AccountingJournalEntry + */ + journalRef?: JournalRef; + /** + * An array of journal lines. + * @type {Array} + * @memberof AccountingJournalEntry + */ + journalLines?: Array | null; + /** + * + * @type {JournalEntryRecordRef} + * @memberof AccountingJournalEntry + */ + recordRef?: JournalEntryRecordRef; + /** + * + * @type {Metadata} + * @memberof AccountingJournalEntry + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingJournalEntry + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingJournalEntryResponseAccountingJournalEntry { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + sourceModifiedDate?: string; + /** + * Unique identifier of the journal entry for the company in the accounting software. + * @type {string} + * @memberof AccountingJournalEntry + */ + id?: string; + /** + * Optional description of the journal entry. + * @type {string} + * @memberof AccountingJournalEntry + */ + description?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + postedOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + createdOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + updatedOn?: string; + /** + * + * @type {JournalRef} + * @memberof AccountingJournalEntry + */ + journalRef?: JournalRef; + /** + * An array of journal lines. + * @type {Array} + * @memberof AccountingJournalEntry + */ + journalLines?: Array | null; + /** + * + * @type {JournalEntryRecordRef} + * @memberof AccountingJournalEntry + */ + recordRef?: JournalEntryRecordRef; + /** + * + * @type {Metadata} + * @memberof AccountingJournalEntry + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingJournalEntry + */ + supplementalData?: SupplementalData; +} -export function accountingJournalEntryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingJournalEntry$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingJournalEntry' from JSON`, - ); +export interface ListAccountingJournalEntriesResponseAccountingJournalEntry { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingJournalEntry + */ + sourceModifiedDate?: string; + /** + * Unique identifier of the journal entry for the company in the accounting software. + * @type {string} + * @memberof AccountingJournalEntry + */ + id?: string; + /** + * Optional description of the journal entry. + * @type {string} + * @memberof AccountingJournalEntry + */ + description?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + postedOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + createdOn?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingJournalEntry + */ + updatedOn?: string; + /** + * + * @type {JournalRef} + * @memberof AccountingJournalEntry + */ + journalRef?: JournalRef; + /** + * An array of journal lines. + * @type {Array} + * @memberof AccountingJournalEntry + */ + journalLines?: Array | null; + /** + * + * @type {JournalEntryRecordRef} + * @memberof AccountingJournalEntry + */ + recordRef?: JournalEntryRecordRef; + /** + * + * @type {Metadata} + * @memberof AccountingJournalEntry + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingJournalEntry + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingjournals.ts b/lending/src/sdk/models/shared/accountingjournals.ts index b1f8d559e..c3f87269d 100644 --- a/lending/src/sdk/models/shared/accountingjournals.ts +++ b/lending/src/sdk/models/shared/accountingjournals.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingJournal } from './accountingjournal'; import { - AccountingJournal, - AccountingJournal$inboundSchema, -} from "./accountingjournal.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingJournals = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingJournals$inboundSchema: z.ZodType< - AccountingJournals, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingJournal$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingJournalsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingJournals$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingJournals' from JSON`, - ); + AccountingJournalFromJSON, + AccountingJournalFromJSONTyped, + AccountingJournalToJSON, + AccountingJournalToJSONTyped, +} from './accountingjournal'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface AccountingJournals + */ +export interface AccountingJournals { + /** + * Current page number. + * @type {number} + * @memberof AccountingJournals + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingJournals + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingJournals + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingJournals + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingJournals + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingJournals interface. + */ +export function instanceOfAccountingJournals(value: object): value is AccountingJournals { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingJournalsFromJSON(json: any): AccountingJournals { + return AccountingJournalsFromJSONTyped(json, false); +} + +export function AccountingJournalsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingJournals { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingJournalFromJSON)), + }; +} + +export function AccountingJournalsToJSON(json: any): AccountingJournals { + return AccountingJournalsToJSONTyped(json, false); +} + +export function AccountingJournalsToJSONTyped(value?: AccountingJournals | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingJournalToJSON)), + }; +} + + +export interface AccountingJournalsListResponseAccountingJournals { + /** + * Current page number. + * @type {number} + * @memberof AccountingJournals + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingJournals + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingJournals + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingJournals + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingJournals + */ + results?: Array; +} + +export interface ListAccountingJournalsResponseAccountingJournals { + /** + * Current page number. + * @type {number} + * @memberof AccountingJournals + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingJournals + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingJournals + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingJournals + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingJournals + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingpayment.ts b/lending/src/sdk/models/shared/accountingpayment.ts index 454450968..1b430b2ef 100644 --- a/lending/src/sdk/models/shared/accountingpayment.ts +++ b/lending/src/sdk/models/shared/accountingpayment.ts @@ -1,117 +1,128 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountingCustomerRef } from './accountingcustomerref'; import { - AccountingCustomerRef, - AccountingCustomerRef$inboundSchema, - AccountingCustomerRef$Outbound, - AccountingCustomerRef$outboundSchema, -} from "./accountingcustomerref.js"; + AccountingCustomerRefFromJSON, + AccountingCustomerRefFromJSONTyped, + AccountingCustomerRefToJSON, + AccountingCustomerRefToJSONTyped, +} from './accountingcustomerref'; +import type { SupplementalData } from './supplementaldata'; import { - AccountRef, - AccountRef$inboundSchema, - AccountRef$Outbound, - AccountRef$outboundSchema, -} from "./accountref.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { PaymentMethodRef } from './paymentmethodref'; import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; + PaymentMethodRefFromJSON, + PaymentMethodRefFromJSONTyped, + PaymentMethodRefToJSON, + PaymentMethodRefToJSONTyped, +} from './paymentmethodref'; +import type { Metadata } from './metadata'; import { - PaymentLine, - PaymentLine$inboundSchema, - PaymentLine$Outbound, - PaymentLine$outboundSchema, -} from "./paymentline.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { AccountRef } from './accountref'; import { - PaymentMethodRef, - PaymentMethodRef$inboundSchema, - PaymentMethodRef$Outbound, - PaymentMethodRef$outboundSchema, -} from "./paymentmethodref.js"; + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; +import type { PaymentLine } from './paymentline'; import { - SupplementalData, - SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, -} from "./supplementaldata.js"; + PaymentLineFromJSON, + PaymentLineFromJSONTyped, + PaymentLineToJSON, + PaymentLineToJSONTyped, +} from './paymentline'; /** - * > **Payments or bill payments?** - * - * @remarks + * > **Payments or bill payments?** * > * > In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/lending-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/lending-api#/schemas/Bill) and credit notes against bills. - * + * * ## Overview - * + * * Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/lending-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/lending-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 software, 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/lending-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: @@ -120,73 +131,73 @@ import { * - 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 software 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", @@ -208,15 +219,17 @@ import { * ] * } * ``` - * + * + * + * * ## 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, @@ -234,7 +247,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Allocation of credit note" * { * "totalAmount": 0, @@ -257,7 +272,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Payment of invoice and payment on account" * { * "totalAmount": 2000, @@ -285,7 +302,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Refund of credit note" * { * "totalAmount": -1000, @@ -303,7 +322,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Refund on accounts receivable account" * { * "totalAmount": -1000, @@ -321,7 +342,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Linked refund on accounts receivable account" * { * "id" : "payment-001", @@ -356,7 +379,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Using a credit note and cash to pay an invoice" * { * "totalAmount": 250, @@ -368,7 +393,7 @@ import { * "type": "Invoice", * "id": "x", * "amount": -750 - * }, + * }, * { * "type": "CreditNote", * "id": "y", @@ -389,9 +414,11 @@ import { * ] * } * ``` - * + * + * + * * ## Complex examples - * + * * ```json title="Use two credit notes and 1000 in to "bank" (cash, cheque etc.) to pay invoice" * { * "totalAmount": 1000, @@ -439,7 +466,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Pay an invoice with two credit notes and cash, with 1000 left 'on account'" * { * "totalAmount": 2000, @@ -497,7 +526,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Two credit notes pay two invoices with no allocation amount specified" * { * "totalAmount": 0, @@ -530,7 +561,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Two credit notes and cash pay three invoices with no allocation amount specified, and refund cash" * { * "totalAmount": 2000, @@ -594,9 +627,11 @@ import { * ] * } * ``` - * + * + * + * * 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", @@ -626,7 +661,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="February" * { * "id": "001", @@ -666,7 +703,9 @@ import { * ] * } * ``` - * + * + * + * * ```json title="Two credit notes and some cash pay two invoices with no allocations specified" * { * "totalAmount": 500, @@ -695,204 +734,2015 @@ import { * ] * } * ``` + * @export + * @interface AccountingPayment */ -export type AccountingPayment = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the payment, unique to the company in the accounting software. - */ - id?: string | undefined; - customerRef?: AccountingCustomerRef | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * The payment method the record is linked to in the accounting or commerce software. - */ - paymentMethodRef?: PaymentMethodRef | undefined; - /** - * 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. - */ - totalAmount?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date: string; - /** - * Any additional information associated with the payment. - */ - note?: string | null | undefined; - /** - * An array of payment lines. - */ - lines?: Array | null | undefined; - /** - * Friendly reference for the payment. - */ - reference?: string | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export interface AccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} -/** @internal */ -export const AccountingPayment$inboundSchema: z.ZodType< - AccountingPayment, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - customerRef: AccountingCustomerRef$inboundSchema.optional(), - accountRef: AccountRef$inboundSchema.optional(), - paymentMethodRef: PaymentMethodRef$inboundSchema.optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - date: z.string(), - note: z.nullable(z.string()).optional(), - lines: z.nullable(z.array(PaymentLine$inboundSchema)).optional(), - reference: z.nullable(z.string()).optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); -/** @internal */ -export type AccountingPayment$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - customerRef?: AccountingCustomerRef$Outbound | undefined; - accountRef?: AccountRef$Outbound | undefined; - paymentMethodRef?: PaymentMethodRef$Outbound | undefined; - totalAmount?: number | undefined; - currency?: string | undefined; - currencyRate?: number | null | undefined; - date: string; - note?: string | null | undefined; - lines?: Array | null | undefined; - reference?: string | null | undefined; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; +/** + * Check if a given object implements the AccountingPayment interface. + */ +export function instanceOfAccountingPayment(value: object): value is AccountingPayment { + if (!('date' in value) || value['date'] === undefined) return false; + return true; +} -/** @internal */ -export const AccountingPayment$outboundSchema: z.ZodType< - AccountingPayment$Outbound, - z.ZodTypeDef, - AccountingPayment -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - customerRef: AccountingCustomerRef$outboundSchema.optional(), - accountRef: AccountRef$outboundSchema.optional(), - paymentMethodRef: PaymentMethodRef$outboundSchema.optional(), - totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), - currency: z.string().optional(), - currencyRate: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - date: z.string(), - note: z.nullable(z.string()).optional(), - lines: z.nullable(z.array(PaymentLine$outboundSchema)).optional(), - reference: z.nullable(z.string()).optional(), - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); +export function AccountingPaymentFromJSON(json: any): AccountingPayment { + return AccountingPaymentFromJSONTyped(json, false); +} -export function accountingPaymentToJSON( - accountingPayment: AccountingPayment, -): string { - return JSON.stringify( - AccountingPayment$outboundSchema.parse(accountingPayment), - ); +export function AccountingPaymentFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingPayment { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'customerRef': json['customerRef'] == null ? undefined : AccountingCustomerRefFromJSON(json['customerRef']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'paymentMethodRef': json['paymentMethodRef'] == null ? undefined : PaymentMethodRefFromJSON(json['paymentMethodRef']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'date': json['date'], + 'note': json['note'] == null ? undefined : json['note'], + 'lines': json['lines'] == null ? undefined : ((json['lines'] as Array).map(PaymentLineFromJSON)), + 'reference': json['reference'] == null ? undefined : json['reference'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; } -export function accountingPaymentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingPayment$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingPayment' from JSON`, - ); + +export function AccountingPaymentToJSON(json: any): AccountingPayment { + return AccountingPaymentToJSONTyped(json, false); +} + +export function AccountingPaymentToJSONTyped(value?: AccountingPayment | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'customerRef': AccountingCustomerRefToJSON(value['customerRef']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'paymentMethodRef': PaymentMethodRefToJSON(value['paymentMethodRef']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'date': value['date'], + 'note': value['note'], + 'lines': value['lines'] == null ? undefined : ((value['lines'] as Array).map(PaymentLineToJSON)), + 'reference': value['reference'], + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingCreatePaymentResponseAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface AccountingPaymentGetResponseAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface AccountingPaymentsAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface AccountingPaymentsListResponseAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface CreatePaymentAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface CreatePaymentRequestBody { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface CreatePaymentResponseAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingPaymentResponseAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingPaymentsResponseAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface PaymentCreateRequestBody { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; +} + +export interface PaymentCreateResponseAccountingPayment { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingPayment + */ + sourceModifiedDate?: string; + /** + * Identifier for the payment, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingPayment + */ + id?: string; + /** + * Customer the payment is recorded against in the accounting software. + * @type {AccountingCustomerRef} + * @memberof AccountingPayment + */ + customerRef?: AccountingCustomerRef; + /** + * Account the payment is recorded against in the accounting software. + * @type {AccountRef} + * @memberof AccountingPayment + */ + accountRef?: AccountRef; + /** + * The Payment Method to which the payment is linked in the accounting software. + * @type {PaymentMethodRef} + * @memberof AccountingPayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof AccountingPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof AccountingPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingPayment + */ + date: string; + /** + * Any additional information associated with the payment. + * @type {string} + * @memberof AccountingPayment + */ + note?: string | null; + /** + * An array of payment lines. + * @type {Array} + * @memberof AccountingPayment + */ + lines?: Array | null; + /** + * Friendly reference for the payment. + * @type {string} + * @memberof AccountingPayment + */ + reference?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingPayment + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingPayment + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingpaymentallocation.ts b/lending/src/sdk/models/shared/accountingpaymentallocation.ts index 2c3ecf1dd..42908f608 100644 --- a/lending/src/sdk/models/shared/accountingpaymentallocation.ts +++ b/lending/src/sdk/models/shared/accountingpaymentallocation.ts @@ -1,192 +1,391 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { Allocation } from '../AccountingPaymentAllocationAllocation'; +import { mapValues } from '../../../runtime'; +import type { PaymentAllocationPayment } from './paymentallocationpayment'; import { - PaymentAllocationPayment, - PaymentAllocationPayment$inboundSchema, - PaymentAllocationPayment$Outbound, - PaymentAllocationPayment$outboundSchema, -} from "./paymentallocationpayment.js"; - -export type Allocation = { - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - allocatedOnDate?: string | undefined; - /** - * The total amount that has been allocated. - */ - totalAmount?: Decimal$ | number | undefined; -}; - -export type AccountingPaymentAllocation = { - payment: PaymentAllocationPayment; - allocation: Allocation; -}; - -/** @internal */ -export const Allocation$inboundSchema: z.ZodType< - Allocation, - z.ZodTypeDef, - unknown -> = z.object({ - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - allocatedOnDate: z.string().optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), -}); -/** @internal */ -export type Allocation$Outbound = { - currency?: string | undefined; - currencyRate?: number | null | undefined; - allocatedOnDate?: string | undefined; - totalAmount?: number | undefined; -}; - -/** @internal */ -export const Allocation$outboundSchema: z.ZodType< - Allocation$Outbound, - z.ZodTypeDef, - Allocation -> = z.object({ - currency: z.string().optional(), - currencyRate: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - allocatedOnDate: z.string().optional(), - totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), -}); - -export function allocationToJSON(allocation: Allocation): string { - return JSON.stringify(Allocation$outboundSchema.parse(allocation)); -} -export function allocationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Allocation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Allocation' from JSON`, - ); -} - -/** @internal */ -export const AccountingPaymentAllocation$inboundSchema: z.ZodType< - AccountingPaymentAllocation, - z.ZodTypeDef, - unknown -> = z.object({ - payment: PaymentAllocationPayment$inboundSchema, - allocation: z.lazy(() => Allocation$inboundSchema), -}); -/** @internal */ -export type AccountingPaymentAllocation$Outbound = { - payment: PaymentAllocationPayment$Outbound; - allocation: Allocation$Outbound; -}; - -/** @internal */ -export const AccountingPaymentAllocation$outboundSchema: z.ZodType< - AccountingPaymentAllocation$Outbound, - z.ZodTypeDef, - AccountingPaymentAllocation -> = z.object({ - payment: PaymentAllocationPayment$outboundSchema, - allocation: z.lazy(() => Allocation$outboundSchema), -}); - -export function accountingPaymentAllocationToJSON( - accountingPaymentAllocation: AccountingPaymentAllocation, -): string { - return JSON.stringify( - AccountingPaymentAllocation$outboundSchema.parse( - accountingPaymentAllocation, - ), - ); -} -export function accountingPaymentAllocationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingPaymentAllocation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingPaymentAllocation' from JSON`, - ); + PaymentAllocationPaymentFromJSON, + PaymentAllocationPaymentFromJSONTyped, + PaymentAllocationPaymentToJSON, + PaymentAllocationPaymentToJSONTyped, +} from './paymentallocationpayment'; +import type { AccountingPaymentAllocationAllocation } from '../AccountingPaymentAllocationAllocation'; +import { + AccountingPaymentAllocationAllocationFromJSON, + AccountingPaymentAllocationAllocationFromJSONTyped, + AccountingPaymentAllocationAllocationToJSON, + AccountingPaymentAllocationAllocationToJSONTyped, +} from '../AccountingPaymentAllocationAllocation'; + +/** + * + * @export + * @interface AccountingPaymentAllocation + */ +export interface AccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: Allocation; +} + +/** + * Check if a given object implements the AccountingPaymentAllocation interface. + */ +export function instanceOfAccountingPaymentAllocation(value: object): value is AccountingPaymentAllocation { + if (!('payment' in value) || value['payment'] === undefined) return false; + if (!('allocation' in value) || value['allocation'] === undefined) return false; + return true; +} + +export function AccountingPaymentAllocationFromJSON(json: any): AccountingPaymentAllocation { + return AccountingPaymentAllocationFromJSONTyped(json, false); +} + +export function AccountingPaymentAllocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingPaymentAllocation { + if (json == null) { + return json; + } + return { + + 'payment': PaymentAllocationPaymentFromJSON(json['payment']), + 'allocation': AccountingPaymentAllocationAllocationFromJSON(json['allocation']), + }; +} + +export function AccountingPaymentAllocationToJSON(json: any): AccountingPaymentAllocation { + return AccountingPaymentAllocationToJSONTyped(json, false); +} + +export function AccountingPaymentAllocationToJSONTyped(value?: AccountingPaymentAllocation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'payment': PaymentAllocationPaymentToJSON(value['payment']), + 'allocation': AccountingPaymentAllocationAllocationToJSON(value['allocation']), + }; +} + + +export interface AccountingBillAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingBillCreditNoteAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingBillCreditNoteGetResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingBillGetResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingCreateDirectCostResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingCreditNoteAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingCreditNoteGetResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingDirectCostAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingDirectCostGetResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingDirectIncomeAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingDirectIncomeGetResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingInvoiceAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface AccountingInvoiceGetResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface GetAccountingBillCreditNoteResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface GetAccountingBillResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface GetAccountingCreditNoteResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface GetAccountingDirectCostResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface GetAccountingDirectIncomeResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface GetAccountingInvoiceResponseAccountingPaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; +} + +export interface PaymentAllocation { + /** + * + * @type {PaymentAllocationPayment} + * @memberof AccountingPaymentAllocation + */ + payment: PaymentAllocationPayment; + /** + * + * @type {AccountingPaymentAllocationAllocation} + * @memberof AccountingPaymentAllocation + */ + allocation: AccountingPaymentAllocationAllocation; } diff --git a/lending/src/sdk/models/shared/accountingpayments.ts b/lending/src/sdk/models/shared/accountingpayments.ts index 53d70a481..7712a8871 100644 --- a/lending/src/sdk/models/shared/accountingpayments.ts +++ b/lending/src/sdk/models/shared/accountingpayments.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingPayment, - AccountingPayment$inboundSchema, -} from "./accountingpayment.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingPayments = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingPayments$inboundSchema: z.ZodType< - AccountingPayments, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingPayment$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingPaymentsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingPayments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingPayments' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingPayment } from './accountingpayment'; +import { + AccountingPaymentFromJSON, + AccountingPaymentFromJSONTyped, + AccountingPaymentToJSON, + AccountingPaymentToJSONTyped, +} from './accountingpayment'; + +/** + * + * @export + * @interface AccountingPayments + */ +export interface AccountingPayments { + /** + * Current page number. + * @type {number} + * @memberof AccountingPayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingPayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingPayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingPayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingPayments + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingPayments interface. + */ +export function instanceOfAccountingPayments(value: object): value is AccountingPayments { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingPaymentsFromJSON(json: any): AccountingPayments { + return AccountingPaymentsFromJSONTyped(json, false); +} + +export function AccountingPaymentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingPayments { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingPaymentFromJSON)), + }; +} + +export function AccountingPaymentsToJSON(json: any): AccountingPayments { + return AccountingPaymentsToJSONTyped(json, false); +} + +export function AccountingPaymentsToJSONTyped(value?: AccountingPayments | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingPaymentToJSON)), + }; +} + + +export interface AccountingPaymentsListResponseAccountingPayments { + /** + * Current page number. + * @type {number} + * @memberof AccountingPayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingPayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingPayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingPayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingPayments + */ + results?: Array; +} + +export interface ListAccountingPaymentsResponseAccountingPayments { + /** + * Current page number. + * @type {number} + * @memberof AccountingPayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingPayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingPayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingPayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingPayments + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingprofitandlossreport.ts b/lending/src/sdk/models/shared/accountingprofitandlossreport.ts index 736a8ddbf..33595cff0 100644 --- a/lending/src/sdk/models/shared/accountingprofitandlossreport.ts +++ b/lending/src/sdk/models/shared/accountingprofitandlossreport.ts @@ -1,118 +1,309 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { ReportBasis } from './reportbasis'; +import { + ReportBasisFromJSON, + ReportBasisFromJSONTyped, + ReportBasisToJSON, + ReportBasisToJSONTyped, +} from './reportbasis'; +import type { ProfitAndLossReport } from './profitandlossreport'; import { - ProfitAndLossReport, - ProfitAndLossReport$inboundSchema, -} from "./profitandlossreport.js"; -import { ReportBasis, ReportBasis$inboundSchema } from "./reportbasis.js"; + ProfitAndLossReportFromJSON, + ProfitAndLossReportFromJSONTyped, + ProfitAndLossReportToJSON, + ProfitAndLossReportToJSONTyped, +} from './profitandlossreport'; /** * > **Language tip:** Profit and loss statement is also referred to as **income statement** under US GAAP (Generally Accepted Accounting Principles). - * - * @remarks - * + * * ## 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 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** + * + * + * **Structure of this report** * This report will reflect the structure and line descriptions that the business has set in their own accounting software. - * - * **History** + * + * **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/lending-api#/operations/post-profile-syncSettings). - * - * **Want to pull this in a standardised structure?** + * + * **Want to pull this in a standardised structure?** * Our [Enhanced Financials](https://docs.codat.io/lending/features/financial-statements-overview) endpoints provide the same report under standardized headings, allowing you to pull it in the same format for all of your business customers. + * @export + * @interface AccountingProfitAndLossReport + */ +export interface AccountingProfitAndLossReport { + /** + * An array of profit and loss reports. + * @type {Array} + * @memberof AccountingProfitAndLossReport + */ + reports: Array; + /** + * + * @type {ReportBasis} + * @memberof AccountingProfitAndLossReport + */ + reportBasis: ReportBasis; + /** + * Base currency of the company in which the profit and loss report is presented. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + earliestAvailableMonth?: string; +} + + + +/** + * Check if a given object implements the AccountingProfitAndLossReport interface. */ -export type AccountingProfitAndLossReport = { - /** - * An array of profit and loss reports. - */ - reports: Array; - /** - * The basis of a report. - */ - reportBasis: ReportBasis; - /** - * Base currency of the company in which the profit and loss report is presented. - */ - currency?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - mostRecentAvailableMonth?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - earliestAvailableMonth?: string | undefined; -}; +export function instanceOfAccountingProfitAndLossReport(value: object): value is AccountingProfitAndLossReport { + if (!('reports' in value) || value['reports'] === undefined) return false; + if (!('reportBasis' in value) || value['reportBasis'] === undefined) return false; + return true; +} + +export function AccountingProfitAndLossReportFromJSON(json: any): AccountingProfitAndLossReport { + return AccountingProfitAndLossReportFromJSONTyped(json, false); +} + +export function AccountingProfitAndLossReportFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingProfitAndLossReport { + if (json == null) { + return json; + } + return { + + 'reports': ((json['reports'] as Array).map(ProfitAndLossReportFromJSON)), + 'reportBasis': ReportBasisFromJSON(json['reportBasis']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'mostRecentAvailableMonth': json['mostRecentAvailableMonth'] == null ? undefined : json['mostRecentAvailableMonth'], + 'earliestAvailableMonth': json['earliestAvailableMonth'] == null ? undefined : json['earliestAvailableMonth'], + }; +} -/** @internal */ -export const AccountingProfitAndLossReport$inboundSchema: z.ZodType< - AccountingProfitAndLossReport, - z.ZodTypeDef, - unknown -> = z.object({ - reports: z.array(ProfitAndLossReport$inboundSchema), - reportBasis: ReportBasis$inboundSchema, - currency: z.string().optional(), - mostRecentAvailableMonth: z.string().optional(), - earliestAvailableMonth: z.string().optional(), -}); +export function AccountingProfitAndLossReportToJSON(json: any): AccountingProfitAndLossReport { + return AccountingProfitAndLossReportToJSONTyped(json, false); +} + +export function AccountingProfitAndLossReportToJSONTyped(value?: AccountingProfitAndLossReport | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reports': ((value['reports'] as Array).map(ProfitAndLossReportToJSON)), + 'reportBasis': ReportBasisToJSON(value['reportBasis']), + 'currency': value['currency'], + 'mostRecentAvailableMonth': value['mostRecentAvailableMonth'], + 'earliestAvailableMonth': value['earliestAvailableMonth'], + }; +} + + +export interface AccountingProfitAndLossGetResponseAccountingProfitAndLossReport { + /** + * An array of profit and loss reports. + * @type {Array} + * @memberof AccountingProfitAndLossReport + */ + reports: Array; + /** + * + * @type {ReportBasis} + * @memberof AccountingProfitAndLossReport + */ + reportBasis: ReportBasis; + /** + * Base currency of the company in which the profit and loss report is presented. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + earliestAvailableMonth?: string; +} -export function accountingProfitAndLossReportFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingProfitAndLossReport$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingProfitAndLossReport' from JSON`, - ); +export interface GetAccountingProfitAndLossResponseAccountingProfitAndLossReport { + /** + * An array of profit and loss reports. + * @type {Array} + * @memberof AccountingProfitAndLossReport + */ + reports: Array; + /** + * + * @type {ReportBasis} + * @memberof AccountingProfitAndLossReport + */ + reportBasis: ReportBasis; + /** + * Base currency of the company in which the profit and loss report is presented. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + mostRecentAvailableMonth?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingProfitAndLossReport + */ + earliestAvailableMonth?: string; } diff --git a/lending/src/sdk/models/shared/accountingrecordref.ts b/lending/src/sdk/models/shared/accountingrecordref.ts index 02c3d0e16..f1a9ab0f0 100644 --- a/lending/src/sdk/models/shared/accountingrecordref.ts +++ b/lending/src/sdk/models/shared/accountingrecordref.ts @@ -1,68 +1,480 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +/** + * 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. + * @export + * @interface AccountingRecordRef + */ +export interface AccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} /** - * Links the current record to the underlying record or data type that created it. - * - * @remarks - * - * 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. + * Check if a given object implements the AccountingRecordRef interface. */ -export type AccountingRecordRef = { - /** - * 'id' of the underlying record or data type. - */ - id?: string | undefined; - /** - * Allowed name of the 'dataType'. - */ - dataType?: string | undefined; -}; - -/** @internal */ -export const AccountingRecordRef$inboundSchema: z.ZodType< - AccountingRecordRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: z.string().optional(), -}); -/** @internal */ -export type AccountingRecordRef$Outbound = { - id?: string | undefined; - dataType?: string | undefined; -}; - -/** @internal */ -export const AccountingRecordRef$outboundSchema: z.ZodType< - AccountingRecordRef$Outbound, - z.ZodTypeDef, - AccountingRecordRef -> = z.object({ - id: z.string().optional(), - dataType: z.string().optional(), -}); - -export function accountingRecordRefToJSON( - accountingRecordRef: AccountingRecordRef, -): string { - return JSON.stringify( - AccountingRecordRef$outboundSchema.parse(accountingRecordRef), - ); -} -export function accountingRecordRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingRecordRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingRecordRef' from JSON`, - ); +export function instanceOfAccountingRecordRef(value: object): value is AccountingRecordRef { + return true; +} + +export function AccountingRecordRefFromJSON(json: any): AccountingRecordRef { + return AccountingRecordRefFromJSONTyped(json, false); +} + +export function AccountingRecordRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingRecordRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} + +export function AccountingRecordRefToJSON(json: any): AccountingRecordRef { + return AccountingRecordRefToJSONTyped(json, false); +} + +export function AccountingRecordRefToJSONTyped(value?: AccountingRecordRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataType': value['dataType'], + }; +} + + +export interface AccountingAccountTransactionRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingBillCreditNoteAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingBillCreditNoteGetResponseAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingBillCreditNoteGetResponseRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingBillCreditNoteRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingCreateTransferResponseAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingCreateTransferResponseRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingJournalEntriesRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingJournalEntryGetResponseRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingJournalEntryRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingRecordRefRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingTransferAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingTransferGetResponseAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingTransferGetResponseRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountingTransferRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountsReceivableTrackingAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface AccountsReceivableTrackingRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface GetAccountingBillCreditNoteResponseAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface GetAccountingBillCreditNoteResponseRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface GetAccountingJournalEntryResponseRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface GetAccountingTransferResponseAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface GetAccountingTransferResponseRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface JournalLineTrackingRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface RecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface RecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface TrackingAccountingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; +} + +export interface TrackingRecordReference { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountingRecordRef + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof AccountingRecordRef + */ + dataType?: string; } diff --git a/lending/src/sdk/models/shared/accountingsupplier.ts b/lending/src/sdk/models/shared/accountingsupplier.ts index aea56ec3b..b3b812931 100644 --- a/lending/src/sdk/models/shared/accountingsupplier.ts +++ b/lending/src/sdk/models/shared/accountingsupplier.ts @@ -1,170 +1,1429 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { SupplierStatus } from './supplierstatus'; import { - AccountingAddress, - AccountingAddress$inboundSchema, - AccountingAddress$Outbound, - AccountingAddress$outboundSchema, -} from "./accountingaddress.js"; + SupplierStatusFromJSON, + SupplierStatusFromJSONTyped, + SupplierStatusToJSON, + SupplierStatusToJSONTyped, +} from './supplierstatus'; +import type { SupplementalData } from './supplementaldata'; import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { AccountingAddress } from './accountingaddress'; import { - SupplementalData, - SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, -} from "./supplementaldata.js"; + AccountingAddressFromJSON, + AccountingAddressFromJSONTyped, + AccountingAddressToJSON, + AccountingAddressToJSONTyped, +} from './accountingaddress'; +import type { Metadata } from './metadata'; import { - SupplierStatus, - SupplierStatus$inboundSchema, - SupplierStatus$outboundSchema, -} from "./supplierstatus.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; /** * ## Overview - * - * @remarks - * + * * From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/lending-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/lending-api#/schemas/Bill). + * @export + * @interface AccountingSupplier + */ +export interface AccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + + + +/** + * Check if a given object implements the AccountingSupplier interface. */ -export type AccountingSupplier = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Identifier for the supplier, unique to the company in the accounting software. - */ - id?: string | undefined; - /** - * Name of the supplier as recorded in the accounting system, typically the company name. - */ - supplierName?: string | null | undefined; - /** - * Name of the main contact for the supplier. - */ - contactName?: string | null | undefined; - /** - * Email address that the supplier may be contacted on. - */ - emailAddress?: string | null | undefined; - /** - * Phone number that the supplier may be contacted on. - */ - phone?: string | null | undefined; - /** - * An array of Addresses. - */ - addresses?: Array | null | undefined; - /** - * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. - */ - registrationNumber?: string | null | undefined; - /** - * Supplier's company tax number. - */ - taxNumber?: string | null | undefined; - /** - * Status of the supplier. - */ - status: SupplierStatus; - /** - * Default currency the supplier's transactional data is recorded in. - */ - defaultCurrency?: string | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; - -/** @internal */ -export const AccountingSupplier$inboundSchema: z.ZodType< - AccountingSupplier, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - supplierName: z.nullable(z.string()).optional(), - contactName: z.nullable(z.string()).optional(), - emailAddress: z.nullable(z.string()).optional(), - phone: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(AccountingAddress$inboundSchema)).optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - status: SupplierStatus$inboundSchema, - defaultCurrency: z.nullable(z.string()).optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); -/** @internal */ -export type AccountingSupplier$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - supplierName?: string | null | undefined; - contactName?: string | null | undefined; - emailAddress?: string | null | undefined; - phone?: string | null | undefined; - addresses?: Array | null | undefined; - registrationNumber?: string | null | undefined; - taxNumber?: string | null | undefined; - status: string; - defaultCurrency?: string | null | undefined; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const AccountingSupplier$outboundSchema: z.ZodType< - AccountingSupplier$Outbound, - z.ZodTypeDef, - AccountingSupplier -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - supplierName: z.nullable(z.string()).optional(), - contactName: z.nullable(z.string()).optional(), - emailAddress: z.nullable(z.string()).optional(), - phone: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(AccountingAddress$outboundSchema)).optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - status: SupplierStatus$outboundSchema, - defaultCurrency: z.nullable(z.string()).optional(), - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -export function accountingSupplierToJSON( - accountingSupplier: AccountingSupplier, -): string { - return JSON.stringify( - AccountingSupplier$outboundSchema.parse(accountingSupplier), - ); -} -export function accountingSupplierFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingSupplier$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingSupplier' from JSON`, - ); +export function instanceOfAccountingSupplier(value: object): value is AccountingSupplier { + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} + +export function AccountingSupplierFromJSON(json: any): AccountingSupplier { + return AccountingSupplierFromJSONTyped(json, false); +} + +export function AccountingSupplierFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingSupplier { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'supplierName': json['supplierName'] == null ? undefined : json['supplierName'], + 'contactName': json['contactName'] == null ? undefined : json['contactName'], + 'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'], + 'phone': json['phone'] == null ? undefined : json['phone'], + 'addresses': json['addresses'] == null ? undefined : ((json['addresses'] as Array).map(AccountingAddressFromJSON)), + 'registrationNumber': json['registrationNumber'] == null ? undefined : json['registrationNumber'], + 'taxNumber': json['taxNumber'] == null ? undefined : json['taxNumber'], + 'status': SupplierStatusFromJSON(json['status']), + 'defaultCurrency': json['defaultCurrency'] == null ? undefined : json['defaultCurrency'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingSupplierToJSON(json: any): AccountingSupplier { + return AccountingSupplierToJSONTyped(json, false); +} + +export function AccountingSupplierToJSONTyped(value?: AccountingSupplier | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'supplierName': value['supplierName'], + 'contactName': value['contactName'], + 'emailAddress': value['emailAddress'], + 'phone': value['phone'], + 'addresses': value['addresses'] == null ? undefined : ((value['addresses'] as Array).map(AccountingAddressToJSON)), + 'registrationNumber': value['registrationNumber'], + 'taxNumber': value['taxNumber'], + 'status': SupplierStatusToJSON(value['status']), + 'defaultCurrency': value['defaultCurrency'], + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingCreateSupplierResponseAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface AccountingSupplierGetResponseAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface AccountingSuppliersAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface AccountingSuppliersListResponseAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface CreateSupplierAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface CreateSupplierRequestBody { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface CreateSupplierResponseAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingSupplierResponseAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingSuppliersResponseAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface SupplierCreateRequestBody { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface SupplierCreateResponseAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; +} + +export interface SuppliersAccountingSupplier { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingSupplier + */ + sourceModifiedDate?: string; + /** + * Identifier for the supplier, unique to the company in the accounting software. + * @type {string} + * @memberof AccountingSupplier + */ + id?: string; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + * @type {string} + * @memberof AccountingSupplier + */ + supplierName?: string | null; + /** + * Name of the main contact for the supplier. + * @type {string} + * @memberof AccountingSupplier + */ + contactName?: string | null; + /** + * Email address that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + emailAddress?: string | null; + /** + * Phone number that the supplier may be contacted on. + * @type {string} + * @memberof AccountingSupplier + */ + phone?: string | null; + /** + * An array of Addresses. + * @type {Array} + * @memberof AccountingSupplier + */ + addresses?: Array | null; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + * @type {string} + * @memberof AccountingSupplier + */ + registrationNumber?: string | null; + /** + * Supplier's company tax number. + * @type {string} + * @memberof AccountingSupplier + */ + taxNumber?: string | null; + /** + * + * @type {SupplierStatus} + * @memberof AccountingSupplier + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + * @type {string} + * @memberof AccountingSupplier + */ + defaultCurrency?: string | null; + /** + * + * @type {Metadata} + * @memberof AccountingSupplier + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingSupplier + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingsuppliers.ts b/lending/src/sdk/models/shared/accountingsuppliers.ts index a4372617b..bbb87dcb4 100644 --- a/lending/src/sdk/models/shared/accountingsuppliers.ts +++ b/lending/src/sdk/models/shared/accountingsuppliers.ts @@ -1,58 +1,314 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - AccountingSupplier, - AccountingSupplier$inboundSchema, -} from "./accountingsupplier.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingSuppliers = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingSuppliers$inboundSchema: z.ZodType< - AccountingSuppliers, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingSupplier$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingSuppliersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingSuppliers$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingSuppliers' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { AccountingSupplier } from './accountingsupplier'; +import { + AccountingSupplierFromJSON, + AccountingSupplierFromJSONTyped, + AccountingSupplierToJSON, + AccountingSupplierToJSONTyped, +} from './accountingsupplier'; + +/** + * + * @export + * @interface AccountingSuppliers + */ +export interface AccountingSuppliers { + /** + * Current page number. + * @type {number} + * @memberof AccountingSuppliers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingSuppliers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingSuppliers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingSuppliers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingSuppliers + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingSuppliers interface. + */ +export function instanceOfAccountingSuppliers(value: object): value is AccountingSuppliers { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingSuppliersFromJSON(json: any): AccountingSuppliers { + return AccountingSuppliersFromJSONTyped(json, false); +} + +export function AccountingSuppliersFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingSuppliers { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingSupplierFromJSON)), + }; +} + +export function AccountingSuppliersToJSON(json: any): AccountingSuppliers { + return AccountingSuppliersToJSONTyped(json, false); +} + +export function AccountingSuppliersToJSONTyped(value?: AccountingSuppliers | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingSupplierToJSON)), + }; +} + + +export interface AccountingSuppliersListResponseAccountingSuppliers { + /** + * Current page number. + * @type {number} + * @memberof AccountingSuppliers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingSuppliers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingSuppliers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingSuppliers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingSuppliers + */ + results?: Array; +} + +export interface AccountingSuppliersListResponseSuppliers { + /** + * Current page number. + * @type {number} + * @memberof AccountingSuppliers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingSuppliers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingSuppliers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingSuppliers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingSuppliers + */ + results?: Array; +} + +export interface AccountingSuppliersSuppliers { + /** + * Current page number. + * @type {number} + * @memberof AccountingSuppliers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingSuppliers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingSuppliers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingSuppliers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingSuppliers + */ + results?: Array; +} + +export interface ListAccountingSuppliersResponseAccountingSuppliers { + /** + * Current page number. + * @type {number} + * @memberof AccountingSuppliers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingSuppliers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingSuppliers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingSuppliers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingSuppliers + */ + results?: Array; +} + +export interface ListAccountingSuppliersResponseSuppliers { + /** + * Current page number. + * @type {number} + * @memberof AccountingSuppliers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingSuppliers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingSuppliers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingSuppliers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingSuppliers + */ + results?: Array; +} + +export interface Suppliers { + /** + * Current page number. + * @type {number} + * @memberof AccountingSuppliers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingSuppliers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingSuppliers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingSuppliers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingSuppliers + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountingtransfer.ts b/lending/src/sdk/models/shared/accountingtransfer.ts index ddda5e82d..42e2594c3 100644 --- a/lending/src/sdk/models/shared/accountingtransfer.ts +++ b/lending/src/sdk/models/shared/accountingtransfer.ts @@ -1,217 +1,1494 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { AccountingCreateTransferResponseStatus } from '../_speakeasy_enums'; +import type { AccountingTransferStatus } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import type { TrackingCategoryRef } from './trackingcategoryref'; import { - AccountingRecordRef, - AccountingRecordRef$inboundSchema, - AccountingRecordRef$Outbound, - AccountingRecordRef$outboundSchema, -} from "./accountingrecordref.js"; + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { AccountingRecordRef } from './accountingrecordref'; import { - ContactRef, - ContactRef$inboundSchema, - ContactRef$Outbound, - ContactRef$outboundSchema, -} from "./contactref.js"; + AccountingRecordRefFromJSON, + AccountingRecordRefFromJSONTyped, + AccountingRecordRefToJSON, + AccountingRecordRefToJSONTyped, +} from './accountingrecordref'; +import type { SupplementalData } from './supplementaldata'; import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { Metadata } from './metadata'; import { - SupplementalData, - SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, -} from "./supplementaldata.js"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './metadata'; +import type { ContactRef } from './contactref'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, - TrackingCategoryRef$Outbound, - TrackingCategoryRef$outboundSchema, -} from "./trackingcategoryref.js"; + ContactRefFromJSON, + ContactRefFromJSONTyped, + ContactRefToJSON, + ContactRefToJSONTyped, +} from './contactref'; +import type { TransferAccount } from './transferaccount'; import { - TransferAccount, - TransferAccount$inboundSchema, - TransferAccount$Outbound, - TransferAccount$outboundSchema, -} from "./transferaccount.js"; + TransferAccountFromJSON, + TransferAccountFromJSONTyped, + TransferAccountToJSON, + TransferAccountToJSONTyped, +} from './transferaccount'; /** - * The status of the transfer in the account + * 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/lending-api#/schemas/AccountTransaction). + * @export + * @interface AccountingTransfer */ -export const AccountingTransferStatus = { - Unknown: "Unknown", - Unreconciled: "Unreconciled", - Reconciled: "Reconciled", - Void: "Void", -} as const; +export interface AccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + + /** - * The status of the transfer in the account + * @export */ -export type AccountingTransferStatus = ClosedEnum< - typeof AccountingTransferStatus ->; +export const AccountingTransferStatusEnum = { + Unknown: 'Unknown', + Unreconciled: 'Unreconciled', + Reconciled: 'Reconciled', + Void: 'Void' +} as const; +export type AccountingTransferStatusEnum = typeof AccountingTransferStatusEnum[keyof typeof AccountingTransferStatusEnum]; + /** - * 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/lending-api#/schemas/AccountTransaction). + * Check if a given object implements the AccountingTransfer interface. */ -export type AccountingTransfer = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * Unique identifier for the transfer. - */ - id?: string | undefined; - /** - * Description of the transfer. - */ - description?: string | null | undefined; - contactRef?: ContactRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * Account details of the account sending or receiving the transfer. - */ - from?: TransferAccount | undefined; - /** - * Account details of the account sending or receiving the transfer. - */ - to?: TransferAccount | undefined; - /** - * The status of the transfer in the account - */ - status?: AccountingTransferStatus | null | undefined; - /** - * Reference to the tracking categories this transfer is being tracked against. - */ - trackingCategoryRefs?: Array | null | undefined; - /** - * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. - */ - depositedRecordRefs?: Array | null | undefined; - metadata?: Metadata | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; - -/** @internal */ -export const AccountingTransferStatus$inboundSchema: z.ZodNativeEnum< - typeof AccountingTransferStatus -> = z.nativeEnum(AccountingTransferStatus); -/** @internal */ -export const AccountingTransferStatus$outboundSchema: z.ZodNativeEnum< - typeof AccountingTransferStatus -> = AccountingTransferStatus$inboundSchema; - -/** @internal */ -export const AccountingTransfer$inboundSchema: z.ZodType< - AccountingTransfer, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - description: z.nullable(z.string()).optional(), - contactRef: ContactRef$inboundSchema.optional(), - date: z.string().optional(), - from: TransferAccount$inboundSchema.optional(), - to: TransferAccount$inboundSchema.optional(), - status: z.nullable(AccountingTransferStatus$inboundSchema).optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) - .optional(), - depositedRecordRefs: z.nullable(z.array(AccountingRecordRef$inboundSchema)) - .optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); -/** @internal */ -export type AccountingTransfer$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - description?: string | null | undefined; - contactRef?: ContactRef$Outbound | undefined; - date?: string | undefined; - from?: TransferAccount$Outbound | undefined; - to?: TransferAccount$Outbound | undefined; - status?: string | null | undefined; - trackingCategoryRefs?: Array | null | undefined; - depositedRecordRefs?: Array | null | undefined; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const AccountingTransfer$outboundSchema: z.ZodType< - AccountingTransfer$Outbound, - z.ZodTypeDef, - AccountingTransfer -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - description: z.nullable(z.string()).optional(), - contactRef: ContactRef$outboundSchema.optional(), - date: z.string().optional(), - from: TransferAccount$outboundSchema.optional(), - to: TransferAccount$outboundSchema.optional(), - status: z.nullable(AccountingTransferStatus$outboundSchema).optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$outboundSchema)) - .optional(), - depositedRecordRefs: z.nullable(z.array(AccountingRecordRef$outboundSchema)) - .optional(), - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -export function accountingTransferToJSON( - accountingTransfer: AccountingTransfer, -): string { - return JSON.stringify( - AccountingTransfer$outboundSchema.parse(accountingTransfer), - ); -} -export function accountingTransferFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingTransfer$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingTransfer' from JSON`, - ); +export function instanceOfAccountingTransfer(value: object): value is AccountingTransfer { + return true; +} + +export function AccountingTransferFromJSON(json: any): AccountingTransfer { + return AccountingTransferFromJSONTyped(json, false); +} + +export function AccountingTransferFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingTransfer { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'description': json['description'] == null ? undefined : json['description'], + 'contactRef': json['contactRef'] == null ? undefined : ContactRefFromJSON(json['contactRef']), + 'date': json['date'] == null ? undefined : json['date'], + 'from': json['from'] == null ? undefined : TransferAccountFromJSON(json['from']), + 'to': json['to'] == null ? undefined : TransferAccountFromJSON(json['to']), + 'status': json['status'] == null ? undefined : json['status'], + 'trackingCategoryRefs': json['trackingCategoryRefs'] == null ? undefined : ((json['trackingCategoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'depositedRecordRefs': json['depositedRecordRefs'] == null ? undefined : ((json['depositedRecordRefs'] as Array).map(AccountingRecordRefFromJSON)), + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountingTransferToJSON(json: any): AccountingTransfer { + return AccountingTransferToJSONTyped(json, false); +} + +export function AccountingTransferToJSONTyped(value?: AccountingTransfer | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'description': value['description'], + 'contactRef': ContactRefToJSON(value['contactRef']), + 'date': value['date'], + 'from': TransferAccountToJSON(value['from']), + 'to': TransferAccountToJSON(value['to']), + 'status': value['status'], + 'trackingCategoryRefs': value['trackingCategoryRefs'] == null ? undefined : ((value['trackingCategoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'depositedRecordRefs': value['depositedRecordRefs'] == null ? undefined : ((value['depositedRecordRefs'] as Array).map(AccountingRecordRefToJSON)), + 'metadata': MetadataToJSON(value['metadata']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingCreateTransferResponseAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingCreateTransferResponseStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface AccountingTransferGetResponseAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface AccountingTransfersAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface AccountingTransfersListResponseAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface CreateTransferAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface CreateTransferRequestBody { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface CreateTransferResponseAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingTransferResponseAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingTransfersResponseAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface TransferCreateRequestBody { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; +} + +export interface TransferCreateResponseAccountingTransfer { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof AccountingTransfer + */ + sourceModifiedDate?: string; + /** + * Unique identifier for the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + id?: string; + /** + * Description of the transfer. + * @type {string} + * @memberof AccountingTransfer + */ + description?: string | null; + /** + * The customer or supplier for the transfer, if available. + * @type {ContactRef} + * @memberof AccountingTransfer + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AccountingTransfer + */ + date?: string; + /** + * The details of the accounts the transfer is moving from. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + from?: TransferAccount; + /** + * The details of the accounts the transfer is moving to. + * @type {TransferAccount} + * @memberof AccountingTransfer + */ + to?: TransferAccount; + /** + * The status of the transfer in the account + * @type {string} + * @memberof AccountingTransfer + */ + status?: AccountingTransferStatus | null; + /** + * Reference to the tracking categories this transfer is being tracked against. + * @type {Array} + * @memberof AccountingTransfer + */ + trackingCategoryRefs?: Array | null; + /** + * List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer. + * @type {Array} + * @memberof AccountingTransfer + */ + depositedRecordRefs?: Array | null; + /** + * + * @type {Metadata} + * @memberof AccountingTransfer + */ + metadata?: Metadata; + /** + * + * @type {SupplementalData} + * @memberof AccountingTransfer + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountingtransfers.ts b/lending/src/sdk/models/shared/accountingtransfers.ts index b802bb8b2..64b1236d9 100644 --- a/lending/src/sdk/models/shared/accountingtransfers.ts +++ b/lending/src/sdk/models/shared/accountingtransfers.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingTransfer } from './accountingtransfer'; import { - AccountingTransfer, - AccountingTransfer$inboundSchema, -} from "./accountingtransfer.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type AccountingTransfers = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const AccountingTransfers$inboundSchema: z.ZodType< - AccountingTransfers, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(AccountingTransfer$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function accountingTransfersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountingTransfers$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountingTransfers' from JSON`, - ); + AccountingTransferFromJSON, + AccountingTransferFromJSONTyped, + AccountingTransferToJSON, + AccountingTransferToJSONTyped, +} from './accountingtransfer'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface AccountingTransfers + */ +export interface AccountingTransfers { + /** + * Current page number. + * @type {number} + * @memberof AccountingTransfers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingTransfers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingTransfers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingTransfers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingTransfers + */ + results?: Array; +} + +/** + * Check if a given object implements the AccountingTransfers interface. + */ +export function instanceOfAccountingTransfers(value: object): value is AccountingTransfers { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function AccountingTransfersFromJSON(json: any): AccountingTransfers { + return AccountingTransfersFromJSONTyped(json, false); +} + +export function AccountingTransfersFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountingTransfers { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(AccountingTransferFromJSON)), + }; +} + +export function AccountingTransfersToJSON(json: any): AccountingTransfers { + return AccountingTransfersToJSONTyped(json, false); +} + +export function AccountingTransfersToJSONTyped(value?: AccountingTransfers | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(AccountingTransferToJSON)), + }; +} + + +export interface AccountingTransfersListResponseAccountingTransfers { + /** + * Current page number. + * @type {number} + * @memberof AccountingTransfers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingTransfers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingTransfers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingTransfers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingTransfers + */ + results?: Array; +} + +export interface ListAccountingTransfersResponseAccountingTransfers { + /** + * Current page number. + * @type {number} + * @memberof AccountingTransfers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof AccountingTransfers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof AccountingTransfers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof AccountingTransfers + */ + links: Links; + /** + * + * @type {Array} + * @memberof AccountingTransfers + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/accountinstitution.ts b/lending/src/sdk/models/shared/accountinstitution.ts index 0e615f5ae..bd06e493b 100644 --- a/lending/src/sdk/models/shared/accountinstitution.ts +++ b/lending/src/sdk/models/shared/accountinstitution.ts @@ -1,64 +1,188 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * The bank or other financial institution providing the account. + * @export + * @interface AccountInstitution */ -export type AccountInstitution = { - /** - * The institution's ID, according to the provider. - */ - id?: string | undefined; - /** - * The institution's name, according to the underlying provider. - */ - name?: string | undefined; -}; +export interface AccountInstitution { + [key: string]: any | any; + /** + * The institution's ID, according to the provider. + * @type {string} + * @memberof AccountInstitution + */ + id?: string; + /** + * The institution's name, according to the underlying provider. + * @type {string} + * @memberof AccountInstitution + */ + name?: string; +} + +/** + * Check if a given object implements the AccountInstitution interface. + */ +export function instanceOfAccountInstitution(value: object): value is AccountInstitution { + return true; +} + +export function AccountInstitutionFromJSON(json: any): AccountInstitution { + return AccountInstitutionFromJSONTyped(json, false); +} + +export function AccountInstitutionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountInstitution { + if (json == null) { + return json; + } + return { + + ...json, + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function AccountInstitutionToJSON(json: any): AccountInstitution { + return AccountInstitutionToJSONTyped(json, false); +} -/** @internal */ -export const AccountInstitution$inboundSchema: z.ZodType< - AccountInstitution, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), -}); -/** @internal */ -export type AccountInstitution$Outbound = { - id?: string | undefined; - name?: string | undefined; -}; +export function AccountInstitutionToJSONTyped(value?: AccountInstitution | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -/** @internal */ -export const AccountInstitution$outboundSchema: z.ZodType< - AccountInstitution$Outbound, - z.ZodTypeDef, - AccountInstitution -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), -}); + return { + + ...value, + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface BankingAccountAccountInstitution { + [key: string]: any | any; + /** + * The institution's ID, according to the provider. + * @type {string} + * @memberof AccountInstitution + */ + id?: string; + /** + * The institution's name, according to the underlying provider. + * @type {string} + * @memberof AccountInstitution + */ + name?: string; +} -export function accountInstitutionToJSON( - accountInstitution: AccountInstitution, -): string { - return JSON.stringify( - AccountInstitution$outboundSchema.parse(accountInstitution), - ); +export interface BankingAccountGetResponseAccountInstitution { + [key: string]: any | any; + /** + * The institution's ID, according to the provider. + * @type {string} + * @memberof AccountInstitution + */ + id?: string; + /** + * The institution's name, according to the underlying provider. + * @type {string} + * @memberof AccountInstitution + */ + name?: string; } -export function accountInstitutionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountInstitution$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountInstitution' from JSON`, - ); + +export interface BankingAccountsAccountInstitution { + [key: string]: any | any; + /** + * The institution's ID, according to the provider. + * @type {string} + * @memberof AccountInstitution + */ + id?: string; + /** + * The institution's name, according to the underlying provider. + * @type {string} + * @memberof AccountInstitution + */ + name?: string; +} + +export interface BankingBankAccountAccountInstitution { + [key: string]: any | any; + /** + * The institution's ID, according to the provider. + * @type {string} + * @memberof AccountInstitution + */ + id?: string; + /** + * The institution's name, according to the underlying provider. + * @type {string} + * @memberof AccountInstitution + */ + name?: string; +} + +export interface BankingBankAccountsAccountInstitution { + [key: string]: any | any; + /** + * The institution's ID, according to the provider. + * @type {string} + * @memberof AccountInstitution + */ + id?: string; + /** + * The institution's name, according to the underlying provider. + * @type {string} + * @memberof AccountInstitution + */ + name?: string; +} + +export interface GetBankingAccountResponseAccountInstitution { + [key: string]: any | any; + /** + * The institution's ID, according to the provider. + * @type {string} + * @memberof AccountInstitution + */ + id?: string; + /** + * The institution's name, according to the underlying provider. + * @type {string} + * @memberof AccountInstitution + */ + name?: string; +} + +export interface UploadBankStatementDataRequestBodyAccountInstitution { + [key: string]: any | any; + /** + * The institution's ID, according to the provider. + * @type {string} + * @memberof AccountInstitution + */ + id?: string; + /** + * The institution's name, according to the underlying provider. + * @type {string} + * @memberof AccountInstitution + */ + name?: string; } diff --git a/lending/src/sdk/models/shared/accountprototype.ts b/lending/src/sdk/models/shared/accountprototype.ts index 989ae2186..e4a89e209 100644 --- a/lending/src/sdk/models/shared/accountprototype.ts +++ b/lending/src/sdk/models/shared/accountprototype.ts @@ -1,223 +1,1223 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; +import type { AccountPrototypeValidDataTypeLinks } from '../_speakeasy_hoisted'; +import type { AccountType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountStatus } from './accountstatus'; +import { + AccountStatusFromJSON, + AccountStatusFromJSONTyped, + AccountStatusToJSON, + AccountStatusToJSONTyped, +} from './accountstatus'; +import type { SupplementalData } from './supplementaldata'; import { - AccountStatus, - AccountStatus$outboundSchema, -} from "./accountstatus.js"; -import { AccountType, AccountType$outboundSchema } from "./accounttype.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { ValidDataTypeLinks } from './validdatatypelinks'; import { - SupplementalData, - SupplementalData$Outbound, - SupplementalData$outboundSchema, -} from "./supplementaldata.js"; + ValidDataTypeLinksFromJSON, + ValidDataTypeLinksFromJSONTyped, + ValidDataTypeLinksToJSON, + ValidDataTypeLinksToJSONTyped, +} from './validdatatypelinks'; /** - * When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. - * - * @remarks - * - * For example, `validDatatypeLinks` might indicate the following references: - * - * - Which tax rates are valid to use on the line item of a bill. - * - Which items can be used when creating an invoice. - * - * You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. - * - * ## `validDatatypeLinks` example - * - * The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. - * - * ```json validDatatypeLinks for an account - * { - * "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - * "nominalCode": "090", - * "name": "Business Bank Account", - * #... - * "validDatatypeLinks": [ - * { - * "property": "Id", - * "links": [ - * "Payment.AccountRef.Id", - * "BillPayment.AccountRef.Id", - * "DirectIncome.LineItems.AccountRef.Id", - * "DirectCost.LineItems.AccountRef.Id" - * ] - * } - * ] - * } - * ``` - * - * ## Support for `validDatatypeLinks` - * - * Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. - * - * If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + * + * @export + * @interface AccountPrototype */ -export type AccountPrototypeValidDataTypeLinks = { - /** - * The property from the account that can be linked. - */ - property?: string | null | undefined; - /** - * Supported `dataTypes` that the record can be linked to. - */ - links?: Array | null | undefined; -}; - -export type AccountPrototype = { - /** - * 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. - */ - nominalCode?: string | null | undefined; - /** - * Name of the account. - */ - name?: string | null | undefined; - /** - * Description for the account. - */ - description?: string | null | undefined; - /** - * Full category of the account. - * - * @remarks - * - * 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. - */ - fullyQualifiedCategory?: string | null | undefined; - /** - * Full name of the account, for example: - * - * @remarks - * - `Cash On Hand` - * - `Rents Held In Trust` - * - `Fixed Asset` - */ - fullyQualifiedName?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Current balance in the account. - */ - currentBalance?: Decimal$ | number | null | undefined; - /** - * Type of account - */ - type?: AccountType | undefined; - /** - * Status of the account - */ - status?: AccountStatus | undefined; - /** - * Confirms whether the account is a bank account or not. - */ - isBankAccount?: boolean | undefined; - /** - * 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](/lending-api#/schemas/ValidDataTypeLinks). - */ - validDatatypeLinks?: - | Array - | null - | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; - -/** @internal */ -export type AccountPrototypeValidDataTypeLinks$Outbound = { - property?: string | null | undefined; - links?: Array | null | undefined; -}; - -/** @internal */ -export const AccountPrototypeValidDataTypeLinks$outboundSchema: z.ZodType< - AccountPrototypeValidDataTypeLinks$Outbound, - z.ZodTypeDef, - AccountPrototypeValidDataTypeLinks -> = z.object({ - property: z.nullable(z.string()).optional(), - links: z.nullable(z.array(z.string())).optional(), -}); - -export function accountPrototypeValidDataTypeLinksToJSON( - accountPrototypeValidDataTypeLinks: AccountPrototypeValidDataTypeLinks, -): string { - return JSON.stringify( - AccountPrototypeValidDataTypeLinks$outboundSchema.parse( - accountPrototypeValidDataTypeLinks, - ), - ); -} - -/** @internal */ -export type AccountPrototype$Outbound = { - nominalCode?: string | null | undefined; - name?: string | null | undefined; - description?: string | null | undefined; - fullyQualifiedCategory?: string | null | undefined; - fullyQualifiedName?: string | null | undefined; - currency?: string | undefined; - currentBalance?: number | null | undefined; - type?: string | undefined; - status?: string | undefined; - isBankAccount?: boolean | undefined; - validDatatypeLinks?: - | Array - | null - | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const AccountPrototype$outboundSchema: z.ZodType< - AccountPrototype$Outbound, - z.ZodTypeDef, - AccountPrototype -> = z.object({ - nominalCode: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - description: z.nullable(z.string()).optional(), - fullyQualifiedCategory: z.nullable(z.string()).optional(), - fullyQualifiedName: z.nullable(z.string()).optional(), - currency: z.string().optional(), - currentBalance: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - type: AccountType$outboundSchema.optional(), - status: AccountStatus$outboundSchema.optional(), - isBankAccount: z.boolean().optional(), - validDatatypeLinks: z.nullable( - z.array(z.lazy(() => AccountPrototypeValidDataTypeLinks$outboundSchema)), - ).optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -export function accountPrototypeToJSON( - accountPrototype: AccountPrototype, -): string { - return JSON.stringify( - AccountPrototype$outboundSchema.parse(accountPrototype), - ); +export interface AccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: AccountType; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + + + +/** + * Check if a given object implements the AccountPrototype interface. + */ +export function instanceOfAccountPrototype(value: object): value is AccountPrototype { + return true; +} + +export function AccountPrototypeFromJSON(json: any): AccountPrototype { + return AccountPrototypeFromJSONTyped(json, false); +} + +export function AccountPrototypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountPrototype { + if (json == null) { + return json; + } + return { + + 'nominalCode': json['nominalCode'] == null ? undefined : json['nominalCode'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'fullyQualifiedCategory': json['fullyQualifiedCategory'] == null ? undefined : json['fullyQualifiedCategory'], + 'fullyQualifiedName': json['fullyQualifiedName'] == null ? undefined : json['fullyQualifiedName'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currentBalance': json['currentBalance'] == null ? undefined : toDecimal(json['currentBalance']), + 'type': json['type'] == null ? undefined : json['type'], + 'status': json['status'] == null ? undefined : AccountStatusFromJSON(json['status']), + 'isBankAccount': json['isBankAccount'] == null ? undefined : json['isBankAccount'], + 'validDatatypeLinks': json['validDatatypeLinks'] == null ? undefined : ((json['validDatatypeLinks'] as Array).map(ValidDataTypeLinksFromJSON)), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function AccountPrototypeToJSON(json: any): AccountPrototype { + return AccountPrototypeToJSONTyped(json, false); +} + +export function AccountPrototypeToJSONTyped(value?: AccountPrototype | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'nominalCode': value['nominalCode'], + 'name': value['name'], + 'description': value['description'], + 'fullyQualifiedCategory': value['fullyQualifiedCategory'], + 'fullyQualifiedName': value['fullyQualifiedName'], + 'currency': value['currency'], + 'currentBalance': fromDecimal(value['currentBalance']), + 'type': value['type'], + 'status': AccountStatusToJSON(value['status']), + 'isBankAccount': value['isBankAccount'], + 'validDatatypeLinks': value['validDatatypeLinks'] == null ? undefined : ((value['validDatatypeLinks'] as Array).map(ValidDataTypeLinksToJSON)), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountCreateRequestBody { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountCreateResponseAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingAccountAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingAccountGetResponseAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingAccountsAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingAccountsListResponseAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingCreateAccountResponseAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface CreateAccountAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface CreateAccountRequestBody { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface CreateAccountResponseAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingAccountResponseAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingAccountsResponseAccountPrototype { + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + nominalCode?: string | null; + /** + * Name of the account. + * @type {string} + * @memberof AccountPrototype + */ + name?: string | null; + /** + * Description for the account. + * @type {string} + * @memberof AccountPrototype + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedCategory?: string | null; + /** + * Full name of the account, for example: + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + * @type {string} + * @memberof AccountPrototype + */ + fullyQualifiedName?: string | null; + /** + * 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. + * @type {string} + * @memberof AccountPrototype + */ + currency?: string; + /** + * Current balance in the account. + * @type {string} + * @memberof AccountPrototype + */ + currentBalance?: Decimal | number | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof AccountPrototype + */ + type?: string; + /** + * + * @type {AccountStatus} + * @memberof AccountPrototype + */ + status?: AccountStatus; + /** + * Confirms whether the account is a bank account or not. + * @type {boolean} + * @memberof AccountPrototype + */ + isBankAccount?: boolean; + /** + * 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](/lending-api#/schemas/ValidDataTypeLinks). + * @type {Array} + * @memberof AccountPrototype + */ + validDatatypeLinks?: Array | null; + /** + * + * @type {SupplementalData} + * @memberof AccountPrototype + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/accountref.ts b/lending/src/sdk/models/shared/accountref.ts index 4031698df..0784583e4 100644 --- a/lending/src/sdk/models/shared/accountref.ts +++ b/lending/src/sdk/models/shared/accountref.ts @@ -1,60 +1,388 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +/** + * 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. + * @export + * @interface AccountRef + */ +export interface AccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} /** - * An account reference containing the account id and name. + * Check if a given object implements the AccountRef interface. */ -export type AccountRef = { - /** - * The id of the account. - */ - id?: string | undefined; - /** - * The name of the account. - */ - name?: string | undefined; -}; - -/** @internal */ -export const AccountRef$inboundSchema: z.ZodType< - AccountRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), -}); -/** @internal */ -export type AccountRef$Outbound = { - id?: string | undefined; - name?: string | undefined; -}; - -/** @internal */ -export const AccountRef$outboundSchema: z.ZodType< - AccountRef$Outbound, - z.ZodTypeDef, - AccountRef -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), -}); - -export function accountRefToJSON(accountRef: AccountRef): string { - return JSON.stringify(AccountRef$outboundSchema.parse(accountRef)); -} -export function accountRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountRef' from JSON`, - ); +export function instanceOfAccountRef(value: object): value is AccountRef { + return true; +} + +export function AccountRefFromJSON(json: any): AccountRef { + return AccountRefFromJSONTyped(json, false); +} + +export function AccountRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function AccountRefToJSON(json: any): AccountRef { + return AccountRefToJSONTyped(json, false); +} + +export function AccountRefToJSONTyped(value?: AccountRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface AccountingBillAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingBillCreditNoteAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingBillPaymentAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingBillPaymentGetResponseAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingBillPaymentsAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingCreatePaymentResponseAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingCreditNoteAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingDirectCostAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingDirectIncomeAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingInvoiceAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingJournalEntryAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingPaymentAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingPaymentAllocationAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingPaymentGetResponseAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface AccountingPaymentsAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface CashFlowTransactionAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface CategorizedBankStatementTransactionsAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface CreatePaymentResponseAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface GetAccountingBillPaymentResponseAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface GetAccountingPaymentResponseAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; +} + +export interface PaymentCreateResponseAccountRef { + /** + * 'id' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + id?: string; + /** + * 'name' from the Accounts data type. + * @type {string} + * @memberof AccountRef + */ + name?: string; } diff --git a/lending/src/sdk/models/shared/accounts.ts b/lending/src/sdk/models/shared/accounts.ts index 19657b3eb..5804378ca 100644 --- a/lending/src/sdk/models/shared/accounts.ts +++ b/lending/src/sdk/models/shared/accounts.ts @@ -1,102 +1,128 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ReportSourceReference } from './reportsourcereference'; +import { + ReportSourceReferenceFromJSON, + ReportSourceReferenceFromJSONTyped, + ReportSourceReferenceToJSON, + ReportSourceReferenceToJSONTyped, +} from './reportsourcereference'; /** - * A source reference containing the `sourceType` object "Banking". + * + * @export + * @interface Accounts */ -export type ReportSourceReference = { - /** - * The data source type. - */ - sourceType?: string | undefined; -}; +export interface Accounts { + /** + * + * @type {ReportSourceReference} + * @memberof Accounts + */ + sourceRef?: ReportSourceReference; + /** + * Name of the banking data source, e.g. "Plaid". + * @type {string} + * @memberof Accounts + */ + platformName?: string; + /** + * The bank or other financial institution providing the account. + * @type {string} + * @memberof Accounts + */ + accountProvider?: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof Accounts + */ + accountName?: string; + /** + * The type of banking account, e.g. credit or debit. + * @type {string} + * @memberof Accounts + */ + accountType?: string; + /** + * 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. + * @type {string} + * @memberof Accounts + */ + currency?: string; + /** + * The balance of the bank account. + * @type {string} + * @memberof Accounts + */ + currentBalance?: Decimal | number; +} -export type Accounts = { - /** - * A source reference containing the `sourceType` object "Banking". - */ - sourceRef?: ReportSourceReference | undefined; - /** - * Name of the banking data source, e.g. "Plaid". - */ - platformName?: string | undefined; - /** - * The bank or other financial institution providing the account. - */ - accountProvider?: string | undefined; - /** - * The name of the account according to the provider. - */ - accountName?: string | undefined; - /** - * The type of banking account, e.g. credit or debit. - */ - accountType?: string | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * The balance of the bank account. - */ - currentBalance?: Decimal$ | number | undefined; -}; +/** + * Check if a given object implements the Accounts interface. + */ +export function instanceOfAccounts(value: object): value is Accounts { + return true; +} -/** @internal */ -export const ReportSourceReference$inboundSchema: z.ZodType< - ReportSourceReference, - z.ZodTypeDef, - unknown -> = z.object({ - sourceType: z.string().optional(), -}); +export function AccountsFromJSON(json: any): Accounts { + return AccountsFromJSONTyped(json, false); +} + +export function AccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Accounts { + if (json == null) { + return json; + } + return { + + 'sourceRef': json['sourceRef'] == null ? undefined : ReportSourceReferenceFromJSON(json['sourceRef']), + 'platformName': json['platformName'] == null ? undefined : json['platformName'], + 'accountProvider': json['accountProvider'] == null ? undefined : json['accountProvider'], + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'accountType': json['accountType'] == null ? undefined : json['accountType'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currentBalance': json['currentBalance'] == null ? undefined : toDecimal(json['currentBalance']), + }; +} -export function reportSourceReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReportSourceReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReportSourceReference' from JSON`, - ); +export function AccountsToJSON(json: any): Accounts { + return AccountsToJSONTyped(json, false); } -/** @internal */ -export const Accounts$inboundSchema: z.ZodType< - Accounts, - z.ZodTypeDef, - unknown -> = z.object({ - sourceRef: z.lazy(() => ReportSourceReference$inboundSchema).optional(), - platformName: z.string().optional(), - accountProvider: z.string().optional(), - accountName: z.string().optional(), - accountType: z.string().optional(), - currency: z.string().optional(), - currentBalance: z.number().transform(v => new Decimal$(v)).optional(), -}); +export function AccountsToJSONTyped(value?: Accounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function accountsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Accounts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Accounts' from JSON`, - ); + return { + + 'sourceRef': ReportSourceReferenceToJSON(value['sourceRef']), + 'platformName': value['platformName'], + 'accountProvider': value['accountProvider'], + 'accountName': value['accountName'], + 'accountType': value['accountType'], + 'currency': value['currency'], + 'currentBalance': fromDecimal(value['currentBalance']), + }; } + diff --git a/lending/src/sdk/models/shared/accountspayabletracking.ts b/lending/src/sdk/models/shared/accountspayabletracking.ts index dffff4860..d60f05402 100644 --- a/lending/src/sdk/models/shared/accountspayabletracking.ts +++ b/lending/src/sdk/models/shared/accountspayabletracking.ts @@ -1,58 +1,197 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { TrackingCategoryRef } from './trackingcategoryref'; +import { + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { AccountingCustomerRef } from './accountingcustomerref'; +import { + AccountingCustomerRefFromJSON, + AccountingCustomerRefFromJSONTyped, + AccountingCustomerRefToJSON, + AccountingCustomerRefToJSONTyped, +} from './accountingcustomerref'; +import type { ProjectRef } from './projectref'; import { - AccountingCustomerRef, - AccountingCustomerRef$inboundSchema, -} from "./accountingcustomerref.js"; -import { BilledToType, BilledToType$inboundSchema } from "./billedtotype.js"; -import { ProjectRef, ProjectRef$inboundSchema } from "./projectref.js"; + ProjectRefFromJSON, + ProjectRefFromJSONTyped, + ProjectRefToJSON, + ProjectRefToJSONTyped, +} from './projectref'; +import type { BilledToType } from './billedtotype'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, -} from "./trackingcategoryref.js"; + BilledToTypeFromJSON, + BilledToTypeFromJSONTyped, + BilledToTypeToJSON, + BilledToTypeToJSONTyped, +} from './billedtotype'; /** * Categories, and a project and customer, against which the item is tracked. + * @export + * @interface AccountsPayableTracking + */ +export interface AccountsPayableTracking { + /** + * + * @type {Array} + * @memberof AccountsPayableTracking + */ + categoryRefs: Array; + /** + * + * @type {AccountingCustomerRef} + * @memberof AccountsPayableTracking + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {ProjectRef} + * @memberof AccountsPayableTracking + */ + projectRef?: ProjectRef; + /** + * + * @type {BilledToType} + * @memberof AccountsPayableTracking + */ + isBilledTo: BilledToType; + /** + * + * @type {BilledToType} + * @memberof AccountsPayableTracking + */ + isRebilledTo: BilledToType; +} + + + +/** + * Check if a given object implements the AccountsPayableTracking interface. */ -export type AccountsPayableTracking = { - categoryRefs: Array; - customerRef?: AccountingCustomerRef | undefined; - projectRef?: ProjectRef | undefined; - /** - * Defines if the invoice or credit note is billed/rebilled to a project or customer. - */ - isBilledTo: BilledToType; - /** - * Defines if the invoice or credit note is billed/rebilled to a project or customer. - */ - isRebilledTo: BilledToType; -}; - -/** @internal */ -export const AccountsPayableTracking$inboundSchema: z.ZodType< - AccountsPayableTracking, - z.ZodTypeDef, - unknown -> = z.object({ - categoryRefs: z.array(TrackingCategoryRef$inboundSchema), - customerRef: AccountingCustomerRef$inboundSchema.optional(), - projectRef: ProjectRef$inboundSchema.optional(), - isBilledTo: BilledToType$inboundSchema, - isRebilledTo: BilledToType$inboundSchema, -}); - -export function accountsPayableTrackingFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountsPayableTracking$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountsPayableTracking' from JSON`, - ); +export function instanceOfAccountsPayableTracking(value: object): value is AccountsPayableTracking { + if (!('categoryRefs' in value) || value['categoryRefs'] === undefined) return false; + if (!('isBilledTo' in value) || value['isBilledTo'] === undefined) return false; + if (!('isRebilledTo' in value) || value['isRebilledTo'] === undefined) return false; + return true; +} + +export function AccountsPayableTrackingFromJSON(json: any): AccountsPayableTracking { + return AccountsPayableTrackingFromJSONTyped(json, false); +} + +export function AccountsPayableTrackingFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountsPayableTracking { + if (json == null) { + return json; + } + return { + + 'categoryRefs': ((json['categoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'customerRef': json['customerRef'] == null ? undefined : AccountingCustomerRefFromJSON(json['customerRef']), + 'projectRef': json['projectRef'] == null ? undefined : ProjectRefFromJSON(json['projectRef']), + 'isBilledTo': BilledToTypeFromJSON(json['isBilledTo']), + 'isRebilledTo': BilledToTypeFromJSON(json['isRebilledTo']), + }; +} + +export function AccountsPayableTrackingToJSON(json: any): AccountsPayableTracking { + return AccountsPayableTrackingToJSONTyped(json, false); +} + +export function AccountsPayableTrackingToJSONTyped(value?: AccountsPayableTracking | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'categoryRefs': ((value['categoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'customerRef': AccountingCustomerRefToJSON(value['customerRef']), + 'projectRef': ProjectRefToJSON(value['projectRef']), + 'isBilledTo': BilledToTypeToJSON(value['isBilledTo']), + 'isRebilledTo': BilledToTypeToJSON(value['isRebilledTo']), + }; +} + + +export interface AccountingBillAccountsPayableTracking { + /** + * + * @type {Array} + * @memberof AccountsPayableTracking + */ + categoryRefs: Array; + /** + * + * @type {AccountingCustomerRef} + * @memberof AccountsPayableTracking + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {ProjectRef} + * @memberof AccountsPayableTracking + */ + projectRef?: ProjectRef; + /** + * + * @type {BilledToType} + * @memberof AccountsPayableTracking + */ + isBilledTo: BilledToType; + /** + * + * @type {BilledToType} + * @memberof AccountsPayableTracking + */ + isRebilledTo: BilledToType; +} + +export interface AccountingBillCreditNoteAccountsPayableTracking { + /** + * + * @type {Array} + * @memberof AccountsPayableTracking + */ + categoryRefs: Array; + /** + * + * @type {AccountingCustomerRef} + * @memberof AccountsPayableTracking + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {ProjectRef} + * @memberof AccountsPayableTracking + */ + projectRef?: ProjectRef; + /** + * + * @type {BilledToType} + * @memberof AccountsPayableTracking + */ + isBilledTo: BilledToType; + /** + * + * @type {BilledToType} + * @memberof AccountsPayableTracking + */ + isRebilledTo: BilledToType; } diff --git a/lending/src/sdk/models/shared/accountsreceivabletracking.ts b/lending/src/sdk/models/shared/accountsreceivabletracking.ts index ec86c272e..749369f38 100644 --- a/lending/src/sdk/models/shared/accountsreceivabletracking.ts +++ b/lending/src/sdk/models/shared/accountsreceivabletracking.ts @@ -1,71 +1,224 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { TrackingCategoryRef } from './trackingcategoryref'; +import { + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { AccountingCustomerRef } from './accountingcustomerref'; +import { + AccountingCustomerRefFromJSON, + AccountingCustomerRefFromJSONTyped, + AccountingCustomerRefToJSON, + AccountingCustomerRefToJSONTyped, +} from './accountingcustomerref'; +import type { AccountingRecordRef } from './accountingrecordref'; import { - AccountingCustomerRef, - AccountingCustomerRef$inboundSchema, -} from "./accountingcustomerref.js"; + AccountingRecordRefFromJSON, + AccountingRecordRefFromJSONTyped, + AccountingRecordRefToJSON, + AccountingRecordRefToJSONTyped, +} from './accountingrecordref'; +import type { BilledToType1 } from './billedtotype1'; import { - AccountingRecordRef, - AccountingRecordRef$inboundSchema, -} from "./accountingrecordref.js"; -import { BilledToType1, BilledToType1$inboundSchema } from "./billedtotype1.js"; -import { ProjectRef, ProjectRef$inboundSchema } from "./projectref.js"; + BilledToType1FromJSON, + BilledToType1FromJSONTyped, + BilledToType1ToJSON, + BilledToType1ToJSONTyped, +} from './billedtotype1'; +import type { ProjectRef } from './projectref'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, -} from "./trackingcategoryref.js"; + ProjectRefFromJSON, + ProjectRefFromJSONTyped, + ProjectRefToJSON, + ProjectRefToJSONTyped, +} from './projectref'; /** * Categories, and a project and customer, against which the item is tracked. + * @export + * @interface AccountsReceivableTracking */ -export type AccountsReceivableTracking = { - categoryRefs: Array; - customerRef?: AccountingCustomerRef | undefined; - projectRef?: ProjectRef | undefined; - /** - * Defines if the bill or bill credit note is billed/rebilled to a project. - */ - isBilledTo: BilledToType1; - /** - * Defines if the bill or bill credit note is billed/rebilled to a project. - */ - isRebilledTo: BilledToType1; - /** - * Links the current record to the underlying record or data type that created it. - * - * @remarks - * - * 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. - */ - recordRef?: AccountingRecordRef | undefined; -}; +export interface AccountsReceivableTracking { + /** + * + * @type {Array} + * @memberof AccountsReceivableTracking + */ + categoryRefs: Array; + /** + * + * @type {AccountingCustomerRef} + * @memberof AccountsReceivableTracking + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {ProjectRef} + * @memberof AccountsReceivableTracking + */ + projectRef?: ProjectRef; + /** + * + * @type {BilledToType1} + * @memberof AccountsReceivableTracking + */ + isBilledTo: BilledToType1; + /** + * + * @type {BilledToType1} + * @memberof AccountsReceivableTracking + */ + isRebilledTo: BilledToType1; + /** + * + * @type {AccountingRecordRef} + * @memberof AccountsReceivableTracking + */ + recordRef?: AccountingRecordRef; +} + + -/** @internal */ -export const AccountsReceivableTracking$inboundSchema: z.ZodType< - AccountsReceivableTracking, - z.ZodTypeDef, - unknown -> = z.object({ - categoryRefs: z.array(TrackingCategoryRef$inboundSchema), - customerRef: AccountingCustomerRef$inboundSchema.optional(), - projectRef: ProjectRef$inboundSchema.optional(), - isBilledTo: BilledToType1$inboundSchema, - isRebilledTo: BilledToType1$inboundSchema, - recordRef: AccountingRecordRef$inboundSchema.optional(), -}); +/** + * Check if a given object implements the AccountsReceivableTracking interface. + */ +export function instanceOfAccountsReceivableTracking(value: object): value is AccountsReceivableTracking { + if (!('categoryRefs' in value) || value['categoryRefs'] === undefined) return false; + if (!('isBilledTo' in value) || value['isBilledTo'] === undefined) return false; + if (!('isRebilledTo' in value) || value['isRebilledTo'] === undefined) return false; + return true; +} + +export function AccountsReceivableTrackingFromJSON(json: any): AccountsReceivableTracking { + return AccountsReceivableTrackingFromJSONTyped(json, false); +} + +export function AccountsReceivableTrackingFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountsReceivableTracking { + if (json == null) { + return json; + } + return { + + 'categoryRefs': ((json['categoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'customerRef': json['customerRef'] == null ? undefined : AccountingCustomerRefFromJSON(json['customerRef']), + 'projectRef': json['projectRef'] == null ? undefined : ProjectRefFromJSON(json['projectRef']), + 'isBilledTo': BilledToType1FromJSON(json['isBilledTo']), + 'isRebilledTo': BilledToType1FromJSON(json['isRebilledTo']), + 'recordRef': json['recordRef'] == null ? undefined : AccountingRecordRefFromJSON(json['recordRef']), + }; +} + +export function AccountsReceivableTrackingToJSON(json: any): AccountsReceivableTracking { + return AccountsReceivableTrackingToJSONTyped(json, false); +} + +export function AccountsReceivableTrackingToJSONTyped(value?: AccountsReceivableTracking | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'categoryRefs': ((value['categoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'customerRef': AccountingCustomerRefToJSON(value['customerRef']), + 'projectRef': ProjectRefToJSON(value['projectRef']), + 'isBilledTo': BilledToType1ToJSON(value['isBilledTo']), + 'isRebilledTo': BilledToType1ToJSON(value['isRebilledTo']), + 'recordRef': AccountingRecordRefToJSON(value['recordRef']), + }; +} + + +export interface AccountingCreditNoteAccountsReceivableTracking { + /** + * + * @type {Array} + * @memberof AccountsReceivableTracking + */ + categoryRefs: Array; + /** + * + * @type {AccountingCustomerRef} + * @memberof AccountsReceivableTracking + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {ProjectRef} + * @memberof AccountsReceivableTracking + */ + projectRef?: ProjectRef; + /** + * + * @type {BilledToType1} + * @memberof AccountsReceivableTracking + */ + isBilledTo: BilledToType1; + /** + * + * @type {BilledToType1} + * @memberof AccountsReceivableTracking + */ + isRebilledTo: BilledToType1; + /** + * + * @type {AccountingRecordRef} + * @memberof AccountsReceivableTracking + */ + recordRef?: AccountingRecordRef; +} -export function accountsReceivableTrackingFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountsReceivableTracking$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountsReceivableTracking' from JSON`, - ); +export interface AccountingInvoiceAccountsReceivableTracking { + /** + * + * @type {Array} + * @memberof AccountsReceivableTracking + */ + categoryRefs: Array; + /** + * + * @type {AccountingCustomerRef} + * @memberof AccountsReceivableTracking + */ + customerRef?: AccountingCustomerRef; + /** + * + * @type {ProjectRef} + * @memberof AccountsReceivableTracking + */ + projectRef?: ProjectRef; + /** + * + * @type {BilledToType1} + * @memberof AccountsReceivableTracking + */ + isBilledTo: BilledToType1; + /** + * + * @type {BilledToType1} + * @memberof AccountsReceivableTracking + */ + isRebilledTo: BilledToType1; + /** + * + * @type {AccountingRecordRef} + * @memberof AccountsReceivableTracking + */ + recordRef?: AccountingRecordRef; } diff --git a/lending/src/sdk/models/shared/accountstatus.ts b/lending/src/sdk/models/shared/accountstatus.ts index 12278d094..fd45be2b9 100644 --- a/lending/src/sdk/models/shared/accountstatus.ts +++ b/lending/src/sdk/models/shared/accountstatus.ts @@ -1,29 +1,55 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Status of the account + * @export */ export const AccountStatus = { - Unknown: "Unknown", - Active: "Active", - Archived: "Archived", - Pending: "Pending", + Unknown: 'Unknown', + Active: 'Active', + Archived: 'Archived', + Pending: 'Pending' } as const; -/** - * Status of the account - */ -export type AccountStatus = ClosedEnum; - -/** @internal */ -export const AccountStatus$inboundSchema: z.ZodNativeEnum< - typeof AccountStatus -> = z.nativeEnum(AccountStatus); -/** @internal */ -export const AccountStatus$outboundSchema: z.ZodNativeEnum< - typeof AccountStatus -> = AccountStatus$inboundSchema; +export type AccountStatus = typeof AccountStatus[keyof typeof AccountStatus]; + + +export function instanceOfAccountStatus(value: any): boolean { + for (const key in AccountStatus) { + if (Object.prototype.hasOwnProperty.call(AccountStatus, key)) { + if (AccountStatus[key as keyof typeof AccountStatus] === value) { + return true; + } + } + } + return false; +} + +export function AccountStatusFromJSON(json: any): AccountStatus { + return AccountStatusFromJSONTyped(json, false); +} + +export function AccountStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountStatus { + return json as AccountStatus; +} + +export function AccountStatusToJSON(value?: AccountStatus | null): any { + return value as any; +} + +export function AccountStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): AccountStatus { + return value as AccountStatus; +} + diff --git a/lending/src/sdk/models/shared/accounttransactionline.ts b/lending/src/sdk/models/shared/accounttransactionline.ts index 76a99d53e..332974612 100644 --- a/lending/src/sdk/models/shared/accounttransactionline.ts +++ b/lending/src/sdk/models/shared/accounttransactionline.ts @@ -1,49 +1,153 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountTransactionLineRecordRef } from './accounttransactionlinerecordref'; import { - AccountTransactionLineRecordRef, - AccountTransactionLineRecordRef$inboundSchema, -} from "./accounttransactionlinerecordref.js"; - -export type AccountTransactionLine = { - /** - * Description of the account transaction. - */ - description?: string | null | undefined; - /** - * Links an account transaction line to the underlying record that created it. - */ - recordRef?: AccountTransactionLineRecordRef | undefined; - /** - * Amount in the bill payment currency. - */ - amount?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const AccountTransactionLine$inboundSchema: z.ZodType< - AccountTransactionLine, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.nullable(z.string()).optional(), - recordRef: AccountTransactionLineRecordRef$inboundSchema.optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), -}); - -export function accountTransactionLineFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountTransactionLine$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountTransactionLine' from JSON`, - ); + AccountTransactionLineRecordRefFromJSON, + AccountTransactionLineRecordRefFromJSONTyped, + AccountTransactionLineRecordRefToJSON, + AccountTransactionLineRecordRefToJSONTyped, +} from './accounttransactionlinerecordref'; + +/** + * + * @export + * @interface AccountTransactionLine + */ +export interface AccountTransactionLine { + /** + * Description of the account transaction. + * @type {string} + * @memberof AccountTransactionLine + */ + description?: string | null; + /** + * + * @type {AccountTransactionLineRecordRef} + * @memberof AccountTransactionLine + */ + recordRef?: AccountTransactionLineRecordRef; + /** + * Amount in the bill payment currency. + * @type {string} + * @memberof AccountTransactionLine + */ + amount?: Decimal | number; +} + +/** + * Check if a given object implements the AccountTransactionLine interface. + */ +export function instanceOfAccountTransactionLine(value: object): value is AccountTransactionLine { + return true; +} + +export function AccountTransactionLineFromJSON(json: any): AccountTransactionLine { + return AccountTransactionLineFromJSONTyped(json, false); +} + +export function AccountTransactionLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountTransactionLine { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'recordRef': json['recordRef'] == null ? undefined : AccountTransactionLineRecordRefFromJSON(json['recordRef']), + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + }; +} + +export function AccountTransactionLineToJSON(json: any): AccountTransactionLine { + return AccountTransactionLineToJSONTyped(json, false); +} + +export function AccountTransactionLineToJSONTyped(value?: AccountTransactionLine | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'description': value['description'], + 'recordRef': AccountTransactionLineRecordRefToJSON(value['recordRef']), + 'amount': fromDecimal(value['amount']), + }; +} + + +export interface AccountingAccountTransactionAccountTransactionLine { + /** + * Description of the account transaction. + * @type {string} + * @memberof AccountTransactionLine + */ + description?: string | null; + /** + * + * @type {AccountTransactionLineRecordRef} + * @memberof AccountTransactionLine + */ + recordRef?: AccountTransactionLineRecordRef; + /** + * Amount in the bill payment currency. + * @type {string} + * @memberof AccountTransactionLine + */ + amount?: Decimal | number; +} + +export interface AccountingAccountTransactionGetResponseAccountTransactionLine { + /** + * Description of the account transaction. + * @type {string} + * @memberof AccountTransactionLine + */ + description?: string | null; + /** + * + * @type {AccountTransactionLineRecordRef} + * @memberof AccountTransactionLine + */ + recordRef?: AccountTransactionLineRecordRef; + /** + * Amount in the bill payment currency. + * @type {string} + * @memberof AccountTransactionLine + */ + amount?: Decimal | number; +} + +export interface GetAccountingAccountTransactionResponseAccountTransactionLine { + /** + * Description of the account transaction. + * @type {string} + * @memberof AccountTransactionLine + */ + description?: string | null; + /** + * + * @type {AccountTransactionLineRecordRef} + * @memberof AccountTransactionLine + */ + recordRef?: AccountTransactionLineRecordRef; + /** + * Amount in the bill payment currency. + * @type {string} + * @memberof AccountTransactionLine + */ + amount?: Decimal | number; } diff --git a/lending/src/sdk/models/shared/accounttransactionlinerecordref.ts b/lending/src/sdk/models/shared/accounttransactionlinerecordref.ts index 949842da3..be96085aa 100644 --- a/lending/src/sdk/models/shared/accounttransactionlinerecordref.ts +++ b/lending/src/sdk/models/shared/accounttransactionlinerecordref.ts @@ -1,71 +1,109 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { AccountTransactionLineRecordRefDataType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * Name of underlying data type. + * Links an account transaction line to the underlying record that created it. + * @export + * @interface AccountTransactionLineRecordRef */ -export const AccountTransactionLineRecordRefDataType = { - BankTransactions: "bankTransactions", - BillCreditNotes: "billCreditNotes", - BillPayments: "billPayments", - Bills: "bills", - CreditNotes: "creditNotes", - DirectCosts: "directCosts", - DirectIncomes: "directIncomes", - Invoices: "invoices", - JournalEntries: "journalEntries", - Payments: "payments", - Transfers: "transfers", -} as const; +export interface AccountTransactionLineRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountTransactionLineRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof AccountTransactionLineRecordRef + */ + dataType?: AccountTransactionLineRecordRefDataType; +} + + /** - * Name of underlying data type. + * @export */ -export type AccountTransactionLineRecordRefDataType = ClosedEnum< - typeof AccountTransactionLineRecordRefDataType ->; +export const AccountTransactionLineRecordRefDataTypeEnum = { + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CreditNotes: 'creditNotes', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + JournalEntries: 'journalEntries', + Payments: 'payments', + Transfers: 'transfers' +} as const; +export type AccountTransactionLineRecordRefDataTypeEnum = typeof AccountTransactionLineRecordRefDataTypeEnum[keyof typeof AccountTransactionLineRecordRefDataTypeEnum]; + /** - * Links an account transaction line to the underlying record that created it. + * Check if a given object implements the AccountTransactionLineRecordRef interface. */ -export type AccountTransactionLineRecordRef = { - /** - * 'id' of the underlying record or data type. - */ - id?: string | undefined; - /** - * Name of underlying data type. - */ - dataType?: AccountTransactionLineRecordRefDataType | undefined; -}; +export function instanceOfAccountTransactionLineRecordRef(value: object): value is AccountTransactionLineRecordRef { + return true; +} + +export function AccountTransactionLineRecordRefFromJSON(json: any): AccountTransactionLineRecordRef { + return AccountTransactionLineRecordRefFromJSONTyped(json, false); +} + +export function AccountTransactionLineRecordRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountTransactionLineRecordRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} -/** @internal */ -export const AccountTransactionLineRecordRefDataType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(AccountTransactionLineRecordRefDataType); +export function AccountTransactionLineRecordRefToJSON(json: any): AccountTransactionLineRecordRef { + return AccountTransactionLineRecordRefToJSONTyped(json, false); +} + +export function AccountTransactionLineRecordRefToJSONTyped(value?: AccountTransactionLineRecordRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataType': value['dataType'], + }; +} -/** @internal */ -export const AccountTransactionLineRecordRef$inboundSchema: z.ZodType< - AccountTransactionLineRecordRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: AccountTransactionLineRecordRefDataType$inboundSchema.optional(), -}); -export function accountTransactionLineRecordRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountTransactionLineRecordRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountTransactionLineRecordRef' from JSON`, - ); +export interface AccountingAccountTransactionAccountTransactionLineRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof AccountTransactionLineRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof AccountTransactionLineRecordRef + */ + dataType?: AccountTransactionLineRecordRefDataType; } diff --git a/lending/src/sdk/models/shared/accounttype.ts b/lending/src/sdk/models/shared/accounttype.ts deleted file mode 100644 index c71262dc6..000000000 --- a/lending/src/sdk/models/shared/accounttype.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -/** - * Type of account - */ -export const AccountType = { - Unknown: "Unknown", - Asset: "Asset", - Expense: "Expense", - Income: "Income", - Liability: "Liability", - Equity: "Equity", -} as const; -/** - * Type of account - */ -export type AccountType = ClosedEnum; - -/** @internal */ -export const AccountType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(AccountType); -/** @internal */ -export const AccountType$outboundSchema: z.ZodNativeEnum = - AccountType$inboundSchema; diff --git a/lending/src/sdk/models/shared/agedcreditor.ts b/lending/src/sdk/models/shared/agedcreditor.ts index 94a5aa5f0..f6f482383 100644 --- a/lending/src/sdk/models/shared/agedcreditor.ts +++ b/lending/src/sdk/models/shared/agedcreditor.ts @@ -1,49 +1,173 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AgedCurrencyOutstanding } from './agedcurrencyoutstanding'; import { - AgedCurrencyOutstanding, - AgedCurrencyOutstanding$inboundSchema, -} from "./agedcurrencyoutstanding.js"; - -export type AgedCreditor = { - /** - * Supplier ID of the aged creditor. - */ - supplierId?: string | undefined; - /** - * Supplier name of the aged creditor. - */ - supplierName?: string | undefined; - /** - * Array of aged creditors by currency. - */ - agedCurrencyOutstanding?: Array | undefined; -}; - -/** @internal */ -export const AgedCreditor$inboundSchema: z.ZodType< - AgedCreditor, - z.ZodTypeDef, - unknown -> = z.object({ - supplierId: z.string().optional(), - supplierName: z.string().optional(), - agedCurrencyOutstanding: z.array(AgedCurrencyOutstanding$inboundSchema) - .optional(), -}); - -export function agedCreditorFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AgedCreditor$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AgedCreditor' from JSON`, - ); + AgedCurrencyOutstandingFromJSON, + AgedCurrencyOutstandingFromJSONTyped, + AgedCurrencyOutstandingToJSON, + AgedCurrencyOutstandingToJSONTyped, +} from './agedcurrencyoutstanding'; + +/** + * + * @export + * @interface AgedCreditor + */ +export interface AgedCreditor { + /** + * Supplier ID of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierId?: string; + /** + * Supplier name of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierName?: string; + /** + * Array of aged creditors by currency. + * @type {Array} + * @memberof AgedCreditor + */ + agedCurrencyOutstanding?: Array; +} + +/** + * Check if a given object implements the AgedCreditor interface. + */ +export function instanceOfAgedCreditor(value: object): value is AgedCreditor { + return true; +} + +export function AgedCreditorFromJSON(json: any): AgedCreditor { + return AgedCreditorFromJSONTyped(json, false); +} + +export function AgedCreditorFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgedCreditor { + if (json == null) { + return json; + } + return { + + 'supplierId': json['supplierId'] == null ? undefined : json['supplierId'], + 'supplierName': json['supplierName'] == null ? undefined : json['supplierName'], + 'agedCurrencyOutstanding': json['agedCurrencyOutstanding'] == null ? undefined : ((json['agedCurrencyOutstanding'] as Array).map(AgedCurrencyOutstandingFromJSON)), + }; +} + +export function AgedCreditorToJSON(json: any): AgedCreditor { + return AgedCreditorToJSONTyped(json, false); +} + +export function AgedCreditorToJSONTyped(value?: AgedCreditor | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'supplierId': value['supplierId'], + 'supplierName': value['supplierName'], + 'agedCurrencyOutstanding': value['agedCurrencyOutstanding'] == null ? undefined : ((value['agedCurrencyOutstanding'] as Array).map(AgedCurrencyOutstandingToJSON)), + }; +} + + +export interface AccountingAgedCreditorReportAgedCreditor { + /** + * Supplier ID of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierId?: string; + /** + * Supplier name of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierName?: string; + /** + * Array of aged creditors by currency. + * @type {Array} + * @memberof AgedCreditor + */ + agedCurrencyOutstanding?: Array; +} + +export interface AccountingAgedCreditorsReportAgedCreditor { + /** + * Supplier ID of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierId?: string; + /** + * Supplier name of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierName?: string; + /** + * Array of aged creditors by currency. + * @type {Array} + * @memberof AgedCreditor + */ + agedCurrencyOutstanding?: Array; +} + +export interface AccountingAgedCreditorsReportGetResponseAgedCreditor { + /** + * Supplier ID of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierId?: string; + /** + * Supplier name of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierName?: string; + /** + * Array of aged creditors by currency. + * @type {Array} + * @memberof AgedCreditor + */ + agedCurrencyOutstanding?: Array; +} + +export interface GetAccountingAgedCreditorsReportResponseAgedCreditor { + /** + * Supplier ID of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierId?: string; + /** + * Supplier name of the aged creditor. + * @type {string} + * @memberof AgedCreditor + */ + supplierName?: string; + /** + * Array of aged creditors by currency. + * @type {Array} + * @memberof AgedCreditor + */ + agedCurrencyOutstanding?: Array; } diff --git a/lending/src/sdk/models/shared/agedcurrencyoutstanding.ts b/lending/src/sdk/models/shared/agedcurrencyoutstanding.ts index c00df1f99..0acd97e77 100644 --- a/lending/src/sdk/models/shared/agedcurrencyoutstanding.ts +++ b/lending/src/sdk/models/shared/agedcurrencyoutstanding.ts @@ -1,52 +1,129 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AgedOutstandingAmount } from './agedoutstandingamount'; import { - AgedOutstandingAmount, - AgedOutstandingAmount$inboundSchema, -} from "./agedoutstandingamount.js"; - -export type AgedCurrencyOutstanding = { - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Array of outstanding amounts by period. - */ - agedOutstandingAmounts?: Array | undefined; -}; - -/** @internal */ -export const AgedCurrencyOutstanding$inboundSchema: z.ZodType< - AgedCurrencyOutstanding, - z.ZodTypeDef, - unknown -> = z.object({ - currency: z.string().optional(), - agedOutstandingAmounts: z.array(AgedOutstandingAmount$inboundSchema) - .optional(), -}); - -export function agedCurrencyOutstandingFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AgedCurrencyOutstanding$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AgedCurrencyOutstanding' from JSON`, - ); + AgedOutstandingAmountFromJSON, + AgedOutstandingAmountFromJSONTyped, + AgedOutstandingAmountToJSON, + AgedOutstandingAmountToJSONTyped, +} from './agedoutstandingamount'; + +/** + * + * @export + * @interface AgedCurrencyOutstanding + */ +export interface AgedCurrencyOutstanding { + /** + * 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. + * @type {string} + * @memberof AgedCurrencyOutstanding + */ + currency?: string; + /** + * Array of outstanding amounts by period. + * @type {Array} + * @memberof AgedCurrencyOutstanding + */ + agedOutstandingAmounts?: Array; +} + +/** + * Check if a given object implements the AgedCurrencyOutstanding interface. + */ +export function instanceOfAgedCurrencyOutstanding(value: object): value is AgedCurrencyOutstanding { + return true; +} + +export function AgedCurrencyOutstandingFromJSON(json: any): AgedCurrencyOutstanding { + return AgedCurrencyOutstandingFromJSONTyped(json, false); +} + +export function AgedCurrencyOutstandingFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgedCurrencyOutstanding { + if (json == null) { + return json; + } + return { + + 'currency': json['currency'] == null ? undefined : json['currency'], + 'agedOutstandingAmounts': json['agedOutstandingAmounts'] == null ? undefined : ((json['agedOutstandingAmounts'] as Array).map(AgedOutstandingAmountFromJSON)), + }; +} + +export function AgedCurrencyOutstandingToJSON(json: any): AgedCurrencyOutstanding { + return AgedCurrencyOutstandingToJSONTyped(json, false); +} + +export function AgedCurrencyOutstandingToJSONTyped(value?: AgedCurrencyOutstanding | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'currency': value['currency'], + 'agedOutstandingAmounts': value['agedOutstandingAmounts'] == null ? undefined : ((value['agedOutstandingAmounts'] as Array).map(AgedOutstandingAmountToJSON)), + }; +} + + +export interface AccountingAgedCurrencyOutstanding { + /** + * 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. + * @type {string} + * @memberof AgedCurrencyOutstanding + */ + currency?: string; + /** + * Array of outstanding amounts by period. + * @type {Array} + * @memberof AgedCurrencyOutstanding + */ + agedOutstandingAmounts?: Array; +} + +export interface AgedCurrencyOutstandingAccountingAgedCurrencyOutstanding { + /** + * 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. + * @type {string} + * @memberof AgedCurrencyOutstanding + */ + currency?: string; + /** + * Array of outstanding amounts by period. + * @type {Array} + * @memberof AgedCurrencyOutstanding + */ + agedOutstandingAmounts?: Array; } diff --git a/lending/src/sdk/models/shared/ageddebtor.ts b/lending/src/sdk/models/shared/ageddebtor.ts index 562340c8e..b67c09fe6 100644 --- a/lending/src/sdk/models/shared/ageddebtor.ts +++ b/lending/src/sdk/models/shared/ageddebtor.ts @@ -1,49 +1,173 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AgedCurrencyOutstanding } from './agedcurrencyoutstanding'; import { - AgedCurrencyOutstanding, - AgedCurrencyOutstanding$inboundSchema, -} from "./agedcurrencyoutstanding.js"; - -export type AgedDebtor = { - /** - * Customer ID of the aged debtor. - */ - customerId?: string | undefined; - /** - * Customer name of the aged debtor. - */ - customerName?: string | undefined; - /** - * Array of aged debtors by currency. - */ - agedCurrencyOutstanding?: Array | undefined; -}; - -/** @internal */ -export const AgedDebtor$inboundSchema: z.ZodType< - AgedDebtor, - z.ZodTypeDef, - unknown -> = z.object({ - customerId: z.string().optional(), - customerName: z.string().optional(), - agedCurrencyOutstanding: z.array(AgedCurrencyOutstanding$inboundSchema) - .optional(), -}); - -export function agedDebtorFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AgedDebtor$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AgedDebtor' from JSON`, - ); + AgedCurrencyOutstandingFromJSON, + AgedCurrencyOutstandingFromJSONTyped, + AgedCurrencyOutstandingToJSON, + AgedCurrencyOutstandingToJSONTyped, +} from './agedcurrencyoutstanding'; + +/** + * + * @export + * @interface AgedDebtor + */ +export interface AgedDebtor { + /** + * Customer ID of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerId?: string; + /** + * Customer name of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerName?: string; + /** + * Array of aged debtors by currency. + * @type {Array} + * @memberof AgedDebtor + */ + agedCurrencyOutstanding?: Array; +} + +/** + * Check if a given object implements the AgedDebtor interface. + */ +export function instanceOfAgedDebtor(value: object): value is AgedDebtor { + return true; +} + +export function AgedDebtorFromJSON(json: any): AgedDebtor { + return AgedDebtorFromJSONTyped(json, false); +} + +export function AgedDebtorFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgedDebtor { + if (json == null) { + return json; + } + return { + + 'customerId': json['customerId'] == null ? undefined : json['customerId'], + 'customerName': json['customerName'] == null ? undefined : json['customerName'], + 'agedCurrencyOutstanding': json['agedCurrencyOutstanding'] == null ? undefined : ((json['agedCurrencyOutstanding'] as Array).map(AgedCurrencyOutstandingFromJSON)), + }; +} + +export function AgedDebtorToJSON(json: any): AgedDebtor { + return AgedDebtorToJSONTyped(json, false); +} + +export function AgedDebtorToJSONTyped(value?: AgedDebtor | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'customerId': value['customerId'], + 'customerName': value['customerName'], + 'agedCurrencyOutstanding': value['agedCurrencyOutstanding'] == null ? undefined : ((value['agedCurrencyOutstanding'] as Array).map(AgedCurrencyOutstandingToJSON)), + }; +} + + +export interface AccountingAgedDebtorReportAgedDebtor { + /** + * Customer ID of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerId?: string; + /** + * Customer name of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerName?: string; + /** + * Array of aged debtors by currency. + * @type {Array} + * @memberof AgedDebtor + */ + agedCurrencyOutstanding?: Array; +} + +export interface AccountingAgedDebtorsReportAgedDebtor { + /** + * Customer ID of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerId?: string; + /** + * Customer name of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerName?: string; + /** + * Array of aged debtors by currency. + * @type {Array} + * @memberof AgedDebtor + */ + agedCurrencyOutstanding?: Array; +} + +export interface AccountingAgedDebtorsReportGetResponseAgedDebtor { + /** + * Customer ID of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerId?: string; + /** + * Customer name of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerName?: string; + /** + * Array of aged debtors by currency. + * @type {Array} + * @memberof AgedDebtor + */ + agedCurrencyOutstanding?: Array; +} + +export interface GetAccountingAgedDebtorsReportResponseAgedDebtor { + /** + * Customer ID of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerId?: string; + /** + * Customer name of the aged debtor. + * @type {string} + * @memberof AgedDebtor + */ + customerName?: string; + /** + * Array of aged debtors by currency. + * @type {Array} + * @memberof AgedDebtor + */ + agedCurrencyOutstanding?: Array; } diff --git a/lending/src/sdk/models/shared/agedoutstandingamount.ts b/lending/src/sdk/models/shared/agedoutstandingamount.ts index 7ed34036a..32d60ed32 100644 --- a/lending/src/sdk/models/shared/agedoutstandingamount.ts +++ b/lending/src/sdk/models/shared/agedoutstandingamount.ts @@ -1,90 +1,260 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AgedOutstandingAmountDetail } from './agedoutstandingamountdetail'; import { - AgedOutstandingAmountDetail, - AgedOutstandingAmountDetail$inboundSchema, -} from "./agedoutstandingamountdetail.js"; + AgedOutstandingAmountDetailFromJSON, + AgedOutstandingAmountDetailFromJSONTyped, + AgedOutstandingAmountDetailToJSON, + AgedOutstandingAmountDetailToJSONTyped, +} from './agedoutstandingamountdetail'; -export type AgedOutstandingAmount = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - fromDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - toDate?: string | undefined; - /** - * The amount outstanding. - */ - amount?: Decimal$ | number | undefined; - /** - * Array of details. - */ - details?: Array | undefined; -}; +/** + * + * @export + * @interface AgedOutstandingAmount + */ +export interface AgedOutstandingAmount { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AgedOutstandingAmount + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AgedOutstandingAmount + */ + toDate?: string; + /** + * The amount outstanding. + * @type {string} + * @memberof AgedOutstandingAmount + */ + amount?: Decimal | number; + /** + * Array of details. + * @type {Array} + * @memberof AgedOutstandingAmount + */ + details?: Array; +} + +/** + * Check if a given object implements the AgedOutstandingAmount interface. + */ +export function instanceOfAgedOutstandingAmount(value: object): value is AgedOutstandingAmount { + return true; +} + +export function AgedOutstandingAmountFromJSON(json: any): AgedOutstandingAmount { + return AgedOutstandingAmountFromJSONTyped(json, false); +} + +export function AgedOutstandingAmountFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgedOutstandingAmount { + if (json == null) { + return json; + } + return { + + 'fromDate': json['fromDate'] == null ? undefined : json['fromDate'], + 'toDate': json['toDate'] == null ? undefined : json['toDate'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'details': json['details'] == null ? undefined : ((json['details'] as Array).map(AgedOutstandingAmountDetailFromJSON)), + }; +} + +export function AgedOutstandingAmountToJSON(json: any): AgedOutstandingAmount { + return AgedOutstandingAmountToJSONTyped(json, false); +} + +export function AgedOutstandingAmountToJSONTyped(value?: AgedOutstandingAmount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -/** @internal */ -export const AgedOutstandingAmount$inboundSchema: z.ZodType< - AgedOutstandingAmount, - z.ZodTypeDef, - unknown -> = z.object({ - fromDate: z.string().optional(), - toDate: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - details: z.array(AgedOutstandingAmountDetail$inboundSchema).optional(), -}); + return { + + 'fromDate': value['fromDate'], + 'toDate': value['toDate'], + 'amount': fromDecimal(value['amount']), + 'details': value['details'] == null ? undefined : ((value['details'] as Array).map(AgedOutstandingAmountDetailToJSON)), + }; +} + + +export interface AccountingAgedCurrencyOutstandingAgedOutstandingAmount { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AgedOutstandingAmount + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AgedOutstandingAmount + */ + toDate?: string; + /** + * The amount outstanding. + * @type {string} + * @memberof AgedOutstandingAmount + */ + amount?: Decimal | number; + /** + * Array of details. + * @type {Array} + * @memberof AgedOutstandingAmount + */ + details?: Array; +} -export function agedOutstandingAmountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AgedOutstandingAmount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AgedOutstandingAmount' from JSON`, - ); +export interface AgedCurrencyOutstandingAgedOutstandingAmount { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AgedOutstandingAmount + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof AgedOutstandingAmount + */ + toDate?: string; + /** + * The amount outstanding. + * @type {string} + * @memberof AgedOutstandingAmount + */ + amount?: Decimal | number; + /** + * Array of details. + * @type {Array} + * @memberof AgedOutstandingAmount + */ + details?: Array; } diff --git a/lending/src/sdk/models/shared/agedoutstandingamountdetail.ts b/lending/src/sdk/models/shared/agedoutstandingamountdetail.ts index 80bde1a9c..a9c5be606 100644 --- a/lending/src/sdk/models/shared/agedoutstandingamountdetail.ts +++ b/lending/src/sdk/models/shared/agedoutstandingamountdetail.ts @@ -1,40 +1,74 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type AgedOutstandingAmountDetail = { - /** - * Name of data type with outstanding amount for given period. - */ - name?: string | undefined; - /** - * The amount outstanding. - */ - amount?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const AgedOutstandingAmountDetail$inboundSchema: z.ZodType< - AgedOutstandingAmountDetail, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), -}); - -export function agedOutstandingAmountDetailFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AgedOutstandingAmountDetail$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AgedOutstandingAmountDetail' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface AgedOutstandingAmountDetail + */ +export interface AgedOutstandingAmountDetail { + /** + * Name of data type with outstanding amount for given period. + * @type {string} + * @memberof AgedOutstandingAmountDetail + */ + name?: string; + /** + * The amount outstanding. + * @type {string} + * @memberof AgedOutstandingAmountDetail + */ + amount?: Decimal | number; +} + +/** + * Check if a given object implements the AgedOutstandingAmountDetail interface. + */ +export function instanceOfAgedOutstandingAmountDetail(value: object): value is AgedOutstandingAmountDetail { + return true; +} + +export function AgedOutstandingAmountDetailFromJSON(json: any): AgedOutstandingAmountDetail { + return AgedOutstandingAmountDetailFromJSONTyped(json, false); +} + +export function AgedOutstandingAmountDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgedOutstandingAmountDetail { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + }; +} + +export function AgedOutstandingAmountDetailToJSON(json: any): AgedOutstandingAmountDetail { + return AgedOutstandingAmountDetailToJSONTyped(json, false); } + +export function AgedOutstandingAmountDetailToJSONTyped(value?: AgedOutstandingAmountDetail | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'amount': fromDecimal(value['amount']), + }; +} + diff --git a/lending/src/sdk/models/shared/attachments.ts b/lending/src/sdk/models/shared/attachments.ts index 49f707456..ce88e67d5 100644 --- a/lending/src/sdk/models/shared/attachments.ts +++ b/lending/src/sdk/models/shared/attachments.ts @@ -1,37 +1,181 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingAttachment } from './accountingattachment'; import { - AccountingAttachment, - AccountingAttachment$inboundSchema, -} from "./accountingattachment.js"; - -export type Attachments = { - attachments?: Array | null | undefined; -}; - -/** @internal */ -export const Attachments$inboundSchema: z.ZodType< - Attachments, - z.ZodTypeDef, - unknown -> = z.object({ - attachments: z.nullable( - z.array(z.nullable(AccountingAttachment$inboundSchema)), - ).optional(), -}); - -export function attachmentsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Attachments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Attachments' from JSON`, - ); + AccountingAttachmentFromJSON, + AccountingAttachmentFromJSONTyped, + AccountingAttachmentToJSON, + AccountingAttachmentToJSONTyped, +} from './accountingattachment'; + +/** + * + * @export + * @interface Attachments + */ +export interface Attachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +/** + * Check if a given object implements the Attachments interface. + */ +export function instanceOfAttachments(value: object): value is Attachments { + return true; +} + +export function AttachmentsFromJSON(json: any): Attachments { + return AttachmentsFromJSONTyped(json, false); +} + +export function AttachmentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Attachments { + if (json == null) { + return json; + } + return { + + 'attachments': json['attachments'] == null ? undefined : ((json['attachments'] as Array).map(AccountingAttachmentFromJSON)), + }; +} + +export function AttachmentsToJSON(json: any): Attachments { + return AttachmentsToJSONTyped(json, false); +} + +export function AttachmentsToJSONTyped(value?: Attachments | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'attachments': value['attachments'] == null ? undefined : ((value['attachments'] as Array).map(AccountingAttachmentToJSON)), + }; +} + + +export interface AccountingBillAttachmentsListResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface AccountingCustomerAttachmentsListResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface AccountingDirectCostAttachmentsListResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface AccountingDirectIncomeAttachmentsListResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface AccountingInvoiceAttachmentsListResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface AccountingSupplierAttachmentsListResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface ListAccountingBillAttachmentsResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface ListAccountingCustomerAttachmentsResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface ListAccountingDirectCostAttachmentsResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface ListAccountingDirectIncomeAttachmentsResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface ListAccountingInvoiceAttachmentsResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; +} + +export interface ListAccountingSupplierAttachmentsResponseAttachments { + /** + * + * @type {Array} + * @memberof Attachments + */ + attachments?: Array | null; } diff --git a/lending/src/sdk/models/shared/balancesheet.ts b/lending/src/sdk/models/shared/balancesheet.ts index 9f11b3df5..cb38cd308 100644 --- a/lending/src/sdk/models/shared/balancesheet.ts +++ b/lending/src/sdk/models/shared/balancesheet.ts @@ -1,65 +1,278 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { ReportLine, ReportLine$inboundSchema } from "./reportline.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ReportLine } from './reportline'; +import { + ReportLineFromJSON, + ReportLineFromJSONTyped, + ReportLineToJSON, + ReportLineToJSONTyped, +} from './reportline'; -export type BalanceSheet = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - assets?: ReportLine | undefined; - liabilities?: ReportLine | undefined; - /** - * Value of net assets for a company in their base currency. - */ - netAssets: Decimal$ | number; - equity?: ReportLine | undefined; -}; +/** + * + * @export + * @interface BalanceSheet + */ +export interface BalanceSheet { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BalanceSheet + */ + date?: string; + /** + * ReportLines for assets. For example, fixed and current assets. + * @type {ReportLine} + * @memberof BalanceSheet + */ + assets?: ReportLine; + /** + * ReportLines for liabilities. For example, current liabilities. + * @type {ReportLine} + * @memberof BalanceSheet + */ + liabilities?: ReportLine; + /** + * Value of net assets for a company in their base currency. + * @type {string} + * @memberof BalanceSheet + */ + netAssets: Decimal | number; + /** + * ReportLines for equities. For example, retained and current year earnings. See below. + * @type {ReportLine} + * @memberof BalanceSheet + */ + equity?: ReportLine; +} + +/** + * Check if a given object implements the BalanceSheet interface. + */ +export function instanceOfBalanceSheet(value: object): value is BalanceSheet { + if (!('netAssets' in value) || value['netAssets'] === undefined) return false; + return true; +} + +export function BalanceSheetFromJSON(json: any): BalanceSheet { + return BalanceSheetFromJSONTyped(json, false); +} + +export function BalanceSheetFromJSONTyped(json: any, ignoreDiscriminator: boolean): BalanceSheet { + if (json == null) { + return json; + } + return { + + 'date': json['date'] == null ? undefined : json['date'], + 'assets': json['assets'] == null ? undefined : ReportLineFromJSON(json['assets']), + 'liabilities': json['liabilities'] == null ? undefined : ReportLineFromJSON(json['liabilities']), + 'netAssets': json['netAssets'], + 'equity': json['equity'] == null ? undefined : ReportLineFromJSON(json['equity']), + }; +} -/** @internal */ -export const BalanceSheet$inboundSchema: z.ZodType< - BalanceSheet, - z.ZodTypeDef, - unknown -> = z.object({ - date: z.string().optional(), - assets: ReportLine$inboundSchema.optional(), - liabilities: ReportLine$inboundSchema.optional(), - netAssets: z.number().transform(v => new Decimal$(v)), - equity: ReportLine$inboundSchema.optional(), -}); +export function BalanceSheetToJSON(json: any): BalanceSheet { + return BalanceSheetToJSONTyped(json, false); +} + +export function BalanceSheetToJSONTyped(value?: BalanceSheet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'date': value['date'], + 'assets': ReportLineToJSON(value['assets']), + 'liabilities': ReportLineToJSON(value['liabilities']), + 'netAssets': fromDecimal(value['netAssets']), + 'equity': ReportLineToJSON(value['equity']), + }; +} + + +export interface AccountingBalanceSheetBalanceSheet { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BalanceSheet + */ + date?: string; + /** + * ReportLines for assets. For example, fixed and current assets. + * @type {ReportLine} + * @memberof BalanceSheet + */ + assets?: ReportLine; + /** + * ReportLines for liabilities. For example, current liabilities. + * @type {ReportLine} + * @memberof BalanceSheet + */ + liabilities?: ReportLine; + /** + * Value of net assets for a company in their base currency. + * @type {string} + * @memberof BalanceSheet + */ + netAssets: Decimal | number; + /** + * ReportLines for equities. For example, retained and current year earnings. See below. + * @type {ReportLine} + * @memberof BalanceSheet + */ + equity?: ReportLine; +} + +export interface AccountingBalanceSheetGetResponseBalanceSheet { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BalanceSheet + */ + date?: string; + /** + * ReportLines for assets. For example, fixed and current assets. + * @type {ReportLine} + * @memberof BalanceSheet + */ + assets?: ReportLine; + /** + * ReportLines for liabilities. For example, current liabilities. + * @type {ReportLine} + * @memberof BalanceSheet + */ + liabilities?: ReportLine; + /** + * Value of net assets for a company in their base currency. + * @type {string} + * @memberof BalanceSheet + */ + netAssets: Decimal | number; + /** + * ReportLines for equities. For example, retained and current year earnings. See below. + * @type {ReportLine} + * @memberof BalanceSheet + */ + equity?: ReportLine; +} -export function balanceSheetFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BalanceSheet$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BalanceSheet' from JSON`, - ); +export interface GetAccountingBalanceSheetResponseBalanceSheet { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BalanceSheet + */ + date?: string; + /** + * ReportLines for assets. For example, fixed and current assets. + * @type {ReportLine} + * @memberof BalanceSheet + */ + assets?: ReportLine; + /** + * ReportLines for liabilities. For example, current liabilities. + * @type {ReportLine} + * @memberof BalanceSheet + */ + liabilities?: ReportLine; + /** + * Value of net assets for a company in their base currency. + * @type {string} + * @memberof BalanceSheet + */ + netAssets: Decimal | number; + /** + * ReportLines for equities. For example, retained and current year earnings. See below. + * @type {ReportLine} + * @memberof BalanceSheet + */ + equity?: ReportLine; } diff --git a/lending/src/sdk/models/shared/bankaccountref.ts b/lending/src/sdk/models/shared/bankaccountref.ts index 217f7b15d..1a8de752d 100644 --- a/lending/src/sdk/models/shared/bankaccountref.ts +++ b/lending/src/sdk/models/shared/bankaccountref.ts @@ -1,42 +1,133 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Links to the Account transactions data type. + * @export + * @interface BankAccountRef + */ +export interface BankAccountRef { + /** + * Bank account 'id' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + id?: string; + /** + * bank account 'name' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + name?: string; +} + +/** + * Check if a given object implements the BankAccountRef interface. */ -export type BankAccountRef = { - /** - * Bank account 'id' for the account transaction. - */ - id?: string | undefined; - /** - * bank account 'name' for the account transaction. - */ - name?: string | undefined; -}; - -/** @internal */ -export const BankAccountRef$inboundSchema: z.ZodType< - BankAccountRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), -}); - -export function bankAccountRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankAccountRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankAccountRef' from JSON`, - ); +export function instanceOfBankAccountRef(value: object): value is BankAccountRef { + return true; +} + +export function BankAccountRefFromJSON(json: any): BankAccountRef { + return BankAccountRefFromJSONTyped(json, false); +} + +export function BankAccountRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankAccountRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function BankAccountRefToJSON(json: any): BankAccountRef { + return BankAccountRefToJSONTyped(json, false); +} + +export function BankAccountRefToJSONTyped(value?: BankAccountRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface AccountingAccountTransactionBankAccountRef { + /** + * Bank account 'id' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + id?: string; + /** + * bank account 'name' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + name?: string; +} + +export interface AccountingAccountTransactionGetResponseBankAccountRef { + /** + * Bank account 'id' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + id?: string; + /** + * bank account 'name' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + name?: string; +} + +export interface AccountingAccountTransactionsBankAccountRef { + /** + * Bank account 'id' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + id?: string; + /** + * bank account 'name' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + name?: string; +} + +export interface GetAccountingAccountTransactionResponseBankAccountRef { + /** + * Bank account 'id' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + id?: string; + /** + * bank account 'name' for the account transaction. + * @type {string} + * @memberof BankAccountRef + */ + name?: string; } diff --git a/lending/src/sdk/models/shared/bankaccountstatus.ts b/lending/src/sdk/models/shared/bankaccountstatus.ts index bca71b030..40b15a5fe 100644 --- a/lending/src/sdk/models/shared/bankaccountstatus.ts +++ b/lending/src/sdk/models/shared/bankaccountstatus.ts @@ -1,29 +1,55 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Status of the bank account. + * @export */ export const BankAccountStatus = { - Unknown: "Unknown", - Active: "Active", - Archived: "Archived", - Pending: "Pending", + Unknown: 'Unknown', + Active: 'Active', + Archived: 'Archived', + Pending: 'Pending' } as const; -/** - * Status of the bank account. - */ -export type BankAccountStatus = ClosedEnum; - -/** @internal */ -export const BankAccountStatus$inboundSchema: z.ZodNativeEnum< - typeof BankAccountStatus -> = z.nativeEnum(BankAccountStatus); -/** @internal */ -export const BankAccountStatus$outboundSchema: z.ZodNativeEnum< - typeof BankAccountStatus -> = BankAccountStatus$inboundSchema; +export type BankAccountStatus = typeof BankAccountStatus[keyof typeof BankAccountStatus]; + + +export function instanceOfBankAccountStatus(value: any): boolean { + for (const key in BankAccountStatus) { + if (Object.prototype.hasOwnProperty.call(BankAccountStatus, key)) { + if (BankAccountStatus[key as keyof typeof BankAccountStatus] === value) { + return true; + } + } + } + return false; +} + +export function BankAccountStatusFromJSON(json: any): BankAccountStatus { + return BankAccountStatusFromJSONTyped(json, false); +} + +export function BankAccountStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankAccountStatus { + return json as BankAccountStatus; +} + +export function BankAccountStatusToJSON(value?: BankAccountStatus | null): any { + return value as any; +} + +export function BankAccountStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): BankAccountStatus { + return value as BankAccountStatus; +} + diff --git a/lending/src/sdk/models/shared/bankfeedbankaccountmapping.ts b/lending/src/sdk/models/shared/bankfeedbankaccountmapping.ts index f723da917..f7f77c886 100644 --- a/lending/src/sdk/models/shared/bankfeedbankaccountmapping.ts +++ b/lending/src/sdk/models/shared/bankfeedbankaccountmapping.ts @@ -1,64 +1,303 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface BankFeedBankAccountMapping + */ +export interface BankFeedBankAccountMapping { + [key: string]: any | any; + /** + * Unique ID for the source account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + sourceAccountId: string; + /** + * Unique ID for the target account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + targetAccountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + feedStartDate?: string; +} + +/** + * Check if a given object implements the BankFeedBankAccountMapping interface. + */ +export function instanceOfBankFeedBankAccountMapping(value: object): value is BankFeedBankAccountMapping { + if (!('sourceAccountId' in value) || value['sourceAccountId'] === undefined) return false; + return true; +} + +export function BankFeedBankAccountMappingFromJSON(json: any): BankFeedBankAccountMapping { + return BankFeedBankAccountMappingFromJSONTyped(json, false); +} + +export function BankFeedBankAccountMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankFeedBankAccountMapping { + if (json == null) { + return json; + } + return { + + ...json, + 'sourceAccountId': json['sourceAccountId'], + 'targetAccountId': json['targetAccountId'] == null ? undefined : json['targetAccountId'], + 'feedStartDate': json['feedStartDate'] == null ? undefined : json['feedStartDate'], + }; +} + +export function BankFeedBankAccountMappingToJSON(json: any): BankFeedBankAccountMapping { + return BankFeedBankAccountMappingToJSONTyped(json, false); +} + +export function BankFeedBankAccountMappingToJSONTyped(value?: BankFeedBankAccountMapping | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'sourceAccountId': value['sourceAccountId'], + 'targetAccountId': value['targetAccountId'], + 'feedStartDate': value['feedStartDate'], + }; +} + -export type BankFeedBankAccountMapping = { - /** - * Unique ID for the source account - */ - sourceAccountId: string; - /** - * Unique ID for the target account - */ - targetAccountId?: string | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - feedStartDate?: string | undefined; -}; +export interface BankAccountMappingCreateRequestBody { + [key: string]: any | any; + /** + * Unique ID for the source account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + sourceAccountId: string; + /** + * Unique ID for the target account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + targetAccountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + feedStartDate?: string; +} -/** @internal */ -export type BankFeedBankAccountMapping$Outbound = { - sourceAccountId: string; - targetAccountId?: string | null | undefined; - feedStartDate?: string | undefined; -}; +export interface BankFeedAccountMapping { + [key: string]: any | any; + /** + * Unique ID for the source account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + sourceAccountId: string; + /** + * Unique ID for the target account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + targetAccountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + feedStartDate?: string; +} -/** @internal */ -export const BankFeedBankAccountMapping$outboundSchema: z.ZodType< - BankFeedBankAccountMapping$Outbound, - z.ZodTypeDef, - BankFeedBankAccountMapping -> = z.object({ - sourceAccountId: z.string(), - targetAccountId: z.nullable(z.string()).optional(), - feedStartDate: z.string().optional(), -}); +export interface BankFeedBankAccountMappingBankFeedAccountMapping { + [key: string]: any | any; + /** + * Unique ID for the source account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + sourceAccountId: string; + /** + * Unique ID for the target account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + targetAccountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + feedStartDate?: string; +} + +export interface CreateBankAccountMappingBankFeedBankAccountMapping { + [key: string]: any | any; + /** + * Unique ID for the source account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + sourceAccountId: string; + /** + * Unique ID for the target account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + targetAccountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + feedStartDate?: string; +} -export function bankFeedBankAccountMappingToJSON( - bankFeedBankAccountMapping: BankFeedBankAccountMapping, -): string { - return JSON.stringify( - BankFeedBankAccountMapping$outboundSchema.parse(bankFeedBankAccountMapping), - ); +export interface CreateBankAccountMappingRequestBody { + [key: string]: any | any; + /** + * Unique ID for the source account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + sourceAccountId: string; + /** + * Unique ID for the target account + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + targetAccountId?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedBankAccountMapping + */ + feedStartDate?: string; } diff --git a/lending/src/sdk/models/shared/bankfeedbankaccountmappingresponse.ts b/lending/src/sdk/models/shared/bankfeedbankaccountmappingresponse.ts index 990391403..116224f30 100644 --- a/lending/src/sdk/models/shared/bankfeedbankaccountmappingresponse.ts +++ b/lending/src/sdk/models/shared/bankfeedbankaccountmappingresponse.ts @@ -1,50 +1,260 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type BankFeedBankAccountMappingResponse = { - /** - * Unique ID for the source account. - */ - sourceAccountId?: string | undefined; - /** - * Unique ID for the target account. - */ - targetAccountId?: string | null | undefined; - /** - * Status of the POST request. - */ - status?: string | null | undefined; - /** - * Error returned during the post request - */ - error?: string | null | undefined; -}; - -/** @internal */ -export const BankFeedBankAccountMappingResponse$inboundSchema: z.ZodType< - BankFeedBankAccountMappingResponse, - z.ZodTypeDef, - unknown -> = z.object({ - sourceAccountId: z.string().optional(), - targetAccountId: z.nullable(z.string()).optional(), - status: z.nullable(z.string()).optional(), - error: z.nullable(z.string()).optional(), -}); - -export function bankFeedBankAccountMappingResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - BankFeedBankAccountMappingResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankFeedBankAccountMappingResponse' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface BankFeedBankAccountMappingResponse + */ +export interface BankFeedBankAccountMappingResponse { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + sourceAccountId?: string; + /** + * Unique ID for the target account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + targetAccountId?: string | null; + /** + * Status of the POST request. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + status?: string | null; + /** + * Error returned during the post request + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + error?: string | null; +} + +/** + * Check if a given object implements the BankFeedBankAccountMappingResponse interface. + */ +export function instanceOfBankFeedBankAccountMappingResponse(value: object): value is BankFeedBankAccountMappingResponse { + return true; +} + +export function BankFeedBankAccountMappingResponseFromJSON(json: any): BankFeedBankAccountMappingResponse { + return BankFeedBankAccountMappingResponseFromJSONTyped(json, false); +} + +export function BankFeedBankAccountMappingResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankFeedBankAccountMappingResponse { + if (json == null) { + return json; + } + return { + + ...json, + 'sourceAccountId': json['sourceAccountId'] == null ? undefined : json['sourceAccountId'], + 'targetAccountId': json['targetAccountId'] == null ? undefined : json['targetAccountId'], + 'status': json['status'] == null ? undefined : json['status'], + 'error': json['error'] == null ? undefined : json['error'], + }; +} + +export function BankFeedBankAccountMappingResponseToJSON(json: any): BankFeedBankAccountMappingResponse { + return BankFeedBankAccountMappingResponseToJSONTyped(json, false); +} + +export function BankFeedBankAccountMappingResponseToJSONTyped(value?: BankFeedBankAccountMappingResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'sourceAccountId': value['sourceAccountId'], + 'targetAccountId': value['targetAccountId'], + 'status': value['status'], + 'error': value['error'], + }; +} + + +export interface BankAccountMappingCreateResponseBankFeedAccountMappingResponse { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + sourceAccountId?: string; + /** + * Unique ID for the target account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + targetAccountId?: string | null; + /** + * Status of the POST request. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + status?: string | null; + /** + * Error returned during the post request + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + error?: string | null; +} + +export interface BankAccountMappingCreateResponseBankFeedBankAccountMappingResponse { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + sourceAccountId?: string; + /** + * Unique ID for the target account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + targetAccountId?: string | null; + /** + * Status of the POST request. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + status?: string | null; + /** + * Error returned during the post request + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + error?: string | null; +} + +export interface BankFeedAccountMappingResponse { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + sourceAccountId?: string; + /** + * Unique ID for the target account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + targetAccountId?: string | null; + /** + * Status of the POST request. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + status?: string | null; + /** + * Error returned during the post request + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + error?: string | null; +} + +export interface BankFeedBankAccountMappingResponseBankFeedAccountMappingResponse { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + sourceAccountId?: string; + /** + * Unique ID for the target account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + targetAccountId?: string | null; + /** + * Status of the POST request. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + status?: string | null; + /** + * Error returned during the post request + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + error?: string | null; +} + +export interface CreateBankAccountMappingResponseBankFeedAccountMappingResponse { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + sourceAccountId?: string; + /** + * Unique ID for the target account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + targetAccountId?: string | null; + /** + * Status of the POST request. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + status?: string | null; + /** + * Error returned during the post request + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + error?: string | null; +} + +export interface CreateBankAccountMappingResponseBankFeedBankAccountMappingResponse { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + sourceAccountId?: string; + /** + * Unique ID for the target account. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + targetAccountId?: string | null; + /** + * Status of the POST request. + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + status?: string | null; + /** + * Error returned during the post request + * @type {string} + * @memberof BankFeedBankAccountMappingResponse + */ + error?: string | null; } diff --git a/lending/src/sdk/models/shared/bankfeedmapping.ts b/lending/src/sdk/models/shared/bankfeedmapping.ts index 07be2dcff..a498c53aa 100644 --- a/lending/src/sdk/models/shared/bankfeedmapping.ts +++ b/lending/src/sdk/models/shared/bankfeedmapping.ts @@ -1,114 +1,349 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { TargetAccountOption } from './targetaccountoption'; import { - TargetAccountOption, - TargetAccountOption$inboundSchema, -} from "./targetaccountoption.js"; + TargetAccountOptionFromJSON, + TargetAccountOptionFromJSONTyped, + TargetAccountOptionToJSON, + TargetAccountOptionToJSONTyped, +} from './targetaccountoption'; /** * A bank feed connection between a source account and a target account, including potential target accounts. + * @export + * @interface BankFeedMapping */ -export type BankFeedMapping = { - /** - * Unique ID for the source account. - */ - sourceAccountId?: string | undefined; - /** - * Name for the source account. - */ - sourceAccountName?: string | undefined; - /** - * Account number for the source account. - */ - sourceAccountNumber?: string | undefined; - /** - * Balance for the source account. - */ - sourceBalance?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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. - */ - sourceCurrency?: string | undefined; - /** - * Unique ID for the target account in the accounting software. - */ - targetAccountId?: string | null | undefined; - /** - * Name for the target account in the accounting software. - */ - targetAccountName?: string | undefined; - /** - * The status. - */ - status?: string | undefined; - /** - * An array of potential target accounts. - */ - targetAccountOptions?: Array | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - feedStartDate?: string | undefined; -}; +export interface BankFeedMapping { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountId?: string; + /** + * Name for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountName?: string; + /** + * Account number for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountNumber?: string; + /** + * Balance for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceBalance?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof BankFeedMapping + */ + sourceCurrency?: string; + /** + * Unique ID for the target account in the accounting software. + * @type {string} + * @memberof BankFeedMapping + */ + targetAccountId?: string | null; + /** + * Name for the target account in the accounting software. + * @type {string} + * @memberof BankFeedMapping + */ + targetAccountName?: string; + /** + * The status. + * @type {string} + * @memberof BankFeedMapping + */ + status?: string; + /** + * An array of potential target accounts. + * @type {Array} + * @memberof BankFeedMapping + */ + targetAccountOptions?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedMapping + */ + feedStartDate?: string; +} -/** @internal */ -export const BankFeedMapping$inboundSchema: z.ZodType< - BankFeedMapping, - z.ZodTypeDef, - unknown -> = z.object({ - sourceAccountId: z.string().optional(), - sourceAccountName: z.string().optional(), - sourceAccountNumber: z.string().optional(), - sourceBalance: z.number().transform(v => new Decimal$(v)).optional(), - sourceCurrency: z.string().optional(), - targetAccountId: z.nullable(z.string()).optional(), - targetAccountName: z.string().optional(), - status: z.string().optional(), - targetAccountOptions: z.nullable(z.array(TargetAccountOption$inboundSchema)) - .optional(), - feedStartDate: z.string().optional(), -}); +/** + * Check if a given object implements the BankFeedMapping interface. + */ +export function instanceOfBankFeedMapping(value: object): value is BankFeedMapping { + return true; +} + +export function BankFeedMappingFromJSON(json: any): BankFeedMapping { + return BankFeedMappingFromJSONTyped(json, false); +} + +export function BankFeedMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankFeedMapping { + if (json == null) { + return json; + } + return { + + ...json, + 'sourceAccountId': json['sourceAccountId'] == null ? undefined : json['sourceAccountId'], + 'sourceAccountName': json['sourceAccountName'] == null ? undefined : json['sourceAccountName'], + 'sourceAccountNumber': json['sourceAccountNumber'] == null ? undefined : json['sourceAccountNumber'], + 'sourceBalance': json['sourceBalance'] == null ? undefined : toDecimal(json['sourceBalance']), + 'sourceCurrency': json['sourceCurrency'] == null ? undefined : json['sourceCurrency'], + 'targetAccountId': json['targetAccountId'] == null ? undefined : json['targetAccountId'], + 'targetAccountName': json['targetAccountName'] == null ? undefined : json['targetAccountName'], + 'status': json['status'] == null ? undefined : json['status'], + 'targetAccountOptions': json['targetAccountOptions'] == null ? undefined : ((json['targetAccountOptions'] as Array).map(TargetAccountOptionFromJSON)), + 'feedStartDate': json['feedStartDate'] == null ? undefined : json['feedStartDate'], + }; +} + +export function BankFeedMappingToJSON(json: any): BankFeedMapping { + return BankFeedMappingToJSONTyped(json, false); +} + +export function BankFeedMappingToJSONTyped(value?: BankFeedMapping | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'sourceAccountId': value['sourceAccountId'], + 'sourceAccountName': value['sourceAccountName'], + 'sourceAccountNumber': value['sourceAccountNumber'], + 'sourceBalance': fromDecimal(value['sourceBalance']), + 'sourceCurrency': value['sourceCurrency'], + 'targetAccountId': value['targetAccountId'], + 'targetAccountName': value['targetAccountName'], + 'status': value['status'], + 'targetAccountOptions': value['targetAccountOptions'] == null ? undefined : ((value['targetAccountOptions'] as Array).map(TargetAccountOptionToJSON)), + 'feedStartDate': value['feedStartDate'], + }; +} + + +export interface BankAccountMappingGetResponseBankFeedMapping { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountId?: string; + /** + * Name for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountName?: string; + /** + * Account number for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountNumber?: string; + /** + * Balance for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceBalance?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof BankFeedMapping + */ + sourceCurrency?: string; + /** + * Unique ID for the target account in the accounting software. + * @type {string} + * @memberof BankFeedMapping + */ + targetAccountId?: string | null; + /** + * Name for the target account in the accounting software. + * @type {string} + * @memberof BankFeedMapping + */ + targetAccountName?: string; + /** + * The status. + * @type {string} + * @memberof BankFeedMapping + */ + status?: string; + /** + * An array of potential target accounts. + * @type {Array} + * @memberof BankFeedMapping + */ + targetAccountOptions?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedMapping + */ + feedStartDate?: string; +} -export function bankFeedMappingFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankFeedMapping$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankFeedMapping' from JSON`, - ); +export interface GetBankAccountMappingResponseBankFeedMapping { + [key: string]: any | any; + /** + * Unique ID for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountId?: string; + /** + * Name for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountName?: string; + /** + * Account number for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceAccountNumber?: string; + /** + * Balance for the source account. + * @type {string} + * @memberof BankFeedMapping + */ + sourceBalance?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof BankFeedMapping + */ + sourceCurrency?: string; + /** + * Unique ID for the target account in the accounting software. + * @type {string} + * @memberof BankFeedMapping + */ + targetAccountId?: string | null; + /** + * Name for the target account in the accounting software. + * @type {string} + * @memberof BankFeedMapping + */ + targetAccountName?: string; + /** + * The status. + * @type {string} + * @memberof BankFeedMapping + */ + status?: string; + /** + * An array of potential target accounts. + * @type {Array} + * @memberof BankFeedMapping + */ + targetAccountOptions?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankFeedMapping + */ + feedStartDate?: string; } diff --git a/lending/src/sdk/models/shared/bankingaccount.ts b/lending/src/sdk/models/shared/bankingaccount.ts index 778135f6e..f46028f02 100644 --- a/lending/src/sdk/models/shared/bankingaccount.ts +++ b/lending/src/sdk/models/shared/bankingaccount.ts @@ -1,148 +1,1527 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountBalanceAmounts } from './accountbalanceamounts'; import { - AccountBalanceAmounts, - AccountBalanceAmounts$inboundSchema, - AccountBalanceAmounts$Outbound, - AccountBalanceAmounts$outboundSchema, -} from "./accountbalanceamounts.js"; + AccountBalanceAmountsFromJSON, + AccountBalanceAmountsFromJSONTyped, + AccountBalanceAmountsToJSON, + AccountBalanceAmountsToJSONTyped, +} from './accountbalanceamounts'; +import type { AccountingBankAccountType } from './accountingbankaccounttype'; import { - AccountIdentifiers, - AccountIdentifiers$inboundSchema, - AccountIdentifiers$Outbound, - AccountIdentifiers$outboundSchema, -} from "./accountidentifiers.js"; + AccountingBankAccountTypeFromJSON, + AccountingBankAccountTypeFromJSONTyped, + AccountingBankAccountTypeToJSON, + AccountingBankAccountTypeToJSONTyped, +} from './accountingbankaccounttype'; +import type { AccountInstitution } from './accountinstitution'; import { - AccountingBankAccountType, - AccountingBankAccountType$inboundSchema, - AccountingBankAccountType$outboundSchema, -} from "./accountingbankaccounttype.js"; + AccountInstitutionFromJSON, + AccountInstitutionFromJSONTyped, + AccountInstitutionToJSON, + AccountInstitutionToJSONTyped, +} from './accountinstitution'; +import type { AccountIdentifiers } from './accountidentifiers'; import { - AccountInstitution, - AccountInstitution$inboundSchema, - AccountInstitution$Outbound, - AccountInstitution$outboundSchema, -} from "./accountinstitution.js"; + AccountIdentifiersFromJSON, + AccountIdentifiersFromJSONTyped, + AccountIdentifiersToJSON, + AccountIdentifiersToJSONTyped, +} from './accountidentifiers'; /** * This data type provides a list of all the SMB's bank accounts, with rich data like balances, account numbers, and institutions holding the accounts. - * - * @remarks - * + * * Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. + * @export + * @interface BankingAccount + */ +export interface BankingAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + + + +/** + * Check if a given object implements the BankingAccount interface. */ -export type BankingAccount = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * The ID of the account from the provider. - */ - id: string; - /** - * The name of the account according to the provider. - */ - name: string; - /** - * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. - */ - informalName?: string | null | undefined; - /** - * The name of the person or company who holds the account. - */ - holder?: string | null | undefined; - /** - * The type of transactions and balances on the account. - * - * @remarks - * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. - * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. - */ - type: AccountingBankAccountType; - /** - * Depending on the data provided by the underlying bank, not all balances are always available. - */ - balance: AccountBalanceAmounts; - /** - * An object containing bank account identification information. - */ - identifiers: AccountIdentifiers; - /** - * The currency code for the account. - */ - currency: string; - /** - * The bank or other financial institution providing the account. - */ - institution: AccountInstitution; -}; - -/** @internal */ -export const BankingAccount$inboundSchema: z.ZodType< - BankingAccount, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - name: z.string(), - informalName: z.nullable(z.string()).optional(), - holder: z.nullable(z.string()).optional(), - type: AccountingBankAccountType$inboundSchema, - balance: AccountBalanceAmounts$inboundSchema, - identifiers: AccountIdentifiers$inboundSchema, - currency: z.string(), - institution: AccountInstitution$inboundSchema, -}); -/** @internal */ -export type BankingAccount$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id: string; - name: string; - informalName?: string | null | undefined; - holder?: string | null | undefined; - type: string; - balance: AccountBalanceAmounts$Outbound; - identifiers: AccountIdentifiers$Outbound; - currency: string; - institution: AccountInstitution$Outbound; -}; - -/** @internal */ -export const BankingAccount$outboundSchema: z.ZodType< - BankingAccount$Outbound, - z.ZodTypeDef, - BankingAccount -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - name: z.string(), - informalName: z.nullable(z.string()).optional(), - holder: z.nullable(z.string()).optional(), - type: AccountingBankAccountType$outboundSchema, - balance: AccountBalanceAmounts$outboundSchema, - identifiers: AccountIdentifiers$outboundSchema, - currency: z.string(), - institution: AccountInstitution$outboundSchema, -}); - -export function bankingAccountToJSON(bankingAccount: BankingAccount): string { - return JSON.stringify(BankingAccount$outboundSchema.parse(bankingAccount)); -} -export function bankingAccountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingAccount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingAccount' from JSON`, - ); +export function instanceOfBankingAccount(value: object): value is BankingAccount { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('balance' in value) || value['balance'] === undefined) return false; + if (!('identifiers' in value) || value['identifiers'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + if (!('institution' in value) || value['institution'] === undefined) return false; + return true; +} + +export function BankingAccountFromJSON(json: any): BankingAccount { + return BankingAccountFromJSONTyped(json, false); +} + +export function BankingAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingAccount { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'], + 'name': json['name'], + 'informalName': json['informalName'] == null ? undefined : json['informalName'], + 'holder': json['holder'] == null ? undefined : json['holder'], + 'type': AccountingBankAccountTypeFromJSON(json['type']), + 'balance': AccountBalanceAmountsFromJSON(json['balance']), + 'identifiers': AccountIdentifiersFromJSON(json['identifiers']), + 'currency': json['currency'], + 'institution': AccountInstitutionFromJSON(json['institution']), + }; +} + +export function BankingAccountToJSON(json: any): BankingAccount { + return BankingAccountToJSONTyped(json, false); +} + +export function BankingAccountToJSONTyped(value?: BankingAccount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'name': value['name'], + 'informalName': value['informalName'], + 'holder': value['holder'], + 'type': AccountingBankAccountTypeToJSON(value['type']), + 'balance': AccountBalanceAmountsToJSON(value['balance']), + 'identifiers': AccountIdentifiersToJSON(value['identifiers']), + 'currency': value['currency'], + 'institution': AccountInstitutionToJSON(value['institution']), + }; +} + + +export interface BankingAccountBankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingAccountGetResponseBankingAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingAccountGetResponseBankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingAccountsBankingAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingAccountsBankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingAccountsListResponseBankingAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingAccountsListResponseBankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingBankAccountsBankingAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface BankingBankAccountsBankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface GetBankingAccountResponseBankingAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface GetBankingAccountResponseBankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface ListBankingAccountsResponseBankingAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface ListBankingAccountsResponseBankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface UploadBankStatementDataRequestBodyBankingAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; +} + +export interface UploadBankStatementDataRequestBodyBankingBankAccount { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccount + */ + sourceModifiedDate?: string; + /** + * The ID of the account from the provider. + * @type {string} + * @memberof BankingAccount + */ + id: string; + /** + * The name of the account according to the provider. + * @type {string} + * @memberof BankingAccount + */ + name: string; + /** + * The friendly name of the account, chosen by the holder. This may not have been set by the account holder and therefore is not always available. + * @type {string} + * @memberof BankingAccount + */ + informalName?: string | null; + /** + * The name of the person or company who holds the account. + * @type {string} + * @memberof BankingAccount + */ + holder?: string | null; + /** + * + * @type {AccountingBankAccountType} + * @memberof BankingAccount + */ + type: AccountingBankAccountType; + /** + * An object containing bank balance data. + * @type {AccountBalanceAmounts} + * @memberof BankingAccount + */ + balance: AccountBalanceAmounts; + /** + * + * @type {AccountIdentifiers} + * @memberof BankingAccount + */ + identifiers: AccountIdentifiers; + /** + * The currency code for the account. + * @type {string} + * @memberof BankingAccount + */ + currency: string; + /** + * + * @type {AccountInstitution} + * @memberof BankingAccount + */ + institution: AccountInstitution; } diff --git a/lending/src/sdk/models/shared/bankingaccountbalance.ts b/lending/src/sdk/models/shared/bankingaccountbalance.ts index 592fcf2ea..ca5140df2 100644 --- a/lending/src/sdk/models/shared/bankingaccountbalance.ts +++ b/lending/src/sdk/models/shared/bankingaccountbalance.ts @@ -1,83 +1,343 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountBalanceAmounts } from './accountbalanceamounts'; import { - AccountBalanceAmounts, - AccountBalanceAmounts$inboundSchema, -} from "./accountbalanceamounts.js"; + AccountBalanceAmountsFromJSON, + AccountBalanceAmountsFromJSONTyped, + AccountBalanceAmountsToJSON, + AccountBalanceAmountsToJSONTyped, +} from './accountbalanceamounts'; /** * The Banking Account Balances data type provides a list of balances for a bank account including end-of-day batch balance or running balances per transaction. - * - * @remarks - * + * * Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. - * + * * > **How often should I pull Account Balances?** * > * > Because these balances are closing balances, we recommend you pull Account Balance no more frequently than daily. If you require a live intraday balance, this can be found for each account on the [Account](https://docs.codat.io/lending-api#/schemas/Account) data type. - * > + * > * > Whilst you can choose to sync hourly, this may incur usage charges from Plaid or TrueLayer. + * @export + * @interface BankingAccountBalance */ -export type BankingAccountBalance = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * The unique identifier of the account. - */ - accountId: string; - /** - * Depending on the data provided by the underlying bank, not all balances are always available. - */ - balance: AccountBalanceAmounts; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date: string; -}; +export interface BankingAccountBalance { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccountBalance + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccountBalance + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the account. + * @type {string} + * @memberof BankingAccountBalance + */ + accountId: string; + /** + * + * @type {AccountBalanceAmounts} + * @memberof BankingAccountBalance + */ + balance: AccountBalanceAmounts; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingAccountBalance + */ + date: string; +} + +/** + * Check if a given object implements the BankingAccountBalance interface. + */ +export function instanceOfBankingAccountBalance(value: object): value is BankingAccountBalance { + if (!('accountId' in value) || value['accountId'] === undefined) return false; + if (!('balance' in value) || value['balance'] === undefined) return false; + if (!('date' in value) || value['date'] === undefined) return false; + return true; +} -/** @internal */ -export const BankingAccountBalance$inboundSchema: z.ZodType< - BankingAccountBalance, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - accountId: z.string(), - balance: AccountBalanceAmounts$inboundSchema, - date: z.string(), -}); +export function BankingAccountBalanceFromJSON(json: any): BankingAccountBalance { + return BankingAccountBalanceFromJSONTyped(json, false); +} + +export function BankingAccountBalanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingAccountBalance { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'accountId': json['accountId'], + 'balance': AccountBalanceAmountsFromJSON(json['balance']), + 'date': json['date'], + }; +} + +export function BankingAccountBalanceToJSON(json: any): BankingAccountBalance { + return BankingAccountBalanceToJSONTyped(json, false); +} + +export function BankingAccountBalanceToJSONTyped(value?: BankingAccountBalance | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'accountId': value['accountId'], + 'balance': AccountBalanceAmountsToJSON(value['balance']), + 'date': value['date'], + }; +} + + +export interface BankingAccountBalancesBankingAccountBalance { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccountBalance + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccountBalance + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the account. + * @type {string} + * @memberof BankingAccountBalance + */ + accountId: string; + /** + * + * @type {AccountBalanceAmounts} + * @memberof BankingAccountBalance + */ + balance: AccountBalanceAmounts; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingAccountBalance + */ + date: string; +} + +export interface BankingAccountBalancesListResponseBankingAccountBalance { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccountBalance + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccountBalance + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the account. + * @type {string} + * @memberof BankingAccountBalance + */ + accountId: string; + /** + * + * @type {AccountBalanceAmounts} + * @memberof BankingAccountBalance + */ + balance: AccountBalanceAmounts; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingAccountBalance + */ + date: string; +} -export function bankingAccountBalanceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingAccountBalance$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingAccountBalance' from JSON`, - ); +export interface ListBankingAccountBalancesResponseBankingAccountBalance { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccountBalance + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingAccountBalance + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the account. + * @type {string} + * @memberof BankingAccountBalance + */ + accountId: string; + /** + * + * @type {AccountBalanceAmounts} + * @memberof BankingAccountBalance + */ + balance: AccountBalanceAmounts; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingAccountBalance + */ + date: string; } diff --git a/lending/src/sdk/models/shared/bankingaccountbalances.ts b/lending/src/sdk/models/shared/bankingaccountbalances.ts index 5bbd9b66f..2cdb045d7 100644 --- a/lending/src/sdk/models/shared/bankingaccountbalances.ts +++ b/lending/src/sdk/models/shared/bankingaccountbalances.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { BankingAccountBalance } from './bankingaccountbalance'; import { - BankingAccountBalance, - BankingAccountBalance$inboundSchema, -} from "./bankingaccountbalance.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type BankingAccountBalances = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const BankingAccountBalances$inboundSchema: z.ZodType< - BankingAccountBalances, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(BankingAccountBalance$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function bankingAccountBalancesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingAccountBalances$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingAccountBalances' from JSON`, - ); + BankingAccountBalanceFromJSON, + BankingAccountBalanceFromJSONTyped, + BankingAccountBalanceToJSON, + BankingAccountBalanceToJSONTyped, +} from './bankingaccountbalance'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface BankingAccountBalances + */ +export interface BankingAccountBalances { + /** + * Current page number. + * @type {number} + * @memberof BankingAccountBalances + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccountBalances + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccountBalances + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccountBalances + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccountBalances + */ + results?: Array; +} + +/** + * Check if a given object implements the BankingAccountBalances interface. + */ +export function instanceOfBankingAccountBalances(value: object): value is BankingAccountBalances { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function BankingAccountBalancesFromJSON(json: any): BankingAccountBalances { + return BankingAccountBalancesFromJSONTyped(json, false); +} + +export function BankingAccountBalancesFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingAccountBalances { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(BankingAccountBalanceFromJSON)), + }; +} + +export function BankingAccountBalancesToJSON(json: any): BankingAccountBalances { + return BankingAccountBalancesToJSONTyped(json, false); +} + +export function BankingAccountBalancesToJSONTyped(value?: BankingAccountBalances | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(BankingAccountBalanceToJSON)), + }; +} + + +export interface BankingAccountBalancesListResponseBankingAccountBalances { + /** + * Current page number. + * @type {number} + * @memberof BankingAccountBalances + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccountBalances + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccountBalances + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccountBalances + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccountBalances + */ + results?: Array; +} + +export interface ListBankingAccountBalancesResponseBankingAccountBalances { + /** + * Current page number. + * @type {number} + * @memberof BankingAccountBalances + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccountBalances + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccountBalances + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccountBalances + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccountBalances + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/bankingaccounts.ts b/lending/src/sdk/models/shared/bankingaccounts.ts index ffcb308f8..e8c8fc031 100644 --- a/lending/src/sdk/models/shared/bankingaccounts.ts +++ b/lending/src/sdk/models/shared/bankingaccounts.ts @@ -1,58 +1,314 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - BankingAccount, - BankingAccount$inboundSchema, -} from "./bankingaccount.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type BankingAccounts = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const BankingAccounts$inboundSchema: z.ZodType< - BankingAccounts, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(BankingAccount$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function bankingAccountsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingAccounts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingAccounts' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { BankingAccount } from './bankingaccount'; +import { + BankingAccountFromJSON, + BankingAccountFromJSONTyped, + BankingAccountToJSON, + BankingAccountToJSONTyped, +} from './bankingaccount'; + +/** + * + * @export + * @interface BankingAccounts + */ +export interface BankingAccounts { + /** + * Current page number. + * @type {number} + * @memberof BankingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccounts + */ + results?: Array; +} + +/** + * Check if a given object implements the BankingAccounts interface. + */ +export function instanceOfBankingAccounts(value: object): value is BankingAccounts { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function BankingAccountsFromJSON(json: any): BankingAccounts { + return BankingAccountsFromJSONTyped(json, false); +} + +export function BankingAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingAccounts { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(BankingAccountFromJSON)), + }; +} + +export function BankingAccountsToJSON(json: any): BankingAccounts { + return BankingAccountsToJSONTyped(json, false); +} + +export function BankingAccountsToJSONTyped(value?: BankingAccounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(BankingAccountToJSON)), + }; +} + + +export interface BankingAccountsBankingBankAccounts { + /** + * Current page number. + * @type {number} + * @memberof BankingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccounts + */ + results?: Array; +} + +export interface BankingAccountsListResponseBankingAccounts { + /** + * Current page number. + * @type {number} + * @memberof BankingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccounts + */ + results?: Array; +} + +export interface BankingAccountsListResponseBankingBankAccounts { + /** + * Current page number. + * @type {number} + * @memberof BankingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccounts + */ + results?: Array; +} + +export interface BankingBankAccounts { + /** + * Current page number. + * @type {number} + * @memberof BankingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccounts + */ + results?: Array; +} + +export interface ListBankingAccountsResponseBankingAccounts { + /** + * Current page number. + * @type {number} + * @memberof BankingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccounts + */ + results?: Array; +} + +export interface ListBankingAccountsResponseBankingBankAccounts { + /** + * Current page number. + * @type {number} + * @memberof BankingAccounts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingAccounts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingAccounts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingAccounts + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingAccounts + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/bankingtransaction.ts b/lending/src/sdk/models/shared/bankingtransaction.ts index c0f895ea2..0504bd51f 100644 --- a/lending/src/sdk/models/shared/bankingtransaction.ts +++ b/lending/src/sdk/models/shared/bankingtransaction.ts @@ -1,182 +1,976 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { TransactionCategoryRef } from './transactioncategoryref'; import { - TransactionCategoryRef, - TransactionCategoryRef$inboundSchema, - TransactionCategoryRef$Outbound, - TransactionCategoryRef$outboundSchema, -} from "./transactioncategoryref.js"; + TransactionCategoryRefFromJSON, + TransactionCategoryRefFromJSONTyped, + TransactionCategoryRefToJSON, + TransactionCategoryRefToJSONTyped, +} from './transactioncategoryref'; +import type { TransactionCode } from './transactioncode'; import { - TransactionCode, - TransactionCode$inboundSchema, - TransactionCode$outboundSchema, -} from "./transactioncode.js"; + TransactionCodeFromJSON, + TransactionCodeFromJSONTyped, + TransactionCodeToJSON, + TransactionCodeToJSONTyped, +} from './transactioncode'; /** * The Banking Transactions data type provides an immutable source of up-to-date information on income and expenditure. - * - * @remarks - * + * * Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. + * @export + * @interface BankingTransaction + */ +export interface BankingTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + id: string; + /** + * The unique identifier of the bank account. + * @type {string} + * @memberof BankingTransaction + */ + accountId: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + description?: string | null; + /** + * The amount of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + amount?: Decimal | number; + /** + * The currency of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + currency: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + postedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + authorizedDate?: string; + /** + * + * @type {TransactionCode} + * @memberof BankingTransaction + */ + code?: TransactionCode; + /** + * The name of the merchant. + * @type {string} + * @memberof BankingTransaction + */ + merchantName?: string | null; + /** + * + * @type {TransactionCategoryRef} + * @memberof BankingTransaction + */ + transactionCategoryRef?: TransactionCategoryRef; +} + + + +/** + * Check if a given object implements the BankingTransaction interface. */ -export type BankingTransaction = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * The unique identifier of the bank transaction. - */ - id: string; - /** - * The unique identifier of the bank account. - */ - accountId: string; - /** - * The description of the bank transaction. - */ - description?: string | null | undefined; - /** - * The amount of the bank transaction. - */ - amount?: Decimal$ | number | undefined; - /** - * The currency of the bank transaction. - */ - currency: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - postedDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - authorizedDate?: string | undefined; - /** - * Code to identify the underlying transaction. - */ - code?: TransactionCode | undefined; - /** - * The name of the merchant. - */ - merchantName?: string | null | undefined; - /** - * An object of bank transaction category reference data. - */ - transactionCategoryRef?: TransactionCategoryRef | undefined; -}; - -/** @internal */ -export const BankingTransaction$inboundSchema: z.ZodType< - BankingTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - accountId: z.string(), - description: z.nullable(z.string()).optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string(), - postedDate: z.string().optional(), - authorizedDate: z.string().optional(), - code: TransactionCode$inboundSchema.optional(), - merchantName: z.nullable(z.string()).optional(), - transactionCategoryRef: TransactionCategoryRef$inboundSchema.optional(), -}); -/** @internal */ -export type BankingTransaction$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id: string; - accountId: string; - description?: string | null | undefined; - amount?: number | undefined; - currency: string; - postedDate?: string | undefined; - authorizedDate?: string | undefined; - code?: string | undefined; - merchantName?: string | null | undefined; - transactionCategoryRef?: TransactionCategoryRef$Outbound | undefined; -}; - -/** @internal */ -export const BankingTransaction$outboundSchema: z.ZodType< - BankingTransaction$Outbound, - z.ZodTypeDef, - BankingTransaction -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - accountId: z.string(), - description: z.nullable(z.string()).optional(), - amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), - currency: z.string(), - postedDate: z.string().optional(), - authorizedDate: z.string().optional(), - code: TransactionCode$outboundSchema.optional(), - merchantName: z.nullable(z.string()).optional(), - transactionCategoryRef: TransactionCategoryRef$outboundSchema.optional(), -}); - -export function bankingTransactionToJSON( - bankingTransaction: BankingTransaction, -): string { - return JSON.stringify( - BankingTransaction$outboundSchema.parse(bankingTransaction), - ); +export function instanceOfBankingTransaction(value: object): value is BankingTransaction { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('accountId' in value) || value['accountId'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + return true; +} + +export function BankingTransactionFromJSON(json: any): BankingTransaction { + return BankingTransactionFromJSONTyped(json, false); +} + +export function BankingTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingTransaction { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'], + 'accountId': json['accountId'], + 'description': json['description'] == null ? undefined : json['description'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'currency': json['currency'], + 'postedDate': json['postedDate'] == null ? undefined : json['postedDate'], + 'authorizedDate': json['authorizedDate'] == null ? undefined : json['authorizedDate'], + 'code': json['code'] == null ? undefined : TransactionCodeFromJSON(json['code']), + 'merchantName': json['merchantName'] == null ? undefined : json['merchantName'], + 'transactionCategoryRef': json['transactionCategoryRef'] == null ? undefined : TransactionCategoryRefFromJSON(json['transactionCategoryRef']), + }; +} + +export function BankingTransactionToJSON(json: any): BankingTransaction { + return BankingTransactionToJSONTyped(json, false); +} + +export function BankingTransactionToJSONTyped(value?: BankingTransaction | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'accountId': value['accountId'], + 'description': value['description'], + 'amount': fromDecimal(value['amount']), + 'currency': value['currency'], + 'postedDate': value['postedDate'], + 'authorizedDate': value['authorizedDate'], + 'code': TransactionCodeToJSON(value['code']), + 'merchantName': value['merchantName'], + 'transactionCategoryRef': TransactionCategoryRefToJSON(value['transactionCategoryRef']), + }; +} + + +export interface BankingTransactionGetResponseBankingTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + id: string; + /** + * The unique identifier of the bank account. + * @type {string} + * @memberof BankingTransaction + */ + accountId: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + description?: string | null; + /** + * The amount of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + amount?: Decimal | number; + /** + * The currency of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + currency: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + postedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + authorizedDate?: string; + /** + * + * @type {TransactionCode} + * @memberof BankingTransaction + */ + code?: TransactionCode; + /** + * The name of the merchant. + * @type {string} + * @memberof BankingTransaction + */ + merchantName?: string | null; + /** + * + * @type {TransactionCategoryRef} + * @memberof BankingTransaction + */ + transactionCategoryRef?: TransactionCategoryRef; +} + +export interface BankingTransactionsBankingTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + id: string; + /** + * The unique identifier of the bank account. + * @type {string} + * @memberof BankingTransaction + */ + accountId: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + description?: string | null; + /** + * The amount of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + amount?: Decimal | number; + /** + * The currency of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + currency: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + postedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + authorizedDate?: string; + /** + * + * @type {TransactionCode} + * @memberof BankingTransaction + */ + code?: TransactionCode; + /** + * The name of the merchant. + * @type {string} + * @memberof BankingTransaction + */ + merchantName?: string | null; + /** + * + * @type {TransactionCategoryRef} + * @memberof BankingTransaction + */ + transactionCategoryRef?: TransactionCategoryRef; +} + +export interface BankingTransactionsListResponseBankingTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + id: string; + /** + * The unique identifier of the bank account. + * @type {string} + * @memberof BankingTransaction + */ + accountId: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + description?: string | null; + /** + * The amount of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + amount?: Decimal | number; + /** + * The currency of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + currency: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + postedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + authorizedDate?: string; + /** + * + * @type {TransactionCode} + * @memberof BankingTransaction + */ + code?: TransactionCode; + /** + * The name of the merchant. + * @type {string} + * @memberof BankingTransaction + */ + merchantName?: string | null; + /** + * + * @type {TransactionCategoryRef} + * @memberof BankingTransaction + */ + transactionCategoryRef?: TransactionCategoryRef; +} + +export interface GetBankingTransactionResponseBankingTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + id: string; + /** + * The unique identifier of the bank account. + * @type {string} + * @memberof BankingTransaction + */ + accountId: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + description?: string | null; + /** + * The amount of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + amount?: Decimal | number; + /** + * The currency of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + currency: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + postedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + authorizedDate?: string; + /** + * + * @type {TransactionCode} + * @memberof BankingTransaction + */ + code?: TransactionCode; + /** + * The name of the merchant. + * @type {string} + * @memberof BankingTransaction + */ + merchantName?: string | null; + /** + * + * @type {TransactionCategoryRef} + * @memberof BankingTransaction + */ + transactionCategoryRef?: TransactionCategoryRef; +} + +export interface ListBankingTransactionsResponseBankingTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + id: string; + /** + * The unique identifier of the bank account. + * @type {string} + * @memberof BankingTransaction + */ + accountId: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + description?: string | null; + /** + * The amount of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + amount?: Decimal | number; + /** + * The currency of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + currency: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + postedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + authorizedDate?: string; + /** + * + * @type {TransactionCode} + * @memberof BankingTransaction + */ + code?: TransactionCode; + /** + * The name of the merchant. + * @type {string} + * @memberof BankingTransaction + */ + merchantName?: string | null; + /** + * + * @type {TransactionCategoryRef} + * @memberof BankingTransaction + */ + transactionCategoryRef?: TransactionCategoryRef; } -export function bankingTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingTransaction' from JSON`, - ); + +export interface UploadBankStatementDataRequestBodyBankingTransaction { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransaction + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + id: string; + /** + * The unique identifier of the bank account. + * @type {string} + * @memberof BankingTransaction + */ + accountId: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + description?: string | null; + /** + * The amount of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + amount?: Decimal | number; + /** + * The currency of the bank transaction. + * @type {string} + * @memberof BankingTransaction + */ + currency: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + postedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransaction + */ + authorizedDate?: string; + /** + * + * @type {TransactionCode} + * @memberof BankingTransaction + */ + code?: TransactionCode; + /** + * The name of the merchant. + * @type {string} + * @memberof BankingTransaction + */ + merchantName?: string | null; + /** + * + * @type {TransactionCategoryRef} + * @memberof BankingTransaction + */ + transactionCategoryRef?: TransactionCategoryRef; } diff --git a/lending/src/sdk/models/shared/bankingtransactioncategories.ts b/lending/src/sdk/models/shared/bankingtransactioncategories.ts index 9ffcd1e5c..60cdddf26 100644 --- a/lending/src/sdk/models/shared/bankingtransactioncategories.ts +++ b/lending/src/sdk/models/shared/bankingtransactioncategories.ts @@ -1,59 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { BankingTransactionCategory } from './bankingtransactioncategory'; import { - BankingTransactionCategory, - BankingTransactionCategory$inboundSchema, -} from "./bankingtransactioncategory.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type BankingTransactionCategories = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const BankingTransactionCategories$inboundSchema: z.ZodType< - BankingTransactionCategories, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(BankingTransactionCategory$inboundSchema)) - .optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function bankingTransactionCategoriesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingTransactionCategories$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingTransactionCategories' from JSON`, - ); + BankingTransactionCategoryFromJSON, + BankingTransactionCategoryFromJSONTyped, + BankingTransactionCategoryToJSON, + BankingTransactionCategoryToJSONTyped, +} from './bankingtransactioncategory'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface BankingTransactionCategories + */ +export interface BankingTransactionCategories { + /** + * Current page number. + * @type {number} + * @memberof BankingTransactionCategories + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingTransactionCategories + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingTransactionCategories + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingTransactionCategories + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingTransactionCategories + */ + results?: Array; +} + +/** + * Check if a given object implements the BankingTransactionCategories interface. + */ +export function instanceOfBankingTransactionCategories(value: object): value is BankingTransactionCategories { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function BankingTransactionCategoriesFromJSON(json: any): BankingTransactionCategories { + return BankingTransactionCategoriesFromJSONTyped(json, false); +} + +export function BankingTransactionCategoriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingTransactionCategories { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(BankingTransactionCategoryFromJSON)), + }; +} + +export function BankingTransactionCategoriesToJSON(json: any): BankingTransactionCategories { + return BankingTransactionCategoriesToJSONTyped(json, false); +} + +export function BankingTransactionCategoriesToJSONTyped(value?: BankingTransactionCategories | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(BankingTransactionCategoryToJSON)), + }; +} + + +export interface BankingTransactionCategoriesListResponseBankingTransactionCategories { + /** + * Current page number. + * @type {number} + * @memberof BankingTransactionCategories + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingTransactionCategories + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingTransactionCategories + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingTransactionCategories + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingTransactionCategories + */ + results?: Array; +} + +export interface ListBankingTransactionCategoriesResponseBankingTransactionCategories { + /** + * Current page number. + * @type {number} + * @memberof BankingTransactionCategories + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingTransactionCategories + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingTransactionCategories + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingTransactionCategories + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingTransactionCategories + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/bankingtransactioncategory.ts b/lending/src/sdk/models/shared/bankingtransactioncategory.ts index c32857aa3..f16d19096 100644 --- a/lending/src/sdk/models/shared/bankingtransactioncategory.ts +++ b/lending/src/sdk/models/shared/bankingtransactioncategory.ts @@ -1,69 +1,436 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { TransactionCategoryStatus } from './transactioncategorystatus'; import { - TransactionCategoryStatus, - TransactionCategoryStatus$inboundSchema, -} from "./transactioncategorystatus.js"; + TransactionCategoryStatusFromJSON, + TransactionCategoryStatusFromJSONTyped, + TransactionCategoryStatusToJSON, + TransactionCategoryStatusToJSONTyped, +} from './transactioncategorystatus'; /** * The Banking Transaction Categories data type provides a list of hierarchical categories associated with a transaction for greater contextual meaning to transaction activity. - * - * @remarks - * + * * Responses are paged, so you should provide `page` and `pageSize` query parameters in your request. + * @export + * @interface BankingTransactionCategory + */ +export interface BankingTransactionCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + id: string; + /** + * The name of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + name: string; + /** + * The unique identifier of the parent bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + parentId?: string | null; + /** + * A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof BankingTransactionCategory + */ + hasChildren?: boolean; + /** + * + * @type {TransactionCategoryStatus} + * @memberof BankingTransactionCategory + */ + status?: TransactionCategoryStatus; +} + + + +/** + * Check if a given object implements the BankingTransactionCategory interface. */ -export type BankingTransactionCategory = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * The unique identifier of the bank transaction category. - */ - id: string; - /** - * The name of the bank transaction category. - */ - name: string; - /** - * The unique identifier of the parent bank transaction category. - */ - parentId?: string | null | undefined; - /** - * A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. - */ - hasChildren?: boolean | undefined; - /** - * The status of the transaction category. - */ - status?: TransactionCategoryStatus | undefined; -}; - -/** @internal */ -export const BankingTransactionCategory$inboundSchema: z.ZodType< - BankingTransactionCategory, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - name: z.string(), - parentId: z.nullable(z.string()).optional(), - hasChildren: z.boolean().optional(), - status: TransactionCategoryStatus$inboundSchema.optional(), -}); - -export function bankingTransactionCategoryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingTransactionCategory$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingTransactionCategory' from JSON`, - ); +export function instanceOfBankingTransactionCategory(value: object): value is BankingTransactionCategory { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function BankingTransactionCategoryFromJSON(json: any): BankingTransactionCategory { + return BankingTransactionCategoryFromJSONTyped(json, false); +} + +export function BankingTransactionCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingTransactionCategory { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'], + 'name': json['name'], + 'parentId': json['parentId'] == null ? undefined : json['parentId'], + 'hasChildren': json['hasChildren'] == null ? undefined : json['hasChildren'], + 'status': json['status'] == null ? undefined : TransactionCategoryStatusFromJSON(json['status']), + }; +} + +export function BankingTransactionCategoryToJSON(json: any): BankingTransactionCategory { + return BankingTransactionCategoryToJSONTyped(json, false); +} + +export function BankingTransactionCategoryToJSONTyped(value?: BankingTransactionCategory | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'name': value['name'], + 'parentId': value['parentId'], + 'hasChildren': value['hasChildren'], + 'status': TransactionCategoryStatusToJSON(value['status']), + }; +} + + +export interface BankingTransactionCategoriesBankingTransactionCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + id: string; + /** + * The name of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + name: string; + /** + * The unique identifier of the parent bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + parentId?: string | null; + /** + * A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof BankingTransactionCategory + */ + hasChildren?: boolean; + /** + * + * @type {TransactionCategoryStatus} + * @memberof BankingTransactionCategory + */ + status?: TransactionCategoryStatus; +} + +export interface BankingTransactionCategoriesListResponseBankingTransactionCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + id: string; + /** + * The name of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + name: string; + /** + * The unique identifier of the parent bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + parentId?: string | null; + /** + * A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof BankingTransactionCategory + */ + hasChildren?: boolean; + /** + * + * @type {TransactionCategoryStatus} + * @memberof BankingTransactionCategory + */ + status?: TransactionCategoryStatus; +} + +export interface BankingTransactionCategoryGetResponseBankingTransactionCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + id: string; + /** + * The name of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + name: string; + /** + * The unique identifier of the parent bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + parentId?: string | null; + /** + * A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof BankingTransactionCategory + */ + hasChildren?: boolean; + /** + * + * @type {TransactionCategoryStatus} + * @memberof BankingTransactionCategory + */ + status?: TransactionCategoryStatus; +} + +export interface GetBankingTransactionCategoryResponseBankingTransactionCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + id: string; + /** + * The name of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + name: string; + /** + * The unique identifier of the parent bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + parentId?: string | null; + /** + * A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof BankingTransactionCategory + */ + hasChildren?: boolean; + /** + * + * @type {TransactionCategoryStatus} + * @memberof BankingTransactionCategory + */ + status?: TransactionCategoryStatus; +} + +export interface ListBankingTransactionCategoriesResponseBankingTransactionCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof BankingTransactionCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + id: string; + /** + * The name of the bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + name: string; + /** + * The unique identifier of the parent bank transaction category. + * @type {string} + * @memberof BankingTransactionCategory + */ + parentId?: string | null; + /** + * A Boolean indicating whether there are other bank transaction categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof BankingTransactionCategory + */ + hasChildren?: boolean; + /** + * + * @type {TransactionCategoryStatus} + * @memberof BankingTransactionCategory + */ + status?: TransactionCategoryStatus; } diff --git a/lending/src/sdk/models/shared/bankingtransactionref.ts b/lending/src/sdk/models/shared/bankingtransactionref.ts index df1a08bc4..e5c404a53 100644 --- a/lending/src/sdk/models/shared/bankingtransactionref.ts +++ b/lending/src/sdk/models/shared/bankingtransactionref.ts @@ -1,83 +1,132 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface BankingTransactionRef + */ +export interface BankingTransactionRef { + /** + * Unique identifier for the bank transaction. + * @type {string} + * @memberof BankingTransactionRef + */ + id?: string; + /** + * Unique identifier of the bank transaction's connection. + * @type {string} + * @memberof BankingTransactionRef + */ + dataConnectionId?: string; + /** + * Unique identifier of the bank transaction's account. + * @type {string} + * @memberof BankingTransactionRef + */ + accountId?: string; + /** + * Name given to account. + * @type {string} + * @memberof BankingTransactionRef + */ + accountName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BankingTransactionRef + */ + date?: string; + /** + * Description given to bank transaction. + * @type {string} + * @memberof BankingTransactionRef + */ + description?: string; + /** + * Bank transaction amount. + * @type {string} + * @memberof BankingTransactionRef + */ + amount?: Decimal | number; +} -export type BankingTransactionRef = { - /** - * Unique identifier for the bank transaction. - */ - id?: string | undefined; - /** - * Unique identifier of the bank transaction's connection. - */ - dataConnectionId?: string | undefined; - /** - * Unique identifier of the bank transaction's account. - */ - accountId?: string | undefined; - /** - * Name given to account. - */ - accountName?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * Description given to bank transaction. - */ - description?: string | undefined; - /** - * Bank transaction amount. - */ - amount?: Decimal$ | number | undefined; -}; +/** + * Check if a given object implements the BankingTransactionRef interface. + */ +export function instanceOfBankingTransactionRef(value: object): value is BankingTransactionRef { + return true; +} -/** @internal */ -export const BankingTransactionRef$inboundSchema: z.ZodType< - BankingTransactionRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataConnectionId: z.string().optional(), - accountId: z.string().optional(), - accountName: z.string().optional(), - date: z.string().optional(), - description: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), -}); +export function BankingTransactionRefFromJSON(json: any): BankingTransactionRef { + return BankingTransactionRefFromJSONTyped(json, false); +} -export function bankingTransactionRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingTransactionRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingTransactionRef' from JSON`, - ); +export function BankingTransactionRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingTransactionRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataConnectionId': json['dataConnectionId'] == null ? undefined : json['dataConnectionId'], + 'accountId': json['accountId'] == null ? undefined : json['accountId'], + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'date': json['date'] == null ? undefined : json['date'], + 'description': json['description'] == null ? undefined : json['description'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + }; } + +export function BankingTransactionRefToJSON(json: any): BankingTransactionRef { + return BankingTransactionRefToJSONTyped(json, false); +} + +export function BankingTransactionRefToJSONTyped(value?: BankingTransactionRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataConnectionId': value['dataConnectionId'], + 'accountId': value['accountId'], + 'accountName': value['accountName'], + 'date': value['date'], + 'description': value['description'], + 'amount': fromDecimal(value['amount']), + }; +} + diff --git a/lending/src/sdk/models/shared/bankingtransactions.ts b/lending/src/sdk/models/shared/bankingtransactions.ts index 04e8f804a..40ef0cba2 100644 --- a/lending/src/sdk/models/shared/bankingtransactions.ts +++ b/lending/src/sdk/models/shared/bankingtransactions.ts @@ -1,97 +1,215 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - BankingTransaction, - BankingTransaction$inboundSchema, - BankingTransaction$Outbound, - BankingTransaction$outboundSchema, -} from "./bankingtransaction.js"; + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { BankingTransaction } from './bankingtransaction'; import { - Links, - Links$inboundSchema, - Links$Outbound, - Links$outboundSchema, -} from "./links.js"; + BankingTransactionFromJSON, + BankingTransactionFromJSONTyped, + BankingTransactionToJSON, + BankingTransactionToJSONTyped, +} from './bankingtransaction'; -export type BankingTransactions = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; +/** + * + * @export + * @interface BankingTransactions + */ +export interface BankingTransactions { + /** + * Current page number. + * @type {number} + * @memberof BankingTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingTransactions + */ + results?: Array; +} + +/** + * Check if a given object implements the BankingTransactions interface. + */ +export function instanceOfBankingTransactions(value: object): value is BankingTransactions { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function BankingTransactionsFromJSON(json: any): BankingTransactions { + return BankingTransactionsFromJSONTyped(json, false); +} + +export function BankingTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankingTransactions { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(BankingTransactionFromJSON)), + }; +} + +export function BankingTransactionsToJSON(json: any): BankingTransactions { + return BankingTransactionsToJSONTyped(json, false); +} + +export function BankingTransactionsToJSONTyped(value?: BankingTransactions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(BankingTransactionToJSON)), + }; +} -/** @internal */ -export const BankingTransactions$inboundSchema: z.ZodType< - BankingTransactions, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(BankingTransaction$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); -/** @internal */ -export type BankingTransactions$Outbound = { - results?: Array | undefined; - pageNumber: number; - pageSize: number; - totalResults: number; - _links: Links$Outbound; -}; -/** @internal */ -export const BankingTransactions$outboundSchema: z.ZodType< - BankingTransactions$Outbound, - z.ZodTypeDef, - BankingTransactions -> = z.object({ - results: z.array(z.nullable(BankingTransaction$outboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - links: Links$outboundSchema, -}).transform((v) => { - return remap$(v, { - links: "_links", - }); -}); +export interface BankingTransactionsListResponseBankingTransactions { + /** + * Current page number. + * @type {number} + * @memberof BankingTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingTransactions + */ + results?: Array; +} -export function bankingTransactionsToJSON( - bankingTransactions: BankingTransactions, -): string { - return JSON.stringify( - BankingTransactions$outboundSchema.parse(bankingTransactions), - ); +export interface ListBankingTransactionsResponseBankingTransactions { + /** + * Current page number. + * @type {number} + * @memberof BankingTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingTransactions + */ + results?: Array; } -export function bankingTransactionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankingTransactions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankingTransactions' from JSON`, - ); + +export interface UploadBankStatementDataRequestBodyBankingTransactions { + /** + * Current page number. + * @type {number} + * @memberof BankingTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof BankingTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof BankingTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof BankingTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof BankingTransactions + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/bankstatementuploadconfiguration.ts b/lending/src/sdk/models/shared/bankstatementuploadconfiguration.ts index 1123d6ad3..467e4665b 100644 --- a/lending/src/sdk/models/shared/bankstatementuploadconfiguration.ts +++ b/lending/src/sdk/models/shared/bankstatementuploadconfiguration.ts @@ -1,92 +1,381 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { Source } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * The source of the banking data that determines its format + * Configuration settings for uploading banking data to Codat + * @export + * @interface BankStatementUploadConfiguration */ -export const Source = { - Codat: "codat", -} as const; +export interface BankStatementUploadConfiguration { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + + /** - * The source of the banking data that determines its format + * @export */ -export type Source = ClosedEnum; +export const BankStatementUploadConfigurationSourceEnum = { + Codat: 'codat' +} as const; +export type BankStatementUploadConfigurationSourceEnum = typeof BankStatementUploadConfigurationSourceEnum[keyof typeof BankStatementUploadConfigurationSourceEnum]; + /** - * Configuration settings for uploading banking data to Codat + * Check if a given object implements the BankStatementUploadConfiguration interface. */ -export type BankStatementUploadConfiguration = { - /** - * The source of the banking data that determines its format - */ - source?: Source | undefined; - /** - * The ID of the account in the third-party platform - */ - accountId?: string | undefined; - /** - * TrueLayer provider ID (only required if source is TrueLayer) - */ - providerId?: string | undefined; -}; - -/** @internal */ -export const Source$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Source); -/** @internal */ -export const Source$outboundSchema: z.ZodNativeEnum = - Source$inboundSchema; - -/** @internal */ -export const BankStatementUploadConfiguration$inboundSchema: z.ZodType< - BankStatementUploadConfiguration, - z.ZodTypeDef, - unknown -> = z.object({ - source: Source$inboundSchema.optional(), - accountId: z.string().optional(), - providerId: z.string().optional(), -}); -/** @internal */ -export type BankStatementUploadConfiguration$Outbound = { - source?: string | undefined; - accountId?: string | undefined; - providerId?: string | undefined; -}; - -/** @internal */ -export const BankStatementUploadConfiguration$outboundSchema: z.ZodType< - BankStatementUploadConfiguration$Outbound, - z.ZodTypeDef, - BankStatementUploadConfiguration -> = z.object({ - source: Source$outboundSchema.optional(), - accountId: z.string().optional(), - providerId: z.string().optional(), -}); - -export function bankStatementUploadConfigurationToJSON( - bankStatementUploadConfiguration: BankStatementUploadConfiguration, -): string { - return JSON.stringify( - BankStatementUploadConfiguration$outboundSchema.parse( - bankStatementUploadConfiguration, - ), - ); -} -export function bankStatementUploadConfigurationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankStatementUploadConfiguration$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankStatementUploadConfiguration' from JSON`, - ); +export function instanceOfBankStatementUploadConfiguration(value: object): value is BankStatementUploadConfiguration { + return true; +} + +export function BankStatementUploadConfigurationFromJSON(json: any): BankStatementUploadConfiguration { + return BankStatementUploadConfigurationFromJSONTyped(json, false); +} + +export function BankStatementUploadConfigurationFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankStatementUploadConfiguration { + if (json == null) { + return json; + } + return { + + ...json, + 'source': json['source'] == null ? undefined : json['source'], + 'accountId': json['accountId'] == null ? undefined : json['accountId'], + 'providerId': json['providerId'] == null ? undefined : json['providerId'], + }; +} + +export function BankStatementUploadConfigurationToJSON(json: any): BankStatementUploadConfiguration { + return BankStatementUploadConfigurationToJSONTyped(json, false); +} + +export function BankStatementUploadConfigurationToJSONTyped(value?: BankStatementUploadConfiguration | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'source': value['source'], + 'accountId': value['accountId'], + 'providerId': value['providerId'], + }; +} + + +export interface BankStatementUploadConfigurationBankingDataUploadSettings { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface BankStatementUploadConfigurationGetResponseBankStatementUploadConfiguration { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface BankStatementUploadConfigurationGetResponseBankingDataUploadSettings { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface BankStatementUploadConfigurationSetRequestBody { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface BankStatementUploadConfigurationSetResponseBankStatementUploadConfiguration { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface BankStatementUploadConfigurationSetResponseBankingDataUploadSettings { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface BankingDataUploadSettings { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface GetBankStatementUploadConfigurationResponseBankStatementUploadConfiguration { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface GetBankStatementUploadConfigurationResponseBankingDataUploadSettings { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface SetBankStatementUploadConfigurationBankStatementUploadConfiguration { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface SetBankStatementUploadConfigurationRequestBody { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface SetBankStatementUploadConfigurationResponseBankStatementUploadConfiguration { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; +} + +export interface SetBankStatementUploadConfigurationResponseBankingDataUploadSettings { + [key: string]: any | any; + /** + * The source of the banking data that determines its format + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + source?: Source; + /** + * The ID of the account in the third-party platform + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + accountId?: string; + /** + * TrueLayer provider ID (only required if source is TrueLayer) + * @type {string} + * @memberof BankStatementUploadConfiguration + */ + providerId?: string; } diff --git a/lending/src/sdk/models/shared/banktransactiontype.ts b/lending/src/sdk/models/shared/banktransactiontype.ts index fb414cf5a..48c496ff8 100644 --- a/lending/src/sdk/models/shared/banktransactiontype.ts +++ b/lending/src/sdk/models/shared/banktransactiontype.ts @@ -1,39 +1,71 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ + +import type { Payment } from './payment'; +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Type of transaction for the bank statement line. + * @export */ export const BankTransactionType = { - Unknown: "Unknown", - Credit: "Credit", - Debit: "Debit", - Int: "Int", - Div: "Div", - Fee: "Fee", - SerChg: "SerChg", - Dep: "Dep", - Atm: "Atm", - Pos: "Pos", - Xfer: "Xfer", - Check: "Check", - Payment: "Payment", - Cash: "Cash", - DirectDep: "DirectDep", - DirectDebit: "DirectDebit", - RepeatPmt: "RepeatPmt", - Other: "Other", + Unknown: 'Unknown', + Credit: 'Credit', + Debit: 'Debit', + Int: 'Int', + Div: 'Div', + Fee: 'Fee', + SerChg: 'SerChg', + Dep: 'Dep', + Atm: 'Atm', + Pos: 'Pos', + Xfer: 'Xfer', + Check: 'Check', + Payment: 'Payment', + Cash: 'Cash', + DirectDep: 'DirectDep', + DirectDebit: 'DirectDebit', + RepeatPmt: 'RepeatPmt', + Other: 'Other' } as const; -/** - * Type of transaction for the bank statement line. - */ -export type BankTransactionType = ClosedEnum; +export type BankTransactionType = typeof BankTransactionType[keyof typeof BankTransactionType]; + + +export function instanceOfBankTransactionType(value: any): boolean { + for (const key in BankTransactionType) { + if (Object.prototype.hasOwnProperty.call(BankTransactionType, key)) { + if (BankTransactionType[key as keyof typeof BankTransactionType] === value) { + return true; + } + } + } + return false; +} + +export function BankTransactionTypeFromJSON(json: any): BankTransactionType { + return BankTransactionTypeFromJSONTyped(json, false); +} + +export function BankTransactionTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankTransactionType { + return json as BankTransactionType; +} + +export function BankTransactionTypeToJSON(value?: BankTransactionType | null): any { + return value as any; +} + +export function BankTransactionTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): BankTransactionType { + return value as BankTransactionType; +} -/** @internal */ -export const BankTransactionType$inboundSchema: z.ZodNativeEnum< - typeof BankTransactionType -> = z.nativeEnum(BankTransactionType); diff --git a/lending/src/sdk/models/shared/billcreditnotelineitem.ts b/lending/src/sdk/models/shared/billcreditnotelineitem.ts index 254902ca3..da922d952 100644 --- a/lending/src/sdk/models/shared/billcreditnotelineitem.ts +++ b/lending/src/sdk/models/shared/billcreditnotelineitem.ts @@ -1,220 +1,503 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; +import type { Zero } from '../_speakeasy_hoisted'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountsPayableTracking } from './accountspayabletracking'; +import { + AccountsPayableTrackingFromJSON, + AccountsPayableTrackingFromJSONTyped, + AccountsPayableTrackingToJSON, + AccountsPayableTrackingToJSONTyped, +} from './accountspayabletracking'; +import type { ItemReference } from './itemreference'; +import { + ItemReferenceFromJSON, + ItemReferenceFromJSONTyped, + ItemReferenceToJSON, + ItemReferenceToJSONTyped, +} from './itemreference'; +import type { TrackingCategoryRef } from './trackingcategoryref'; import { - AccountsPayableTracking, - AccountsPayableTracking$inboundSchema, -} from "./accountspayabletracking.js"; + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { TaxRateReference } from './taxratereference'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, -} from "./trackingcategoryref.js"; -import { Zero, Zero$inboundSchema } from "./zero.js"; + TaxRateReferenceFromJSON, + TaxRateReferenceFromJSONTyped, + TaxRateReferenceToJSON, + TaxRateReferenceToJSONTyped, +} from './taxratereference'; +import type { AccountRef } from './accountref'; +import { + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; +import type { RecordLineReference } from './recordlinereference'; +import { + RecordLineReferenceFromJSON, + RecordLineReferenceFromJSONTyped, + RecordLineReferenceToJSON, + RecordLineReferenceToJSONTyped, +} from './recordlinereference'; /** - * 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. - * - * @remarks - * - * Found on: - * - * - Bill line items - * - Bill Credit Note line items - * - Credit Note line items - * - Direct incomes line items - * - Invoice line items - * - Items + * + * @export + * @interface BillCreditNoteLineItem */ -export type TaxRateReference = { - /** - * Unique identifier for the tax rate in the accounting software. - */ - id?: string | undefined; - /** - * Name of the tax rate in the accounting software. - */ - name?: string | undefined; - /** - * Applicable tax rate. - */ - effectiveTaxRate?: Decimal$ | number | undefined; -}; +export interface BillCreditNoteLineItem { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been received. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + description?: string | null; + /** + * Unit price of the goods or service. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of the goods or service for which credit has been received. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + quantity: Decimal | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + * @type {string} + * @memberof BillCreditNoteLineItem + */ + unitOfMeasurement?: string | null; + /** + * Value of any discounts applied. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax associated with the line item. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + totalAmount?: Decimal | number | null; + /** + * + * @type {AccountRef} + * @memberof BillCreditNoteLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate of any discount applied to the line item. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {TaxRateReference} + * @memberof BillCreditNoteLineItem + */ + taxRateRef?: TaxRateReference; + /** + * + * @type {ItemReference} + * @memberof BillCreditNoteLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the line of the item that the current line was created from. + * @type {RecordLineReference} + * @memberof BillCreditNoteLineItem + */ + createdFromLineRef?: Zero; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof BillCreditNoteLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsPayableTracking} + * @memberof BillCreditNoteLineItem + */ + tracking?: AccountsPayableTracking; +} /** - * Reference to the item the line is linked to. + * Check if a given object implements the BillCreditNoteLineItem interface. */ -export type ItemReference = { - /** - * Unique identifier for the item in the accounting software. - */ - id: string; - /** - * Name of the item in the accounting software. - */ - name?: string | null | undefined; -}; +export function instanceOfBillCreditNoteLineItem(value: object): value is BillCreditNoteLineItem { + if (!('unitAmount' in value) || value['unitAmount'] === undefined) return false; + if (!('quantity' in value) || value['quantity'] === undefined) return false; + return true; +} -export type BillCreditNoteLineItem = { - /** - * Friendly name of each line item. For example, the goods or service for which credit has been received. - */ - description?: string | null | undefined; - /** - * Unit price of the goods or service. - */ - unitAmount: Decimal$ | number; - /** - * Number of units of the goods or service for which credit has been received. - */ - quantity: Decimal$ | number; - /** - * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). - */ - unitOfMeasurement?: string | null | undefined; - /** - * Value of any discounts applied. - */ - discountAmount?: Decimal$ | number | null | undefined; - /** - * Amount of credit associated with the line item, including discounts but excluding tax. - */ - subTotal?: Decimal$ | number | null | undefined; - /** - * Amount of tax associated with the line item. - */ - taxAmount?: Decimal$ | number | null | undefined; - /** - * Total amount of the line item, including discounts and tax. - */ - totalAmount?: Decimal$ | number | null | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * Percentage rate of any discount applied to the line item. - */ - discountPercentage?: Decimal$ | number | null | undefined; - /** - * 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. - * - * @remarks - * - * Found on: - * - * - Bill line items - * - Bill Credit Note line items - * - Credit Note line items - * - Direct incomes line items - * - Invoice line items - * - Items - */ - taxRateRef?: TaxRateReference | undefined; - /** - * Reference to the item the line is linked to. - */ - itemRef?: ItemReference | undefined; - /** - * Links the current record line to the underlying record line that created it. - * - * @remarks - * - * For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. - */ - createdFromLineRef?: Zero | undefined; - /** - * Reference to the tracking categories to which the line item is linked. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - trackingCategoryRefs?: Array | null | undefined; - /** - * Categories, and a project and customer, against which the item is tracked. - */ - tracking?: AccountsPayableTracking | undefined; -}; +export function BillCreditNoteLineItemFromJSON(json: any): BillCreditNoteLineItem { + return BillCreditNoteLineItemFromJSONTyped(json, false); +} -/** @internal */ -export const TaxRateReference$inboundSchema: z.ZodType< - TaxRateReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - effectiveTaxRate: z.number().transform(v => new Decimal$(v)).optional(), -}); +export function BillCreditNoteLineItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillCreditNoteLineItem { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'unitAmount': json['unitAmount'], + 'quantity': json['quantity'], + 'unitOfMeasurement': json['unitOfMeasurement'] == null ? undefined : json['unitOfMeasurement'], + 'discountAmount': json['discountAmount'] == null ? undefined : toDecimal(json['discountAmount']), + 'subTotal': json['subTotal'] == null ? undefined : toDecimal(json['subTotal']), + 'taxAmount': json['taxAmount'] == null ? undefined : toDecimal(json['taxAmount']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'discountPercentage': json['discountPercentage'] == null ? undefined : toDecimal(json['discountPercentage']), + 'taxRateRef': json['taxRateRef'] == null ? undefined : TaxRateReferenceFromJSON(json['taxRateRef']), + 'itemRef': json['itemRef'] == null ? undefined : ItemReferenceFromJSON(json['itemRef']), + 'createdFromLineRef': json['createdFromLineRef'] == null ? undefined : RecordLineReferenceFromJSON(json['createdFromLineRef']), + 'trackingCategoryRefs': json['trackingCategoryRefs'] == null ? undefined : ((json['trackingCategoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'tracking': json['tracking'] == null ? undefined : AccountsPayableTrackingFromJSON(json['tracking']), + }; +} -export function taxRateReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TaxRateReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TaxRateReference' from JSON`, - ); +export function BillCreditNoteLineItemToJSON(json: any): BillCreditNoteLineItem { + return BillCreditNoteLineItemToJSONTyped(json, false); } -/** @internal */ -export const ItemReference$inboundSchema: z.ZodType< - ItemReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); +export function BillCreditNoteLineItemToJSONTyped(value?: BillCreditNoteLineItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function itemReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ItemReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ItemReference' from JSON`, - ); + return { + + 'description': value['description'], + 'unitAmount': fromDecimal(value['unitAmount']), + 'quantity': fromDecimal(value['quantity']), + 'unitOfMeasurement': value['unitOfMeasurement'], + 'discountAmount': fromDecimal(value['discountAmount']), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'taxRateRef': TaxRateReferenceToJSON(value['taxRateRef']), + 'itemRef': ItemReferenceToJSON(value['itemRef']), + 'createdFromLineRef': RecordLineReferenceToJSON(value['createdFromLineRef']), + 'trackingCategoryRefs': value['trackingCategoryRefs'] == null ? undefined : ((value['trackingCategoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'tracking': AccountsPayableTrackingToJSON(value['tracking']), + }; } -/** @internal */ -export const BillCreditNoteLineItem$inboundSchema: z.ZodType< - BillCreditNoteLineItem, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.nullable(z.string()).optional(), - unitAmount: z.number().transform(v => new Decimal$(v)), - quantity: z.number().transform(v => new Decimal$(v)), - unitOfMeasurement: z.nullable(z.string()).optional(), - discountAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - taxAmount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - totalAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - accountRef: AccountRef$inboundSchema.optional(), - discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - taxRateRef: z.lazy(() => TaxRateReference$inboundSchema).optional(), - itemRef: z.lazy(() => ItemReference$inboundSchema).optional(), - createdFromLineRef: Zero$inboundSchema.optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) - .optional(), - tracking: AccountsPayableTracking$inboundSchema.optional(), -}); -export function billCreditNoteLineItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BillCreditNoteLineItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BillCreditNoteLineItem' from JSON`, - ); +export interface AccountingBillCreditNoteBillCreditNoteLineItem { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been received. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + description?: string | null; + /** + * Unit price of the goods or service. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of the goods or service for which credit has been received. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + quantity: Decimal | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + * @type {string} + * @memberof BillCreditNoteLineItem + */ + unitOfMeasurement?: string | null; + /** + * Value of any discounts applied. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax associated with the line item. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + totalAmount?: Decimal | number | null; + /** + * + * @type {AccountRef} + * @memberof BillCreditNoteLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate of any discount applied to the line item. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {TaxRateReference} + * @memberof BillCreditNoteLineItem + */ + taxRateRef?: TaxRateReference; + /** + * + * @type {ItemReference} + * @memberof BillCreditNoteLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the line of the item that the current line was created from. + * @type {RecordLineReference} + * @memberof BillCreditNoteLineItem + */ + createdFromLineRef?: RecordLineReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof BillCreditNoteLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsPayableTracking} + * @memberof BillCreditNoteLineItem + */ + tracking?: AccountsPayableTracking; +} + +export interface AccountingBillCreditNoteGetResponseBillCreditNoteLineItem { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been received. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + description?: string | null; + /** + * Unit price of the goods or service. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of the goods or service for which credit has been received. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + quantity: Decimal | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + * @type {string} + * @memberof BillCreditNoteLineItem + */ + unitOfMeasurement?: string | null; + /** + * Value of any discounts applied. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax associated with the line item. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + totalAmount?: Decimal | number | null; + /** + * + * @type {AccountRef} + * @memberof BillCreditNoteLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate of any discount applied to the line item. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {TaxRateReference} + * @memberof BillCreditNoteLineItem + */ + taxRateRef?: TaxRateReference; + /** + * + * @type {ItemReference} + * @memberof BillCreditNoteLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the line of the item that the current line was created from. + * @type {RecordLineReference} + * @memberof BillCreditNoteLineItem + */ + createdFromLineRef?: RecordLineReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof BillCreditNoteLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsPayableTracking} + * @memberof BillCreditNoteLineItem + */ + tracking?: AccountsPayableTracking; +} + +export interface GetAccountingBillCreditNoteResponseBillCreditNoteLineItem { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been received. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + description?: string | null; + /** + * Unit price of the goods or service. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of the goods or service for which credit has been received. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + quantity: Decimal | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + * @type {string} + * @memberof BillCreditNoteLineItem + */ + unitOfMeasurement?: string | null; + /** + * Value of any discounts applied. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax associated with the line item. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + totalAmount?: Decimal | number | null; + /** + * + * @type {AccountRef} + * @memberof BillCreditNoteLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate of any discount applied to the line item. + * @type {string} + * @memberof BillCreditNoteLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * + * @type {TaxRateReference} + * @memberof BillCreditNoteLineItem + */ + taxRateRef?: TaxRateReference; + /** + * + * @type {ItemReference} + * @memberof BillCreditNoteLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the line of the item that the current line was created from. + * @type {RecordLineReference} + * @memberof BillCreditNoteLineItem + */ + createdFromLineRef?: RecordLineReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof BillCreditNoteLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsPayableTracking} + * @memberof BillCreditNoteLineItem + */ + tracking?: AccountsPayableTracking; } diff --git a/lending/src/sdk/models/shared/billcreditnotestatus.ts b/lending/src/sdk/models/shared/billcreditnotestatus.ts index 3ae19ab76..8e46f4f97 100644 --- a/lending/src/sdk/models/shared/billcreditnotestatus.ts +++ b/lending/src/sdk/models/shared/billcreditnotestatus.ts @@ -1,27 +1,57 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Current state of the bill credit note + * @export */ export const BillCreditNoteStatus = { - Unknown: "Unknown", - Draft: "Draft", - Submitted: "Submitted", - Paid: "Paid", - Void: "Void", - PartiallyPaid: "PartiallyPaid", + Unknown: 'Unknown', + Draft: 'Draft', + Submitted: 'Submitted', + Paid: 'Paid', + Void: 'Void', + PartiallyPaid: 'PartiallyPaid' } as const; -/** - * Current state of the bill credit note - */ -export type BillCreditNoteStatus = ClosedEnum; +export type BillCreditNoteStatus = typeof BillCreditNoteStatus[keyof typeof BillCreditNoteStatus]; + + +export function instanceOfBillCreditNoteStatus(value: any): boolean { + for (const key in BillCreditNoteStatus) { + if (Object.prototype.hasOwnProperty.call(BillCreditNoteStatus, key)) { + if (BillCreditNoteStatus[key as keyof typeof BillCreditNoteStatus] === value) { + return true; + } + } + } + return false; +} + +export function BillCreditNoteStatusFromJSON(json: any): BillCreditNoteStatus { + return BillCreditNoteStatusFromJSONTyped(json, false); +} + +export function BillCreditNoteStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillCreditNoteStatus { + return json as BillCreditNoteStatus; +} + +export function BillCreditNoteStatusToJSON(value?: BillCreditNoteStatus | null): any { + return value as any; +} + +export function BillCreditNoteStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): BillCreditNoteStatus { + return value as BillCreditNoteStatus; +} -/** @internal */ -export const BillCreditNoteStatus$inboundSchema: z.ZodNativeEnum< - typeof BillCreditNoteStatus -> = z.nativeEnum(BillCreditNoteStatus); diff --git a/lending/src/sdk/models/shared/billedtotype.ts b/lending/src/sdk/models/shared/billedtotype.ts index d7b4ff6be..81ee3fb94 100644 --- a/lending/src/sdk/models/shared/billedtotype.ts +++ b/lending/src/sdk/models/shared/billedtotype.ts @@ -1,24 +1,55 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Defines if the invoice or credit note is billed/rebilled to a project or customer. + * @export */ export const BilledToType = { - Unknown: "Unknown", - NotApplicable: "NotApplicable", - Customer: "Customer", - Project: "Project", + Unknown: 'Unknown', + NotApplicable: 'NotApplicable', + Customer: 'Customer', + Project: 'Project' } as const; -/** - * Defines if the invoice or credit note is billed/rebilled to a project or customer. - */ -export type BilledToType = ClosedEnum; +export type BilledToType = typeof BilledToType[keyof typeof BilledToType]; + + +export function instanceOfBilledToType(value: any): boolean { + for (const key in BilledToType) { + if (Object.prototype.hasOwnProperty.call(BilledToType, key)) { + if (BilledToType[key as keyof typeof BilledToType] === value) { + return true; + } + } + } + return false; +} + +export function BilledToTypeFromJSON(json: any): BilledToType { + return BilledToTypeFromJSONTyped(json, false); +} + +export function BilledToTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BilledToType { + return json as BilledToType; +} + +export function BilledToTypeToJSON(value?: BilledToType | null): any { + return value as any; +} + +export function BilledToTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): BilledToType { + return value as BilledToType; +} -/** @internal */ -export const BilledToType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(BilledToType); diff --git a/lending/src/sdk/models/shared/billedtotype1.ts b/lending/src/sdk/models/shared/billedtotype1.ts index ce8fa2ae2..e76e04daf 100644 --- a/lending/src/sdk/models/shared/billedtotype1.ts +++ b/lending/src/sdk/models/shared/billedtotype1.ts @@ -1,24 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Defines if the bill or bill credit note is billed/rebilled to a project. + * @export */ export const BilledToType1 = { - Unknown: "Unknown", - NotApplicable: "NotApplicable", - Project: "Project", + Unknown: 'Unknown', + NotApplicable: 'NotApplicable', + Project: 'Project' } as const; -/** - * Defines if the bill or bill credit note is billed/rebilled to a project. - */ -export type BilledToType1 = ClosedEnum; +export type BilledToType1 = typeof BilledToType1[keyof typeof BilledToType1]; + + +export function instanceOfBilledToType1(value: any): boolean { + for (const key in BilledToType1) { + if (Object.prototype.hasOwnProperty.call(BilledToType1, key)) { + if (BilledToType1[key as keyof typeof BilledToType1] === value) { + return true; + } + } + } + return false; +} + +export function BilledToType1FromJSON(json: any): BilledToType1 { + return BilledToType1FromJSONTyped(json, false); +} + +export function BilledToType1FromJSONTyped(json: any, ignoreDiscriminator: boolean): BilledToType1 { + return json as BilledToType1; +} + +export function BilledToType1ToJSON(value?: BilledToType1 | null): any { + return value as any; +} + +export function BilledToType1ToJSONTyped(value: any, ignoreDiscriminator: boolean): BilledToType1 { + return value as BilledToType1; +} -/** @internal */ -export const BilledToType1$inboundSchema: z.ZodNativeEnum< - typeof BilledToType1 -> = z.nativeEnum(BilledToType1); diff --git a/lending/src/sdk/models/shared/billlineitem.ts b/lending/src/sdk/models/shared/billlineitem.ts index 0f09c5954..f5db11d3e 100644 --- a/lending/src/sdk/models/shared/billlineitem.ts +++ b/lending/src/sdk/models/shared/billlineitem.ts @@ -1,203 +1,562 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; +import type { PropertieItemRef } from '../_speakeasy_hoisted'; +import type { RecordLineReference } from './recordlinereference'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountsPayableTracking } from './accountspayabletracking'; +import { + AccountsPayableTrackingFromJSON, + AccountsPayableTrackingFromJSONTyped, + AccountsPayableTrackingToJSON, + AccountsPayableTrackingToJSONTyped, +} from './accountspayabletracking'; +import type { ItemReference } from './itemreference'; +import { + ItemReferenceFromJSON, + ItemReferenceFromJSONTyped, + ItemReferenceToJSON, + ItemReferenceToJSONTyped, +} from './itemreference'; +import type { TaxRateRef } from './taxrateref'; +import { + TaxRateRefFromJSON, + TaxRateRefFromJSONTyped, + TaxRateRefToJSON, + TaxRateRefToJSONTyped, +} from './taxrateref'; +import type { TrackingCategoryRef } from './trackingcategoryref'; import { - AccountsPayableTracking, - AccountsPayableTracking$inboundSchema, -} from "./accountspayabletracking.js"; + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { BillLineItemPurchaseOrderLineRef } from '../BillLineItemPurchaseOrderLineRef'; import { - PropertieItemRef, - PropertieItemRef$inboundSchema, -} from "./propertieitemref.js"; -import { TaxRateRef, TaxRateRef$inboundSchema } from "./taxrateref.js"; + BillLineItemPurchaseOrderLineRefFromJSON, + BillLineItemPurchaseOrderLineRefFromJSONTyped, + BillLineItemPurchaseOrderLineRefToJSON, + BillLineItemPurchaseOrderLineRefToJSONTyped, +} from '../BillLineItemPurchaseOrderLineRef'; +import type { AccountRef } from './accountref'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, -} from "./trackingcategoryref.js"; + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; /** - * Allowed name of the 'dataType'. + * + * @export + * @interface BillLineItem */ -export const BillLineItemDataType = { - PurchaseOrders: "purchaseOrders", - Bills: "bills", -} as const; -/** - * Allowed name of the 'dataType'. - */ -export type BillLineItemDataType = ClosedEnum; +export interface BillLineItem { + /** + * The bill line's number. + * @type {string} + * @memberof BillLineItem + */ + lineNumber?: string | null; + /** + * Friendly name of the goods or services received. + * @type {string} + * @memberof BillLineItem + */ + description?: string | null; + /** + * Price of each unit of goods or services. + * @type {string} + * @memberof BillLineItem + */ + unitAmount?: Decimal | number; + /** + * Number of units of goods or services received. + * @type {string} + * @memberof BillLineItem + */ + quantity?: Decimal | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + * @type {string} + * @memberof BillLineItem + */ + unitOfMeasurement?: string | null; + /** + * Numerical value of any discounts applied. + * + * Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. + * @type {string} + * @memberof BillLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof BillLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof BillLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof BillLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Percentage rate of any discount applied to the bill. + * @type {string} + * @memberof BillLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof BillLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof BillLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the line item is linked. + * @type {ItemReference} + * @memberof BillLineItem + */ + itemRef?: PropertieItemRef; + /** + * + * @type {BillLineItemPurchaseOrderLineRef} + * @memberof BillLineItem + */ + purchaseOrderLineRef?: RecordLineReference; + /** + * Collection of categories against which this item is tracked. + * @type {Array} + * @memberof BillLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsPayableTracking} + * @memberof BillLineItem + */ + tracking?: AccountsPayableTracking; + /** + * The bill is a direct cost if `True`. + * @type {boolean} + * @memberof BillLineItem + */ + isDirectCost?: boolean; +} /** - * Reference to the purchase order line this line was generated from. + * Check if a given object implements the BillLineItem interface. */ -export type RecordLineReference = { - /** - * 'id' of the underlying record. - */ - id?: string | undefined; - /** - * Allowed name of the 'dataType'. - */ - dataType?: BillLineItemDataType | undefined; - /** - * Line number of the underlying record. - */ - lineNumber?: string | undefined; -}; +export function instanceOfBillLineItem(value: object): value is BillLineItem { + return true; +} -export type BillLineItem = { - /** - * The bill line's number. - */ - lineNumber?: string | null | undefined; - /** - * Friendly name of the goods or services received. - */ - description?: string | null | undefined; - /** - * Price of each unit of goods or services. - */ - unitAmount?: Decimal$ | number | undefined; - /** - * Number of units of goods or services received. - */ - quantity?: Decimal$ | number | undefined; - /** - * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). - */ - unitOfMeasurement?: string | null | undefined; - /** - * Numerical value of any discounts applied. - * - * @remarks - * - * Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. - */ - discountAmount?: Decimal$ | number | null | undefined; - /** - * Amount of the line, inclusive of discounts but exclusive of tax. - */ - subTotal?: Decimal$ | number | null | undefined; - /** - * Amount of tax for the line. - */ - taxAmount?: Decimal$ | number | null | undefined; - /** - * Total amount of the line, including tax. - */ - totalAmount?: Decimal$ | number | null | undefined; - /** - * Percentage rate of any discount applied to the bill. - */ - discountPercentage?: Decimal$ | number | null | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * 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. - * - * @remarks - * - * Found on: - * - * - Bill line items - * - Bill Credit Note line items - * - Credit Note line items - * - Direct incomes line items - * - Invoice line items - * - Items - */ - taxRateRef?: TaxRateRef | undefined; - /** - * Reference to the item the line is linked to. - */ - itemRef?: PropertieItemRef | undefined; - purchaseOrderLineRef?: RecordLineReference | undefined; - /** - * Collection of categories against which this item is tracked. - */ - trackingCategoryRefs?: Array | null | undefined; - /** - * Categories, and a project and customer, against which the item is tracked. - */ - tracking?: AccountsPayableTracking | undefined; - /** - * The bill is a direct cost if `True`. - */ - isDirectCost?: boolean | undefined; -}; +export function BillLineItemFromJSON(json: any): BillLineItem { + return BillLineItemFromJSONTyped(json, false); +} + +export function BillLineItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillLineItem { + if (json == null) { + return json; + } + return { + + 'lineNumber': json['lineNumber'] == null ? undefined : json['lineNumber'], + 'description': json['description'] == null ? undefined : json['description'], + 'unitAmount': json['unitAmount'] == null ? undefined : toDecimal(json['unitAmount']), + 'quantity': json['quantity'] == null ? undefined : toDecimal(json['quantity']), + 'unitOfMeasurement': json['unitOfMeasurement'] == null ? undefined : json['unitOfMeasurement'], + 'discountAmount': json['discountAmount'] == null ? undefined : toDecimal(json['discountAmount']), + 'subTotal': json['subTotal'] == null ? undefined : toDecimal(json['subTotal']), + 'taxAmount': json['taxAmount'] == null ? undefined : toDecimal(json['taxAmount']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'discountPercentage': json['discountPercentage'] == null ? undefined : toDecimal(json['discountPercentage']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'taxRateRef': json['taxRateRef'] == null ? undefined : TaxRateRefFromJSON(json['taxRateRef']), + 'itemRef': json['itemRef'] == null ? undefined : ItemReferenceFromJSON(json['itemRef']), + 'purchaseOrderLineRef': json['purchaseOrderLineRef'] == null ? undefined : BillLineItemPurchaseOrderLineRefFromJSON(json['purchaseOrderLineRef']), + 'trackingCategoryRefs': json['trackingCategoryRefs'] == null ? undefined : ((json['trackingCategoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'tracking': json['tracking'] == null ? undefined : AccountsPayableTrackingFromJSON(json['tracking']), + 'isDirectCost': json['isDirectCost'] == null ? undefined : json['isDirectCost'], + }; +} + +export function BillLineItemToJSON(json: any): BillLineItem { + return BillLineItemToJSONTyped(json, false); +} + +export function BillLineItemToJSONTyped(value?: BillLineItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -/** @internal */ -export const BillLineItemDataType$inboundSchema: z.ZodNativeEnum< - typeof BillLineItemDataType -> = z.nativeEnum(BillLineItemDataType); + return { + + 'lineNumber': value['lineNumber'], + 'description': value['description'], + 'unitAmount': fromDecimal(value['unitAmount']), + 'quantity': fromDecimal(value['quantity']), + 'unitOfMeasurement': value['unitOfMeasurement'], + 'discountAmount': fromDecimal(value['discountAmount']), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'taxRateRef': TaxRateRefToJSON(value['taxRateRef']), + 'itemRef': ItemReferenceToJSON(value['itemRef']), + 'purchaseOrderLineRef': BillLineItemPurchaseOrderLineRefToJSON(value['purchaseOrderLineRef']), + 'trackingCategoryRefs': value['trackingCategoryRefs'] == null ? undefined : ((value['trackingCategoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'tracking': AccountsPayableTrackingToJSON(value['tracking']), + 'isDirectCost': value['isDirectCost'], + }; +} -/** @internal */ -export const RecordLineReference$inboundSchema: z.ZodType< - RecordLineReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: BillLineItemDataType$inboundSchema.optional(), - lineNumber: z.string().optional(), -}); -export function recordLineReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RecordLineReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RecordLineReference' from JSON`, - ); +export interface AccountingBillBillLineItem { + /** + * The bill line's number. + * @type {string} + * @memberof BillLineItem + */ + lineNumber?: string | null; + /** + * Friendly name of the goods or services received. + * @type {string} + * @memberof BillLineItem + */ + description?: string | null; + /** + * Price of each unit of goods or services. + * @type {string} + * @memberof BillLineItem + */ + unitAmount?: Decimal | number; + /** + * Number of units of goods or services received. + * @type {string} + * @memberof BillLineItem + */ + quantity?: Decimal | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + * @type {string} + * @memberof BillLineItem + */ + unitOfMeasurement?: string | null; + /** + * Numerical value of any discounts applied. + * + * Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. + * @type {string} + * @memberof BillLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof BillLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof BillLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof BillLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Percentage rate of any discount applied to the bill. + * @type {string} + * @memberof BillLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof BillLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof BillLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the line item is linked. + * @type {ItemReference} + * @memberof BillLineItem + */ + itemRef?: ItemReference; + /** + * + * @type {BillLineItemPurchaseOrderLineRef} + * @memberof BillLineItem + */ + purchaseOrderLineRef?: BillLineItemPurchaseOrderLineRef; + /** + * Collection of categories against which this item is tracked. + * @type {Array} + * @memberof BillLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsPayableTracking} + * @memberof BillLineItem + */ + tracking?: AccountsPayableTracking; + /** + * The bill is a direct cost if `True`. + * @type {boolean} + * @memberof BillLineItem + */ + isDirectCost?: boolean; } -/** @internal */ -export const BillLineItem$inboundSchema: z.ZodType< - BillLineItem, - z.ZodTypeDef, - unknown -> = z.object({ - lineNumber: z.nullable(z.string()).optional(), - description: z.nullable(z.string()).optional(), - unitAmount: z.number().transform(v => new Decimal$(v)).optional(), - quantity: z.number().transform(v => new Decimal$(v)).optional(), - unitOfMeasurement: z.nullable(z.string()).optional(), - discountAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - taxAmount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - totalAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - accountRef: AccountRef$inboundSchema.optional(), - taxRateRef: TaxRateRef$inboundSchema.optional(), - itemRef: PropertieItemRef$inboundSchema.optional(), - purchaseOrderLineRef: z.lazy(() => RecordLineReference$inboundSchema) - .optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) - .optional(), - tracking: AccountsPayableTracking$inboundSchema.optional(), - isDirectCost: z.boolean().optional(), -}); +export interface AccountingBillGetResponseBillLineItem { + /** + * The bill line's number. + * @type {string} + * @memberof BillLineItem + */ + lineNumber?: string | null; + /** + * Friendly name of the goods or services received. + * @type {string} + * @memberof BillLineItem + */ + description?: string | null; + /** + * Price of each unit of goods or services. + * @type {string} + * @memberof BillLineItem + */ + unitAmount?: Decimal | number; + /** + * Number of units of goods or services received. + * @type {string} + * @memberof BillLineItem + */ + quantity?: Decimal | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + * @type {string} + * @memberof BillLineItem + */ + unitOfMeasurement?: string | null; + /** + * Numerical value of any discounts applied. + * + * Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. + * @type {string} + * @memberof BillLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof BillLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof BillLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof BillLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Percentage rate of any discount applied to the bill. + * @type {string} + * @memberof BillLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof BillLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof BillLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the line item is linked. + * @type {ItemReference} + * @memberof BillLineItem + */ + itemRef?: ItemReference; + /** + * + * @type {BillLineItemPurchaseOrderLineRef} + * @memberof BillLineItem + */ + purchaseOrderLineRef?: BillLineItemPurchaseOrderLineRef; + /** + * Collection of categories against which this item is tracked. + * @type {Array} + * @memberof BillLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsPayableTracking} + * @memberof BillLineItem + */ + tracking?: AccountsPayableTracking; + /** + * The bill is a direct cost if `True`. + * @type {boolean} + * @memberof BillLineItem + */ + isDirectCost?: boolean; +} -export function billLineItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BillLineItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BillLineItem' from JSON`, - ); +export interface GetAccountingBillResponseBillLineItem { + /** + * The bill line's number. + * @type {string} + * @memberof BillLineItem + */ + lineNumber?: string | null; + /** + * Friendly name of the goods or services received. + * @type {string} + * @memberof BillLineItem + */ + description?: string | null; + /** + * Price of each unit of goods or services. + * @type {string} + * @memberof BillLineItem + */ + unitAmount?: Decimal | number; + /** + * Number of units of goods or services received. + * @type {string} + * @memberof BillLineItem + */ + quantity?: Decimal | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + * @type {string} + * @memberof BillLineItem + */ + unitOfMeasurement?: string | null; + /** + * Numerical value of any discounts applied. + * + * Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. + * @type {string} + * @memberof BillLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof BillLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof BillLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof BillLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Percentage rate of any discount applied to the bill. + * @type {string} + * @memberof BillLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof BillLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof BillLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the line item is linked. + * @type {ItemReference} + * @memberof BillLineItem + */ + itemRef?: ItemReference; + /** + * + * @type {BillLineItemPurchaseOrderLineRef} + * @memberof BillLineItem + */ + purchaseOrderLineRef?: BillLineItemPurchaseOrderLineRef; + /** + * Collection of categories against which this item is tracked. + * @type {Array} + * @memberof BillLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsPayableTracking} + * @memberof BillLineItem + */ + tracking?: AccountsPayableTracking; + /** + * The bill is a direct cost if `True`. + * @type {boolean} + * @memberof BillLineItem + */ + isDirectCost?: boolean; } diff --git a/lending/src/sdk/models/shared/billpaymentline.ts b/lending/src/sdk/models/shared/billpaymentline.ts index 61fe543e7..08fbc0177 100644 --- a/lending/src/sdk/models/shared/billpaymentline.ts +++ b/lending/src/sdk/models/shared/billpaymentline.ts @@ -1,64 +1,226 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { BillPaymentLineLink } from './billpaymentlinelink'; import { - BillPaymentLineLink, - BillPaymentLineLink$inboundSchema, -} from "./billpaymentlinelink.js"; + BillPaymentLineLinkFromJSON, + BillPaymentLineLinkFromJSONTyped, + BillPaymentLineLinkToJSON, + BillPaymentLineLinkToJSONTyped, +} from './billpaymentlinelink'; -export type BillPaymentLine = { - /** - * Amount in the bill payment currency. - */ - amount: Decimal$ | number; - links?: Array | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - allocatedOnDate?: string | undefined; -}; +/** + * + * @export + * @interface BillPaymentLine + */ +export interface BillPaymentLine { + /** + * Amount in the bill payment currency. + * @type {string} + * @memberof BillPaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof BillPaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BillPaymentLine + */ + allocatedOnDate?: string; +} + +/** + * Check if a given object implements the BillPaymentLine interface. + */ +export function instanceOfBillPaymentLine(value: object): value is BillPaymentLine { + if (!('amount' in value) || value['amount'] === undefined) return false; + return true; +} + +export function BillPaymentLineFromJSON(json: any): BillPaymentLine { + return BillPaymentLineFromJSONTyped(json, false); +} + +export function BillPaymentLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillPaymentLine { + if (json == null) { + return json; + } + return { + + 'amount': json['amount'], + 'links': json['links'] == null ? undefined : ((json['links'] as Array).map(BillPaymentLineLinkFromJSON)), + 'allocatedOnDate': json['allocatedOnDate'] == null ? undefined : json['allocatedOnDate'], + }; +} -/** @internal */ -export const BillPaymentLine$inboundSchema: z.ZodType< - BillPaymentLine, - z.ZodTypeDef, - unknown -> = z.object({ - amount: z.number().transform(v => new Decimal$(v)), - links: z.nullable(z.array(BillPaymentLineLink$inboundSchema)).optional(), - allocatedOnDate: z.string().optional(), -}); +export function BillPaymentLineToJSON(json: any): BillPaymentLine { + return BillPaymentLineToJSONTyped(json, false); +} + +export function BillPaymentLineToJSONTyped(value?: BillPaymentLine | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'amount': fromDecimal(value['amount']), + 'links': value['links'] == null ? undefined : ((value['links'] as Array).map(BillPaymentLineLinkToJSON)), + 'allocatedOnDate': value['allocatedOnDate'], + }; +} + + +export interface AccountingBillPaymentBillPaymentLine { + /** + * Amount in the bill payment currency. + * @type {string} + * @memberof BillPaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof BillPaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BillPaymentLine + */ + allocatedOnDate?: string; +} + +export interface AccountingBillPaymentGetResponseBillPaymentLine { + /** + * Amount in the bill payment currency. + * @type {string} + * @memberof BillPaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof BillPaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BillPaymentLine + */ + allocatedOnDate?: string; +} -export function billPaymentLineFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BillPaymentLine$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BillPaymentLine' from JSON`, - ); +export interface GetAccountingBillPaymentResponseBillPaymentLine { + /** + * Amount in the bill payment currency. + * @type {string} + * @memberof BillPaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof BillPaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof BillPaymentLine + */ + allocatedOnDate?: string; } diff --git a/lending/src/sdk/models/shared/billpaymentlinelink.ts b/lending/src/sdk/models/shared/billpaymentlinelink.ts index 704ccfb6c..e49c7402a 100644 --- a/lending/src/sdk/models/shared/billpaymentlinelink.ts +++ b/lending/src/sdk/models/shared/billpaymentlinelink.ts @@ -1,92 +1,135 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { BillPaymentLineLinkType } from './billpaymentlinelinktype'; import { - BillPaymentLineLinkType, - BillPaymentLineLinkType$inboundSchema, -} from "./billpaymentlinelinktype.js"; + BillPaymentLineLinkTypeFromJSON, + BillPaymentLineLinkTypeFromJSONTyped, + BillPaymentLineLinkTypeToJSON, + BillPaymentLineLinkTypeToJSONTyped, +} from './billpaymentlinelinktype'; -export type BillPaymentLineLink = { - /** - * Types of links to bill payment lines. - */ - type: BillPaymentLineLinkType; - /** - * Unique identifier of the transaction represented by the link. - */ - id?: string | null | undefined; - /** - * Amount by which the balance of the linked entity is altered, in the currency of the linked entity. - * - * @remarks - * - * - 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. - */ - amount?: Decimal$ | number | null | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; -}; +/** + * + * @export + * @interface BillPaymentLineLink + */ +export interface BillPaymentLineLink { + /** + * + * @type {BillPaymentLineLinkType} + * @memberof BillPaymentLineLink + */ + type: BillPaymentLineLinkType; + /** + * Unique identifier of the transaction represented by the link. + * @type {string} + * @memberof BillPaymentLineLink + */ + id?: string | null; + /** + * 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. + * @type {string} + * @memberof BillPaymentLineLink + */ + amount?: Decimal | number | null; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof BillPaymentLineLink + */ + currencyRate?: Decimal | number | null; +} + + + +/** + * Check if a given object implements the BillPaymentLineLink interface. + */ +export function instanceOfBillPaymentLineLink(value: object): value is BillPaymentLineLink { + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} -/** @internal */ -export const BillPaymentLineLink$inboundSchema: z.ZodType< - BillPaymentLineLink, - z.ZodTypeDef, - unknown -> = z.object({ - type: BillPaymentLineLinkType$inboundSchema, - id: z.nullable(z.string()).optional(), - amount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), -}); +export function BillPaymentLineLinkFromJSON(json: any): BillPaymentLineLink { + return BillPaymentLineLinkFromJSONTyped(json, false); +} + +export function BillPaymentLineLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillPaymentLineLink { + if (json == null) { + return json; + } + return { + + 'type': BillPaymentLineLinkTypeFromJSON(json['type']), + 'id': json['id'] == null ? undefined : json['id'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + }; +} -export function billPaymentLineLinkFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BillPaymentLineLink$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BillPaymentLineLink' from JSON`, - ); +export function BillPaymentLineLinkToJSON(json: any): BillPaymentLineLink { + return BillPaymentLineLinkToJSONTyped(json, false); } + +export function BillPaymentLineLinkToJSONTyped(value?: BillPaymentLineLink | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': BillPaymentLineLinkTypeToJSON(value['type']), + 'id': value['id'], + 'amount': fromDecimal(value['amount']), + 'currencyRate': fromDecimal(value['currencyRate']), + }; +} + diff --git a/lending/src/sdk/models/shared/billpaymentlinelinktype.ts b/lending/src/sdk/models/shared/billpaymentlinelinktype.ts index d7389d4ae..8cd05cb02 100644 --- a/lending/src/sdk/models/shared/billpaymentlinelinktype.ts +++ b/lending/src/sdk/models/shared/billpaymentlinelinktype.ts @@ -1,33 +1,61 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Types of links to bill payment lines. + * @export */ export const BillPaymentLineLinkType = { - Unknown: "Unknown", - Unlinked: "Unlinked", - Bill: "Bill", - Other: "Other", - CreditNote: "CreditNote", - BillPayment: "BillPayment", - PaymentOnAccount: "PaymentOnAccount", - Refund: "Refund", - ManualJournal: "ManualJournal", - Discount: "Discount", + Unknown: 'Unknown', + Unlinked: 'Unlinked', + Bill: 'Bill', + Other: 'Other', + CreditNote: 'CreditNote', + BillPayment: 'BillPayment', + PaymentOnAccount: 'PaymentOnAccount', + Refund: 'Refund', + ManualJournal: 'ManualJournal', + Discount: 'Discount' } as const; -/** - * Types of links to bill payment lines. - */ -export type BillPaymentLineLinkType = ClosedEnum< - typeof BillPaymentLineLinkType ->; - -/** @internal */ -export const BillPaymentLineLinkType$inboundSchema: z.ZodNativeEnum< - typeof BillPaymentLineLinkType -> = z.nativeEnum(BillPaymentLineLinkType); +export type BillPaymentLineLinkType = typeof BillPaymentLineLinkType[keyof typeof BillPaymentLineLinkType]; + + +export function instanceOfBillPaymentLineLinkType(value: any): boolean { + for (const key in BillPaymentLineLinkType) { + if (Object.prototype.hasOwnProperty.call(BillPaymentLineLinkType, key)) { + if (BillPaymentLineLinkType[key as keyof typeof BillPaymentLineLinkType] === value) { + return true; + } + } + } + return false; +} + +export function BillPaymentLineLinkTypeFromJSON(json: any): BillPaymentLineLinkType { + return BillPaymentLineLinkTypeFromJSONTyped(json, false); +} + +export function BillPaymentLineLinkTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillPaymentLineLinkType { + return json as BillPaymentLineLinkType; +} + +export function BillPaymentLineLinkTypeToJSON(value?: BillPaymentLineLinkType | null): any { + return value as any; +} + +export function BillPaymentLineLinkTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): BillPaymentLineLinkType { + return value as BillPaymentLineLinkType; +} + diff --git a/lending/src/sdk/models/shared/billstatus.ts b/lending/src/sdk/models/shared/billstatus.ts index c26739f38..c37f702ff 100644 --- a/lending/src/sdk/models/shared/billstatus.ts +++ b/lending/src/sdk/models/shared/billstatus.ts @@ -1,26 +1,57 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Current state of the bill. + * @export */ export const BillStatus = { - Unknown: "Unknown", - Open: "Open", - PartiallyPaid: "PartiallyPaid", - Paid: "Paid", - Void: "Void", - Draft: "Draft", + Unknown: 'Unknown', + Open: 'Open', + PartiallyPaid: 'PartiallyPaid', + Paid: 'Paid', + Void: 'Void', + Draft: 'Draft' } as const; -/** - * Current state of the bill. - */ -export type BillStatus = ClosedEnum; +export type BillStatus = typeof BillStatus[keyof typeof BillStatus]; + + +export function instanceOfBillStatus(value: any): boolean { + for (const key in BillStatus) { + if (Object.prototype.hasOwnProperty.call(BillStatus, key)) { + if (BillStatus[key as keyof typeof BillStatus] === value) { + return true; + } + } + } + return false; +} + +export function BillStatusFromJSON(json: any): BillStatus { + return BillStatusFromJSONTyped(json, false); +} + +export function BillStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillStatus { + return json as BillStatus; +} + +export function BillStatusToJSON(value?: BillStatus | null): any { + return value as any; +} + +export function BillStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): BillStatus { + return value as BillStatus; +} -/** @internal */ -export const BillStatus$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(BillStatus); diff --git a/lending/src/sdk/models/shared/cashflowstatement.ts b/lending/src/sdk/models/shared/cashflowstatement.ts index 0733414ea..a04c0f5b9 100644 --- a/lending/src/sdk/models/shared/cashflowstatement.ts +++ b/lending/src/sdk/models/shared/cashflowstatement.ts @@ -1,80 +1,322 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { ReportLine, ReportLine$inboundSchema } from "./reportline.js"; +import { mapValues } from '../../../runtime'; +import type { ReportLine } from './reportline'; +import { + ReportLineFromJSON, + ReportLineFromJSONTyped, + ReportLineToJSON, + ReportLineToJSONTyped, +} from './reportline'; -export type CashFlowStatement = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - fromDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - toDate?: string | undefined; - cashReceipts?: ReportLine | undefined; - cashPayments?: ReportLine | undefined; -}; +/** + * + * @export + * @interface CashFlowStatement + */ +export interface CashFlowStatement { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowStatement + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowStatement + */ + toDate?: string; + /** + * ReportLines for cash receipts from the sale of goods. + * @type {ReportLine} + * @memberof CashFlowStatement + */ + cashReceipts?: ReportLine; + /** + * ReportLines for cash payments to suppliers for the purchase of goods or services. + * @type {ReportLine} + * @memberof CashFlowStatement + */ + cashPayments?: ReportLine; +} + +/** + * Check if a given object implements the CashFlowStatement interface. + */ +export function instanceOfCashFlowStatement(value: object): value is CashFlowStatement { + return true; +} + +export function CashFlowStatementFromJSON(json: any): CashFlowStatement { + return CashFlowStatementFromJSONTyped(json, false); +} + +export function CashFlowStatementFromJSONTyped(json: any, ignoreDiscriminator: boolean): CashFlowStatement { + if (json == null) { + return json; + } + return { + + 'fromDate': json['fromDate'] == null ? undefined : json['fromDate'], + 'toDate': json['toDate'] == null ? undefined : json['toDate'], + 'cashReceipts': json['cashReceipts'] == null ? undefined : ReportLineFromJSON(json['cashReceipts']), + 'cashPayments': json['cashPayments'] == null ? undefined : ReportLineFromJSON(json['cashPayments']), + }; +} -/** @internal */ -export const CashFlowStatement$inboundSchema: z.ZodType< - CashFlowStatement, - z.ZodTypeDef, - unknown -> = z.object({ - fromDate: z.string().optional(), - toDate: z.string().optional(), - cashReceipts: ReportLine$inboundSchema.optional(), - cashPayments: ReportLine$inboundSchema.optional(), -}); +export function CashFlowStatementToJSON(json: any): CashFlowStatement { + return CashFlowStatementToJSONTyped(json, false); +} + +export function CashFlowStatementToJSONTyped(value?: CashFlowStatement | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'fromDate': value['fromDate'], + 'toDate': value['toDate'], + 'cashReceipts': ReportLineToJSON(value['cashReceipts']), + 'cashPayments': ReportLineToJSON(value['cashPayments']), + }; +} + + +export interface AccountingCashFlowStatementCashFlowStatement { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowStatement + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowStatement + */ + toDate?: string; + /** + * ReportLines for cash receipts from the sale of goods. + * @type {ReportLine} + * @memberof CashFlowStatement + */ + cashReceipts?: ReportLine; + /** + * ReportLines for cash payments to suppliers for the purchase of goods or services. + * @type {ReportLine} + * @memberof CashFlowStatement + */ + cashPayments?: ReportLine; +} + +export interface AccountingCashFlowStatementGetResponseCashFlowStatement { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowStatement + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowStatement + */ + toDate?: string; + /** + * ReportLines for cash receipts from the sale of goods. + * @type {ReportLine} + * @memberof CashFlowStatement + */ + cashReceipts?: ReportLine; + /** + * ReportLines for cash payments to suppliers for the purchase of goods or services. + * @type {ReportLine} + * @memberof CashFlowStatement + */ + cashPayments?: ReportLine; +} -export function cashFlowStatementFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CashFlowStatement$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CashFlowStatement' from JSON`, - ); +export interface GetAccountingCashFlowStatementResponseCashFlowStatement { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowStatement + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowStatement + */ + toDate?: string; + /** + * ReportLines for cash receipts from the sale of goods. + * @type {ReportLine} + * @memberof CashFlowStatement + */ + cashReceipts?: ReportLine; + /** + * ReportLines for cash payments to suppliers for the purchase of goods or services. + * @type {ReportLine} + * @memberof CashFlowStatement + */ + cashPayments?: ReportLine; } diff --git a/lending/src/sdk/models/shared/cashflowtransaction.ts b/lending/src/sdk/models/shared/cashflowtransaction.ts new file mode 100644 index 000000000..31495f379 --- /dev/null +++ b/lending/src/sdk/models/shared/cashflowtransaction.ts @@ -0,0 +1,569 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountRef } from './accountref'; +import { + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; +import type { TransactionCategory } from './transactioncategory'; +import { + TransactionCategoryFromJSON, + TransactionCategoryFromJSONTyped, + TransactionCategoryToJSON, + TransactionCategoryToJSONTyped, +} from './transactioncategory'; +import type { SourceRef } from './sourceref'; +import { + SourceRefFromJSON, + SourceRefFromJSONTyped, + SourceRefToJSON, + SourceRefToJSONTyped, +} from './sourceref'; + +/** + * + * @export + * @interface CashFlowTransaction + */ +export interface CashFlowTransaction { + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + id?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowTransaction + */ + date?: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + description?: string; + /** + * The bank transaction amount. + * @type {string} + * @memberof CashFlowTransaction + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CashFlowTransaction + */ + currency?: string; + /** + * Contains an array of category levels. + * @type {TransactionCategory} + * @memberof CashFlowTransaction + */ + transactionCategory?: TransactionCategory; + /** + * Returns the payment processor responsible for the transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + platformName?: string; + /** + * An array of counterparty names involved in the transaction. + * @type {Array} + * @memberof CashFlowTransaction + */ + counterpartyNames?: Array; + /** + * + * @type {SourceRef} + * @memberof CashFlowTransaction + */ + sourceRef?: SourceRef; + /** + * + * @type {AccountRef} + * @memberof CashFlowTransaction + */ + accountRef?: AccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowTransaction + */ + modifiedDate?: string; + /** + * Indicates if the transaction is classified as recurring by Codat's categorization engine. + * @type {boolean} + * @memberof CashFlowTransaction + */ + isRecurring?: boolean | null; +} + +/** + * Check if a given object implements the CashFlowTransaction interface. + */ +export function instanceOfCashFlowTransaction(value: object): value is CashFlowTransaction { + return true; +} + +export function CashFlowTransactionFromJSON(json: any): CashFlowTransaction { + return CashFlowTransactionFromJSONTyped(json, false); +} + +export function CashFlowTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CashFlowTransaction { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'date': json['date'] == null ? undefined : json['date'], + 'description': json['description'] == null ? undefined : json['description'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'transactionCategory': json['transactionCategory'] == null ? undefined : TransactionCategoryFromJSON(json['transactionCategory']), + 'platformName': json['platformName'] == null ? undefined : json['platformName'], + 'counterpartyNames': json['counterpartyNames'] == null ? undefined : json['counterpartyNames'], + 'sourceRef': json['sourceRef'] == null ? undefined : SourceRefFromJSON(json['sourceRef']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'isRecurring': json['isRecurring'] == null ? undefined : json['isRecurring'], + }; +} + +export function CashFlowTransactionToJSON(json: any): CashFlowTransaction { + return CashFlowTransactionToJSONTyped(json, false); +} + +export function CashFlowTransactionToJSONTyped(value?: CashFlowTransaction | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'date': value['date'], + 'description': value['description'], + 'amount': fromDecimal(value['amount']), + 'currency': value['currency'], + 'transactionCategory': TransactionCategoryToJSON(value['transactionCategory']), + 'platformName': value['platformName'], + 'counterpartyNames': value['counterpartyNames'], + 'sourceRef': SourceRefToJSON(value['sourceRef']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'modifiedDate': value['modifiedDate'], + 'isRecurring': value['isRecurring'], + }; +} + + +export interface CategorizedBankStatementTransactionsCashFlowTransaction { + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + id?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowTransaction + */ + date?: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + description?: string; + /** + * The bank transaction amount. + * @type {string} + * @memberof CashFlowTransaction + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CashFlowTransaction + */ + currency?: string; + /** + * Contains an array of category levels. + * @type {TransactionCategory} + * @memberof CashFlowTransaction + */ + transactionCategory?: TransactionCategory; + /** + * Returns the payment processor responsible for the transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + platformName?: string; + /** + * An array of counterparty names involved in the transaction. + * @type {Array} + * @memberof CashFlowTransaction + */ + counterpartyNames?: Array; + /** + * + * @type {SourceRef} + * @memberof CashFlowTransaction + */ + sourceRef?: SourceRef; + /** + * + * @type {AccountRef} + * @memberof CashFlowTransaction + */ + accountRef?: AccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowTransaction + */ + modifiedDate?: string; + /** + * Indicates if the transaction is classified as recurring by Codat's categorization engine. + * @type {boolean} + * @memberof CashFlowTransaction + */ + isRecurring?: boolean | null; +} + +export interface CategorizedBankStatementTransactionsGetResponseCashFlowTransaction { + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + id?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowTransaction + */ + date?: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + description?: string; + /** + * The bank transaction amount. + * @type {string} + * @memberof CashFlowTransaction + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CashFlowTransaction + */ + currency?: string; + /** + * Contains an array of category levels. + * @type {TransactionCategory} + * @memberof CashFlowTransaction + */ + transactionCategory?: TransactionCategory; + /** + * Returns the payment processor responsible for the transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + platformName?: string; + /** + * An array of counterparty names involved in the transaction. + * @type {Array} + * @memberof CashFlowTransaction + */ + counterpartyNames?: Array; + /** + * + * @type {SourceRef} + * @memberof CashFlowTransaction + */ + sourceRef?: SourceRef; + /** + * + * @type {AccountRef} + * @memberof CashFlowTransaction + */ + accountRef?: AccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowTransaction + */ + modifiedDate?: string; + /** + * Indicates if the transaction is classified as recurring by Codat's categorization engine. + * @type {boolean} + * @memberof CashFlowTransaction + */ + isRecurring?: boolean | null; +} + +export interface GetCategorizedBankStatementTransactionsResponseCashFlowTransaction { + /** + * The unique identifier of the bank transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + id?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowTransaction + */ + date?: string; + /** + * The description of the bank transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + description?: string; + /** + * The bank transaction amount. + * @type {string} + * @memberof CashFlowTransaction + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CashFlowTransaction + */ + currency?: string; + /** + * Contains an array of category levels. + * @type {TransactionCategory} + * @memberof CashFlowTransaction + */ + transactionCategory?: TransactionCategory; + /** + * Returns the payment processor responsible for the transaction. + * @type {string} + * @memberof CashFlowTransaction + */ + platformName?: string; + /** + * An array of counterparty names involved in the transaction. + * @type {Array} + * @memberof CashFlowTransaction + */ + counterpartyNames?: Array; + /** + * + * @type {SourceRef} + * @memberof CashFlowTransaction + */ + sourceRef?: SourceRef; + /** + * + * @type {AccountRef} + * @memberof CashFlowTransaction + */ + accountRef?: AccountRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CashFlowTransaction + */ + modifiedDate?: string; + /** + * Indicates if the transaction is classified as recurring by Codat's categorization engine. + * @type {boolean} + * @memberof CashFlowTransaction + */ + isRecurring?: boolean | null; +} diff --git a/lending/src/sdk/models/shared/clientratelimitwebhook.ts b/lending/src/sdk/models/shared/clientratelimitwebhook.ts index cdc40c0b8..7f6c439d9 100644 --- a/lending/src/sdk/models/shared/clientratelimitwebhook.ts +++ b/lending/src/sdk/models/shared/clientratelimitwebhook.ts @@ -1,96 +1,115 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { ClientRateLimitWebhookPayload } from './clientratelimitwebhookpayload'; import { - ClientRateLimitWebhookPayload, - ClientRateLimitWebhookPayload$inboundSchema, - ClientRateLimitWebhookPayload$Outbound, - ClientRateLimitWebhookPayload$outboundSchema, -} from "./clientratelimitwebhookpayload.js"; + ClientRateLimitWebhookPayloadFromJSON, + ClientRateLimitWebhookPayloadFromJSONTyped, + ClientRateLimitWebhookPayloadToJSON, + ClientRateLimitWebhookPayloadToJSONTyped, +} from './clientratelimitwebhookpayload'; -export type ClientRateLimitWebhook = { - /** - * Unique identifier of the event. - */ - id?: string | undefined; - /** - * The type of event. - */ - eventType?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - generatedDate?: string | undefined; - payload?: ClientRateLimitWebhookPayload | undefined; -}; +/** + * + * @export + * @interface ClientRateLimitWebhook + */ +export interface ClientRateLimitWebhook { + /** + * Unique identifier of the event. + * @type {string} + * @memberof ClientRateLimitWebhook + */ + id?: string; + /** + * The type of event. + * @type {string} + * @memberof ClientRateLimitWebhook + */ + eventType?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ClientRateLimitWebhook + */ + generatedDate?: string; + /** + * + * @type {ClientRateLimitWebhookPayload} + * @memberof ClientRateLimitWebhook + */ + payload?: ClientRateLimitWebhookPayload; +} + +/** + * Check if a given object implements the ClientRateLimitWebhook interface. + */ +export function instanceOfClientRateLimitWebhook(value: object): value is ClientRateLimitWebhook { + return true; +} -/** @internal */ -export const ClientRateLimitWebhook$inboundSchema: z.ZodType< - ClientRateLimitWebhook, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - eventType: z.string().optional(), - generatedDate: z.string().optional(), - payload: ClientRateLimitWebhookPayload$inboundSchema.optional(), -}); -/** @internal */ -export type ClientRateLimitWebhook$Outbound = { - id?: string | undefined; - eventType?: string | undefined; - generatedDate?: string | undefined; - payload?: ClientRateLimitWebhookPayload$Outbound | undefined; -}; +export function ClientRateLimitWebhookFromJSON(json: any): ClientRateLimitWebhook { + return ClientRateLimitWebhookFromJSONTyped(json, false); +} -/** @internal */ -export const ClientRateLimitWebhook$outboundSchema: z.ZodType< - ClientRateLimitWebhook$Outbound, - z.ZodTypeDef, - ClientRateLimitWebhook -> = z.object({ - id: z.string().optional(), - eventType: z.string().optional(), - generatedDate: z.string().optional(), - payload: ClientRateLimitWebhookPayload$outboundSchema.optional(), -}); +export function ClientRateLimitWebhookFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientRateLimitWebhook { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'eventType': json['eventType'] == null ? undefined : json['eventType'], + 'generatedDate': json['generatedDate'] == null ? undefined : json['generatedDate'], + 'payload': json['payload'] == null ? undefined : ClientRateLimitWebhookPayloadFromJSON(json['payload']), + }; +} -export function clientRateLimitWebhookToJSON( - clientRateLimitWebhook: ClientRateLimitWebhook, -): string { - return JSON.stringify( - ClientRateLimitWebhook$outboundSchema.parse(clientRateLimitWebhook), - ); +export function ClientRateLimitWebhookToJSON(json: any): ClientRateLimitWebhook { + return ClientRateLimitWebhookToJSONTyped(json, false); } -export function clientRateLimitWebhookFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClientRateLimitWebhook$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClientRateLimitWebhook' from JSON`, - ); + +export function ClientRateLimitWebhookToJSONTyped(value?: ClientRateLimitWebhook | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'eventType': value['eventType'], + 'generatedDate': value['generatedDate'], + 'payload': ClientRateLimitWebhookPayloadToJSON(value['payload']), + }; } + diff --git a/lending/src/sdk/models/shared/clientratelimitwebhookpayload.ts b/lending/src/sdk/models/shared/clientratelimitwebhookpayload.ts index 72605d624..c20cb8d28 100644 --- a/lending/src/sdk/models/shared/clientratelimitwebhookpayload.ts +++ b/lending/src/sdk/models/shared/clientratelimitwebhookpayload.ts @@ -1,88 +1,138 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface ClientRateLimitWebhookPayload + */ +export interface ClientRateLimitWebhookPayload { + /** + * The number of available requests per day. + * @type {number} + * @memberof ClientRateLimitWebhookPayload + */ + dailyQuota?: number; + /** + * Total number of requests remaining for your client. + * @type {number} + * @memberof ClientRateLimitWebhookPayload + */ + quotaRemaining?: number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ClientRateLimitWebhookPayload + */ + expiryDate?: string; +} -export type ClientRateLimitWebhookPayload = { - /** - * The number of available requests per day. - */ - dailyQuota?: number | undefined; - /** - * Total number of requests remaining for your client. - */ - quotaRemaining?: number | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - expiryDate?: string | undefined; -}; +/** + * Check if a given object implements the ClientRateLimitWebhookPayload interface. + */ +export function instanceOfClientRateLimitWebhookPayload(value: object): value is ClientRateLimitWebhookPayload { + return true; +} -/** @internal */ -export const ClientRateLimitWebhookPayload$inboundSchema: z.ZodType< - ClientRateLimitWebhookPayload, - z.ZodTypeDef, - unknown -> = z.object({ - dailyQuota: z.number().int().optional(), - quotaRemaining: z.number().int().optional(), - expiryDate: z.string().optional(), -}); -/** @internal */ -export type ClientRateLimitWebhookPayload$Outbound = { - dailyQuota?: number | undefined; - quotaRemaining?: number | undefined; - expiryDate?: string | undefined; -}; +export function ClientRateLimitWebhookPayloadFromJSON(json: any): ClientRateLimitWebhookPayload { + return ClientRateLimitWebhookPayloadFromJSONTyped(json, false); +} -/** @internal */ -export const ClientRateLimitWebhookPayload$outboundSchema: z.ZodType< - ClientRateLimitWebhookPayload$Outbound, - z.ZodTypeDef, - ClientRateLimitWebhookPayload -> = z.object({ - dailyQuota: z.number().int().optional(), - quotaRemaining: z.number().int().optional(), - expiryDate: z.string().optional(), -}); +export function ClientRateLimitWebhookPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientRateLimitWebhookPayload { + if (json == null) { + return json; + } + return { + + 'dailyQuota': json['dailyQuota'] == null ? undefined : json['dailyQuota'], + 'quotaRemaining': json['quotaRemaining'] == null ? undefined : json['quotaRemaining'], + 'expiryDate': json['expiryDate'] == null ? undefined : json['expiryDate'], + }; +} -export function clientRateLimitWebhookPayloadToJSON( - clientRateLimitWebhookPayload: ClientRateLimitWebhookPayload, -): string { - return JSON.stringify( - ClientRateLimitWebhookPayload$outboundSchema.parse( - clientRateLimitWebhookPayload, - ), - ); +export function ClientRateLimitWebhookPayloadToJSON(json: any): ClientRateLimitWebhookPayload { + return ClientRateLimitWebhookPayloadToJSONTyped(json, false); } -export function clientRateLimitWebhookPayloadFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClientRateLimitWebhookPayload$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClientRateLimitWebhookPayload' from JSON`, - ); + +export function ClientRateLimitWebhookPayloadToJSONTyped(value?: ClientRateLimitWebhookPayload | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'dailyQuota': value['dailyQuota'], + 'quotaRemaining': value['quotaRemaining'], + 'expiryDate': value['expiryDate'], + }; +} + + +export interface ClientRateLimitWebhookClientRateLimitWebhookPayload { + /** + * The number of available requests per day. + * @type {number} + * @memberof ClientRateLimitWebhookPayload + */ + dailyQuota?: number; + /** + * Total number of requests remaining for your client. + * @type {number} + * @memberof ClientRateLimitWebhookPayload + */ + quotaRemaining?: number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ClientRateLimitWebhookPayload + */ + expiryDate?: string; } diff --git a/lending/src/sdk/models/shared/codatfile.ts b/lending/src/sdk/models/shared/codatfile.ts index 0bc3490e3..39ee97b39 100644 --- a/lending/src/sdk/models/shared/codatfile.ts +++ b/lending/src/sdk/models/shared/codatfile.ts @@ -1,35 +1,15 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; +/* tslint:disable */ +/* eslint-disable */ export type CodatFile = { - fileName: string; - content: ReadableStream | Blob | ArrayBuffer | Uint8Array; -}; - -/** @internal */ -export type CodatFile$Outbound = { - fileName: string; - content: ReadableStream | Blob | ArrayBuffer | Uint8Array; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; + fileName: string; }; -/** @internal */ -export const CodatFile$outboundSchema: z.ZodType< - CodatFile$Outbound, - z.ZodTypeDef, - CodatFile -> = z.object({ - fileName: z.string(), - content: z.union([ - z.instanceof(ReadableStream), - z.instanceof(Blob), - z.instanceof(ArrayBuffer), - z.instanceof(Uint8Array), - ]), -}); +export function CodatFileFromJSON(json: any): CodatFile { + return json; +} -export function codatFileToJSON(codatFile: CodatFile): string { - return JSON.stringify(CodatFile$outboundSchema.parse(codatFile)); +export function CodatFileToJSON(value?: CodatFile | null): any { + return value; } diff --git a/lending/src/sdk/models/shared/commerceaddress.ts b/lending/src/sdk/models/shared/commerceaddress.ts index 682d0953e..2d851dc5f 100644 --- a/lending/src/sdk/models/shared/commerceaddress.ts +++ b/lending/src/sdk/models/shared/commerceaddress.ts @@ -1,68 +1,618 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceAddressType } from './commerceaddresstype'; import { - CommerceAddressType, - CommerceAddressType$inboundSchema, -} from "./commerceaddresstype.js"; - -export type CommerceAddress = { - /** - * The type of the address - */ - type?: CommerceAddressType | undefined; - /** - * The first line of the address - */ - line1?: string | undefined; - /** - * The second line of the address - */ - line2?: string | undefined; - /** - * The third line of the address, or city - */ - city?: string | undefined; - /** - * The fourth line of the address, or region - */ - region?: string | undefined; - /** - * The country for the address - */ - country?: string | undefined; - /** - * The postal (or zip) code for the address - */ - postalCode?: string | undefined; -}; - -/** @internal */ -export const CommerceAddress$inboundSchema: z.ZodType< - CommerceAddress, - z.ZodTypeDef, - unknown -> = z.object({ - type: CommerceAddressType$inboundSchema.optional(), - line1: z.string().optional(), - line2: z.string().optional(), - city: z.string().optional(), - region: z.string().optional(), - country: z.string().optional(), - postalCode: z.string().optional(), -}); - -export function commerceAddressFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceAddress$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceAddress' from JSON`, - ); + CommerceAddressTypeFromJSON, + CommerceAddressTypeFromJSONTyped, + CommerceAddressTypeToJSON, + CommerceAddressTypeToJSONTyped, +} from './commerceaddresstype'; + +/** + * + * @export + * @interface CommerceAddress + */ +export interface CommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + + + +/** + * Check if a given object implements the CommerceAddress interface. + */ +export function instanceOfCommerceAddress(value: object): value is CommerceAddress { + return true; +} + +export function CommerceAddressFromJSON(json: any): CommerceAddress { + return CommerceAddressFromJSONTyped(json, false); +} + +export function CommerceAddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceAddress { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : CommerceAddressTypeFromJSON(json['type']), + 'line1': json['line1'] == null ? undefined : json['line1'], + 'line2': json['line2'] == null ? undefined : json['line2'], + 'city': json['city'] == null ? undefined : json['city'], + 'region': json['region'] == null ? undefined : json['region'], + 'country': json['country'] == null ? undefined : json['country'], + 'postalCode': json['postalCode'] == null ? undefined : json['postalCode'], + }; +} + +export function CommerceAddressToJSON(json: any): CommerceAddress { + return CommerceAddressToJSONTyped(json, false); +} + +export function CommerceAddressToJSONTyped(value?: CommerceAddress | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': CommerceAddressTypeToJSON(value['type']), + 'line1': value['line1'], + 'line2': value['line2'], + 'city': value['city'], + 'region': value['region'], + 'country': value['country'], + 'postalCode': value['postalCode'], + }; +} + + +export interface CommerceCompanyInfoCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface CommerceCompanyProfileCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface CommerceCustomerCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface CommerceCustomerGetResponseCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface CommerceLocationCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface CommerceLocationGetResponseCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface CommerceLocationsCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface CommerceProfileGetResponseCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface GetCommerceCustomerResponseCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface GetCommerceLocationResponseCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; +} + +export interface GetCommerceProfileResponseCommerceAddress { + /** + * + * @type {CommerceAddressType} + * @memberof CommerceAddress + */ + type?: CommerceAddressType; + /** + * The first line of the address + * @type {string} + * @memberof CommerceAddress + */ + line1?: string; + /** + * The second line of the address + * @type {string} + * @memberof CommerceAddress + */ + line2?: string; + /** + * The third line of the address, or city + * @type {string} + * @memberof CommerceAddress + */ + city?: string; + /** + * The fourth line of the address, or region + * @type {string} + * @memberof CommerceAddress + */ + region?: string; + /** + * The country for the address + * @type {string} + * @memberof CommerceAddress + */ + country?: string; + /** + * The postal (or zip) code for the address + * @type {string} + * @memberof CommerceAddress + */ + postalCode?: string; } diff --git a/lending/src/sdk/models/shared/commerceaddresstype.ts b/lending/src/sdk/models/shared/commerceaddresstype.ts index 9bcce91e1..03ea1e8d2 100644 --- a/lending/src/sdk/models/shared/commerceaddresstype.ts +++ b/lending/src/sdk/models/shared/commerceaddresstype.ts @@ -1,26 +1,56 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The type of the address + * @export */ export const CommerceAddressType = { - Billing: "Billing", - Delivery: "Delivery", - Order: "Order", - Inventory: "Inventory", - Unknown: "Unknown", + Billing: 'Billing', + Delivery: 'Delivery', + Order: 'Order', + Inventory: 'Inventory', + Unknown: 'Unknown' } as const; -/** - * The type of the address - */ -export type CommerceAddressType = ClosedEnum; +export type CommerceAddressType = typeof CommerceAddressType[keyof typeof CommerceAddressType]; + + +export function instanceOfCommerceAddressType(value: any): boolean { + for (const key in CommerceAddressType) { + if (Object.prototype.hasOwnProperty.call(CommerceAddressType, key)) { + if (CommerceAddressType[key as keyof typeof CommerceAddressType] === value) { + return true; + } + } + } + return false; +} + +export function CommerceAddressTypeFromJSON(json: any): CommerceAddressType { + return CommerceAddressTypeFromJSONTyped(json, false); +} + +export function CommerceAddressTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceAddressType { + return json as CommerceAddressType; +} + +export function CommerceAddressTypeToJSON(value?: CommerceAddressType | null): any { + return value as any; +} + +export function CommerceAddressTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommerceAddressType { + return value as CommerceAddressType; +} -/** @internal */ -export const CommerceAddressType$inboundSchema: z.ZodNativeEnum< - typeof CommerceAddressType -> = z.nativeEnum(CommerceAddressType); diff --git a/lending/src/sdk/models/shared/commercecompanyinfo.ts b/lending/src/sdk/models/shared/commercecompanyinfo.ts index 2ddc165d4..d8d4a4b7a 100644 --- a/lending/src/sdk/models/shared/commercecompanyinfo.ts +++ b/lending/src/sdk/models/shared/commercecompanyinfo.ts @@ -1,130 +1,944 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountBalance } from './accountbalance'; +import { + AccountBalanceFromJSON, + AccountBalanceFromJSONTyped, + AccountBalanceToJSON, + AccountBalanceToJSONTyped, +} from './accountbalance'; +import type { CommerceAddress } from './commerceaddress'; import { - AccountBalance, - AccountBalance$inboundSchema, -} from "./accountbalance.js"; + CommerceAddressFromJSON, + CommerceAddressFromJSONTyped, + CommerceAddressToJSON, + CommerceAddressToJSONTyped, +} from './commerceaddress'; +import type { PhoneNumber } from './phonenumber'; import { - CommerceAddress, - CommerceAddress$inboundSchema, -} from "./commerceaddress.js"; -import { PhoneNumber, PhoneNumber$inboundSchema } from "./phonenumber.js"; -import { WebLink, WebLink$inboundSchema } from "./weblink.js"; + PhoneNumberFromJSON, + PhoneNumberFromJSONTyped, + PhoneNumberToJSON, + PhoneNumberToJSONTyped, +} from './phonenumber'; +import type { WebLink } from './weblink'; +import { + WebLinkFromJSON, + WebLinkFromJSONTyped, + WebLinkToJSON, + WebLinkToJSONTyped, +} from './weblink'; /** - * In the Codat system, company profile includes standard commercial details about - * - * @remarks + * In the Codat system, company profile includes standard commercial details about * a linked company, such as their address, phone number, and company registration. + * + * @export + * @interface CommerceCompanyInfo */ -export type CommerceCompanyInfo = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * The name of the company - */ - companyName?: string | undefined; - /** - * Identifier or reference for the company in the commerce software - */ - commercePlatformRef?: string | undefined; - /** - * The full legal name of the company - */ - companyLegalName?: string | undefined; - /** - * Addresses associated with the company - */ - addresses?: Array | undefined; - /** - * Phone numbers associated with the company - */ - phoneNumbers?: Array | undefined; - /** - * Weblinks associated with the company - */ - webLinks?: Array | undefined; - /** - * The registration number of the company - */ - registrationNumber?: string | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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. - */ - baseCurrency?: string | undefined; - /** - * The available and current cash balances for the company's accounts - */ - accountBalances?: Array | undefined; - /** - * URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system - */ - sourceUrls?: { [k: string]: string } | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; -}; +export interface CommerceCompanyInfo { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + sourceModifiedDate?: string; + /** + * The name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyName?: string; + /** + * Identifier or reference for the company in the commerce software + * @type {string} + * @memberof CommerceCompanyInfo + */ + commercePlatformRef?: string; + /** + * The full legal name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyLegalName?: string; + /** + * Addresses associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + addresses?: Array; + /** + * Phone numbers associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + phoneNumbers?: Array; + /** + * Weblinks associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + webLinks?: Array; + /** + * The registration number of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + registrationNumber?: string; + /** + * 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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + baseCurrency?: string; + /** + * The available and current cash balances for the company's accounts + * @type {Array} + * @memberof CommerceCompanyInfo + */ + accountBalances?: Array; + /** + * URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system + * @type {{ [key: string]: string; }} + * @memberof CommerceCompanyInfo + */ + sourceUrls?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the CommerceCompanyInfo interface. + */ +export function instanceOfCommerceCompanyInfo(value: object): value is CommerceCompanyInfo { + return true; +} + +export function CommerceCompanyInfoFromJSON(json: any): CommerceCompanyInfo { + return CommerceCompanyInfoFromJSONTyped(json, false); +} + +export function CommerceCompanyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceCompanyInfo { + if (json == null) { + return json; + } + return { + + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'companyName': json['companyName'] == null ? undefined : json['companyName'], + 'commercePlatformRef': json['commercePlatformRef'] == null ? undefined : json['commercePlatformRef'], + 'companyLegalName': json['companyLegalName'] == null ? undefined : json['companyLegalName'], + 'addresses': json['addresses'] == null ? undefined : ((json['addresses'] as Array).map(CommerceAddressFromJSON)), + 'phoneNumbers': json['phoneNumbers'] == null ? undefined : ((json['phoneNumbers'] as Array).map(PhoneNumberFromJSON)), + 'webLinks': json['webLinks'] == null ? undefined : ((json['webLinks'] as Array).map(WebLinkFromJSON)), + 'registrationNumber': json['registrationNumber'] == null ? undefined : json['registrationNumber'], + 'baseCurrency': json['baseCurrency'] == null ? undefined : json['baseCurrency'], + 'accountBalances': json['accountBalances'] == null ? undefined : ((json['accountBalances'] as Array).map(AccountBalanceFromJSON)), + 'sourceUrls': json['sourceUrls'] == null ? undefined : json['sourceUrls'], + }; +} -/** @internal */ -export const CommerceCompanyInfo$inboundSchema: z.ZodType< - CommerceCompanyInfo, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - companyName: z.string().optional(), - commercePlatformRef: z.string().optional(), - companyLegalName: z.string().optional(), - addresses: z.array(CommerceAddress$inboundSchema).optional(), - phoneNumbers: z.array(PhoneNumber$inboundSchema).optional(), - webLinks: z.array(WebLink$inboundSchema).optional(), - registrationNumber: z.string().optional(), - baseCurrency: z.string().optional(), - accountBalances: z.array(AccountBalance$inboundSchema).optional(), - sourceUrls: z.record(z.string()).optional(), - createdDate: z.string().optional(), -}); +export function CommerceCompanyInfoToJSON(json: any): CommerceCompanyInfo { + return CommerceCompanyInfoToJSONTyped(json, false); +} + +export function CommerceCompanyInfoToJSONTyped(value?: CommerceCompanyInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'createdDate': value['createdDate'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'companyName': value['companyName'], + 'commercePlatformRef': value['commercePlatformRef'], + 'companyLegalName': value['companyLegalName'], + 'addresses': value['addresses'] == null ? undefined : ((value['addresses'] as Array).map(CommerceAddressToJSON)), + 'phoneNumbers': value['phoneNumbers'] == null ? undefined : ((value['phoneNumbers'] as Array).map(PhoneNumberToJSON)), + 'webLinks': value['webLinks'] == null ? undefined : ((value['webLinks'] as Array).map(WebLinkToJSON)), + 'registrationNumber': value['registrationNumber'], + 'baseCurrency': value['baseCurrency'], + 'accountBalances': value['accountBalances'] == null ? undefined : ((value['accountBalances'] as Array).map(AccountBalanceToJSON)), + 'sourceUrls': value['sourceUrls'], + }; +} + + +export interface CommerceCompanyInfoCommerceCompanyProfile { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + sourceModifiedDate?: string; + /** + * The name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyName?: string; + /** + * Identifier or reference for the company in the commerce software + * @type {string} + * @memberof CommerceCompanyInfo + */ + commercePlatformRef?: string; + /** + * The full legal name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyLegalName?: string; + /** + * Addresses associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + addresses?: Array; + /** + * Phone numbers associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + phoneNumbers?: Array; + /** + * Weblinks associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + webLinks?: Array; + /** + * The registration number of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + registrationNumber?: string; + /** + * 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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + baseCurrency?: string; + /** + * The available and current cash balances for the company's accounts + * @type {Array} + * @memberof CommerceCompanyInfo + */ + accountBalances?: Array; + /** + * URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system + * @type {{ [key: string]: string; }} + * @memberof CommerceCompanyInfo + */ + sourceUrls?: { [key: string]: string; }; +} + +export interface CommerceCompanyProfile { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + sourceModifiedDate?: string; + /** + * The name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyName?: string; + /** + * Identifier or reference for the company in the commerce software + * @type {string} + * @memberof CommerceCompanyInfo + */ + commercePlatformRef?: string; + /** + * The full legal name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyLegalName?: string; + /** + * Addresses associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + addresses?: Array; + /** + * Phone numbers associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + phoneNumbers?: Array; + /** + * Weblinks associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + webLinks?: Array; + /** + * The registration number of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + registrationNumber?: string; + /** + * 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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + baseCurrency?: string; + /** + * The available and current cash balances for the company's accounts + * @type {Array} + * @memberof CommerceCompanyInfo + */ + accountBalances?: Array; + /** + * URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system + * @type {{ [key: string]: string; }} + * @memberof CommerceCompanyInfo + */ + sourceUrls?: { [key: string]: string; }; +} + +export interface CommerceProfileGetResponseCommerceCompanyInfo { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + sourceModifiedDate?: string; + /** + * The name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyName?: string; + /** + * Identifier or reference for the company in the commerce software + * @type {string} + * @memberof CommerceCompanyInfo + */ + commercePlatformRef?: string; + /** + * The full legal name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyLegalName?: string; + /** + * Addresses associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + addresses?: Array; + /** + * Phone numbers associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + phoneNumbers?: Array; + /** + * Weblinks associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + webLinks?: Array; + /** + * The registration number of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + registrationNumber?: string; + /** + * 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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + baseCurrency?: string; + /** + * The available and current cash balances for the company's accounts + * @type {Array} + * @memberof CommerceCompanyInfo + */ + accountBalances?: Array; + /** + * URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system + * @type {{ [key: string]: string; }} + * @memberof CommerceCompanyInfo + */ + sourceUrls?: { [key: string]: string; }; +} + +export interface CommerceProfileGetResponseCommerceCompanyProfile { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + sourceModifiedDate?: string; + /** + * The name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyName?: string; + /** + * Identifier or reference for the company in the commerce software + * @type {string} + * @memberof CommerceCompanyInfo + */ + commercePlatformRef?: string; + /** + * The full legal name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyLegalName?: string; + /** + * Addresses associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + addresses?: Array; + /** + * Phone numbers associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + phoneNumbers?: Array; + /** + * Weblinks associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + webLinks?: Array; + /** + * The registration number of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + registrationNumber?: string; + /** + * 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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + baseCurrency?: string; + /** + * The available and current cash balances for the company's accounts + * @type {Array} + * @memberof CommerceCompanyInfo + */ + accountBalances?: Array; + /** + * URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system + * @type {{ [key: string]: string; }} + * @memberof CommerceCompanyInfo + */ + sourceUrls?: { [key: string]: string; }; +} + +export interface GetCommerceProfileResponseCommerceCompanyInfo { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + sourceModifiedDate?: string; + /** + * The name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyName?: string; + /** + * Identifier or reference for the company in the commerce software + * @type {string} + * @memberof CommerceCompanyInfo + */ + commercePlatformRef?: string; + /** + * The full legal name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyLegalName?: string; + /** + * Addresses associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + addresses?: Array; + /** + * Phone numbers associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + phoneNumbers?: Array; + /** + * Weblinks associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + webLinks?: Array; + /** + * The registration number of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + registrationNumber?: string; + /** + * 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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + baseCurrency?: string; + /** + * The available and current cash balances for the company's accounts + * @type {Array} + * @memberof CommerceCompanyInfo + */ + accountBalances?: Array; + /** + * URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system + * @type {{ [key: string]: string; }} + * @memberof CommerceCompanyInfo + */ + sourceUrls?: { [key: string]: string; }; +} -export function commerceCompanyInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceCompanyInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceCompanyInfo' from JSON`, - ); +export interface GetCommerceProfileResponseCommerceCompanyProfile { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCompanyInfo + */ + sourceModifiedDate?: string; + /** + * The name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyName?: string; + /** + * Identifier or reference for the company in the commerce software + * @type {string} + * @memberof CommerceCompanyInfo + */ + commercePlatformRef?: string; + /** + * The full legal name of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + companyLegalName?: string; + /** + * Addresses associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + addresses?: Array; + /** + * Phone numbers associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + phoneNumbers?: Array; + /** + * Weblinks associated with the company + * @type {Array} + * @memberof CommerceCompanyInfo + */ + webLinks?: Array; + /** + * The registration number of the company + * @type {string} + * @memberof CommerceCompanyInfo + */ + registrationNumber?: string; + /** + * 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. + * @type {string} + * @memberof CommerceCompanyInfo + */ + baseCurrency?: string; + /** + * The available and current cash balances for the company's accounts + * @type {Array} + * @memberof CommerceCompanyInfo + */ + accountBalances?: Array; + /** + * URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system + * @type {{ [key: string]: string; }} + * @memberof CommerceCompanyInfo + */ + sourceUrls?: { [key: string]: string; }; } diff --git a/lending/src/sdk/models/shared/commercecustomer.ts b/lending/src/sdk/models/shared/commercecustomer.ts index f4dbc76a6..ab89e09cc 100644 --- a/lending/src/sdk/models/shared/commercecustomer.ts +++ b/lending/src/sdk/models/shared/commercecustomer.ts @@ -1,95 +1,665 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceAddress } from './commerceaddress'; import { - CommerceAddress, - CommerceAddress$inboundSchema, -} from "./commerceaddress.js"; + CommerceAddressFromJSON, + CommerceAddressFromJSONTyped, + CommerceAddressToJSON, + CommerceAddressToJSONTyped, +} from './commerceaddress'; /** * When a customer places an order with the connected commerce store their details are added to the Customers dataset. You can use the data from the Customers endpoints to calculate key metrics, such as customer churn. + * @export + * @interface CommerceCustomer + */ +export interface CommerceCustomer { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceCustomer + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCustomer + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + sourceModifiedDate?: string; + /** + * Name of the customer + * @type {string} + * @memberof CommerceCustomer + */ + customerName?: string; + /** + * Email address of the customer + * @type {string} + * @memberof CommerceCustomer + */ + emailAddress?: string; + /** + * A phone number. + * @type {string} + * @memberof CommerceCustomer + */ + phone?: string | null; + /** + * Default currency of any transactional data for the customer, + * for example, orders or payments + * + * @type {string} + * @memberof CommerceCustomer + */ + defaultCurrency?: string; + /** + * Addresses of the customer + * @type {Array} + * @memberof CommerceCustomer + */ + addresses?: Array; + /** + * Any additional information about the customer + * @type {string} + * @memberof CommerceCustomer + */ + note?: string; +} + +/** + * Check if a given object implements the CommerceCustomer interface. */ -export type CommerceCustomer = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Name of the customer - */ - customerName?: string | undefined; - /** - * Email address of the customer - */ - emailAddress?: string | undefined; - /** - * A phone number. - */ - phone?: string | null | undefined; - defaultCurrency?: string | undefined; - /** - * Addresses of the customer - */ - addresses?: Array | undefined; - /** - * Any additional information about the customer - */ - note?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; -}; +export function instanceOfCommerceCustomer(value: object): value is CommerceCustomer { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommerceCustomerFromJSON(json: any): CommerceCustomer { + return CommerceCustomerFromJSONTyped(json, false); +} + +export function CommerceCustomerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceCustomer { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'customerName': json['customerName'] == null ? undefined : json['customerName'], + 'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'], + 'phone': json['phone'] == null ? undefined : json['phone'], + 'defaultCurrency': json['defaultCurrency'] == null ? undefined : json['defaultCurrency'], + 'addresses': json['addresses'] == null ? undefined : ((json['addresses'] as Array).map(CommerceAddressFromJSON)), + 'note': json['note'] == null ? undefined : json['note'], + }; +} + +export function CommerceCustomerToJSON(json: any): CommerceCustomer { + return CommerceCustomerToJSONTyped(json, false); +} -/** @internal */ -export const CommerceCustomer$inboundSchema: z.ZodType< - CommerceCustomer, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - customerName: z.string().optional(), - emailAddress: z.string().optional(), - phone: z.nullable(z.string()).optional(), - defaultCurrency: z.string().optional(), - addresses: z.array(CommerceAddress$inboundSchema).optional(), - note: z.string().optional(), - createdDate: z.string().optional(), -}); +export function CommerceCustomerToJSONTyped(value?: CommerceCustomer | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'createdDate': value['createdDate'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'customerName': value['customerName'], + 'emailAddress': value['emailAddress'], + 'phone': value['phone'], + 'defaultCurrency': value['defaultCurrency'], + 'addresses': value['addresses'] == null ? undefined : ((value['addresses'] as Array).map(CommerceAddressToJSON)), + 'note': value['note'], + }; +} + + +export interface CommerceCustomerGetResponseCommerceCustomer { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceCustomer + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCustomer + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + sourceModifiedDate?: string; + /** + * Name of the customer + * @type {string} + * @memberof CommerceCustomer + */ + customerName?: string; + /** + * Email address of the customer + * @type {string} + * @memberof CommerceCustomer + */ + emailAddress?: string; + /** + * A phone number. + * @type {string} + * @memberof CommerceCustomer + */ + phone?: string | null; + /** + * Default currency of any transactional data for the customer, + * for example, orders or payments + * + * @type {string} + * @memberof CommerceCustomer + */ + defaultCurrency?: string; + /** + * Addresses of the customer + * @type {Array} + * @memberof CommerceCustomer + */ + addresses?: Array; + /** + * Any additional information about the customer + * @type {string} + * @memberof CommerceCustomer + */ + note?: string; +} + +export interface CommerceCustomersCommerceCustomer { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceCustomer + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCustomer + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + sourceModifiedDate?: string; + /** + * Name of the customer + * @type {string} + * @memberof CommerceCustomer + */ + customerName?: string; + /** + * Email address of the customer + * @type {string} + * @memberof CommerceCustomer + */ + emailAddress?: string; + /** + * A phone number. + * @type {string} + * @memberof CommerceCustomer + */ + phone?: string | null; + /** + * Default currency of any transactional data for the customer, + * for example, orders or payments + * + * @type {string} + * @memberof CommerceCustomer + */ + defaultCurrency?: string; + /** + * Addresses of the customer + * @type {Array} + * @memberof CommerceCustomer + */ + addresses?: Array; + /** + * Any additional information about the customer + * @type {string} + * @memberof CommerceCustomer + */ + note?: string; +} + +export interface CommerceCustomersListResponseCommerceCustomer { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceCustomer + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCustomer + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + sourceModifiedDate?: string; + /** + * Name of the customer + * @type {string} + * @memberof CommerceCustomer + */ + customerName?: string; + /** + * Email address of the customer + * @type {string} + * @memberof CommerceCustomer + */ + emailAddress?: string; + /** + * A phone number. + * @type {string} + * @memberof CommerceCustomer + */ + phone?: string | null; + /** + * Default currency of any transactional data for the customer, + * for example, orders or payments + * + * @type {string} + * @memberof CommerceCustomer + */ + defaultCurrency?: string; + /** + * Addresses of the customer + * @type {Array} + * @memberof CommerceCustomer + */ + addresses?: Array; + /** + * Any additional information about the customer + * @type {string} + * @memberof CommerceCustomer + */ + note?: string; +} + +export interface GetCommerceCustomerResponseCommerceCustomer { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceCustomer + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCustomer + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + sourceModifiedDate?: string; + /** + * Name of the customer + * @type {string} + * @memberof CommerceCustomer + */ + customerName?: string; + /** + * Email address of the customer + * @type {string} + * @memberof CommerceCustomer + */ + emailAddress?: string; + /** + * A phone number. + * @type {string} + * @memberof CommerceCustomer + */ + phone?: string | null; + /** + * Default currency of any transactional data for the customer, + * for example, orders or payments + * + * @type {string} + * @memberof CommerceCustomer + */ + defaultCurrency?: string; + /** + * Addresses of the customer + * @type {Array} + * @memberof CommerceCustomer + */ + addresses?: Array; + /** + * Any additional information about the customer + * @type {string} + * @memberof CommerceCustomer + */ + note?: string; +} -export function commerceCustomerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceCustomer$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceCustomer' from JSON`, - ); +export interface ListCommerceCustomersResponseCommerceCustomer { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceCustomer + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceCustomer + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceCustomer + */ + sourceModifiedDate?: string; + /** + * Name of the customer + * @type {string} + * @memberof CommerceCustomer + */ + customerName?: string; + /** + * Email address of the customer + * @type {string} + * @memberof CommerceCustomer + */ + emailAddress?: string; + /** + * A phone number. + * @type {string} + * @memberof CommerceCustomer + */ + phone?: string | null; + /** + * Default currency of any transactional data for the customer, + * for example, orders or payments + * + * @type {string} + * @memberof CommerceCustomer + */ + defaultCurrency?: string; + /** + * Addresses of the customer + * @type {Array} + * @memberof CommerceCustomer + */ + addresses?: Array; + /** + * Any additional information about the customer + * @type {string} + * @memberof CommerceCustomer + */ + note?: string; } diff --git a/lending/src/sdk/models/shared/commercecustomerref.ts b/lending/src/sdk/models/shared/commercecustomerref.ts index 92fb556b2..bbfe1e3c8 100644 --- a/lending/src/sdk/models/shared/commercecustomerref.ts +++ b/lending/src/sdk/models/shared/commercecustomerref.ts @@ -1,42 +1,134 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Reference to the customer that placed the order. + * @export + * @interface CommerceCustomerRef + */ +export interface CommerceCustomerRef { + /** + * The unique identitifer of the customer being referenced + * @type {string} + * @memberof CommerceCustomerRef + */ + id: string; + /** + * Name of the customer being referenced. + * @type {string} + * @memberof CommerceCustomerRef + */ + name?: string; +} + +/** + * Check if a given object implements the CommerceCustomerRef interface. */ -export type CommerceCustomerRef = { - /** - * The unique identitifer of the customer being referenced - */ - id: string; - /** - * Name of the customer being referenced. - */ - name?: string | undefined; -}; - -/** @internal */ -export const CommerceCustomerRef$inboundSchema: z.ZodType< - CommerceCustomerRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.string().optional(), -}); - -export function commerceCustomerRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceCustomerRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceCustomerRef' from JSON`, - ); +export function instanceOfCommerceCustomerRef(value: object): value is CommerceCustomerRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommerceCustomerRefFromJSON(json: any): CommerceCustomerRef { + return CommerceCustomerRefFromJSONTyped(json, false); +} + +export function CommerceCustomerRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceCustomerRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function CommerceCustomerRefToJSON(json: any): CommerceCustomerRef { + return CommerceCustomerRefToJSONTyped(json, false); +} + +export function CommerceCustomerRefToJSONTyped(value?: CommerceCustomerRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface CommerceOrderCommerceCustomerRef { + /** + * The unique identitifer of the customer being referenced + * @type {string} + * @memberof CommerceCustomerRef + */ + id: string; + /** + * Name of the customer being referenced. + * @type {string} + * @memberof CommerceCustomerRef + */ + name?: string; +} + +export interface CommerceOrderGetResponseCommerceCustomerRef { + /** + * The unique identitifer of the customer being referenced + * @type {string} + * @memberof CommerceCustomerRef + */ + id: string; + /** + * Name of the customer being referenced. + * @type {string} + * @memberof CommerceCustomerRef + */ + name?: string; +} + +export interface CommerceOrdersCommerceCustomerRef { + /** + * The unique identitifer of the customer being referenced + * @type {string} + * @memberof CommerceCustomerRef + */ + id: string; + /** + * Name of the customer being referenced. + * @type {string} + * @memberof CommerceCustomerRef + */ + name?: string; +} + +export interface GetCommerceOrderResponseCommerceCustomerRef { + /** + * The unique identitifer of the customer being referenced + * @type {string} + * @memberof CommerceCustomerRef + */ + id: string; + /** + * Name of the customer being referenced. + * @type {string} + * @memberof CommerceCustomerRef + */ + name?: string; } diff --git a/lending/src/sdk/models/shared/commercecustomers.ts b/lending/src/sdk/models/shared/commercecustomers.ts index fe380a655..700780e41 100644 --- a/lending/src/sdk/models/shared/commercecustomers.ts +++ b/lending/src/sdk/models/shared/commercecustomers.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceCustomer } from './commercecustomer'; import { - CommerceCustomer, - CommerceCustomer$inboundSchema, -} from "./commercecustomer.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommerceCustomers = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommerceCustomers$inboundSchema: z.ZodType< - CommerceCustomers, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(CommerceCustomer$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commerceCustomersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceCustomers$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceCustomers' from JSON`, - ); + CommerceCustomerFromJSON, + CommerceCustomerFromJSONTyped, + CommerceCustomerToJSON, + CommerceCustomerToJSONTyped, +} from './commercecustomer'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface CommerceCustomers + */ +export interface CommerceCustomers { + /** + * Current page number. + * @type {number} + * @memberof CommerceCustomers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceCustomers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceCustomers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceCustomers + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceCustomers + */ + results?: Array; +} + +/** + * Check if a given object implements the CommerceCustomers interface. + */ +export function instanceOfCommerceCustomers(value: object): value is CommerceCustomers { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommerceCustomersFromJSON(json: any): CommerceCustomers { + return CommerceCustomersFromJSONTyped(json, false); +} + +export function CommerceCustomersFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceCustomers { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommerceCustomerFromJSON)), + }; +} + +export function CommerceCustomersToJSON(json: any): CommerceCustomers { + return CommerceCustomersToJSONTyped(json, false); +} + +export function CommerceCustomersToJSONTyped(value?: CommerceCustomers | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommerceCustomerToJSON)), + }; +} + + +export interface CommerceCustomersListResponseCommerceCustomers { + /** + * Current page number. + * @type {number} + * @memberof CommerceCustomers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceCustomers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceCustomers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceCustomers + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceCustomers + */ + results?: Array; +} + +export interface ListCommerceCustomersResponseCommerceCustomers { + /** + * Current page number. + * @type {number} + * @memberof CommerceCustomers + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceCustomers + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceCustomers + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceCustomers + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceCustomers + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/commercedispute.ts b/lending/src/sdk/models/shared/commercedispute.ts index eee44159d..2aca87bbf 100644 --- a/lending/src/sdk/models/shared/commercedispute.ts +++ b/lending/src/sdk/models/shared/commercedispute.ts @@ -1,132 +1,813 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { DisputeStatus, DisputeStatus$inboundSchema } from "./disputestatus.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { DisputeStatus } from './disputestatus'; +import { + DisputeStatusFromJSON, + DisputeStatusFromJSONTyped, + DisputeStatusToJSON, + DisputeStatusToJSONTyped, +} from './disputestatus'; +import type { TransactionSourceRef } from './transactionsourceref'; import { - TransactionSourceRef, - TransactionSourceRef$inboundSchema, -} from "./transactionsourceref.js"; + TransactionSourceRefFromJSON, + TransactionSourceRefFromJSONTyped, + TransactionSourceRefToJSON, + TransactionSourceRefToJSONTyped, +} from './transactionsourceref'; /** - * A customer may file a payment dispute with their bank or other card issuer when they're unsatisfied with their purchase or believe they have been charged incorrectly. For example: - * - * @remarks - * - They didn't receive an order. - * - The product they received was different to the commerce store's description. - * - They've been the victim of online fraud. - * + * A customer may file a payment dispute with their bank or other card issuer when they're unsatisfied with their purchase or believe they have been charged incorrectly. For example: + * - They didn't receive an order. + * - The product they received was different to the commerce store's description. + * - They've been the victim of online fraud. + * * You can use data from the Disputes endpoints to calculate key metrics, such as the number of chargebacks. + * @export + * @interface CommerceDispute + */ +export interface CommerceDispute { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceDispute + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + sourceModifiedDate?: string; + /** + * Link to the source event(s) which triggered this transaction. + * @type {Array} + * @memberof CommerceDispute + */ + disputedTransactions?: Array; + /** + * + * @type {any} + * @memberof CommerceDispute + */ + totalAmount?: any | null; + /** + * 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. + * @type {string} + * @memberof CommerceDispute + */ + currency: string; + /** + * + * @type {DisputeStatus} + * @memberof CommerceDispute + */ + status?: DisputeStatus; + /** + * Reason for the dispute + * @type {string} + * @memberof CommerceDispute + */ + reason?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + dueDate?: string; +} + + + +/** + * Check if a given object implements the CommerceDispute interface. */ -export type CommerceDispute = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Link to the source event(s) which triggered this transaction. - */ - disputedTransactions?: Array | undefined; - /** - * Total transaction amount that is under dispute. - */ - totalAmount?: any | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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: string; - /** - * Current status of the dispute - */ - status?: DisputeStatus | undefined; - /** - * Reason for the dispute - */ - reason?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - dueDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; -}; - -/** @internal */ -export const CommerceDispute$inboundSchema: z.ZodType< - CommerceDispute, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - disputedTransactions: z.array(TransactionSourceRef$inboundSchema).optional(), - totalAmount: z.any().optional(), - currency: z.string(), - status: DisputeStatus$inboundSchema.optional(), - reason: z.string().optional(), - dueDate: z.string().optional(), - createdDate: z.string().optional(), -}); - -export function commerceDisputeFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceDispute$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceDispute' from JSON`, - ); +export function instanceOfCommerceDispute(value: object): value is CommerceDispute { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + return true; +} + +export function CommerceDisputeFromJSON(json: any): CommerceDispute { + return CommerceDisputeFromJSONTyped(json, false); +} + +export function CommerceDisputeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceDispute { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'disputedTransactions': json['disputedTransactions'] == null ? undefined : ((json['disputedTransactions'] as Array).map(TransactionSourceRefFromJSON)), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'currency': json['currency'], + 'status': json['status'] == null ? undefined : DisputeStatusFromJSON(json['status']), + 'reason': json['reason'] == null ? undefined : json['reason'], + 'dueDate': json['dueDate'] == null ? undefined : json['dueDate'], + }; +} + +export function CommerceDisputeToJSON(json: any): CommerceDispute { + return CommerceDisputeToJSONTyped(json, false); +} + +export function CommerceDisputeToJSONTyped(value?: CommerceDispute | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'createdDate': value['createdDate'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'disputedTransactions': value['disputedTransactions'] == null ? undefined : ((value['disputedTransactions'] as Array).map(TransactionSourceRefToJSON)), + 'totalAmount': fromDecimal(value['totalAmount']), + 'currency': value['currency'], + 'status': DisputeStatusToJSON(value['status']), + 'reason': value['reason'], + 'dueDate': value['dueDate'], + }; +} + + +export interface CommerceDisputeGetResponseCommerceDispute { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceDispute + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + sourceModifiedDate?: string; + /** + * Link to the source event(s) which triggered this transaction. + * @type {Array} + * @memberof CommerceDispute + */ + disputedTransactions?: Array; + /** + * + * @type {any} + * @memberof CommerceDispute + */ + totalAmount?: any | null; + /** + * 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. + * @type {string} + * @memberof CommerceDispute + */ + currency: string; + /** + * + * @type {DisputeStatus} + * @memberof CommerceDispute + */ + status?: DisputeStatus; + /** + * Reason for the dispute + * @type {string} + * @memberof CommerceDispute + */ + reason?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + dueDate?: string; +} + +export interface CommerceDisputesCommerceDispute { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceDispute + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + sourceModifiedDate?: string; + /** + * Link to the source event(s) which triggered this transaction. + * @type {Array} + * @memberof CommerceDispute + */ + disputedTransactions?: Array; + /** + * + * @type {any} + * @memberof CommerceDispute + */ + totalAmount?: any | null; + /** + * 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. + * @type {string} + * @memberof CommerceDispute + */ + currency: string; + /** + * + * @type {DisputeStatus} + * @memberof CommerceDispute + */ + status?: DisputeStatus; + /** + * Reason for the dispute + * @type {string} + * @memberof CommerceDispute + */ + reason?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + dueDate?: string; +} + +export interface CommerceDisputesListResponseCommerceDispute { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceDispute + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + sourceModifiedDate?: string; + /** + * Link to the source event(s) which triggered this transaction. + * @type {Array} + * @memberof CommerceDispute + */ + disputedTransactions?: Array; + /** + * + * @type {any} + * @memberof CommerceDispute + */ + totalAmount?: any | null; + /** + * 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. + * @type {string} + * @memberof CommerceDispute + */ + currency: string; + /** + * + * @type {DisputeStatus} + * @memberof CommerceDispute + */ + status?: DisputeStatus; + /** + * Reason for the dispute + * @type {string} + * @memberof CommerceDispute + */ + reason?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + dueDate?: string; +} + +export interface GetCommerceDisputeResponseCommerceDispute { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceDispute + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + sourceModifiedDate?: string; + /** + * Link to the source event(s) which triggered this transaction. + * @type {Array} + * @memberof CommerceDispute + */ + disputedTransactions?: Array; + /** + * + * @type {any} + * @memberof CommerceDispute + */ + totalAmount?: any | null; + /** + * 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. + * @type {string} + * @memberof CommerceDispute + */ + currency: string; + /** + * + * @type {DisputeStatus} + * @memberof CommerceDispute + */ + status?: DisputeStatus; + /** + * Reason for the dispute + * @type {string} + * @memberof CommerceDispute + */ + reason?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + dueDate?: string; +} + +export interface ListCommerceDisputesResponseCommerceDispute { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceDispute + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceDispute + */ + sourceModifiedDate?: string; + /** + * Link to the source event(s) which triggered this transaction. + * @type {Array} + * @memberof CommerceDispute + */ + disputedTransactions?: Array; + /** + * + * @type {any} + * @memberof CommerceDispute + */ + totalAmount?: any | null; + /** + * 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. + * @type {string} + * @memberof CommerceDispute + */ + currency: string; + /** + * + * @type {DisputeStatus} + * @memberof CommerceDispute + */ + status?: DisputeStatus; + /** + * Reason for the dispute + * @type {string} + * @memberof CommerceDispute + */ + reason?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceDispute + */ + dueDate?: string; } diff --git a/lending/src/sdk/models/shared/commercedisputes.ts b/lending/src/sdk/models/shared/commercedisputes.ts index b6387e215..d4fa45d04 100644 --- a/lending/src/sdk/models/shared/commercedisputes.ts +++ b/lending/src/sdk/models/shared/commercedisputes.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceDispute } from './commercedispute'; import { - CommerceDispute, - CommerceDispute$inboundSchema, -} from "./commercedispute.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommerceDisputes = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommerceDisputes$inboundSchema: z.ZodType< - CommerceDisputes, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(CommerceDispute$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commerceDisputesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceDisputes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceDisputes' from JSON`, - ); + CommerceDisputeFromJSON, + CommerceDisputeFromJSONTyped, + CommerceDisputeToJSON, + CommerceDisputeToJSONTyped, +} from './commercedispute'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface CommerceDisputes + */ +export interface CommerceDisputes { + /** + * Current page number. + * @type {number} + * @memberof CommerceDisputes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceDisputes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceDisputes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceDisputes + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceDisputes + */ + results?: Array; +} + +/** + * Check if a given object implements the CommerceDisputes interface. + */ +export function instanceOfCommerceDisputes(value: object): value is CommerceDisputes { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommerceDisputesFromJSON(json: any): CommerceDisputes { + return CommerceDisputesFromJSONTyped(json, false); +} + +export function CommerceDisputesFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceDisputes { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommerceDisputeFromJSON)), + }; +} + +export function CommerceDisputesToJSON(json: any): CommerceDisputes { + return CommerceDisputesToJSONTyped(json, false); +} + +export function CommerceDisputesToJSONTyped(value?: CommerceDisputes | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommerceDisputeToJSON)), + }; +} + + +export interface CommerceDisputesListResponseCommerceDisputes { + /** + * Current page number. + * @type {number} + * @memberof CommerceDisputes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceDisputes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceDisputes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceDisputes + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceDisputes + */ + results?: Array; +} + +export interface ListCommerceDisputesResponseCommerceDisputes { + /** + * Current page number. + * @type {number} + * @memberof CommerceDisputes + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceDisputes + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceDisputes + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceDisputes + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceDisputes + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/commercelocation.ts b/lending/src/sdk/models/shared/commercelocation.ts index 3b0efc685..0458c5935 100644 --- a/lending/src/sdk/models/shared/commercelocation.ts +++ b/lending/src/sdk/models/shared/commercelocation.ts @@ -1,56 +1,357 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceAddress } from './commerceaddress'; import { - CommerceAddress, - CommerceAddress$inboundSchema, -} from "./commerceaddress.js"; + CommerceAddressFromJSON, + CommerceAddressFromJSONTyped, + CommerceAddressToJSON, + CommerceAddressToJSONTyped, +} from './commerceaddress'; /** * The Location datatype holds information on the geographic location at which stocks of products may be held, as referenced in the Products data type. - * - * @remarks - * + * * A Location also holds information on geographic locations where orders were placed, as referenced in the Orders data type. + * @export + * @interface CommerceLocation */ -export type CommerceLocation = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Name of this location - */ - name?: string | undefined; - address?: CommerceAddress | undefined; -}; - -/** @internal */ -export const CommerceLocation$inboundSchema: z.ZodType< - CommerceLocation, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - name: z.string().optional(), - address: CommerceAddress$inboundSchema.optional(), -}); - -export function commerceLocationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceLocation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceLocation' from JSON`, - ); +export interface CommerceLocation { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceLocation + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + sourceModifiedDate?: string; + /** + * Name of this location + * @type {string} + * @memberof CommerceLocation + */ + name?: string; + /** + * Address associated with the location + * @type {CommerceAddress} + * @memberof CommerceLocation + */ + address?: CommerceAddress; +} + +/** + * Check if a given object implements the CommerceLocation interface. + */ +export function instanceOfCommerceLocation(value: object): value is CommerceLocation { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommerceLocationFromJSON(json: any): CommerceLocation { + return CommerceLocationFromJSONTyped(json, false); +} + +export function CommerceLocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceLocation { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'name': json['name'] == null ? undefined : json['name'], + 'address': json['address'] == null ? undefined : CommerceAddressFromJSON(json['address']), + }; +} + +export function CommerceLocationToJSON(json: any): CommerceLocation { + return CommerceLocationToJSONTyped(json, false); +} + +export function CommerceLocationToJSONTyped(value?: CommerceLocation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'name': value['name'], + 'address': CommerceAddressToJSON(value['address']), + }; +} + + +export interface CommerceLocationGetResponseCommerceLocation { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceLocation + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + sourceModifiedDate?: string; + /** + * Name of this location + * @type {string} + * @memberof CommerceLocation + */ + name?: string; + /** + * Address associated with the location + * @type {CommerceAddress} + * @memberof CommerceLocation + */ + address?: CommerceAddress; +} + +export interface CommerceLocationsCommerceLocation { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceLocation + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + sourceModifiedDate?: string; + /** + * Name of this location + * @type {string} + * @memberof CommerceLocation + */ + name?: string; + /** + * Address associated with the location + * @type {CommerceAddress} + * @memberof CommerceLocation + */ + address?: CommerceAddress; +} + +export interface CommerceLocationsListResponseCommerceLocation { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceLocation + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + sourceModifiedDate?: string; + /** + * Name of this location + * @type {string} + * @memberof CommerceLocation + */ + name?: string; + /** + * Address associated with the location + * @type {CommerceAddress} + * @memberof CommerceLocation + */ + address?: CommerceAddress; +} + +export interface GetCommerceLocationResponseCommerceLocation { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceLocation + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + sourceModifiedDate?: string; + /** + * Name of this location + * @type {string} + * @memberof CommerceLocation + */ + name?: string; + /** + * Address associated with the location + * @type {CommerceAddress} + * @memberof CommerceLocation + */ + address?: CommerceAddress; +} + +export interface ListCommerceLocationsResponseCommerceLocation { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceLocation + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceLocation + */ + sourceModifiedDate?: string; + /** + * Name of this location + * @type {string} + * @memberof CommerceLocation + */ + name?: string; + /** + * Address associated with the location + * @type {CommerceAddress} + * @memberof CommerceLocation + */ + address?: CommerceAddress; } diff --git a/lending/src/sdk/models/shared/commercelocations.ts b/lending/src/sdk/models/shared/commercelocations.ts index b906bf676..c57eb4e21 100644 --- a/lending/src/sdk/models/shared/commercelocations.ts +++ b/lending/src/sdk/models/shared/commercelocations.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceLocation } from './commercelocation'; import { - CommerceLocation, - CommerceLocation$inboundSchema, -} from "./commercelocation.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommerceLocations = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommerceLocations$inboundSchema: z.ZodType< - CommerceLocations, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(CommerceLocation$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commerceLocationsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceLocations$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceLocations' from JSON`, - ); + CommerceLocationFromJSON, + CommerceLocationFromJSONTyped, + CommerceLocationToJSON, + CommerceLocationToJSONTyped, +} from './commercelocation'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface CommerceLocations + */ +export interface CommerceLocations { + /** + * Current page number. + * @type {number} + * @memberof CommerceLocations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceLocations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceLocations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceLocations + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceLocations + */ + results?: Array; +} + +/** + * Check if a given object implements the CommerceLocations interface. + */ +export function instanceOfCommerceLocations(value: object): value is CommerceLocations { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommerceLocationsFromJSON(json: any): CommerceLocations { + return CommerceLocationsFromJSONTyped(json, false); +} + +export function CommerceLocationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceLocations { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommerceLocationFromJSON)), + }; +} + +export function CommerceLocationsToJSON(json: any): CommerceLocations { + return CommerceLocationsToJSONTyped(json, false); +} + +export function CommerceLocationsToJSONTyped(value?: CommerceLocations | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommerceLocationToJSON)), + }; +} + + +export interface CommerceLocationsListResponseCommerceLocations { + /** + * Current page number. + * @type {number} + * @memberof CommerceLocations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceLocations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceLocations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceLocations + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceLocations + */ + results?: Array; +} + +export interface ListCommerceLocationsResponseCommerceLocations { + /** + * Current page number. + * @type {number} + * @memberof CommerceLocations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceLocations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceLocations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceLocations + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceLocations + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/commerceorder.ts b/lending/src/sdk/models/shared/commerceorder.ts index 61158014e..0474af381 100644 --- a/lending/src/sdk/models/shared/commerceorder.ts +++ b/lending/src/sdk/models/shared/commerceorder.ts @@ -1,170 +1,1164 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { CommerceCustomerRef } from './commercecustomerref'; +import { + CommerceCustomerRefFromJSON, + CommerceCustomerRefFromJSONTyped, + CommerceCustomerRefToJSON, + CommerceCustomerRefToJSONTyped, +} from './commercecustomerref'; +import type { ServiceCharge } from './servicecharge'; import { - CommerceCustomerRef, - CommerceCustomerRef$inboundSchema, -} from "./commercecustomerref.js"; -import { LocationRef, LocationRef$inboundSchema } from "./locationref.js"; -import { OrderLineItem, OrderLineItem$inboundSchema } from "./orderlineitem.js"; -import { PaymentRef, PaymentRef$inboundSchema } from "./paymentref.js"; -import { ServiceCharge, ServiceCharge$inboundSchema } from "./servicecharge.js"; + ServiceChargeFromJSON, + ServiceChargeFromJSONTyped, + ServiceChargeToJSON, + ServiceChargeToJSONTyped, +} from './servicecharge'; +import type { SupplementalData } from './supplementaldata'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { OrderLineItem } from './orderlineitem'; +import { + OrderLineItemFromJSON, + OrderLineItemFromJSONTyped, + OrderLineItemToJSON, + OrderLineItemToJSONTyped, +} from './orderlineitem'; +import type { PaymentRef } from './paymentref'; +import { + PaymentRefFromJSON, + PaymentRefFromJSONTyped, + PaymentRefToJSON, + PaymentRefToJSONTyped, +} from './paymentref'; +import type { LocationRef } from './locationref'; +import { + LocationRefFromJSON, + LocationRefFromJSONTyped, + LocationRefToJSON, + LocationRefToJSONTyped, +} from './locationref'; /** * Orders contain the transaction details for all products sold by the company, and include details of any payments, service charges, or refunds related to each order. You can use data from the Orders endpoints to calculate key metrics, such as gross sales values and monthly recurring revenue (MRR). - * - * @remarks + * + * @export + * @interface CommerceOrder */ -export type CommerceOrder = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Friendly reference for the order in the commerce or point of sale platform. - */ - orderNumber?: string | undefined; - /** - * The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part. - * - * @remarks - * - * Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model. - * - * For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. - */ - country?: string | undefined; - currency?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - closedDate?: string | undefined; - /** - * Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. - */ - totalAmount?: Decimal$ | number | undefined; - /** - * Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. - */ - totalRefund?: Decimal$ | number | undefined; - /** - * Total amount of tax applied to the order. - */ - totalTaxAmount?: Decimal$ | number | undefined; - /** - * Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). - */ - totalDiscount?: Decimal$ | number | undefined; - /** - * Extra amount added to the order. - */ - totalGratuity?: Decimal$ | number | undefined; - orderLineItems?: Array | undefined; - payments?: Array | undefined; - serviceCharges?: Array | undefined; - /** - * Reference to the geographic location where the order was placed. - */ - locationRef?: LocationRef | undefined; - /** - * Reference to the customer that placed the order. - */ - customerRef?: CommerceCustomerRef | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; -}; +export interface CommerceOrder { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + createdDate?: string; + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceOrder + */ + id: string; + /** + * Friendly reference for the order in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceOrder + */ + orderNumber?: string; + /** + * The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part. + * + * Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model. + * + * For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. + * @type {string} + * @memberof CommerceOrder + */ + country?: string; + /** + * Currency in which the order was placed. + * @type {string} + * @memberof CommerceOrder + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + closedDate?: string; + /** + * Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. + * @type {string} + * @memberof CommerceOrder + */ + totalAmount?: Decimal | number; + /** + * Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. + * @type {string} + * @memberof CommerceOrder + */ + totalRefund?: Decimal | number; + /** + * Total amount of tax applied to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalTaxAmount?: Decimal | number; + /** + * Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). + * @type {string} + * @memberof CommerceOrder + */ + totalDiscount?: Decimal | number; + /** + * Extra amount added to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalGratuity?: Decimal | number; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + orderLineItems?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + payments?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + serviceCharges?: Array; + /** + * + * @type {LocationRef} + * @memberof CommerceOrder + */ + locationRef?: LocationRef; + /** + * + * @type {CommerceCustomerRef} + * @memberof CommerceOrder + */ + customerRef?: CommerceCustomerRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceOrder + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + sourceModifiedDate?: string; +} + +/** + * Check if a given object implements the CommerceOrder interface. + */ +export function instanceOfCommerceOrder(value: object): value is CommerceOrder { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommerceOrderFromJSON(json: any): CommerceOrder { + return CommerceOrderFromJSONTyped(json, false); +} -/** @internal */ -export const CommerceOrder$inboundSchema: z.ZodType< - CommerceOrder, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - orderNumber: z.string().optional(), - country: z.string().optional(), - currency: z.string().optional(), - closedDate: z.string().optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - totalRefund: z.number().transform(v => new Decimal$(v)).optional(), - totalTaxAmount: z.number().transform(v => new Decimal$(v)).optional(), - totalDiscount: z.number().transform(v => new Decimal$(v)).optional(), - totalGratuity: z.number().transform(v => new Decimal$(v)).optional(), - orderLineItems: z.array(OrderLineItem$inboundSchema).optional(), - payments: z.array(z.nullable(PaymentRef$inboundSchema)).optional(), - serviceCharges: z.array(ServiceCharge$inboundSchema).optional(), - locationRef: LocationRef$inboundSchema.optional(), - customerRef: CommerceCustomerRef$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - createdDate: z.string().optional(), -}); +export function CommerceOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceOrder { + if (json == null) { + return json; + } + return { + + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'id': json['id'], + 'orderNumber': json['orderNumber'] == null ? undefined : json['orderNumber'], + 'country': json['country'] == null ? undefined : json['country'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'closedDate': json['closedDate'] == null ? undefined : json['closedDate'], + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'totalRefund': json['totalRefund'] == null ? undefined : toDecimal(json['totalRefund']), + 'totalTaxAmount': json['totalTaxAmount'] == null ? undefined : toDecimal(json['totalTaxAmount']), + 'totalDiscount': json['totalDiscount'] == null ? undefined : toDecimal(json['totalDiscount']), + 'totalGratuity': json['totalGratuity'] == null ? undefined : toDecimal(json['totalGratuity']), + 'orderLineItems': json['orderLineItems'] == null ? undefined : ((json['orderLineItems'] as Array).map(OrderLineItemFromJSON)), + 'payments': json['payments'] == null ? undefined : ((json['payments'] as Array).map(PaymentRefFromJSON)), + 'serviceCharges': json['serviceCharges'] == null ? undefined : ((json['serviceCharges'] as Array).map(ServiceChargeFromJSON)), + 'locationRef': json['locationRef'] == null ? undefined : LocationRefFromJSON(json['locationRef']), + 'customerRef': json['customerRef'] == null ? undefined : CommerceCustomerRefFromJSON(json['customerRef']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function CommerceOrderToJSON(json: any): CommerceOrder { + return CommerceOrderToJSONTyped(json, false); +} + +export function CommerceOrderToJSONTyped(value?: CommerceOrder | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'createdDate': value['createdDate'], + 'id': value['id'], + 'orderNumber': value['orderNumber'], + 'country': value['country'], + 'currency': value['currency'], + 'closedDate': value['closedDate'], + 'totalAmount': fromDecimal(value['totalAmount']), + 'totalRefund': fromDecimal(value['totalRefund']), + 'totalTaxAmount': fromDecimal(value['totalTaxAmount']), + 'totalDiscount': fromDecimal(value['totalDiscount']), + 'totalGratuity': fromDecimal(value['totalGratuity']), + 'orderLineItems': value['orderLineItems'] == null ? undefined : ((value['orderLineItems'] as Array).map(OrderLineItemToJSON)), + 'payments': value['payments'] == null ? undefined : ((value['payments'] as Array).map(PaymentRefToJSON)), + 'serviceCharges': value['serviceCharges'] == null ? undefined : ((value['serviceCharges'] as Array).map(ServiceChargeToJSON)), + 'locationRef': LocationRefToJSON(value['locationRef']), + 'customerRef': CommerceCustomerRefToJSON(value['customerRef']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + + +export interface CommerceOrderGetResponseCommerceOrder { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + createdDate?: string; + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceOrder + */ + id: string; + /** + * Friendly reference for the order in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceOrder + */ + orderNumber?: string; + /** + * The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part. + * + * Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model. + * + * For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. + * @type {string} + * @memberof CommerceOrder + */ + country?: string; + /** + * Currency in which the order was placed. + * @type {string} + * @memberof CommerceOrder + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + closedDate?: string; + /** + * Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. + * @type {string} + * @memberof CommerceOrder + */ + totalAmount?: Decimal | number; + /** + * Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. + * @type {string} + * @memberof CommerceOrder + */ + totalRefund?: Decimal | number; + /** + * Total amount of tax applied to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalTaxAmount?: Decimal | number; + /** + * Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). + * @type {string} + * @memberof CommerceOrder + */ + totalDiscount?: Decimal | number; + /** + * Extra amount added to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalGratuity?: Decimal | number; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + orderLineItems?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + payments?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + serviceCharges?: Array; + /** + * + * @type {LocationRef} + * @memberof CommerceOrder + */ + locationRef?: LocationRef; + /** + * + * @type {CommerceCustomerRef} + * @memberof CommerceOrder + */ + customerRef?: CommerceCustomerRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceOrder + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + sourceModifiedDate?: string; +} + +export interface CommerceOrdersCommerceOrder { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + createdDate?: string; + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceOrder + */ + id: string; + /** + * Friendly reference for the order in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceOrder + */ + orderNumber?: string; + /** + * The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part. + * + * Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model. + * + * For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. + * @type {string} + * @memberof CommerceOrder + */ + country?: string; + /** + * Currency in which the order was placed. + * @type {string} + * @memberof CommerceOrder + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + closedDate?: string; + /** + * Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. + * @type {string} + * @memberof CommerceOrder + */ + totalAmount?: Decimal | number; + /** + * Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. + * @type {string} + * @memberof CommerceOrder + */ + totalRefund?: Decimal | number; + /** + * Total amount of tax applied to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalTaxAmount?: Decimal | number; + /** + * Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). + * @type {string} + * @memberof CommerceOrder + */ + totalDiscount?: Decimal | number; + /** + * Extra amount added to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalGratuity?: Decimal | number; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + orderLineItems?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + payments?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + serviceCharges?: Array; + /** + * + * @type {LocationRef} + * @memberof CommerceOrder + */ + locationRef?: LocationRef; + /** + * + * @type {CommerceCustomerRef} + * @memberof CommerceOrder + */ + customerRef?: CommerceCustomerRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceOrder + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + sourceModifiedDate?: string; +} + +export interface CommerceOrdersListResponseCommerceOrder { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + createdDate?: string; + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceOrder + */ + id: string; + /** + * Friendly reference for the order in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceOrder + */ + orderNumber?: string; + /** + * The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part. + * + * Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model. + * + * For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. + * @type {string} + * @memberof CommerceOrder + */ + country?: string; + /** + * Currency in which the order was placed. + * @type {string} + * @memberof CommerceOrder + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + closedDate?: string; + /** + * Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. + * @type {string} + * @memberof CommerceOrder + */ + totalAmount?: Decimal | number; + /** + * Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. + * @type {string} + * @memberof CommerceOrder + */ + totalRefund?: Decimal | number; + /** + * Total amount of tax applied to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalTaxAmount?: Decimal | number; + /** + * Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). + * @type {string} + * @memberof CommerceOrder + */ + totalDiscount?: Decimal | number; + /** + * Extra amount added to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalGratuity?: Decimal | number; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + orderLineItems?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + payments?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + serviceCharges?: Array; + /** + * + * @type {LocationRef} + * @memberof CommerceOrder + */ + locationRef?: LocationRef; + /** + * + * @type {CommerceCustomerRef} + * @memberof CommerceOrder + */ + customerRef?: CommerceCustomerRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceOrder + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + sourceModifiedDate?: string; +} + +export interface GetCommerceOrderResponseCommerceOrder { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + createdDate?: string; + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceOrder + */ + id: string; + /** + * Friendly reference for the order in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceOrder + */ + orderNumber?: string; + /** + * The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part. + * + * Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model. + * + * For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. + * @type {string} + * @memberof CommerceOrder + */ + country?: string; + /** + * Currency in which the order was placed. + * @type {string} + * @memberof CommerceOrder + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + closedDate?: string; + /** + * Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. + * @type {string} + * @memberof CommerceOrder + */ + totalAmount?: Decimal | number; + /** + * Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. + * @type {string} + * @memberof CommerceOrder + */ + totalRefund?: Decimal | number; + /** + * Total amount of tax applied to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalTaxAmount?: Decimal | number; + /** + * Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). + * @type {string} + * @memberof CommerceOrder + */ + totalDiscount?: Decimal | number; + /** + * Extra amount added to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalGratuity?: Decimal | number; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + orderLineItems?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + payments?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + serviceCharges?: Array; + /** + * + * @type {LocationRef} + * @memberof CommerceOrder + */ + locationRef?: LocationRef; + /** + * + * @type {CommerceCustomerRef} + * @memberof CommerceOrder + */ + customerRef?: CommerceCustomerRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceOrder + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + sourceModifiedDate?: string; +} -export function commerceOrderFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceOrder$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceOrder' from JSON`, - ); +export interface ListCommerceOrdersResponseCommerceOrder { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + createdDate?: string; + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceOrder + */ + id: string; + /** + * Friendly reference for the order in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceOrder + */ + orderNumber?: string; + /** + * The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part. + * + * Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model. + * + * For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/lending-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint. + * @type {string} + * @memberof CommerceOrder + */ + country?: string; + /** + * Currency in which the order was placed. + * @type {string} + * @memberof CommerceOrder + */ + currency?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceOrder + */ + closedDate?: string; + /** + * Total amount of the order, including discounts, refunds, and tax, but excluding gratuities. + * @type {string} + * @memberof CommerceOrder + */ + totalAmount?: Decimal | number; + /** + * Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative. + * @type {string} + * @memberof CommerceOrder + */ + totalRefund?: Decimal | number; + /** + * Total amount of tax applied to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalTaxAmount?: Decimal | number; + /** + * Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order). + * @type {string} + * @memberof CommerceOrder + */ + totalDiscount?: Decimal | number; + /** + * Extra amount added to the order. + * @type {string} + * @memberof CommerceOrder + */ + totalGratuity?: Decimal | number; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + orderLineItems?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + payments?: Array; + /** + * + * @type {Array} + * @memberof CommerceOrder + */ + serviceCharges?: Array; + /** + * + * @type {LocationRef} + * @memberof CommerceOrder + */ + locationRef?: LocationRef; + /** + * + * @type {CommerceCustomerRef} + * @memberof CommerceOrder + */ + customerRef?: CommerceCustomerRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceOrder + */ + supplementalData?: SupplementalData; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceOrder + */ + sourceModifiedDate?: string; } diff --git a/lending/src/sdk/models/shared/commerceorders.ts b/lending/src/sdk/models/shared/commerceorders.ts index e5f0a5929..1a587eafb 100644 --- a/lending/src/sdk/models/shared/commerceorders.ts +++ b/lending/src/sdk/models/shared/commerceorders.ts @@ -1,55 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { CommerceOrder, CommerceOrder$inboundSchema } from "./commerceorder.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommerceOrders = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommerceOrders$inboundSchema: z.ZodType< - CommerceOrders, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(CommerceOrder$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commerceOrdersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceOrders$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceOrders' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { CommerceOrder } from './commerceorder'; +import { + CommerceOrderFromJSON, + CommerceOrderFromJSONTyped, + CommerceOrderToJSON, + CommerceOrderToJSONTyped, +} from './commerceorder'; + +/** + * + * @export + * @interface CommerceOrders + */ +export interface CommerceOrders { + /** + * Current page number. + * @type {number} + * @memberof CommerceOrders + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceOrders + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceOrders + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceOrders + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceOrders + */ + results?: Array; +} + +/** + * Check if a given object implements the CommerceOrders interface. + */ +export function instanceOfCommerceOrders(value: object): value is CommerceOrders { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommerceOrdersFromJSON(json: any): CommerceOrders { + return CommerceOrdersFromJSONTyped(json, false); +} + +export function CommerceOrdersFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceOrders { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommerceOrderFromJSON)), + }; +} + +export function CommerceOrdersToJSON(json: any): CommerceOrders { + return CommerceOrdersToJSONTyped(json, false); +} + +export function CommerceOrdersToJSONTyped(value?: CommerceOrders | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommerceOrderToJSON)), + }; +} + + +export interface CommerceOrdersListResponseCommerceOrders { + /** + * Current page number. + * @type {number} + * @memberof CommerceOrders + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceOrders + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceOrders + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceOrders + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceOrders + */ + results?: Array; +} + +export interface ListCommerceOrdersResponseCommerceOrders { + /** + * Current page number. + * @type {number} + * @memberof CommerceOrders + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceOrders + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceOrders + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceOrders + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceOrders + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/commercepayment.ts b/lending/src/sdk/models/shared/commercepayment.ts index b039b8c4e..0d48adba2 100644 --- a/lending/src/sdk/models/shared/commercepayment.ts +++ b/lending/src/sdk/models/shared/commercepayment.ts @@ -1,145 +1,856 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { SupplementalData } from './supplementaldata'; import { - PaymentMethodRef, - PaymentMethodRef$inboundSchema, -} from "./paymentmethodref.js"; -import { PaymentStatus, PaymentStatus$inboundSchema } from "./paymentstatus.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { PaymentMethodRef } from './paymentmethodref'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + PaymentMethodRefFromJSON, + PaymentMethodRefFromJSONTyped, + PaymentMethodRefToJSON, + PaymentMethodRefToJSONTyped, +} from './paymentmethodref'; +import type { PaymentStatus } from './paymentstatus'; +import { + PaymentStatusFromJSON, + PaymentStatusFromJSONTyped, + PaymentStatusToJSON, + PaymentStatusToJSONTyped, +} from './paymentstatus'; /** * Payments contain details of all payments made by customers to a company, including: amounts, currency used, payment method, payment provider, and payment status. - * - * @remarks - * + * * Refunds are recorded as separate, negative payments. Note that a refund can only occur in relation to a payment that has been completed (i.e. has a status of `Paid`). When a customer cancels an order _before_ a payment has been completed, the payment shows as `Cancelled`. - * + * * You can use data from the Payments endpoints to calculate key metrics, such as gross sales and monthly recurring revenue (MRR). + * @export + * @interface CommercePayment */ -export type CommercePayment = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Payment Amount (including gratuity) - */ - amount?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * The payment method the record is linked to in the accounting or commerce software. - */ - paymentMethodRef?: PaymentMethodRef | undefined; - /** - * Status of the payment. - */ - status?: PaymentStatus | undefined; - /** - * Service provider of the payment, if applicable. - */ - paymentProvider?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - dueDate?: string | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; -}; - -/** @internal */ -export const CommercePayment$inboundSchema: z.ZodType< - CommercePayment, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), - paymentMethodRef: PaymentMethodRef$inboundSchema.optional(), - status: PaymentStatus$inboundSchema.optional(), - paymentProvider: z.string().optional(), - dueDate: z.string().optional(), - supplementalData: SupplementalData$inboundSchema.optional(), - createdDate: z.string().optional(), -}); - -export function commercePaymentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommercePayment$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommercePayment' from JSON`, - ); +export interface CommercePayment { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePayment + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity) + * @type {string} + * @memberof CommercePayment + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommercePayment + */ + currency?: string; + /** + * + * @type {PaymentMethodRef} + * @memberof CommercePayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * + * @type {PaymentStatus} + * @memberof CommercePayment + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof CommercePayment + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + dueDate?: string; + /** + * + * @type {SupplementalData} + * @memberof CommercePayment + */ + supplementalData?: SupplementalData; +} + + + +/** + * Check if a given object implements the CommercePayment interface. + */ +export function instanceOfCommercePayment(value: object): value is CommercePayment { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommercePaymentFromJSON(json: any): CommercePayment { + return CommercePaymentFromJSONTyped(json, false); +} + +export function CommercePaymentFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommercePayment { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'paymentMethodRef': json['paymentMethodRef'] == null ? undefined : PaymentMethodRefFromJSON(json['paymentMethodRef']), + 'status': json['status'] == null ? undefined : PaymentStatusFromJSON(json['status']), + 'paymentProvider': json['paymentProvider'] == null ? undefined : json['paymentProvider'], + 'dueDate': json['dueDate'] == null ? undefined : json['dueDate'], + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function CommercePaymentToJSON(json: any): CommercePayment { + return CommercePaymentToJSONTyped(json, false); +} + +export function CommercePaymentToJSONTyped(value?: CommercePayment | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'createdDate': value['createdDate'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'amount': fromDecimal(value['amount']), + 'currency': value['currency'], + 'paymentMethodRef': PaymentMethodRefToJSON(value['paymentMethodRef']), + 'status': PaymentStatusToJSON(value['status']), + 'paymentProvider': value['paymentProvider'], + 'dueDate': value['dueDate'], + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface CommercePaymentGetResponseCommercePayment { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePayment + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity) + * @type {string} + * @memberof CommercePayment + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommercePayment + */ + currency?: string; + /** + * + * @type {PaymentMethodRef} + * @memberof CommercePayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * + * @type {PaymentStatus} + * @memberof CommercePayment + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof CommercePayment + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + dueDate?: string; + /** + * + * @type {SupplementalData} + * @memberof CommercePayment + */ + supplementalData?: SupplementalData; +} + +export interface CommercePaymentsCommercePayment { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePayment + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity) + * @type {string} + * @memberof CommercePayment + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommercePayment + */ + currency?: string; + /** + * + * @type {PaymentMethodRef} + * @memberof CommercePayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * + * @type {PaymentStatus} + * @memberof CommercePayment + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof CommercePayment + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + dueDate?: string; + /** + * + * @type {SupplementalData} + * @memberof CommercePayment + */ + supplementalData?: SupplementalData; +} + +export interface CommercePaymentsListResponseCommercePayment { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePayment + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity) + * @type {string} + * @memberof CommercePayment + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommercePayment + */ + currency?: string; + /** + * + * @type {PaymentMethodRef} + * @memberof CommercePayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * + * @type {PaymentStatus} + * @memberof CommercePayment + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof CommercePayment + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + dueDate?: string; + /** + * + * @type {SupplementalData} + * @memberof CommercePayment + */ + supplementalData?: SupplementalData; +} + +export interface GetCommercePaymentResponseCommercePayment { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePayment + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity) + * @type {string} + * @memberof CommercePayment + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommercePayment + */ + currency?: string; + /** + * + * @type {PaymentMethodRef} + * @memberof CommercePayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * + * @type {PaymentStatus} + * @memberof CommercePayment + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof CommercePayment + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + dueDate?: string; + /** + * + * @type {SupplementalData} + * @memberof CommercePayment + */ + supplementalData?: SupplementalData; +} + +export interface ListCommercePaymentsResponseCommercePayment { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePayment + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePayment + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity) + * @type {string} + * @memberof CommercePayment + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommercePayment + */ + currency?: string; + /** + * + * @type {PaymentMethodRef} + * @memberof CommercePayment + */ + paymentMethodRef?: PaymentMethodRef; + /** + * + * @type {PaymentStatus} + * @memberof CommercePayment + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof CommercePayment + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommercePayment + */ + dueDate?: string; + /** + * + * @type {SupplementalData} + * @memberof CommercePayment + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/commercepaymentmethod.ts b/lending/src/sdk/models/shared/commercepaymentmethod.ts index 5a5c76009..2f61ee30d 100644 --- a/lending/src/sdk/models/shared/commercepaymentmethod.ts +++ b/lending/src/sdk/models/shared/commercepaymentmethod.ts @@ -1,72 +1,360 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { CommercePaymentMethodStatus } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * Status of the Payment Method. + * A Payment Method represents the payment method(s) used to make payments. + * @export + * @interface CommercePaymentMethod */ -export const CommercePaymentMethodStatus = { - Unknown: "Unknown", - Active: "Active", - Archived: "Archived", -} as const; +export interface CommercePaymentMethod { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePaymentMethod + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + sourceModifiedDate?: string; + /** + * The name of the PaymentMethod + * @type {string} + * @memberof CommercePaymentMethod + */ + name?: string; + /** + * Status of the Payment Method. + * @type {string} + * @memberof CommercePaymentMethod + */ + status?: CommercePaymentMethodStatus; +} + + /** - * Status of the Payment Method. + * @export */ -export type CommercePaymentMethodStatus = ClosedEnum< - typeof CommercePaymentMethodStatus ->; +export const CommercePaymentMethodStatusEnum = { + Unknown: 'Unknown', + Active: 'Active', + Archived: 'Archived' +} as const; +export type CommercePaymentMethodStatusEnum = typeof CommercePaymentMethodStatusEnum[keyof typeof CommercePaymentMethodStatusEnum]; + /** - * A Payment Method represents the payment method(s) used to make payments. + * Check if a given object implements the CommercePaymentMethod interface. */ -export type CommercePaymentMethod = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * The name of the PaymentMethod - */ - name?: string | undefined; - /** - * Status of the Payment Method. - */ - status?: CommercePaymentMethodStatus | undefined; -}; - -/** @internal */ -export const CommercePaymentMethodStatus$inboundSchema: z.ZodNativeEnum< - typeof CommercePaymentMethodStatus -> = z.nativeEnum(CommercePaymentMethodStatus); - -/** @internal */ -export const CommercePaymentMethod$inboundSchema: z.ZodType< - CommercePaymentMethod, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - name: z.string().optional(), - status: CommercePaymentMethodStatus$inboundSchema.optional(), -}); - -export function commercePaymentMethodFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommercePaymentMethod$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommercePaymentMethod' from JSON`, - ); +export function instanceOfCommercePaymentMethod(value: object): value is CommercePaymentMethod { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommercePaymentMethodFromJSON(json: any): CommercePaymentMethod { + return CommercePaymentMethodFromJSONTyped(json, false); +} + +export function CommercePaymentMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommercePaymentMethod { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'name': json['name'] == null ? undefined : json['name'], + 'status': json['status'] == null ? undefined : json['status'], + }; +} + +export function CommercePaymentMethodToJSON(json: any): CommercePaymentMethod { + return CommercePaymentMethodToJSONTyped(json, false); +} + +export function CommercePaymentMethodToJSONTyped(value?: CommercePaymentMethod | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'name': value['name'], + 'status': value['status'], + }; +} + + +export interface CommercePaymentMethodGetResponseCommercePaymentMethod { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePaymentMethod + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + sourceModifiedDate?: string; + /** + * The name of the PaymentMethod + * @type {string} + * @memberof CommercePaymentMethod + */ + name?: string; + /** + * Status of the Payment Method. + * @type {string} + * @memberof CommercePaymentMethod + */ + status?: CommercePaymentMethodStatus; +} + +export interface CommercePaymentMethodsCommercePaymentMethod { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePaymentMethod + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + sourceModifiedDate?: string; + /** + * The name of the PaymentMethod + * @type {string} + * @memberof CommercePaymentMethod + */ + name?: string; + /** + * Status of the Payment Method. + * @type {string} + * @memberof CommercePaymentMethod + */ + status?: CommercePaymentMethodStatus; +} + +export interface CommercePaymentMethodsListResponseCommercePaymentMethod { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePaymentMethod + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + sourceModifiedDate?: string; + /** + * The name of the PaymentMethod + * @type {string} + * @memberof CommercePaymentMethod + */ + name?: string; + /** + * Status of the Payment Method. + * @type {string} + * @memberof CommercePaymentMethod + */ + status?: CommercePaymentMethodStatus; +} + +export interface GetCommercePaymentMethodResponseCommercePaymentMethod { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePaymentMethod + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + sourceModifiedDate?: string; + /** + * The name of the PaymentMethod + * @type {string} + * @memberof CommercePaymentMethod + */ + name?: string; + /** + * Status of the Payment Method. + * @type {string} + * @memberof CommercePaymentMethod + */ + status?: CommercePaymentMethodStatus; +} + +export interface ListCommercePaymentMethodsResponseCommercePaymentMethod { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommercePaymentMethod + */ + id: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommercePaymentMethod + */ + sourceModifiedDate?: string; + /** + * The name of the PaymentMethod + * @type {string} + * @memberof CommercePaymentMethod + */ + name?: string; + /** + * Status of the Payment Method. + * @type {string} + * @memberof CommercePaymentMethod + */ + status?: CommercePaymentMethodStatus; } diff --git a/lending/src/sdk/models/shared/commercepaymentmethods.ts b/lending/src/sdk/models/shared/commercepaymentmethods.ts index 381df211d..c8f2305cd 100644 --- a/lending/src/sdk/models/shared/commercepaymentmethods.ts +++ b/lending/src/sdk/models/shared/commercepaymentmethods.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommercePaymentMethod } from './commercepaymentmethod'; import { - CommercePaymentMethod, - CommercePaymentMethod$inboundSchema, -} from "./commercepaymentmethod.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommercePaymentMethods = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommercePaymentMethods$inboundSchema: z.ZodType< - CommercePaymentMethods, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(CommercePaymentMethod$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commercePaymentMethodsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommercePaymentMethods$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommercePaymentMethods' from JSON`, - ); + CommercePaymentMethodFromJSON, + CommercePaymentMethodFromJSONTyped, + CommercePaymentMethodToJSON, + CommercePaymentMethodToJSONTyped, +} from './commercepaymentmethod'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface CommercePaymentMethods + */ +export interface CommercePaymentMethods { + /** + * Current page number. + * @type {number} + * @memberof CommercePaymentMethods + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommercePaymentMethods + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommercePaymentMethods + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommercePaymentMethods + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommercePaymentMethods + */ + results?: Array; +} + +/** + * Check if a given object implements the CommercePaymentMethods interface. + */ +export function instanceOfCommercePaymentMethods(value: object): value is CommercePaymentMethods { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommercePaymentMethodsFromJSON(json: any): CommercePaymentMethods { + return CommercePaymentMethodsFromJSONTyped(json, false); +} + +export function CommercePaymentMethodsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommercePaymentMethods { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommercePaymentMethodFromJSON)), + }; +} + +export function CommercePaymentMethodsToJSON(json: any): CommercePaymentMethods { + return CommercePaymentMethodsToJSONTyped(json, false); +} + +export function CommercePaymentMethodsToJSONTyped(value?: CommercePaymentMethods | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommercePaymentMethodToJSON)), + }; +} + + +export interface CommercePaymentMethodsListResponseCommercePaymentMethods { + /** + * Current page number. + * @type {number} + * @memberof CommercePaymentMethods + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommercePaymentMethods + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommercePaymentMethods + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommercePaymentMethods + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommercePaymentMethods + */ + results?: Array; +} + +export interface ListCommercePaymentMethodsResponseCommercePaymentMethods { + /** + * Current page number. + * @type {number} + * @memberof CommercePaymentMethods + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommercePaymentMethods + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommercePaymentMethods + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommercePaymentMethods + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommercePaymentMethods + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/commercepayments.ts b/lending/src/sdk/models/shared/commercepayments.ts index b20e588e4..5df08e7d7 100644 --- a/lending/src/sdk/models/shared/commercepayments.ts +++ b/lending/src/sdk/models/shared/commercepayments.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - CommercePayment, - CommercePayment$inboundSchema, -} from "./commercepayment.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommercePayments = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommercePayments$inboundSchema: z.ZodType< - CommercePayments, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(CommercePayment$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commercePaymentsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommercePayments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommercePayments' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { CommercePayment } from './commercepayment'; +import { + CommercePaymentFromJSON, + CommercePaymentFromJSONTyped, + CommercePaymentToJSON, + CommercePaymentToJSONTyped, +} from './commercepayment'; + +/** + * + * @export + * @interface CommercePayments + */ +export interface CommercePayments { + /** + * Current page number. + * @type {number} + * @memberof CommercePayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommercePayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommercePayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommercePayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommercePayments + */ + results?: Array; +} + +/** + * Check if a given object implements the CommercePayments interface. + */ +export function instanceOfCommercePayments(value: object): value is CommercePayments { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommercePaymentsFromJSON(json: any): CommercePayments { + return CommercePaymentsFromJSONTyped(json, false); +} + +export function CommercePaymentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommercePayments { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommercePaymentFromJSON)), + }; +} + +export function CommercePaymentsToJSON(json: any): CommercePayments { + return CommercePaymentsToJSONTyped(json, false); +} + +export function CommercePaymentsToJSONTyped(value?: CommercePayments | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommercePaymentToJSON)), + }; +} + + +export interface CommercePaymentsListResponseCommercePayments { + /** + * Current page number. + * @type {number} + * @memberof CommercePayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommercePayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommercePayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommercePayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommercePayments + */ + results?: Array; +} + +export interface ListCommercePaymentsResponseCommercePayments { + /** + * Current page number. + * @type {number} + * @memberof CommercePayments + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommercePayments + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommercePayments + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommercePayments + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommercePayments + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/commerceproduct.ts b/lending/src/sdk/models/shared/commerceproduct.ts index c2ef64f48..b76f09393 100644 --- a/lending/src/sdk/models/shared/commerceproduct.ts +++ b/lending/src/sdk/models/shared/commerceproduct.ts @@ -1,81 +1,367 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { SupplementalData } from './supplementaldata'; import { - ProductVariant, - ProductVariant$inboundSchema, -} from "./productvariant.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { ProductVariant } from './productvariant'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + ProductVariantFromJSON, + ProductVariantFromJSONTyped, + ProductVariantToJSON, + ProductVariantToJSONTyped, +} from './productvariant'; /** * A Product is an item in the company's inventory, and includes information about the price and quantity of all products, and variants thereof, available for sale. - * - * @remarks + * + * @export + * @interface CommerceProduct */ -export type CommerceProduct = { - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Name of the product in the commerce or POS system - */ - name?: string | undefined; - /** - * Description of the product recorded in the commerce or point of sale platform. - */ - description?: string | undefined; - /** - * Retail category that the product is assigned to e.g. `Hardware`. - */ - categorization?: string | undefined; - /** - * Whether the product represents a gift card or voucher that - * - * @remarks - * can be redeemed in the commerce or POS platform. - */ - isGiftCard?: boolean | undefined; - variants?: Array | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; +export interface CommerceProduct { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceProduct + */ + id: string; + /** + * Name of the product in the commerce or POS system + * @type {string} + * @memberof CommerceProduct + */ + name?: string; + /** + * Description of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceProduct + */ + description?: string; + /** + * Retail category that the product is assigned to e.g. `Hardware`. + * @type {string} + * @memberof CommerceProduct + */ + categorization?: string; + /** + * Whether the product represents a gift card or voucher that + * can be redeemed in the commerce or POS platform. + * + * @type {boolean} + * @memberof CommerceProduct + */ + isGiftCard?: boolean; + /** + * + * @type {Array} + * @memberof CommerceProduct + */ + variants?: Array; + /** + * + * @type {SupplementalData} + * @memberof CommerceProduct + */ + supplementalData?: SupplementalData; +} + +/** + * Check if a given object implements the CommerceProduct interface. + */ +export function instanceOfCommerceProduct(value: object): value is CommerceProduct { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommerceProductFromJSON(json: any): CommerceProduct { + return CommerceProductFromJSONTyped(json, false); +} + +export function CommerceProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceProduct { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'categorization': json['categorization'] == null ? undefined : json['categorization'], + 'isGiftCard': json['isGiftCard'] == null ? undefined : json['isGiftCard'], + 'variants': json['variants'] == null ? undefined : ((json['variants'] as Array).map(ProductVariantFromJSON)), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} -/** @internal */ -export const CommerceProduct$inboundSchema: z.ZodType< - CommerceProduct, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.string().optional(), - description: z.string().optional(), - categorization: z.string().optional(), - isGiftCard: z.boolean().optional(), - variants: z.array(z.nullable(ProductVariant$inboundSchema)).optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); +export function CommerceProductToJSON(json: any): CommerceProduct { + return CommerceProductToJSONTyped(json, false); +} + +export function CommerceProductToJSONTyped(value?: CommerceProduct | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'description': value['description'], + 'categorization': value['categorization'], + 'isGiftCard': value['isGiftCard'], + 'variants': value['variants'] == null ? undefined : ((value['variants'] as Array).map(ProductVariantToJSON)), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface CommerceProductGetResponseCommerceProduct { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceProduct + */ + id: string; + /** + * Name of the product in the commerce or POS system + * @type {string} + * @memberof CommerceProduct + */ + name?: string; + /** + * Description of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceProduct + */ + description?: string; + /** + * Retail category that the product is assigned to e.g. `Hardware`. + * @type {string} + * @memberof CommerceProduct + */ + categorization?: string; + /** + * Whether the product represents a gift card or voucher that + * can be redeemed in the commerce or POS platform. + * + * @type {boolean} + * @memberof CommerceProduct + */ + isGiftCard?: boolean; + /** + * + * @type {Array} + * @memberof CommerceProduct + */ + variants?: Array; + /** + * + * @type {SupplementalData} + * @memberof CommerceProduct + */ + supplementalData?: SupplementalData; +} + +export interface CommerceProductsCommerceProduct { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceProduct + */ + id: string; + /** + * Name of the product in the commerce or POS system + * @type {string} + * @memberof CommerceProduct + */ + name?: string; + /** + * Description of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceProduct + */ + description?: string; + /** + * Retail category that the product is assigned to e.g. `Hardware`. + * @type {string} + * @memberof CommerceProduct + */ + categorization?: string; + /** + * Whether the product represents a gift card or voucher that + * can be redeemed in the commerce or POS platform. + * + * @type {boolean} + * @memberof CommerceProduct + */ + isGiftCard?: boolean; + /** + * + * @type {Array} + * @memberof CommerceProduct + */ + variants?: Array; + /** + * + * @type {SupplementalData} + * @memberof CommerceProduct + */ + supplementalData?: SupplementalData; +} + +export interface CommerceProductsListResponseCommerceProduct { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceProduct + */ + id: string; + /** + * Name of the product in the commerce or POS system + * @type {string} + * @memberof CommerceProduct + */ + name?: string; + /** + * Description of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceProduct + */ + description?: string; + /** + * Retail category that the product is assigned to e.g. `Hardware`. + * @type {string} + * @memberof CommerceProduct + */ + categorization?: string; + /** + * Whether the product represents a gift card or voucher that + * can be redeemed in the commerce or POS platform. + * + * @type {boolean} + * @memberof CommerceProduct + */ + isGiftCard?: boolean; + /** + * + * @type {Array} + * @memberof CommerceProduct + */ + variants?: Array; + /** + * + * @type {SupplementalData} + * @memberof CommerceProduct + */ + supplementalData?: SupplementalData; +} + +export interface GetCommerceProductResponseCommerceProduct { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceProduct + */ + id: string; + /** + * Name of the product in the commerce or POS system + * @type {string} + * @memberof CommerceProduct + */ + name?: string; + /** + * Description of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceProduct + */ + description?: string; + /** + * Retail category that the product is assigned to e.g. `Hardware`. + * @type {string} + * @memberof CommerceProduct + */ + categorization?: string; + /** + * Whether the product represents a gift card or voucher that + * can be redeemed in the commerce or POS platform. + * + * @type {boolean} + * @memberof CommerceProduct + */ + isGiftCard?: boolean; + /** + * + * @type {Array} + * @memberof CommerceProduct + */ + variants?: Array; + /** + * + * @type {SupplementalData} + * @memberof CommerceProduct + */ + supplementalData?: SupplementalData; +} -export function commerceProductFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceProduct$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceProduct' from JSON`, - ); +export interface ListCommerceProductsResponseCommerceProduct { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceProduct + */ + id: string; + /** + * Name of the product in the commerce or POS system + * @type {string} + * @memberof CommerceProduct + */ + name?: string; + /** + * Description of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof CommerceProduct + */ + description?: string; + /** + * Retail category that the product is assigned to e.g. `Hardware`. + * @type {string} + * @memberof CommerceProduct + */ + categorization?: string; + /** + * Whether the product represents a gift card or voucher that + * can be redeemed in the commerce or POS platform. + * + * @type {boolean} + * @memberof CommerceProduct + */ + isGiftCard?: boolean; + /** + * + * @type {Array} + * @memberof CommerceProduct + */ + variants?: Array; + /** + * + * @type {SupplementalData} + * @memberof CommerceProduct + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/commerceproductcategories.ts b/lending/src/sdk/models/shared/commerceproductcategories.ts index 7d83f6e68..519896713 100644 --- a/lending/src/sdk/models/shared/commerceproductcategories.ts +++ b/lending/src/sdk/models/shared/commerceproductcategories.ts @@ -1,59 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceProductCategory } from './commerceproductcategory'; import { - CommerceProductCategory, - CommerceProductCategory$inboundSchema, -} from "./commerceproductcategory.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommerceProductCategories = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommerceProductCategories$inboundSchema: z.ZodType< - CommerceProductCategories, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(CommerceProductCategory$inboundSchema)) - .optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commerceProductCategoriesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceProductCategories$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceProductCategories' from JSON`, - ); + CommerceProductCategoryFromJSON, + CommerceProductCategoryFromJSONTyped, + CommerceProductCategoryToJSON, + CommerceProductCategoryToJSONTyped, +} from './commerceproductcategory'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface CommerceProductCategories + */ +export interface CommerceProductCategories { + /** + * Current page number. + * @type {number} + * @memberof CommerceProductCategories + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceProductCategories + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceProductCategories + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceProductCategories + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceProductCategories + */ + results?: Array; +} + +/** + * Check if a given object implements the CommerceProductCategories interface. + */ +export function instanceOfCommerceProductCategories(value: object): value is CommerceProductCategories { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommerceProductCategoriesFromJSON(json: any): CommerceProductCategories { + return CommerceProductCategoriesFromJSONTyped(json, false); +} + +export function CommerceProductCategoriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceProductCategories { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommerceProductCategoryFromJSON)), + }; +} + +export function CommerceProductCategoriesToJSON(json: any): CommerceProductCategories { + return CommerceProductCategoriesToJSONTyped(json, false); +} + +export function CommerceProductCategoriesToJSONTyped(value?: CommerceProductCategories | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommerceProductCategoryToJSON)), + }; +} + + +export interface CommerceProductCategoriesListResponseCommerceProductCategories { + /** + * Current page number. + * @type {number} + * @memberof CommerceProductCategories + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceProductCategories + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceProductCategories + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceProductCategories + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceProductCategories + */ + results?: Array; +} + +export interface ListCommerceProductCategoriesResponseCommerceProductCategories { + /** + * Current page number. + * @type {number} + * @memberof CommerceProductCategories + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceProductCategories + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceProductCategories + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceProductCategories + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceProductCategories + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/commerceproductcategory.ts b/lending/src/sdk/models/shared/commerceproductcategory.ts index 42dba0852..99fd05f12 100644 --- a/lending/src/sdk/models/shared/commerceproductcategory.ts +++ b/lending/src/sdk/models/shared/commerceproductcategory.ts @@ -1,60 +1,392 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceRecordRef } from './commercerecordref'; import { - CommerceRecordRef, - CommerceRecordRef$inboundSchema, -} from "./commercerecordref.js"; + CommerceRecordRefFromJSON, + CommerceRecordRefFromJSONTyped, + CommerceRecordRefToJSON, + CommerceRecordRefToJSONTyped, +} from './commercerecordref'; /** * Product categories are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. + * @export + * @interface CommerceProductCategory */ -export type CommerceProductCategory = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * The unique identifier of the product category - */ - id?: string | undefined; - /** - * The name of the product category - */ - name?: string | undefined; - /** - * A collection of parent product categories implicitly ordered with the immediate parent last in the list. - */ - ancestorRefs?: Array | undefined; - /** - * A boolean indicating whether there are other product categories beneath this one in the hierarchy. - */ - hasChildren?: boolean | undefined; -}; - -/** @internal */ -export const CommerceProductCategory$inboundSchema: z.ZodType< - CommerceProductCategory, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - name: z.string().optional(), - ancestorRefs: z.array(CommerceRecordRef$inboundSchema).optional(), - hasChildren: z.boolean().optional(), -}); - -export function commerceProductCategoryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceProductCategory$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceProductCategory' from JSON`, - ); +export interface CommerceProductCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + id?: string; + /** + * The name of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + name?: string; + /** + * A collection of parent product categories implicitly ordered with the immediate parent last in the list. + * @type {Array} + * @memberof CommerceProductCategory + */ + ancestorRefs?: Array; + /** + * A boolean indicating whether there are other product categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof CommerceProductCategory + */ + hasChildren?: boolean; +} + +/** + * Check if a given object implements the CommerceProductCategory interface. + */ +export function instanceOfCommerceProductCategory(value: object): value is CommerceProductCategory { + return true; +} + +export function CommerceProductCategoryFromJSON(json: any): CommerceProductCategory { + return CommerceProductCategoryFromJSONTyped(json, false); +} + +export function CommerceProductCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceProductCategory { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'ancestorRefs': json['ancestorRefs'] == null ? undefined : ((json['ancestorRefs'] as Array).map(CommerceRecordRefFromJSON)), + 'hasChildren': json['hasChildren'] == null ? undefined : json['hasChildren'], + }; +} + +export function CommerceProductCategoryToJSON(json: any): CommerceProductCategory { + return CommerceProductCategoryToJSONTyped(json, false); +} + +export function CommerceProductCategoryToJSONTyped(value?: CommerceProductCategory | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'name': value['name'], + 'ancestorRefs': value['ancestorRefs'] == null ? undefined : ((value['ancestorRefs'] as Array).map(CommerceRecordRefToJSON)), + 'hasChildren': value['hasChildren'], + }; +} + + +export interface CommerceProductCategoriesCommerceProductCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + id?: string; + /** + * The name of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + name?: string; + /** + * A collection of parent product categories implicitly ordered with the immediate parent last in the list. + * @type {Array} + * @memberof CommerceProductCategory + */ + ancestorRefs?: Array; + /** + * A boolean indicating whether there are other product categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof CommerceProductCategory + */ + hasChildren?: boolean; +} + +export interface CommerceProductCategoriesListResponseCommerceProductCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + id?: string; + /** + * The name of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + name?: string; + /** + * A collection of parent product categories implicitly ordered with the immediate parent last in the list. + * @type {Array} + * @memberof CommerceProductCategory + */ + ancestorRefs?: Array; + /** + * A boolean indicating whether there are other product categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof CommerceProductCategory + */ + hasChildren?: boolean; +} + +export interface CommerceProductCategoryGetResponseCommerceProductCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + id?: string; + /** + * The name of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + name?: string; + /** + * A collection of parent product categories implicitly ordered with the immediate parent last in the list. + * @type {Array} + * @memberof CommerceProductCategory + */ + ancestorRefs?: Array; + /** + * A boolean indicating whether there are other product categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof CommerceProductCategory + */ + hasChildren?: boolean; +} + +export interface GetCommerceProductCategoryResponseCommerceProductCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + id?: string; + /** + * The name of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + name?: string; + /** + * A collection of parent product categories implicitly ordered with the immediate parent last in the list. + * @type {Array} + * @memberof CommerceProductCategory + */ + ancestorRefs?: Array; + /** + * A boolean indicating whether there are other product categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof CommerceProductCategory + */ + hasChildren?: boolean; +} + +export interface ListCommerceProductCategoriesResponseCommerceProductCategory { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceProductCategory + */ + sourceModifiedDate?: string; + /** + * The unique identifier of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + id?: string; + /** + * The name of the product category + * @type {string} + * @memberof CommerceProductCategory + */ + name?: string; + /** + * A collection of parent product categories implicitly ordered with the immediate parent last in the list. + * @type {Array} + * @memberof CommerceProductCategory + */ + ancestorRefs?: Array; + /** + * A boolean indicating whether there are other product categories beneath this one in the hierarchy. + * @type {boolean} + * @memberof CommerceProductCategory + */ + hasChildren?: boolean; } diff --git a/lending/src/sdk/models/shared/commerceproducts.ts b/lending/src/sdk/models/shared/commerceproducts.ts index a6251cd1b..d3e35c9cb 100644 --- a/lending/src/sdk/models/shared/commerceproducts.ts +++ b/lending/src/sdk/models/shared/commerceproducts.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceProduct } from './commerceproduct'; import { - CommerceProduct, - CommerceProduct$inboundSchema, -} from "./commerceproduct.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommerceProducts = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommerceProducts$inboundSchema: z.ZodType< - CommerceProducts, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(CommerceProduct$inboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commerceProductsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceProducts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceProducts' from JSON`, - ); + CommerceProductFromJSON, + CommerceProductFromJSONTyped, + CommerceProductToJSON, + CommerceProductToJSONTyped, +} from './commerceproduct'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface CommerceProducts + */ +export interface CommerceProducts { + /** + * Current page number. + * @type {number} + * @memberof CommerceProducts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceProducts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceProducts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceProducts + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceProducts + */ + results?: Array; +} + +/** + * Check if a given object implements the CommerceProducts interface. + */ +export function instanceOfCommerceProducts(value: object): value is CommerceProducts { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommerceProductsFromJSON(json: any): CommerceProducts { + return CommerceProductsFromJSONTyped(json, false); +} + +export function CommerceProductsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceProducts { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommerceProductFromJSON)), + }; +} + +export function CommerceProductsToJSON(json: any): CommerceProducts { + return CommerceProductsToJSONTyped(json, false); +} + +export function CommerceProductsToJSONTyped(value?: CommerceProducts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommerceProductToJSON)), + }; +} + + +export interface CommerceProductsListResponseCommerceProducts { + /** + * Current page number. + * @type {number} + * @memberof CommerceProducts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceProducts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceProducts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceProducts + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceProducts + */ + results?: Array; +} + +export interface ListCommerceProductsResponseCommerceProducts { + /** + * Current page number. + * @type {number} + * @memberof CommerceProducts + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceProducts + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceProducts + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceProducts + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceProducts + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/commercerecordref.ts b/lending/src/sdk/models/shared/commercerecordref.ts index 43bbee551..ee0a78f04 100644 --- a/lending/src/sdk/models/shared/commercerecordref.ts +++ b/lending/src/sdk/models/shared/commercerecordref.ts @@ -1,39 +1,390 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CommerceRecordRef = { - /** - * The unique identitifer of the record being referenced - */ - id: string; - /** - * The type of record being referenced. - */ - type: string; -}; - -/** @internal */ -export const CommerceRecordRef$inboundSchema: z.ZodType< - CommerceRecordRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - type: z.string(), -}); - -export function commerceRecordRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceRecordRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceRecordRef' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface CommerceRecordRef + */ +export interface CommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +/** + * Check if a given object implements the CommerceRecordRef interface. + */ +export function instanceOfCommerceRecordRef(value: object): value is CommerceRecordRef { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function CommerceRecordRefFromJSON(json: any): CommerceRecordRef { + return CommerceRecordRefFromJSONTyped(json, false); +} + +export function CommerceRecordRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceRecordRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'type': json['type'], + }; +} + +export function CommerceRecordRefToJSON(json: any): CommerceRecordRef { + return CommerceRecordRefToJSONTyped(json, false); +} + +export function CommerceRecordRefToJSONTyped(value?: CommerceRecordRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'type': value['type'], + }; +} + + +export interface CommerceDisputeCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceDisputeGetResponseCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceDisputeGetResponseRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceDisputeRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceProductCategoryCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceProductCategoryGetResponseCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceProductCategoryGetResponseRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceProductCategoryRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceRecordRefRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceTransactionCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceTransactionGetResponseCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceTransactionGetResponseRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceTransactionRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceTransactionsCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface CommerceTransactionsRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface GetCommerceDisputeResponseCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface GetCommerceDisputeResponseRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface GetCommerceProductCategoryResponseCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface GetCommerceProductCategoryResponseRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface GetCommerceTransactionResponseCommerceRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; +} + +export interface GetCommerceTransactionResponseRecordRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof CommerceRecordRef + */ + id: string; + /** + * The type of record being referenced. + * @type {string} + * @memberof CommerceRecordRef + */ + type: string; } diff --git a/lending/src/sdk/models/shared/commercereport.ts b/lending/src/sdk/models/shared/commercereport.ts index 9346a554b..84b6b575e 100644 --- a/lending/src/sdk/models/shared/commercereport.ts +++ b/lending/src/sdk/models/shared/commercereport.ts @@ -1,99 +1,496 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CommerceReportComponent } from './commercereportcomponent'; import { - CommerceReportComponent, - CommerceReportComponent$inboundSchema, -} from "./commercereportcomponent.js"; + CommerceReportComponentFromJSON, + CommerceReportComponentFromJSONTyped, + CommerceReportComponentToJSON, + CommerceReportComponentToJSONTyped, +} from './commercereportcomponent'; +import type { CommerceReportMeasure } from './commercereportmeasure'; import { - CommerceReportDimension, - CommerceReportDimension$inboundSchema, -} from "./commercereportdimension.js"; + CommerceReportMeasureFromJSON, + CommerceReportMeasureFromJSONTyped, + CommerceReportMeasureToJSON, + CommerceReportMeasureToJSONTyped, +} from './commercereportmeasure'; +import type { CommerceReportDimension } from './commercereportdimension'; import { - CommerceReportError, - CommerceReportError$inboundSchema, -} from "./commercereporterror.js"; + CommerceReportDimensionFromJSON, + CommerceReportDimensionFromJSONTyped, + CommerceReportDimensionToJSON, + CommerceReportDimensionToJSONTyped, +} from './commercereportdimension'; +import type { CommerceReportError } from './commercereporterror'; import { - CommerceReportMeasure, - CommerceReportMeasure$inboundSchema, -} from "./commercereportmeasure.js"; + CommerceReportErrorFromJSON, + CommerceReportErrorFromJSONTyped, + CommerceReportErrorToJSON, + CommerceReportErrorToJSONTyped, +} from './commercereporterror'; /** * ## Structure - * - * @remarks - * + * * Assess reports follow a consistent structure. Reports contain four sections of information: - * + * * ### 1. Report definition - * + * * Information such as: - * + * * 1. The report info (e.g. enhanced_profit_and_loss). * 2. The display name of the report (e.g. Enhanced Profit and Loss). - * + * * ### 2. Dimension info - * + * * Information about the dimension contained in the reports such as: - * + * * 1. The type of dimension (e.g. datetime, recordRef). * 2. The display name of the dimension (e.g. Period, Category type, Category sub type). * 3. The details about each item within the dimension (e.g. displayName:"Jan 2022", start:"...", end:"...", id:"...", name:"..."). - * + * * ### 3. Measure info - * + * * Information about the measures contained in the report such as: - * + * * 1. The display name of the measure (e.g. value of account, percentage change). * 2. The type of the measure (e.g. currency, percentage). * 3. The unit of the measure (e.g. %, GBP). - * + * * ### 4. The data for the report - * + * * When the *includeDisplayName* parameter is set to *true*, it shows the *dimensionDisplayName* and *itemDisplayName* to make the data human-readable. The default setting for *includeDisplayName* is *false*. - * + * + * * ## Displaying the report - * + * * Reports can be rendered as follows (ordering is implicit rather than explicit): - * + * * ![A table showing an example of how a report can be rendered](https://files.readme.io/1fa20ca-Report1.png) - * + * * # Data model - * + * * ## Dimensions + * @export + * @interface CommerceReport */ -export type CommerceReport = { - reportInfo?: { [k: string]: string } | undefined; - dimensions?: Array | undefined; - measures?: Array | undefined; - reportData?: Array | undefined; - errors?: Array | undefined; -}; - -/** @internal */ -export const CommerceReport$inboundSchema: z.ZodType< - CommerceReport, - z.ZodTypeDef, - unknown -> = z.object({ - reportInfo: z.record(z.string()).optional(), - dimensions: z.array(CommerceReportDimension$inboundSchema).optional(), - measures: z.array(CommerceReportMeasure$inboundSchema).optional(), - reportData: z.array(CommerceReportComponent$inboundSchema).optional(), - errors: z.array(CommerceReportError$inboundSchema).optional(), -}); - -export function commerceReportFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceReport$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceReport' from JSON`, - ); +export interface CommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +/** + * Check if a given object implements the CommerceReport interface. + */ +export function instanceOfCommerceReport(value: object): value is CommerceReport { + return true; +} + +export function CommerceReportFromJSON(json: any): CommerceReport { + return CommerceReportFromJSONTyped(json, false); +} + +export function CommerceReportFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceReport { + if (json == null) { + return json; + } + return { + + 'reportInfo': json['reportInfo'] == null ? undefined : json['reportInfo'], + 'dimensions': json['dimensions'] == null ? undefined : ((json['dimensions'] as Array).map(CommerceReportDimensionFromJSON)), + 'measures': json['measures'] == null ? undefined : ((json['measures'] as Array).map(CommerceReportMeasureFromJSON)), + 'reportData': json['reportData'] == null ? undefined : ((json['reportData'] as Array).map(CommerceReportComponentFromJSON)), + 'errors': json['errors'] == null ? undefined : ((json['errors'] as Array).map(CommerceReportErrorFromJSON)), + }; +} + +export function CommerceReportToJSON(json: any): CommerceReport { + return CommerceReportToJSONTyped(json, false); +} + +export function CommerceReportToJSONTyped(value?: CommerceReport | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reportInfo': value['reportInfo'], + 'dimensions': value['dimensions'] == null ? undefined : ((value['dimensions'] as Array).map(CommerceReportDimensionToJSON)), + 'measures': value['measures'] == null ? undefined : ((value['measures'] as Array).map(CommerceReportMeasureToJSON)), + 'reportData': value['reportData'] == null ? undefined : ((value['reportData'] as Array).map(CommerceReportComponentToJSON)), + 'errors': value['errors'] == null ? undefined : ((value['errors'] as Array).map(CommerceReportErrorToJSON)), + }; +} + + +export interface CommerceCustomerRetentionMetricsGetResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface CommerceLifetimeValueMetricsGetResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface CommerceOrdersReportGetResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface CommerceRefundsReportGetResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface CommerceRevenueMetricsGetResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface GetCommerceCustomerRetentionMetricsResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface GetCommerceLifetimeValueMetricsResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface GetCommerceOrdersReportResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface GetCommerceRefundsReportResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; +} + +export interface GetCommerceRevenueMetricsResponseCommerceReport { + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommerceReport + */ + reportInfo?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + dimensions?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + reportData?: Array; + /** + * + * @type {Array} + * @memberof CommerceReport + */ + errors?: Array; } diff --git a/lending/src/sdk/models/shared/commercereportcomponent.ts b/lending/src/sdk/models/shared/commercereportcomponent.ts index 10054fe45..47990732e 100644 --- a/lending/src/sdk/models/shared/commercereportcomponent.ts +++ b/lending/src/sdk/models/shared/commercereportcomponent.ts @@ -1,58 +1,542 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { ReportComponentMeasure } from './reportcomponentmeasure'; import { - ReportComponentMeasure, - ReportComponentMeasure$inboundSchema, -} from "./reportcomponentmeasure.js"; - -export type CommerceReportComponent = { - /** - * The component's dimension. - */ - dimension?: number | undefined; - /** - * The component's display name. - */ - dimensionDisplayName?: string | undefined; - /** - * The component's item number. - */ - item?: number | undefined; - /** - * The component's item display name. - */ - itemDisplayName?: string | undefined; - measures?: Array | undefined; - components?: Array | undefined; -}; - -/** @internal */ -export const CommerceReportComponent$inboundSchema: z.ZodType< - CommerceReportComponent, - z.ZodTypeDef, - unknown -> = z.object({ - dimension: z.number().int().optional(), - dimensionDisplayName: z.string().optional(), - item: z.number().int().optional(), - itemDisplayName: z.string().optional(), - measures: z.array(ReportComponentMeasure$inboundSchema).optional(), - components: z.array(z.lazy(() => CommerceReportComponent$inboundSchema)) - .optional(), -}); - -export function commerceReportComponentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceReportComponent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceReportComponent' from JSON`, - ); + ReportComponentMeasureFromJSON, + ReportComponentMeasureFromJSONTyped, + ReportComponentMeasureToJSON, + ReportComponentMeasureToJSONTyped, +} from './reportcomponentmeasure'; + +/** + * + * @export + * @interface CommerceReportComponent + */ +export interface CommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +/** + * Check if a given object implements the CommerceReportComponent interface. + */ +export function instanceOfCommerceReportComponent(value: object): value is CommerceReportComponent { + return true; +} + +export function CommerceReportComponentFromJSON(json: any): CommerceReportComponent { + return CommerceReportComponentFromJSONTyped(json, false); +} + +export function CommerceReportComponentFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceReportComponent { + if (json == null) { + return json; + } + return { + + 'dimension': json['dimension'] == null ? undefined : json['dimension'], + 'dimensionDisplayName': json['dimensionDisplayName'] == null ? undefined : json['dimensionDisplayName'], + 'item': json['item'] == null ? undefined : json['item'], + 'itemDisplayName': json['itemDisplayName'] == null ? undefined : json['itemDisplayName'], + 'measures': json['measures'] == null ? undefined : ((json['measures'] as Array).map(ReportComponentMeasureFromJSON)), + 'components': json['components'] == null ? undefined : ((json['components'] as Array).map(CommerceReportComponentFromJSON)), + }; +} + +export function CommerceReportComponentToJSON(json: any): CommerceReportComponent { + return CommerceReportComponentToJSONTyped(json, false); +} + +export function CommerceReportComponentToJSONTyped(value?: CommerceReportComponent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'dimension': value['dimension'], + 'dimensionDisplayName': value['dimensionDisplayName'], + 'item': value['item'], + 'itemDisplayName': value['itemDisplayName'], + 'measures': value['measures'] == null ? undefined : ((value['measures'] as Array).map(ReportComponentMeasureToJSON)), + 'components': value['components'] == null ? undefined : ((value['components'] as Array).map(CommerceReportComponentToJSON)), + }; +} + + +export interface CommerceCustomerRetentionMetricsGetResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface CommerceLifetimeValueMetricsGetResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface CommerceOrdersReportGetResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface CommerceRefundsReportGetResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface CommerceReportCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface CommerceRevenueMetricsGetResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface GetCommerceCustomerRetentionMetricsResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface GetCommerceLifetimeValueMetricsResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface GetCommerceOrdersReportResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface GetCommerceRefundsReportResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; +} + +export interface GetCommerceRevenueMetricsResponseCommerceReportComponent { + /** + * The component's dimension. + * @type {number} + * @memberof CommerceReportComponent + */ + dimension?: number; + /** + * The component's display name. + * @type {string} + * @memberof CommerceReportComponent + */ + dimensionDisplayName?: string; + /** + * The component's item number. + * @type {number} + * @memberof CommerceReportComponent + */ + item?: number; + /** + * The component's item display name. + * @type {string} + * @memberof CommerceReportComponent + */ + itemDisplayName?: string; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + measures?: Array; + /** + * + * @type {Array} + * @memberof CommerceReportComponent + */ + components?: Array; } diff --git a/lending/src/sdk/models/shared/commercereportdimension.ts b/lending/src/sdk/models/shared/commercereportdimension.ts index 4434cc057..4895480de 100644 --- a/lending/src/sdk/models/shared/commercereportdimension.ts +++ b/lending/src/sdk/models/shared/commercereportdimension.ts @@ -1,73 +1,394 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CommerceReportDimensionItems = { - /** - * The dimension's items index. - */ - index?: number | undefined; -}; - -export type CommerceReportDimension = { - /** - * The dimension's index. - */ - index?: number | undefined; - /** - * The dimension's display name. - */ - displayName?: string | undefined; - /** - * The dimension's type. - */ - type?: string | undefined; - items?: Array | undefined; -}; - -/** @internal */ -export const CommerceReportDimensionItems$inboundSchema: z.ZodType< - CommerceReportDimensionItems, - z.ZodTypeDef, - unknown -> = z.object({ - index: z.number().int().optional(), -}); - -export function commerceReportDimensionItemsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceReportDimensionItems$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceReportDimensionItems' from JSON`, - ); -} - -/** @internal */ -export const CommerceReportDimension$inboundSchema: z.ZodType< - CommerceReportDimension, - z.ZodTypeDef, - unknown -> = z.object({ - index: z.number().int().optional(), - displayName: z.string().optional(), - type: z.string().optional(), - items: z.array(z.lazy(() => CommerceReportDimensionItems$inboundSchema)) - .optional(), -}); - -export function commerceReportDimensionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceReportDimension$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceReportDimension' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import type { CommerceReportDimensionItems } from './commercereportdimensionitems'; +import { + CommerceReportDimensionItemsFromJSON, + CommerceReportDimensionItemsFromJSONTyped, + CommerceReportDimensionItemsToJSON, + CommerceReportDimensionItemsToJSONTyped, +} from './commercereportdimensionitems'; + +/** + * + * @export + * @interface CommerceReportDimension + */ +export interface CommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +/** + * Check if a given object implements the CommerceReportDimension interface. + */ +export function instanceOfCommerceReportDimension(value: object): value is CommerceReportDimension { + return true; +} + +export function CommerceReportDimensionFromJSON(json: any): CommerceReportDimension { + return CommerceReportDimensionFromJSONTyped(json, false); +} + +export function CommerceReportDimensionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceReportDimension { + if (json == null) { + return json; + } + return { + + 'index': json['index'] == null ? undefined : json['index'], + 'displayName': json['displayName'] == null ? undefined : json['displayName'], + 'type': json['type'] == null ? undefined : json['type'], + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(CommerceReportDimensionItemsFromJSON)), + }; +} + +export function CommerceReportDimensionToJSON(json: any): CommerceReportDimension { + return CommerceReportDimensionToJSONTyped(json, false); +} + +export function CommerceReportDimensionToJSONTyped(value?: CommerceReportDimension | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'index': value['index'], + 'displayName': value['displayName'], + 'type': value['type'], + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(CommerceReportDimensionItemsToJSON)), + }; +} + + +export interface CommerceCustomerRetentionMetricsGetResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface CommerceLifetimeValueMetricsGetResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface CommerceOrdersReportGetResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface CommerceRefundsReportGetResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface CommerceReportCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface CommerceRevenueMetricsGetResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface GetCommerceCustomerRetentionMetricsResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface GetCommerceLifetimeValueMetricsResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface GetCommerceOrdersReportResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface GetCommerceRefundsReportResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; +} + +export interface GetCommerceRevenueMetricsResponseCommerceReportDimension { + /** + * The dimension's index. + * @type {number} + * @memberof CommerceReportDimension + */ + index?: number; + /** + * The dimension's display name. + * @type {string} + * @memberof CommerceReportDimension + */ + displayName?: string; + /** + * The dimension's type. + * @type {string} + * @memberof CommerceReportDimension + */ + type?: string; + /** + * + * @type {Array} + * @memberof CommerceReportDimension + */ + items?: Array; } diff --git a/lending/src/sdk/models/shared/commercereportdimensionitems.ts b/lending/src/sdk/models/shared/commercereportdimensionitems.ts new file mode 100644 index 000000000..aef625e52 --- /dev/null +++ b/lending/src/sdk/models/shared/commercereportdimensionitems.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface CommerceReportDimensionItems + */ +export interface CommerceReportDimensionItems { + /** + * The dimension's items index. + * @type {number} + * @memberof CommerceReportDimensionItems + */ + index?: number; +} + +/** + * Check if a given object implements the CommerceReportDimensionItems interface. + */ +export function instanceOfCommerceReportDimensionItems(value: object): value is CommerceReportDimensionItems { + return true; +} + +export function CommerceReportDimensionItemsFromJSON(json: any): CommerceReportDimensionItems { + return CommerceReportDimensionItemsFromJSONTyped(json, false); +} + +export function CommerceReportDimensionItemsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceReportDimensionItems { + if (json == null) { + return json; + } + return { + + 'index': json['index'] == null ? undefined : json['index'], + }; +} + +export function CommerceReportDimensionItemsToJSON(json: any): CommerceReportDimensionItems { + return CommerceReportDimensionItemsToJSONTyped(json, false); +} + +export function CommerceReportDimensionItemsToJSONTyped(value?: CommerceReportDimensionItems | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'index': value['index'], + }; +} + diff --git a/lending/src/sdk/models/shared/commercereporterror.ts b/lending/src/sdk/models/shared/commercereporterror.ts index 42085a760..4c361e380 100644 --- a/lending/src/sdk/models/shared/commercereporterror.ts +++ b/lending/src/sdk/models/shared/commercereporterror.ts @@ -1,44 +1,312 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CommerceReportError = { - /** - * Message returned by error. - */ - message?: string | undefined; - /** - * The type of error. - */ - type?: string | undefined; - /** - * Additional details on the error. - */ - details?: { [k: string]: Array } | undefined; -}; - -/** @internal */ -export const CommerceReportError$inboundSchema: z.ZodType< - CommerceReportError, - z.ZodTypeDef, - unknown -> = z.object({ - message: z.string().optional(), - type: z.string().optional(), - details: z.record(z.array(z.string())).optional(), -}); - -export function commerceReportErrorFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceReportError$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceReportError' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface CommerceReportError + */ +export interface CommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the CommerceReportError interface. + */ +export function instanceOfCommerceReportError(value: object): value is CommerceReportError { + return true; +} + +export function CommerceReportErrorFromJSON(json: any): CommerceReportError { + return CommerceReportErrorFromJSONTyped(json, false); +} + +export function CommerceReportErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceReportError { + if (json == null) { + return json; + } + return { + + 'message': json['message'] == null ? undefined : json['message'], + 'type': json['type'] == null ? undefined : json['type'], + 'details': json['details'] == null ? undefined : json['details'], + }; +} + +export function CommerceReportErrorToJSON(json: any): CommerceReportError { + return CommerceReportErrorToJSONTyped(json, false); +} + +export function CommerceReportErrorToJSONTyped(value?: CommerceReportError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'message': value['message'], + 'type': value['type'], + 'details': value['details'], + }; +} + + +export interface CommerceCustomerRetentionMetricsGetResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface CommerceLifetimeValueMetricsGetResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface CommerceOrdersReportGetResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface CommerceRefundsReportGetResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface CommerceReportCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface CommerceRevenueMetricsGetResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface GetCommerceCustomerRetentionMetricsResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface GetCommerceLifetimeValueMetricsResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface GetCommerceOrdersReportResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface GetCommerceRefundsReportResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; +} + +export interface GetCommerceRevenueMetricsResponseCommerceReportError { + /** + * Message returned by error. + * @type {string} + * @memberof CommerceReportError + */ + message?: string; + /** + * The type of error. + * @type {string} + * @memberof CommerceReportError + */ + type?: string; + /** + * Additional details on the error. + * @type {{ [key: string]: Array; }} + * @memberof CommerceReportError + */ + details?: { [key: string]: Array; }; } diff --git a/lending/src/sdk/models/shared/commercereportmeasure.ts b/lending/src/sdk/models/shared/commercereportmeasure.ts index e103b2b34..ed95107c1 100644 --- a/lending/src/sdk/models/shared/commercereportmeasure.ts +++ b/lending/src/sdk/models/shared/commercereportmeasure.ts @@ -1,49 +1,386 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CommerceReportMeasure = { - /** - * The measure's display name. - */ - displayName?: string | undefined; - /** - * The measure's units e.g. percentage (%). - */ - units?: string | undefined; - /** - * The measure's index. - */ - index?: number | undefined; - /** - * The measure's type. - */ - type?: string | undefined; -}; - -/** @internal */ -export const CommerceReportMeasure$inboundSchema: z.ZodType< - CommerceReportMeasure, - z.ZodTypeDef, - unknown -> = z.object({ - displayName: z.string().optional(), - units: z.string().optional(), - index: z.number().int().optional(), - type: z.string().optional(), -}); - -export function commerceReportMeasureFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceReportMeasure$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceReportMeasure' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface CommerceReportMeasure + */ +export interface CommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +/** + * Check if a given object implements the CommerceReportMeasure interface. + */ +export function instanceOfCommerceReportMeasure(value: object): value is CommerceReportMeasure { + return true; +} + +export function CommerceReportMeasureFromJSON(json: any): CommerceReportMeasure { + return CommerceReportMeasureFromJSONTyped(json, false); +} + +export function CommerceReportMeasureFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceReportMeasure { + if (json == null) { + return json; + } + return { + + 'displayName': json['displayName'] == null ? undefined : json['displayName'], + 'units': json['units'] == null ? undefined : json['units'], + 'index': json['index'] == null ? undefined : json['index'], + 'type': json['type'] == null ? undefined : json['type'], + }; +} + +export function CommerceReportMeasureToJSON(json: any): CommerceReportMeasure { + return CommerceReportMeasureToJSONTyped(json, false); +} + +export function CommerceReportMeasureToJSONTyped(value?: CommerceReportMeasure | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'displayName': value['displayName'], + 'units': value['units'], + 'index': value['index'], + 'type': value['type'], + }; +} + + +export interface CommerceCustomerRetentionMetricsGetResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface CommerceLifetimeValueMetricsGetResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface CommerceOrdersReportGetResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface CommerceRefundsReportGetResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface CommerceReportCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface CommerceRevenueMetricsGetResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface GetCommerceCustomerRetentionMetricsResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface GetCommerceLifetimeValueMetricsResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface GetCommerceOrdersReportResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface GetCommerceRefundsReportResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; +} + +export interface GetCommerceRevenueMetricsResponseCommerceReportMeasure { + /** + * The measure's display name. + * @type {string} + * @memberof CommerceReportMeasure + */ + displayName?: string; + /** + * The measure's units e.g. percentage (%). + * @type {string} + * @memberof CommerceReportMeasure + */ + units?: string; + /** + * The measure's index. + * @type {number} + * @memberof CommerceReportMeasure + */ + index?: number; + /** + * The measure's type. + * @type {string} + * @memberof CommerceReportMeasure + */ + type?: string; } diff --git a/lending/src/sdk/models/shared/commercetransaction.ts b/lending/src/sdk/models/shared/commercetransaction.ts index 3dd6caea7..5631db550 100644 --- a/lending/src/sdk/models/shared/commercetransaction.ts +++ b/lending/src/sdk/models/shared/commercetransaction.ts @@ -1,161 +1,859 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { TransactionType } from './transactiontype'; import { - SupplementalData, - SupplementalData$inboundSchema, -} from "./supplementaldata.js"; + TransactionTypeFromJSON, + TransactionTypeFromJSONTyped, + TransactionTypeToJSON, + TransactionTypeToJSONTyped, +} from './transactiontype'; +import type { SupplementalData } from './supplementaldata'; import { - TransactionSourceRef, - TransactionSourceRef$inboundSchema, -} from "./transactionsourceref.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { TransactionSourceRef } from './transactionsourceref'; import { - TransactionType, - TransactionType$inboundSchema, -} from "./transactiontype.js"; + TransactionSourceRefFromJSON, + TransactionSourceRefFromJSONTyped, + TransactionSourceRefToJSON, + TransactionSourceRefToJSONTyped, +} from './transactionsourceref'; /** * Details of all financial transactions recorded in the commerce or point of sale system are added to the Transactions data type. For example, payments, service charges, and fees. - * - * @remarks - * - * You can use data from the Transactions endpoints to calculate key metrics, such as: - * - Transaction volumes - * - Average transaction volume - * - Average transaction value - * - Returns + * + * You can use data from the Transactions endpoints to calculate key metrics, such as: + * - Transaction volumes + * - Average transaction volume + * - Average transaction value + * - Returns * - Payouts + * @export + * @interface CommerceTransaction + */ +export interface CommerceTransaction { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceTransaction + */ + id: string; + /** + * The total transaction amount + * @type {string} + * @memberof CommerceTransaction + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommerceTransaction + */ + currency?: string; + /** + * + * @type {TransactionType} + * @memberof CommerceTransaction + */ + type?: TransactionType; + /** + * Non-standardised transaction type data from the commerce software + * @type {string} + * @memberof CommerceTransaction + */ + subType?: string; + /** + * Link to the source event which triggered this transaction + * @type {TransactionSourceRef} + * @memberof CommerceTransaction + */ + transactionSourceRef?: TransactionSourceRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceTransaction + */ + supplementalData?: SupplementalData; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + createdDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + sourceCreatedDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + sourceModifiedDate?: string; +} + + + +/** + * Check if a given object implements the CommerceTransaction interface. */ -export type CommerceTransaction = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - sourceCreatedDate?: string | undefined; - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * The total transaction amount - */ - totalAmount?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * The type of the platform transaction: - * - * @remarks - * - `Unknown` - * - `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account. - * - `Payment` — Credit and debit card payments. - * - `PaymentFee` — Payment provider's fee on each card payment. - * - `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller. - * - `Payout` — Transfer of funds from the seller's merchant account to their bank account. - * - `Refund` — Refunds to a customer's credit or debit card. - * - `Transfer` — Secure transfer of funds to the seller's bank account. - */ - type?: TransactionType | undefined; - /** - * Non-standardised transaction type data from the commerce software - */ - subType?: string | undefined; - /** - * Link to the source event which triggered this transaction - */ - transactionSourceRef?: TransactionSourceRef | undefined; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; - -/** @internal */ -export const CommerceTransaction$inboundSchema: z.ZodType< - CommerceTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - createdDate: z.string().optional(), - sourceCreatedDate: z.string().optional(), - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), - type: TransactionType$inboundSchema.optional(), - subType: z.string().optional(), - transactionSourceRef: TransactionSourceRef$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); - -export function commerceTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceTransaction' from JSON`, - ); +export function instanceOfCommerceTransaction(value: object): value is CommerceTransaction { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function CommerceTransactionFromJSON(json: any): CommerceTransaction { + return CommerceTransactionFromJSONTyped(json, false); +} + +export function CommerceTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceTransaction { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'type': json['type'] == null ? undefined : TransactionTypeFromJSON(json['type']), + 'subType': json['subType'] == null ? undefined : json['subType'], + 'transactionSourceRef': json['transactionSourceRef'] == null ? undefined : TransactionSourceRefFromJSON(json['transactionSourceRef']), + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'sourceCreatedDate': json['sourceCreatedDate'] == null ? undefined : json['sourceCreatedDate'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + }; +} + +export function CommerceTransactionToJSON(json: any): CommerceTransaction { + return CommerceTransactionToJSONTyped(json, false); +} + +export function CommerceTransactionToJSONTyped(value?: CommerceTransaction | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'totalAmount': fromDecimal(value['totalAmount']), + 'currency': value['currency'], + 'type': TransactionTypeToJSON(value['type']), + 'subType': value['subType'], + 'transactionSourceRef': TransactionSourceRefToJSON(value['transactionSourceRef']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + 'createdDate': value['createdDate'], + 'sourceCreatedDate': value['sourceCreatedDate'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + }; +} + + +export interface CommerceTransactionGetResponseCommerceTransaction { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceTransaction + */ + id: string; + /** + * The total transaction amount + * @type {string} + * @memberof CommerceTransaction + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommerceTransaction + */ + currency?: string; + /** + * + * @type {TransactionType} + * @memberof CommerceTransaction + */ + type?: TransactionType; + /** + * Non-standardised transaction type data from the commerce software + * @type {string} + * @memberof CommerceTransaction + */ + subType?: string; + /** + * Link to the source event which triggered this transaction + * @type {TransactionSourceRef} + * @memberof CommerceTransaction + */ + transactionSourceRef?: TransactionSourceRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceTransaction + */ + supplementalData?: SupplementalData; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + createdDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + sourceCreatedDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + sourceModifiedDate?: string; +} + +export interface CommerceTransactionsCommerceTransaction { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceTransaction + */ + id: string; + /** + * The total transaction amount + * @type {string} + * @memberof CommerceTransaction + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommerceTransaction + */ + currency?: string; + /** + * + * @type {TransactionType} + * @memberof CommerceTransaction + */ + type?: TransactionType; + /** + * Non-standardised transaction type data from the commerce software + * @type {string} + * @memberof CommerceTransaction + */ + subType?: string; + /** + * Link to the source event which triggered this transaction + * @type {TransactionSourceRef} + * @memberof CommerceTransaction + */ + transactionSourceRef?: TransactionSourceRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceTransaction + */ + supplementalData?: SupplementalData; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + createdDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + sourceCreatedDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + sourceModifiedDate?: string; +} + +export interface CommerceTransactionsListResponseCommerceTransaction { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceTransaction + */ + id: string; + /** + * The total transaction amount + * @type {string} + * @memberof CommerceTransaction + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommerceTransaction + */ + currency?: string; + /** + * + * @type {TransactionType} + * @memberof CommerceTransaction + */ + type?: TransactionType; + /** + * Non-standardised transaction type data from the commerce software + * @type {string} + * @memberof CommerceTransaction + */ + subType?: string; + /** + * Link to the source event which triggered this transaction + * @type {TransactionSourceRef} + * @memberof CommerceTransaction + */ + transactionSourceRef?: TransactionSourceRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceTransaction + */ + supplementalData?: SupplementalData; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + createdDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + sourceCreatedDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + sourceModifiedDate?: string; +} + +export interface GetCommerceTransactionResponseCommerceTransaction { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceTransaction + */ + id: string; + /** + * The total transaction amount + * @type {string} + * @memberof CommerceTransaction + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommerceTransaction + */ + currency?: string; + /** + * + * @type {TransactionType} + * @memberof CommerceTransaction + */ + type?: TransactionType; + /** + * Non-standardised transaction type data from the commerce software + * @type {string} + * @memberof CommerceTransaction + */ + subType?: string; + /** + * Link to the source event which triggered this transaction + * @type {TransactionSourceRef} + * @memberof CommerceTransaction + */ + transactionSourceRef?: TransactionSourceRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceTransaction + */ + supplementalData?: SupplementalData; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + createdDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + sourceCreatedDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + sourceModifiedDate?: string; +} + +export interface ListCommerceTransactionsResponseCommerceTransaction { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof CommerceTransaction + */ + id: string; + /** + * The total transaction amount + * @type {string} + * @memberof CommerceTransaction + */ + totalAmount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof CommerceTransaction + */ + currency?: string; + /** + * + * @type {TransactionType} + * @memberof CommerceTransaction + */ + type?: TransactionType; + /** + * Non-standardised transaction type data from the commerce software + * @type {string} + * @memberof CommerceTransaction + */ + subType?: string; + /** + * Link to the source event which triggered this transaction + * @type {TransactionSourceRef} + * @memberof CommerceTransaction + */ + transactionSourceRef?: TransactionSourceRef; + /** + * + * @type {SupplementalData} + * @memberof CommerceTransaction + */ + supplementalData?: SupplementalData; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + createdDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CommerceTransaction + */ + sourceCreatedDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof CommerceTransaction + */ + sourceModifiedDate?: string; } diff --git a/lending/src/sdk/models/shared/commercetransactions.ts b/lending/src/sdk/models/shared/commercetransactions.ts index ec8abec49..b02618002 100644 --- a/lending/src/sdk/models/shared/commercetransactions.ts +++ b/lending/src/sdk/models/shared/commercetransactions.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - CommerceTransaction, - CommerceTransaction$inboundSchema, -} from "./commercetransaction.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type CommerceTransactions = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const CommerceTransactions$inboundSchema: z.ZodType< - CommerceTransactions, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(z.nullable(CommerceTransaction$inboundSchema)).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function commerceTransactionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CommerceTransactions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CommerceTransactions' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { CommerceTransaction } from './commercetransaction'; +import { + CommerceTransactionFromJSON, + CommerceTransactionFromJSONTyped, + CommerceTransactionToJSON, + CommerceTransactionToJSONTyped, +} from './commercetransaction'; + +/** + * + * @export + * @interface CommerceTransactions + */ +export interface CommerceTransactions { + /** + * Current page number. + * @type {number} + * @memberof CommerceTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceTransactions + */ + results?: Array; +} + +/** + * Check if a given object implements the CommerceTransactions interface. + */ +export function instanceOfCommerceTransactions(value: object): value is CommerceTransactions { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CommerceTransactionsFromJSON(json: any): CommerceTransactions { + return CommerceTransactionsFromJSONTyped(json, false); +} + +export function CommerceTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceTransactions { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CommerceTransactionFromJSON)), + }; +} + +export function CommerceTransactionsToJSON(json: any): CommerceTransactions { + return CommerceTransactionsToJSONTyped(json, false); +} + +export function CommerceTransactionsToJSONTyped(value?: CommerceTransactions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CommerceTransactionToJSON)), + }; +} + + +export interface CommerceTransactionsListResponseCommerceTransactions { + /** + * Current page number. + * @type {number} + * @memberof CommerceTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceTransactions + */ + results?: Array; +} + +export interface ListCommerceTransactionsResponseCommerceTransactions { + /** + * Current page number. + * @type {number} + * @memberof CommerceTransactions + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof CommerceTransactions + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof CommerceTransactions + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof CommerceTransactions + */ + links: Links; + /** + * + * @type {Array} + * @memberof CommerceTransactions + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/companies.ts b/lending/src/sdk/models/shared/companies.ts index 0f308542e..ed156c240 100644 --- a/lending/src/sdk/models/shared/companies.ts +++ b/lending/src/sdk/models/shared/companies.ts @@ -1,55 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { Company, Company$inboundSchema } from "./company.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type Companies = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const Companies$inboundSchema: z.ZodType< - Companies, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(Company$inboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function companiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Companies$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Companies' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import type { Company } from './company'; +import { + CompanyFromJSON, + CompanyFromJSONTyped, + CompanyToJSON, + CompanyToJSONTyped, +} from './company'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface Companies + */ +export interface Companies { + /** + * Current page number. + * @type {number} + * @memberof Companies + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Companies + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Companies + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Companies + */ + links: Links; + /** + * + * @type {Array} + * @memberof Companies + */ + results?: Array; +} + +/** + * Check if a given object implements the Companies interface. + */ +export function instanceOfCompanies(value: object): value is Companies { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function CompaniesFromJSON(json: any): Companies { + return CompaniesFromJSONTyped(json, false); +} + +export function CompaniesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Companies { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(CompanyFromJSON)), + }; +} + +export function CompaniesToJSON(json: any): Companies { + return CompaniesToJSONTyped(json, false); +} + +export function CompaniesToJSONTyped(value?: Companies | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(CompanyToJSON)), + }; +} + + +export interface CompaniesListResponseCompanies { + /** + * Current page number. + * @type {number} + * @memberof Companies + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Companies + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Companies + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Companies + */ + links: Links; + /** + * + * @type {Array} + * @memberof Companies + */ + results?: Array; +} + +export interface ListCompaniesResponseCompanies { + /** + * Current page number. + * @type {number} + * @memberof Companies + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Companies + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Companies + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Companies + */ + links: Links; + /** + * + * @type {Array} + * @memberof Companies + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/company.ts b/lending/src/sdk/models/shared/company.ts index c3f2e934b..817b130e4 100644 --- a/lending/src/sdk/models/shared/company.ts +++ b/lending/src/sdk/models/shared/company.ts @@ -1,131 +1,1432 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CompanyReference } from './companyreference'; import { - CompanyReference, - CompanyReference$inboundSchema, -} from "./companyreference.js"; -import { Connection, Connection$inboundSchema } from "./connection.js"; + CompanyReferenceFromJSON, + CompanyReferenceFromJSONTyped, + CompanyReferenceToJSON, + CompanyReferenceToJSONTyped, +} from './companyreference'; +import type { Connection } from './connection'; +import { + ConnectionFromJSON, + ConnectionFromJSONTyped, + ConnectionToJSON, + ConnectionToJSONTyped, +} from './connection'; /** - * In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data. - * - * @remarks - * + * In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data. + * * Typically each company is one of your customers. - * + * * When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company. + * @export + * @interface Company + */ +export interface Company { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +/** + * Check if a given object implements the Company interface. */ -export type Company = { - /** - * Unique identifier for your SMB in Codat. - */ - id: string; - /** - * The name of the company - */ - name: string; - /** - * Additional information about the company. This can be used to store foreign IDs, references, etc. - */ - description?: string | undefined; - /** - * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. - */ - redirect: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - lastSync?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00:00` - * - UTC time offsets: `2021-11-15T01:00:00-05:00` - * - * > Time zones - * > - * > Not all dates from Codat will contain information about time zones. - * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - */ - created?: string | undefined; - /** - * Name of user that created the company in Codat. - */ - createdByUserName?: string | null | undefined; - /** - * An array of products that are currently enabled for the company. - */ - products?: Array | undefined; - /** - * A collection of user-defined key-value pairs that store custom metadata against the company. - */ - tags?: { [k: string]: string } | undefined; - referenceParentCompany?: CompanyReference | undefined; - /** - * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. - */ - referenceSubsidiaryCompanies?: Array | undefined; - dataConnections?: Array | undefined; -}; - -/** @internal */ -export const Company$inboundSchema: z.ZodType = - z.object({ - id: z.string(), - name: z.string(), - description: z.string().optional(), - redirect: z.string(), - lastSync: z.string().optional(), - created: z.string().optional(), - createdByUserName: z.nullable(z.string()).optional(), - products: z.array(z.string()).optional(), - tags: z.record(z.string()).optional(), - referenceParentCompany: CompanyReference$inboundSchema.optional(), - referenceSubsidiaryCompanies: z.array(CompanyReference$inboundSchema) - .optional(), - dataConnections: z.array(Connection$inboundSchema).optional(), - }); - -export function companyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Company$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Company' from JSON`, - ); +export function instanceOfCompany(value: object): value is Company { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('redirect' in value) || value['redirect'] === undefined) return false; + return true; +} + +export function CompanyFromJSON(json: any): Company { + return CompanyFromJSONTyped(json, false); +} + +export function CompanyFromJSONTyped(json: any, ignoreDiscriminator: boolean): Company { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'redirect': json['redirect'], + 'lastSync': json['lastSync'] == null ? undefined : json['lastSync'], + 'created': json['created'] == null ? undefined : json['created'], + 'createdByUserName': json['createdByUserName'] == null ? undefined : json['createdByUserName'], + 'products': json['products'] == null ? undefined : json['products'], + 'tags': json['tags'] == null ? undefined : json['tags'], + 'referenceParentCompany': json['referenceParentCompany'] == null ? undefined : CompanyReferenceFromJSON(json['referenceParentCompany']), + 'referenceSubsidiaryCompanies': json['referenceSubsidiaryCompanies'] == null ? undefined : ((json['referenceSubsidiaryCompanies'] as Array).map(CompanyReferenceFromJSON)), + 'dataConnections': json['dataConnections'] == null ? undefined : ((json['dataConnections'] as Array).map(ConnectionFromJSON)), + }; +} + +export function CompanyToJSON(json: any): Company { + return CompanyToJSONTyped(json, false); +} + +export function CompanyToJSONTyped(value?: Company | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'description': value['description'], + 'redirect': value['redirect'], + 'lastSync': value['lastSync'], + 'created': value['created'], + 'createdByUserName': value['createdByUserName'], + 'products': value['products'], + 'tags': value['tags'], + 'referenceParentCompany': CompanyReferenceToJSON(value['referenceParentCompany']), + 'referenceSubsidiaryCompanies': value['referenceSubsidiaryCompanies'] == null ? undefined : ((value['referenceSubsidiaryCompanies'] as Array).map(CompanyReferenceToJSON)), + 'dataConnections': value['dataConnections'] == null ? undefined : ((value['dataConnections'] as Array).map(ConnectionToJSON)), + }; +} + + +export interface CompaniesCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface CompaniesListResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface CompanyCreateResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface CompanyGetResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface CompanyReplaceResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface CompanyUpdateResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface CreateCompanyResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface GetCompanyResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface ListCompaniesResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface ReplaceCompanyResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; +} + +export interface UpdateCompanyResponseCompany { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof Company + */ + id: string; + /** + * The name of the company + * @type {string} + * @memberof Company + */ + name: string; + /** + * A description of the property. + * @type {string} + * @memberof Company + */ + description?: string; + /** + * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + * @type {string} + * @memberof Company + */ + redirect: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Company + */ + created?: string; + /** + * Name of user that created the company in Codat. + * @type {string} + * @memberof Company + */ + createdByUserName?: string | null; + /** + * An array of products that are currently enabled for the company. + * @type {Array} + * @memberof Company + */ + products?: Array; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof Company + */ + tags?: { [key: string]: string; }; + /** + * The parent entity or controlling organization of this company. Null if the company has no parent. + * @type {CompanyReference} + * @memberof Company + */ + referenceParentCompany?: CompanyReference; + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + * @type {Array} + * @memberof Company + */ + referenceSubsidiaryCompanies?: Array; + /** + * + * @type {Array} + * @memberof Company + */ + dataConnections?: Array; } diff --git a/lending/src/sdk/models/shared/companyreference.ts b/lending/src/sdk/models/shared/companyreference.ts index e40af5e26..edd6414b7 100644 --- a/lending/src/sdk/models/shared/companyreference.ts +++ b/lending/src/sdk/models/shared/companyreference.ts @@ -1,131 +1,435 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CompanyReferenceLinks } from './companyreferencelinks'; +import { + CompanyReferenceLinksFromJSON, + CompanyReferenceLinksFromJSONTyped, + CompanyReferenceLinksToJSON, + CompanyReferenceLinksToJSONTyped, +} from './companyreferencelinks'; + +/** + * + * @export + * @interface CompanyReference + */ +export interface CompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} /** - * A collection of links for the company. + * Check if a given object implements the CompanyReference interface. */ -export type CompanyReferenceLinks = { - /** - * Link to the company page in the portal. - */ - portal?: string | undefined; -}; - -export type CompanyReference = { - /** - * Unique identifier for your SMB in Codat. - */ - id?: string | undefined; - /** - * The name of the company - */ - name?: string | undefined; - /** - * Additional information about the company. This can be used to store foreign IDs, references, etc. - */ - description?: string | undefined; - /** - * A collection of links for the company. - */ - links?: CompanyReferenceLinks | undefined; - /** - * A collection of user-defined key-value pairs that store custom metadata against the company. - */ - tags?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export const CompanyReferenceLinks$inboundSchema: z.ZodType< - CompanyReferenceLinks, - z.ZodTypeDef, - unknown -> = z.object({ - portal: z.string().optional(), -}); -/** @internal */ -export type CompanyReferenceLinks$Outbound = { - portal?: string | undefined; -}; - -/** @internal */ -export const CompanyReferenceLinks$outboundSchema: z.ZodType< - CompanyReferenceLinks$Outbound, - z.ZodTypeDef, - CompanyReferenceLinks -> = z.object({ - portal: z.string().optional(), -}); - -export function companyReferenceLinksToJSON( - companyReferenceLinks: CompanyReferenceLinks, -): string { - return JSON.stringify( - CompanyReferenceLinks$outboundSchema.parse(companyReferenceLinks), - ); -} -export function companyReferenceLinksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CompanyReferenceLinks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CompanyReferenceLinks' from JSON`, - ); -} - -/** @internal */ -export const CompanyReference$inboundSchema: z.ZodType< - CompanyReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - links: z.lazy(() => CompanyReferenceLinks$inboundSchema).optional(), - tags: z.record(z.string()).optional(), -}); -/** @internal */ -export type CompanyReference$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - links?: CompanyReferenceLinks$Outbound | undefined; - tags?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export const CompanyReference$outboundSchema: z.ZodType< - CompanyReference$Outbound, - z.ZodTypeDef, - CompanyReference -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - links: z.lazy(() => CompanyReferenceLinks$outboundSchema).optional(), - tags: z.record(z.string()).optional(), -}); - -export function companyReferenceToJSON( - companyReference: CompanyReference, -): string { - return JSON.stringify( - CompanyReference$outboundSchema.parse(companyReference), - ); -} -export function companyReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CompanyReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CompanyReference' from JSON`, - ); +export function instanceOfCompanyReference(value: object): value is CompanyReference { + return true; +} + +export function CompanyReferenceFromJSON(json: any): CompanyReference { + return CompanyReferenceFromJSONTyped(json, false); +} + +export function CompanyReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompanyReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'links': json['links'] == null ? undefined : CompanyReferenceLinksFromJSON(json['links']), + 'tags': json['tags'] == null ? undefined : json['tags'], + }; +} + +export function CompanyReferenceToJSON(json: any): CompanyReference { + return CompanyReferenceToJSONTyped(json, false); +} + +export function CompanyReferenceToJSONTyped(value?: CompanyReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'description': value['description'], + 'links': CompanyReferenceLinksToJSON(value['links']), + 'tags': value['tags'], + }; +} + + +export interface CompaniesCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface CompanyCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface CompanyCreateResponseCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface CompanyGetResponseCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface CompanyReplaceResponseCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface CompanyUpdateResponseCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface CreateCompanyResponseCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface GetCompanyResponseCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface ReplaceCompanyResponseCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; +} + +export interface UpdateCompanyResponseCompanyReference { + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof CompanyReference + */ + id?: string; + /** + * The name of the company + * @type {string} + * @memberof CompanyReference + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyReference + */ + description?: string; + /** + * + * @type {CompanyReferenceLinks} + * @memberof CompanyReference + */ + links?: CompanyReferenceLinks; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyReference + */ + tags?: { [key: string]: string; }; } diff --git a/lending/src/sdk/models/shared/companyreferencelinks.ts b/lending/src/sdk/models/shared/companyreferencelinks.ts new file mode 100644 index 000000000..3d59b031d --- /dev/null +++ b/lending/src/sdk/models/shared/companyreferencelinks.ts @@ -0,0 +1,146 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +/** + * A collection of links for the company. + * @export + * @interface CompanyReferenceLinks + */ +export interface CompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +/** + * Check if a given object implements the CompanyReferenceLinks interface. + */ +export function instanceOfCompanyReferenceLinks(value: object): value is CompanyReferenceLinks { + return true; +} + +export function CompanyReferenceLinksFromJSON(json: any): CompanyReferenceLinks { + return CompanyReferenceLinksFromJSONTyped(json, false); +} + +export function CompanyReferenceLinksFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompanyReferenceLinks { + if (json == null) { + return json; + } + return { + + 'portal': json['portal'] == null ? undefined : json['portal'], + }; +} + +export function CompanyReferenceLinksToJSON(json: any): CompanyReferenceLinks { + return CompanyReferenceLinksToJSONTyped(json, false); +} + +export function CompanyReferenceLinksToJSONTyped(value?: CompanyReferenceLinks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal': value['portal'], + }; +} + + +export interface CompanyCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +export interface CompanyCreateResponseCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +export interface CompanyGetResponseCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +export interface CompanyReplaceResponseCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +export interface CompanyUpdateResponseCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +export interface CreateCompanyResponseCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +export interface GetCompanyResponseCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +export interface ReplaceCompanyResponseCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} + +export interface UpdateCompanyResponseCompanyReferenceLinks { + /** + * Link to the company page in the portal. + * @type {string} + * @memberof CompanyReferenceLinks + */ + portal?: string; +} diff --git a/lending/src/sdk/models/shared/companyrequestbody.ts b/lending/src/sdk/models/shared/companyrequestbody.ts index 5e438635a..a72919b08 100644 --- a/lending/src/sdk/models/shared/companyrequestbody.ts +++ b/lending/src/sdk/models/shared/companyrequestbody.ts @@ -1,46 +1,208 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; - -export type CompanyRequestBody = { - /** - * Name of company being connected. - */ - name: string; - /** - * Additional information about the company. This can be used to store foreign IDs, references, etc. - */ - description?: string | undefined; - /** - * A collection of user-defined key-value pairs that store custom metadata against the company. - */ - tags?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export type CompanyRequestBody$Outbound = { - name: string; - description?: string | undefined; - tags?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export const CompanyRequestBody$outboundSchema: z.ZodType< - CompanyRequestBody$Outbound, - z.ZodTypeDef, - CompanyRequestBody -> = z.object({ - name: z.string(), - description: z.string().optional(), - tags: z.record(z.string()).optional(), -}); - -export function companyRequestBodyToJSON( - companyRequestBody: CompanyRequestBody, -): string { - return JSON.stringify( - CompanyRequestBody$outboundSchema.parse(companyRequestBody), - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface CompanyRequestBody + */ +export interface CompanyRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyRequestBody + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + * @type {string} + * @memberof CompanyRequestBody + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyRequestBody + */ + tags?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the CompanyRequestBody interface. + */ +export function instanceOfCompanyRequestBody(value: object): value is CompanyRequestBody { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function CompanyRequestBodyFromJSON(json: any): CompanyRequestBody { + return CompanyRequestBodyFromJSONTyped(json, false); +} + +export function CompanyRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompanyRequestBody { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'tags': json['tags'] == null ? undefined : json['tags'], + }; +} + +export function CompanyRequestBodyToJSON(json: any): CompanyRequestBody { + return CompanyRequestBodyToJSONTyped(json, false); +} + +export function CompanyRequestBodyToJSONTyped(value?: CompanyRequestBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'description': value['description'], + 'tags': value['tags'], + }; +} + + +export interface CompanyCreateRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyRequestBody + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + * @type {string} + * @memberof CompanyRequestBody + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyRequestBody + */ + tags?: { [key: string]: string; }; +} + +export interface CompanyReplaceRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyRequestBody + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + * @type {string} + * @memberof CompanyRequestBody + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyRequestBody + */ + tags?: { [key: string]: string; }; +} + +export interface CreateCompanyCompanyRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyRequestBody + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + * @type {string} + * @memberof CompanyRequestBody + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyRequestBody + */ + tags?: { [key: string]: string; }; +} + +export interface CreateCompanyRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyRequestBody + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + * @type {string} + * @memberof CompanyRequestBody + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyRequestBody + */ + tags?: { [key: string]: string; }; +} + +export interface ReplaceCompanyCompanyRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyRequestBody + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + * @type {string} + * @memberof CompanyRequestBody + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyRequestBody + */ + tags?: { [key: string]: string; }; +} + +export interface ReplaceCompanyRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyRequestBody + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + * @type {string} + * @memberof CompanyRequestBody + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyRequestBody + */ + tags?: { [key: string]: string; }; } diff --git a/lending/src/sdk/models/shared/companyupdaterequest.ts b/lending/src/sdk/models/shared/companyupdaterequest.ts index 442b7a78c..427524499 100644 --- a/lending/src/sdk/models/shared/companyupdaterequest.ts +++ b/lending/src/sdk/models/shared/companyupdaterequest.ts @@ -1,46 +1,144 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; - -export type CompanyUpdateRequest = { - /** - * Name of company being connected. - */ - name?: string | undefined; - /** - * Additional information about the company. This can be used to store foreign IDs, references, etc. - */ - description?: string | undefined; - /** - * A collection of user-defined key-value pairs that store custom metadata against the company. - */ - tags?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export type CompanyUpdateRequest$Outbound = { - name?: string | undefined; - description?: string | undefined; - tags?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export const CompanyUpdateRequest$outboundSchema: z.ZodType< - CompanyUpdateRequest$Outbound, - z.ZodTypeDef, - CompanyUpdateRequest -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - tags: z.record(z.string()).optional(), -}); - -export function companyUpdateRequestToJSON( - companyUpdateRequest: CompanyUpdateRequest, -): string { - return JSON.stringify( - CompanyUpdateRequest$outboundSchema.parse(companyUpdateRequest), - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface CompanyUpdateRequest + */ +export interface CompanyUpdateRequest { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyUpdateRequest + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyUpdateRequest + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyUpdateRequest + */ + tags?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the CompanyUpdateRequest interface. + */ +export function instanceOfCompanyUpdateRequest(value: object): value is CompanyUpdateRequest { + return true; +} + +export function CompanyUpdateRequestFromJSON(json: any): CompanyUpdateRequest { + return CompanyUpdateRequestFromJSONTyped(json, false); +} + +export function CompanyUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompanyUpdateRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'tags': json['tags'] == null ? undefined : json['tags'], + }; +} + +export function CompanyUpdateRequestToJSON(json: any): CompanyUpdateRequest { + return CompanyUpdateRequestToJSONTyped(json, false); +} + +export function CompanyUpdateRequestToJSONTyped(value?: CompanyUpdateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'description': value['description'], + 'tags': value['tags'], + }; +} + + +export interface CompanyUpdateRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyUpdateRequest + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyUpdateRequest + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyUpdateRequest + */ + tags?: { [key: string]: string; }; +} + +export interface UpdateCompanyCompanyUpdateRequest { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyUpdateRequest + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyUpdateRequest + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyUpdateRequest + */ + tags?: { [key: string]: string; }; +} + +export interface UpdateCompanyRequestBody { + /** + * Name of company being connected. + * @type {string} + * @memberof CompanyUpdateRequest + */ + name?: string; + /** + * A description of the property. + * @type {string} + * @memberof CompanyUpdateRequest + */ + description?: string; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + * @type {{ [key: string]: string; }} + * @memberof CompanyUpdateRequest + */ + tags?: { [key: string]: string; }; } diff --git a/lending/src/sdk/models/shared/connection.ts b/lending/src/sdk/models/shared/connection.ts index 6f994aba7..5cec278fe 100644 --- a/lending/src/sdk/models/shared/connection.ts +++ b/lending/src/sdk/models/shared/connection.ts @@ -1,164 +1,2257 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { SourceType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import type { DataConnectionStatus } from './dataconnectionstatus'; import { - DataConnectionError, - DataConnectionError$inboundSchema, -} from "./dataconnectionerror.js"; + DataConnectionStatusFromJSON, + DataConnectionStatusFromJSONTyped, + DataConnectionStatusToJSON, + DataConnectionStatusToJSONTyped, +} from './dataconnectionstatus'; +import type { DataConnectionError } from './dataconnectionerror'; import { - DataConnectionStatus, - DataConnectionStatus$inboundSchema, -} from "./dataconnectionstatus.js"; - -/** - * The type of platform of the connection. - */ -export const SourceType = { - Accounting: "Accounting", - Banking: "Banking", - BankFeed: "BankFeed", - Commerce: "Commerce", - Expense: "Expense", - Other: "Other", - Unknown: "Unknown", -} as const; -/** - * The type of platform of the connection. - */ -export type SourceType = ClosedEnum; + DataConnectionErrorFromJSON, + DataConnectionErrorFromJSONTyped, + DataConnectionErrorToJSON, + DataConnectionErrorToJSONTyped, +} from './dataconnectionerror'; /** - * A connection represents a [company's](https://docs.codat.io/lending-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. - * - * @remarks - * + * A connection represents a [company's](https://docs.codat.io/lending-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + * * A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: - * + * * - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. * - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. * - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. * Any combination of accounting, banking, and commerce data connections is allowed. - * + * * Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + * @export + * @interface Connection + */ +export interface Connection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + + +/** + * @export */ -export type Connection = { - /** - * Unique identifier for a company's data connection. - */ - id: string; - /** - * A Codat ID representing the integration. - */ - integrationId: string; - /** - * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. - */ - integrationKey?: string | undefined; - /** - * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. - */ - sourceId: string; - /** - * The type of platform of the connection. - */ - sourceType: SourceType; - /** - * Name of integration connected to company. - */ - platformName: string; - /** - * The link URL your customers can use to authorize access to their business application. - */ - linkUrl: string; - /** - * The current authorization status of the data connection. - */ - status: DataConnectionStatus; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - lastSync?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00:00` - * - UTC time offsets: `2021-11-15T01:00:00-05:00` - * - * > Time zones - * > - * > Not all dates from Codat will contain information about time zones. - * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - */ - created: string; - dataConnectionErrors?: Array | null | undefined; - connectionInfo?: { [k: string]: any } | null | undefined; -}; - -/** @internal */ -export const SourceType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(SourceType); - -/** @internal */ -export const Connection$inboundSchema: z.ZodType< - Connection, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - integrationId: z.string(), - integrationKey: z.string().optional(), - sourceId: z.string(), - sourceType: SourceType$inboundSchema, - platformName: z.string(), - linkUrl: z.string(), - status: DataConnectionStatus$inboundSchema, - lastSync: z.string().optional(), - created: z.string(), - dataConnectionErrors: z.nullable(z.array(DataConnectionError$inboundSchema)) - .optional(), - connectionInfo: z.nullable(z.record(z.any())).optional(), -}); - -export function connectionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Connection$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Connection' from JSON`, - ); +export const ConnectionSourceTypeEnum = { + Accounting: 'Accounting', + Banking: 'Banking', + BankFeed: 'BankFeed', + Commerce: 'Commerce', + Expense: 'Expense', + Other: 'Other', + Unknown: 'Unknown' +} as const; +export type ConnectionSourceTypeEnum = typeof ConnectionSourceTypeEnum[keyof typeof ConnectionSourceTypeEnum]; + + +/** + * Check if a given object implements the Connection interface. + */ +export function instanceOfConnection(value: object): value is Connection { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('integrationId' in value) || value['integrationId'] === undefined) return false; + if (!('sourceId' in value) || value['sourceId'] === undefined) return false; + if (!('sourceType' in value) || value['sourceType'] === undefined) return false; + if (!('platformName' in value) || value['platformName'] === undefined) return false; + if (!('linkUrl' in value) || value['linkUrl'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + return true; +} + +export function ConnectionFromJSON(json: any): Connection { + return ConnectionFromJSONTyped(json, false); +} + +export function ConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Connection { + if (json == null) { + return json; + } + return { + + ...json, + 'id': json['id'], + 'integrationId': json['integrationId'], + 'integrationKey': json['integrationKey'] == null ? undefined : json['integrationKey'], + 'sourceId': json['sourceId'], + 'sourceType': json['sourceType'], + 'platformName': json['platformName'], + 'linkUrl': json['linkUrl'], + 'status': DataConnectionStatusFromJSON(json['status']), + 'lastSync': json['lastSync'] == null ? undefined : json['lastSync'], + 'created': json['created'], + 'dataConnectionErrors': json['dataConnectionErrors'] == null ? undefined : ((json['dataConnectionErrors'] as Array).map(DataConnectionErrorFromJSON)), + 'connectionInfo': json['connectionInfo'] == null ? undefined : json['connectionInfo'], + }; +} + +export function ConnectionToJSON(json: any): Connection { + return ConnectionToJSONTyped(json, false); +} + +export function ConnectionToJSONTyped(value?: Connection | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'id': value['id'], + 'integrationId': value['integrationId'], + 'integrationKey': value['integrationKey'], + 'sourceId': value['sourceId'], + 'sourceType': value['sourceType'], + 'platformName': value['platformName'], + 'linkUrl': value['linkUrl'], + 'status': DataConnectionStatusToJSON(value['status']), + 'lastSync': value['lastSync'], + 'created': value['created'], + 'dataConnectionErrors': value['dataConnectionErrors'] == null ? undefined : ((value['dataConnectionErrors'] as Array).map(DataConnectionErrorToJSON)), + 'connectionInfo': value['connectionInfo'], + }; +} + + +export interface CompanyConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface CompanyCreateResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface CompanyGetResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface CompanyReplaceResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface CompanyUpdateResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface ConnectionCreateResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface ConnectionGetResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface ConnectionUnlinkResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface ConnectionsConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface ConnectionsListResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface CreateCompanyResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface CreateConnectionResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface GetCompanyResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface GetConnectionResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface ListConnectionsResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface ReplaceCompanyResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface UnlinkConnectionResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; +} + +export interface UpdateCompanyResponseConnection { + [key: string]: any | any; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof Connection + */ + id: string; + /** + * A Codat ID representing the integration. + * @type {string} + * @memberof Connection + */ + integrationId: string; + /** + * A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + * @type {string} + * @memberof Connection + */ + integrationKey?: string; + /** + * A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + * @type {string} + * @memberof Connection + */ + sourceId: string; + /** + * The type of platform of the connection. + * @type {string} + * @memberof Connection + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + * @type {string} + * @memberof Connection + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + * @type {string} + * @memberof Connection + */ + linkUrl: string; + /** + * + * @type {DataConnectionStatus} + * @memberof Connection + */ + status: DataConnectionStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + lastSync?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Connection + */ + created: string; + /** + * + * @type {Array} + * @memberof Connection + */ + dataConnectionErrors?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Connection + */ + connectionInfo?: { [key: string]: any; } | null; } diff --git a/lending/src/sdk/models/shared/connections.ts b/lending/src/sdk/models/shared/connections.ts index 1278d54c3..93f06e60d 100644 --- a/lending/src/sdk/models/shared/connections.ts +++ b/lending/src/sdk/models/shared/connections.ts @@ -1,55 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { Connection, Connection$inboundSchema } from "./connection.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type Connections = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const Connections$inboundSchema: z.ZodType< - Connections, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(Connection$inboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function connectionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Connections$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Connections' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import type { Connection } from './connection'; +import { + ConnectionFromJSON, + ConnectionFromJSONTyped, + ConnectionToJSON, + ConnectionToJSONTyped, +} from './connection'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface Connections + */ +export interface Connections { + /** + * Current page number. + * @type {number} + * @memberof Connections + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Connections + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Connections + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Connections + */ + links: Links; + /** + * + * @type {Array} + * @memberof Connections + */ + results?: Array; +} + +/** + * Check if a given object implements the Connections interface. + */ +export function instanceOfConnections(value: object): value is Connections { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function ConnectionsFromJSON(json: any): Connections { + return ConnectionsFromJSONTyped(json, false); +} + +export function ConnectionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Connections { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(ConnectionFromJSON)), + }; +} + +export function ConnectionsToJSON(json: any): Connections { + return ConnectionsToJSONTyped(json, false); +} + +export function ConnectionsToJSONTyped(value?: Connections | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(ConnectionToJSON)), + }; +} + + +export interface ConnectionsListResponseConnections { + /** + * Current page number. + * @type {number} + * @memberof Connections + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Connections + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Connections + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Connections + */ + links: Links; + /** + * + * @type {Array} + * @memberof Connections + */ + results?: Array; +} + +export interface ListConnectionsResponseConnections { + /** + * Current page number. + * @type {number} + * @memberof Connections + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Connections + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Connections + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Connections + */ + links: Links; + /** + * + * @type {Array} + * @memberof Connections + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/contact.ts b/lending/src/sdk/models/shared/contact.ts index c1a33d458..bfdad250e 100644 --- a/lending/src/sdk/models/shared/contact.ts +++ b/lending/src/sdk/models/shared/contact.ts @@ -1,80 +1,319 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { CustomerStatus } from './customerstatus'; import { - AccountingAddress, - AccountingAddress$inboundSchema, -} from "./accountingaddress.js"; + CustomerStatusFromJSON, + CustomerStatusFromJSONTyped, + CustomerStatusToJSON, + CustomerStatusToJSONTyped, +} from './customerstatus'; +import type { AccountingAddress } from './accountingaddress'; import { - CustomerStatus, - CustomerStatus$inboundSchema, -} from "./customerstatus.js"; -import { PhoneNumber, PhoneNumber$inboundSchema } from "./phonenumber.js"; + AccountingAddressFromJSON, + AccountingAddressFromJSONTyped, + AccountingAddressToJSON, + AccountingAddressToJSONTyped, +} from './accountingaddress'; +import type { PhoneNumber } from './phonenumber'; +import { + PhoneNumberFromJSON, + PhoneNumberFromJSONTyped, + PhoneNumberToJSON, + PhoneNumberToJSONTyped, +} from './phonenumber'; + +/** + * + * @export + * @interface Contact + */ +export interface Contact { + /** + * Name of a contact for a customer. + * @type {string} + * @memberof Contact + */ + name?: string | null; + /** + * Email of a contact for a customer. + * @type {string} + * @memberof Contact + */ + email?: string | null; + /** + * An array of Phone numbers. + * @type {Array} + * @memberof Contact + */ + phone?: Array | null; + /** + * An object of Address information. + * @type {AccountingAddress} + * @memberof Contact + */ + address?: AccountingAddress; + /** + * + * @type {CustomerStatus} + * @memberof Contact + */ + status: CustomerStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Contact + */ + modifiedDate?: string; +} + -export type Contact = { - /** - * Name of a contact for a customer. - */ - name?: string | null | undefined; - /** - * Email of a contact for a customer. - */ - email?: string | null | undefined; - /** - * An array of Phone numbers. - */ - phone?: Array | null | undefined; - address?: AccountingAddress | undefined; - /** - * Status of customer. - */ - status: CustomerStatus; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - modifiedDate?: string | undefined; -}; -/** @internal */ -export const Contact$inboundSchema: z.ZodType = - z.object({ - name: z.nullable(z.string()).optional(), - email: z.nullable(z.string()).optional(), - phone: z.nullable(z.array(PhoneNumber$inboundSchema)).optional(), - address: AccountingAddress$inboundSchema.optional(), - status: CustomerStatus$inboundSchema, - modifiedDate: z.string().optional(), - }); +/** + * Check if a given object implements the Contact interface. + */ +export function instanceOfContact(value: object): value is Contact { + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} + +export function ContactFromJSON(json: any): Contact { + return ContactFromJSONTyped(json, false); +} + +export function ContactFromJSONTyped(json: any, ignoreDiscriminator: boolean): Contact { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'email': json['email'] == null ? undefined : json['email'], + 'phone': json['phone'] == null ? undefined : ((json['phone'] as Array).map(PhoneNumberFromJSON)), + 'address': json['address'] == null ? undefined : AccountingAddressFromJSON(json['address']), + 'status': CustomerStatusFromJSON(json['status']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + }; +} + +export function ContactToJSON(json: any): Contact { + return ContactToJSONTyped(json, false); +} + +export function ContactToJSONTyped(value?: Contact | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'email': value['email'], + 'phone': value['phone'] == null ? undefined : ((value['phone'] as Array).map(PhoneNumberToJSON)), + 'address': AccountingAddressToJSON(value['address']), + 'status': CustomerStatusToJSON(value['status']), + 'modifiedDate': value['modifiedDate'], + }; +} + + +export interface AccountingCustomerContact { + /** + * Name of a contact for a customer. + * @type {string} + * @memberof Contact + */ + name?: string | null; + /** + * Email of a contact for a customer. + * @type {string} + * @memberof Contact + */ + email?: string | null; + /** + * An array of Phone numbers. + * @type {Array} + * @memberof Contact + */ + phone?: Array | null; + /** + * An object of Address information. + * @type {AccountingAddress} + * @memberof Contact + */ + address?: AccountingAddress; + /** + * + * @type {CustomerStatus} + * @memberof Contact + */ + status: CustomerStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Contact + */ + modifiedDate?: string; +} + +export interface AccountingCustomerGetResponseContact { + /** + * Name of a contact for a customer. + * @type {string} + * @memberof Contact + */ + name?: string | null; + /** + * Email of a contact for a customer. + * @type {string} + * @memberof Contact + */ + email?: string | null; + /** + * An array of Phone numbers. + * @type {Array} + * @memberof Contact + */ + phone?: Array | null; + /** + * An object of Address information. + * @type {AccountingAddress} + * @memberof Contact + */ + address?: AccountingAddress; + /** + * + * @type {CustomerStatus} + * @memberof Contact + */ + status: CustomerStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Contact + */ + modifiedDate?: string; +} -export function contactFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Contact$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Contact' from JSON`, - ); +export interface GetAccountingCustomerResponseContact { + /** + * Name of a contact for a customer. + * @type {string} + * @memberof Contact + */ + name?: string | null; + /** + * Email of a contact for a customer. + * @type {string} + * @memberof Contact + */ + email?: string | null; + /** + * An array of Phone numbers. + * @type {Array} + * @memberof Contact + */ + phone?: Array | null; + /** + * An object of Address information. + * @type {AccountingAddress} + * @memberof Contact + */ + address?: AccountingAddress; + /** + * + * @type {CustomerStatus} + * @memberof Contact + */ + status: CustomerStatus; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Contact + */ + modifiedDate?: string; } diff --git a/lending/src/sdk/models/shared/contactref.ts b/lending/src/sdk/models/shared/contactref.ts index 79872d840..717fe4f37 100644 --- a/lending/src/sdk/models/shared/contactref.ts +++ b/lending/src/sdk/models/shared/contactref.ts @@ -1,79 +1,356 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { ContactRefDataType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface ContactRef + */ +export interface ContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + /** - * Allowed name of the 'dataType'. + * @export */ -export const ContactRefDataType = { - Customers: "customers", - Suppliers: "suppliers", +export const ContactRefDataTypeEnum = { + Customers: 'customers', + Suppliers: 'suppliers' } as const; +export type ContactRefDataTypeEnum = typeof ContactRefDataTypeEnum[keyof typeof ContactRefDataTypeEnum]; + + /** - * Allowed name of the 'dataType'. + * Check if a given object implements the ContactRef interface. */ -export type ContactRefDataType = ClosedEnum; - -export type ContactRef = { - /** - * Unique identifier for a customer or supplier. - */ - id: string; - /** - * Allowed name of the 'dataType'. - */ - dataType?: ContactRefDataType | null | undefined; -}; - -/** @internal */ -export const ContactRefDataType$inboundSchema: z.ZodNativeEnum< - typeof ContactRefDataType -> = z.nativeEnum(ContactRefDataType); -/** @internal */ -export const ContactRefDataType$outboundSchema: z.ZodNativeEnum< - typeof ContactRefDataType -> = ContactRefDataType$inboundSchema; - -/** @internal */ -export const ContactRef$inboundSchema: z.ZodType< - ContactRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - dataType: z.nullable(ContactRefDataType$inboundSchema).optional(), -}); -/** @internal */ -export type ContactRef$Outbound = { - id: string; - dataType?: string | null | undefined; -}; - -/** @internal */ -export const ContactRef$outboundSchema: z.ZodType< - ContactRef$Outbound, - z.ZodTypeDef, - ContactRef -> = z.object({ - id: z.string(), - dataType: z.nullable(ContactRefDataType$outboundSchema).optional(), -}); - -export function contactRefToJSON(contactRef: ContactRef): string { - return JSON.stringify(ContactRef$outboundSchema.parse(contactRef)); -} -export function contactRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ContactRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ContactRef' from JSON`, - ); +export function instanceOfContactRef(value: object): value is ContactRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function ContactRefFromJSON(json: any): ContactRef { + return ContactRefFromJSONTyped(json, false); +} + +export function ContactRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} + +export function ContactRefToJSON(json: any): ContactRef { + return ContactRefToJSONTyped(json, false); +} + +export function ContactRefToJSONTyped(value?: ContactRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataType': value['dataType'], + }; +} + + +export interface AccountingCreateDirectCostResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingCreateTransferResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingDirectCostContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingDirectCostGetResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingDirectCostsContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingDirectIncomeContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingDirectIncomeGetResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingDirectIncomesContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingTransferContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingTransferGetResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface AccountingTransfersContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface CreateDirectCostResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface CreateTransferResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface DirectCostCreateResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface GetAccountingDirectCostResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface GetAccountingDirectIncomeResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface GetAccountingTransferResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; +} + +export interface TransferCreateResponseContactRef { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactRef + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactRef + */ + dataType?: ContactRefDataType; } diff --git a/lending/src/sdk/models/shared/contactreference.ts b/lending/src/sdk/models/shared/contactreference.ts new file mode 100644 index 000000000..63ad7ace9 --- /dev/null +++ b/lending/src/sdk/models/shared/contactreference.ts @@ -0,0 +1,371 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { JournalLineDataType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface ContactReference + */ +export interface ContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + + +/** + * @export + */ +export const ContactReferenceDataTypeEnum = { + Customers: 'customers', + Suppliers: 'suppliers' +} as const; +export type ContactReferenceDataTypeEnum = typeof ContactReferenceDataTypeEnum[keyof typeof ContactReferenceDataTypeEnum]; + + +/** + * Check if a given object implements the ContactReference interface. + */ +export function instanceOfContactReference(value: object): value is ContactReference { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function ContactReferenceFromJSON(json: any): ContactReference { + return ContactReferenceFromJSONTyped(json, false); +} + +export function ContactReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} + +export function ContactReferenceToJSON(json: any): ContactReference { + return ContactReferenceToJSONTyped(json, false); +} + +export function ContactReferenceToJSONTyped(value?: ContactReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataType': value['dataType'], + }; +} + + +export interface AccountingCreateDirectCostResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingCreateTransferResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingDirectCostContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingDirectCostGetResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingDirectCostsContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingDirectIncomeContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingDirectIncomeGetResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingDirectIncomesContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingJournalEntryContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingTransferContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingTransferGetResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface AccountingTransfersContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface CreateDirectCostResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface CreateTransferResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface DirectCostCreateResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface GetAccountingDirectCostResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface GetAccountingDirectIncomeResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface GetAccountingTransferResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} + +export interface TransferCreateResponseContactReference { + /** + * Unique identifier for a customer or supplier. + * @type {string} + * @memberof ContactReference + */ + id: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof ContactReference + */ + dataType?: JournalLineDataType | null; +} diff --git a/lending/src/sdk/models/shared/createbankaccounttransaction.ts b/lending/src/sdk/models/shared/createbankaccounttransaction.ts index 79eed4297..b6e8fa1d3 100644 --- a/lending/src/sdk/models/shared/createbankaccounttransaction.ts +++ b/lending/src/sdk/models/shared/createbankaccounttransaction.ts @@ -1,107 +1,320 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface CreateBankAccountTransaction + */ +export interface CreateBankAccountTransaction { + /** + * Identifier for the bank account transaction, unique for the company in the accounting software. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + id?: string; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + amount?: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + date?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + description?: string; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + balance?: Decimal | number; +} -export type CreateBankAccountTransaction = { - /** - * Identifier for the bank account transaction, unique for the company in the accounting software. - */ - id?: string | undefined; - /** - * The amount transacted in the bank transaction. - */ - amount?: Decimal$ | number | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * Description of the bank transaction. - */ - description?: string | undefined; - /** - * The remaining balance in the account with ID `accountId`. - */ - balance?: Decimal$ | number | undefined; -}; +/** + * Check if a given object implements the CreateBankAccountTransaction interface. + */ +export function instanceOfCreateBankAccountTransaction(value: object): value is CreateBankAccountTransaction { + return true; +} -/** @internal */ -export const CreateBankAccountTransaction$inboundSchema: z.ZodType< - CreateBankAccountTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - date: z.string().optional(), - description: z.string().optional(), - balance: z.number().transform(v => new Decimal$(v)).optional(), -}); -/** @internal */ -export type CreateBankAccountTransaction$Outbound = { - id?: string | undefined; - amount?: number | undefined; - date?: string | undefined; - description?: string | undefined; - balance?: number | undefined; -}; +export function CreateBankAccountTransactionFromJSON(json: any): CreateBankAccountTransaction { + return CreateBankAccountTransactionFromJSONTyped(json, false); +} + +export function CreateBankAccountTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateBankAccountTransaction { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'date': json['date'] == null ? undefined : json['date'], + 'description': json['description'] == null ? undefined : json['description'], + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + }; +} + +export function CreateBankAccountTransactionToJSON(json: any): CreateBankAccountTransaction { + return CreateBankAccountTransactionToJSONTyped(json, false); +} -/** @internal */ -export const CreateBankAccountTransaction$outboundSchema: z.ZodType< - CreateBankAccountTransaction$Outbound, - z.ZodTypeDef, - CreateBankAccountTransaction -> = z.object({ - id: z.string().optional(), - amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), - date: z.string().optional(), - description: z.string().optional(), - balance: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), -}); +export function CreateBankAccountTransactionToJSONTyped(value?: CreateBankAccountTransaction | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function createBankAccountTransactionToJSON( - createBankAccountTransaction: CreateBankAccountTransaction, -): string { - return JSON.stringify( - CreateBankAccountTransaction$outboundSchema.parse( - createBankAccountTransaction, - ), - ); + return { + + 'id': value['id'], + 'amount': fromDecimal(value['amount']), + 'date': value['date'], + 'description': value['description'], + 'balance': fromDecimal(value['balance']), + }; } -export function createBankAccountTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateBankAccountTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateBankAccountTransaction' from JSON`, - ); + + +export interface AccountingCreateBankAccountTransactionsCreateBankAccountTransaction { + /** + * Identifier for the bank account transaction, unique for the company in the accounting software. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + id?: string; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + amount?: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + date?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + description?: string; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + balance?: Decimal | number; +} + +export interface AccountingCreateBankTransactionsCreateBankAccountTransaction { + /** + * Identifier for the bank account transaction, unique for the company in the accounting software. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + id?: string; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + amount?: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + date?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + description?: string; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + balance?: Decimal | number; +} + +export interface AccountingCreateBankTransactionsResponseCreateBankAccountTransaction { + /** + * Identifier for the bank account transaction, unique for the company in the accounting software. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + id?: string; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + amount?: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + date?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + description?: string; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + balance?: Decimal | number; +} + +export interface AccountingCreateUpdateBankTransactionResponseCreateBankAccountTransaction { + /** + * Identifier for the bank account transaction, unique for the company in the accounting software. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + id?: string; + /** + * The amount transacted in the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + amount?: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + date?: string; + /** + * Description of the bank transaction. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + description?: string; + /** + * The remaining balance in the account with ID `accountId`. + * @type {string} + * @memberof CreateBankAccountTransaction + */ + balance?: Decimal | number; } diff --git a/lending/src/sdk/models/shared/creditnotelineitem.ts b/lending/src/sdk/models/shared/creditnotelineitem.ts index b5a5be9cc..1a702fa60 100644 --- a/lending/src/sdk/models/shared/creditnotelineitem.ts +++ b/lending/src/sdk/models/shared/creditnotelineitem.ts @@ -1,131 +1,470 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; +import type { PropertieItemRef } from '../_speakeasy_hoisted'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ItemReference } from './itemreference'; import { - AccountsReceivableTracking, - AccountsReceivableTracking$inboundSchema, -} from "./accountsreceivabletracking.js"; + ItemReferenceFromJSON, + ItemReferenceFromJSONTyped, + ItemReferenceToJSON, + ItemReferenceToJSONTyped, +} from './itemreference'; +import type { TaxRateRef } from './taxrateref'; import { - PropertieItemRef, - PropertieItemRef$inboundSchema, -} from "./propertieitemref.js"; -import { TaxRateRef, TaxRateRef$inboundSchema } from "./taxrateref.js"; + TaxRateRefFromJSON, + TaxRateRefFromJSONTyped, + TaxRateRefToJSON, + TaxRateRefToJSONTyped, +} from './taxrateref'; +import type { TrackingCategoryRef } from './trackingcategoryref'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, -} from "./trackingcategoryref.js"; + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { AccountsReceivableTracking } from './accountsreceivabletracking'; +import { + AccountsReceivableTrackingFromJSON, + AccountsReceivableTrackingFromJSONTyped, + AccountsReceivableTrackingToJSON, + AccountsReceivableTrackingToJSONTyped, +} from './accountsreceivabletracking'; +import type { AccountRef } from './accountref'; +import { + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; + +/** + * + * @export + * @interface CreditNoteLineItem + */ +export interface CreditNoteLineItem { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been issued. + * @type {string} + * @memberof CreditNoteLineItem + */ + description?: string | null; + /** + * Unit price of the goods or service. + * @type {string} + * @memberof CreditNoteLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of the goods or service for which credit has been issued. + * @type {string} + * @memberof CreditNoteLineItem + */ + quantity: Decimal | number; + /** + * Value of any discounts applied. + * @type {string} + * @memberof CreditNoteLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + * @type {string} + * @memberof CreditNoteLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax associated with the line item. + * @type {string} + * @memberof CreditNoteLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof CreditNoteLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof CreditNoteLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate of any discount applied to the line item. + * @type {string} + * @memberof CreditNoteLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof CreditNoteLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the item the line is linked to. + * @type {ItemReference} + * @memberof CreditNoteLineItem + */ + itemRef?: PropertieItemRef; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof CreditNoteLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsReceivableTracking} + * @memberof CreditNoteLineItem + */ + tracking?: AccountsReceivableTracking; + /** + * The credit note is a direct income if `True`. + * @type {boolean} + * @memberof CreditNoteLineItem + */ + isDirectIncome?: boolean; +} + +/** + * Check if a given object implements the CreditNoteLineItem interface. + */ +export function instanceOfCreditNoteLineItem(value: object): value is CreditNoteLineItem { + if (!('unitAmount' in value) || value['unitAmount'] === undefined) return false; + if (!('quantity' in value) || value['quantity'] === undefined) return false; + return true; +} + +export function CreditNoteLineItemFromJSON(json: any): CreditNoteLineItem { + return CreditNoteLineItemFromJSONTyped(json, false); +} + +export function CreditNoteLineItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreditNoteLineItem { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'unitAmount': json['unitAmount'], + 'quantity': json['quantity'], + 'discountAmount': json['discountAmount'] == null ? undefined : toDecimal(json['discountAmount']), + 'subTotal': json['subTotal'] == null ? undefined : toDecimal(json['subTotal']), + 'taxAmount': json['taxAmount'] == null ? undefined : toDecimal(json['taxAmount']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'discountPercentage': json['discountPercentage'] == null ? undefined : toDecimal(json['discountPercentage']), + 'taxRateRef': json['taxRateRef'] == null ? undefined : TaxRateRefFromJSON(json['taxRateRef']), + 'itemRef': json['itemRef'] == null ? undefined : ItemReferenceFromJSON(json['itemRef']), + 'trackingCategoryRefs': json['trackingCategoryRefs'] == null ? undefined : ((json['trackingCategoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'tracking': json['tracking'] == null ? undefined : AccountsReceivableTrackingFromJSON(json['tracking']), + 'isDirectIncome': json['isDirectIncome'] == null ? undefined : json['isDirectIncome'], + }; +} + +export function CreditNoteLineItemToJSON(json: any): CreditNoteLineItem { + return CreditNoteLineItemToJSONTyped(json, false); +} + +export function CreditNoteLineItemToJSONTyped(value?: CreditNoteLineItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'description': value['description'], + 'unitAmount': fromDecimal(value['unitAmount']), + 'quantity': fromDecimal(value['quantity']), + 'discountAmount': fromDecimal(value['discountAmount']), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'taxRateRef': TaxRateRefToJSON(value['taxRateRef']), + 'itemRef': ItemReferenceToJSON(value['itemRef']), + 'trackingCategoryRefs': value['trackingCategoryRefs'] == null ? undefined : ((value['trackingCategoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'tracking': AccountsReceivableTrackingToJSON(value['tracking']), + 'isDirectIncome': value['isDirectIncome'], + }; +} -export type CreditNoteLineItem = { - /** - * Friendly name of each line item. For example, the goods or service for which credit has been issued. - */ - description?: string | null | undefined; - /** - * Unit price of the goods or service. - */ - unitAmount: Decimal$ | number; - /** - * Number of units of the goods or service for which credit has been issued. - */ - quantity: Decimal$ | number; - /** - * Value of any discounts applied. - */ - discountAmount?: Decimal$ | number | null | undefined; - /** - * Amount of credit associated with the line item, including discounts but excluding tax. - */ - subTotal?: Decimal$ | number | null | undefined; - /** - * Amount of tax associated with the line item. - */ - taxAmount?: Decimal$ | number | null | undefined; - /** - * Total amount of the line item, including discounts and tax. - */ - totalAmount?: Decimal$ | number | null | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * Percentage rate of any discount applied to the line item. - */ - discountPercentage?: Decimal$ | number | null | undefined; - /** - * 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. - * - * @remarks - * - * Found on: - * - * - Bill line items - * - Bill Credit Note line items - * - Credit Note line items - * - Direct incomes line items - * - Invoice line items - * - Items - */ - taxRateRef?: TaxRateRef | undefined; - /** - * Reference to the item the line is linked to. - */ - itemRef?: PropertieItemRef | undefined; - /** - * Reference to the tracking categories to which the line item is linked. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - trackingCategoryRefs?: Array | null | undefined; - /** - * Categories, and a project and customer, against which the item is tracked. - */ - tracking?: AccountsReceivableTracking | undefined; - /** - * The credit note is a direct income if `True`. - */ - isDirectIncome?: boolean | undefined; -}; -/** @internal */ -export const CreditNoteLineItem$inboundSchema: z.ZodType< - CreditNoteLineItem, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.nullable(z.string()).optional(), - unitAmount: z.number().transform(v => new Decimal$(v)), - quantity: z.number().transform(v => new Decimal$(v)), - discountAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - taxAmount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - totalAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - accountRef: AccountRef$inboundSchema.optional(), - discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - taxRateRef: TaxRateRef$inboundSchema.optional(), - itemRef: PropertieItemRef$inboundSchema.optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) - .optional(), - tracking: AccountsReceivableTracking$inboundSchema.optional(), - isDirectIncome: z.boolean().optional(), -}); +export interface AccountingCreditNoteCreditNoteLineItem { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been issued. + * @type {string} + * @memberof CreditNoteLineItem + */ + description?: string | null; + /** + * Unit price of the goods or service. + * @type {string} + * @memberof CreditNoteLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of the goods or service for which credit has been issued. + * @type {string} + * @memberof CreditNoteLineItem + */ + quantity: Decimal | number; + /** + * Value of any discounts applied. + * @type {string} + * @memberof CreditNoteLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + * @type {string} + * @memberof CreditNoteLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax associated with the line item. + * @type {string} + * @memberof CreditNoteLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof CreditNoteLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof CreditNoteLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate of any discount applied to the line item. + * @type {string} + * @memberof CreditNoteLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof CreditNoteLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the item the line is linked to. + * @type {ItemReference} + * @memberof CreditNoteLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof CreditNoteLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsReceivableTracking} + * @memberof CreditNoteLineItem + */ + tracking?: AccountsReceivableTracking; + /** + * The credit note is a direct income if `True`. + * @type {boolean} + * @memberof CreditNoteLineItem + */ + isDirectIncome?: boolean; +} + +export interface AccountingCreditNoteGetResponseCreditNoteLineItem { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been issued. + * @type {string} + * @memberof CreditNoteLineItem + */ + description?: string | null; + /** + * Unit price of the goods or service. + * @type {string} + * @memberof CreditNoteLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of the goods or service for which credit has been issued. + * @type {string} + * @memberof CreditNoteLineItem + */ + quantity: Decimal | number; + /** + * Value of any discounts applied. + * @type {string} + * @memberof CreditNoteLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + * @type {string} + * @memberof CreditNoteLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax associated with the line item. + * @type {string} + * @memberof CreditNoteLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof CreditNoteLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof CreditNoteLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate of any discount applied to the line item. + * @type {string} + * @memberof CreditNoteLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof CreditNoteLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the item the line is linked to. + * @type {ItemReference} + * @memberof CreditNoteLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof CreditNoteLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsReceivableTracking} + * @memberof CreditNoteLineItem + */ + tracking?: AccountsReceivableTracking; + /** + * The credit note is a direct income if `True`. + * @type {boolean} + * @memberof CreditNoteLineItem + */ + isDirectIncome?: boolean; +} -export function creditNoteLineItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreditNoteLineItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreditNoteLineItem' from JSON`, - ); +export interface GetAccountingCreditNoteResponseCreditNoteLineItem { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been issued. + * @type {string} + * @memberof CreditNoteLineItem + */ + description?: string | null; + /** + * Unit price of the goods or service. + * @type {string} + * @memberof CreditNoteLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of the goods or service for which credit has been issued. + * @type {string} + * @memberof CreditNoteLineItem + */ + quantity: Decimal | number; + /** + * Value of any discounts applied. + * @type {string} + * @memberof CreditNoteLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + * @type {string} + * @memberof CreditNoteLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax associated with the line item. + * @type {string} + * @memberof CreditNoteLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof CreditNoteLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof CreditNoteLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate of any discount applied to the line item. + * @type {string} + * @memberof CreditNoteLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof CreditNoteLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the item the line is linked to. + * @type {ItemReference} + * @memberof CreditNoteLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof CreditNoteLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsReceivableTracking} + * @memberof CreditNoteLineItem + */ + tracking?: AccountsReceivableTracking; + /** + * The credit note is a direct income if `True`. + * @type {boolean} + * @memberof CreditNoteLineItem + */ + isDirectIncome?: boolean; } diff --git a/lending/src/sdk/models/shared/creditnotestatus.ts b/lending/src/sdk/models/shared/creditnotestatus.ts index e1e3db6ba..69ae83a7e 100644 --- a/lending/src/sdk/models/shared/creditnotestatus.ts +++ b/lending/src/sdk/models/shared/creditnotestatus.ts @@ -1,27 +1,57 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Current state of the credit note. + * @export */ export const CreditNoteStatus = { - Unknown: "Unknown", - Draft: "Draft", - Submitted: "Submitted", - Paid: "Paid", - Void: "Void", - PartiallyPaid: "PartiallyPaid", + Unknown: 'Unknown', + Draft: 'Draft', + Submitted: 'Submitted', + Paid: 'Paid', + Void: 'Void', + PartiallyPaid: 'PartiallyPaid' } as const; -/** - * Current state of the credit note. - */ -export type CreditNoteStatus = ClosedEnum; +export type CreditNoteStatus = typeof CreditNoteStatus[keyof typeof CreditNoteStatus]; + + +export function instanceOfCreditNoteStatus(value: any): boolean { + for (const key in CreditNoteStatus) { + if (Object.prototype.hasOwnProperty.call(CreditNoteStatus, key)) { + if (CreditNoteStatus[key as keyof typeof CreditNoteStatus] === value) { + return true; + } + } + } + return false; +} + +export function CreditNoteStatusFromJSON(json: any): CreditNoteStatus { + return CreditNoteStatusFromJSONTyped(json, false); +} + +export function CreditNoteStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreditNoteStatus { + return json as CreditNoteStatus; +} + +export function CreditNoteStatusToJSON(value?: CreditNoteStatus | null): any { + return value as any; +} + +export function CreditNoteStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): CreditNoteStatus { + return value as CreditNoteStatus; +} -/** @internal */ -export const CreditNoteStatus$inboundSchema: z.ZodNativeEnum< - typeof CreditNoteStatus -> = z.nativeEnum(CreditNoteStatus); diff --git a/lending/src/sdk/models/shared/customerstatus.ts b/lending/src/sdk/models/shared/customerstatus.ts index f6d3945d5..ef885a401 100644 --- a/lending/src/sdk/models/shared/customerstatus.ts +++ b/lending/src/sdk/models/shared/customerstatus.ts @@ -1,24 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Status of customer. + * @export */ export const CustomerStatus = { - Unknown: "Unknown", - Active: "Active", - Archived: "Archived", + Unknown: 'Unknown', + Active: 'Active', + Archived: 'Archived' } as const; -/** - * Status of customer. - */ -export type CustomerStatus = ClosedEnum; +export type CustomerStatus = typeof CustomerStatus[keyof typeof CustomerStatus]; + + +export function instanceOfCustomerStatus(value: any): boolean { + for (const key in CustomerStatus) { + if (Object.prototype.hasOwnProperty.call(CustomerStatus, key)) { + if (CustomerStatus[key as keyof typeof CustomerStatus] === value) { + return true; + } + } + } + return false; +} + +export function CustomerStatusFromJSON(json: any): CustomerStatus { + return CustomerStatusFromJSONTyped(json, false); +} + +export function CustomerStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomerStatus { + return json as CustomerStatus; +} + +export function CustomerStatusToJSON(value?: CustomerStatus | null): any { + return value as any; +} + +export function CustomerStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): CustomerStatus { + return value as CustomerStatus; +} -/** @internal */ -export const CustomerStatus$inboundSchema: z.ZodNativeEnum< - typeof CustomerStatus -> = z.nativeEnum(CustomerStatus); diff --git a/lending/src/sdk/models/shared/dataconnectionerror.ts b/lending/src/sdk/models/shared/dataconnectionerror.ts index 1cb816d0f..17019e440 100644 --- a/lending/src/sdk/models/shared/dataconnectionerror.ts +++ b/lending/src/sdk/models/shared/dataconnectionerror.ts @@ -1,112 +1,678 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { ErrorStatus } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface DataConnectionError */ +export interface DataConnectionError { + /** + * The HTTP status code returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusCode?: string; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusText?: string; + /** + * A message about a error returned by Codat. + * @type {string} + * @memberof DataConnectionError + */ + errorMessage?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + erroredOnUtc?: string; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + * @type {string} + * @memberof DataConnectionError + */ + status?: ErrorStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + resolvedOnUtc?: string; +} -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** - * The current status of a transient error. Null statuses indicate that the error is not transient. + * @export */ -export const ErrorStatus = { - Active: "Active", - Resolved: "Resolved", +export const DataConnectionErrorStatusEnum = { + Active: 'Active', + Resolved: 'Resolved' } as const; +export type DataConnectionErrorStatusEnum = typeof DataConnectionErrorStatusEnum[keyof typeof DataConnectionErrorStatusEnum]; + + /** - * The current status of a transient error. Null statuses indicate that the error is not transient. + * Check if a given object implements the DataConnectionError interface. */ -export type ErrorStatus = ClosedEnum; - -export type DataConnectionError = { - /** - * The HTTP status code returned by the source platform when the error occurred. - */ - statusCode?: string | undefined; - /** - * A non-numeric status code/text returned by the source platform when the error occurred. - */ - statusText?: string | undefined; - /** - * A message about a error returned by Codat. - */ - errorMessage?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - erroredOnUtc?: string | undefined; - /** - * The current status of a transient error. Null statuses indicate that the error is not transient. - */ - status?: ErrorStatus | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - resolvedOnUtc?: string | undefined; -}; - -/** @internal */ -export const ErrorStatus$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(ErrorStatus); - -/** @internal */ -export const DataConnectionError$inboundSchema: z.ZodType< - DataConnectionError, - z.ZodTypeDef, - unknown -> = z.object({ - statusCode: z.string().optional(), - statusText: z.string().optional(), - errorMessage: z.string().optional(), - erroredOnUtc: z.string().optional(), - status: z.nullable(ErrorStatus$inboundSchema).optional(), - resolvedOnUtc: z.string().optional(), -}); - -export function dataConnectionErrorFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataConnectionError$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataConnectionError' from JSON`, - ); +export function instanceOfDataConnectionError(value: object): value is DataConnectionError { + return true; +} + +export function DataConnectionErrorFromJSON(json: any): DataConnectionError { + return DataConnectionErrorFromJSONTyped(json, false); +} + +export function DataConnectionErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataConnectionError { + if (json == null) { + return json; + } + return { + + 'statusCode': json['statusCode'] == null ? undefined : json['statusCode'], + 'statusText': json['statusText'] == null ? undefined : json['statusText'], + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'erroredOnUtc': json['erroredOnUtc'] == null ? undefined : json['erroredOnUtc'], + 'status': json['status'] == null ? undefined : json['status'], + 'resolvedOnUtc': json['resolvedOnUtc'] == null ? undefined : json['resolvedOnUtc'], + }; +} + +export function DataConnectionErrorToJSON(json: any): DataConnectionError { + return DataConnectionErrorToJSONTyped(json, false); +} + +export function DataConnectionErrorToJSONTyped(value?: DataConnectionError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'statusCode': value['statusCode'], + 'statusText': value['statusText'], + 'errorMessage': value['errorMessage'], + 'erroredOnUtc': value['erroredOnUtc'], + 'status': value['status'], + 'resolvedOnUtc': value['resolvedOnUtc'], + }; +} + + +export interface ConnectionCreateResponseDataConnectionError { + /** + * The HTTP status code returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusCode?: string; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusText?: string; + /** + * A message about a error returned by Codat. + * @type {string} + * @memberof DataConnectionError + */ + errorMessage?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + erroredOnUtc?: string; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + * @type {string} + * @memberof DataConnectionError + */ + status?: ErrorStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + resolvedOnUtc?: string; +} + +export interface ConnectionDataConnectionError { + /** + * The HTTP status code returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusCode?: string; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusText?: string; + /** + * A message about a error returned by Codat. + * @type {string} + * @memberof DataConnectionError + */ + errorMessage?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + erroredOnUtc?: string; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + * @type {string} + * @memberof DataConnectionError + */ + status?: ErrorStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + resolvedOnUtc?: string; +} + +export interface ConnectionGetResponseDataConnectionError { + /** + * The HTTP status code returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusCode?: string; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusText?: string; + /** + * A message about a error returned by Codat. + * @type {string} + * @memberof DataConnectionError + */ + errorMessage?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + erroredOnUtc?: string; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + * @type {string} + * @memberof DataConnectionError + */ + status?: ErrorStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + resolvedOnUtc?: string; +} + +export interface ConnectionUnlinkResponseDataConnectionError { + /** + * The HTTP status code returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusCode?: string; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusText?: string; + /** + * A message about a error returned by Codat. + * @type {string} + * @memberof DataConnectionError + */ + errorMessage?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + erroredOnUtc?: string; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + * @type {string} + * @memberof DataConnectionError + */ + status?: ErrorStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + resolvedOnUtc?: string; +} + +export interface CreateConnectionResponseDataConnectionError { + /** + * The HTTP status code returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusCode?: string; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusText?: string; + /** + * A message about a error returned by Codat. + * @type {string} + * @memberof DataConnectionError + */ + errorMessage?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + erroredOnUtc?: string; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + * @type {string} + * @memberof DataConnectionError + */ + status?: ErrorStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + resolvedOnUtc?: string; +} + +export interface GetConnectionResponseDataConnectionError { + /** + * The HTTP status code returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusCode?: string; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusText?: string; + /** + * A message about a error returned by Codat. + * @type {string} + * @memberof DataConnectionError + */ + errorMessage?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + erroredOnUtc?: string; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + * @type {string} + * @memberof DataConnectionError + */ + status?: ErrorStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + resolvedOnUtc?: string; +} + +export interface UnlinkConnectionResponseDataConnectionError { + /** + * The HTTP status code returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusCode?: string; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + * @type {string} + * @memberof DataConnectionError + */ + statusText?: string; + /** + * A message about a error returned by Codat. + * @type {string} + * @memberof DataConnectionError + */ + errorMessage?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + erroredOnUtc?: string; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + * @type {string} + * @memberof DataConnectionError + */ + status?: ErrorStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataConnectionError + */ + resolvedOnUtc?: string; } diff --git a/lending/src/sdk/models/shared/dataconnectionstatus.ts b/lending/src/sdk/models/shared/dataconnectionstatus.ts index 88889c800..36be7a54c 100644 --- a/lending/src/sdk/models/shared/dataconnectionstatus.ts +++ b/lending/src/sdk/models/shared/dataconnectionstatus.ts @@ -1,29 +1,55 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The current authorization status of the data connection. + * @export */ export const DataConnectionStatus = { - PendingAuth: "PendingAuth", - Linked: "Linked", - Unlinked: "Unlinked", - Deauthorized: "Deauthorized", + PendingAuth: 'PendingAuth', + Linked: 'Linked', + Unlinked: 'Unlinked', + Deauthorized: 'Deauthorized' } as const; -/** - * The current authorization status of the data connection. - */ -export type DataConnectionStatus = ClosedEnum; - -/** @internal */ -export const DataConnectionStatus$inboundSchema: z.ZodNativeEnum< - typeof DataConnectionStatus -> = z.nativeEnum(DataConnectionStatus); -/** @internal */ -export const DataConnectionStatus$outboundSchema: z.ZodNativeEnum< - typeof DataConnectionStatus -> = DataConnectionStatus$inboundSchema; +export type DataConnectionStatus = typeof DataConnectionStatus[keyof typeof DataConnectionStatus]; + + +export function instanceOfDataConnectionStatus(value: any): boolean { + for (const key in DataConnectionStatus) { + if (Object.prototype.hasOwnProperty.call(DataConnectionStatus, key)) { + if (DataConnectionStatus[key as keyof typeof DataConnectionStatus] === value) { + return true; + } + } + } + return false; +} + +export function DataConnectionStatusFromJSON(json: any): DataConnectionStatus { + return DataConnectionStatusFromJSONTyped(json, false); +} + +export function DataConnectionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataConnectionStatus { + return json as DataConnectionStatus; +} + +export function DataConnectionStatusToJSON(value?: DataConnectionStatus | null): any { + return value as any; +} + +export function DataConnectionStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): DataConnectionStatus { + return value as DataConnectionStatus; +} + diff --git a/lending/src/sdk/models/shared/dataintegrityamounts.ts b/lending/src/sdk/models/shared/dataintegrityamounts.ts index fcd03df1a..94af18e4b 100644 --- a/lending/src/sdk/models/shared/dataintegrityamounts.ts +++ b/lending/src/sdk/models/shared/dataintegrityamounts.ts @@ -1,56 +1,142 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; /** * Only returned for transactions. For accounts, there is nothing returned. + * @export + * @interface DataIntegrityAmounts + */ +export interface DataIntegrityAmounts { + /** + * Lowest value of transaction set. + * @type {string} + * @memberof DataIntegrityAmounts + */ + min?: Decimal | number; + /** + * Highest value of transaction set. + * @type {string} + * @memberof DataIntegrityAmounts + */ + max?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityAmounts + */ + currency?: string; +} + +/** + * Check if a given object implements the DataIntegrityAmounts interface. */ -export type DataIntegrityAmounts = { - /** - * Lowest value of transaction set. - */ - min?: Decimal$ | number | undefined; - /** - * Highest value of transaction set. - */ - max?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; -}; - -/** @internal */ -export const DataIntegrityAmounts$inboundSchema: z.ZodType< - DataIntegrityAmounts, - z.ZodTypeDef, - unknown -> = z.object({ - min: z.number().transform(v => new Decimal$(v)).optional(), - max: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), -}); - -export function dataIntegrityAmountsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityAmounts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityAmounts' from JSON`, - ); +export function instanceOfDataIntegrityAmounts(value: object): value is DataIntegrityAmounts { + return true; +} + +export function DataIntegrityAmountsFromJSON(json: any): DataIntegrityAmounts { + return DataIntegrityAmountsFromJSONTyped(json, false); +} + +export function DataIntegrityAmountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityAmounts { + if (json == null) { + return json; + } + return { + + 'min': json['min'] == null ? undefined : toDecimal(json['min']), + 'max': json['max'] == null ? undefined : toDecimal(json['max']), + 'currency': json['currency'] == null ? undefined : json['currency'], + }; +} + +export function DataIntegrityAmountsToJSON(json: any): DataIntegrityAmounts { + return DataIntegrityAmountsToJSONTyped(json, false); +} + +export function DataIntegrityAmountsToJSONTyped(value?: DataIntegrityAmounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'min': fromDecimal(value['min']), + 'max': fromDecimal(value['max']), + 'currency': value['currency'], + }; +} + + +export interface DataIntegrityStatusDataIntegrityAmounts { + /** + * Lowest value of transaction set. + * @type {string} + * @memberof DataIntegrityAmounts + */ + min?: Decimal | number; + /** + * Highest value of transaction set. + * @type {string} + * @memberof DataIntegrityAmounts + */ + max?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityAmounts + */ + currency?: string; +} + +export interface DataIntegrityStatusesDataIntegrityAmounts { + /** + * Lowest value of transaction set. + * @type {string} + * @memberof DataIntegrityAmounts + */ + min?: Decimal | number; + /** + * Highest value of transaction set. + * @type {string} + * @memberof DataIntegrityAmounts + */ + max?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityAmounts + */ + currency?: string; } diff --git a/lending/src/sdk/models/shared/dataintegritybyamount.ts b/lending/src/sdk/models/shared/dataintegritybyamount.ts index 14927e6c9..7bab288d9 100644 --- a/lending/src/sdk/models/shared/dataintegritybyamount.ts +++ b/lending/src/sdk/models/shared/dataintegritybyamount.ts @@ -1,63 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DataIntegrityByAmount = { - /** - * The percentage of the absolute value of transactions of the type specified in the route which have a match. - */ - matchPercentage?: Decimal$ | number | undefined; - /** - * The sum of the absolute value of transactions of the type specified in the route which don't have a match. - */ - unmatched?: Decimal$ | number | undefined; - /** - * The sum of the absolute value of transactions of the type specified in the route which have a match. - */ - matched?: Decimal$ | number | undefined; - /** - * The total of unmatched and matched. - */ - total?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; -}; - -/** @internal */ -export const DataIntegrityByAmount$inboundSchema: z.ZodType< - DataIntegrityByAmount, - z.ZodTypeDef, - unknown -> = z.object({ - matchPercentage: z.number().transform(v => new Decimal$(v)).optional(), - unmatched: z.number().transform(v => new Decimal$(v)).optional(), - matched: z.number().transform(v => new Decimal$(v)).optional(), - total: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), -}); - -export function dataIntegrityByAmountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityByAmount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityByAmount' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface DataIntegrityByAmount + */ +export interface DataIntegrityByAmount { + /** + * The percentage of the absolute value of transactions of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + matchPercentage?: Decimal | number; + /** + * The sum of the absolute value of transactions of the type specified in the route which don't have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + unmatched?: Decimal | number; + /** + * The sum of the absolute value of transactions of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + matched?: Decimal | number; + /** + * The total of unmatched and matched. + * @type {string} + * @memberof DataIntegrityByAmount + */ + total?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityByAmount + */ + currency?: string; +} + +/** + * Check if a given object implements the DataIntegrityByAmount interface. + */ +export function instanceOfDataIntegrityByAmount(value: object): value is DataIntegrityByAmount { + return true; +} + +export function DataIntegrityByAmountFromJSON(json: any): DataIntegrityByAmount { + return DataIntegrityByAmountFromJSONTyped(json, false); +} + +export function DataIntegrityByAmountFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityByAmount { + if (json == null) { + return json; + } + return { + + 'matchPercentage': json['matchPercentage'] == null ? undefined : toDecimal(json['matchPercentage']), + 'unmatched': json['unmatched'] == null ? undefined : toDecimal(json['unmatched']), + 'matched': json['matched'] == null ? undefined : toDecimal(json['matched']), + 'total': json['total'] == null ? undefined : toDecimal(json['total']), + 'currency': json['currency'] == null ? undefined : json['currency'], + }; +} + +export function DataIntegrityByAmountToJSON(json: any): DataIntegrityByAmount { + return DataIntegrityByAmountToJSONTyped(json, false); +} + +export function DataIntegrityByAmountToJSONTyped(value?: DataIntegrityByAmount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'matchPercentage': fromDecimal(value['matchPercentage']), + 'unmatched': fromDecimal(value['unmatched']), + 'matched': fromDecimal(value['matched']), + 'total': fromDecimal(value['total']), + 'currency': value['currency'], + }; +} + + +export interface DataIntegritySummariesDataIntegrityByAmount { + /** + * The percentage of the absolute value of transactions of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + matchPercentage?: Decimal | number; + /** + * The sum of the absolute value of transactions of the type specified in the route which don't have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + unmatched?: Decimal | number; + /** + * The sum of the absolute value of transactions of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + matched?: Decimal | number; + /** + * The total of unmatched and matched. + * @type {string} + * @memberof DataIntegrityByAmount + */ + total?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityByAmount + */ + currency?: string; +} + +export interface DataIntegritySummaryDataIntegrityByAmount { + /** + * The percentage of the absolute value of transactions of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + matchPercentage?: Decimal | number; + /** + * The sum of the absolute value of transactions of the type specified in the route which don't have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + unmatched?: Decimal | number; + /** + * The sum of the absolute value of transactions of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByAmount + */ + matched?: Decimal | number; + /** + * The total of unmatched and matched. + * @type {string} + * @memberof DataIntegrityByAmount + */ + total?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityByAmount + */ + currency?: string; } diff --git a/lending/src/sdk/models/shared/dataintegritybycount.ts b/lending/src/sdk/models/shared/dataintegritybycount.ts index 0d20da6e1..95d76f1a8 100644 --- a/lending/src/sdk/models/shared/dataintegritybycount.ts +++ b/lending/src/sdk/models/shared/dataintegritybycount.ts @@ -1,50 +1,144 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DataIntegrityByCount = { - /** - * The percentage of records of the type specified in the route which have a match. - */ - matchPercentage?: Decimal$ | number | undefined; - /** - * The number of records of the type specified in the route which don't have a match. - */ - unmatched?: Decimal$ | number | undefined; - /** - * The number of records of the type specified in the route which do have a match. - */ - matched?: Decimal$ | number | undefined; - /** - * The total of unmatched and matched. - */ - total?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const DataIntegrityByCount$inboundSchema: z.ZodType< - DataIntegrityByCount, - z.ZodTypeDef, - unknown -> = z.object({ - matchPercentage: z.number().transform(v => new Decimal$(v)).optional(), - unmatched: z.number().transform(v => new Decimal$(v)).optional(), - matched: z.number().transform(v => new Decimal$(v)).optional(), - total: z.number().transform(v => new Decimal$(v)).optional(), -}); - -export function dataIntegrityByCountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityByCount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityByCount' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface DataIntegrityByCount + */ +export interface DataIntegrityByCount { + /** + * The percentage of records of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + matchPercentage?: Decimal | number; + /** + * The number of records of the type specified in the route which don't have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + unmatched?: Decimal | number; + /** + * The number of records of the type specified in the route which do have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + matched?: Decimal | number; + /** + * The total of unmatched and matched. + * @type {string} + * @memberof DataIntegrityByCount + */ + total?: Decimal | number; +} + +/** + * Check if a given object implements the DataIntegrityByCount interface. + */ +export function instanceOfDataIntegrityByCount(value: object): value is DataIntegrityByCount { + return true; +} + +export function DataIntegrityByCountFromJSON(json: any): DataIntegrityByCount { + return DataIntegrityByCountFromJSONTyped(json, false); +} + +export function DataIntegrityByCountFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityByCount { + if (json == null) { + return json; + } + return { + + 'matchPercentage': json['matchPercentage'] == null ? undefined : toDecimal(json['matchPercentage']), + 'unmatched': json['unmatched'] == null ? undefined : toDecimal(json['unmatched']), + 'matched': json['matched'] == null ? undefined : toDecimal(json['matched']), + 'total': json['total'] == null ? undefined : toDecimal(json['total']), + }; +} + +export function DataIntegrityByCountToJSON(json: any): DataIntegrityByCount { + return DataIntegrityByCountToJSONTyped(json, false); +} + +export function DataIntegrityByCountToJSONTyped(value?: DataIntegrityByCount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'matchPercentage': fromDecimal(value['matchPercentage']), + 'unmatched': fromDecimal(value['unmatched']), + 'matched': fromDecimal(value['matched']), + 'total': fromDecimal(value['total']), + }; +} + + +export interface DataIntegritySummariesDataIntegrityByCount { + /** + * The percentage of records of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + matchPercentage?: Decimal | number; + /** + * The number of records of the type specified in the route which don't have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + unmatched?: Decimal | number; + /** + * The number of records of the type specified in the route which do have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + matched?: Decimal | number; + /** + * The total of unmatched and matched. + * @type {string} + * @memberof DataIntegrityByCount + */ + total?: Decimal | number; +} + +export interface DataIntegritySummaryDataIntegrityByCount { + /** + * The percentage of records of the type specified in the route which have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + matchPercentage?: Decimal | number; + /** + * The number of records of the type specified in the route which don't have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + unmatched?: Decimal | number; + /** + * The number of records of the type specified in the route which do have a match. + * @type {string} + * @memberof DataIntegrityByCount + */ + matched?: Decimal | number; + /** + * The total of unmatched and matched. + * @type {string} + * @memberof DataIntegrityByCount + */ + total?: Decimal | number; } diff --git a/lending/src/sdk/models/shared/dataintegrityconnectionid.ts b/lending/src/sdk/models/shared/dataintegrityconnectionid.ts index 5ca003682..a61078b90 100644 --- a/lending/src/sdk/models/shared/dataintegrityconnectionid.ts +++ b/lending/src/sdk/models/shared/dataintegrityconnectionid.ts @@ -1,39 +1,103 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DataIntegrityConnectionId = { - /** - * An array of strings. The connection IDs for the type specified in the url. - */ - source?: Array | undefined; - /** - * An array of strings. The connection IDs for the type being matched to. - */ - target?: Array | undefined; -}; - -/** @internal */ -export const DataIntegrityConnectionId$inboundSchema: z.ZodType< - DataIntegrityConnectionId, - z.ZodTypeDef, - unknown -> = z.object({ - source: z.array(z.string()).optional(), - target: z.array(z.string()).optional(), -}); - -export function dataIntegrityConnectionIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityConnectionId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityConnectionId' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface DataIntegrityConnectionId + */ +export interface DataIntegrityConnectionId { + /** + * An array of strings. The connection IDs for the type specified in the url. + * @type {Array} + * @memberof DataIntegrityConnectionId + */ + source?: Array; + /** + * An array of strings. The connection IDs for the type being matched to. + * @type {Array} + * @memberof DataIntegrityConnectionId + */ + target?: Array; +} + +/** + * Check if a given object implements the DataIntegrityConnectionId interface. + */ +export function instanceOfDataIntegrityConnectionId(value: object): value is DataIntegrityConnectionId { + return true; +} + +export function DataIntegrityConnectionIdFromJSON(json: any): DataIntegrityConnectionId { + return DataIntegrityConnectionIdFromJSONTyped(json, false); +} + +export function DataIntegrityConnectionIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityConnectionId { + if (json == null) { + return json; + } + return { + + 'source': json['source'] == null ? undefined : json['source'], + 'target': json['target'] == null ? undefined : json['target'], + }; +} + +export function DataIntegrityConnectionIdToJSON(json: any): DataIntegrityConnectionId { + return DataIntegrityConnectionIdToJSONTyped(json, false); +} + +export function DataIntegrityConnectionIdToJSONTyped(value?: DataIntegrityConnectionId | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'source': value['source'], + 'target': value['target'], + }; +} + + +export interface DataIntegrityStatusDataIntegrityConnectionId { + /** + * An array of strings. The connection IDs for the type specified in the url. + * @type {Array} + * @memberof DataIntegrityConnectionId + */ + source?: Array; + /** + * An array of strings. The connection IDs for the type being matched to. + * @type {Array} + * @memberof DataIntegrityConnectionId + */ + target?: Array; +} + +export interface DataIntegrityStatusesDataIntegrityConnectionId { + /** + * An array of strings. The connection IDs for the type specified in the url. + * @type {Array} + * @memberof DataIntegrityConnectionId + */ + source?: Array; + /** + * An array of strings. The connection IDs for the type being matched to. + * @type {Array} + * @memberof DataIntegrityConnectionId + */ + target?: Array; } diff --git a/lending/src/sdk/models/shared/dataintegritydatatype.ts b/lending/src/sdk/models/shared/dataintegritydatatype.ts deleted file mode 100644 index d27cb50a2..000000000 --- a/lending/src/sdk/models/shared/dataintegritydatatype.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -export const DataIntegrityDataType = { - BankingAccounts: "banking-accounts", - BankingTransactions: "banking-transactions", - BankAccounts: "bankAccounts", - AccountTransactions: "accountTransactions", -} as const; -export type DataIntegrityDataType = ClosedEnum; - -/** @internal */ -export const DataIntegrityDataType$outboundSchema: z.ZodNativeEnum< - typeof DataIntegrityDataType -> = z.nativeEnum(DataIntegrityDataType); diff --git a/lending/src/sdk/models/shared/dataintegritydates.ts b/lending/src/sdk/models/shared/dataintegritydates.ts index e2c5b47b3..7e8967004 100644 --- a/lending/src/sdk/models/shared/dataintegritydates.ts +++ b/lending/src/sdk/models/shared/dataintegritydates.ts @@ -1,124 +1,359 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Only returned for transactions. For accounts, there is nothing returned. + * @export + * @interface DataIntegrityDates */ -export type DataIntegrityDates = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - minDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - maxDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - minOverlappingDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - maxOverlappingDate?: string | undefined; -}; +export interface DataIntegrityDates { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + minDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + maxDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + minOverlappingDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + maxOverlappingDate?: string; +} + +/** + * Check if a given object implements the DataIntegrityDates interface. + */ +export function instanceOfDataIntegrityDates(value: object): value is DataIntegrityDates { + return true; +} + +export function DataIntegrityDatesFromJSON(json: any): DataIntegrityDates { + return DataIntegrityDatesFromJSONTyped(json, false); +} -/** @internal */ -export const DataIntegrityDates$inboundSchema: z.ZodType< - DataIntegrityDates, - z.ZodTypeDef, - unknown -> = z.object({ - minDate: z.string().optional(), - maxDate: z.string().optional(), - minOverlappingDate: z.string().optional(), - maxOverlappingDate: z.string().optional(), -}); +export function DataIntegrityDatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityDates { + if (json == null) { + return json; + } + return { + + 'minDate': json['minDate'] == null ? undefined : json['minDate'], + 'maxDate': json['maxDate'] == null ? undefined : json['maxDate'], + 'minOverlappingDate': json['minOverlappingDate'] == null ? undefined : json['minOverlappingDate'], + 'maxOverlappingDate': json['maxOverlappingDate'] == null ? undefined : json['maxOverlappingDate'], + }; +} + +export function DataIntegrityDatesToJSON(json: any): DataIntegrityDates { + return DataIntegrityDatesToJSONTyped(json, false); +} + +export function DataIntegrityDatesToJSONTyped(value?: DataIntegrityDates | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'minDate': value['minDate'], + 'maxDate': value['maxDate'], + 'minOverlappingDate': value['minOverlappingDate'], + 'maxOverlappingDate': value['maxOverlappingDate'], + }; +} + + +export interface DataIntegrityStatusDataIntegrityDates { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + minDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + maxDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + minOverlappingDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + maxOverlappingDate?: string; +} -export function dataIntegrityDatesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityDates$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityDates' from JSON`, - ); +export interface DataIntegrityStatusesDataIntegrityDates { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + minDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + maxDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + minOverlappingDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDates + */ + maxOverlappingDate?: string; } diff --git a/lending/src/sdk/models/shared/dataintegritydetail.ts b/lending/src/sdk/models/shared/dataintegritydetail.ts index ebf768d63..956b71099 100644 --- a/lending/src/sdk/models/shared/dataintegritydetail.ts +++ b/lending/src/sdk/models/shared/dataintegritydetail.ts @@ -1,97 +1,378 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { DataIntegrityMatch } from './dataintegritymatch'; import { - DataIntegrityMatch, - DataIntegrityMatch$inboundSchema, -} from "./dataintegritymatch.js"; + DataIntegrityMatchFromJSON, + DataIntegrityMatchFromJSONTyped, + DataIntegrityMatchToJSON, + DataIntegrityMatchToJSONTyped, +} from './dataintegritymatch'; -export type DataIntegrityDetail = { - /** - * ID GUID of the transaction. - */ - id?: string | undefined; - /** - * The data type of the record. - */ - type?: string | undefined; - /** - * ID GUID representing the connection of the accounting or banking platform. - */ - connectionId?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * The transaction description. - */ - description?: string | undefined; - /** - * The transaction value. - */ - amount?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - matches?: Array | undefined; -}; +/** + * + * @export + * @interface DataIntegrityDetail + */ +export interface DataIntegrityDetail { + /** + * ID GUID of the transaction. + * @type {string} + * @memberof DataIntegrityDetail + */ + id?: string; + /** + * The data type of the record. + * @type {string} + * @memberof DataIntegrityDetail + */ + type?: string; + /** + * ID GUID representing the connection of the accounting or banking platform. + * @type {string} + * @memberof DataIntegrityDetail + */ + readonly connectionId?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDetail + */ + date?: string; + /** + * The transaction description. + * @type {string} + * @memberof DataIntegrityDetail + */ + description?: string; + /** + * The transaction value. + * @type {string} + * @memberof DataIntegrityDetail + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityDetail + */ + currency?: string; + /** + * + * @type {Array} + * @memberof DataIntegrityDetail + */ + matches?: Array; +} + +/** + * Check if a given object implements the DataIntegrityDetail interface. + */ +export function instanceOfDataIntegrityDetail(value: object): value is DataIntegrityDetail { + return true; +} + +export function DataIntegrityDetailFromJSON(json: any): DataIntegrityDetail { + return DataIntegrityDetailFromJSONTyped(json, false); +} + +export function DataIntegrityDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityDetail { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'type': json['type'] == null ? undefined : json['type'], + 'connectionId': json['connectionId'] == null ? undefined : json['connectionId'], + 'date': json['date'] == null ? undefined : json['date'], + 'description': json['description'] == null ? undefined : json['description'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'matches': json['matches'] == null ? undefined : ((json['matches'] as Array).map(DataIntegrityMatchFromJSON)), + }; +} -/** @internal */ -export const DataIntegrityDetail$inboundSchema: z.ZodType< - DataIntegrityDetail, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - type: z.string().optional(), - connectionId: z.string().optional(), - date: z.string().optional(), - description: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), - matches: z.array(DataIntegrityMatch$inboundSchema).optional(), -}); +export function DataIntegrityDetailToJSON(json: any): DataIntegrityDetail { + return DataIntegrityDetailToJSONTyped(json, false); +} + +export function DataIntegrityDetailToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'type': value['type'], + 'date': value['date'], + 'description': value['description'], + 'amount': fromDecimal(value['amount']), + 'currency': value['currency'], + 'matches': value['matches'] == null ? undefined : ((value['matches'] as Array).map(DataIntegrityMatchToJSON)), + }; +} + + +export interface DataIntegrityDetailsDataIntegrityDetail { + /** + * ID GUID of the transaction. + * @type {string} + * @memberof DataIntegrityDetail + */ + id?: string; + /** + * The data type of the record. + * @type {string} + * @memberof DataIntegrityDetail + */ + type?: string; + /** + * ID GUID representing the connection of the accounting or banking platform. + * @type {string} + * @memberof DataIntegrityDetail + */ + readonly connectionId?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDetail + */ + date?: string; + /** + * The transaction description. + * @type {string} + * @memberof DataIntegrityDetail + */ + description?: string; + /** + * The transaction value. + * @type {string} + * @memberof DataIntegrityDetail + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityDetail + */ + currency?: string; + /** + * + * @type {Array} + * @memberof DataIntegrityDetail + */ + matches?: Array; +} + +export interface DataIntegrityDetailsListResponseDataIntegrityDetail { + /** + * ID GUID of the transaction. + * @type {string} + * @memberof DataIntegrityDetail + */ + id?: string; + /** + * The data type of the record. + * @type {string} + * @memberof DataIntegrityDetail + */ + type?: string; + /** + * ID GUID representing the connection of the accounting or banking platform. + * @type {string} + * @memberof DataIntegrityDetail + */ + readonly connectionId?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDetail + */ + date?: string; + /** + * The transaction description. + * @type {string} + * @memberof DataIntegrityDetail + */ + description?: string; + /** + * The transaction value. + * @type {string} + * @memberof DataIntegrityDetail + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityDetail + */ + currency?: string; + /** + * + * @type {Array} + * @memberof DataIntegrityDetail + */ + matches?: Array; +} -export function dataIntegrityDetailFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityDetail$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityDetail' from JSON`, - ); +export interface ListDataIntegrityDetailsResponseDataIntegrityDetail { + /** + * ID GUID of the transaction. + * @type {string} + * @memberof DataIntegrityDetail + */ + id?: string; + /** + * The data type of the record. + * @type {string} + * @memberof DataIntegrityDetail + */ + type?: string; + /** + * ID GUID representing the connection of the accounting or banking platform. + * @type {string} + * @memberof DataIntegrityDetail + */ + readonly connectionId?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityDetail + */ + date?: string; + /** + * The transaction description. + * @type {string} + * @memberof DataIntegrityDetail + */ + description?: string; + /** + * The transaction value. + * @type {string} + * @memberof DataIntegrityDetail + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DataIntegrityDetail + */ + currency?: string; + /** + * + * @type {Array} + * @memberof DataIntegrityDetail + */ + matches?: Array; } diff --git a/lending/src/sdk/models/shared/dataintegritydetails.ts b/lending/src/sdk/models/shared/dataintegritydetails.ts index d4c42ae57..befcae7de 100644 --- a/lending/src/sdk/models/shared/dataintegritydetails.ts +++ b/lending/src/sdk/models/shared/dataintegritydetails.ts @@ -1,58 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { DataIntegrityDetail } from './dataintegritydetail'; import { - DataIntegrityDetail, - DataIntegrityDetail$inboundSchema, -} from "./dataintegritydetail.js"; -import { Links, Links$inboundSchema } from "./links.js"; - -export type DataIntegrityDetails = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const DataIntegrityDetails$inboundSchema: z.ZodType< - DataIntegrityDetails, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(DataIntegrityDetail$inboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function dataIntegrityDetailsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityDetails$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityDetails' from JSON`, - ); + DataIntegrityDetailFromJSON, + DataIntegrityDetailFromJSONTyped, + DataIntegrityDetailToJSON, + DataIntegrityDetailToJSONTyped, +} from './dataintegritydetail'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface DataIntegrityDetails + */ +export interface DataIntegrityDetails { + /** + * Current page number. + * @type {number} + * @memberof DataIntegrityDetails + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof DataIntegrityDetails + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof DataIntegrityDetails + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof DataIntegrityDetails + */ + links: Links; + /** + * + * @type {Array} + * @memberof DataIntegrityDetails + */ + results?: Array; +} + +/** + * Check if a given object implements the DataIntegrityDetails interface. + */ +export function instanceOfDataIntegrityDetails(value: object): value is DataIntegrityDetails { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function DataIntegrityDetailsFromJSON(json: any): DataIntegrityDetails { + return DataIntegrityDetailsFromJSONTyped(json, false); +} + +export function DataIntegrityDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityDetails { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(DataIntegrityDetailFromJSON)), + }; +} + +export function DataIntegrityDetailsToJSON(json: any): DataIntegrityDetails { + return DataIntegrityDetailsToJSONTyped(json, false); +} + +export function DataIntegrityDetailsToJSONTyped(value?: DataIntegrityDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(DataIntegrityDetailToJSON)), + }; +} + + +export interface DataIntegrityDetailsListResponseDataIntegrityDetails { + /** + * Current page number. + * @type {number} + * @memberof DataIntegrityDetails + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof DataIntegrityDetails + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof DataIntegrityDetails + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof DataIntegrityDetails + */ + links: Links; + /** + * + * @type {Array} + * @memberof DataIntegrityDetails + */ + results?: Array; +} + +export interface ListDataIntegrityDetailsResponseDataIntegrityDetails { + /** + * Current page number. + * @type {number} + * @memberof DataIntegrityDetails + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof DataIntegrityDetails + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof DataIntegrityDetails + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof DataIntegrityDetails + */ + links: Links; + /** + * + * @type {Array} + * @memberof DataIntegrityDetails + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/dataintegritymatch.ts b/lending/src/sdk/models/shared/dataintegritymatch.ts index 26738ee87..448b9b535 100644 --- a/lending/src/sdk/models/shared/dataintegritymatch.ts +++ b/lending/src/sdk/models/shared/dataintegritymatch.ts @@ -1,72 +1,170 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface DataIntegrityMatch + */ +export interface DataIntegrityMatch { + /** + * ID GUID of the transaction. + * @type {string} + * @memberof DataIntegrityMatch + */ + id?: string; + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityMatch + */ + type?: string; + /** + * ID GUID representing the connection of the accounting or banking platform. + * @type {string} + * @memberof DataIntegrityMatch + */ + connectionId?: string; + /** + * The date of the transaction. + * @type {string} + * @memberof DataIntegrityMatch + */ + date?: string; + /** + * The transaction description. + * @type {string} + * @memberof DataIntegrityMatch + */ + description?: string; + /** + * The transaction value. + * @type {string} + * @memberof DataIntegrityMatch + */ + amount?: string; + /** + * 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. + * @type {string} + * @memberof DataIntegrityMatch + */ + currency?: string; +} + +/** + * Check if a given object implements the DataIntegrityMatch interface. + */ +export function instanceOfDataIntegrityMatch(value: object): value is DataIntegrityMatch { + return true; +} + +export function DataIntegrityMatchFromJSON(json: any): DataIntegrityMatch { + return DataIntegrityMatchFromJSONTyped(json, false); +} -export type DataIntegrityMatch = { - /** - * ID GUID of the transaction. - */ - id?: string | undefined; - /** - * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. - */ - type?: string | undefined; - /** - * ID GUID representing the connection of the accounting or banking platform. - */ - connectionId?: string | undefined; - /** - * The date of the transaction. - */ - date?: string | undefined; - /** - * The transaction description. - */ - description?: string | undefined; - /** - * The transaction value. - */ - amount?: string | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; -}; +export function DataIntegrityMatchFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityMatch { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'type': json['type'] == null ? undefined : json['type'], + 'connectionId': json['connectionId'] == null ? undefined : json['connectionId'], + 'date': json['date'] == null ? undefined : json['date'], + 'description': json['description'] == null ? undefined : json['description'], + 'amount': json['amount'] == null ? undefined : json['amount'], + 'currency': json['currency'] == null ? undefined : json['currency'], + }; +} + +export function DataIntegrityMatchToJSON(json: any): DataIntegrityMatch { + return DataIntegrityMatchToJSONTyped(json, false); +} + +export function DataIntegrityMatchToJSONTyped(value?: DataIntegrityMatch | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'type': value['type'], + 'connectionId': value['connectionId'], + 'date': value['date'], + 'description': value['description'], + 'amount': value['amount'], + 'currency': value['currency'], + }; +} -/** @internal */ -export const DataIntegrityMatch$inboundSchema: z.ZodType< - DataIntegrityMatch, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - type: z.string().optional(), - connectionId: z.string().optional(), - date: z.string().optional(), - description: z.string().optional(), - amount: z.string().optional(), - currency: z.string().optional(), -}); -export function dataIntegrityMatchFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityMatch$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityMatch' from JSON`, - ); +export interface DataIntegrityDetailDataIntegrityMatch { + /** + * ID GUID of the transaction. + * @type {string} + * @memberof DataIntegrityMatch + */ + id?: string; + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityMatch + */ + type?: string; + /** + * ID GUID representing the connection of the accounting or banking platform. + * @type {string} + * @memberof DataIntegrityMatch + */ + connectionId?: string; + /** + * The date of the transaction. + * @type {string} + * @memberof DataIntegrityMatch + */ + date?: string; + /** + * The transaction description. + * @type {string} + * @memberof DataIntegrityMatch + */ + description?: string; + /** + * The transaction value. + * @type {string} + * @memberof DataIntegrityMatch + */ + amount?: string; + /** + * 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. + * @type {string} + * @memberof DataIntegrityMatch + */ + currency?: string; } diff --git a/lending/src/sdk/models/shared/dataintegritystatus.ts b/lending/src/sdk/models/shared/dataintegritystatus.ts index 5d844fd39..741efb677 100644 --- a/lending/src/sdk/models/shared/dataintegritystatus.ts +++ b/lending/src/sdk/models/shared/dataintegritystatus.ts @@ -1,64 +1,225 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { DataIntegrityAmounts } from './dataintegrityamounts'; import { - DataIntegrityAmounts, - DataIntegrityAmounts$inboundSchema, -} from "./dataintegrityamounts.js"; + DataIntegrityAmountsFromJSON, + DataIntegrityAmountsFromJSONTyped, + DataIntegrityAmountsToJSON, + DataIntegrityAmountsToJSONTyped, +} from './dataintegrityamounts'; +import type { DataIntegrityDates } from './dataintegritydates'; import { - DataIntegrityConnectionId, - DataIntegrityConnectionId$inboundSchema, -} from "./dataintegrityconnectionid.js"; + DataIntegrityDatesFromJSON, + DataIntegrityDatesFromJSONTyped, + DataIntegrityDatesToJSON, + DataIntegrityDatesToJSONTyped, +} from './dataintegritydates'; +import type { DataIntegrityStatusInfo } from './dataintegritystatusinfo'; import { - DataIntegrityDates, - DataIntegrityDates$inboundSchema, -} from "./dataintegritydates.js"; + DataIntegrityStatusInfoFromJSON, + DataIntegrityStatusInfoFromJSONTyped, + DataIntegrityStatusInfoToJSON, + DataIntegrityStatusInfoToJSONTyped, +} from './dataintegritystatusinfo'; +import type { DataIntegrityConnectionId } from './dataintegrityconnectionid'; import { - DataIntegrityStatusInfo, - DataIntegrityStatusInfo$inboundSchema, -} from "./dataintegritystatusinfo.js"; + DataIntegrityConnectionIdFromJSON, + DataIntegrityConnectionIdFromJSONTyped, + DataIntegrityConnectionIdToJSON, + DataIntegrityConnectionIdToJSONTyped, +} from './dataintegrityconnectionid'; -export type DataIntegrityStatus = { - /** - * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. - */ - type?: string | undefined; - statusInfo?: DataIntegrityStatusInfo | undefined; - connectionIds?: DataIntegrityConnectionId | undefined; - /** - * Only returned for transactions. For accounts, there is nothing returned. - */ - amounts?: DataIntegrityAmounts | undefined; - /** - * Only returned for transactions. For accounts, there is nothing returned. - */ - dates?: DataIntegrityDates | undefined; -}; +/** + * + * @export + * @interface DataIntegrityStatus + */ +export interface DataIntegrityStatus { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityStatus + */ + type?: string; + /** + * + * @type {DataIntegrityStatusInfo} + * @memberof DataIntegrityStatus + */ + statusInfo?: DataIntegrityStatusInfo; + /** + * + * @type {DataIntegrityConnectionId} + * @memberof DataIntegrityStatus + */ + connectionIds?: DataIntegrityConnectionId; + /** + * + * @type {DataIntegrityAmounts} + * @memberof DataIntegrityStatus + */ + amounts?: DataIntegrityAmounts; + /** + * + * @type {DataIntegrityDates} + * @memberof DataIntegrityStatus + */ + dates?: DataIntegrityDates; +} + +/** + * Check if a given object implements the DataIntegrityStatus interface. + */ +export function instanceOfDataIntegrityStatus(value: object): value is DataIntegrityStatus { + return true; +} + +export function DataIntegrityStatusFromJSON(json: any): DataIntegrityStatus { + return DataIntegrityStatusFromJSONTyped(json, false); +} + +export function DataIntegrityStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityStatus { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'statusInfo': json['statusInfo'] == null ? undefined : DataIntegrityStatusInfoFromJSON(json['statusInfo']), + 'connectionIds': json['connectionIds'] == null ? undefined : DataIntegrityConnectionIdFromJSON(json['connectionIds']), + 'amounts': json['amounts'] == null ? undefined : DataIntegrityAmountsFromJSON(json['amounts']), + 'dates': json['dates'] == null ? undefined : DataIntegrityDatesFromJSON(json['dates']), + }; +} -/** @internal */ -export const DataIntegrityStatus$inboundSchema: z.ZodType< - DataIntegrityStatus, - z.ZodTypeDef, - unknown -> = z.object({ - type: z.string().optional(), - statusInfo: DataIntegrityStatusInfo$inboundSchema.optional(), - connectionIds: DataIntegrityConnectionId$inboundSchema.optional(), - amounts: DataIntegrityAmounts$inboundSchema.optional(), - dates: DataIntegrityDates$inboundSchema.optional(), -}); +export function DataIntegrityStatusToJSON(json: any): DataIntegrityStatus { + return DataIntegrityStatusToJSONTyped(json, false); +} + +export function DataIntegrityStatusToJSONTyped(value?: DataIntegrityStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': value['type'], + 'statusInfo': DataIntegrityStatusInfoToJSON(value['statusInfo']), + 'connectionIds': DataIntegrityConnectionIdToJSON(value['connectionIds']), + 'amounts': DataIntegrityAmountsToJSON(value['amounts']), + 'dates': DataIntegrityDatesToJSON(value['dates']), + }; +} + + +export interface DataIntegrityStatusGetResponseDataIntegrityStatus { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityStatus + */ + type?: string; + /** + * + * @type {DataIntegrityStatusInfo} + * @memberof DataIntegrityStatus + */ + statusInfo?: DataIntegrityStatusInfo; + /** + * + * @type {DataIntegrityConnectionId} + * @memberof DataIntegrityStatus + */ + connectionIds?: DataIntegrityConnectionId; + /** + * + * @type {DataIntegrityAmounts} + * @memberof DataIntegrityStatus + */ + amounts?: DataIntegrityAmounts; + /** + * + * @type {DataIntegrityDates} + * @memberof DataIntegrityStatus + */ + dates?: DataIntegrityDates; +} + +export interface DataIntegrityStatusesDataIntegrityStatus { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityStatus + */ + type?: string; + /** + * + * @type {DataIntegrityStatusInfo} + * @memberof DataIntegrityStatus + */ + statusInfo?: DataIntegrityStatusInfo; + /** + * + * @type {DataIntegrityConnectionId} + * @memberof DataIntegrityStatus + */ + connectionIds?: DataIntegrityConnectionId; + /** + * + * @type {DataIntegrityAmounts} + * @memberof DataIntegrityStatus + */ + amounts?: DataIntegrityAmounts; + /** + * + * @type {DataIntegrityDates} + * @memberof DataIntegrityStatus + */ + dates?: DataIntegrityDates; +} -export function dataIntegrityStatusFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityStatus$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityStatus' from JSON`, - ); +export interface GetDataIntegrityStatusResponseDataIntegrityStatus { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegrityStatus + */ + type?: string; + /** + * + * @type {DataIntegrityStatusInfo} + * @memberof DataIntegrityStatus + */ + statusInfo?: DataIntegrityStatusInfo; + /** + * + * @type {DataIntegrityConnectionId} + * @memberof DataIntegrityStatus + */ + connectionIds?: DataIntegrityConnectionId; + /** + * + * @type {DataIntegrityAmounts} + * @memberof DataIntegrityStatus + */ + amounts?: DataIntegrityAmounts; + /** + * + * @type {DataIntegrityDates} + * @memberof DataIntegrityStatus + */ + dates?: DataIntegrityDates; } diff --git a/lending/src/sdk/models/shared/dataintegritystatuses.ts b/lending/src/sdk/models/shared/dataintegritystatuses.ts index f5f9dd098..0e6f369a4 100644 --- a/lending/src/sdk/models/shared/dataintegritystatuses.ts +++ b/lending/src/sdk/models/shared/dataintegritystatuses.ts @@ -1,35 +1,91 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { DataIntegrityStatus } from './dataintegritystatus'; import { - DataIntegrityStatus, - DataIntegrityStatus$inboundSchema, -} from "./dataintegritystatus.js"; - -export type DataIntegrityStatuses = { - metadata?: Array | undefined; -}; - -/** @internal */ -export const DataIntegrityStatuses$inboundSchema: z.ZodType< - DataIntegrityStatuses, - z.ZodTypeDef, - unknown -> = z.object({ - metadata: z.array(DataIntegrityStatus$inboundSchema).optional(), -}); - -export function dataIntegrityStatusesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityStatuses$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityStatuses' from JSON`, - ); + DataIntegrityStatusFromJSON, + DataIntegrityStatusFromJSONTyped, + DataIntegrityStatusToJSON, + DataIntegrityStatusToJSONTyped, +} from './dataintegritystatus'; + +/** + * + * @export + * @interface DataIntegrityStatuses + */ +export interface DataIntegrityStatuses { + /** + * + * @type {Array} + * @memberof DataIntegrityStatuses + */ + metadata?: Array; +} + +/** + * Check if a given object implements the DataIntegrityStatuses interface. + */ +export function instanceOfDataIntegrityStatuses(value: object): value is DataIntegrityStatuses { + return true; +} + +export function DataIntegrityStatusesFromJSON(json: any): DataIntegrityStatuses { + return DataIntegrityStatusesFromJSONTyped(json, false); +} + +export function DataIntegrityStatusesFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityStatuses { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : ((json['metadata'] as Array).map(DataIntegrityStatusFromJSON)), + }; +} + +export function DataIntegrityStatusesToJSON(json: any): DataIntegrityStatuses { + return DataIntegrityStatusesToJSONTyped(json, false); +} + +export function DataIntegrityStatusesToJSONTyped(value?: DataIntegrityStatuses | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': value['metadata'] == null ? undefined : ((value['metadata'] as Array).map(DataIntegrityStatusToJSON)), + }; +} + + +export interface DataIntegrityStatusGetResponseDataIntegrityStatuses { + /** + * + * @type {Array} + * @memberof DataIntegrityStatuses + */ + metadata?: Array; +} + +export interface GetDataIntegrityStatusResponseDataIntegrityStatuses { + /** + * + * @type {Array} + * @memberof DataIntegrityStatuses + */ + metadata?: Array; } diff --git a/lending/src/sdk/models/shared/dataintegritystatusinfo.ts b/lending/src/sdk/models/shared/dataintegritystatusinfo.ts index 50296407c..6f2136a47 100644 --- a/lending/src/sdk/models/shared/dataintegritystatusinfo.ts +++ b/lending/src/sdk/models/shared/dataintegritystatusinfo.ts @@ -1,66 +1,187 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { IntegrityStatus } from './integritystatus'; import { - IntegrityStatus, - IntegrityStatus$inboundSchema, -} from "./integritystatus.js"; + IntegrityStatusFromJSON, + IntegrityStatusFromJSONTyped, + IntegrityStatusToJSON, + IntegrityStatusToJSONTyped, +} from './integritystatus'; -export type DataIntegrityStatusInfo = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - lastMatched?: string | undefined; - /** - * The current status of the most recently run matching algorithm. - */ - currentStatus?: IntegrityStatus | undefined; - /** - * Detailed explanation supporting the status value. - */ - statusMessage?: string | undefined; -}; +/** + * + * @export + * @interface DataIntegrityStatusInfo + */ +export interface DataIntegrityStatusInfo { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityStatusInfo + */ + lastMatched?: string; + /** + * + * @type {IntegrityStatus} + * @memberof DataIntegrityStatusInfo + */ + currentStatus?: IntegrityStatus; + /** + * Detailed explanation supporting the status value. + * @type {string} + * @memberof DataIntegrityStatusInfo + */ + statusMessage?: string; +} + + + +/** + * Check if a given object implements the DataIntegrityStatusInfo interface. + */ +export function instanceOfDataIntegrityStatusInfo(value: object): value is DataIntegrityStatusInfo { + return true; +} + +export function DataIntegrityStatusInfoFromJSON(json: any): DataIntegrityStatusInfo { + return DataIntegrityStatusInfoFromJSONTyped(json, false); +} -/** @internal */ -export const DataIntegrityStatusInfo$inboundSchema: z.ZodType< - DataIntegrityStatusInfo, - z.ZodTypeDef, - unknown -> = z.object({ - lastMatched: z.string().optional(), - currentStatus: IntegrityStatus$inboundSchema.optional(), - statusMessage: z.string().optional(), -}); +export function DataIntegrityStatusInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegrityStatusInfo { + if (json == null) { + return json; + } + return { + + 'lastMatched': json['lastMatched'] == null ? undefined : json['lastMatched'], + 'currentStatus': json['currentStatus'] == null ? undefined : IntegrityStatusFromJSON(json['currentStatus']), + 'statusMessage': json['statusMessage'] == null ? undefined : json['statusMessage'], + }; +} + +export function DataIntegrityStatusInfoToJSON(json: any): DataIntegrityStatusInfo { + return DataIntegrityStatusInfoToJSONTyped(json, false); +} + +export function DataIntegrityStatusInfoToJSONTyped(value?: DataIntegrityStatusInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'lastMatched': value['lastMatched'], + 'currentStatus': IntegrityStatusToJSON(value['currentStatus']), + 'statusMessage': value['statusMessage'], + }; +} + + +export interface DataIntegrityStatusDataIntegrityStatusInfo { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityStatusInfo + */ + lastMatched?: string; + /** + * + * @type {IntegrityStatus} + * @memberof DataIntegrityStatusInfo + */ + currentStatus?: IntegrityStatus; + /** + * Detailed explanation supporting the status value. + * @type {string} + * @memberof DataIntegrityStatusInfo + */ + statusMessage?: string; +} -export function dataIntegrityStatusInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegrityStatusInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegrityStatusInfo' from JSON`, - ); +export interface DataIntegrityStatusesDataIntegrityStatusInfo { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataIntegrityStatusInfo + */ + lastMatched?: string; + /** + * + * @type {IntegrityStatus} + * @memberof DataIntegrityStatusInfo + */ + currentStatus?: IntegrityStatus; + /** + * Detailed explanation supporting the status value. + * @type {string} + * @memberof DataIntegrityStatusInfo + */ + statusMessage?: string; } diff --git a/lending/src/sdk/models/shared/dataintegritysummaries.ts b/lending/src/sdk/models/shared/dataintegritysummaries.ts index e97bf82b0..10855edf5 100644 --- a/lending/src/sdk/models/shared/dataintegritysummaries.ts +++ b/lending/src/sdk/models/shared/dataintegritysummaries.ts @@ -1,35 +1,91 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { DataIntegritySummary } from './dataintegritysummary'; import { - DataIntegritySummary, - DataIntegritySummary$inboundSchema, -} from "./dataintegritysummary.js"; - -export type DataIntegritySummaries = { - summaries?: Array | undefined; -}; - -/** @internal */ -export const DataIntegritySummaries$inboundSchema: z.ZodType< - DataIntegritySummaries, - z.ZodTypeDef, - unknown -> = z.object({ - summaries: z.array(DataIntegritySummary$inboundSchema).optional(), -}); - -export function dataIntegritySummariesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegritySummaries$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegritySummaries' from JSON`, - ); + DataIntegritySummaryFromJSON, + DataIntegritySummaryFromJSONTyped, + DataIntegritySummaryToJSON, + DataIntegritySummaryToJSONTyped, +} from './dataintegritysummary'; + +/** + * + * @export + * @interface DataIntegritySummaries + */ +export interface DataIntegritySummaries { + /** + * + * @type {Array} + * @memberof DataIntegritySummaries + */ + summaries?: Array; +} + +/** + * Check if a given object implements the DataIntegritySummaries interface. + */ +export function instanceOfDataIntegritySummaries(value: object): value is DataIntegritySummaries { + return true; +} + +export function DataIntegritySummariesFromJSON(json: any): DataIntegritySummaries { + return DataIntegritySummariesFromJSONTyped(json, false); +} + +export function DataIntegritySummariesFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegritySummaries { + if (json == null) { + return json; + } + return { + + 'summaries': json['summaries'] == null ? undefined : ((json['summaries'] as Array).map(DataIntegritySummaryFromJSON)), + }; +} + +export function DataIntegritySummariesToJSON(json: any): DataIntegritySummaries { + return DataIntegritySummariesToJSONTyped(json, false); +} + +export function DataIntegritySummariesToJSONTyped(value?: DataIntegritySummaries | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'summaries': value['summaries'] == null ? undefined : ((value['summaries'] as Array).map(DataIntegritySummaryToJSON)), + }; +} + + +export interface DataIntegritySummariesGetResponseDataIntegritySummaries { + /** + * + * @type {Array} + * @memberof DataIntegritySummaries + */ + summaries?: Array; +} + +export interface GetDataIntegritySummariesResponseDataIntegritySummaries { + /** + * + * @type {Array} + * @memberof DataIntegritySummaries + */ + summaries?: Array; } diff --git a/lending/src/sdk/models/shared/dataintegritysummary.ts b/lending/src/sdk/models/shared/dataintegritysummary.ts index e7df54442..3290b5591 100644 --- a/lending/src/sdk/models/shared/dataintegritysummary.ts +++ b/lending/src/sdk/models/shared/dataintegritysummary.ts @@ -1,46 +1,159 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { DataIntegrityByAmount } from './dataintegritybyamount'; import { - DataIntegrityByAmount, - DataIntegrityByAmount$inboundSchema, -} from "./dataintegritybyamount.js"; + DataIntegrityByAmountFromJSON, + DataIntegrityByAmountFromJSONTyped, + DataIntegrityByAmountToJSON, + DataIntegrityByAmountToJSONTyped, +} from './dataintegritybyamount'; +import type { DataIntegrityByCount } from './dataintegritybycount'; import { - DataIntegrityByCount, - DataIntegrityByCount$inboundSchema, -} from "./dataintegritybycount.js"; - -export type DataIntegritySummary = { - /** - * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. - */ - type?: string | undefined; - byAmount?: DataIntegrityByAmount | undefined; - byCount?: DataIntegrityByCount | undefined; -}; - -/** @internal */ -export const DataIntegritySummary$inboundSchema: z.ZodType< - DataIntegritySummary, - z.ZodTypeDef, - unknown -> = z.object({ - type: z.string().optional(), - byAmount: DataIntegrityByAmount$inboundSchema.optional(), - byCount: DataIntegrityByCount$inboundSchema.optional(), -}); - -export function dataIntegritySummaryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataIntegritySummary$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataIntegritySummary' from JSON`, - ); + DataIntegrityByCountFromJSON, + DataIntegrityByCountFromJSONTyped, + DataIntegrityByCountToJSON, + DataIntegrityByCountToJSONTyped, +} from './dataintegritybycount'; + +/** + * + * @export + * @interface DataIntegritySummary + */ +export interface DataIntegritySummary { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegritySummary + */ + type?: string; + /** + * + * @type {DataIntegrityByAmount} + * @memberof DataIntegritySummary + */ + byAmount?: DataIntegrityByAmount; + /** + * + * @type {DataIntegrityByCount} + * @memberof DataIntegritySummary + */ + byCount?: DataIntegrityByCount; +} + +/** + * Check if a given object implements the DataIntegritySummary interface. + */ +export function instanceOfDataIntegritySummary(value: object): value is DataIntegritySummary { + return true; +} + +export function DataIntegritySummaryFromJSON(json: any): DataIntegritySummary { + return DataIntegritySummaryFromJSONTyped(json, false); +} + +export function DataIntegritySummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataIntegritySummary { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'byAmount': json['byAmount'] == null ? undefined : DataIntegrityByAmountFromJSON(json['byAmount']), + 'byCount': json['byCount'] == null ? undefined : DataIntegrityByCountFromJSON(json['byCount']), + }; +} + +export function DataIntegritySummaryToJSON(json: any): DataIntegritySummary { + return DataIntegritySummaryToJSONTyped(json, false); +} + +export function DataIntegritySummaryToJSONTyped(value?: DataIntegritySummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': value['type'], + 'byAmount': DataIntegrityByAmountToJSON(value['byAmount']), + 'byCount': DataIntegrityByCountToJSON(value['byCount']), + }; +} + + +export interface DataIntegritySummariesDataIntegritySummary { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegritySummary + */ + type?: string; + /** + * + * @type {DataIntegrityByAmount} + * @memberof DataIntegritySummary + */ + byAmount?: DataIntegrityByAmount; + /** + * + * @type {DataIntegrityByCount} + * @memberof DataIntegritySummary + */ + byCount?: DataIntegrityByCount; +} + +export interface DataIntegritySummariesGetResponseDataIntegritySummary { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegritySummary + */ + type?: string; + /** + * + * @type {DataIntegrityByAmount} + * @memberof DataIntegritySummary + */ + byAmount?: DataIntegrityByAmount; + /** + * + * @type {DataIntegrityByCount} + * @memberof DataIntegritySummary + */ + byCount?: DataIntegrityByCount; +} + +export interface GetDataIntegritySummariesResponseDataIntegritySummary { + /** + * The data type which the data type in the URL has been matched against. For example, if you've matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions. + * @type {string} + * @memberof DataIntegritySummary + */ + type?: string; + /** + * + * @type {DataIntegrityByAmount} + * @memberof DataIntegritySummary + */ + byAmount?: DataIntegrityByAmount; + /** + * + * @type {DataIntegrityByCount} + * @memberof DataIntegritySummary + */ + byCount?: DataIntegrityByCount; } diff --git a/lending/src/sdk/models/shared/datasource.ts b/lending/src/sdk/models/shared/datasource.ts index d71ace0d4..9f5f570b6 100644 --- a/lending/src/sdk/models/shared/datasource.ts +++ b/lending/src/sdk/models/shared/datasource.ts @@ -1,35 +1,100 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { Accounts, Accounts$inboundSchema } from "./accounts.js"; - -export type DataSource = { - /** - * An array containing bank account data for each connected banking data source that have the following data types enabled: `banking-accounts`, `banking-transactions`. - */ - accounts?: Array | undefined; -}; - -/** @internal */ -export const DataSource$inboundSchema: z.ZodType< - DataSource, - z.ZodTypeDef, - unknown -> = z.object({ - accounts: z.array(Accounts$inboundSchema).optional(), -}); - -export function dataSourceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataSource$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataSource' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import type { Accounts } from './accounts'; +import { + AccountsFromJSON, + AccountsFromJSONTyped, + AccountsToJSON, + AccountsToJSONTyped, +} from './accounts'; + +/** + * + * @export + * @interface DataSource + */ +export interface DataSource { + /** + * An array containing bank account data for each connected banking data source that have the following data types enabled: `banking-accounts`, `banking-transactions`. + * @type {Array} + * @memberof DataSource + */ + accounts?: Array; +} + +/** + * Check if a given object implements the DataSource interface. + */ +export function instanceOfDataSource(value: object): value is DataSource { + return true; +} + +export function DataSourceFromJSON(json: any): DataSource { + return DataSourceFromJSONTyped(json, false); +} + +export function DataSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataSource { + if (json == null) { + return json; + } + return { + + 'accounts': json['accounts'] == null ? undefined : ((json['accounts'] as Array).map(AccountsFromJSON)), + }; +} + +export function DataSourceToJSON(json: any): DataSource { + return DataSourceToJSONTyped(json, false); +} + +export function DataSourceToJSONTyped(value?: DataSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'accounts': value['accounts'] == null ? undefined : ((value['accounts'] as Array).map(AccountsToJSON)), + }; +} + + +export interface CategorizedBankStatementGetResponseDataSource { + /** + * An array containing bank account data for each connected banking data source that have the following data types enabled: `banking-accounts`, `banking-transactions`. + * @type {Array} + * @memberof DataSource + */ + accounts?: Array; +} + +export interface EnhancedCashFlowTransactionsDataSource { + /** + * An array containing bank account data for each connected banking data source that have the following data types enabled: `banking-accounts`, `banking-transactions`. + * @type {Array} + * @memberof DataSource + */ + accounts?: Array; +} + +export interface GetCategorizedBankStatementResponseDataSource { + /** + * An array containing bank account data for each connected banking data source that have the following data types enabled: `banking-accounts`, `banking-transactions`. + * @type {Array} + * @memberof DataSource + */ + accounts?: Array; } diff --git a/lending/src/sdk/models/shared/datastatus.ts b/lending/src/sdk/models/shared/datastatus.ts index 431478c2d..39aad2723 100644 --- a/lending/src/sdk/models/shared/datastatus.ts +++ b/lending/src/sdk/models/shared/datastatus.ts @@ -1,134 +1,319 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Status } from './status'; +import type { DataTypes } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +/** + * Describes the state of data in the Codat cache for a company and data type + * @export + * @interface DataStatus */ +export interface DataStatus { + /** + * Available data types + * @type {string} + * @memberof DataStatus + */ + dataType: DataTypes; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataStatus + */ + lastSuccessfulSync?: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof DataStatus + */ + currentStatus: Status; + /** + * Unique identifier for most recent sync of data type. + * @type {string} + * @memberof DataStatus + */ + latestSyncId?: string; + /** + * Unique identifier for the most recent successful sync of data type. + * @type {string} + * @memberof DataStatus + */ + latestSuccessfulSyncId?: string; +} -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { Status, Status$inboundSchema } from "./status.js"; /** - * Available data types + * @export */ -export const DataTypes = { - AccountTransactions: "accountTransactions", - BalanceSheet: "balanceSheet", - BankAccounts: "bankAccounts", - BankTransactions: "bankTransactions", - BillCreditNotes: "billCreditNotes", - BillPayments: "billPayments", - Bills: "bills", - CashFlowStatement: "cashFlowStatement", - ChartOfAccounts: "chartOfAccounts", - Company: "company", - CreditNotes: "creditNotes", - Customers: "customers", - DirectCosts: "directCosts", - DirectIncomes: "directIncomes", - Invoices: "invoices", - ItemReceipts: "itemReceipts", - Items: "items", - JournalEntries: "journalEntries", - Journals: "journals", - PaymentMethods: "paymentMethods", - Payments: "payments", - ProfitAndLoss: "profitAndLoss", - PurchaseOrders: "purchaseOrders", - SalesOrders: "salesOrders", - Suppliers: "suppliers", - TaxRates: "taxRates", - TrackingCategories: "trackingCategories", - Transfers: "transfers", - BankingAccountBalances: "banking-accountBalances", - BankingAccounts: "banking-accounts", - BankingTransactionCategories: "banking-transactionCategories", - BankingTransactions: "banking-transactions", - CommerceCompanyInfo: "commerce-companyInfo", - CommerceCustomers: "commerce-customers", - CommerceDisputes: "commerce-disputes", - CommerceLocations: "commerce-locations", - CommerceOrders: "commerce-orders", - CommercePaymentMethods: "commerce-paymentMethods", - CommercePayments: "commerce-payments", - CommerceProductCategories: "commerce-productCategories", - CommerceProducts: "commerce-products", - CommerceTaxComponents: "commerce-taxComponents", - CommerceTransactions: "commerce-transactions", +export const DataStatusDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' } as const; +export type DataStatusDataTypeEnum = typeof DataStatusDataTypeEnum[keyof typeof DataStatusDataTypeEnum]; + /** - * Available data types + * @export */ -export type DataTypes = ClosedEnum; +export const DataStatusCurrentStatusEnum = { + Initial: 'Initial', + Queued: 'Queued', + Fetching: 'Fetching', + MapQueued: 'MapQueued', + Mapping: 'Mapping', + Complete: 'Complete', + FetchError: 'FetchError', + MapError: 'MapError', + InternalError: 'InternalError', + ProcessingQueued: 'ProcessingQueued', + Processing: 'Processing', + ProcessingError: 'ProcessingError', + ValidationQueued: 'ValidationQueued', + Validating: 'Validating', + ValidationError: 'ValidationError', + AuthError: 'AuthError', + Cancelled: 'Cancelled', + NotSupported: 'NotSupported', + RateLimitError: 'RateLimitError', + PermissionsError: 'PermissionsError', + PrerequisiteNotMet: 'PrerequisiteNotMet' +} as const; +export type DataStatusCurrentStatusEnum = typeof DataStatusCurrentStatusEnum[keyof typeof DataStatusCurrentStatusEnum]; + /** - * Describes the state of data in the Codat cache for a company and data type + * Check if a given object implements the DataStatus interface. */ -export type DataStatus = { - /** - * Available data types - */ - dataType: DataTypes; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - lastSuccessfulSync?: string | undefined; - /** - * The current status of the dataset. - */ - currentStatus: Status; - /** - * Unique identifier for most recent sync of data type. - */ - latestSyncId?: string | undefined; - /** - * Unique identifier for the most recent successful sync of data type. - */ - latestSuccessfulSyncId?: string | undefined; -}; +export function instanceOfDataStatus(value: object): value is DataStatus { + if (!('dataType' in value) || value['dataType'] === undefined) return false; + if (!('currentStatus' in value) || value['currentStatus'] === undefined) return false; + return true; +} -/** @internal */ -export const DataTypes$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(DataTypes); +export function DataStatusFromJSON(json: any): DataStatus { + return DataStatusFromJSONTyped(json, false); +} + +export function DataStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataStatus { + if (json == null) { + return json; + } + return { + + 'dataType': json['dataType'], + 'lastSuccessfulSync': json['lastSuccessfulSync'] == null ? undefined : json['lastSuccessfulSync'], + 'currentStatus': json['currentStatus'], + 'latestSyncId': json['latestSyncId'] == null ? undefined : json['latestSyncId'], + 'latestSuccessfulSyncId': json['latestSuccessfulSyncId'] == null ? undefined : json['latestSuccessfulSyncId'], + }; +} + +export function DataStatusToJSON(json: any): DataStatus { + return DataStatusToJSONTyped(json, false); +} -/** @internal */ -export const DataStatus$inboundSchema: z.ZodType< - DataStatus, - z.ZodTypeDef, - unknown -> = z.object({ - dataType: DataTypes$inboundSchema, - lastSuccessfulSync: z.string().optional(), - currentStatus: Status$inboundSchema, - latestSyncId: z.string().optional(), - latestSuccessfulSyncId: z.string().optional(), -}); +export function DataStatusToJSONTyped(value?: DataStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'dataType': value['dataType'], + 'lastSuccessfulSync': value['lastSuccessfulSync'], + 'currentStatus': value['currentStatus'], + 'latestSyncId': value['latestSyncId'], + 'latestSuccessfulSyncId': value['latestSuccessfulSyncId'], + }; +} + + +export interface DataStatusGetResponseDataStatus { + /** + * Available data types + * @type {string} + * @memberof DataStatus + */ + dataType: DataTypes; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataStatus + */ + lastSuccessfulSync?: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof DataStatus + */ + currentStatus: DataStatusCurrentStatusEnum; + /** + * Unique identifier for most recent sync of data type. + * @type {string} + * @memberof DataStatus + */ + latestSyncId?: string; + /** + * Unique identifier for the most recent successful sync of data type. + * @type {string} + * @memberof DataStatus + */ + latestSuccessfulSyncId?: string; +} -export function dataStatusFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DataStatus$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DataStatus' from JSON`, - ); +export interface GetDataStatusResponseDataStatus { + /** + * Available data types + * @type {string} + * @memberof DataStatus + */ + dataType: DataTypes; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DataStatus + */ + lastSuccessfulSync?: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof DataStatus + */ + currentStatus: DataStatusCurrentStatusEnum; + /** + * Unique identifier for most recent sync of data type. + * @type {string} + * @memberof DataStatus + */ + latestSyncId?: string; + /** + * Unique identifier for the most recent successful sync of data type. + * @type {string} + * @memberof DataStatus + */ + latestSuccessfulSyncId?: string; } diff --git a/lending/src/sdk/models/shared/datatype.ts b/lending/src/sdk/models/shared/datatype.ts index e1060cb84..1c63e9c54 100644 --- a/lending/src/sdk/models/shared/datatype.ts +++ b/lending/src/sdk/models/shared/datatype.ts @@ -1,63 +1,113 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ + +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Available data types + * @export */ export const DataType = { - AccountTransactions: "accountTransactions", - BalanceSheet: "balanceSheet", - BankAccounts: "bankAccounts", - BankTransactions: "bankTransactions", - BillCreditNotes: "billCreditNotes", - BillPayments: "billPayments", - Bills: "bills", - CashFlowStatement: "cashFlowStatement", - ChartOfAccounts: "chartOfAccounts", - Company: "company", - CreditNotes: "creditNotes", - Customers: "customers", - DirectCosts: "directCosts", - DirectIncomes: "directIncomes", - Invoices: "invoices", - ItemReceipts: "itemReceipts", - Items: "items", - JournalEntries: "journalEntries", - Journals: "journals", - PaymentMethods: "paymentMethods", - Payments: "payments", - ProfitAndLoss: "profitAndLoss", - PurchaseOrders: "purchaseOrders", - SalesOrders: "salesOrders", - Suppliers: "suppliers", - TaxRates: "taxRates", - TrackingCategories: "trackingCategories", - Transfers: "transfers", - BankingAccountBalances: "banking-accountBalances", - BankingAccounts: "banking-accounts", - BankingTransactionCategories: "banking-transactionCategories", - BankingTransactions: "banking-transactions", - CommerceCompanyInfo: "commerce-companyInfo", - CommerceCustomers: "commerce-customers", - CommerceDisputes: "commerce-disputes", - CommerceLocations: "commerce-locations", - CommerceOrders: "commerce-orders", - CommercePaymentMethods: "commerce-paymentMethods", - CommercePayments: "commerce-payments", - CommerceProductCategories: "commerce-productCategories", - CommerceProducts: "commerce-products", - CommerceTaxComponents: "commerce-taxComponents", - CommerceTransactions: "commerce-transactions", + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' } as const; -/** - * Available data types - */ -export type DataType = ClosedEnum; +export type DataType = typeof DataType[keyof typeof DataType]; + + +export function instanceOfDataType(value: any): boolean { + for (const key in DataType) { + if (Object.prototype.hasOwnProperty.call(DataType, key)) { + if (DataType[key as keyof typeof DataType] === value) { + return true; + } + } + } + return false; +} + +export function DataTypeFromJSON(json: any): DataType { + return DataTypeFromJSONTyped(json, false); +} + +export function DataTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataType { + return json as DataType; +} + +export function DataTypeToJSON(value?: DataType | null): any { + return value as any; +} + +export function DataTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): DataType { + return value as DataType; +} -/** @internal */ -export const DataType$outboundSchema: z.ZodNativeEnum = z - .nativeEnum(DataType); diff --git a/lending/src/sdk/models/shared/directcostlineitem.ts b/lending/src/sdk/models/shared/directcostlineitem.ts index fe9992a61..64e506398 100644 --- a/lending/src/sdk/models/shared/directcostlineitem.ts +++ b/lending/src/sdk/models/shared/directcostlineitem.ts @@ -1,215 +1,540 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { PropertieItemRef } from '../_speakeasy_hoisted'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ItemReference } from './itemreference'; import { - AccountRef, - AccountRef$inboundSchema, - AccountRef$Outbound, - AccountRef$outboundSchema, -} from "./accountref.js"; + ItemReferenceFromJSON, + ItemReferenceFromJSONTyped, + ItemReferenceToJSON, + ItemReferenceToJSONTyped, +} from './itemreference'; +import type { TaxRateRef } from './taxrateref'; import { - PropertieItemRef, - PropertieItemRef$inboundSchema, - PropertieItemRef$Outbound, - PropertieItemRef$outboundSchema, -} from "./propertieitemref.js"; + TaxRateRefFromJSON, + TaxRateRefFromJSONTyped, + TaxRateRefToJSON, + TaxRateRefToJSONTyped, +} from './taxrateref'; +import type { Tracking } from './tracking'; import { - TaxRateRef, - TaxRateRef$inboundSchema, - TaxRateRef$Outbound, - TaxRateRef$outboundSchema, -} from "./taxrateref.js"; + TrackingFromJSON, + TrackingFromJSONTyped, + TrackingToJSON, + TrackingToJSONTyped, +} from './tracking'; +import type { TrackingCategoryRef } from './trackingcategoryref'; import { - Tracking, - Tracking$inboundSchema, - Tracking$Outbound, - Tracking$outboundSchema, -} from "./tracking.js"; + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { AccountRef } from './accountref'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, - TrackingCategoryRef$Outbound, - TrackingCategoryRef$outboundSchema, -} from "./trackingcategoryref.js"; + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; -export type DirectCostLineItem = { - /** - * Friendly name of the goods or services. - */ - description?: string | null | undefined; - /** - * Price of each unit of goods or services. - * - * @remarks - * Note: If the platform does not provide this information, the unit amount will be mapped to the total amount. - */ - unitAmount: Decimal$ | number; - /** - * Number of units of goods or services received. - * - * @remarks - * - * Note: If the platform does not provide this information, the quantity will be mapped as 1. - */ - quantity: Decimal$ | number; - /** - * Discount amount for the line before tax. - */ - discountAmount?: Decimal$ | number | null | undefined; - /** - * Discount percentage for the line before tax. - */ - discountPercentage?: Decimal$ | number | null | undefined; - /** - * Amount of the line, inclusive of discounts but exclusive of tax. - */ - subTotal?: Decimal$ | number | null | undefined; - /** - * Amount of tax for the line. - */ - taxAmount?: Decimal$ | number | null | undefined; - /** - * Total amount of the line, including tax. - */ - totalAmount?: Decimal$ | number | null | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * 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. - * - * @remarks - * - * Found on: - * - * - Bill line items - * - Bill Credit Note line items - * - Credit Note line items - * - Direct incomes line items - * - Invoice line items - * - Items - */ - taxRateRef?: TaxRateRef | undefined; - /** - * Reference to the item the line is linked to. - */ - itemRef?: PropertieItemRef | undefined; - /** - * Collection of categories against which this direct cost is tracked. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - trackingCategoryRefs?: Array | null | undefined; - tracking?: Tracking | undefined; -}; +/** + * + * @export + * @interface DirectCostLineItem + */ +export interface DirectCostLineItem { + /** + * Friendly name of the goods or services. + * @type {string} + * @memberof DirectCostLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectCostLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services received. + * + * Note: If the platform does not provide this information, the quantity will be mapped as 1. + * @type {string} + * @memberof DirectCostLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof DirectCostLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof DirectCostLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof DirectCostLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectCostLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the the line item is linked. + * @type {TaxRateRef} + * @memberof DirectCostLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectCostLineItem + */ + itemRef?: PropertieItemRef; + /** + * Collection of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectCostLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {Tracking} + * @memberof DirectCostLineItem + */ + tracking?: Tracking; +} + +/** + * Check if a given object implements the DirectCostLineItem interface. + */ +export function instanceOfDirectCostLineItem(value: object): value is DirectCostLineItem { + if (!('unitAmount' in value) || value['unitAmount'] === undefined) return false; + if (!('quantity' in value) || value['quantity'] === undefined) return false; + return true; +} + +export function DirectCostLineItemFromJSON(json: any): DirectCostLineItem { + return DirectCostLineItemFromJSONTyped(json, false); +} + +export function DirectCostLineItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): DirectCostLineItem { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'unitAmount': json['unitAmount'], + 'quantity': json['quantity'], + 'discountAmount': json['discountAmount'] == null ? undefined : toDecimal(json['discountAmount']), + 'discountPercentage': json['discountPercentage'] == null ? undefined : toDecimal(json['discountPercentage']), + 'subTotal': json['subTotal'] == null ? undefined : toDecimal(json['subTotal']), + 'taxAmount': json['taxAmount'] == null ? undefined : toDecimal(json['taxAmount']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'taxRateRef': json['taxRateRef'] == null ? undefined : TaxRateRefFromJSON(json['taxRateRef']), + 'itemRef': json['itemRef'] == null ? undefined : ItemReferenceFromJSON(json['itemRef']), + 'trackingCategoryRefs': json['trackingCategoryRefs'] == null ? undefined : ((json['trackingCategoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'tracking': json['tracking'] == null ? undefined : TrackingFromJSON(json['tracking']), + }; +} -/** @internal */ -export const DirectCostLineItem$inboundSchema: z.ZodType< - DirectCostLineItem, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.nullable(z.string()).optional(), - unitAmount: z.number().transform(v => new Decimal$(v)), - quantity: z.number().transform(v => new Decimal$(v)), - discountAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - taxAmount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - totalAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - accountRef: AccountRef$inboundSchema.optional(), - taxRateRef: TaxRateRef$inboundSchema.optional(), - itemRef: PropertieItemRef$inboundSchema.optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) - .optional(), - tracking: Tracking$inboundSchema.optional(), -}); -/** @internal */ -export type DirectCostLineItem$Outbound = { - description?: string | null | undefined; - unitAmount: number; - quantity: number; - discountAmount?: number | null | undefined; - discountPercentage?: number | null | undefined; - subTotal?: number | null | undefined; - taxAmount?: number | null | undefined; - totalAmount?: number | null | undefined; - accountRef?: AccountRef$Outbound | undefined; - taxRateRef?: TaxRateRef$Outbound | undefined; - itemRef?: PropertieItemRef$Outbound | undefined; - trackingCategoryRefs?: Array | null | undefined; - tracking?: Tracking$Outbound | undefined; -}; +export function DirectCostLineItemToJSON(json: any): DirectCostLineItem { + return DirectCostLineItemToJSONTyped(json, false); +} -/** @internal */ -export const DirectCostLineItem$outboundSchema: z.ZodType< - DirectCostLineItem$Outbound, - z.ZodTypeDef, - DirectCostLineItem -> = z.object({ - description: z.nullable(z.string()).optional(), - unitAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - quantity: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - discountAmount: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - discountPercentage: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - subTotal: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - taxAmount: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - totalAmount: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - accountRef: AccountRef$outboundSchema.optional(), - taxRateRef: TaxRateRef$outboundSchema.optional(), - itemRef: PropertieItemRef$outboundSchema.optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$outboundSchema)) - .optional(), - tracking: Tracking$outboundSchema.optional(), -}); +export function DirectCostLineItemToJSONTyped(value?: DirectCostLineItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function directCostLineItemToJSON( - directCostLineItem: DirectCostLineItem, -): string { - return JSON.stringify( - DirectCostLineItem$outboundSchema.parse(directCostLineItem), - ); + return { + + 'description': value['description'], + 'unitAmount': fromDecimal(value['unitAmount']), + 'quantity': fromDecimal(value['quantity']), + 'discountAmount': fromDecimal(value['discountAmount']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'taxRateRef': TaxRateRefToJSON(value['taxRateRef']), + 'itemRef': ItemReferenceToJSON(value['itemRef']), + 'trackingCategoryRefs': value['trackingCategoryRefs'] == null ? undefined : ((value['trackingCategoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'tracking': TrackingToJSON(value['tracking']), + }; } -export function directCostLineItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DirectCostLineItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DirectCostLineItem' from JSON`, - ); + + +export interface AccountingCreateDirectCostResponseDirectCostLineItem { + /** + * Friendly name of the goods or services. + * @type {string} + * @memberof DirectCostLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectCostLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services received. + * + * Note: If the platform does not provide this information, the quantity will be mapped as 1. + * @type {string} + * @memberof DirectCostLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof DirectCostLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof DirectCostLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof DirectCostLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectCostLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the the line item is linked. + * @type {TaxRateRef} + * @memberof DirectCostLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectCostLineItem + */ + itemRef?: ItemReference; + /** + * Collection of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectCostLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {Tracking} + * @memberof DirectCostLineItem + */ + tracking?: Tracking; +} + +export interface AccountingDirectCostDirectCostLineItem { + /** + * Friendly name of the goods or services. + * @type {string} + * @memberof DirectCostLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectCostLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services received. + * + * Note: If the platform does not provide this information, the quantity will be mapped as 1. + * @type {string} + * @memberof DirectCostLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof DirectCostLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof DirectCostLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof DirectCostLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectCostLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the the line item is linked. + * @type {TaxRateRef} + * @memberof DirectCostLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectCostLineItem + */ + itemRef?: ItemReference; + /** + * Collection of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectCostLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {Tracking} + * @memberof DirectCostLineItem + */ + tracking?: Tracking; +} + +export interface AccountingDirectCostGetResponseDirectCostLineItem { + /** + * Friendly name of the goods or services. + * @type {string} + * @memberof DirectCostLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectCostLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services received. + * + * Note: If the platform does not provide this information, the quantity will be mapped as 1. + * @type {string} + * @memberof DirectCostLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof DirectCostLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof DirectCostLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof DirectCostLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectCostLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the the line item is linked. + * @type {TaxRateRef} + * @memberof DirectCostLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectCostLineItem + */ + itemRef?: ItemReference; + /** + * Collection of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectCostLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {Tracking} + * @memberof DirectCostLineItem + */ + tracking?: Tracking; +} + +export interface GetAccountingDirectCostResponseDirectCostLineItem { + /** + * Friendly name of the goods or services. + * @type {string} + * @memberof DirectCostLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectCostLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services received. + * + * Note: If the platform does not provide this information, the quantity will be mapped as 1. + * @type {string} + * @memberof DirectCostLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectCostLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof DirectCostLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof DirectCostLineItem + */ + taxAmount?: Decimal | number | null; + /** + * Total amount of the line, including tax. + * @type {string} + * @memberof DirectCostLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectCostLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the the line item is linked. + * @type {TaxRateRef} + * @memberof DirectCostLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectCostLineItem + */ + itemRef?: ItemReference; + /** + * Collection of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectCostLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {Tracking} + * @memberof DirectCostLineItem + */ + tracking?: Tracking; } diff --git a/lending/src/sdk/models/shared/directcostprototype.ts b/lending/src/sdk/models/shared/directcostprototype.ts index b7951c106..efe170c7d 100644 --- a/lending/src/sdk/models/shared/directcostprototype.ts +++ b/lending/src/sdk/models/shared/directcostprototype.ts @@ -1,190 +1,1805 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { DirectCostLineItem } from './directcostlineitem'; import { - AccountingPaymentAllocation, - AccountingPaymentAllocation$Outbound, - AccountingPaymentAllocation$outboundSchema, -} from "./accountingpaymentallocation.js"; + DirectCostLineItemFromJSON, + DirectCostLineItemFromJSONTyped, + DirectCostLineItemToJSON, + DirectCostLineItemToJSONTyped, +} from './directcostlineitem'; +import type { SupplementalData } from './supplementaldata'; import { - ContactRef, - ContactRef$Outbound, - ContactRef$outboundSchema, -} from "./contactref.js"; + SupplementalDataFromJSON, + SupplementalDataFromJSONTyped, + SupplementalDataToJSON, + SupplementalDataToJSONTyped, +} from './supplementaldata'; +import type { ContactRef } from './contactref'; import { - DirectCostLineItem, - DirectCostLineItem$Outbound, - DirectCostLineItem$outboundSchema, -} from "./directcostlineitem.js"; + ContactRefFromJSON, + ContactRefFromJSONTyped, + ContactRefToJSON, + ContactRefToJSONTyped, +} from './contactref'; +import type { AccountingPaymentAllocation } from './accountingpaymentallocation'; import { - SupplementalData, - SupplementalData$Outbound, - SupplementalData$outboundSchema, -} from "./supplementaldata.js"; - -export type DirectCostPrototype = { - /** - * User-friendly reference for the direct cost. - */ - reference?: string | null | undefined; - /** - * A note attached to the direct cost. - */ - note?: string | null | undefined; - contactRef?: ContactRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - issueDate: string; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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: string; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * An array of line items. - */ - lineItems: Array; - /** - * An array of payment allocations. - */ - paymentAllocations: Array; - /** - * The total amount of the direct costs, excluding any taxes. - */ - subTotal: Decimal$ | number; - /** - * The total amount of tax on the direct costs. - */ - taxAmount: Decimal$ | number; - /** - * The amount of the direct costs, inclusive of tax. - */ - totalAmount: Decimal$ | number; - /** - * Supplemental data is additional data you can include in our standard data types. - * - * @remarks - * - * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - */ - supplementalData?: SupplementalData | undefined; -}; - -/** @internal */ -export type DirectCostPrototype$Outbound = { - reference?: string | null | undefined; - note?: string | null | undefined; - contactRef?: ContactRef$Outbound | undefined; - issueDate: string; - currency: string; - currencyRate?: number | null | undefined; - lineItems: Array; - paymentAllocations: Array; - subTotal: number; - taxAmount: number; - totalAmount: number; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const DirectCostPrototype$outboundSchema: z.ZodType< - DirectCostPrototype$Outbound, - z.ZodTypeDef, - DirectCostPrototype -> = z.object({ - reference: z.nullable(z.string()).optional(), - note: z.nullable(z.string()).optional(), - contactRef: ContactRef$outboundSchema.optional(), - issueDate: z.string(), - currency: z.string(), - currencyRate: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - lineItems: z.array(DirectCostLineItem$outboundSchema), - paymentAllocations: z.array(AccountingPaymentAllocation$outboundSchema), - subTotal: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - taxAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -export function directCostPrototypeToJSON( - directCostPrototype: DirectCostPrototype, -): string { - return JSON.stringify( - DirectCostPrototype$outboundSchema.parse(directCostPrototype), - ); + AccountingPaymentAllocationFromJSON, + AccountingPaymentAllocationFromJSONTyped, + AccountingPaymentAllocationToJSON, + AccountingPaymentAllocationToJSONTyped, +} from './accountingpaymentallocation'; + +/** + * + * @export + * @interface DirectCostPrototype + */ +export interface DirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +/** + * Check if a given object implements the DirectCostPrototype interface. + */ +export function instanceOfDirectCostPrototype(value: object): value is DirectCostPrototype { + if (!('issueDate' in value) || value['issueDate'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + if (!('lineItems' in value) || value['lineItems'] === undefined) return false; + if (!('paymentAllocations' in value) || value['paymentAllocations'] === undefined) return false; + if (!('subTotal' in value) || value['subTotal'] === undefined) return false; + if (!('taxAmount' in value) || value['taxAmount'] === undefined) return false; + if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false; + return true; +} + +export function DirectCostPrototypeFromJSON(json: any): DirectCostPrototype { + return DirectCostPrototypeFromJSONTyped(json, false); +} + +export function DirectCostPrototypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DirectCostPrototype { + if (json == null) { + return json; + } + return { + + 'reference': json['reference'] == null ? undefined : json['reference'], + 'note': json['note'] == null ? undefined : json['note'], + 'contactRef': json['contactRef'] == null ? undefined : ContactRefFromJSON(json['contactRef']), + 'issueDate': json['issueDate'], + 'currency': json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'lineItems': ((json['lineItems'] as Array).map(DirectCostLineItemFromJSON)), + 'paymentAllocations': ((json['paymentAllocations'] as Array).map(AccountingPaymentAllocationFromJSON)), + 'subTotal': json['subTotal'], + 'taxAmount': json['taxAmount'], + 'totalAmount': json['totalAmount'], + 'supplementalData': json['supplementalData'] == null ? undefined : SupplementalDataFromJSON(json['supplementalData']), + }; +} + +export function DirectCostPrototypeToJSON(json: any): DirectCostPrototype { + return DirectCostPrototypeToJSONTyped(json, false); +} + +export function DirectCostPrototypeToJSONTyped(value?: DirectCostPrototype | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reference': value['reference'], + 'note': value['note'], + 'contactRef': ContactRefToJSON(value['contactRef']), + 'issueDate': value['issueDate'], + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'lineItems': ((value['lineItems'] as Array).map(DirectCostLineItemToJSON)), + 'paymentAllocations': ((value['paymentAllocations'] as Array).map(AccountingPaymentAllocationToJSON)), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'supplementalData': SupplementalDataToJSON(value['supplementalData']), + }; +} + + +export interface AccountingCreateDirectCostResponseDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingDirectCostDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingDirectCostGetResponseDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingDirectCostsDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface AccountingDirectCostsListResponseDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface CreateDirectCostDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface CreateDirectCostRequestBody { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface CreateDirectCostResponseDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface DirectCostCreateRequestBody { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface DirectCostCreateResponseDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface GetAccountingDirectCostResponseDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; +} + +export interface ListAccountingDirectCostsResponseDirectCostPrototype { + /** + * User-friendly reference for the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + reference?: string | null; + /** + * A note attached to the direct cost. + * @type {string} + * @memberof DirectCostPrototype + */ + note?: string | null; + /** + * A customer or supplier associated with the direct cost. + * @type {ContactRef} + * @memberof DirectCostPrototype + */ + contactRef?: ContactRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof DirectCostPrototype + */ + issueDate: string; + /** + * 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. + * @type {string} + * @memberof DirectCostPrototype + */ + currency: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof DirectCostPrototype + */ + currencyRate?: Decimal | number | null; + /** + * An array of line items. + * @type {Array} + * @memberof DirectCostPrototype + */ + lineItems: Array; + /** + * An array of payment allocations. + * @type {Array} + * @memberof DirectCostPrototype + */ + paymentAllocations: Array; + /** + * The total amount of the direct costs, excluding any taxes. + * @type {string} + * @memberof DirectCostPrototype + */ + subTotal: Decimal | number; + /** + * The total amount of tax on the direct costs. + * @type {string} + * @memberof DirectCostPrototype + */ + taxAmount: Decimal | number; + /** + * The amount of the direct costs, inclusive of tax. + * @type {string} + * @memberof DirectCostPrototype + */ + totalAmount: Decimal | number; + /** + * + * @type {SupplementalData} + * @memberof DirectCostPrototype + */ + supplementalData?: SupplementalData; } diff --git a/lending/src/sdk/models/shared/directincomelineitem.ts b/lending/src/sdk/models/shared/directincomelineitem.ts index 1d06bb152..90bc18f1d 100644 --- a/lending/src/sdk/models/shared/directincomelineitem.ts +++ b/lending/src/sdk/models/shared/directincomelineitem.ts @@ -1,125 +1,427 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; +import type { PropertieItemRef } from '../_speakeasy_hoisted'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ItemReference } from './itemreference'; import { - PropertieItemRef, - PropertieItemRef$inboundSchema, -} from "./propertieitemref.js"; -import { TaxRateRef, TaxRateRef$inboundSchema } from "./taxrateref.js"; + ItemReferenceFromJSON, + ItemReferenceFromJSONTyped, + ItemReferenceToJSON, + ItemReferenceToJSONTyped, +} from './itemreference'; +import type { TaxRateRef } from './taxrateref'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, -} from "./trackingcategoryref.js"; + TaxRateRefFromJSON, + TaxRateRefFromJSONTyped, + TaxRateRefToJSON, + TaxRateRefToJSONTyped, +} from './taxrateref'; +import type { TrackingCategoryRef } from './trackingcategoryref'; +import { + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { AccountRef } from './accountref'; +import { + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; + +/** + * + * @export + * @interface DirectIncomeLineItem + */ +export interface DirectIncomeLineItem { + /** + * A user-friendly name of the goods or services. + * @type {string} + * @memberof DirectIncomeLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectIncomeLineItem + */ + unitAmount: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DirectIncomeLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * The amount of the line, inclusive of discounts, but exclusive of tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + subTotal?: Decimal | number | null; + /** + * The amount of tax for the line. + * Note: If the platform does not provide this information, the quantity will be mapped as 0.00. + * @type {string} + * @memberof DirectIncomeLineItem + */ + taxAmount?: Decimal | number | null; + /** + * The total amount of the line, including tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectIncomeLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof DirectIncomeLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectIncomeLineItem + */ + itemRef?: PropertieItemRef; + /** + * An array of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectIncomeLineItem + */ + trackingCategoryRefs?: Array | null; +} + +/** + * Check if a given object implements the DirectIncomeLineItem interface. + */ +export function instanceOfDirectIncomeLineItem(value: object): value is DirectIncomeLineItem { + if (!('unitAmount' in value) || value['unitAmount'] === undefined) return false; + if (!('quantity' in value) || value['quantity'] === undefined) return false; + return true; +} + +export function DirectIncomeLineItemFromJSON(json: any): DirectIncomeLineItem { + return DirectIncomeLineItemFromJSONTyped(json, false); +} + +export function DirectIncomeLineItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): DirectIncomeLineItem { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'unitAmount': json['unitAmount'], + 'quantity': json['quantity'], + 'discountAmount': json['discountAmount'] == null ? undefined : toDecimal(json['discountAmount']), + 'discountPercentage': json['discountPercentage'] == null ? undefined : toDecimal(json['discountPercentage']), + 'subTotal': json['subTotal'] == null ? undefined : toDecimal(json['subTotal']), + 'taxAmount': json['taxAmount'] == null ? undefined : toDecimal(json['taxAmount']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'taxRateRef': json['taxRateRef'] == null ? undefined : TaxRateRefFromJSON(json['taxRateRef']), + 'itemRef': json['itemRef'] == null ? undefined : ItemReferenceFromJSON(json['itemRef']), + 'trackingCategoryRefs': json['trackingCategoryRefs'] == null ? undefined : ((json['trackingCategoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + }; +} + +export function DirectIncomeLineItemToJSON(json: any): DirectIncomeLineItem { + return DirectIncomeLineItemToJSONTyped(json, false); +} + +export function DirectIncomeLineItemToJSONTyped(value?: DirectIncomeLineItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'description': value['description'], + 'unitAmount': fromDecimal(value['unitAmount']), + 'quantity': fromDecimal(value['quantity']), + 'discountAmount': fromDecimal(value['discountAmount']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'taxRateRef': TaxRateRefToJSON(value['taxRateRef']), + 'itemRef': ItemReferenceToJSON(value['itemRef']), + 'trackingCategoryRefs': value['trackingCategoryRefs'] == null ? undefined : ((value['trackingCategoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + }; +} -export type DirectIncomeLineItem = { - /** - * A user-friendly name of the goods or services. - */ - description?: string | null | undefined; - /** - * The price of each unit of goods or services. - * - * @remarks - * Note: If the platform does not provide this information, the unit amount will be mapped to the total amount. - */ - unitAmount: Decimal$ | number; - /** - * The number of units of goods or services received. - * - * @remarks - * - * Note: If the platform does not provide this information, the quantity will be mapped as 1. - */ - quantity: Decimal$ | number; - /** - * Discount amount for the line before tax. - */ - discountAmount?: Decimal$ | number | null | undefined; - /** - * Discount percentage for the line before tax. - */ - discountPercentage?: Decimal$ | number | null | undefined; - /** - * The amount of the line, inclusive of discounts, but exclusive of tax. - */ - subTotal?: Decimal$ | number | null | undefined; - /** - * The amount of tax for the line. - * - * @remarks - * Note: If the platform does not provide this information, the quantity will be mapped as 0.00. - */ - taxAmount?: Decimal$ | number | null | undefined; - /** - * The total amount of the line, including tax. - */ - totalAmount?: Decimal$ | number | null | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * 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. - * - * @remarks - * - * Found on: - * - * - Bill line items - * - Bill Credit Note line items - * - Credit Note line items - * - Direct incomes line items - * - Invoice line items - * - Items - */ - taxRateRef?: TaxRateRef | undefined; - /** - * Reference to the item the line is linked to. - */ - itemRef?: PropertieItemRef | undefined; - /** - * An array of categories against which this direct cost is tracked. - */ - trackingCategoryRefs?: Array | null | undefined; -}; -/** @internal */ -export const DirectIncomeLineItem$inboundSchema: z.ZodType< - DirectIncomeLineItem, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.nullable(z.string()).optional(), - unitAmount: z.number().transform(v => new Decimal$(v)), - quantity: z.number().transform(v => new Decimal$(v)), - discountAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - taxAmount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - totalAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - accountRef: AccountRef$inboundSchema.optional(), - taxRateRef: TaxRateRef$inboundSchema.optional(), - itemRef: PropertieItemRef$inboundSchema.optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) - .optional(), -}); +export interface AccountingDirectIncomeDirectIncomeLineItem { + /** + * A user-friendly name of the goods or services. + * @type {string} + * @memberof DirectIncomeLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectIncomeLineItem + */ + unitAmount: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DirectIncomeLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * The amount of the line, inclusive of discounts, but exclusive of tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + subTotal?: Decimal | number | null; + /** + * The amount of tax for the line. + * Note: If the platform does not provide this information, the quantity will be mapped as 0.00. + * @type {string} + * @memberof DirectIncomeLineItem + */ + taxAmount?: Decimal | number | null; + /** + * The total amount of the line, including tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectIncomeLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof DirectIncomeLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectIncomeLineItem + */ + itemRef?: ItemReference; + /** + * An array of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectIncomeLineItem + */ + trackingCategoryRefs?: Array | null; +} + +export interface AccountingDirectIncomeGetResponseDirectIncomeLineItem { + /** + * A user-friendly name of the goods or services. + * @type {string} + * @memberof DirectIncomeLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectIncomeLineItem + */ + unitAmount: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DirectIncomeLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * The amount of the line, inclusive of discounts, but exclusive of tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + subTotal?: Decimal | number | null; + /** + * The amount of tax for the line. + * Note: If the platform does not provide this information, the quantity will be mapped as 0.00. + * @type {string} + * @memberof DirectIncomeLineItem + */ + taxAmount?: Decimal | number | null; + /** + * The total amount of the line, including tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectIncomeLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof DirectIncomeLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectIncomeLineItem + */ + itemRef?: ItemReference; + /** + * An array of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectIncomeLineItem + */ + trackingCategoryRefs?: Array | null; +} -export function directIncomeLineItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DirectIncomeLineItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DirectIncomeLineItem' from JSON`, - ); +export interface GetAccountingDirectIncomeResponseDirectIncomeLineItem { + /** + * A user-friendly name of the goods or services. + * @type {string} + * @memberof DirectIncomeLineItem + */ + description?: string | null; + /** + * 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. + * @type {string} + * @memberof DirectIncomeLineItem + */ + unitAmount: Decimal | number; + /** + * 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. + * @type {string} + * @memberof DirectIncomeLineItem + */ + quantity: Decimal | number; + /** + * Discount amount for the line before tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Discount percentage for the line before tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * The amount of the line, inclusive of discounts, but exclusive of tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + subTotal?: Decimal | number | null; + /** + * The amount of tax for the line. + * Note: If the platform does not provide this information, the quantity will be mapped as 0.00. + * @type {string} + * @memberof DirectIncomeLineItem + */ + taxAmount?: Decimal | number | null; + /** + * The total amount of the line, including tax. + * @type {string} + * @memberof DirectIncomeLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof DirectIncomeLineItem + */ + accountRef?: AccountRef; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof DirectIncomeLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the product, service type, or inventory item to which the direct cost is linked. + * @type {ItemReference} + * @memberof DirectIncomeLineItem + */ + itemRef?: ItemReference; + /** + * An array of categories against which this direct cost is tracked. + * @type {Array} + * @memberof DirectIncomeLineItem + */ + trackingCategoryRefs?: Array | null; } diff --git a/lending/src/sdk/models/shared/disputestatus.ts b/lending/src/sdk/models/shared/disputestatus.ts index d1d3e700f..da3ed7a09 100644 --- a/lending/src/sdk/models/shared/disputestatus.ts +++ b/lending/src/sdk/models/shared/disputestatus.ts @@ -1,32 +1,62 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Current status of the dispute + * @export */ export const DisputeStatus = { - Won: "Won", - Lost: "Lost", - Accepted: "Accepted", - Processing: "Processing", - ChargeRefunded: "ChargeRefunded", - EvidenceRequired: "EvidenceRequired", - InquiryEvidenceRequired: "InquiryEvidenceRequired", - InquiryProcessing: "InquiryProcessing", - InquiryClosed: "InquiryClosed", - WaitingThirdParty: "WaitingThirdParty", - Unknown: "Unknown", + Won: 'Won', + Lost: 'Lost', + Accepted: 'Accepted', + Processing: 'Processing', + ChargeRefunded: 'ChargeRefunded', + EvidenceRequired: 'EvidenceRequired', + InquiryEvidenceRequired: 'InquiryEvidenceRequired', + InquiryProcessing: 'InquiryProcessing', + InquiryClosed: 'InquiryClosed', + WaitingThirdParty: 'WaitingThirdParty', + Unknown: 'Unknown' } as const; -/** - * Current status of the dispute - */ -export type DisputeStatus = ClosedEnum; +export type DisputeStatus = typeof DisputeStatus[keyof typeof DisputeStatus]; + + +export function instanceOfDisputeStatus(value: any): boolean { + for (const key in DisputeStatus) { + if (Object.prototype.hasOwnProperty.call(DisputeStatus, key)) { + if (DisputeStatus[key as keyof typeof DisputeStatus] === value) { + return true; + } + } + } + return false; +} + +export function DisputeStatusFromJSON(json: any): DisputeStatus { + return DisputeStatusFromJSONTyped(json, false); +} + +export function DisputeStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DisputeStatus { + return json as DisputeStatus; +} + +export function DisputeStatusToJSON(value?: DisputeStatus | null): any { + return value as any; +} + +export function DisputeStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): DisputeStatus { + return value as DisputeStatus; +} -/** @internal */ -export const DisputeStatus$inboundSchema: z.ZodNativeEnum< - typeof DisputeStatus -> = z.nativeEnum(DisputeStatus); diff --git a/lending/src/sdk/models/shared/enduploadsessionrequest.ts b/lending/src/sdk/models/shared/enduploadsessionrequest.ts index 5e774db58..7f78e9fce 100644 --- a/lending/src/sdk/models/shared/enduploadsessionrequest.ts +++ b/lending/src/sdk/models/shared/enduploadsessionrequest.ts @@ -1,54 +1,95 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { EndUploadSessionRequestStatus } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface EndUploadSessionRequest */ +export interface EndUploadSessionRequest { + /** + * An indicator to cancel the dataset processing or trigger ingestion and enrichment of data. + * @type {string} + * @memberof EndUploadSessionRequest + */ + status?: EndUploadSessionRequestStatus; +} -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** - * An indicator to cancel the dataset processing or trigger ingestion and enrichment of data. + * @export */ -export const EndUploadSessionRequestStatus = { - Cancel: "Cancel", - Process: "Process", +export const EndUploadSessionRequestStatusEnum = { + Cancel: 'Cancel', + Process: 'Process' } as const; +export type EndUploadSessionRequestStatusEnum = typeof EndUploadSessionRequestStatusEnum[keyof typeof EndUploadSessionRequestStatusEnum]; + + /** - * An indicator to cancel the dataset processing or trigger ingestion and enrichment of data. + * Check if a given object implements the EndUploadSessionRequest interface. */ -export type EndUploadSessionRequestStatus = ClosedEnum< - typeof EndUploadSessionRequestStatus ->; - -export type EndUploadSessionRequest = { - /** - * An indicator to cancel the dataset processing or trigger ingestion and enrichment of data. - */ - status?: EndUploadSessionRequestStatus | undefined; -}; - -/** @internal */ -export const EndUploadSessionRequestStatus$outboundSchema: z.ZodNativeEnum< - typeof EndUploadSessionRequestStatus -> = z.nativeEnum(EndUploadSessionRequestStatus); - -/** @internal */ -export type EndUploadSessionRequest$Outbound = { - status?: string | undefined; -}; - -/** @internal */ -export const EndUploadSessionRequest$outboundSchema: z.ZodType< - EndUploadSessionRequest$Outbound, - z.ZodTypeDef, - EndUploadSessionRequest -> = z.object({ - status: EndUploadSessionRequestStatus$outboundSchema.optional(), -}); - -export function endUploadSessionRequestToJSON( - endUploadSessionRequest: EndUploadSessionRequest, -): string { - return JSON.stringify( - EndUploadSessionRequest$outboundSchema.parse(endUploadSessionRequest), - ); +export function instanceOfEndUploadSessionRequest(value: object): value is EndUploadSessionRequest { + return true; +} + +export function EndUploadSessionRequestFromJSON(json: any): EndUploadSessionRequest { + return EndUploadSessionRequestFromJSONTyped(json, false); +} + +export function EndUploadSessionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndUploadSessionRequest { + if (json == null) { + return json; + } + return { + + 'status': json['status'] == null ? undefined : json['status'], + }; +} + +export function EndUploadSessionRequestToJSON(json: any): EndUploadSessionRequest { + return EndUploadSessionRequestToJSONTyped(json, false); +} + +export function EndUploadSessionRequestToJSONTyped(value?: EndUploadSessionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'status': value['status'], + }; +} + + +export interface EndBankStatementUploadSessionEndUploadSessionRequest { + /** + * An indicator to cancel the dataset processing or trigger ingestion and enrichment of data. + * @type {string} + * @memberof EndUploadSessionRequest + */ + status?: EndUploadSessionRequestStatus; +} + +export interface EndBankStatementUploadSessionRequestBody { + /** + * An indicator to cancel the dataset processing or trigger ingestion and enrichment of data. + * @type {string} + * @memberof EndUploadSessionRequest + */ + status?: EndUploadSessionRequestStatus; } diff --git a/lending/src/sdk/models/shared/enhancedcashflowitem.ts b/lending/src/sdk/models/shared/enhancedcashflowitem.ts index 43e702407..8f5e4492c 100644 --- a/lending/src/sdk/models/shared/enhancedcashflowitem.ts +++ b/lending/src/sdk/models/shared/enhancedcashflowitem.ts @@ -1,164 +1,100 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; -import { SourceRef, SourceRef$inboundSchema } from "./sourceref.js"; +import { mapValues } from '../../../runtime'; +import type { CashFlowTransaction } from './cashflowtransaction'; import { - TransactionCategory, - TransactionCategory$inboundSchema, -} from "./transactioncategory.js"; + CashFlowTransactionFromJSON, + CashFlowTransactionFromJSONTyped, + CashFlowTransactionToJSON, + CashFlowTransactionToJSONTyped, +} from './cashflowtransaction'; -export type CashFlowTransaction = { - /** - * The unique identifier of the bank transaction. - */ - id?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * The description of the bank transaction. - */ - description?: string | undefined; - /** - * The bank transaction amount. - */ - amount?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - transactionCategory?: TransactionCategory | undefined; - /** - * Returns the payment processor responsible for the transaction. - */ - platformName?: string | undefined; - /** - * An array of counterparty names involved in the transaction. - */ - counterpartyNames?: Array | undefined; - /** - * A source reference containing the `sourceType` object "Banking". - */ - sourceRef?: SourceRef | undefined; - /** - * An account reference containing the account id and name. - */ - accountRef?: AccountRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - modifiedDate?: string | undefined; - /** - * Indicates if the transaction is classified as recurring by Codat's categorization engine. - */ - isRecurring?: boolean | null | undefined; -}; +/** + * + * @export + * @interface EnhancedCashFlowItem + */ +export interface EnhancedCashFlowItem { + /** + * An array of transaction data. + * @type {Array} + * @memberof EnhancedCashFlowItem + */ + transactions?: Array; +} + +/** + * Check if a given object implements the EnhancedCashFlowItem interface. + */ +export function instanceOfEnhancedCashFlowItem(value: object): value is EnhancedCashFlowItem { + return true; +} + +export function EnhancedCashFlowItemFromJSON(json: any): EnhancedCashFlowItem { + return EnhancedCashFlowItemFromJSONTyped(json, false); +} -export type EnhancedCashFlowItem = { - /** - * An array of transaction data. - */ - transactions?: Array | undefined; -}; +export function EnhancedCashFlowItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnhancedCashFlowItem { + if (json == null) { + return json; + } + return { + + 'transactions': json['transactions'] == null ? undefined : ((json['transactions'] as Array).map(CashFlowTransactionFromJSON)), + }; +} + +export function EnhancedCashFlowItemToJSON(json: any): EnhancedCashFlowItem { + return EnhancedCashFlowItemToJSONTyped(json, false); +} -/** @internal */ -export const CashFlowTransaction$inboundSchema: z.ZodType< - CashFlowTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - date: z.string().optional(), - description: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), - transactionCategory: TransactionCategory$inboundSchema.optional(), - platformName: z.string().optional(), - counterpartyNames: z.array(z.string()).optional(), - sourceRef: SourceRef$inboundSchema.optional(), - accountRef: AccountRef$inboundSchema.optional(), - modifiedDate: z.string().optional(), - isRecurring: z.nullable(z.boolean()).optional(), -}); +export function EnhancedCashFlowItemToJSONTyped(value?: EnhancedCashFlowItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function cashFlowTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CashFlowTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CashFlowTransaction' from JSON`, - ); + return { + + 'transactions': value['transactions'] == null ? undefined : ((value['transactions'] as Array).map(CashFlowTransactionToJSON)), + }; } -/** @internal */ -export const EnhancedCashFlowItem$inboundSchema: z.ZodType< - EnhancedCashFlowItem, - z.ZodTypeDef, - unknown -> = z.object({ - transactions: z.array(z.lazy(() => CashFlowTransaction$inboundSchema)) - .optional(), -}); -export function enhancedCashFlowItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnhancedCashFlowItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnhancedCashFlowItem' from JSON`, - ); +export interface CategorizedBankStatementGetResponseEnhancedCashFlowItem { + /** + * An array of transaction data. + * @type {Array} + * @memberof EnhancedCashFlowItem + */ + transactions?: Array; +} + +export interface EnhancedCashFlowTransactionsEnhancedCashFlowItem { + /** + * An array of transaction data. + * @type {Array} + * @memberof EnhancedCashFlowItem + */ + transactions?: Array; +} + +export interface GetCategorizedBankStatementResponseEnhancedCashFlowItem { + /** + * An array of transaction data. + * @type {Array} + * @memberof EnhancedCashFlowItem + */ + transactions?: Array; } diff --git a/lending/src/sdk/models/shared/enhancedcashflowtransactions.ts b/lending/src/sdk/models/shared/enhancedcashflowtransactions.ts index 6b1246f0b..4331bf41c 100644 --- a/lending/src/sdk/models/shared/enhancedcashflowtransactions.ts +++ b/lending/src/sdk/models/shared/enhancedcashflowtransactions.ts @@ -1,53 +1,149 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { DataSource, DataSource$inboundSchema } from "./datasource.js"; +import { mapValues } from '../../../runtime'; +import type { EnhancedCashFlowItem } from './enhancedcashflowitem'; +import { + EnhancedCashFlowItemFromJSON, + EnhancedCashFlowItemFromJSONTyped, + EnhancedCashFlowItemToJSON, + EnhancedCashFlowItemToJSONTyped, +} from './enhancedcashflowitem'; +import type { ReportInfo } from './reportinfo'; import { - EnhancedCashFlowItem, - EnhancedCashFlowItem$inboundSchema, -} from "./enhancedcashflowitem.js"; -import { ReportInfo, ReportInfo$inboundSchema } from "./reportinfo.js"; + ReportInfoFromJSON, + ReportInfoFromJSONTyped, + ReportInfoToJSON, + ReportInfoToJSONTyped, +} from './reportinfo'; +import type { DataSource } from './datasource'; +import { + DataSourceFromJSON, + DataSourceFromJSONTyped, + DataSourceToJSON, + DataSourceToJSONTyped, +} from './datasource'; /** * > **Categorization engine** - * - * @remarks * > * > The categorization engine uses machine learning and has been fully trained against Plaid and TrueLayer banking data sources. It is not fully trained against the Basiq banking data source. - * + * * The Enhanced Cash Flow Transactions endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources. + * @export + * @interface EnhancedCashFlowTransactions */ -export type EnhancedCashFlowTransactions = { - /** - * Report additional information, which is specific to Lending reports. - */ - reportInfo?: ReportInfo | undefined; - dataSources?: Array | undefined; - reportItems?: Array | undefined; -}; - -/** @internal */ -export const EnhancedCashFlowTransactions$inboundSchema: z.ZodType< - EnhancedCashFlowTransactions, - z.ZodTypeDef, - unknown -> = z.object({ - reportInfo: ReportInfo$inboundSchema.optional(), - dataSources: z.array(DataSource$inboundSchema).optional(), - reportItems: z.array(EnhancedCashFlowItem$inboundSchema).optional(), -}); - -export function enhancedCashFlowTransactionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnhancedCashFlowTransactions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnhancedCashFlowTransactions' from JSON`, - ); +export interface EnhancedCashFlowTransactions { + /** + * + * @type {ReportInfo} + * @memberof EnhancedCashFlowTransactions + */ + reportInfo?: ReportInfo; + /** + * + * @type {Array} + * @memberof EnhancedCashFlowTransactions + */ + dataSources?: Array; + /** + * + * @type {Array} + * @memberof EnhancedCashFlowTransactions + */ + reportItems?: Array; +} + +/** + * Check if a given object implements the EnhancedCashFlowTransactions interface. + */ +export function instanceOfEnhancedCashFlowTransactions(value: object): value is EnhancedCashFlowTransactions { + return true; +} + +export function EnhancedCashFlowTransactionsFromJSON(json: any): EnhancedCashFlowTransactions { + return EnhancedCashFlowTransactionsFromJSONTyped(json, false); +} + +export function EnhancedCashFlowTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnhancedCashFlowTransactions { + if (json == null) { + return json; + } + return { + + 'reportInfo': json['reportInfo'] == null ? undefined : ReportInfoFromJSON(json['reportInfo']), + 'dataSources': json['dataSources'] == null ? undefined : ((json['dataSources'] as Array).map(DataSourceFromJSON)), + 'reportItems': json['reportItems'] == null ? undefined : ((json['reportItems'] as Array).map(EnhancedCashFlowItemFromJSON)), + }; +} + +export function EnhancedCashFlowTransactionsToJSON(json: any): EnhancedCashFlowTransactions { + return EnhancedCashFlowTransactionsToJSONTyped(json, false); +} + +export function EnhancedCashFlowTransactionsToJSONTyped(value?: EnhancedCashFlowTransactions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reportInfo': ReportInfoToJSON(value['reportInfo']), + 'dataSources': value['dataSources'] == null ? undefined : ((value['dataSources'] as Array).map(DataSourceToJSON)), + 'reportItems': value['reportItems'] == null ? undefined : ((value['reportItems'] as Array).map(EnhancedCashFlowItemToJSON)), + }; +} + + +export interface CategorizedBankStatementGetResponseEnhancedCashFlowTransactions { + /** + * + * @type {ReportInfo} + * @memberof EnhancedCashFlowTransactions + */ + reportInfo?: ReportInfo; + /** + * + * @type {Array} + * @memberof EnhancedCashFlowTransactions + */ + dataSources?: Array; + /** + * + * @type {Array} + * @memberof EnhancedCashFlowTransactions + */ + reportItems?: Array; +} + +export interface GetCategorizedBankStatementResponseEnhancedCashFlowTransactions { + /** + * + * @type {ReportInfo} + * @memberof EnhancedCashFlowTransactions + */ + reportInfo?: ReportInfo; + /** + * + * @type {Array} + * @memberof EnhancedCashFlowTransactions + */ + dataSources?: Array; + /** + * + * @type {Array} + * @memberof EnhancedCashFlowTransactions + */ + reportItems?: Array; } diff --git a/lending/src/sdk/models/shared/enhancedfinancialreport.ts b/lending/src/sdk/models/shared/enhancedfinancialreport.ts index 7cbb767bf..08e8394ad 100644 --- a/lending/src/sdk/models/shared/enhancedfinancialreport.ts +++ b/lending/src/sdk/models/shared/enhancedfinancialreport.ts @@ -1,106 +1,238 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { EnhancedReportInfo } from './enhancedreportinfo'; import { - EnhancedReportAccountCategory, - EnhancedReportAccountCategory$inboundSchema, -} from "./enhancedreportaccountcategory.js"; + EnhancedReportInfoFromJSON, + EnhancedReportInfoFromJSONTyped, + EnhancedReportInfoToJSON, + EnhancedReportInfoToJSONTyped, +} from './enhancedreportinfo'; +import type { ReportItem } from './reportitem'; import { - EnhancedReportInfo, - EnhancedReportInfo$inboundSchema, -} from "./enhancedreportinfo.js"; - -export type ReportItem = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * Balance of the account as reported on the profit and loss or Balance sheet. - */ - balance?: Decimal$ | number | undefined; - /** - * Name of the account. - */ - accountName?: string | undefined; - /** - * The unique account ID. - */ - accountId?: string | undefined; - accountCategory?: EnhancedReportAccountCategory | undefined; -}; - -export type EnhancedFinancialReport = { - reportInfo?: EnhancedReportInfo | undefined; - /** - * An array of report items. - */ - reportItems?: Array | undefined; -}; - -/** @internal */ -export const ReportItem$inboundSchema: z.ZodType< - ReportItem, - z.ZodTypeDef, - unknown -> = z.object({ - date: z.string().optional(), - balance: z.number().transform(v => new Decimal$(v)).optional(), - accountName: z.string().optional(), - accountId: z.string().optional(), - accountCategory: EnhancedReportAccountCategory$inboundSchema.optional(), -}); - -export function reportItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReportItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReportItem' from JSON`, - ); -} - -/** @internal */ -export const EnhancedFinancialReport$inboundSchema: z.ZodType< - EnhancedFinancialReport, - z.ZodTypeDef, - unknown -> = z.object({ - reportInfo: EnhancedReportInfo$inboundSchema.optional(), - reportItems: z.array(z.lazy(() => ReportItem$inboundSchema)).optional(), -}); - -export function enhancedFinancialReportFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnhancedFinancialReport$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnhancedFinancialReport' from JSON`, - ); + ReportItemFromJSON, + ReportItemFromJSONTyped, + ReportItemToJSON, + ReportItemToJSONTyped, +} from './reportitem'; + +/** + * + * @export + * @interface EnhancedFinancialReport + */ +export interface EnhancedFinancialReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +/** + * Check if a given object implements the EnhancedFinancialReport interface. + */ +export function instanceOfEnhancedFinancialReport(value: object): value is EnhancedFinancialReport { + return true; +} + +export function EnhancedFinancialReportFromJSON(json: any): EnhancedFinancialReport { + return EnhancedFinancialReportFromJSONTyped(json, false); +} + +export function EnhancedFinancialReportFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnhancedFinancialReport { + if (json == null) { + return json; + } + return { + + 'reportInfo': json['reportInfo'] == null ? undefined : EnhancedReportInfoFromJSON(json['reportInfo']), + 'reportItems': json['reportItems'] == null ? undefined : ((json['reportItems'] as Array).map(ReportItemFromJSON)), + }; +} + +export function EnhancedFinancialReportToJSON(json: any): EnhancedFinancialReport { + return EnhancedFinancialReportToJSONTyped(json, false); +} + +export function EnhancedFinancialReportToJSONTyped(value?: EnhancedFinancialReport | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reportInfo': EnhancedReportInfoToJSON(value['reportInfo']), + 'reportItems': value['reportItems'] == null ? undefined : ((value['reportItems'] as Array).map(ReportItemToJSON)), + }; +} + + +export interface CategorizedBalanceSheetStatementGetResponseEnhancedFinancialReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface CategorizedBalanceSheetStatementGetResponseEnhancedReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface CategorizedProfitAndLossStatementGetResponseEnhancedFinancialReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface CategorizedProfitAndLossStatementGetResponseEnhancedReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface EnhancedFinancialReportEnhancedReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface EnhancedReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface GetCategorizedBalanceSheetStatementResponseEnhancedFinancialReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface GetCategorizedBalanceSheetStatementResponseEnhancedReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface GetCategorizedProfitAndLossStatementResponseEnhancedFinancialReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; +} + +export interface GetCategorizedProfitAndLossStatementResponseEnhancedReport { + /** + * + * @type {EnhancedReportInfo} + * @memberof EnhancedFinancialReport + */ + reportInfo?: EnhancedReportInfo; + /** + * An array of report items. + * @type {Array} + * @memberof EnhancedFinancialReport + */ + reportItems?: Array; } diff --git a/lending/src/sdk/models/shared/enhancedinvoicereportitem.ts b/lending/src/sdk/models/shared/enhancedinvoicereportitem.ts index 7b4df7fb8..ae2bc1d90 100644 --- a/lending/src/sdk/models/shared/enhancedinvoicereportitem.ts +++ b/lending/src/sdk/models/shared/enhancedinvoicereportitem.ts @@ -1,159 +1,725 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { InvoiceStatus, InvoiceStatus$inboundSchema } from "./invoicestatus.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { Payment } from './payment'; import { - LendingCustomerRef, - LendingCustomerRef$inboundSchema, -} from "./lendingcustomerref.js"; -import { Payment, Payment$inboundSchema } from "./payment.js"; + PaymentFromJSON, + PaymentFromJSONTyped, + PaymentToJSON, + PaymentToJSONTyped, +} from './payment'; +import type { LendingCustomerRef } from './lendingcustomerref'; +import { + LendingCustomerRefFromJSON, + LendingCustomerRefFromJSONTyped, + LendingCustomerRefToJSON, + LendingCustomerRefToJSONTyped, +} from './lendingcustomerref'; +import type { InvoiceStatus } from './invoicestatus'; +import { + InvoiceStatusFromJSON, + InvoiceStatusFromJSONTyped, + InvoiceStatusToJSON, + InvoiceStatusToJSONTyped, +} from './invoicestatus'; + +/** + * + * @export + * @interface EnhancedInvoiceReportItem + */ +export interface EnhancedInvoiceReportItem { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + sourceModifiedDate?: string; + /** + * ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + id?: string; + /** + * Invoice number. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + invoiceNumber?: string; + /** + * + * @type {LendingCustomerRef} + * @memberof EnhancedInvoiceReportItem + */ + customerRef?: LendingCustomerRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + dueDate?: string; + /** + * + * @type {InvoiceStatus} + * @memberof EnhancedInvoiceReportItem + */ + status?: InvoiceStatus; + /** + * 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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + currency?: string; + /** + * Invoice's total amount. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + totalAmount?: Decimal | number; + /** + * Invoice's total amount due. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + amountDue?: Decimal | number; + /** + * + * @type {Array} + * @memberof EnhancedInvoiceReportItem + */ + payments?: Array; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + paidOnDate?: string; +} + + + +/** + * Check if a given object implements the EnhancedInvoiceReportItem interface. + */ +export function instanceOfEnhancedInvoiceReportItem(value: object): value is EnhancedInvoiceReportItem { + return true; +} + +export function EnhancedInvoiceReportItemFromJSON(json: any): EnhancedInvoiceReportItem { + return EnhancedInvoiceReportItemFromJSONTyped(json, false); +} + +export function EnhancedInvoiceReportItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnhancedInvoiceReportItem { + if (json == null) { + return json; + } + return { + + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'id': json['id'] == null ? undefined : json['id'], + 'invoiceNumber': json['invoiceNumber'] == null ? undefined : json['invoiceNumber'], + 'customerRef': json['customerRef'] == null ? undefined : LendingCustomerRefFromJSON(json['customerRef']), + 'issueDate': json['issueDate'] == null ? undefined : json['issueDate'], + 'dueDate': json['dueDate'] == null ? undefined : json['dueDate'], + 'status': json['status'] == null ? undefined : InvoiceStatusFromJSON(json['status']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'amountDue': json['amountDue'] == null ? undefined : toDecimal(json['amountDue']), + 'payments': json['payments'] == null ? undefined : ((json['payments'] as Array).map(PaymentFromJSON)), + 'paidOnDate': json['paidOnDate'] == null ? undefined : json['paidOnDate'], + }; +} -export type EnhancedInvoiceReportItem = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. - */ - id?: string | undefined; - /** - * Invoice number. - */ - invoiceNumber?: string | undefined; - customerRef?: LendingCustomerRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - issueDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - dueDate?: string | undefined; - /** - * Current state of the invoice: - * - * @remarks - * - * - `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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld). - * - `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`. - * - `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. - */ - status?: InvoiceStatus | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Invoice's total amount. - */ - totalAmount?: Decimal$ | number | undefined; - /** - * Invoice's total amount due. - */ - amountDue?: Decimal$ | number | undefined; - payments?: Array | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - paidOnDate?: string | undefined; -}; +export function EnhancedInvoiceReportItemToJSON(json: any): EnhancedInvoiceReportItem { + return EnhancedInvoiceReportItemToJSONTyped(json, false); +} + +export function EnhancedInvoiceReportItemToJSONTyped(value?: EnhancedInvoiceReportItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -/** @internal */ -export const EnhancedInvoiceReportItem$inboundSchema: z.ZodType< - EnhancedInvoiceReportItem, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - invoiceNumber: z.string().optional(), - customerRef: LendingCustomerRef$inboundSchema.optional(), - issueDate: z.string().optional(), - dueDate: z.string().optional(), - status: InvoiceStatus$inboundSchema.optional(), - currency: z.string().optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - amountDue: z.number().transform(v => new Decimal$(v)).optional(), - payments: z.array(Payment$inboundSchema).optional(), - paidOnDate: z.string().optional(), -}); + return { + + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'id': value['id'], + 'invoiceNumber': value['invoiceNumber'], + 'customerRef': LendingCustomerRefToJSON(value['customerRef']), + 'issueDate': value['issueDate'], + 'dueDate': value['dueDate'], + 'status': InvoiceStatusToJSON(value['status']), + 'currency': value['currency'], + 'totalAmount': fromDecimal(value['totalAmount']), + 'amountDue': fromDecimal(value['amountDue']), + 'payments': value['payments'] == null ? undefined : ((value['payments'] as Array).map(PaymentToJSON)), + 'paidOnDate': value['paidOnDate'], + }; +} + + +export interface EnhancedInvoicesReportEnhancedInvoiceReportItem { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + sourceModifiedDate?: string; + /** + * ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + id?: string; + /** + * Invoice number. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + invoiceNumber?: string; + /** + * + * @type {LendingCustomerRef} + * @memberof EnhancedInvoiceReportItem + */ + customerRef?: LendingCustomerRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + dueDate?: string; + /** + * + * @type {InvoiceStatus} + * @memberof EnhancedInvoiceReportItem + */ + status?: InvoiceStatus; + /** + * 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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + currency?: string; + /** + * Invoice's total amount. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + totalAmount?: Decimal | number; + /** + * Invoice's total amount due. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + amountDue?: Decimal | number; + /** + * + * @type {Array} + * @memberof EnhancedInvoiceReportItem + */ + payments?: Array; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + paidOnDate?: string; +} + +export interface ListReconciledInvoicesResponseEnhancedInvoiceReportItem { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + sourceModifiedDate?: string; + /** + * ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + id?: string; + /** + * Invoice number. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + invoiceNumber?: string; + /** + * + * @type {LendingCustomerRef} + * @memberof EnhancedInvoiceReportItem + */ + customerRef?: LendingCustomerRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + dueDate?: string; + /** + * + * @type {InvoiceStatus} + * @memberof EnhancedInvoiceReportItem + */ + status?: InvoiceStatus; + /** + * 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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + currency?: string; + /** + * Invoice's total amount. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + totalAmount?: Decimal | number; + /** + * Invoice's total amount due. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + amountDue?: Decimal | number; + /** + * + * @type {Array} + * @memberof EnhancedInvoiceReportItem + */ + payments?: Array; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + paidOnDate?: string; +} -export function enhancedInvoiceReportItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnhancedInvoiceReportItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnhancedInvoiceReportItem' from JSON`, - ); +export interface ReconciledInvoicesListResponseEnhancedInvoiceReportItem { + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + sourceModifiedDate?: string; + /** + * ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + id?: string; + /** + * Invoice number. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + invoiceNumber?: string; + /** + * + * @type {LendingCustomerRef} + * @memberof EnhancedInvoiceReportItem + */ + customerRef?: LendingCustomerRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + issueDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + dueDate?: string; + /** + * + * @type {InvoiceStatus} + * @memberof EnhancedInvoiceReportItem + */ + status?: InvoiceStatus; + /** + * 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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + currency?: string; + /** + * Invoice's total amount. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + totalAmount?: Decimal | number; + /** + * Invoice's total amount due. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + amountDue?: Decimal | number; + /** + * + * @type {Array} + * @memberof EnhancedInvoiceReportItem + */ + payments?: Array; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedInvoiceReportItem + */ + paidOnDate?: string; } diff --git a/lending/src/sdk/models/shared/enhancedinvoicesreport.ts b/lending/src/sdk/models/shared/enhancedinvoicesreport.ts index aceff1eb0..f1b128844 100644 --- a/lending/src/sdk/models/shared/enhancedinvoicesreport.ts +++ b/lending/src/sdk/models/shared/enhancedinvoicesreport.ts @@ -1,45 +1,118 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { EnhancedInvoiceReportItem } from './enhancedinvoicereportitem'; +import { + EnhancedInvoiceReportItemFromJSON, + EnhancedInvoiceReportItemFromJSONTyped, + EnhancedInvoiceReportItemToJSON, + EnhancedInvoiceReportItemToJSONTyped, +} from './enhancedinvoicereportitem'; +import type { ReportInfo } from './reportinfo'; import { - EnhancedInvoiceReportItem, - EnhancedInvoiceReportItem$inboundSchema, -} from "./enhancedinvoicereportitem.js"; -import { ReportInfo, ReportInfo$inboundSchema } from "./reportinfo.js"; + ReportInfoFromJSON, + ReportInfoFromJSONTyped, + ReportInfoToJSON, + ReportInfoToJSONTyped, +} from './reportinfo'; /** * The enhanced invoices report takes the key elements of the Invoices report verifying those marked as paid in the accounting software have actually been paid by matching with the bank statement. + * @export + * @interface EnhancedInvoicesReport + */ +export interface EnhancedInvoicesReport { + /** + * + * @type {ReportInfo} + * @memberof EnhancedInvoicesReport + */ + reportInfo?: ReportInfo; + /** + * + * @type {Array} + * @memberof EnhancedInvoicesReport + */ + reportItems?: Array; +} + +/** + * Check if a given object implements the EnhancedInvoicesReport interface. */ -export type EnhancedInvoicesReport = { - /** - * Report additional information, which is specific to Lending reports. - */ - reportInfo?: ReportInfo | undefined; - reportItems?: Array | undefined; -}; - -/** @internal */ -export const EnhancedInvoicesReport$inboundSchema: z.ZodType< - EnhancedInvoicesReport, - z.ZodTypeDef, - unknown -> = z.object({ - reportInfo: ReportInfo$inboundSchema.optional(), - reportItems: z.array(z.nullable(EnhancedInvoiceReportItem$inboundSchema)) - .optional(), -}); - -export function enhancedInvoicesReportFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnhancedInvoicesReport$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnhancedInvoicesReport' from JSON`, - ); +export function instanceOfEnhancedInvoicesReport(value: object): value is EnhancedInvoicesReport { + return true; +} + +export function EnhancedInvoicesReportFromJSON(json: any): EnhancedInvoicesReport { + return EnhancedInvoicesReportFromJSONTyped(json, false); +} + +export function EnhancedInvoicesReportFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnhancedInvoicesReport { + if (json == null) { + return json; + } + return { + + 'reportInfo': json['reportInfo'] == null ? undefined : ReportInfoFromJSON(json['reportInfo']), + 'reportItems': json['reportItems'] == null ? undefined : ((json['reportItems'] as Array).map(EnhancedInvoiceReportItemFromJSON)), + }; +} + +export function EnhancedInvoicesReportToJSON(json: any): EnhancedInvoicesReport { + return EnhancedInvoicesReportToJSONTyped(json, false); +} + +export function EnhancedInvoicesReportToJSONTyped(value?: EnhancedInvoicesReport | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reportInfo': ReportInfoToJSON(value['reportInfo']), + 'reportItems': value['reportItems'] == null ? undefined : ((value['reportItems'] as Array).map(EnhancedInvoiceReportItemToJSON)), + }; +} + + +export interface ListReconciledInvoicesResponseEnhancedInvoicesReport { + /** + * + * @type {ReportInfo} + * @memberof EnhancedInvoicesReport + */ + reportInfo?: ReportInfo; + /** + * + * @type {Array} + * @memberof EnhancedInvoicesReport + */ + reportItems?: Array; +} + +export interface ReconciledInvoicesListResponseEnhancedInvoicesReport { + /** + * + * @type {ReportInfo} + * @memberof EnhancedInvoicesReport + */ + reportInfo?: ReportInfo; + /** + * + * @type {Array} + * @memberof EnhancedInvoicesReport + */ + reportItems?: Array; } diff --git a/lending/src/sdk/models/shared/enhancedreportaccountcategory.ts b/lending/src/sdk/models/shared/enhancedreportaccountcategory.ts index caaa26919..4d5529f11 100644 --- a/lending/src/sdk/models/shared/enhancedreportaccountcategory.ts +++ b/lending/src/sdk/models/shared/enhancedreportaccountcategory.ts @@ -1,40 +1,111 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountCategoryLevel } from './accountcategorylevel'; import { - AccountCategoryLevel, - AccountCategoryLevel$inboundSchema, -} from "./accountcategorylevel.js"; - -export type EnhancedReportAccountCategory = { - /** - * Returns a status of "Suggested" or "Confirmed". If an account has a confirmed category, it will replace any suggested category returned. - */ - status?: string | undefined; - levels?: Array | undefined; -}; - -/** @internal */ -export const EnhancedReportAccountCategory$inboundSchema: z.ZodType< - EnhancedReportAccountCategory, - z.ZodTypeDef, - unknown -> = z.object({ - status: z.string().optional(), - levels: z.array(AccountCategoryLevel$inboundSchema).optional(), -}); - -export function enhancedReportAccountCategoryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnhancedReportAccountCategory$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnhancedReportAccountCategory' from JSON`, - ); + AccountCategoryLevelFromJSON, + AccountCategoryLevelFromJSONTyped, + AccountCategoryLevelToJSON, + AccountCategoryLevelToJSONTyped, +} from './accountcategorylevel'; + +/** + * + * @export + * @interface EnhancedReportAccountCategory + */ +export interface EnhancedReportAccountCategory { + /** + * Returns a status of "Suggested" or "Confirmed". If an account has a confirmed category, it will replace any suggested category returned. + * @type {string} + * @memberof EnhancedReportAccountCategory + */ + status?: string; + /** + * + * @type {Array} + * @memberof EnhancedReportAccountCategory + */ + levels?: Array; +} + +/** + * Check if a given object implements the EnhancedReportAccountCategory interface. + */ +export function instanceOfEnhancedReportAccountCategory(value: object): value is EnhancedReportAccountCategory { + return true; +} + +export function EnhancedReportAccountCategoryFromJSON(json: any): EnhancedReportAccountCategory { + return EnhancedReportAccountCategoryFromJSONTyped(json, false); +} + +export function EnhancedReportAccountCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnhancedReportAccountCategory { + if (json == null) { + return json; + } + return { + + 'status': json['status'] == null ? undefined : json['status'], + 'levels': json['levels'] == null ? undefined : ((json['levels'] as Array).map(AccountCategoryLevelFromJSON)), + }; +} + +export function EnhancedReportAccountCategoryToJSON(json: any): EnhancedReportAccountCategory { + return EnhancedReportAccountCategoryToJSONTyped(json, false); +} + +export function EnhancedReportAccountCategoryToJSONTyped(value?: EnhancedReportAccountCategory | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'status': value['status'], + 'levels': value['levels'] == null ? undefined : ((value['levels'] as Array).map(AccountCategoryLevelToJSON)), + }; +} + + +export interface EnhancedFinancialReportEnhancedReportAccountCategory { + /** + * Returns a status of "Suggested" or "Confirmed". If an account has a confirmed category, it will replace any suggested category returned. + * @type {string} + * @memberof EnhancedReportAccountCategory + */ + status?: string; + /** + * + * @type {Array} + * @memberof EnhancedReportAccountCategory + */ + levels?: Array; +} + +export interface EnhancedReportEnhancedReportAccountCategory { + /** + * Returns a status of "Suggested" or "Confirmed". If an account has a confirmed category, it will replace any suggested category returned. + * @type {string} + * @memberof EnhancedReportAccountCategory + */ + status?: string; + /** + * + * @type {Array} + * @memberof EnhancedReportAccountCategory + */ + levels?: Array; } diff --git a/lending/src/sdk/models/shared/enhancedreportinfo.ts b/lending/src/sdk/models/shared/enhancedreportinfo.ts index e58f7c6fe..3ad2aff1e 100644 --- a/lending/src/sdk/models/shared/enhancedreportinfo.ts +++ b/lending/src/sdk/models/shared/enhancedreportinfo.ts @@ -1,75 +1,419 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface EnhancedReportInfo + */ +export interface EnhancedReportInfo { + /** + * 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. + * @type {string} + * @memberof EnhancedReportInfo + */ + currency?: string; + /** + * The name of the report. + * @type {string} + * @memberof EnhancedReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof EnhancedReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedReportInfo + */ + generatedDate?: string; +} + +/** + * Check if a given object implements the EnhancedReportInfo interface. + */ +export function instanceOfEnhancedReportInfo(value: object): value is EnhancedReportInfo { + return true; +} + +export function EnhancedReportInfoFromJSON(json: any): EnhancedReportInfo { + return EnhancedReportInfoFromJSONTyped(json, false); +} + +export function EnhancedReportInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnhancedReportInfo { + if (json == null) { + return json; + } + return { + + 'currency': json['currency'] == null ? undefined : json['currency'], + 'reportName': json['reportName'] == null ? undefined : json['reportName'], + 'companyName': json['companyName'] == null ? undefined : json['companyName'], + 'generatedDate': json['generatedDate'] == null ? undefined : json['generatedDate'], + }; +} -export type EnhancedReportInfo = { - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * The name of the report. - */ - reportName?: string | undefined; - /** - * Name of the company queried. - */ - companyName?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - generatedDate?: string | undefined; -}; +export function EnhancedReportInfoToJSON(json: any): EnhancedReportInfo { + return EnhancedReportInfoToJSONTyped(json, false); +} + +export function EnhancedReportInfoToJSONTyped(value?: EnhancedReportInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -/** @internal */ -export const EnhancedReportInfo$inboundSchema: z.ZodType< - EnhancedReportInfo, - z.ZodTypeDef, - unknown -> = z.object({ - currency: z.string().optional(), - reportName: z.string().optional(), - companyName: z.string().optional(), - generatedDate: z.string().optional(), -}); + return { + + 'currency': value['currency'], + 'reportName': value['reportName'], + 'companyName': value['companyName'], + 'generatedDate': value['generatedDate'], + }; +} + + +export interface CategorizedBalanceSheetStatementGetResponseEnhancedReportInfo { + /** + * 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. + * @type {string} + * @memberof EnhancedReportInfo + */ + currency?: string; + /** + * The name of the report. + * @type {string} + * @memberof EnhancedReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof EnhancedReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedReportInfo + */ + generatedDate?: string; +} + +export interface CategorizedProfitAndLossStatementGetResponseEnhancedReportInfo { + /** + * 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. + * @type {string} + * @memberof EnhancedReportInfo + */ + currency?: string; + /** + * The name of the report. + * @type {string} + * @memberof EnhancedReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof EnhancedReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedReportInfo + */ + generatedDate?: string; +} + +export interface EnhancedFinancialReportEnhancedReportInfo { + /** + * 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. + * @type {string} + * @memberof EnhancedReportInfo + */ + currency?: string; + /** + * The name of the report. + * @type {string} + * @memberof EnhancedReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof EnhancedReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedReportInfo + */ + generatedDate?: string; +} + +export interface EnhancedReportEnhancedReportInfo { + /** + * 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. + * @type {string} + * @memberof EnhancedReportInfo + */ + currency?: string; + /** + * The name of the report. + * @type {string} + * @memberof EnhancedReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof EnhancedReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedReportInfo + */ + generatedDate?: string; +} + +export interface GetCategorizedBalanceSheetStatementResponseEnhancedReportInfo { + /** + * 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. + * @type {string} + * @memberof EnhancedReportInfo + */ + currency?: string; + /** + * The name of the report. + * @type {string} + * @memberof EnhancedReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof EnhancedReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedReportInfo + */ + generatedDate?: string; +} -export function enhancedReportInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnhancedReportInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnhancedReportInfo' from JSON`, - ); +export interface GetCategorizedProfitAndLossStatementResponseEnhancedReportInfo { + /** + * 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. + * @type {string} + * @memberof EnhancedReportInfo + */ + currency?: string; + /** + * The name of the report. + * @type {string} + * @memberof EnhancedReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof EnhancedReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof EnhancedReportInfo + */ + generatedDate?: string; } diff --git a/lending/src/sdk/models/shared/errorvalidation.ts b/lending/src/sdk/models/shared/errorvalidation.ts index dc97b86b1..f58f66ad1 100644 --- a/lending/src/sdk/models/shared/errorvalidation.ts +++ b/lending/src/sdk/models/shared/errorvalidation.ts @@ -1,40 +1,96 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { ErrorValidationItem } from './errorvalidationitem'; import { - ErrorValidationItem, - ErrorValidationItem$inboundSchema, -} from "./errorvalidationitem.js"; + ErrorValidationItemFromJSON, + ErrorValidationItemFromJSONTyped, + ErrorValidationItemToJSON, + ErrorValidationItemToJSONTyped, +} from './errorvalidationitem'; /** * A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. + * @export + * @interface ErrorValidation + */ +export interface ErrorValidation { + /** + * + * @type {Array} + * @memberof ErrorValidation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof ErrorValidation + */ + warnings?: Array | null; +} + +/** + * Check if a given object implements the ErrorValidation interface. */ -export type ErrorValidation = { - errors?: Array | null | undefined; - warnings?: Array | null | undefined; -}; - -/** @internal */ -export const ErrorValidation$inboundSchema: z.ZodType< - ErrorValidation, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.nullable(z.array(ErrorValidationItem$inboundSchema)).optional(), - warnings: z.nullable(z.array(ErrorValidationItem$inboundSchema)).optional(), -}); - -export function errorValidationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ErrorValidation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ErrorValidation' from JSON`, - ); +export function instanceOfErrorValidation(value: object): value is ErrorValidation { + return true; +} + +export function ErrorValidationFromJSON(json: any): ErrorValidation { + return ErrorValidationFromJSONTyped(json, false); +} + +export function ErrorValidationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorValidation { + if (json == null) { + return json; + } + return { + + 'errors': json['errors'] == null ? undefined : ((json['errors'] as Array).map(ErrorValidationItemFromJSON)), + 'warnings': json['warnings'] == null ? undefined : ((json['warnings'] as Array).map(ErrorValidationItemFromJSON)), + }; +} + +export function ErrorValidationToJSON(json: any): ErrorValidation { + return ErrorValidationToJSONTyped(json, false); +} + +export function ErrorValidationToJSONTyped(value?: ErrorValidation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'errors': value['errors'] == null ? undefined : ((value['errors'] as Array).map(ErrorValidationItemToJSON)), + 'warnings': value['warnings'] == null ? undefined : ((value['warnings'] as Array).map(ErrorValidationItemToJSON)), + }; +} + + +export interface ErrorMessageErrorValidation { + /** + * + * @type {Array} + * @memberof ErrorValidation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof ErrorValidation + */ + warnings?: Array | null; } diff --git a/lending/src/sdk/models/shared/errorvalidationitem.ts b/lending/src/sdk/models/shared/errorvalidationitem.ts index cd21ec230..8317b8915 100644 --- a/lending/src/sdk/models/shared/errorvalidationitem.ts +++ b/lending/src/sdk/models/shared/errorvalidationitem.ts @@ -1,44 +1,102 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ErrorValidationItem = { - /** - * Unique identifier for a validation item. - */ - itemId?: string | null | undefined; - /** - * A message outlining validation item's issue. - */ - message?: string | null | undefined; - /** - * Name of validator. - */ - validatorName?: string | null | undefined; -}; - -/** @internal */ -export const ErrorValidationItem$inboundSchema: z.ZodType< - ErrorValidationItem, - z.ZodTypeDef, - unknown -> = z.object({ - itemId: z.nullable(z.string()).optional(), - message: z.nullable(z.string()).optional(), - validatorName: z.nullable(z.string()).optional(), -}); - -export function errorValidationItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ErrorValidationItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ErrorValidationItem' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface ErrorValidationItem + */ +export interface ErrorValidationItem { + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ErrorValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ErrorValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ErrorValidationItem + */ + validatorName?: string | null; +} + +/** + * Check if a given object implements the ErrorValidationItem interface. + */ +export function instanceOfErrorValidationItem(value: object): value is ErrorValidationItem { + return true; +} + +export function ErrorValidationItemFromJSON(json: any): ErrorValidationItem { + return ErrorValidationItemFromJSONTyped(json, false); +} + +export function ErrorValidationItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorValidationItem { + if (json == null) { + return json; + } + return { + + 'itemId': json['itemId'] == null ? undefined : json['itemId'], + 'message': json['message'] == null ? undefined : json['message'], + 'validatorName': json['validatorName'] == null ? undefined : json['validatorName'], + }; +} + +export function ErrorValidationItemToJSON(json: any): ErrorValidationItem { + return ErrorValidationItemToJSONTyped(json, false); +} + +export function ErrorValidationItemToJSONTyped(value?: ErrorValidationItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'itemId': value['itemId'], + 'message': value['message'], + 'validatorName': value['validatorName'], + }; +} + + +export interface ErrorMessageErrorValidationItem { + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ErrorValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ErrorValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ErrorValidationItem + */ + validatorName?: string | null; } diff --git a/lending/src/sdk/models/shared/excelreporttypes.ts b/lending/src/sdk/models/shared/excelreporttypes.ts index 539c8ad07..319f784d7 100644 --- a/lending/src/sdk/models/shared/excelreporttypes.ts +++ b/lending/src/sdk/models/shared/excelreporttypes.ts @@ -1,29 +1,55 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The type of the report requested in the query string. + * @export */ export const ExcelReportTypes = { - Audit: "audit", - EnhancedFinancials: "enhancedFinancials", - EnhancedInvoices: "enhancedInvoices", - EnhancedCashFlow: "enhancedCashFlow", + Audit: 'audit', + EnhancedFinancials: 'enhancedFinancials', + EnhancedInvoices: 'enhancedInvoices', + EnhancedCashFlow: 'enhancedCashFlow' } as const; -/** - * The type of the report requested in the query string. - */ -export type ExcelReportTypes = ClosedEnum; - -/** @internal */ -export const ExcelReportTypes$inboundSchema: z.ZodNativeEnum< - typeof ExcelReportTypes -> = z.nativeEnum(ExcelReportTypes); -/** @internal */ -export const ExcelReportTypes$outboundSchema: z.ZodNativeEnum< - typeof ExcelReportTypes -> = ExcelReportTypes$inboundSchema; +export type ExcelReportTypes = typeof ExcelReportTypes[keyof typeof ExcelReportTypes]; + + +export function instanceOfExcelReportTypes(value: any): boolean { + for (const key in ExcelReportTypes) { + if (Object.prototype.hasOwnProperty.call(ExcelReportTypes, key)) { + if (ExcelReportTypes[key as keyof typeof ExcelReportTypes] === value) { + return true; + } + } + } + return false; +} + +export function ExcelReportTypesFromJSON(json: any): ExcelReportTypes { + return ExcelReportTypesFromJSONTyped(json, false); +} + +export function ExcelReportTypesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExcelReportTypes { + return json as ExcelReportTypes; +} + +export function ExcelReportTypesToJSON(value?: ExcelReportTypes | null): any { + return value as any; +} + +export function ExcelReportTypesToJSONTyped(value: any, ignoreDiscriminator: boolean): ExcelReportTypes { + return value as ExcelReportTypes; +} + diff --git a/lending/src/sdk/models/shared/excelstatus.ts b/lending/src/sdk/models/shared/excelstatus.ts index 141f4e99c..460b59149 100644 --- a/lending/src/sdk/models/shared/excelstatus.ts +++ b/lending/src/sdk/models/shared/excelstatus.ts @@ -1,91 +1,425 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { ExcelReportTypes } from './excelreporttypes'; import { - ExcelReportTypes, - ExcelReportTypes$inboundSchema, -} from "./excelreporttypes.js"; + ExcelReportTypesFromJSON, + ExcelReportTypesFromJSONTyped, + ExcelReportTypesToJSON, + ExcelReportTypesToJSONTyped, +} from './excelreporttypes'; -export type ExcelStatus = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - lastGenerated?: string | undefined; - /** - * When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated. - */ - inProgress?: boolean | undefined; - /** - * The date and time of when a successful request was queued for the most recent report. - */ - queued?: string | undefined; - /** - * True if the requested report was successfully queued and false if the requested report was not able to be queued. - */ - success?: boolean | undefined; - /** - * Error details in case the report generation request was unsuccessful. - */ - errorMessage?: string | undefined; - /** - * A unique ID generated for this request. - */ - lastInvocationId?: string | undefined; - /** - * The type of the report requested in the query string. - */ - reportType?: ExcelReportTypes | undefined; - /** - * The file size in Bytes is populated upon successful generation of the report. - */ - fileSize?: number | null | undefined; -}; +/** + * + * @export + * @interface ExcelStatus + */ +export interface ExcelStatus { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ExcelStatus + */ + lastGenerated?: string; + /** + * When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated. + * @type {boolean} + * @memberof ExcelStatus + */ + inProgress?: boolean; + /** + * The date and time of when a successful request was queued for the most recent report. + * @type {string} + * @memberof ExcelStatus + */ + queued?: string; + /** + * True if the requested report was successfully queued and false if the requested report was not able to be queued. + * @type {boolean} + * @memberof ExcelStatus + */ + success?: boolean; + /** + * Error details in case the report generation request was unsuccessful. + * @type {string} + * @memberof ExcelStatus + */ + errorMessage?: string; + /** + * A unique ID generated for this request. + * @type {string} + * @memberof ExcelStatus + */ + lastInvocationId?: string; + /** + * + * @type {ExcelReportTypes} + * @memberof ExcelStatus + */ + reportType?: ExcelReportTypes; + /** + * The file size in Bytes is populated upon successful generation of the report. + * @type {number} + * @memberof ExcelStatus + */ + fileSize?: number | null; +} + + + +/** + * Check if a given object implements the ExcelStatus interface. + */ +export function instanceOfExcelStatus(value: object): value is ExcelStatus { + return true; +} + +export function ExcelStatusFromJSON(json: any): ExcelStatus { + return ExcelStatusFromJSONTyped(json, false); +} + +export function ExcelStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExcelStatus { + if (json == null) { + return json; + } + return { + + 'lastGenerated': json['lastGenerated'] == null ? undefined : json['lastGenerated'], + 'inProgress': json['inProgress'] == null ? undefined : json['inProgress'], + 'queued': json['queued'] == null ? undefined : json['queued'], + 'success': json['success'] == null ? undefined : json['success'], + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'lastInvocationId': json['lastInvocationId'] == null ? undefined : json['lastInvocationId'], + 'reportType': json['reportType'] == null ? undefined : ExcelReportTypesFromJSON(json['reportType']), + 'fileSize': json['fileSize'] == null ? undefined : json['fileSize'], + }; +} -/** @internal */ -export const ExcelStatus$inboundSchema: z.ZodType< - ExcelStatus, - z.ZodTypeDef, - unknown -> = z.object({ - lastGenerated: z.string().optional(), - inProgress: z.boolean().optional(), - queued: z.string().optional(), - success: z.boolean().optional(), - errorMessage: z.string().optional(), - lastInvocationId: z.string().optional(), - reportType: ExcelReportTypes$inboundSchema.optional(), - fileSize: z.nullable(z.number().int()).optional(), -}); +export function ExcelStatusToJSON(json: any): ExcelStatus { + return ExcelStatusToJSONTyped(json, false); +} + +export function ExcelStatusToJSONTyped(value?: ExcelStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'lastGenerated': value['lastGenerated'], + 'inProgress': value['inProgress'], + 'queued': value['queued'], + 'success': value['success'], + 'errorMessage': value['errorMessage'], + 'lastInvocationId': value['lastInvocationId'], + 'reportType': ExcelReportTypesToJSON(value['reportType']), + 'fileSize': value['fileSize'], + }; +} + + +export interface ExcelReportGenerateResponseExcelStatus { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ExcelStatus + */ + lastGenerated?: string; + /** + * When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated. + * @type {boolean} + * @memberof ExcelStatus + */ + inProgress?: boolean; + /** + * The date and time of when a successful request was queued for the most recent report. + * @type {string} + * @memberof ExcelStatus + */ + queued?: string; + /** + * True if the requested report was successfully queued and false if the requested report was not able to be queued. + * @type {boolean} + * @memberof ExcelStatus + */ + success?: boolean; + /** + * Error details in case the report generation request was unsuccessful. + * @type {string} + * @memberof ExcelStatus + */ + errorMessage?: string; + /** + * A unique ID generated for this request. + * @type {string} + * @memberof ExcelStatus + */ + lastInvocationId?: string; + /** + * + * @type {ExcelReportTypes} + * @memberof ExcelStatus + */ + reportType?: ExcelReportTypes; + /** + * The file size in Bytes is populated upon successful generation of the report. + * @type {number} + * @memberof ExcelStatus + */ + fileSize?: number | null; +} + +export interface ExcelReportGenerationStatusGetResponseExcelStatus { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ExcelStatus + */ + lastGenerated?: string; + /** + * When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated. + * @type {boolean} + * @memberof ExcelStatus + */ + inProgress?: boolean; + /** + * The date and time of when a successful request was queued for the most recent report. + * @type {string} + * @memberof ExcelStatus + */ + queued?: string; + /** + * True if the requested report was successfully queued and false if the requested report was not able to be queued. + * @type {boolean} + * @memberof ExcelStatus + */ + success?: boolean; + /** + * Error details in case the report generation request was unsuccessful. + * @type {string} + * @memberof ExcelStatus + */ + errorMessage?: string; + /** + * A unique ID generated for this request. + * @type {string} + * @memberof ExcelStatus + */ + lastInvocationId?: string; + /** + * + * @type {ExcelReportTypes} + * @memberof ExcelStatus + */ + reportType?: ExcelReportTypes; + /** + * The file size in Bytes is populated upon successful generation of the report. + * @type {number} + * @memberof ExcelStatus + */ + fileSize?: number | null; +} + +export interface GenerateExcelReportResponseExcelStatus { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ExcelStatus + */ + lastGenerated?: string; + /** + * When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated. + * @type {boolean} + * @memberof ExcelStatus + */ + inProgress?: boolean; + /** + * The date and time of when a successful request was queued for the most recent report. + * @type {string} + * @memberof ExcelStatus + */ + queued?: string; + /** + * True if the requested report was successfully queued and false if the requested report was not able to be queued. + * @type {boolean} + * @memberof ExcelStatus + */ + success?: boolean; + /** + * Error details in case the report generation request was unsuccessful. + * @type {string} + * @memberof ExcelStatus + */ + errorMessage?: string; + /** + * A unique ID generated for this request. + * @type {string} + * @memberof ExcelStatus + */ + lastInvocationId?: string; + /** + * + * @type {ExcelReportTypes} + * @memberof ExcelStatus + */ + reportType?: ExcelReportTypes; + /** + * The file size in Bytes is populated upon successful generation of the report. + * @type {number} + * @memberof ExcelStatus + */ + fileSize?: number | null; +} -export function excelStatusFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ExcelStatus$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ExcelStatus' from JSON`, - ); +export interface GetExcelReportGenerationStatusResponseExcelStatus { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ExcelStatus + */ + lastGenerated?: string; + /** + * When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated. + * @type {boolean} + * @memberof ExcelStatus + */ + inProgress?: boolean; + /** + * The date and time of when a successful request was queued for the most recent report. + * @type {string} + * @memberof ExcelStatus + */ + queued?: string; + /** + * True if the requested report was successfully queued and false if the requested report was not able to be queued. + * @type {boolean} + * @memberof ExcelStatus + */ + success?: boolean; + /** + * Error details in case the report generation request was unsuccessful. + * @type {string} + * @memberof ExcelStatus + */ + errorMessage?: string; + /** + * A unique ID generated for this request. + * @type {string} + * @memberof ExcelStatus + */ + lastInvocationId?: string; + /** + * + * @type {ExcelReportTypes} + * @memberof ExcelStatus + */ + reportType?: ExcelReportTypes; + /** + * The file size in Bytes is populated upon successful generation of the report. + * @type {number} + * @memberof ExcelStatus + */ + fileSize?: number | null; } diff --git a/lending/src/sdk/models/shared/file.ts b/lending/src/sdk/models/shared/file.ts deleted file mode 100644 index 1b2ec7e47..000000000 --- a/lending/src/sdk/models/shared/file.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type FileT = { - /** - * The file's name. - */ - fileName?: string | null | undefined; - /** - * An optional display name for the file. - */ - displayName?: string | null | undefined; - /** - * The source of the file uploaded. - */ - sourceType?: string | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - uploaded?: string | undefined; -}; - -/** @internal */ -export const FileT$inboundSchema: z.ZodType = z - .object({ - fileName: z.nullable(z.string()).optional(), - displayName: z.nullable(z.string()).optional(), - sourceType: z.nullable(z.string()).optional(), - uploaded: z.string().optional(), - }); - -export function fileFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => FileT$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'FileT' from JSON`, - ); -} diff --git a/lending/src/sdk/models/shared/fileupload.ts b/lending/src/sdk/models/shared/fileupload.ts index 9228a1f06..f29e7ad25 100644 --- a/lending/src/sdk/models/shared/fileupload.ts +++ b/lending/src/sdk/models/shared/fileupload.ts @@ -1,36 +1,16 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { blobLikeSchema } from "../../types/blobs.js"; -import { - CodatFile, - CodatFile$Outbound, - CodatFile$outboundSchema, -} from "./codatfile.js"; +import type { CodatFile } from './codatfile'; export type FileUpload = { - /** - * The file to be uploaded as an attachment. - */ - file: CodatFile | Blob; + file: CodatFile | Blob; }; -/** @internal */ -export type FileUpload$Outbound = { - file: CodatFile$Outbound | Blob; -}; - -/** @internal */ -export const FileUpload$outboundSchema: z.ZodType< - FileUpload$Outbound, - z.ZodTypeDef, - FileUpload -> = z.object({ - file: CodatFile$outboundSchema.or(blobLikeSchema), -}); +export function FileUploadFromJSON(json: any): FileUpload { + return json; +} -export function fileUploadToJSON(fileUpload: FileUpload): string { - return JSON.stringify(FileUpload$outboundSchema.parse(fileUpload)); +export function FileUploadToJSON(value?: FileUpload | null): any { + return value; } diff --git a/lending/src/sdk/models/shared/halref.ts b/lending/src/sdk/models/shared/halref.ts index b9e7e4c57..e2d090996 100644 --- a/lending/src/sdk/models/shared/halref.ts +++ b/lending/src/sdk/models/shared/halref.ts @@ -1,47 +1,1136 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type HalRef = { - /** - * Uri hypertext reference. - */ - href?: string | undefined; -}; - -/** @internal */ -export const HalRef$inboundSchema: z.ZodType = z - .object({ - href: z.string().optional(), - }); -/** @internal */ -export type HalRef$Outbound = { - href?: string | undefined; -}; - -/** @internal */ -export const HalRef$outboundSchema: z.ZodType< - HalRef$Outbound, - z.ZodTypeDef, - HalRef -> = z.object({ - href: z.string().optional(), -}); - -export function halRefToJSON(halRef: HalRef): string { - return JSON.stringify(HalRef$outboundSchema.parse(halRef)); -} -export function halRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => HalRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'HalRef' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface HalRef + */ +export interface HalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +/** + * Check if a given object implements the HalRef interface. + */ +export function instanceOfHalRef(value: object): value is HalRef { + return true; +} + +export function HalRefFromJSON(json: any): HalRef { + return HalRefFromJSONTyped(json, false); +} + +export function HalRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): HalRef { + if (json == null) { + return json; + } + return { + + 'href': json['href'] == null ? undefined : json['href'], + }; +} + +export function HalRefToJSON(json: any): HalRef { + return HalRefToJSONTyped(json, false); +} + +export function HalRefToJSONTyped(value?: HalRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'href': value['href'], + }; +} + + +export interface AccountingAccountTransactionsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingAccountTransactionsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingAccountingBankTransactionsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingAccountsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingAccountsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBankAccountTransactionsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBankAccountsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBankAccountsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBankTransactionsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBillCreditNotesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBillCreditNotesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBillPaymentsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBillPaymentsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBillsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingBillsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingCreditNotesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingCreditNotesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingCustomersHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingCustomersListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingDirectCostsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingDirectCostsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingDirectIncomesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingDirectIncomesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingInvoicesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingInvoicesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingJournalEntriesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingJournalEntriesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingJournalsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingJournalsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingPaymentsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingPaymentsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingSuppliersHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingSuppliersListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingTransfersHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface AccountingTransfersListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingAccountBalancesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingAccountBalancesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingAccountsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingAccountsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingBankAccountsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingTransactionCategoriesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingTransactionCategoriesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingTransactionsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface BankingTransactionsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CategorizedBankStatementAccountsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CategorizedBankStatementAccountsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CategorizedBankStatementTransactionsGetResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CategorizedBankStatementTransactionsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceCustomersHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceCustomersListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceDisputesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceDisputesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceLocationsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceLocationsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceOrdersHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceOrdersListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommercePaymentMethodsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommercePaymentMethodsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommercePaymentsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommercePaymentsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceProductCategoriesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceProductCategoriesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceProductsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceProductsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceTransactionsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CommerceTransactionsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CompaniesHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CompaniesListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ConnectionsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ConnectionsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface CreateOperationsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface DataIntegrityDetailsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface DataIntegrityDetailsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface GetCategorizedBankStatementTransactionsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingAccountTransactionsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingAccountsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingBankAccountTransactionsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingBankAccountsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingBillCreditNotesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingBillPaymentsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingBillsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingCreditNotesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingCustomersResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingDirectCostsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingDirectIncomesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingInvoicesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingJournalEntriesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingJournalsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingPaymentsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingSuppliersResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListAccountingTransfersResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListBankingAccountBalancesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListBankingAccountsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListBankingTransactionCategoriesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListBankingTransactionsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCategorizedBankStatementAccountsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommerceCustomersResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommerceDisputesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommerceLocationsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommerceOrdersResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommercePaymentMethodsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommercePaymentsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommerceProductCategoriesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommerceProductsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCommerceTransactionsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCompaniesResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListConnectionsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListCreateOperationsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListDataIntegrityDetailsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListPullOperationsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ListReportsResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface PaginationInformationHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface PagingInfoHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface PullOperationsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface PullOperationsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface PushOperationsHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface ReportsListResponseHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface SuppliersHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; +} + +export interface UploadBankStatementDataRequestBodyHalRef { + /** + * Uri hypertext reference. + * @type {string} + * @memberof HalRef + */ + href?: string; } diff --git a/lending/src/sdk/models/shared/index.ts b/lending/src/sdk/models/shared/index.ts index bb8e8807b..2d8983c98 100644 --- a/lending/src/sdk/models/shared/index.ts +++ b/lending/src/sdk/models/shared/index.ts @@ -1,298 +1,341 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -export * from "./accountbalance.js"; -export * from "./accountbalanceamounts.js"; -export * from "./accountcategoriesupdatedwebhook.js"; -export * from "./accountcategoriesupdatedwebhookdata.js"; -export * from "./accountcategorylevel.js"; -export * from "./accountidentifiers.js"; -export * from "./accountidentifiertype.js"; -export * from "./accountinfo.js"; -export * from "./accountingaccount.js"; -export * from "./accountingaccounts.js"; -export * from "./accountingaccounttransaction.js"; -export * from "./accountingaccounttransactions.js"; -export * from "./accountingaddress.js"; -export * from "./accountingaddresstype.js"; -export * from "./accountingagedcreditorreport.js"; -export * from "./accountingageddebtorreport.js"; -export * from "./accountingattachment.js"; -export * from "./accountingbalancesheet.js"; -export * from "./accountingbankaccount.js"; -export * from "./accountingbankaccounts.js"; -export * from "./accountingbankaccounttype.js"; -export * from "./accountingbanktransaction.js"; -export * from "./accountingbanktransactions.js"; -export * from "./accountingbill.js"; -export * from "./accountingbillcreditnote.js"; -export * from "./accountingbillcreditnotes.js"; -export * from "./accountingbillpayment.js"; -export * from "./accountingbillpayments.js"; -export * from "./accountingbills.js"; -export * from "./accountingcashflowstatement.js"; -export * from "./accountingcompanyinfo.js"; -export * from "./accountingcreateaccountresponse.js"; -export * from "./accountingcreatebankaccountresponse.js"; -export * from "./accountingcreatebanktransactions.js"; -export * from "./accountingcreatebanktransactionsresponse.js"; -export * from "./accountingcreatedirectcostresponse.js"; -export * from "./accountingcreatepaymentresponse.js"; -export * from "./accountingcreatesupplierresponse.js"; -export * from "./accountingcreatetransferresponse.js"; -export * from "./accountingcreditnote.js"; -export * from "./accountingcreditnotes.js"; -export * from "./accountingcustomer.js"; -export * from "./accountingcustomerref.js"; -export * from "./accountingcustomers.js"; -export * from "./accountingdirectcost.js"; -export * from "./accountingdirectcosts.js"; -export * from "./accountingdirectincome.js"; -export * from "./accountingdirectincomes.js"; -export * from "./accountinginvoice.js"; -export * from "./accountinginvoices.js"; -export * from "./accountingjournal.js"; -export * from "./accountingjournalentries.js"; -export * from "./accountingjournalentry.js"; -export * from "./accountingjournals.js"; -export * from "./accountingpayment.js"; -export * from "./accountingpaymentallocation.js"; -export * from "./accountingpayments.js"; -export * from "./accountingprofitandlossreport.js"; -export * from "./accountingrecordref.js"; -export * from "./accountingsupplier.js"; -export * from "./accountingsuppliers.js"; -export * from "./accountingtransfer.js"; -export * from "./accountingtransfers.js"; -export * from "./accountinstitution.js"; -export * from "./accountprototype.js"; -export * from "./accountref.js"; -export * from "./accounts.js"; -export * from "./accountspayabletracking.js"; -export * from "./accountsreceivabletracking.js"; -export * from "./accountstatus.js"; -export * from "./accounttransactionline.js"; -export * from "./accounttransactionlinerecordref.js"; -export * from "./accounttype.js"; -export * from "./agedcreditor.js"; -export * from "./agedcurrencyoutstanding.js"; -export * from "./ageddebtor.js"; -export * from "./agedoutstandingamount.js"; -export * from "./agedoutstandingamountdetail.js"; -export * from "./attachments.js"; -export * from "./balancesheet.js"; -export * from "./bankaccountref.js"; -export * from "./bankaccountstatus.js"; -export * from "./bankfeedbankaccountmapping.js"; -export * from "./bankfeedbankaccountmappingresponse.js"; -export * from "./bankfeedmapping.js"; -export * from "./bankingaccount.js"; -export * from "./bankingaccountbalance.js"; -export * from "./bankingaccountbalances.js"; -export * from "./bankingaccounts.js"; -export * from "./bankingtransaction.js"; -export * from "./bankingtransactioncategories.js"; -export * from "./bankingtransactioncategory.js"; -export * from "./bankingtransactionref.js"; -export * from "./bankingtransactions.js"; -export * from "./bankstatementuploadconfiguration.js"; -export * from "./banktransactiontype.js"; -export * from "./billcreditnotelineitem.js"; -export * from "./billcreditnotestatus.js"; -export * from "./billedtotype.js"; -export * from "./billedtotype1.js"; -export * from "./billlineitem.js"; -export * from "./billpaymentline.js"; -export * from "./billpaymentlinelink.js"; -export * from "./billpaymentlinelinktype.js"; -export * from "./billstatus.js"; -export * from "./cashflowstatement.js"; -export * from "./clientratelimitwebhook.js"; -export * from "./clientratelimitwebhookpayload.js"; -export * from "./codatfile.js"; -export * from "./commerceaddress.js"; -export * from "./commerceaddresstype.js"; -export * from "./commercecompanyinfo.js"; -export * from "./commercecustomer.js"; -export * from "./commercecustomerref.js"; -export * from "./commercecustomers.js"; -export * from "./commercedispute.js"; -export * from "./commercedisputes.js"; -export * from "./commercelocation.js"; -export * from "./commercelocations.js"; -export * from "./commerceorder.js"; -export * from "./commerceorders.js"; -export * from "./commercepayment.js"; -export * from "./commercepaymentmethod.js"; -export * from "./commercepaymentmethods.js"; -export * from "./commercepayments.js"; -export * from "./commerceproduct.js"; -export * from "./commerceproductcategories.js"; -export * from "./commerceproductcategory.js"; -export * from "./commerceproducts.js"; -export * from "./commercerecordref.js"; -export * from "./commercereport.js"; -export * from "./commercereportcomponent.js"; -export * from "./commercereportdimension.js"; -export * from "./commercereporterror.js"; -export * from "./commercereportmeasure.js"; -export * from "./commercetransaction.js"; -export * from "./commercetransactions.js"; -export * from "./companies.js"; -export * from "./company.js"; -export * from "./companyreference.js"; -export * from "./companyrequestbody.js"; -export * from "./companyupdaterequest.js"; -export * from "./connection.js"; -export * from "./connections.js"; -export * from "./contact.js"; -export * from "./contactref.js"; -export * from "./createbankaccounttransaction.js"; -export * from "./creditnotelineitem.js"; -export * from "./creditnotestatus.js"; -export * from "./customerstatus.js"; -export * from "./dataconnectionerror.js"; -export * from "./dataconnectionstatus.js"; -export * from "./dataintegrityamounts.js"; -export * from "./dataintegritybyamount.js"; -export * from "./dataintegritybycount.js"; -export * from "./dataintegrityconnectionid.js"; -export * from "./dataintegritydatatype.js"; -export * from "./dataintegritydates.js"; -export * from "./dataintegritydetail.js"; -export * from "./dataintegritydetails.js"; -export * from "./dataintegritymatch.js"; -export * from "./dataintegritystatus.js"; -export * from "./dataintegritystatuses.js"; -export * from "./dataintegritystatusinfo.js"; -export * from "./dataintegritysummaries.js"; -export * from "./dataintegritysummary.js"; -export * from "./datasource.js"; -export * from "./datastatus.js"; -export * from "./datatype.js"; -export * from "./directcostlineitem.js"; -export * from "./directcostprototype.js"; -export * from "./directincomelineitem.js"; -export * from "./disputestatus.js"; -export * from "./enduploadsessionrequest.js"; -export * from "./enhancedcashflowitem.js"; -export * from "./enhancedcashflowtransactions.js"; -export * from "./enhancedfinancialreport.js"; -export * from "./enhancedinvoicereportitem.js"; -export * from "./enhancedinvoicesreport.js"; -export * from "./enhancedreportaccountcategory.js"; -export * from "./enhancedreportinfo.js"; -export * from "./errorvalidation.js"; -export * from "./errorvalidationitem.js"; -export * from "./excelreporttypes.js"; -export * from "./excelstatus.js"; -export * from "./file.js"; -export * from "./fileupload.js"; -export * from "./halref.js"; -export * from "./integritystatus.js"; -export * from "./invoicelineitem.js"; -export * from "./invoicestatus.js"; -export * from "./itemref.js"; -export * from "./items.js"; -export * from "./journalentryrecordref.js"; -export * from "./journalline.js"; -export * from "./journalref.js"; -export * from "./journalstatus.js"; -export * from "./lendingcustomerref.js"; -export * from "./links.js"; -export * from "./loanref.js"; -export * from "./loansummary.js"; -export * from "./loansummaryintegrationtype.js"; -export * from "./loansummaryrecordref.js"; -export * from "./loansummaryrecordreftype.js"; -export * from "./loansummaryreportinfo.js"; -export * from "./loansummaryreportitem.js"; -export * from "./loantransactions.js"; -export * from "./loantransactionsreportinfo.js"; -export * from "./locationref.js"; -export * from "./metadata.js"; -export * from "./orderdiscountallocation.js"; -export * from "./orderlineitem.js"; -export * from "./path.js"; -export * from "./payment.js"; -export * from "./paymentallocationpayment.js"; -export * from "./paymentline.js"; -export * from "./paymentlinelink.js"; -export * from "./paymentlinktype.js"; -export * from "./paymentmethodref.js"; -export * from "./paymentref.js"; -export * from "./paymentstatus.js"; -export * from "./paymenttype.js"; -export * from "./periodunit.js"; -export * from "./phonenumber.js"; -export * from "./productinventory.js"; -export * from "./productinventorylocation.js"; -export * from "./productprice.js"; -export * from "./productref.js"; -export * from "./productvariant.js"; -export * from "./productvariantref.js"; -export * from "./productvariantstatus.js"; -export * from "./profitandlossreport.js"; -export * from "./projectref.js"; -export * from "./propertieaccounttype.js"; -export * from "./propertiedatatype.js"; -export * from "./propertieitemref.js"; -export * from "./pulloperation.js"; -export * from "./pulloperations.js"; -export * from "./pushchangetype.js"; -export * from "./pushfieldvalidation.js"; -export * from "./pushoperation.js"; -export * from "./pushoperationchange.js"; -export * from "./pushoperationref.js"; -export * from "./pushoperations.js"; -export * from "./pushoperationstatus.js"; -export * from "./pushoption.js"; -export * from "./pushoptionchoice.js"; -export * from "./pushoptionproperty.js"; -export * from "./pushoptiontype.js"; -export * from "./pushvalidationinfo.js"; -export * from "./reportbasis.js"; -export * from "./reportcomponentmeasure.js"; -export * from "./reportgenerationpayload.js"; -export * from "./reportinfo.js"; -export * from "./reportinput.js"; -export * from "./reportitems.js"; -export * from "./reportline.js"; -export * from "./reportoperation.js"; -export * from "./reports.js"; -export * from "./reporttype.js"; -export * from "./routinginfo.js"; -export * from "./schema.js"; -export * from "./security.js"; -export * from "./servicecharge.js"; -export * from "./servicechargetype.js"; -export * from "./sourceaccount.js"; -export * from "./sourceaccountprototype.js"; -export * from "./sourceaccountv2.js"; -export * from "./sourceaccountv2prototype.js"; -export * from "./sourceref.js"; -export * from "./startuploadsessionrequest.js"; -export * from "./status.js"; -export * from "./supplementaldata.js"; -export * from "./supplierref.js"; -export * from "./supplierstatus.js"; -export * from "./targetaccountoption.js"; -export * from "./taxcomponentallocation.js"; -export * from "./taxcomponentref.js"; -export * from "./taxrateref.js"; -export * from "./tracking.js"; -export * from "./trackingcategoryref.js"; -export * from "./trackingrecordref.js"; -export * from "./transactioncategory.js"; -export * from "./transactioncategoryref.js"; -export * from "./transactioncategorystatus.js"; -export * from "./transactioncode.js"; -export * from "./transactionsourceref.js"; -export * from "./transactionsourcetype.js"; -export * from "./transactiontype.js"; -export * from "./transferaccount.js"; -export * from "./validation.js"; -export * from "./validationitem.js"; -export * from "./weblink.js"; -export * from "./zero.js"; +export * from './accountbalance'; +export * from './accountbalanceamounts'; +export * from './accountcategoriesupdatedwebhook'; +export * from './accountcategoriesupdatedwebhookdata'; +export * from './accountcategorylevel'; +export * from './accountidentifiertype'; +export * from './accountidentifiers'; +export * from './accountinfo'; +export * from './accountinstitution'; +export * from './accountprototype'; +export * from './accountref'; +export * from './accountstatus'; +export * from './accounttransactionline'; +export * from './accounttransactionlinerecordref'; +export * from './accountingaccount'; +export * from './accountingaccounttransaction'; +export * from './accountingaccounttransactions'; +export * from './accountingaccounts'; +export * from './accountingaddress'; +export * from './accountingaddresstype'; +export * from './accountingagedcreditorreport'; +export * from './accountingageddebtorreport'; +export * from './accountingattachment'; +export * from './accountingbalancesheet'; +export * from './accountingbankaccount'; +export * from './accountingbankaccounttype'; +export * from './accountingbankaccounts'; +export * from './accountingbanktransaction'; +export * from './accountingbanktransactions'; +export * from './accountingbill'; +export * from './accountingbillcreditnote'; +export * from './accountingbillcreditnotes'; +export * from './accountingbillpayment'; +export * from './accountingbillpayments'; +export * from './accountingbills'; +export * from './accountingcashflowstatement'; +export * from './accountingcompanyinfo'; +export * from './accountingcreateaccountresponse'; +export * from './accountingcreatebankaccountresponse'; +export * from './accountingcreatebanktransactions'; +export * from './accountingcreatebanktransactionsresponse'; +export * from './accountingcreatedirectcostresponse'; +export * from './accountingcreatepaymentresponse'; +export * from './accountingcreatesupplierresponse'; +export * from './accountingcreatetransferresponse'; +export * from './accountingcreditnote'; +export * from './accountingcreditnotes'; +export * from './accountingcustomer'; +export * from './accountingcustomerref'; +export * from './accountingcustomers'; +export * from './accountingdirectcost'; +export * from './accountingdirectcosts'; +export * from './accountingdirectincome'; +export * from './accountingdirectincomes'; +export * from './accountinginvoice'; +export * from './accountinginvoices'; +export * from './accountingjournal'; +export * from './accountingjournalentries'; +export * from './accountingjournalentry'; +export * from './accountingjournals'; +export * from './accountingpayment'; +export * from './accountingpaymentallocation'; +export * from './accountingpayments'; +export * from './accountingprofitandlossreport'; +export * from './accountingrecordref'; +export * from './accountingsupplier'; +export * from './accountingsuppliers'; +export * from './accountingtransfer'; +export * from './accountingtransfers'; +export * from './accounts'; +export * from './accountspayabletracking'; +export * from './accountsreceivabletracking'; +export * from './agedcreditor'; +export * from './agedcurrencyoutstanding'; +export * from './ageddebtor'; +export * from './agedoutstandingamount'; +export * from './agedoutstandingamountdetail'; +export * from './attachments'; +export * from './balancesheet'; +export * from './bankaccountref'; +export * from './bankaccountstatus'; +export * from './bankfeedbankaccountmapping'; +export * from './bankfeedbankaccountmappingresponse'; +export * from './bankfeedmapping'; +export * from './bankstatementuploadconfiguration'; +export * from './banktransactiontype'; +export * from './bankingaccount'; +export * from './bankingaccountbalance'; +export * from './bankingaccountbalances'; +export * from './bankingaccounts'; +export * from './bankingtransaction'; +export * from './bankingtransactioncategories'; +export * from './bankingtransactioncategory'; +export * from './bankingtransactionref'; +export * from './bankingtransactions'; +export * from './billcreditnotelineitem'; +export * from './billcreditnotestatus'; +export * from './billlineitem'; +export * from './billpaymentline'; +export * from './billpaymentlinelink'; +export * from './billpaymentlinelinktype'; +export * from './billstatus'; +export * from './billedtotype'; +export * from './billedtotype1'; +export * from './cashflowstatement'; +export * from './cashflowtransaction'; +export * from './clientratelimitwebhook'; +export * from './clientratelimitwebhookpayload'; +export * from './codatfile'; +export * from './commerceaddress'; +export * from './commerceaddresstype'; +export * from './commercecompanyinfo'; +export * from './commercecustomer'; +export * from './commercecustomerref'; +export * from './commercecustomers'; +export * from './commercedispute'; +export * from './commercedisputes'; +export * from './commercelocation'; +export * from './commercelocations'; +export * from './commerceorder'; +export * from './commerceorders'; +export * from './commercepayment'; +export * from './commercepaymentmethod'; +export * from './commercepaymentmethods'; +export * from './commercepayments'; +export * from './commerceproduct'; +export * from './commerceproductcategories'; +export * from './commerceproductcategory'; +export * from './commerceproducts'; +export * from './commercerecordref'; +export * from './commercereport'; +export * from './commercereportcomponent'; +export * from './commercereportdimension'; +export * from './commercereportdimensionitems'; +export * from './commercereporterror'; +export * from './commercereportmeasure'; +export * from './commercetransaction'; +export * from './commercetransactions'; +export * from './companies'; +export * from './company'; +export * from './companyreference'; +export * from './companyreferencelinks'; +export * from './companyrequestbody'; +export * from './companyupdaterequest'; +export * from './connection'; +export * from './connections'; +export * from './contact'; +export * from './contactref'; +export * from './contactreference'; +export * from './createbankaccounttransaction'; +export * from './creditnotelineitem'; +export * from './creditnotestatus'; +export * from './customerstatus'; +export * from './dataconnectionerror'; +export * from './dataconnectionstatus'; +export * from './dataintegrityamounts'; +export * from './dataintegritybyamount'; +export * from './dataintegritybycount'; +export * from './dataintegrityconnectionid'; +export * from './dataintegritydates'; +export * from './dataintegritydetail'; +export * from './dataintegritydetails'; +export * from './dataintegritymatch'; +export * from './dataintegritystatus'; +export * from './dataintegritystatusinfo'; +export * from './dataintegritystatuses'; +export * from './dataintegritysummaries'; +export * from './dataintegritysummary'; +export * from './datasource'; +export * from './datastatus'; +export * from './datatype'; +export * from './directcostlineitem'; +export * from './directcostprototype'; +export * from './directincomelineitem'; +export * from './disputestatus'; +export * from './enduploadsessionrequest'; +export * from './enhancedcashflowitem'; +export * from './enhancedcashflowtransactions'; +export * from './enhancedfinancialreport'; +export * from './enhancedinvoicereportitem'; +export * from './enhancedinvoicesreport'; +export * from './enhancedreportaccountcategory'; +export * from './enhancedreportinfo'; +export * from './errorvalidation'; +export * from './errorvalidationitem'; +export * from './excelreporttypes'; +export * from './excelstatus'; +export * from './fileupload'; +export * from './halref'; +export * from './integritystatus'; +export * from './invoicelineitem'; +export * from './invoicestatus'; +export * from './itemref'; +export * from './itemreference'; +export * from './items'; +export * from './journalentryrecordref'; +export * from './journalline'; +export * from './journallinetracking'; +export * from './journalref'; +export * from './journalstatus'; +export * from './lendingcustomerref'; +export * from './links'; +export * from './loanref'; +export * from './loansummary'; +export * from './loansummaryintegrationtype'; +export * from './loansummaryrecordref'; +export * from './loansummaryrecordreftype'; +export * from './loansummaryreportinfo'; +export * from './loansummaryreportitem'; +export * from './loantransactions'; +export * from './loantransactionsreportinfo'; +export * from './locationref'; +export * from './metadata'; +export * from './orderdiscountallocation'; +export * from './orderlineitem'; +export * from './payment'; +export * from './paymentallocationpayment'; +export * from './paymentline'; +export * from './paymentlinelink'; +export * from './paymentlinktype'; +export * from './paymentmethodref'; +export * from './paymentref'; +export * from './paymentstatus'; +export * from './paymenttype'; +export * from './phonenumber'; +export * from './productinventory'; +export * from './productinventorylocation'; +export * from './productprice'; +export * from './productref'; +export * from './productvariant'; +export * from './productvariantref'; +export * from './productvariantstatus'; +export * from './profitandlossreport'; +export * from './projectref'; +export * from './pulloperation'; +export * from './pulloperations'; +export * from './purchaseorderreference'; +export * from './pushchangetype'; +export * from './pushfieldvalidation'; +export * from './pushoperation'; +export * from './pushoperationchange'; +export * from './pushoperationref'; +export * from './pushoperationstatus'; +export * from './pushoperations'; +export * from './pushoption'; +export * from './pushoptionchoice'; +export * from './pushoptionproperty'; +export * from './pushoptiontype'; +export * from './pushvalidationinfo'; +export * from './recordlinereference'; +export * from './reportbasis'; +export * from './reportcomponentmeasure'; +export * from './reportgenerationpayload'; +export * from './reportinfo'; +export * from './reportinput'; +export * from './reportitem'; +export * from './reportitems'; +export * from './reportline'; +export * from './reportoperation'; +export * from './reportsourcereference'; +export * from './reports'; +export * from './routinginfo'; +export * from './salesorderreference'; +export * from './schema'; +export * from './servicecharge'; +export * from './servicechargetype'; +export * from './sourceaccount'; +export * from './sourceaccountprototype'; +export * from './sourceaccountv2'; +export * from './sourceaccountv2prototype'; +export * from './sourceref'; +export * from './startuploadsessionrequest'; +export * from './status'; +export * from './supplementaldata'; +export * from './supplierref'; +export * from './supplierstatus'; +export * from './targetaccountoption'; +export * from './taxcomponentallocation'; +export * from './taxcomponentref'; +export * from './taxrateref'; +export * from './taxratereference'; +export * from './tracking'; +export * from './trackingcategoryref'; +export * from './trackingrecordref'; +export * from './transactioncategory'; +export * from './transactioncategoryref'; +export * from './transactioncategorystatus'; +export * from './transactioncode'; +export * from './transactionsourceref'; +export * from './transactionsourcetype'; +export * from './transactiontype'; +export * from './transferaccount'; +export * from './validdatatypelinks'; +export * from './validation'; +export * from './validationitem'; +export * from './weblink'; +export * from './withholdingtax'; +export { AccountPrototypeValidDataTypeLinks } from '../_speakeasy_hoisted'; +export { AccountTransactionLineRecordRefDataType } from '../_speakeasy_enums'; +export { AccountType } from '../_speakeasy_enums'; +export { AccountingAccountTransactionStatus } from '../_speakeasy_enums'; +export { AccountingCreateTransferResponseStatus } from '../_speakeasy_enums'; +export { AccountingInvoiceDataType } from '../_speakeasy_enums'; +export { AccountingTransferStatus } from '../_speakeasy_enums'; +export { Allocation } from '../AccountingPaymentAllocationAllocation'; +export { BillLineItemDataType } from '../_speakeasy_enums'; +export { CommercePaymentMethodStatus } from '../_speakeasy_enums'; +export { ContactRefDataType } from '../_speakeasy_enums'; +export { DataIntegrityDataType } from '../_speakeasy_enums'; +export { DataTypes } from '../_speakeasy_enums'; +export { DatasetStatus } from '../_speakeasy_enums'; +export { EndUploadSessionRequestStatus } from '../_speakeasy_enums'; +export { ErrorStatus } from '../_speakeasy_enums'; +export { FileT } from '../ModelFile'; +export { JournalEntryRecordRefDataType } from '../_speakeasy_enums'; +export { JournalLineDataType } from '../_speakeasy_enums'; +export { LoanTransactionType } from '../_speakeasy_enums'; +export { Path } from '../_speakeasy_enums'; +export { PeriodUnit } from '../_speakeasy_enums'; +export { PropertieAccountType } from '../_speakeasy_enums'; +export { PropertieDataType } from '../_speakeasy_enums'; +export { PropertieItemRef } from '../_speakeasy_hoisted'; +export { ReportOperationStatus } from '../_speakeasy_enums'; +export { ReportOperationType } from '../_speakeasy_enums'; +export { ReportType } from '../_speakeasy_enums'; +export { RoutingInfoType } from '../_speakeasy_enums'; +export { Source } from '../_speakeasy_enums'; +export { SourceAccountStatus } from '../_speakeasy_enums'; +export { SourceAccountV2AccountType } from '../_speakeasy_enums'; +export { SourceAccountV2Status } from '../_speakeasy_enums'; +export { SourceType } from '../_speakeasy_enums'; +export { StartUploadSessionRequestDataType } from '../_speakeasy_enums'; +export { TrackingRecordRefDataType } from '../_speakeasy_enums'; +export { Type } from '../_speakeasy_enums'; +export { WebLinkType } from '../_speakeasy_enums'; +export { Zero } from '../_speakeasy_hoisted'; +export { ZeroDataType } from '../_speakeasy_enums'; +export type { Security } from '../../../lib/sdkconfig'; diff --git a/lending/src/sdk/models/shared/integritystatus.ts b/lending/src/sdk/models/shared/integritystatus.ts index ead4d1246..3d1d91214 100644 --- a/lending/src/sdk/models/shared/integritystatus.ts +++ b/lending/src/sdk/models/shared/integritystatus.ts @@ -1,25 +1,55 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The current status of the most recently run matching algorithm. + * @export */ export const IntegrityStatus = { - Unknown: "Unknown", - DoesNotExist: "DoesNotExist", - Error: "Error", - Complete: "Complete", + Unknown: 'Unknown', + DoesNotExist: 'DoesNotExist', + Error: 'Error', + Complete: 'Complete' } as const; -/** - * The current status of the most recently run matching algorithm. - */ -export type IntegrityStatus = ClosedEnum; +export type IntegrityStatus = typeof IntegrityStatus[keyof typeof IntegrityStatus]; + + +export function instanceOfIntegrityStatus(value: any): boolean { + for (const key in IntegrityStatus) { + if (Object.prototype.hasOwnProperty.call(IntegrityStatus, key)) { + if (IntegrityStatus[key as keyof typeof IntegrityStatus] === value) { + return true; + } + } + } + return false; +} + +export function IntegrityStatusFromJSON(json: any): IntegrityStatus { + return IntegrityStatusFromJSONTyped(json, false); +} + +export function IntegrityStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrityStatus { + return json as IntegrityStatus; +} + +export function IntegrityStatusToJSON(value?: IntegrityStatus | null): any { + return value as any; +} + +export function IntegrityStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): IntegrityStatus { + return value as IntegrityStatus; +} -/** @internal */ -export const IntegrityStatus$inboundSchema: z.ZodNativeEnum< - typeof IntegrityStatus -> = z.nativeEnum(IntegrityStatus); diff --git a/lending/src/sdk/models/shared/invoicelineitem.ts b/lending/src/sdk/models/shared/invoicelineitem.ts index fce631fc8..974757c3d 100644 --- a/lending/src/sdk/models/shared/invoicelineitem.ts +++ b/lending/src/sdk/models/shared/invoicelineitem.ts @@ -1,129 +1,470 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; +import type { PropertieItemRef } from '../_speakeasy_hoisted'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ItemReference } from './itemreference'; import { - AccountsReceivableTracking, - AccountsReceivableTracking$inboundSchema, -} from "./accountsreceivabletracking.js"; + ItemReferenceFromJSON, + ItemReferenceFromJSONTyped, + ItemReferenceToJSON, + ItemReferenceToJSONTyped, +} from './itemreference'; +import type { TaxRateRef } from './taxrateref'; import { - PropertieItemRef, - PropertieItemRef$inboundSchema, -} from "./propertieitemref.js"; -import { TaxRateRef, TaxRateRef$inboundSchema } from "./taxrateref.js"; + TaxRateRefFromJSON, + TaxRateRefFromJSONTyped, + TaxRateRefToJSON, + TaxRateRefToJSONTyped, +} from './taxrateref'; +import type { TrackingCategoryRef } from './trackingcategoryref'; import { - TrackingCategoryRef, - TrackingCategoryRef$inboundSchema, -} from "./trackingcategoryref.js"; + TrackingCategoryRefFromJSON, + TrackingCategoryRefFromJSONTyped, + TrackingCategoryRefToJSON, + TrackingCategoryRefToJSONTyped, +} from './trackingcategoryref'; +import type { AccountsReceivableTracking } from './accountsreceivabletracking'; +import { + AccountsReceivableTrackingFromJSON, + AccountsReceivableTrackingFromJSONTyped, + AccountsReceivableTrackingToJSON, + AccountsReceivableTrackingToJSONTyped, +} from './accountsreceivabletracking'; +import type { AccountRef } from './accountref'; +import { + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; + +/** + * + * @export + * @interface InvoiceLineItem + */ +export interface InvoiceLineItem { + /** + * Friendly name of the goods or services provided. + * @type {string} + * @memberof InvoiceLineItem + */ + description?: string | null; + /** + * Price of each unit of goods or services. + * @type {string} + * @memberof InvoiceLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services provided. + * @type {string} + * @memberof InvoiceLineItem + */ + quantity: Decimal | number; + /** + * Numerical value of any discounts applied. + * @type {string} + * @memberof InvoiceLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof InvoiceLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof InvoiceLineItem + */ + taxAmount?: Decimal | number | null; + /** + * 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. + * @type {string} + * @memberof InvoiceLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof InvoiceLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate (from 0 to 100) of any discounts applied to the unit amount. + * @type {string} + * @memberof InvoiceLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof InvoiceLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the item the line is linked to. + * @type {ItemReference} + * @memberof InvoiceLineItem + */ + itemRef?: PropertieItemRef; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof InvoiceLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsReceivableTracking} + * @memberof InvoiceLineItem + */ + tracking?: AccountsReceivableTracking; + /** + * The invoice is a direct income if `True`. + * @type {boolean} + * @memberof InvoiceLineItem + */ + isDirectIncome?: boolean; +} + +/** + * Check if a given object implements the InvoiceLineItem interface. + */ +export function instanceOfInvoiceLineItem(value: object): value is InvoiceLineItem { + if (!('unitAmount' in value) || value['unitAmount'] === undefined) return false; + if (!('quantity' in value) || value['quantity'] === undefined) return false; + return true; +} + +export function InvoiceLineItemFromJSON(json: any): InvoiceLineItem { + return InvoiceLineItemFromJSONTyped(json, false); +} + +export function InvoiceLineItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceLineItem { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'unitAmount': json['unitAmount'], + 'quantity': json['quantity'], + 'discountAmount': json['discountAmount'] == null ? undefined : toDecimal(json['discountAmount']), + 'subTotal': json['subTotal'] == null ? undefined : toDecimal(json['subTotal']), + 'taxAmount': json['taxAmount'] == null ? undefined : toDecimal(json['taxAmount']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'discountPercentage': json['discountPercentage'] == null ? undefined : toDecimal(json['discountPercentage']), + 'taxRateRef': json['taxRateRef'] == null ? undefined : TaxRateRefFromJSON(json['taxRateRef']), + 'itemRef': json['itemRef'] == null ? undefined : ItemReferenceFromJSON(json['itemRef']), + 'trackingCategoryRefs': json['trackingCategoryRefs'] == null ? undefined : ((json['trackingCategoryRefs'] as Array).map(TrackingCategoryRefFromJSON)), + 'tracking': json['tracking'] == null ? undefined : AccountsReceivableTrackingFromJSON(json['tracking']), + 'isDirectIncome': json['isDirectIncome'] == null ? undefined : json['isDirectIncome'], + }; +} + +export function InvoiceLineItemToJSON(json: any): InvoiceLineItem { + return InvoiceLineItemToJSONTyped(json, false); +} + +export function InvoiceLineItemToJSONTyped(value?: InvoiceLineItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'description': value['description'], + 'unitAmount': fromDecimal(value['unitAmount']), + 'quantity': fromDecimal(value['quantity']), + 'discountAmount': fromDecimal(value['discountAmount']), + 'subTotal': fromDecimal(value['subTotal']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'accountRef': AccountRefToJSON(value['accountRef']), + 'discountPercentage': fromDecimal(value['discountPercentage']), + 'taxRateRef': TaxRateRefToJSON(value['taxRateRef']), + 'itemRef': ItemReferenceToJSON(value['itemRef']), + 'trackingCategoryRefs': value['trackingCategoryRefs'] == null ? undefined : ((value['trackingCategoryRefs'] as Array).map(TrackingCategoryRefToJSON)), + 'tracking': AccountsReceivableTrackingToJSON(value['tracking']), + 'isDirectIncome': value['isDirectIncome'], + }; +} -export type InvoiceLineItem = { - /** - * Friendly name of the goods or services provided. - */ - description?: string | null | undefined; - /** - * Price of each unit of goods or services. - */ - unitAmount: Decimal$ | number; - /** - * Number of units of goods or services provided. - */ - quantity: Decimal$ | number; - /** - * Numerical value of any discounts applied. - */ - discountAmount?: Decimal$ | number | null | undefined; - /** - * Amount of the line, inclusive of discounts but exclusive of tax. - */ - subTotal?: Decimal$ | number | null | undefined; - /** - * Amount of tax for the line. - */ - taxAmount?: Decimal$ | number | null | undefined; - /** - * 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. - */ - totalAmount?: Decimal$ | number | null | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * Percentage rate (from 0 to 100) of any discounts applied to the unit amount. - */ - discountPercentage?: Decimal$ | number | null | undefined; - /** - * 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. - * - * @remarks - * - * Found on: - * - * - Bill line items - * - Bill Credit Note line items - * - Credit Note line items - * - Direct incomes line items - * - Invoice line items - * - Items - */ - taxRateRef?: TaxRateRef | undefined; - /** - * Reference to the item the line is linked to. - */ - itemRef?: PropertieItemRef | undefined; - /** - * Reference to the tracking categories to which the line item is linked. - */ - trackingCategoryRefs?: Array | null | undefined; - /** - * Categories, and a project and customer, against which the item is tracked. - */ - tracking?: AccountsReceivableTracking | undefined; - /** - * The invoice is a direct income if `True`. - */ - isDirectIncome?: boolean | undefined; -}; -/** @internal */ -export const InvoiceLineItem$inboundSchema: z.ZodType< - InvoiceLineItem, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.nullable(z.string()).optional(), - unitAmount: z.number().transform(v => new Decimal$(v)), - quantity: z.number().transform(v => new Decimal$(v)), - discountAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - taxAmount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - totalAmount: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - accountRef: AccountRef$inboundSchema.optional(), - discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - taxRateRef: TaxRateRef$inboundSchema.optional(), - itemRef: PropertieItemRef$inboundSchema.optional(), - trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) - .optional(), - tracking: AccountsReceivableTracking$inboundSchema.optional(), - isDirectIncome: z.boolean().optional(), -}); +export interface AccountingInvoiceGetResponseInvoiceLineItem { + /** + * Friendly name of the goods or services provided. + * @type {string} + * @memberof InvoiceLineItem + */ + description?: string | null; + /** + * Price of each unit of goods or services. + * @type {string} + * @memberof InvoiceLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services provided. + * @type {string} + * @memberof InvoiceLineItem + */ + quantity: Decimal | number; + /** + * Numerical value of any discounts applied. + * @type {string} + * @memberof InvoiceLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof InvoiceLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof InvoiceLineItem + */ + taxAmount?: Decimal | number | null; + /** + * 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. + * @type {string} + * @memberof InvoiceLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof InvoiceLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate (from 0 to 100) of any discounts applied to the unit amount. + * @type {string} + * @memberof InvoiceLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof InvoiceLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the item the line is linked to. + * @type {ItemReference} + * @memberof InvoiceLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof InvoiceLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsReceivableTracking} + * @memberof InvoiceLineItem + */ + tracking?: AccountsReceivableTracking; + /** + * The invoice is a direct income if `True`. + * @type {boolean} + * @memberof InvoiceLineItem + */ + isDirectIncome?: boolean; +} + +export interface AccountingInvoiceInvoiceLineItem { + /** + * Friendly name of the goods or services provided. + * @type {string} + * @memberof InvoiceLineItem + */ + description?: string | null; + /** + * Price of each unit of goods or services. + * @type {string} + * @memberof InvoiceLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services provided. + * @type {string} + * @memberof InvoiceLineItem + */ + quantity: Decimal | number; + /** + * Numerical value of any discounts applied. + * @type {string} + * @memberof InvoiceLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof InvoiceLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof InvoiceLineItem + */ + taxAmount?: Decimal | number | null; + /** + * 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. + * @type {string} + * @memberof InvoiceLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof InvoiceLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate (from 0 to 100) of any discounts applied to the unit amount. + * @type {string} + * @memberof InvoiceLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof InvoiceLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the item the line is linked to. + * @type {ItemReference} + * @memberof InvoiceLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof InvoiceLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsReceivableTracking} + * @memberof InvoiceLineItem + */ + tracking?: AccountsReceivableTracking; + /** + * The invoice is a direct income if `True`. + * @type {boolean} + * @memberof InvoiceLineItem + */ + isDirectIncome?: boolean; +} -export function invoiceLineItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => InvoiceLineItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'InvoiceLineItem' from JSON`, - ); +export interface GetAccountingInvoiceResponseInvoiceLineItem { + /** + * Friendly name of the goods or services provided. + * @type {string} + * @memberof InvoiceLineItem + */ + description?: string | null; + /** + * Price of each unit of goods or services. + * @type {string} + * @memberof InvoiceLineItem + */ + unitAmount: Decimal | number; + /** + * Number of units of goods or services provided. + * @type {string} + * @memberof InvoiceLineItem + */ + quantity: Decimal | number; + /** + * Numerical value of any discounts applied. + * @type {string} + * @memberof InvoiceLineItem + */ + discountAmount?: Decimal | number | null; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + * @type {string} + * @memberof InvoiceLineItem + */ + subTotal?: Decimal | number | null; + /** + * Amount of tax for the line. + * @type {string} + * @memberof InvoiceLineItem + */ + taxAmount?: Decimal | number | null; + /** + * 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. + * @type {string} + * @memberof InvoiceLineItem + */ + totalAmount?: Decimal | number | null; + /** + * Reference to the account to which the line item is linked. + * @type {AccountRef} + * @memberof InvoiceLineItem + */ + accountRef?: AccountRef; + /** + * Percentage rate (from 0 to 100) of any discounts applied to the unit amount. + * @type {string} + * @memberof InvoiceLineItem + */ + discountPercentage?: Decimal | number | null; + /** + * Reference to the tax rate to which the line item is linked. + * @type {TaxRateRef} + * @memberof InvoiceLineItem + */ + taxRateRef?: TaxRateRef; + /** + * Reference to the item the line is linked to. + * @type {ItemReference} + * @memberof InvoiceLineItem + */ + itemRef?: ItemReference; + /** + * Reference to the tracking categories to which the line item is linked. + * @type {Array} + * @memberof InvoiceLineItem + */ + trackingCategoryRefs?: Array | null; + /** + * + * @type {AccountsReceivableTracking} + * @memberof InvoiceLineItem + */ + tracking?: AccountsReceivableTracking; + /** + * The invoice is a direct income if `True`. + * @type {boolean} + * @memberof InvoiceLineItem + */ + isDirectIncome?: boolean; } diff --git a/lending/src/sdk/models/shared/invoicestatus.ts b/lending/src/sdk/models/shared/invoicestatus.ts index ad4b5dbeb..6b4ff95ed 100644 --- a/lending/src/sdk/models/shared/invoicestatus.ts +++ b/lending/src/sdk/models/shared/invoicestatus.ts @@ -1,43 +1,63 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Current state of the invoice: - * - * @remarks - * + * * - `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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld). * - `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`. * - `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. + * @export */ export const InvoiceStatus = { - Unknown: "Unknown", - Draft: "Draft", - Submitted: "Submitted", - PartiallyPaid: "PartiallyPaid", - Paid: "Paid", - Void: "Void", + Unknown: 'Unknown', + Draft: 'Draft', + Submitted: 'Submitted', + PartiallyPaid: 'PartiallyPaid', + Paid: 'Paid', + Void: 'Void' } as const; -/** - * Current state of the invoice: - * - * @remarks - * - * - `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, meaning `amountDue` will usually equal `totalAmount` (unless tax is witheld). - * - `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount, meaning `0 < amountDue < totalAmount`. - * - `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid, meaning `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. - */ -export type InvoiceStatus = ClosedEnum; +export type InvoiceStatus = typeof InvoiceStatus[keyof typeof InvoiceStatus]; + + +export function instanceOfInvoiceStatus(value: any): boolean { + for (const key in InvoiceStatus) { + if (Object.prototype.hasOwnProperty.call(InvoiceStatus, key)) { + if (InvoiceStatus[key as keyof typeof InvoiceStatus] === value) { + return true; + } + } + } + return false; +} + +export function InvoiceStatusFromJSON(json: any): InvoiceStatus { + return InvoiceStatusFromJSONTyped(json, false); +} + +export function InvoiceStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceStatus { + return json as InvoiceStatus; +} + +export function InvoiceStatusToJSON(value?: InvoiceStatus | null): any { + return value as any; +} + +export function InvoiceStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): InvoiceStatus { + return value as InvoiceStatus; +} -/** @internal */ -export const InvoiceStatus$inboundSchema: z.ZodNativeEnum< - typeof InvoiceStatus -> = z.nativeEnum(InvoiceStatus); diff --git a/lending/src/sdk/models/shared/itemref.ts b/lending/src/sdk/models/shared/itemref.ts index 7d726a6a2..d7a19bfc3 100644 --- a/lending/src/sdk/models/shared/itemref.ts +++ b/lending/src/sdk/models/shared/itemref.ts @@ -1,41 +1,102 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ItemRef = { - /** - * The id of the object, e.g. the Journal entry. - */ - id?: string | undefined; - /** - * The data connection id being referenced. - */ - dataConnectionId?: string | undefined; - /** - * The data type the loan transaction entry was extracted from. - */ - type?: string | undefined; -}; - -/** @internal */ -export const ItemRef$inboundSchema: z.ZodType = - z.object({ - id: z.string().optional(), - dataConnectionId: z.string().optional(), - type: z.string().optional(), - }); - -export function itemRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ItemRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ItemRef' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface ItemRef + */ +export interface ItemRef { + /** + * The id of the object, e.g. the Journal entry. + * @type {string} + * @memberof ItemRef + */ + id?: string; + /** + * The data connection id being referenced. + * @type {string} + * @memberof ItemRef + */ + dataConnectionId?: string; + /** + * The data type the loan transaction entry was extracted from. + * @type {string} + * @memberof ItemRef + */ + type?: string; +} + +/** + * Check if a given object implements the ItemRef interface. + */ +export function instanceOfItemRef(value: object): value is ItemRef { + return true; +} + +export function ItemRefFromJSON(json: any): ItemRef { + return ItemRefFromJSONTyped(json, false); +} + +export function ItemRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataConnectionId': json['dataConnectionId'] == null ? undefined : json['dataConnectionId'], + 'type': json['type'] == null ? undefined : json['type'], + }; +} + +export function ItemRefToJSON(json: any): ItemRef { + return ItemRefToJSONTyped(json, false); +} + +export function ItemRefToJSONTyped(value?: ItemRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataConnectionId': value['dataConnectionId'], + 'type': value['type'], + }; +} + + +export interface LoanTransactionsItemRef { + /** + * The id of the object, e.g. the Journal entry. + * @type {string} + * @memberof ItemRef + */ + id?: string; + /** + * The data connection id being referenced. + * @type {string} + * @memberof ItemRef + */ + dataConnectionId?: string; + /** + * The data type the loan transaction entry was extracted from. + * @type {string} + * @memberof ItemRef + */ + type?: string; } diff --git a/lending/src/sdk/models/shared/itemreference.ts b/lending/src/sdk/models/shared/itemreference.ts new file mode 100644 index 000000000..e66f76ce6 --- /dev/null +++ b/lending/src/sdk/models/shared/itemreference.ts @@ -0,0 +1,194 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +/** + * Reference to the item the line is linked to. + * @export + * @interface ItemReference + */ +export interface ItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} + +/** + * Check if a given object implements the ItemReference interface. + */ +export function instanceOfItemReference(value: object): value is ItemReference { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function ItemReferenceFromJSON(json: any): ItemReference { + return ItemReferenceFromJSONTyped(json, false); +} + +export function ItemReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function ItemReferenceToJSON(json: any): ItemReference { + return ItemReferenceToJSONTyped(json, false); +} + +export function ItemReferenceToJSONTyped(value?: ItemReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface AccountingBillCreditNoteItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} + +export interface AccountingBillItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} + +export interface AccountingCreditNoteItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} + +export interface AccountingDirectCostItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} + +export interface AccountingDirectIncomeItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} + +export interface AccountingInvoiceItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} + +export interface LoanSummaryItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} + +export interface LoanTransactionsItemReference { + /** + * Unique identifier for the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + id: string; + /** + * Name of the item in the accounting software. + * @type {string} + * @memberof ItemReference + */ + name?: string | null; +} diff --git a/lending/src/sdk/models/shared/items.ts b/lending/src/sdk/models/shared/items.ts index a136df32b..d51cd1606 100644 --- a/lending/src/sdk/models/shared/items.ts +++ b/lending/src/sdk/models/shared/items.ts @@ -1,37 +1,211 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Items = { - /** - * Name assigned to withheld tax. - */ - name: string; - /** - * Amount of tax withheld. - */ - amount: Decimal$ | number; -}; - -/** @internal */ -export const Items$inboundSchema: z.ZodType = z - .object({ - name: z.string(), - amount: z.number().transform(v => new Decimal$(v)), - }); - -export function itemsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Items$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Items' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface Items + */ +export interface Items { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +/** + * Check if a given object implements the Items interface. + */ +export function instanceOfItems(value: object): value is Items { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('amount' in value) || value['amount'] === undefined) return false; + return true; +} + +export function ItemsFromJSON(json: any): Items { + return ItemsFromJSONTyped(json, false); +} + +export function ItemsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Items { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'amount': json['amount'], + }; +} + +export function ItemsToJSON(json: any): Items { + return ItemsToJSONTyped(json, false); +} + +export function ItemsToJSONTyped(value?: Items | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'amount': fromDecimal(value['amount']), + }; +} + + +export interface AccountingBillCreditNoteGetResponseItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +export interface AccountingBillCreditNoteItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +export interface AccountingCreditNoteGetResponseItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +export interface AccountingCreditNoteItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +export interface AccountingInvoiceGetResponseItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +export interface AccountingInvoiceItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +export interface GetAccountingBillCreditNoteResponseItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +export interface GetAccountingCreditNoteResponseItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; +} + +export interface GetAccountingInvoiceResponseItems { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof Items + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof Items + */ + amount: Decimal | number; } diff --git a/lending/src/sdk/models/shared/journalentryrecordref.ts b/lending/src/sdk/models/shared/journalentryrecordref.ts index 6a2cd079a..8c8e33641 100644 --- a/lending/src/sdk/models/shared/journalentryrecordref.ts +++ b/lending/src/sdk/models/shared/journalentryrecordref.ts @@ -1,71 +1,154 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { JournalEntryRecordRefDataType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * Name of underlying data type. + * Links a journal entry to the underlying record that created it. + * @export + * @interface JournalEntryRecordRef */ -export const JournalEntryRecordRefDataType = { - BankTransactions: "bankTransactions", - BillCreditNotes: "billCreditNotes", - BillPayments: "billPayments", - Bills: "bills", - CreditNotes: "creditNotes", - DirectCosts: "directCosts", - DirectIncomes: "directIncomes", - Invoices: "invoices", - JournalEntries: "journalEntries", - Payments: "payments", - Transfers: "transfers", -} as const; +export interface JournalEntryRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + dataType?: JournalEntryRecordRefDataType; +} + + /** - * Name of underlying data type. + * @export */ -export type JournalEntryRecordRefDataType = ClosedEnum< - typeof JournalEntryRecordRefDataType ->; +export const JournalEntryRecordRefDataTypeEnum = { + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CreditNotes: 'creditNotes', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + JournalEntries: 'journalEntries', + Payments: 'payments', + Transfers: 'transfers' +} as const; +export type JournalEntryRecordRefDataTypeEnum = typeof JournalEntryRecordRefDataTypeEnum[keyof typeof JournalEntryRecordRefDataTypeEnum]; + /** - * Links a journal entry to the underlying record that created it. + * Check if a given object implements the JournalEntryRecordRef interface. */ -export type JournalEntryRecordRef = { - /** - * 'id' of the underlying record or data type. - */ - id?: string | undefined; - /** - * Name of underlying data type. - */ - dataType?: JournalEntryRecordRefDataType | undefined; -}; +export function instanceOfJournalEntryRecordRef(value: object): value is JournalEntryRecordRef { + return true; +} -/** @internal */ -export const JournalEntryRecordRefDataType$inboundSchema: z.ZodNativeEnum< - typeof JournalEntryRecordRefDataType -> = z.nativeEnum(JournalEntryRecordRefDataType); +export function JournalEntryRecordRefFromJSON(json: any): JournalEntryRecordRef { + return JournalEntryRecordRefFromJSONTyped(json, false); +} -/** @internal */ -export const JournalEntryRecordRef$inboundSchema: z.ZodType< - JournalEntryRecordRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: JournalEntryRecordRefDataType$inboundSchema.optional(), -}); +export function JournalEntryRecordRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalEntryRecordRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} + +export function JournalEntryRecordRefToJSON(json: any): JournalEntryRecordRef { + return JournalEntryRecordRefToJSONTyped(json, false); +} + +export function JournalEntryRecordRefToJSONTyped(value?: JournalEntryRecordRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataType': value['dataType'], + }; +} + + +export interface AccountingJournalEntriesJournalEntryRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + dataType?: JournalEntryRecordRefDataType; +} + +export interface AccountingJournalEntryGetResponseJournalEntryRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + dataType?: JournalEntryRecordRefDataType; +} + +export interface AccountingJournalEntryJournalEntryRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + dataType?: JournalEntryRecordRefDataType; +} -export function journalEntryRecordRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => JournalEntryRecordRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'JournalEntryRecordRef' from JSON`, - ); +export interface GetAccountingJournalEntryResponseJournalEntryRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof JournalEntryRecordRef + */ + dataType?: JournalEntryRecordRefDataType; } diff --git a/lending/src/sdk/models/shared/journalline.ts b/lending/src/sdk/models/shared/journalline.ts index d3e7a8183..28bc7c45f 100644 --- a/lending/src/sdk/models/shared/journalline.ts +++ b/lending/src/sdk/models/shared/journalline.ts @@ -1,147 +1,298 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountRef, AccountRef$inboundSchema } from "./accountref.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountRef } from './accountref'; +import { + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; +import type { ContactReference } from './contactreference'; import { - TrackingRecordRef, - TrackingRecordRef$inboundSchema, -} from "./trackingrecordref.js"; + ContactReferenceFromJSON, + ContactReferenceFromJSONTyped, + ContactReferenceToJSON, + ContactReferenceToJSONTyped, +} from './contactreference'; +import type { JournalLineTracking } from './journallinetracking'; +import { + JournalLineTrackingFromJSON, + JournalLineTrackingFromJSONTyped, + JournalLineTrackingToJSON, + JournalLineTrackingToJSONTyped, +} from './journallinetracking'; /** - * List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) + * + * @export + * @interface JournalLine */ -export type JournalLineTracking = { - recordRefs?: Array | null | undefined; -}; +export interface JournalLine { + /** + * Description of the journal line item. + * @type {string} + * @memberof JournalLine + */ + description?: string | null; + /** + * Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. + * @type {string} + * @memberof JournalLine + */ + netAmount: Decimal | number; + /** + * The amount in the original transaction currency. + * @type {string} + * @memberof JournalLine + */ + transactionAmount?: Decimal | number; + /** + * Currency for the journal line item. + * @type {string} + * @memberof JournalLine + */ + currency?: string | null; + /** + * Currency of the original transaction. + * @type {string} + * @memberof JournalLine + */ + transactionCurrency?: string | null; + /** + * + * @type {AccountRef} + * @memberof JournalLine + */ + accountRef?: AccountRef; + /** + * + * @type {JournalLineTracking} + * @memberof JournalLine + */ + tracking?: JournalLineTracking; + /** + * + * @type {ContactReference} + * @memberof JournalLine + */ + contactRef?: ContactReference; +} /** - * Allowed name of the 'dataType'. + * Check if a given object implements the JournalLine interface. */ -export const JournalLineDataType = { - Customers: "customers", - Suppliers: "suppliers", -} as const; -/** - * Allowed name of the 'dataType'. - */ -export type JournalLineDataType = ClosedEnum; - -export type ContactReference = { - /** - * Unique identifier for a customer or supplier. - */ - id: string; - /** - * Allowed name of the 'dataType'. - */ - dataType?: JournalLineDataType | null | undefined; -}; +export function instanceOfJournalLine(value: object): value is JournalLine { + if (!('netAmount' in value) || value['netAmount'] === undefined) return false; + return true; +} -export type JournalLine = { - /** - * Description of the journal line item. - */ - description?: string | null | undefined; - /** - * Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. - */ - netAmount: Decimal$ | number; - /** - * The amount in the original transaction currency. - */ - transactionAmount?: Decimal$ | number | undefined; - /** - * Currency for the journal line item. - */ - currency?: string | null | undefined; - /** - * Currency of the original transaction. - */ - transactionCurrency?: string | null | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) - */ - tracking?: JournalLineTracking | undefined; - contactRef?: ContactReference | undefined; -}; +export function JournalLineFromJSON(json: any): JournalLine { + return JournalLineFromJSONTyped(json, false); +} -/** @internal */ -export const JournalLineTracking$inboundSchema: z.ZodType< - JournalLineTracking, - z.ZodTypeDef, - unknown -> = z.object({ - recordRefs: z.nullable(z.array(TrackingRecordRef$inboundSchema)).optional(), -}); +export function JournalLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalLine { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'netAmount': json['netAmount'], + 'transactionAmount': json['transactionAmount'] == null ? undefined : toDecimal(json['transactionAmount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'transactionCurrency': json['transactionCurrency'] == null ? undefined : json['transactionCurrency'], + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'tracking': json['tracking'] == null ? undefined : JournalLineTrackingFromJSON(json['tracking']), + 'contactRef': json['contactRef'] == null ? undefined : ContactReferenceFromJSON(json['contactRef']), + }; +} -export function journalLineTrackingFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => JournalLineTracking$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'JournalLineTracking' from JSON`, - ); +export function JournalLineToJSON(json: any): JournalLine { + return JournalLineToJSONTyped(json, false); } -/** @internal */ -export const JournalLineDataType$inboundSchema: z.ZodNativeEnum< - typeof JournalLineDataType -> = z.nativeEnum(JournalLineDataType); +export function JournalLineToJSONTyped(value?: JournalLine | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'description': value['description'], + 'netAmount': fromDecimal(value['netAmount']), + 'transactionAmount': fromDecimal(value['transactionAmount']), + 'currency': value['currency'], + 'transactionCurrency': value['transactionCurrency'], + 'accountRef': AccountRefToJSON(value['accountRef']), + 'tracking': JournalLineTrackingToJSON(value['tracking']), + 'contactRef': ContactReferenceToJSON(value['contactRef']), + }; +} -/** @internal */ -export const ContactReference$inboundSchema: z.ZodType< - ContactReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - dataType: z.nullable(JournalLineDataType$inboundSchema).optional(), -}); -export function contactReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ContactReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ContactReference' from JSON`, - ); +export interface AccountingJournalEntryGetResponseJournalLine { + /** + * Description of the journal line item. + * @type {string} + * @memberof JournalLine + */ + description?: string | null; + /** + * Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. + * @type {string} + * @memberof JournalLine + */ + netAmount: Decimal | number; + /** + * The amount in the original transaction currency. + * @type {string} + * @memberof JournalLine + */ + transactionAmount?: Decimal | number; + /** + * Currency for the journal line item. + * @type {string} + * @memberof JournalLine + */ + currency?: string | null; + /** + * Currency of the original transaction. + * @type {string} + * @memberof JournalLine + */ + transactionCurrency?: string | null; + /** + * + * @type {AccountRef} + * @memberof JournalLine + */ + accountRef?: AccountRef; + /** + * + * @type {JournalLineTracking} + * @memberof JournalLine + */ + tracking?: JournalLineTracking; + /** + * + * @type {ContactReference} + * @memberof JournalLine + */ + contactRef?: ContactReference; } -/** @internal */ -export const JournalLine$inboundSchema: z.ZodType< - JournalLine, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.nullable(z.string()).optional(), - netAmount: z.number().transform(v => new Decimal$(v)), - transactionAmount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.nullable(z.string()).optional(), - transactionCurrency: z.nullable(z.string()).optional(), - accountRef: AccountRef$inboundSchema.optional(), - tracking: z.lazy(() => JournalLineTracking$inboundSchema).optional(), - contactRef: z.lazy(() => ContactReference$inboundSchema).optional(), -}); +export interface AccountingJournalEntryJournalLine { + /** + * Description of the journal line item. + * @type {string} + * @memberof JournalLine + */ + description?: string | null; + /** + * Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. + * @type {string} + * @memberof JournalLine + */ + netAmount: Decimal | number; + /** + * The amount in the original transaction currency. + * @type {string} + * @memberof JournalLine + */ + transactionAmount?: Decimal | number; + /** + * Currency for the journal line item. + * @type {string} + * @memberof JournalLine + */ + currency?: string | null; + /** + * Currency of the original transaction. + * @type {string} + * @memberof JournalLine + */ + transactionCurrency?: string | null; + /** + * + * @type {AccountRef} + * @memberof JournalLine + */ + accountRef?: AccountRef; + /** + * + * @type {JournalLineTracking} + * @memberof JournalLine + */ + tracking?: JournalLineTracking; + /** + * + * @type {ContactReference} + * @memberof JournalLine + */ + contactRef?: ContactReference; +} -export function journalLineFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => JournalLine$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'JournalLine' from JSON`, - ); +export interface GetAccountingJournalEntryResponseJournalLine { + /** + * Description of the journal line item. + * @type {string} + * @memberof JournalLine + */ + description?: string | null; + /** + * Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. + * @type {string} + * @memberof JournalLine + */ + netAmount: Decimal | number; + /** + * The amount in the original transaction currency. + * @type {string} + * @memberof JournalLine + */ + transactionAmount?: Decimal | number; + /** + * Currency for the journal line item. + * @type {string} + * @memberof JournalLine + */ + currency?: string | null; + /** + * Currency of the original transaction. + * @type {string} + * @memberof JournalLine + */ + transactionCurrency?: string | null; + /** + * + * @type {AccountRef} + * @memberof JournalLine + */ + accountRef?: AccountRef; + /** + * + * @type {JournalLineTracking} + * @memberof JournalLine + */ + tracking?: JournalLineTracking; + /** + * + * @type {ContactReference} + * @memberof JournalLine + */ + contactRef?: ContactReference; } diff --git a/lending/src/sdk/models/shared/journallinetracking.ts b/lending/src/sdk/models/shared/journallinetracking.ts new file mode 100644 index 000000000..a431634c5 --- /dev/null +++ b/lending/src/sdk/models/shared/journallinetracking.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +import type { TrackingRecordRef } from './trackingrecordref'; +import { + TrackingRecordRefFromJSON, + TrackingRecordRefFromJSONTyped, + TrackingRecordRefToJSON, + TrackingRecordRefToJSONTyped, +} from './trackingrecordref'; + +/** + * List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) + * @export + * @interface JournalLineTracking + */ +export interface JournalLineTracking { + /** + * + * @type {Array} + * @memberof JournalLineTracking + */ + recordRefs?: Array | null; +} + +/** + * Check if a given object implements the JournalLineTracking interface. + */ +export function instanceOfJournalLineTracking(value: object): value is JournalLineTracking { + return true; +} + +export function JournalLineTrackingFromJSON(json: any): JournalLineTracking { + return JournalLineTrackingFromJSONTyped(json, false); +} + +export function JournalLineTrackingFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalLineTracking { + if (json == null) { + return json; + } + return { + + 'recordRefs': json['recordRefs'] == null ? undefined : ((json['recordRefs'] as Array).map(TrackingRecordRefFromJSON)), + }; +} + +export function JournalLineTrackingToJSON(json: any): JournalLineTracking { + return JournalLineTrackingToJSONTyped(json, false); +} + +export function JournalLineTrackingToJSONTyped(value?: JournalLineTracking | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'recordRefs': value['recordRefs'] == null ? undefined : ((value['recordRefs'] as Array).map(TrackingRecordRefToJSON)), + }; +} + + +export interface AccountingJournalEntryJournalLineTracking { + /** + * + * @type {Array} + * @memberof JournalLineTracking + */ + recordRefs?: Array | null; +} diff --git a/lending/src/sdk/models/shared/journalref.ts b/lending/src/sdk/models/shared/journalref.ts index 8f72fb0c9..83cbd59f9 100644 --- a/lending/src/sdk/models/shared/journalref.ts +++ b/lending/src/sdk/models/shared/journalref.ts @@ -1,42 +1,141 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). + * @export + * @interface JournalRef + */ +export interface JournalRef { + [key: string]: any | any; + /** + * GUID of the underlying journal. + * @type {string} + * @memberof JournalRef + */ + id: string; + /** + * Name of journal + * @type {string} + * @memberof JournalRef + */ + name?: string | null; +} + +/** + * Check if a given object implements the JournalRef interface. */ -export type JournalRef = { - /** - * GUID of the underlying journal. - */ - id: string; - /** - * Name of journal - */ - name?: string | null | undefined; -}; - -/** @internal */ -export const JournalRef$inboundSchema: z.ZodType< - JournalRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); - -export function journalRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => JournalRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'JournalRef' from JSON`, - ); +export function instanceOfJournalRef(value: object): value is JournalRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function JournalRefFromJSON(json: any): JournalRef { + return JournalRefFromJSONTyped(json, false); +} + +export function JournalRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalRef { + if (json == null) { + return json; + } + return { + + ...json, + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function JournalRefToJSON(json: any): JournalRef { + return JournalRefToJSONTyped(json, false); +} + +export function JournalRefToJSONTyped(value?: JournalRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface AccountingJournalEntriesJournalRef { + [key: string]: any | any; + /** + * GUID of the underlying journal. + * @type {string} + * @memberof JournalRef + */ + id: string; + /** + * Name of journal + * @type {string} + * @memberof JournalRef + */ + name?: string | null; +} + +export interface AccountingJournalEntryGetResponseJournalRef { + [key: string]: any | any; + /** + * GUID of the underlying journal. + * @type {string} + * @memberof JournalRef + */ + id: string; + /** + * Name of journal + * @type {string} + * @memberof JournalRef + */ + name?: string | null; +} + +export interface AccountingJournalEntryJournalRef { + [key: string]: any | any; + /** + * GUID of the underlying journal. + * @type {string} + * @memberof JournalRef + */ + id: string; + /** + * Name of journal + * @type {string} + * @memberof JournalRef + */ + name?: string | null; +} + +export interface GetAccountingJournalEntryResponseJournalRef { + [key: string]: any | any; + /** + * GUID of the underlying journal. + * @type {string} + * @memberof JournalRef + */ + id: string; + /** + * Name of journal + * @type {string} + * @memberof JournalRef + */ + name?: string | null; } diff --git a/lending/src/sdk/models/shared/journalstatus.ts b/lending/src/sdk/models/shared/journalstatus.ts index 4d78bb92d..93c75ef5f 100644 --- a/lending/src/sdk/models/shared/journalstatus.ts +++ b/lending/src/sdk/models/shared/journalstatus.ts @@ -1,24 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Current journal status. + * @export */ export const JournalStatus = { - Unknown: "Unknown", - Active: "Active", - Archived: "Archived", + Unknown: 'Unknown', + Active: 'Active', + Archived: 'Archived' } as const; -/** - * Current journal status. - */ -export type JournalStatus = ClosedEnum; +export type JournalStatus = typeof JournalStatus[keyof typeof JournalStatus]; + + +export function instanceOfJournalStatus(value: any): boolean { + for (const key in JournalStatus) { + if (Object.prototype.hasOwnProperty.call(JournalStatus, key)) { + if (JournalStatus[key as keyof typeof JournalStatus] === value) { + return true; + } + } + } + return false; +} + +export function JournalStatusFromJSON(json: any): JournalStatus { + return JournalStatusFromJSONTyped(json, false); +} + +export function JournalStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalStatus { + return json as JournalStatus; +} + +export function JournalStatusToJSON(value?: JournalStatus | null): any { + return value as any; +} + +export function JournalStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): JournalStatus { + return value as JournalStatus; +} -/** @internal */ -export const JournalStatus$inboundSchema: z.ZodNativeEnum< - typeof JournalStatus -> = z.nativeEnum(JournalStatus); diff --git a/lending/src/sdk/models/shared/lendingcustomerref.ts b/lending/src/sdk/models/shared/lendingcustomerref.ts index eba63ac6a..97c271633 100644 --- a/lending/src/sdk/models/shared/lendingcustomerref.ts +++ b/lending/src/sdk/models/shared/lendingcustomerref.ts @@ -1,39 +1,88 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type LendingCustomerRef = { - /** - * `id` from the Customers data type. - */ - id?: string | undefined; - /** - * `customerName` from the Customer data type. - */ - customerName?: string | null | undefined; -}; - -/** @internal */ -export const LendingCustomerRef$inboundSchema: z.ZodType< - LendingCustomerRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - customerName: z.nullable(z.string()).optional(), -}); - -export function lendingCustomerRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LendingCustomerRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LendingCustomerRef' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface LendingCustomerRef + */ +export interface LendingCustomerRef { + /** + * `id` from the Customers data type. + * @type {string} + * @memberof LendingCustomerRef + */ + id?: string; + /** + * `customerName` from the Customer data type. + * @type {string} + * @memberof LendingCustomerRef + */ + customerName?: string | null; +} + +/** + * Check if a given object implements the LendingCustomerRef interface. + */ +export function instanceOfLendingCustomerRef(value: object): value is LendingCustomerRef { + return true; +} + +export function LendingCustomerRefFromJSON(json: any): LendingCustomerRef { + return LendingCustomerRefFromJSONTyped(json, false); +} + +export function LendingCustomerRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): LendingCustomerRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'customerName': json['customerName'] == null ? undefined : json['customerName'], + }; +} + +export function LendingCustomerRefToJSON(json: any): LendingCustomerRef { + return LendingCustomerRefToJSONTyped(json, false); +} + +export function LendingCustomerRefToJSONTyped(value?: LendingCustomerRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'customerName': value['customerName'], + }; +} + + +export interface EnhancedInvoicesReportLendingCustomerRef { + /** + * `id` from the Customers data type. + * @type {string} + * @memberof LendingCustomerRef + */ + id?: string; + /** + * `customerName` from the Customer data type. + * @type {string} + * @memberof LendingCustomerRef + */ + customerName?: string | null; } diff --git a/lending/src/sdk/models/shared/links.ts b/lending/src/sdk/models/shared/links.ts index f5f43ba0e..edfdd352b 100644 --- a/lending/src/sdk/models/shared/links.ts +++ b/lending/src/sdk/models/shared/links.ts @@ -1,62 +1,3312 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { HalRef } from './halref'; import { - HalRef, - HalRef$inboundSchema, - HalRef$Outbound, - HalRef$outboundSchema, -} from "./halref.js"; - -export type Links = { - self: HalRef; - current: HalRef; - next?: HalRef | undefined; - previous?: HalRef | undefined; -}; - -/** @internal */ -export const Links$inboundSchema: z.ZodType = z - .object({ - self: HalRef$inboundSchema, - current: HalRef$inboundSchema, - next: HalRef$inboundSchema.optional(), - previous: HalRef$inboundSchema.optional(), - }); -/** @internal */ -export type Links$Outbound = { - self: HalRef$Outbound; - current: HalRef$Outbound; - next?: HalRef$Outbound | undefined; - previous?: HalRef$Outbound | undefined; -}; - -/** @internal */ -export const Links$outboundSchema: z.ZodType< - Links$Outbound, - z.ZodTypeDef, - Links -> = z.object({ - self: HalRef$outboundSchema, - current: HalRef$outboundSchema, - next: HalRef$outboundSchema.optional(), - previous: HalRef$outboundSchema.optional(), -}); - -export function linksToJSON(links: Links): string { - return JSON.stringify(Links$outboundSchema.parse(links)); -} -export function linksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Links$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Links' from JSON`, - ); + HalRefFromJSON, + HalRefFromJSONTyped, + HalRefToJSON, + HalRefToJSONTyped, +} from './halref'; + +/** + * + * @export + * @interface Links + */ +export interface Links { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +/** + * Check if a given object implements the Links interface. + */ +export function instanceOfLinks(value: object): value is Links { + if (!('self' in value) || value['self'] === undefined) return false; + if (!('current' in value) || value['current'] === undefined) return false; + return true; +} + +export function LinksFromJSON(json: any): Links { + return LinksFromJSONTyped(json, false); +} + +export function LinksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Links { + if (json == null) { + return json; + } + return { + + 'self': HalRefFromJSON(json['self']), + 'current': HalRefFromJSON(json['current']), + 'next': json['next'] == null ? undefined : HalRefFromJSON(json['next']), + 'previous': json['previous'] == null ? undefined : HalRefFromJSON(json['previous']), + }; +} + +export function LinksToJSON(json: any): Links { + return LinksToJSONTyped(json, false); +} + +export function LinksToJSONTyped(value?: Links | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'self': HalRefToJSON(value['self']), + 'current': HalRefToJSON(value['current']), + 'next': HalRefToJSON(value['next']), + 'previous': HalRefToJSON(value['previous']), + }; +} + + +export interface AccountingAccountTransactionsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingAccountTransactionsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingAccountingBankTransactionsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingAccountsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingAccountsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBankAccountTransactionsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBankAccountsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBankAccountsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBankTransactionsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBillCreditNotesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBillCreditNotesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBillPaymentsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBillPaymentsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBillsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingBillsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingCreditNotesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingCreditNotesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingCustomersLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingCustomersListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingDirectCostsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingDirectCostsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingDirectIncomesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingDirectIncomesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingInvoicesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingInvoicesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingJournalEntriesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingJournalEntriesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingJournalsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingJournalsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingPaymentsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingPaymentsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingSuppliersLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingSuppliersListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingTransfersLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface AccountingTransfersListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingAccountBalancesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingAccountBalancesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingAccountsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingAccountsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingBankAccountsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingTransactionCategoriesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingTransactionCategoriesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingTransactionsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface BankingTransactionsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CategorizedBankStatementAccountsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CategorizedBankStatementAccountsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CategorizedBankStatementTransactionsGetResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CategorizedBankStatementTransactionsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceCustomersLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceCustomersListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceDisputesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceDisputesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceLocationsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceLocationsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceOrdersLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceOrdersListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommercePaymentMethodsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommercePaymentMethodsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommercePaymentsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommercePaymentsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceProductCategoriesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceProductCategoriesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceProductsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceProductsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceTransactionsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CommerceTransactionsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CompaniesLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CompaniesListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ConnectionsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ConnectionsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface CreateOperationsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface DataIntegrityDetailsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface DataIntegrityDetailsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface GetCategorizedBankStatementTransactionsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingAccountTransactionsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingAccountsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingBankAccountTransactionsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingBankAccountsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingBillCreditNotesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingBillPaymentsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingBillsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingCreditNotesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingCustomersResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingDirectCostsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingDirectIncomesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingInvoicesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingJournalEntriesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingJournalsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingPaymentsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingSuppliersResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListAccountingTransfersResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListBankingAccountBalancesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListBankingAccountsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListBankingTransactionCategoriesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListBankingTransactionsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCategorizedBankStatementAccountsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommerceCustomersResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommerceDisputesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommerceLocationsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommerceOrdersResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommercePaymentMethodsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommercePaymentsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommerceProductCategoriesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommerceProductsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCommerceTransactionsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCompaniesResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListConnectionsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListCreateOperationsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListDataIntegrityDetailsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListPullOperationsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ListReportsResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface PaginationInformationLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface PagingInfoLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface PullOperationsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface PullOperationsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface PushOperationsLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface ReportsListResponseLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface SuppliersLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; +} + +export interface UploadBankStatementDataRequestBodyLinks { + /** + * + * @type {HalRef} + * @memberof Links + */ + self: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + current: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + next?: HalRef; + /** + * + * @type {HalRef} + * @memberof Links + */ + previous?: HalRef; } diff --git a/lending/src/sdk/models/shared/loanref.ts b/lending/src/sdk/models/shared/loanref.ts index 369b1f488..b293ddbab 100644 --- a/lending/src/sdk/models/shared/loanref.ts +++ b/lending/src/sdk/models/shared/loanref.ts @@ -1,41 +1,102 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type LoanRef = { - /** - * The id of the object being referred to. - */ - id?: string | undefined; - /** - * The dataConnectionId the object being referred to is associated with. - */ - dataConnectionId?: string | undefined; - /** - * The object type data is referring to, e.g. Account. - */ - type?: string | undefined; -}; - -/** @internal */ -export const LoanRef$inboundSchema: z.ZodType = - z.object({ - id: z.string().optional(), - dataConnectionId: z.string().optional(), - type: z.string().optional(), - }); - -export function loanRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LoanRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LoanRef' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface LoanRef + */ +export interface LoanRef { + /** + * The id of the object being referred to. + * @type {string} + * @memberof LoanRef + */ + id?: string; + /** + * The dataConnectionId the object being referred to is associated with. + * @type {string} + * @memberof LoanRef + */ + dataConnectionId?: string; + /** + * The object type data is referring to, e.g. Account. + * @type {string} + * @memberof LoanRef + */ + type?: string; +} + +/** + * Check if a given object implements the LoanRef interface. + */ +export function instanceOfLoanRef(value: object): value is LoanRef { + return true; +} + +export function LoanRefFromJSON(json: any): LoanRef { + return LoanRefFromJSONTyped(json, false); +} + +export function LoanRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataConnectionId': json['dataConnectionId'] == null ? undefined : json['dataConnectionId'], + 'type': json['type'] == null ? undefined : json['type'], + }; +} + +export function LoanRefToJSON(json: any): LoanRef { + return LoanRefToJSONTyped(json, false); +} + +export function LoanRefToJSONTyped(value?: LoanRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataConnectionId': value['dataConnectionId'], + 'type': value['type'], + }; +} + + +export interface LoanTransactionsLoanRef { + /** + * The id of the object being referred to. + * @type {string} + * @memberof LoanRef + */ + id?: string; + /** + * The dataConnectionId the object being referred to is associated with. + * @type {string} + * @memberof LoanRef + */ + dataConnectionId?: string; + /** + * The object type data is referring to, e.g. Account. + * @type {string} + * @memberof LoanRef + */ + type?: string; } diff --git a/lending/src/sdk/models/shared/loansummary.ts b/lending/src/sdk/models/shared/loansummary.ts index 20408d769..2c95b68e3 100644 --- a/lending/src/sdk/models/shared/loansummary.ts +++ b/lending/src/sdk/models/shared/loansummary.ts @@ -1,44 +1,118 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { LoanSummaryReportInfo } from './loansummaryreportinfo'; import { - LoanSummaryReportInfo, - LoanSummaryReportInfo$inboundSchema, -} from "./loansummaryreportinfo.js"; + LoanSummaryReportInfoFromJSON, + LoanSummaryReportInfoFromJSONTyped, + LoanSummaryReportInfoToJSON, + LoanSummaryReportInfoToJSONTyped, +} from './loansummaryreportinfo'; +import type { LoanSummaryReportItem } from './loansummaryreportitem'; import { - LoanSummaryReportItem, - LoanSummaryReportItem$inboundSchema, -} from "./loansummaryreportitem.js"; - -export type LoanSummary = { - reportInfo?: LoanSummaryReportInfo | undefined; - /** - * Returns a summary of all loan activity for that integration type - */ - reportItems?: Array | undefined; -}; - -/** @internal */ -export const LoanSummary$inboundSchema: z.ZodType< - LoanSummary, - z.ZodTypeDef, - unknown -> = z.object({ - reportInfo: LoanSummaryReportInfo$inboundSchema.optional(), - reportItems: z.array(LoanSummaryReportItem$inboundSchema).optional(), -}); - -export function loanSummaryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LoanSummary$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LoanSummary' from JSON`, - ); + LoanSummaryReportItemFromJSON, + LoanSummaryReportItemFromJSONTyped, + LoanSummaryReportItemToJSON, + LoanSummaryReportItemToJSONTyped, +} from './loansummaryreportitem'; + +/** + * + * @export + * @interface LoanSummary + */ +export interface LoanSummary { + /** + * + * @type {LoanSummaryReportInfo} + * @memberof LoanSummary + */ + reportInfo?: LoanSummaryReportInfo; + /** + * Returns a summary of all loan activity for that integration type + * @type {Array} + * @memberof LoanSummary + */ + reportItems?: Array; +} + +/** + * Check if a given object implements the LoanSummary interface. + */ +export function instanceOfLoanSummary(value: object): value is LoanSummary { + return true; +} + +export function LoanSummaryFromJSON(json: any): LoanSummary { + return LoanSummaryFromJSONTyped(json, false); +} + +export function LoanSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanSummary { + if (json == null) { + return json; + } + return { + + 'reportInfo': json['reportInfo'] == null ? undefined : LoanSummaryReportInfoFromJSON(json['reportInfo']), + 'reportItems': json['reportItems'] == null ? undefined : ((json['reportItems'] as Array).map(LoanSummaryReportItemFromJSON)), + }; +} + +export function LoanSummaryToJSON(json: any): LoanSummary { + return LoanSummaryToJSONTyped(json, false); +} + +export function LoanSummaryToJSONTyped(value?: LoanSummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reportInfo': LoanSummaryReportInfoToJSON(value['reportInfo']), + 'reportItems': value['reportItems'] == null ? undefined : ((value['reportItems'] as Array).map(LoanSummaryReportItemToJSON)), + }; +} + + +export interface GetLoanSummaryResponseLoanSummary { + /** + * + * @type {LoanSummaryReportInfo} + * @memberof LoanSummary + */ + reportInfo?: LoanSummaryReportInfo; + /** + * Returns a summary of all loan activity for that integration type + * @type {Array} + * @memberof LoanSummary + */ + reportItems?: Array; +} + +export interface LoanSummaryGetResponseLoanSummary { + /** + * + * @type {LoanSummaryReportInfo} + * @memberof LoanSummary + */ + reportInfo?: LoanSummaryReportInfo; + /** + * Returns a summary of all loan activity for that integration type + * @type {Array} + * @memberof LoanSummary + */ + reportItems?: Array; } diff --git a/lending/src/sdk/models/shared/loansummaryintegrationtype.ts b/lending/src/sdk/models/shared/loansummaryintegrationtype.ts index fb6c199ab..8779452cb 100644 --- a/lending/src/sdk/models/shared/loansummaryintegrationtype.ts +++ b/lending/src/sdk/models/shared/loansummaryintegrationtype.ts @@ -1,26 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The integration type begin referred to. + * @export */ export const LoanSummaryIntegrationType = { - Accounting: "Accounting", - Banking: "Banking", - Commerce: "Commerce", + Accounting: 'Accounting', + Banking: 'Banking', + Commerce: 'Commerce' } as const; -/** - * The integration type begin referred to. - */ -export type LoanSummaryIntegrationType = ClosedEnum< - typeof LoanSummaryIntegrationType ->; - -/** @internal */ -export const LoanSummaryIntegrationType$inboundSchema: z.ZodNativeEnum< - typeof LoanSummaryIntegrationType -> = z.nativeEnum(LoanSummaryIntegrationType); +export type LoanSummaryIntegrationType = typeof LoanSummaryIntegrationType[keyof typeof LoanSummaryIntegrationType]; + + +export function instanceOfLoanSummaryIntegrationType(value: any): boolean { + for (const key in LoanSummaryIntegrationType) { + if (Object.prototype.hasOwnProperty.call(LoanSummaryIntegrationType, key)) { + if (LoanSummaryIntegrationType[key as keyof typeof LoanSummaryIntegrationType] === value) { + return true; + } + } + } + return false; +} + +export function LoanSummaryIntegrationTypeFromJSON(json: any): LoanSummaryIntegrationType { + return LoanSummaryIntegrationTypeFromJSONTyped(json, false); +} + +export function LoanSummaryIntegrationTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanSummaryIntegrationType { + return json as LoanSummaryIntegrationType; +} + +export function LoanSummaryIntegrationTypeToJSON(value?: LoanSummaryIntegrationType | null): any { + return value as any; +} + +export function LoanSummaryIntegrationTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): LoanSummaryIntegrationType { + return value as LoanSummaryIntegrationType; +} + diff --git a/lending/src/sdk/models/shared/loansummaryrecordref.ts b/lending/src/sdk/models/shared/loansummaryrecordref.ts index 76a432102..bbd204de2 100644 --- a/lending/src/sdk/models/shared/loansummaryrecordref.ts +++ b/lending/src/sdk/models/shared/loansummaryrecordref.ts @@ -1,57 +1,133 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { LoanSummaryIntegrationType } from './loansummaryintegrationtype'; import { - LoanSummaryIntegrationType, - LoanSummaryIntegrationType$inboundSchema, -} from "./loansummaryintegrationtype.js"; + LoanSummaryIntegrationTypeFromJSON, + LoanSummaryIntegrationTypeFromJSONTyped, + LoanSummaryIntegrationTypeToJSON, + LoanSummaryIntegrationTypeToJSONTyped, +} from './loansummaryintegrationtype'; +import type { LoanSummaryRecordRefType } from './loansummaryrecordreftype'; import { - LoanSummaryRecordRefType, - LoanSummaryRecordRefType$inboundSchema, -} from "./loansummaryrecordreftype.js"; - -export type LoanSummaryRecordRef = { - /** - * The id of the object being referred to. - */ - id?: string | undefined; - /** - * The dataConnectionId the object being referred to is associated with. - */ - dataConnectionId?: string | undefined; - /** - * The integration type begin referred to. - */ - integrationType?: LoanSummaryIntegrationType | undefined; - /** - * The datatype being referred to. - */ - recordRefType?: LoanSummaryRecordRefType | undefined; -}; - -/** @internal */ -export const LoanSummaryRecordRef$inboundSchema: z.ZodType< - LoanSummaryRecordRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataConnectionId: z.string().optional(), - integrationType: LoanSummaryIntegrationType$inboundSchema.optional(), - recordRefType: LoanSummaryRecordRefType$inboundSchema.optional(), -}); - -export function loanSummaryRecordRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LoanSummaryRecordRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LoanSummaryRecordRef' from JSON`, - ); + LoanSummaryRecordRefTypeFromJSON, + LoanSummaryRecordRefTypeFromJSONTyped, + LoanSummaryRecordRefTypeToJSON, + LoanSummaryRecordRefTypeToJSONTyped, +} from './loansummaryrecordreftype'; + +/** + * + * @export + * @interface LoanSummaryRecordRef + */ +export interface LoanSummaryRecordRef { + /** + * The id of the object being referred to. + * @type {string} + * @memberof LoanSummaryRecordRef + */ + id?: string; + /** + * The dataConnectionId the object being referred to is associated with. + * @type {string} + * @memberof LoanSummaryRecordRef + */ + dataConnectionId?: string; + /** + * + * @type {LoanSummaryIntegrationType} + * @memberof LoanSummaryRecordRef + */ + integrationType?: LoanSummaryIntegrationType; + /** + * + * @type {LoanSummaryRecordRefType} + * @memberof LoanSummaryRecordRef + */ + recordRefType?: LoanSummaryRecordRefType; +} + + + +/** + * Check if a given object implements the LoanSummaryRecordRef interface. + */ +export function instanceOfLoanSummaryRecordRef(value: object): value is LoanSummaryRecordRef { + return true; +} + +export function LoanSummaryRecordRefFromJSON(json: any): LoanSummaryRecordRef { + return LoanSummaryRecordRefFromJSONTyped(json, false); +} + +export function LoanSummaryRecordRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanSummaryRecordRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataConnectionId': json['dataConnectionId'] == null ? undefined : json['dataConnectionId'], + 'integrationType': json['integrationType'] == null ? undefined : LoanSummaryIntegrationTypeFromJSON(json['integrationType']), + 'recordRefType': json['recordRefType'] == null ? undefined : LoanSummaryRecordRefTypeFromJSON(json['recordRefType']), + }; +} + +export function LoanSummaryRecordRefToJSON(json: any): LoanSummaryRecordRef { + return LoanSummaryRecordRefToJSONTyped(json, false); +} + +export function LoanSummaryRecordRefToJSONTyped(value?: LoanSummaryRecordRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataConnectionId': value['dataConnectionId'], + 'integrationType': LoanSummaryIntegrationTypeToJSON(value['integrationType']), + 'recordRefType': LoanSummaryRecordRefTypeToJSON(value['recordRefType']), + }; +} + + +export interface LoanSummaryLoanSummaryRecordRef { + /** + * The id of the object being referred to. + * @type {string} + * @memberof LoanSummaryRecordRef + */ + id?: string; + /** + * The dataConnectionId the object being referred to is associated with. + * @type {string} + * @memberof LoanSummaryRecordRef + */ + dataConnectionId?: string; + /** + * + * @type {LoanSummaryIntegrationType} + * @memberof LoanSummaryRecordRef + */ + integrationType?: LoanSummaryIntegrationType; + /** + * + * @type {LoanSummaryRecordRefType} + * @memberof LoanSummaryRecordRef + */ + recordRefType?: LoanSummaryRecordRefType; } diff --git a/lending/src/sdk/models/shared/loansummaryrecordreftype.ts b/lending/src/sdk/models/shared/loansummaryrecordreftype.ts index 16646c41b..aa3d0ae22 100644 --- a/lending/src/sdk/models/shared/loansummaryrecordreftype.ts +++ b/lending/src/sdk/models/shared/loansummaryrecordreftype.ts @@ -1,26 +1,58 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ + +import type { Accounts } from './accounts'; +import type { BankingAccounts } from './bankingaccounts'; +import type { CommerceTransactions } from './commercetransactions'; +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The datatype being referred to. + * @export */ export const LoanSummaryRecordRefType = { - Accounts: "accounts", - BankingAccounts: "banking-accounts", - CommerceTransactions: "commerce-transactions", + Accounts: 'accounts', + BankingAccounts: 'banking-accounts', + CommerceTransactions: 'commerce-transactions' } as const; -/** - * The datatype being referred to. - */ -export type LoanSummaryRecordRefType = ClosedEnum< - typeof LoanSummaryRecordRefType ->; - -/** @internal */ -export const LoanSummaryRecordRefType$inboundSchema: z.ZodNativeEnum< - typeof LoanSummaryRecordRefType -> = z.nativeEnum(LoanSummaryRecordRefType); +export type LoanSummaryRecordRefType = typeof LoanSummaryRecordRefType[keyof typeof LoanSummaryRecordRefType]; + + +export function instanceOfLoanSummaryRecordRefType(value: any): boolean { + for (const key in LoanSummaryRecordRefType) { + if (Object.prototype.hasOwnProperty.call(LoanSummaryRecordRefType, key)) { + if (LoanSummaryRecordRefType[key as keyof typeof LoanSummaryRecordRefType] === value) { + return true; + } + } + } + return false; +} + +export function LoanSummaryRecordRefTypeFromJSON(json: any): LoanSummaryRecordRefType { + return LoanSummaryRecordRefTypeFromJSONTyped(json, false); +} + +export function LoanSummaryRecordRefTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanSummaryRecordRefType { + return json as LoanSummaryRecordRefType; +} + +export function LoanSummaryRecordRefTypeToJSON(value?: LoanSummaryRecordRefType | null): any { + return value as any; +} + +export function LoanSummaryRecordRefTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): LoanSummaryRecordRefType { + return value as LoanSummaryRecordRefType; +} + diff --git a/lending/src/sdk/models/shared/loansummaryreportinfo.ts b/lending/src/sdk/models/shared/loansummaryreportinfo.ts index 4d11f01ba..6b3d62547 100644 --- a/lending/src/sdk/models/shared/loansummaryreportinfo.ts +++ b/lending/src/sdk/models/shared/loansummaryreportinfo.ts @@ -1,62 +1,216 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type LoanSummaryReportInfo = { - /** - * The name of the report. - */ - reportName?: string | undefined; - /** - * Name of the company queried. - */ - companyName?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - generatedDate?: string | undefined; -}; - -/** @internal */ -export const LoanSummaryReportInfo$inboundSchema: z.ZodType< - LoanSummaryReportInfo, - z.ZodTypeDef, - unknown -> = z.object({ - reportName: z.string().optional(), - companyName: z.string().optional(), - generatedDate: z.string().optional(), -}); - -export function loanSummaryReportInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LoanSummaryReportInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LoanSummaryReportInfo' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface LoanSummaryReportInfo + */ +export interface LoanSummaryReportInfo { + /** + * The name of the report. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + generatedDate?: string; +} + +/** + * Check if a given object implements the LoanSummaryReportInfo interface. + */ +export function instanceOfLoanSummaryReportInfo(value: object): value is LoanSummaryReportInfo { + return true; +} + +export function LoanSummaryReportInfoFromJSON(json: any): LoanSummaryReportInfo { + return LoanSummaryReportInfoFromJSONTyped(json, false); +} + +export function LoanSummaryReportInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanSummaryReportInfo { + if (json == null) { + return json; + } + return { + + 'reportName': json['reportName'] == null ? undefined : json['reportName'], + 'companyName': json['companyName'] == null ? undefined : json['companyName'], + 'generatedDate': json['generatedDate'] == null ? undefined : json['generatedDate'], + }; +} + +export function LoanSummaryReportInfoToJSON(json: any): LoanSummaryReportInfo { + return LoanSummaryReportInfoToJSONTyped(json, false); +} + +export function LoanSummaryReportInfoToJSONTyped(value?: LoanSummaryReportInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reportName': value['reportName'], + 'companyName': value['companyName'], + 'generatedDate': value['generatedDate'], + }; +} + + +export interface GetLoanSummaryResponseLoanSummaryReportInfo { + /** + * The name of the report. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + generatedDate?: string; +} + +export interface LoanSummaryGetResponseLoanSummaryReportInfo { + /** + * The name of the report. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + generatedDate?: string; +} + +export interface LoanSummaryLoanSummaryReportInfo { + /** + * The name of the report. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanSummaryReportInfo + */ + generatedDate?: string; } diff --git a/lending/src/sdk/models/shared/loansummaryreportitem.ts b/lending/src/sdk/models/shared/loansummaryreportitem.ts index dc7f1c51d..bd0bcb1dd 100644 --- a/lending/src/sdk/models/shared/loansummaryreportitem.ts +++ b/lending/src/sdk/models/shared/loansummaryreportitem.ts @@ -1,84 +1,329 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { LoanSummaryRecordRef } from './loansummaryrecordref'; import { - LoanSummaryRecordRef, - LoanSummaryRecordRef$inboundSchema, -} from "./loansummaryrecordref.js"; + LoanSummaryRecordRefFromJSON, + LoanSummaryRecordRefFromJSONTyped, + LoanSummaryRecordRefToJSON, + LoanSummaryRecordRefToJSONTyped, +} from './loansummaryrecordref'; -export type LoanSummaryReportItem = { - recordRef?: LoanSummaryRecordRef | undefined; - /** - * The description of the object being referred to. E.g. the account. - */ - description?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - startDate?: string | undefined; - /** - * The total loan drawdowns. - */ - totalDrawdowns?: Decimal$ | number | undefined; - /** - * The total loan repayments which includes capital plus any interest. - */ - totalRepayments?: Decimal$ | number | undefined; - /** - * The loan outstanding balance. This may not equal totalDrawdowns - totalRepayments due to interest which has been accrued. - */ - balance?: Decimal$ | number | undefined; - /** - * The name of lender providing the loan. - */ - lender?: string | undefined; -}; +/** + * + * @export + * @interface LoanSummaryReportItem + */ +export interface LoanSummaryReportItem { + /** + * Contains object that contains a summary of all loan transactions for that integration type. + * @type {LoanSummaryRecordRef} + * @memberof LoanSummaryReportItem + */ + recordRef?: LoanSummaryRecordRef; + /** + * The description of the object being referred to. E.g. the account. + * @type {string} + * @memberof LoanSummaryReportItem + */ + description?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanSummaryReportItem + */ + startDate?: string; + /** + * The total loan drawdowns. + * @type {string} + * @memberof LoanSummaryReportItem + */ + totalDrawdowns?: Decimal | number; + /** + * The total loan repayments which includes capital plus any interest. + * @type {string} + * @memberof LoanSummaryReportItem + */ + totalRepayments?: Decimal | number; + /** + * The loan outstanding balance. This may not equal totalDrawdowns - totalRepayments due to interest which has been accrued. + * @type {string} + * @memberof LoanSummaryReportItem + */ + balance?: Decimal | number; + /** + * The name of lender providing the loan. + * @type {string} + * @memberof LoanSummaryReportItem + */ + lender?: string; +} + +/** + * Check if a given object implements the LoanSummaryReportItem interface. + */ +export function instanceOfLoanSummaryReportItem(value: object): value is LoanSummaryReportItem { + return true; +} + +export function LoanSummaryReportItemFromJSON(json: any): LoanSummaryReportItem { + return LoanSummaryReportItemFromJSONTyped(json, false); +} + +export function LoanSummaryReportItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanSummaryReportItem { + if (json == null) { + return json; + } + return { + + 'recordRef': json['recordRef'] == null ? undefined : LoanSummaryRecordRefFromJSON(json['recordRef']), + 'description': json['description'] == null ? undefined : json['description'], + 'startDate': json['startDate'] == null ? undefined : json['startDate'], + 'totalDrawdowns': json['totalDrawdowns'] == null ? undefined : toDecimal(json['totalDrawdowns']), + 'totalRepayments': json['totalRepayments'] == null ? undefined : toDecimal(json['totalRepayments']), + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'lender': json['lender'] == null ? undefined : json['lender'], + }; +} -/** @internal */ -export const LoanSummaryReportItem$inboundSchema: z.ZodType< - LoanSummaryReportItem, - z.ZodTypeDef, - unknown -> = z.object({ - recordRef: LoanSummaryRecordRef$inboundSchema.optional(), - description: z.string().optional(), - startDate: z.string().optional(), - totalDrawdowns: z.number().transform(v => new Decimal$(v)).optional(), - totalRepayments: z.number().transform(v => new Decimal$(v)).optional(), - balance: z.number().transform(v => new Decimal$(v)).optional(), - lender: z.string().optional(), -}); +export function LoanSummaryReportItemToJSON(json: any): LoanSummaryReportItem { + return LoanSummaryReportItemToJSONTyped(json, false); +} + +export function LoanSummaryReportItemToJSONTyped(value?: LoanSummaryReportItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'recordRef': LoanSummaryRecordRefToJSON(value['recordRef']), + 'description': value['description'], + 'startDate': value['startDate'], + 'totalDrawdowns': fromDecimal(value['totalDrawdowns']), + 'totalRepayments': fromDecimal(value['totalRepayments']), + 'balance': fromDecimal(value['balance']), + 'lender': value['lender'], + }; +} + + +export interface GetLoanSummaryResponseLoanSummaryReportItem { + /** + * Contains object that contains a summary of all loan transactions for that integration type. + * @type {LoanSummaryRecordRef} + * @memberof LoanSummaryReportItem + */ + recordRef?: LoanSummaryRecordRef; + /** + * The description of the object being referred to. E.g. the account. + * @type {string} + * @memberof LoanSummaryReportItem + */ + description?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanSummaryReportItem + */ + startDate?: string; + /** + * The total loan drawdowns. + * @type {string} + * @memberof LoanSummaryReportItem + */ + totalDrawdowns?: Decimal | number; + /** + * The total loan repayments which includes capital plus any interest. + * @type {string} + * @memberof LoanSummaryReportItem + */ + totalRepayments?: Decimal | number; + /** + * The loan outstanding balance. This may not equal totalDrawdowns - totalRepayments due to interest which has been accrued. + * @type {string} + * @memberof LoanSummaryReportItem + */ + balance?: Decimal | number; + /** + * The name of lender providing the loan. + * @type {string} + * @memberof LoanSummaryReportItem + */ + lender?: string; +} + +export interface LoanSummaryGetResponseLoanSummaryReportItem { + /** + * Contains object that contains a summary of all loan transactions for that integration type. + * @type {LoanSummaryRecordRef} + * @memberof LoanSummaryReportItem + */ + recordRef?: LoanSummaryRecordRef; + /** + * The description of the object being referred to. E.g. the account. + * @type {string} + * @memberof LoanSummaryReportItem + */ + description?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanSummaryReportItem + */ + startDate?: string; + /** + * The total loan drawdowns. + * @type {string} + * @memberof LoanSummaryReportItem + */ + totalDrawdowns?: Decimal | number; + /** + * The total loan repayments which includes capital plus any interest. + * @type {string} + * @memberof LoanSummaryReportItem + */ + totalRepayments?: Decimal | number; + /** + * The loan outstanding balance. This may not equal totalDrawdowns - totalRepayments due to interest which has been accrued. + * @type {string} + * @memberof LoanSummaryReportItem + */ + balance?: Decimal | number; + /** + * The name of lender providing the loan. + * @type {string} + * @memberof LoanSummaryReportItem + */ + lender?: string; +} -export function loanSummaryReportItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LoanSummaryReportItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LoanSummaryReportItem' from JSON`, - ); +export interface LoanSummaryLoanSummaryReportItem { + /** + * Contains object that contains a summary of all loan transactions for that integration type. + * @type {LoanSummaryRecordRef} + * @memberof LoanSummaryReportItem + */ + recordRef?: LoanSummaryRecordRef; + /** + * The description of the object being referred to. E.g. the account. + * @type {string} + * @memberof LoanSummaryReportItem + */ + description?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanSummaryReportItem + */ + startDate?: string; + /** + * The total loan drawdowns. + * @type {string} + * @memberof LoanSummaryReportItem + */ + totalDrawdowns?: Decimal | number; + /** + * The total loan repayments which includes capital plus any interest. + * @type {string} + * @memberof LoanSummaryReportItem + */ + totalRepayments?: Decimal | number; + /** + * The loan outstanding balance. This may not equal totalDrawdowns - totalRepayments due to interest which has been accrued. + * @type {string} + * @memberof LoanSummaryReportItem + */ + balance?: Decimal | number; + /** + * The name of lender providing the loan. + * @type {string} + * @memberof LoanSummaryReportItem + */ + lender?: string; } diff --git a/lending/src/sdk/models/shared/loantransactions.ts b/lending/src/sdk/models/shared/loantransactions.ts index b8c02733d..83c8b9e63 100644 --- a/lending/src/sdk/models/shared/loantransactions.ts +++ b/lending/src/sdk/models/shared/loantransactions.ts @@ -1,41 +1,118 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { LoanTransactionsReportInfo } from './loantransactionsreportinfo'; import { - LoanTransactionsReportInfo, - LoanTransactionsReportInfo$inboundSchema, -} from "./loantransactionsreportinfo.js"; -import { ReportItems, ReportItems$inboundSchema } from "./reportitems.js"; - -export type LoanTransactions = { - reportInfo?: LoanTransactionsReportInfo | undefined; - /** - * Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. - */ - reportItems?: Array | undefined; -}; - -/** @internal */ -export const LoanTransactions$inboundSchema: z.ZodType< - LoanTransactions, - z.ZodTypeDef, - unknown -> = z.object({ - reportInfo: LoanTransactionsReportInfo$inboundSchema.optional(), - reportItems: z.array(ReportItems$inboundSchema).optional(), -}); - -export function loanTransactionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LoanTransactions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LoanTransactions' from JSON`, - ); + LoanTransactionsReportInfoFromJSON, + LoanTransactionsReportInfoFromJSONTyped, + LoanTransactionsReportInfoToJSON, + LoanTransactionsReportInfoToJSONTyped, +} from './loantransactionsreportinfo'; +import type { ReportItems } from './reportitems'; +import { + ReportItemsFromJSON, + ReportItemsFromJSONTyped, + ReportItemsToJSON, + ReportItemsToJSONTyped, +} from './reportitems'; + +/** + * + * @export + * @interface LoanTransactions + */ +export interface LoanTransactions { + /** + * + * @type {LoanTransactionsReportInfo} + * @memberof LoanTransactions + */ + reportInfo?: LoanTransactionsReportInfo; + /** + * Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. + * @type {Array} + * @memberof LoanTransactions + */ + reportItems?: Array; +} + +/** + * Check if a given object implements the LoanTransactions interface. + */ +export function instanceOfLoanTransactions(value: object): value is LoanTransactions { + return true; +} + +export function LoanTransactionsFromJSON(json: any): LoanTransactions { + return LoanTransactionsFromJSONTyped(json, false); +} + +export function LoanTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanTransactions { + if (json == null) { + return json; + } + return { + + 'reportInfo': json['reportInfo'] == null ? undefined : LoanTransactionsReportInfoFromJSON(json['reportInfo']), + 'reportItems': json['reportItems'] == null ? undefined : ((json['reportItems'] as Array).map(ReportItemsFromJSON)), + }; +} + +export function LoanTransactionsToJSON(json: any): LoanTransactions { + return LoanTransactionsToJSONTyped(json, false); +} + +export function LoanTransactionsToJSONTyped(value?: LoanTransactions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reportInfo': LoanTransactionsReportInfoToJSON(value['reportInfo']), + 'reportItems': value['reportItems'] == null ? undefined : ((value['reportItems'] as Array).map(ReportItemsToJSON)), + }; +} + + +export interface ListLoanTransactionsResponseLoanTransactions { + /** + * + * @type {LoanTransactionsReportInfo} + * @memberof LoanTransactions + */ + reportInfo?: LoanTransactionsReportInfo; + /** + * Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. + * @type {Array} + * @memberof LoanTransactions + */ + reportItems?: Array; +} + +export interface LoanTransactionsListResponseLoanTransactions { + /** + * + * @type {LoanTransactionsReportInfo} + * @memberof LoanTransactions + */ + reportInfo?: LoanTransactionsReportInfo; + /** + * Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. + * @type {Array} + * @memberof LoanTransactions + */ + reportItems?: Array; } diff --git a/lending/src/sdk/models/shared/loantransactionsreportinfo.ts b/lending/src/sdk/models/shared/loantransactionsreportinfo.ts index 4ffd03afc..e00b83dcb 100644 --- a/lending/src/sdk/models/shared/loantransactionsreportinfo.ts +++ b/lending/src/sdk/models/shared/loantransactionsreportinfo.ts @@ -1,77 +1,294 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface LoanTransactionsReportInfo + */ +export interface LoanTransactionsReportInfo { + /** + * The page number. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + pageNumber?: number; + /** + * Queried page size. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + pageSize?: number; + /** + * The total number of transactions returned. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + totalResults?: number; + /** + * The name of the report. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + generatedDate?: string; +} -export type LoanTransactionsReportInfo = { - /** - * The page number. - */ - pageNumber?: number | undefined; - /** - * Queried page size. - */ - pageSize?: number | undefined; - /** - * The total number of transactions returned. - */ - totalResults?: number | undefined; - /** - * The name of the report. - */ - reportName?: string | undefined; - /** - * Name of the company queried. - */ - companyName?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - generatedDate?: string | undefined; -}; +/** + * Check if a given object implements the LoanTransactionsReportInfo interface. + */ +export function instanceOfLoanTransactionsReportInfo(value: object): value is LoanTransactionsReportInfo { + return true; +} -/** @internal */ -export const LoanTransactionsReportInfo$inboundSchema: z.ZodType< - LoanTransactionsReportInfo, - z.ZodTypeDef, - unknown -> = z.object({ - pageNumber: z.number().int().optional(), - pageSize: z.number().int().optional(), - totalResults: z.number().int().optional(), - reportName: z.string().optional(), - companyName: z.string().optional(), - generatedDate: z.string().optional(), -}); +export function LoanTransactionsReportInfoFromJSON(json: any): LoanTransactionsReportInfo { + return LoanTransactionsReportInfoFromJSONTyped(json, false); +} + +export function LoanTransactionsReportInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoanTransactionsReportInfo { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'] == null ? undefined : json['pageNumber'], + 'pageSize': json['pageSize'] == null ? undefined : json['pageSize'], + 'totalResults': json['totalResults'] == null ? undefined : json['totalResults'], + 'reportName': json['reportName'] == null ? undefined : json['reportName'], + 'companyName': json['companyName'] == null ? undefined : json['companyName'], + 'generatedDate': json['generatedDate'] == null ? undefined : json['generatedDate'], + }; +} + +export function LoanTransactionsReportInfoToJSON(json: any): LoanTransactionsReportInfo { + return LoanTransactionsReportInfoToJSONTyped(json, false); +} + +export function LoanTransactionsReportInfoToJSONTyped(value?: LoanTransactionsReportInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + 'reportName': value['reportName'], + 'companyName': value['companyName'], + 'generatedDate': value['generatedDate'], + }; +} + + +export interface ListLoanTransactionsResponseLoanTransactionsReportInfo { + /** + * The page number. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + pageNumber?: number; + /** + * Queried page size. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + pageSize?: number; + /** + * The total number of transactions returned. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + totalResults?: number; + /** + * The name of the report. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + generatedDate?: string; +} + +export interface LoanTransactionsListResponseLoanTransactionsReportInfo { + /** + * The page number. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + pageNumber?: number; + /** + * Queried page size. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + pageSize?: number; + /** + * The total number of transactions returned. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + totalResults?: number; + /** + * The name of the report. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + generatedDate?: string; +} -export function loanTransactionsReportInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LoanTransactionsReportInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LoanTransactionsReportInfo' from JSON`, - ); +export interface LoanTransactionsLoanTransactionsReportInfo { + /** + * The page number. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + pageNumber?: number; + /** + * Queried page size. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + pageSize?: number; + /** + * The total number of transactions returned. + * @type {number} + * @memberof LoanTransactionsReportInfo + */ + totalResults?: number; + /** + * The name of the report. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + reportName?: string; + /** + * Name of the company queried. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + companyName?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof LoanTransactionsReportInfo + */ + generatedDate?: string; } diff --git a/lending/src/sdk/models/shared/locationref.ts b/lending/src/sdk/models/shared/locationref.ts index ce20bef9d..ed4ff58c9 100644 --- a/lending/src/sdk/models/shared/locationref.ts +++ b/lending/src/sdk/models/shared/locationref.ts @@ -1,42 +1,134 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Reference to the geographic location where the order was placed. + * @export + * @interface LocationRef + */ +export interface LocationRef { + /** + * The unique identitifer of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + name?: string; +} + +/** + * Check if a given object implements the LocationRef interface. */ -export type LocationRef = { - /** - * The unique identitifer of the location being referenced. - */ - id: string; - /** - * Name of the location being referenced. - */ - name?: string | undefined; -}; - -/** @internal */ -export const LocationRef$inboundSchema: z.ZodType< - LocationRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.string().optional(), -}); - -export function locationRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LocationRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LocationRef' from JSON`, - ); +export function instanceOfLocationRef(value: object): value is LocationRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function LocationRefFromJSON(json: any): LocationRef { + return LocationRefFromJSONTyped(json, false); +} + +export function LocationRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function LocationRefToJSON(json: any): LocationRef { + return LocationRefToJSONTyped(json, false); +} + +export function LocationRefToJSONTyped(value?: LocationRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface CommerceOrderGetResponseLocationRef { + /** + * The unique identitifer of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + name?: string; +} + +export interface CommerceOrderLocationRef { + /** + * The unique identitifer of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + name?: string; +} + +export interface CommerceOrdersLocationRef { + /** + * The unique identitifer of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + name?: string; +} + +export interface GetCommerceOrderResponseLocationRef { + /** + * The unique identitifer of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof LocationRef + */ + name?: string; } diff --git a/lending/src/sdk/models/shared/metadata.ts b/lending/src/sdk/models/shared/metadata.ts index 4a678ba93..477de3287 100644 --- a/lending/src/sdk/models/shared/metadata.ts +++ b/lending/src/sdk/models/shared/metadata.ts @@ -1,50 +1,830 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Metadata = { - /** - * Indicates whether the record has been deleted in the third-party system this record originated from. - */ - isDeleted?: boolean | null | undefined; -}; - -/** @internal */ -export const Metadata$inboundSchema: z.ZodType< - Metadata, - z.ZodTypeDef, - unknown -> = z.object({ - isDeleted: z.nullable(z.boolean()).optional(), -}); -/** @internal */ -export type Metadata$Outbound = { - isDeleted?: boolean | null | undefined; -}; - -/** @internal */ -export const Metadata$outboundSchema: z.ZodType< - Metadata$Outbound, - z.ZodTypeDef, - Metadata -> = z.object({ - isDeleted: z.nullable(z.boolean()).optional(), -}); - -export function metadataToJSON(metadata: Metadata): string { - return JSON.stringify(Metadata$outboundSchema.parse(metadata)); -} -export function metadataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Metadata$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Metadata' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface Metadata + */ +export interface Metadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +/** + * Check if a given object implements the Metadata interface. + */ +export function instanceOfMetadata(value: object): value is Metadata { + return true; +} + +export function MetadataFromJSON(json: any): Metadata { + return MetadataFromJSONTyped(json, false); +} + +export function MetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): Metadata { + if (json == null) { + return json; + } + return { + + 'isDeleted': json['isDeleted'] == null ? undefined : json['isDeleted'], + }; +} + +export function MetadataToJSON(json: any): Metadata { + return MetadataToJSONTyped(json, false); +} + +export function MetadataToJSONTyped(value?: Metadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'isDeleted': value['isDeleted'], + }; +} + + +export interface AccountCreateResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingAccountGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingAccountMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingAccountTransactionGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingAccountTransactionMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingAccountTransactionsMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingAccountsMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBankAccountGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBankAccountMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBankAccountsMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillCreditNoteGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillCreditNoteMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillCreditNotesMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillPaymentGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillPaymentMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillPaymentsMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingBillsMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreateAccountResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreateBankAccountResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreateDirectCostResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreatePaymentResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreateSupplierResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreateTransferResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreditNoteGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreditNoteMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCreditNotesMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCustomerGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCustomerMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingCustomersMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingDirectCostGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingDirectCostMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingDirectCostsMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingDirectIncomeGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingDirectIncomeMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingDirectIncomesMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingInvoiceGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingInvoiceMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingInvoicesMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingJournalEntriesMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingJournalEntryGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingJournalEntryMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingJournalGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingJournalMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingJournalsMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingPaymentGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingPaymentMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingPaymentMethodMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingPaymentsMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingSupplierGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingSupplierMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingSuppliersMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingTrackingCategoryMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingTransferGetResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingTransferMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface AccountingTransfersMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface BankAccountCreateResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface CreateAccountResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface CreateBankAccountResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface CreateDirectCostResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface CreatePaymentResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface CreateSupplierResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface CreateTransferResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface DirectCostCreateResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingAccountResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingAccountTransactionResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingBankAccountResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingBillCreditNoteResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingBillPaymentResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingBillResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingCreditNoteResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingCustomerResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingDirectCostResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingDirectIncomeResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingInvoiceResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingJournalEntryResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingJournalResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingPaymentResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingSupplierResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface GetAccountingTransferResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface PaymentCreateResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface SupplierCreateResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface SuppliersMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; +} + +export interface TransferCreateResponseMetadata { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + * @type {boolean} + * @memberof Metadata + */ + isDeleted?: boolean | null; } diff --git a/lending/src/sdk/models/shared/orderdiscountallocation.ts b/lending/src/sdk/models/shared/orderdiscountallocation.ts index 56c5d7d0b..8278f24d9 100644 --- a/lending/src/sdk/models/shared/orderdiscountallocation.ts +++ b/lending/src/sdk/models/shared/orderdiscountallocation.ts @@ -1,40 +1,74 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type OrderDiscountAllocation = { - /** - * Name of the discount in the commerce or point of sale platform. - */ - name?: string | undefined; - /** - * Total amount of discount applied, excluding tax. This is typically positive (for discounts which decrease the amount of the order line), but can also be negative (for discounts which increase the amount of the order line). - */ - totalAmount?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const OrderDiscountAllocation$inboundSchema: z.ZodType< - OrderDiscountAllocation, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), -}); - -export function orderDiscountAllocationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OrderDiscountAllocation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OrderDiscountAllocation' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface OrderDiscountAllocation + */ +export interface OrderDiscountAllocation { + /** + * Name of the discount in the commerce or point of sale platform. + * @type {string} + * @memberof OrderDiscountAllocation + */ + name?: string; + /** + * Total amount of discount applied, excluding tax. This is typically positive (for discounts which decrease the amount of the order line), but can also be negative (for discounts which increase the amount of the order line). + * @type {string} + * @memberof OrderDiscountAllocation + */ + totalAmount?: Decimal | number; +} + +/** + * Check if a given object implements the OrderDiscountAllocation interface. + */ +export function instanceOfOrderDiscountAllocation(value: object): value is OrderDiscountAllocation { + return true; +} + +export function OrderDiscountAllocationFromJSON(json: any): OrderDiscountAllocation { + return OrderDiscountAllocationFromJSONTyped(json, false); +} + +export function OrderDiscountAllocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderDiscountAllocation { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + }; +} + +export function OrderDiscountAllocationToJSON(json: any): OrderDiscountAllocation { + return OrderDiscountAllocationToJSONTyped(json, false); } + +export function OrderDiscountAllocationToJSONTyped(value?: OrderDiscountAllocation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'totalAmount': fromDecimal(value['totalAmount']), + }; +} + diff --git a/lending/src/sdk/models/shared/orderlineitem.ts b/lending/src/sdk/models/shared/orderlineitem.ts index e31a9859b..4b1a595c4 100644 --- a/lending/src/sdk/models/shared/orderlineitem.ts +++ b/lending/src/sdk/models/shared/orderlineitem.ts @@ -1,94 +1,365 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ProductVariantRef } from './productvariantref'; import { - OrderDiscountAllocation, - OrderDiscountAllocation$inboundSchema, -} from "./orderdiscountallocation.js"; -import { ProductRef, ProductRef$inboundSchema } from "./productref.js"; + ProductVariantRefFromJSON, + ProductVariantRefFromJSONTyped, + ProductVariantRefToJSON, + ProductVariantRefToJSONTyped, +} from './productvariantref'; +import type { OrderDiscountAllocation } from './orderdiscountallocation'; import { - ProductVariantRef, - ProductVariantRef$inboundSchema, -} from "./productvariantref.js"; + OrderDiscountAllocationFromJSON, + OrderDiscountAllocationFromJSONTyped, + OrderDiscountAllocationToJSON, + OrderDiscountAllocationToJSONTyped, +} from './orderdiscountallocation'; +import type { TaxComponentAllocation } from './taxcomponentallocation'; import { - TaxComponentAllocation, - TaxComponentAllocation$inboundSchema, -} from "./taxcomponentallocation.js"; + TaxComponentAllocationFromJSON, + TaxComponentAllocationFromJSONTyped, + TaxComponentAllocationToJSON, + TaxComponentAllocationToJSONTyped, +} from './taxcomponentallocation'; +import type { ProductRef } from './productref'; +import { + ProductRefFromJSON, + ProductRefFromJSONTyped, + ProductRefToJSON, + ProductRefToJSONTyped, +} from './productref'; + +/** + * + * @export + * @interface OrderLineItem + */ +export interface OrderLineItem { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof OrderLineItem + */ + id: string; + /** + * Number of units of the product sold. + * For refunds, quantity is negative. + * + * @type {string} + * @memberof OrderLineItem + */ + quantity?: Decimal | number; + /** + * Percentage rate (from 0 to 100) of any sales tax applied to the unit price. + * @type {string} + * @memberof OrderLineItem + */ + taxPercentage?: Decimal | number; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof OrderLineItem + */ + totalAmount?: Decimal | number; + /** + * Total amount of tax applied to the line item, factoring in any discounts. + * @type {string} + * @memberof OrderLineItem + */ + totalTaxAmount?: Decimal | number; + /** + * Price per unit of goods or services, excluding discounts and tax. + * @type {string} + * @memberof OrderLineItem + */ + unitPrice?: Decimal | number; + /** + * Taxes breakdown as applied to order lines. + * @type {Array} + * @memberof OrderLineItem + */ + taxes?: Array; + /** + * + * @type {ProductRef} + * @memberof OrderLineItem + */ + productRef?: ProductRef; + /** + * + * @type {ProductVariantRef} + * @memberof OrderLineItem + */ + productVariantRef?: ProductVariantRef; + /** + * + * @type {Array} + * @memberof OrderLineItem + */ + discountAllocations?: Array; +} + +/** + * Check if a given object implements the OrderLineItem interface. + */ +export function instanceOfOrderLineItem(value: object): value is OrderLineItem { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} -export type OrderLineItem = { - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Number of units of the product sold. - * - * @remarks - * For refunds, quantity is negative. - */ - quantity?: Decimal$ | number | undefined; - /** - * Percentage rate (from 0 to 100) of any sales tax applied to the unit price. - */ - taxPercentage?: Decimal$ | number | undefined; - /** - * Total amount of the line item, including discounts and tax. - */ - totalAmount?: Decimal$ | number | undefined; - /** - * Total amount of tax applied to the line item, factoring in any discounts. - */ - totalTaxAmount?: Decimal$ | number | undefined; - /** - * Price per unit of goods or services, excluding discounts and tax. - */ - unitPrice?: Decimal$ | number | undefined; - /** - * Taxes breakdown as applied to order lines. - */ - taxes?: Array | undefined; - /** - * Reference that links the line item to the correct product details. - */ - productRef?: ProductRef | undefined; - /** - * Reference that links the line item to the specific version of product that has been ordered. - */ - productVariantRef?: ProductVariantRef | undefined; - discountAllocations?: Array | undefined; -}; +export function OrderLineItemFromJSON(json: any): OrderLineItem { + return OrderLineItemFromJSONTyped(json, false); +} + +export function OrderLineItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderLineItem { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'quantity': json['quantity'] == null ? undefined : toDecimal(json['quantity']), + 'taxPercentage': json['taxPercentage'] == null ? undefined : toDecimal(json['taxPercentage']), + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'totalTaxAmount': json['totalTaxAmount'] == null ? undefined : toDecimal(json['totalTaxAmount']), + 'unitPrice': json['unitPrice'] == null ? undefined : toDecimal(json['unitPrice']), + 'taxes': json['taxes'] == null ? undefined : ((json['taxes'] as Array).map(TaxComponentAllocationFromJSON)), + 'productRef': json['productRef'] == null ? undefined : ProductRefFromJSON(json['productRef']), + 'productVariantRef': json['productVariantRef'] == null ? undefined : ProductVariantRefFromJSON(json['productVariantRef']), + 'discountAllocations': json['discountAllocations'] == null ? undefined : ((json['discountAllocations'] as Array).map(OrderDiscountAllocationFromJSON)), + }; +} -/** @internal */ -export const OrderLineItem$inboundSchema: z.ZodType< - OrderLineItem, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - quantity: z.number().transform(v => new Decimal$(v)).optional(), - taxPercentage: z.number().transform(v => new Decimal$(v)).optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - totalTaxAmount: z.number().transform(v => new Decimal$(v)).optional(), - unitPrice: z.number().transform(v => new Decimal$(v)).optional(), - taxes: z.array(TaxComponentAllocation$inboundSchema).optional(), - productRef: ProductRef$inboundSchema.optional(), - productVariantRef: ProductVariantRef$inboundSchema.optional(), - discountAllocations: z.array(OrderDiscountAllocation$inboundSchema) - .optional(), -}); +export function OrderLineItemToJSON(json: any): OrderLineItem { + return OrderLineItemToJSONTyped(json, false); +} + +export function OrderLineItemToJSONTyped(value?: OrderLineItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'quantity': fromDecimal(value['quantity']), + 'taxPercentage': fromDecimal(value['taxPercentage']), + 'totalAmount': fromDecimal(value['totalAmount']), + 'totalTaxAmount': fromDecimal(value['totalTaxAmount']), + 'unitPrice': fromDecimal(value['unitPrice']), + 'taxes': value['taxes'] == null ? undefined : ((value['taxes'] as Array).map(TaxComponentAllocationToJSON)), + 'productRef': ProductRefToJSON(value['productRef']), + 'productVariantRef': ProductVariantRefToJSON(value['productVariantRef']), + 'discountAllocations': value['discountAllocations'] == null ? undefined : ((value['discountAllocations'] as Array).map(OrderDiscountAllocationToJSON)), + }; +} + + +export interface CommerceOrderGetResponseOrderLineItem { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof OrderLineItem + */ + id: string; + /** + * Number of units of the product sold. + * For refunds, quantity is negative. + * + * @type {string} + * @memberof OrderLineItem + */ + quantity?: Decimal | number; + /** + * Percentage rate (from 0 to 100) of any sales tax applied to the unit price. + * @type {string} + * @memberof OrderLineItem + */ + taxPercentage?: Decimal | number; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof OrderLineItem + */ + totalAmount?: Decimal | number; + /** + * Total amount of tax applied to the line item, factoring in any discounts. + * @type {string} + * @memberof OrderLineItem + */ + totalTaxAmount?: Decimal | number; + /** + * Price per unit of goods or services, excluding discounts and tax. + * @type {string} + * @memberof OrderLineItem + */ + unitPrice?: Decimal | number; + /** + * Taxes breakdown as applied to order lines. + * @type {Array} + * @memberof OrderLineItem + */ + taxes?: Array; + /** + * + * @type {ProductRef} + * @memberof OrderLineItem + */ + productRef?: ProductRef; + /** + * + * @type {ProductVariantRef} + * @memberof OrderLineItem + */ + productVariantRef?: ProductVariantRef; + /** + * + * @type {Array} + * @memberof OrderLineItem + */ + discountAllocations?: Array; +} + +export interface CommerceOrderOrderLineItem { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof OrderLineItem + */ + id: string; + /** + * Number of units of the product sold. + * For refunds, quantity is negative. + * + * @type {string} + * @memberof OrderLineItem + */ + quantity?: Decimal | number; + /** + * Percentage rate (from 0 to 100) of any sales tax applied to the unit price. + * @type {string} + * @memberof OrderLineItem + */ + taxPercentage?: Decimal | number; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof OrderLineItem + */ + totalAmount?: Decimal | number; + /** + * Total amount of tax applied to the line item, factoring in any discounts. + * @type {string} + * @memberof OrderLineItem + */ + totalTaxAmount?: Decimal | number; + /** + * Price per unit of goods or services, excluding discounts and tax. + * @type {string} + * @memberof OrderLineItem + */ + unitPrice?: Decimal | number; + /** + * Taxes breakdown as applied to order lines. + * @type {Array} + * @memberof OrderLineItem + */ + taxes?: Array; + /** + * + * @type {ProductRef} + * @memberof OrderLineItem + */ + productRef?: ProductRef; + /** + * + * @type {ProductVariantRef} + * @memberof OrderLineItem + */ + productVariantRef?: ProductVariantRef; + /** + * + * @type {Array} + * @memberof OrderLineItem + */ + discountAllocations?: Array; +} -export function orderLineItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OrderLineItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OrderLineItem' from JSON`, - ); +export interface GetCommerceOrderResponseOrderLineItem { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof OrderLineItem + */ + id: string; + /** + * Number of units of the product sold. + * For refunds, quantity is negative. + * + * @type {string} + * @memberof OrderLineItem + */ + quantity?: Decimal | number; + /** + * Percentage rate (from 0 to 100) of any sales tax applied to the unit price. + * @type {string} + * @memberof OrderLineItem + */ + taxPercentage?: Decimal | number; + /** + * Total amount of the line item, including discounts and tax. + * @type {string} + * @memberof OrderLineItem + */ + totalAmount?: Decimal | number; + /** + * Total amount of tax applied to the line item, factoring in any discounts. + * @type {string} + * @memberof OrderLineItem + */ + totalTaxAmount?: Decimal | number; + /** + * Price per unit of goods or services, excluding discounts and tax. + * @type {string} + * @memberof OrderLineItem + */ + unitPrice?: Decimal | number; + /** + * Taxes breakdown as applied to order lines. + * @type {Array} + * @memberof OrderLineItem + */ + taxes?: Array; + /** + * + * @type {ProductRef} + * @memberof OrderLineItem + */ + productRef?: ProductRef; + /** + * + * @type {ProductVariantRef} + * @memberof OrderLineItem + */ + productVariantRef?: ProductVariantRef; + /** + * + * @type {Array} + * @memberof OrderLineItem + */ + discountAllocations?: Array; } diff --git a/lending/src/sdk/models/shared/path.ts b/lending/src/sdk/models/shared/path.ts deleted file mode 100644 index 21e09ab00..000000000 --- a/lending/src/sdk/models/shared/path.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -export const Path = { - AuthGet: "auth/get", -} as const; -export type Path = ClosedEnum; - -/** @internal */ -export const Path$outboundSchema: z.ZodNativeEnum = z.nativeEnum( - Path, -); diff --git a/lending/src/sdk/models/shared/payment.ts b/lending/src/sdk/models/shared/payment.ts index 87cface2d..e43ded854 100644 --- a/lending/src/sdk/models/shared/payment.ts +++ b/lending/src/sdk/models/shared/payment.ts @@ -1,123 +1,177 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { BankingTransactionRef } from './bankingtransactionref'; import { - BankingTransactionRef, - BankingTransactionRef$inboundSchema, -} from "./bankingtransactionref.js"; + BankingTransactionRefFromJSON, + BankingTransactionRefFromJSONTyped, + BankingTransactionRefToJSON, + BankingTransactionRefToJSONTyped, +} from './bankingtransactionref'; -export type Payment = { - /** - * ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. - */ - id?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * The type of payment. - */ - paymentType?: string | undefined; - /** - * Payment amount. - */ - amount?: Decimal$ | number | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - bankingTransactionRefs?: Array | undefined; -}; +/** + * + * @export + * @interface Payment + */ +export interface Payment { + /** + * ID of the invoice, which may be a GUID but it may be something else depending on the accounting software. + * @type {string} + * @memberof Payment + */ + id?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof Payment + */ + date?: string; + /** + * The type of payment. + * @type {string} + * @memberof Payment + */ + paymentType?: string; + /** + * Payment amount. + * @type {string} + * @memberof Payment + */ + amount?: Decimal | number; + /** + * 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. + * @type {string} + * @memberof Payment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof Payment + */ + currencyRate?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof Payment + */ + bankingTransactionRefs?: Array; +} + +/** + * Check if a given object implements the Payment interface. + */ +export function instanceOfPayment(value: object): value is Payment { + return true; +} + +export function PaymentFromJSON(json: any): Payment { + return PaymentFromJSONTyped(json, false); +} + +export function PaymentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Payment { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'date': json['date'] == null ? undefined : json['date'], + 'paymentType': json['paymentType'] == null ? undefined : json['paymentType'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'bankingTransactionRefs': json['bankingTransactionRefs'] == null ? undefined : ((json['bankingTransactionRefs'] as Array).map(BankingTransactionRefFromJSON)), + }; +} -/** @internal */ -export const Payment$inboundSchema: z.ZodType = - z.object({ - id: z.string().optional(), - date: z.string().optional(), - paymentType: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - bankingTransactionRefs: z.array(BankingTransactionRef$inboundSchema) - .optional(), - }); +export function PaymentToJSON(json: any): Payment { + return PaymentToJSONTyped(json, false); +} + +export function PaymentToJSONTyped(value?: Payment | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function paymentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Payment$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Payment' from JSON`, - ); + return { + + 'id': value['id'], + 'date': value['date'], + 'paymentType': value['paymentType'], + 'amount': fromDecimal(value['amount']), + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'bankingTransactionRefs': value['bankingTransactionRefs'] == null ? undefined : ((value['bankingTransactionRefs'] as Array).map(BankingTransactionRefToJSON)), + }; } + diff --git a/lending/src/sdk/models/shared/paymentallocationpayment.ts b/lending/src/sdk/models/shared/paymentallocationpayment.ts index e1192aeb5..3e2245894 100644 --- a/lending/src/sdk/models/shared/paymentallocationpayment.ts +++ b/lending/src/sdk/models/shared/paymentallocationpayment.ts @@ -1,175 +1,927 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountRef } from './accountref'; import { - AccountRef, - AccountRef$inboundSchema, - AccountRef$Outbound, - AccountRef$outboundSchema, -} from "./accountref.js"; - -export type PaymentAllocationPayment = { - /** - * Identifier of the allocated payment. - */ - id?: string | undefined; - /** - * Notes attached to the allocated payment. - */ - note?: string | null | undefined; - /** - * Reference to the allocated payment. - */ - reference?: string | null | undefined; - /** - * 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. - */ - accountRef?: AccountRef | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - paidOnDate?: string | undefined; - /** - * Total amount that was paid. - */ - totalAmount?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const PaymentAllocationPayment$inboundSchema: z.ZodType< - PaymentAllocationPayment, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - note: z.nullable(z.string()).optional(), - reference: z.nullable(z.string()).optional(), - accountRef: AccountRef$inboundSchema.optional(), - currency: z.string().optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - paidOnDate: z.string().optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), -}); -/** @internal */ -export type PaymentAllocationPayment$Outbound = { - id?: string | undefined; - note?: string | null | undefined; - reference?: string | null | undefined; - accountRef?: AccountRef$Outbound | undefined; - currency?: string | undefined; - currencyRate?: number | null | undefined; - paidOnDate?: string | undefined; - totalAmount?: number | undefined; -}; - -/** @internal */ -export const PaymentAllocationPayment$outboundSchema: z.ZodType< - PaymentAllocationPayment$Outbound, - z.ZodTypeDef, - PaymentAllocationPayment -> = z.object({ - id: z.string().optional(), - note: z.nullable(z.string()).optional(), - reference: z.nullable(z.string()).optional(), - accountRef: AccountRef$outboundSchema.optional(), - currency: z.string().optional(), - currencyRate: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - paidOnDate: z.string().optional(), - totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), -}); - -export function paymentAllocationPaymentToJSON( - paymentAllocationPayment: PaymentAllocationPayment, -): string { - return JSON.stringify( - PaymentAllocationPayment$outboundSchema.parse(paymentAllocationPayment), - ); + AccountRefFromJSON, + AccountRefFromJSONTyped, + AccountRefToJSON, + AccountRefToJSONTyped, +} from './accountref'; + +/** + * + * @export + * @interface PaymentAllocationPayment + */ +export interface PaymentAllocationPayment { + /** + * Identifier of the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + id?: string; + /** + * Notes attached to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + note?: string | null; + /** + * Reference to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + reference?: string | null; + /** + * The account that the allocated payment is made from or to. + * @type {AccountRef} + * @memberof PaymentAllocationPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentAllocationPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + paidOnDate?: string; + /** + * Total amount that was paid. + * @type {string} + * @memberof PaymentAllocationPayment + */ + totalAmount?: Decimal | number; +} + +/** + * Check if a given object implements the PaymentAllocationPayment interface. + */ +export function instanceOfPaymentAllocationPayment(value: object): value is PaymentAllocationPayment { + return true; +} + +export function PaymentAllocationPaymentFromJSON(json: any): PaymentAllocationPayment { + return PaymentAllocationPaymentFromJSONTyped(json, false); +} + +export function PaymentAllocationPaymentFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentAllocationPayment { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'note': json['note'] == null ? undefined : json['note'], + 'reference': json['reference'] == null ? undefined : json['reference'], + 'accountRef': json['accountRef'] == null ? undefined : AccountRefFromJSON(json['accountRef']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + 'paidOnDate': json['paidOnDate'] == null ? undefined : json['paidOnDate'], + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + }; +} + +export function PaymentAllocationPaymentToJSON(json: any): PaymentAllocationPayment { + return PaymentAllocationPaymentToJSONTyped(json, false); +} + +export function PaymentAllocationPaymentToJSONTyped(value?: PaymentAllocationPayment | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'note': value['note'], + 'reference': value['reference'], + 'accountRef': AccountRefToJSON(value['accountRef']), + 'currency': value['currency'], + 'currencyRate': fromDecimal(value['currencyRate']), + 'paidOnDate': value['paidOnDate'], + 'totalAmount': fromDecimal(value['totalAmount']), + }; } -export function paymentAllocationPaymentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PaymentAllocationPayment$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PaymentAllocationPayment' from JSON`, - ); + + +export interface AccountingBillCreditNotePaymentAllocationPayment { + /** + * Identifier of the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + id?: string; + /** + * Notes attached to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + note?: string | null; + /** + * Reference to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + reference?: string | null; + /** + * The account that the allocated payment is made from or to. + * @type {AccountRef} + * @memberof PaymentAllocationPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentAllocationPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + paidOnDate?: string; + /** + * Total amount that was paid. + * @type {string} + * @memberof PaymentAllocationPayment + */ + totalAmount?: Decimal | number; +} + +export interface AccountingBillPaymentAllocationPayment { + /** + * Identifier of the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + id?: string; + /** + * Notes attached to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + note?: string | null; + /** + * Reference to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + reference?: string | null; + /** + * The account that the allocated payment is made from or to. + * @type {AccountRef} + * @memberof PaymentAllocationPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentAllocationPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + paidOnDate?: string; + /** + * Total amount that was paid. + * @type {string} + * @memberof PaymentAllocationPayment + */ + totalAmount?: Decimal | number; +} + +export interface AccountingCreditNotePaymentAllocationPayment { + /** + * Identifier of the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + id?: string; + /** + * Notes attached to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + note?: string | null; + /** + * Reference to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + reference?: string | null; + /** + * The account that the allocated payment is made from or to. + * @type {AccountRef} + * @memberof PaymentAllocationPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentAllocationPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + paidOnDate?: string; + /** + * Total amount that was paid. + * @type {string} + * @memberof PaymentAllocationPayment + */ + totalAmount?: Decimal | number; +} + +export interface AccountingDirectCostPaymentAllocationPayment { + /** + * Identifier of the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + id?: string; + /** + * Notes attached to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + note?: string | null; + /** + * Reference to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + reference?: string | null; + /** + * The account that the allocated payment is made from or to. + * @type {AccountRef} + * @memberof PaymentAllocationPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentAllocationPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + paidOnDate?: string; + /** + * Total amount that was paid. + * @type {string} + * @memberof PaymentAllocationPayment + */ + totalAmount?: Decimal | number; +} + +export interface AccountingDirectIncomePaymentAllocationPayment { + /** + * Identifier of the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + id?: string; + /** + * Notes attached to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + note?: string | null; + /** + * Reference to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + reference?: string | null; + /** + * The account that the allocated payment is made from or to. + * @type {AccountRef} + * @memberof PaymentAllocationPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentAllocationPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + paidOnDate?: string; + /** + * Total amount that was paid. + * @type {string} + * @memberof PaymentAllocationPayment + */ + totalAmount?: Decimal | number; +} + +export interface AccountingInvoicePaymentAllocationPayment { + /** + * Identifier of the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + id?: string; + /** + * Notes attached to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + note?: string | null; + /** + * Reference to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + reference?: string | null; + /** + * The account that the allocated payment is made from or to. + * @type {AccountRef} + * @memberof PaymentAllocationPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentAllocationPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + paidOnDate?: string; + /** + * Total amount that was paid. + * @type {string} + * @memberof PaymentAllocationPayment + */ + totalAmount?: Decimal | number; +} + +export interface AccountingPaymentAllocationPaymentAllocationPayment { + /** + * Identifier of the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + id?: string; + /** + * Notes attached to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + note?: string | null; + /** + * Reference to the allocated payment. + * @type {string} + * @memberof PaymentAllocationPayment + */ + reference?: string | null; + /** + * The account that the allocated payment is made from or to. + * @type {AccountRef} + * @memberof PaymentAllocationPayment + */ + accountRef?: AccountRef; + /** + * 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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + currency?: string; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentAllocationPayment + */ + currencyRate?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentAllocationPayment + */ + paidOnDate?: string; + /** + * Total amount that was paid. + * @type {string} + * @memberof PaymentAllocationPayment + */ + totalAmount?: Decimal | number; } diff --git a/lending/src/sdk/models/shared/paymentline.ts b/lending/src/sdk/models/shared/paymentline.ts index 3ac3eaec4..e52ea3ced 100644 --- a/lending/src/sdk/models/shared/paymentline.ts +++ b/lending/src/sdk/models/shared/paymentline.ts @@ -1,88 +1,265 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { PaymentLineLink } from './paymentlinelink'; import { - PaymentLineLink, - PaymentLineLink$inboundSchema, - PaymentLineLink$Outbound, - PaymentLineLink$outboundSchema, -} from "./paymentlinelink.js"; + PaymentLineLinkFromJSON, + PaymentLineLinkFromJSONTyped, + PaymentLineLinkToJSON, + PaymentLineLinkToJSONTyped, +} from './paymentlinelink'; -export type PaymentLine = { - /** - * Amount in the payment currency. - */ - amount: Decimal$ | number; - links?: Array | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - allocatedOnDate?: string | undefined; -}; +/** + * + * @export + * @interface PaymentLine + */ +export interface PaymentLine { + /** + * Amount in the payment currency. + * @type {string} + * @memberof PaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof PaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentLine + */ + allocatedOnDate?: string; +} + +/** + * Check if a given object implements the PaymentLine interface. + */ +export function instanceOfPaymentLine(value: object): value is PaymentLine { + if (!('amount' in value) || value['amount'] === undefined) return false; + return true; +} + +export function PaymentLineFromJSON(json: any): PaymentLine { + return PaymentLineFromJSONTyped(json, false); +} + +export function PaymentLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentLine { + if (json == null) { + return json; + } + return { + + 'amount': json['amount'], + 'links': json['links'] == null ? undefined : ((json['links'] as Array).map(PaymentLineLinkFromJSON)), + 'allocatedOnDate': json['allocatedOnDate'] == null ? undefined : json['allocatedOnDate'], + }; +} -/** @internal */ -export const PaymentLine$inboundSchema: z.ZodType< - PaymentLine, - z.ZodTypeDef, - unknown -> = z.object({ - amount: z.number().transform(v => new Decimal$(v)), - links: z.nullable(z.array(PaymentLineLink$inboundSchema)).optional(), - allocatedOnDate: z.string().optional(), -}); -/** @internal */ -export type PaymentLine$Outbound = { - amount: number; - links?: Array | null | undefined; - allocatedOnDate?: string | undefined; -}; +export function PaymentLineToJSON(json: any): PaymentLine { + return PaymentLineToJSONTyped(json, false); +} -/** @internal */ -export const PaymentLine$outboundSchema: z.ZodType< - PaymentLine$Outbound, - z.ZodTypeDef, - PaymentLine -> = z.object({ - amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - links: z.nullable(z.array(PaymentLineLink$outboundSchema)).optional(), - allocatedOnDate: z.string().optional(), -}); +export function PaymentLineToJSONTyped(value?: PaymentLine | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function paymentLineToJSON(paymentLine: PaymentLine): string { - return JSON.stringify(PaymentLine$outboundSchema.parse(paymentLine)); + return { + + 'amount': fromDecimal(value['amount']), + 'links': value['links'] == null ? undefined : ((value['links'] as Array).map(PaymentLineLinkToJSON)), + 'allocatedOnDate': value['allocatedOnDate'], + }; } -export function paymentLineFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PaymentLine$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PaymentLine' from JSON`, - ); + + +export interface AccountingCreatePaymentResponsePaymentLine { + /** + * Amount in the payment currency. + * @type {string} + * @memberof PaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof PaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentLine + */ + allocatedOnDate?: string; +} + +export interface AccountingPaymentGetResponsePaymentLine { + /** + * Amount in the payment currency. + * @type {string} + * @memberof PaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof PaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentLine + */ + allocatedOnDate?: string; +} + +export interface AccountingPaymentPaymentLine { + /** + * Amount in the payment currency. + * @type {string} + * @memberof PaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof PaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentLine + */ + allocatedOnDate?: string; +} + +export interface GetAccountingPaymentResponsePaymentLine { + /** + * Amount in the payment currency. + * @type {string} + * @memberof PaymentLine + */ + amount: Decimal | number; + /** + * + * @type {Array} + * @memberof PaymentLine + */ + links?: Array | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentLine + */ + allocatedOnDate?: string; } diff --git a/lending/src/sdk/models/shared/paymentlinelink.ts b/lending/src/sdk/models/shared/paymentlinelink.ts index 73b08b359..c29ddcab7 100644 --- a/lending/src/sdk/models/shared/paymentlinelink.ts +++ b/lending/src/sdk/models/shared/paymentlinelink.ts @@ -1,136 +1,137 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { PaymentLinkType } from './paymentlinktype'; import { - PaymentLinkType, - PaymentLinkType$inboundSchema, - PaymentLinkType$outboundSchema, -} from "./paymentlinktype.js"; + PaymentLinkTypeFromJSON, + PaymentLinkTypeFromJSONTyped, + PaymentLinkTypeToJSON, + PaymentLinkTypeToJSONTyped, +} from './paymentlinktype'; -export type PaymentLineLink = { - /** - * Types of payment line links, either: - * - * @remarks - * `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 - */ - type: PaymentLinkType; - /** - * Unique identifier of the transaction represented by the link. - */ - id?: string | undefined; - /** - * Amount by which the balance of the linked entity is altered, in the currency of the linked entity. - * - * @remarks - * 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. - */ - amount?: Decimal$ | number | null | undefined; - /** - * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - * - * @remarks - * - * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - * - * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - * - * ## Examples with base currency of GBP - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **USD** | $20 | 0.781 | £15.62 | - * | **EUR** | €20 | 0.885 | £17.70 | - * | **RUB** | ₽20 | 0.011 | £0.22 | - * - * ## Examples with base currency of USD - * - * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | - * | :--------------- | :------------- | :------------ | :------------------------- | - * | **GBP** | £20 | 1.277 | $25.54 | - * | **EUR** | €20 | 1.134 | $22.68 | - * | **RUB** | ₽20 | 0.015 | $0.30 | - * - * ### Integration-specific details - * - * | Integration | Scenario | System behavior | - * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| - * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | - */ - currencyRate?: Decimal$ | number | null | undefined; -}; +/** + * + * @export + * @interface PaymentLineLink + */ +export interface PaymentLineLink { + [key: string]: any | any; + /** + * + * @type {PaymentLinkType} + * @memberof PaymentLineLink + */ + type: PaymentLinkType; + /** + * Unique identifier of the transaction represented by the link. + * @type {string} + * @memberof PaymentLineLink + */ + id?: string; + /** + * 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. + * @type {string} + * @memberof PaymentLineLink + */ + amount?: Decimal | number | null; + /** + * 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 software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + * + * For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + * + * ## Examples with base currency of GBP + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **USD** | $20 | 0.781 | £15.62 | + * | **EUR** | €20 | 0.885 | £17.70 | + * | **RUB** | ₽20 | 0.011 | £0.22 | + * + * ## Examples with base currency of USD + * + * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + * | :--------------- | :------------- | :------------ | :------------------------- | + * | **GBP** | £20 | 1.277 | $25.54 | + * | **EUR** | €20 | 1.134 | $22.68 | + * | **RUB** | ₽20 | 0.015 | $0.30 | + * + * + * ### Integration-specific details + * + * | Integration | Scenario | System behavior | + * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + * @type {string} + * @memberof PaymentLineLink + */ + currencyRate?: Decimal | number | null; +} + + + +/** + * Check if a given object implements the PaymentLineLink interface. + */ +export function instanceOfPaymentLineLink(value: object): value is PaymentLineLink { + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} -/** @internal */ -export const PaymentLineLink$inboundSchema: z.ZodType< - PaymentLineLink, - z.ZodTypeDef, - unknown -> = z.object({ - type: PaymentLinkType$inboundSchema, - id: z.string().optional(), - amount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), -}); -/** @internal */ -export type PaymentLineLink$Outbound = { - type: string; - id?: string | undefined; - amount?: number | null | undefined; - currencyRate?: number | null | undefined; -}; +export function PaymentLineLinkFromJSON(json: any): PaymentLineLink { + return PaymentLineLinkFromJSONTyped(json, false); +} -/** @internal */ -export const PaymentLineLink$outboundSchema: z.ZodType< - PaymentLineLink$Outbound, - z.ZodTypeDef, - PaymentLineLink -> = z.object({ - type: PaymentLinkType$outboundSchema, - id: z.string().optional(), - amount: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - currencyRate: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), -}); +export function PaymentLineLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentLineLink { + if (json == null) { + return json; + } + return { + + ...json, + 'type': PaymentLinkTypeFromJSON(json['type']), + 'id': json['id'] == null ? undefined : json['id'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'currencyRate': json['currencyRate'] == null ? undefined : toDecimal(json['currencyRate']), + }; +} -export function paymentLineLinkToJSON( - paymentLineLink: PaymentLineLink, -): string { - return JSON.stringify(PaymentLineLink$outboundSchema.parse(paymentLineLink)); +export function PaymentLineLinkToJSON(json: any): PaymentLineLink { + return PaymentLineLinkToJSONTyped(json, false); } -export function paymentLineLinkFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PaymentLineLink$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PaymentLineLink' from JSON`, - ); + +export function PaymentLineLinkToJSONTyped(value?: PaymentLineLink | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'type': PaymentLinkTypeToJSON(value['type']), + 'id': value['id'], + 'amount': fromDecimal(value['amount']), + 'currencyRate': fromDecimal(value['currencyRate']), + }; } + diff --git a/lending/src/sdk/models/shared/paymentlinktype.ts b/lending/src/sdk/models/shared/paymentlinktype.ts index 9c02c1b47..15acd69db 100644 --- a/lending/src/sdk/models/shared/paymentlinktype.ts +++ b/lending/src/sdk/models/shared/paymentlinktype.ts @@ -1,59 +1,73 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ + +import type { Payment } from './payment'; +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** - * Types of payment line links, either: - * - * @remarks - * `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` + * 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 + * @export */ export const PaymentLinkType = { - Unknown: "Unknown", - Unlinked: "Unlinked", - Invoice: "Invoice", - CreditNote: "CreditNote", - Other: "Other", - Refund: "Refund", - Payment: "Payment", - PaymentOnAccount: "PaymentOnAccount", - ManualJournal: "ManualJournal", - Discount: "Discount", + Unknown: 'Unknown', + Unlinked: 'Unlinked', + Invoice: 'Invoice', + CreditNote: 'CreditNote', + Other: 'Other', + Refund: 'Refund', + Payment: 'Payment', + PaymentOnAccount: 'PaymentOnAccount', + ManualJournal: 'ManualJournal', + Discount: 'Discount' } as const; -/** - * Types of payment line links, either: - * - * @remarks - * `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 - */ -export type PaymentLinkType = ClosedEnum; - -/** @internal */ -export const PaymentLinkType$inboundSchema: z.ZodNativeEnum< - typeof PaymentLinkType -> = z.nativeEnum(PaymentLinkType); -/** @internal */ -export const PaymentLinkType$outboundSchema: z.ZodNativeEnum< - typeof PaymentLinkType -> = PaymentLinkType$inboundSchema; +export type PaymentLinkType = typeof PaymentLinkType[keyof typeof PaymentLinkType]; + + +export function instanceOfPaymentLinkType(value: any): boolean { + for (const key in PaymentLinkType) { + if (Object.prototype.hasOwnProperty.call(PaymentLinkType, key)) { + if (PaymentLinkType[key as keyof typeof PaymentLinkType] === value) { + return true; + } + } + } + return false; +} + +export function PaymentLinkTypeFromJSON(json: any): PaymentLinkType { + return PaymentLinkTypeFromJSONTyped(json, false); +} + +export function PaymentLinkTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentLinkType { + return json as PaymentLinkType; +} + +export function PaymentLinkTypeToJSON(value?: PaymentLinkType | null): any { + return value as any; +} + +export function PaymentLinkTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentLinkType { + return value as PaymentLinkType; +} + diff --git a/lending/src/sdk/models/shared/paymentmethodref.ts b/lending/src/sdk/models/shared/paymentmethodref.ts index 33149fdff..895297bc3 100644 --- a/lending/src/sdk/models/shared/paymentmethodref.ts +++ b/lending/src/sdk/models/shared/paymentmethodref.ts @@ -1,64 +1,554 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +/** + * The payment method the record is linked to in the accounting or commerce software. + * @export + * @interface PaymentMethodRef + */ +export interface PaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} /** - * The Payment Method to which the payment is linked in the accounting software. + * Check if a given object implements the PaymentMethodRef interface. */ -export type PaymentMethodRef = { - /** - * The unique identifier of the location being referenced. - */ - id: string; - /** - * Name of the location being referenced. - */ - name?: string | undefined; -}; - -/** @internal */ -export const PaymentMethodRef$inboundSchema: z.ZodType< - PaymentMethodRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.string().optional(), -}); -/** @internal */ -export type PaymentMethodRef$Outbound = { - id: string; - name?: string | undefined; -}; - -/** @internal */ -export const PaymentMethodRef$outboundSchema: z.ZodType< - PaymentMethodRef$Outbound, - z.ZodTypeDef, - PaymentMethodRef -> = z.object({ - id: z.string(), - name: z.string().optional(), -}); - -export function paymentMethodRefToJSON( - paymentMethodRef: PaymentMethodRef, -): string { - return JSON.stringify( - PaymentMethodRef$outboundSchema.parse(paymentMethodRef), - ); -} -export function paymentMethodRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PaymentMethodRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PaymentMethodRef' from JSON`, - ); +export function instanceOfPaymentMethodRef(value: object): value is PaymentMethodRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function PaymentMethodRefFromJSON(json: any): PaymentMethodRef { + return PaymentMethodRefFromJSONTyped(json, false); +} + +export function PaymentMethodRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentMethodRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PaymentMethodRefToJSON(json: any): PaymentMethodRef { + return PaymentMethodRefToJSONTyped(json, false); +} + +export function PaymentMethodRefToJSONTyped(value?: PaymentMethodRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface AccountingBillPaymentGetResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingBillPaymentGetResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingBillPaymentPaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingBillPaymentPaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingBillPaymentsPaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingBillPaymentsPaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingCreatePaymentResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingCreatePaymentResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingPaymentGetResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingPaymentGetResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingPaymentPaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingPaymentPaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingPaymentsPaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface AccountingPaymentsPaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface CommercePaymentGetResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface CommercePaymentGetResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface CommercePaymentPaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface CommercePaymentPaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface CommercePaymentsPaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface CommercePaymentsPaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface CreatePaymentResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface CreatePaymentResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface GetAccountingBillPaymentResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface GetAccountingBillPaymentResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface GetAccountingPaymentResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface GetAccountingPaymentResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface GetCommercePaymentResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface GetCommercePaymentResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface PaymentCreateResponsePaymentMethodRef { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface PaymentCreateResponsePaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface PaymentMethodRefPaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; +} + +export interface PaymentMethodReference { + /** + * The unique identifier of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + id: string; + /** + * Name of the location being referenced. + * @type {string} + * @memberof PaymentMethodRef + */ + name?: string; } diff --git a/lending/src/sdk/models/shared/paymentref.ts b/lending/src/sdk/models/shared/paymentref.ts index 67a3f157e..d7e3cc5a6 100644 --- a/lending/src/sdk/models/shared/paymentref.ts +++ b/lending/src/sdk/models/shared/paymentref.ts @@ -1,120 +1,569 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { PaymentStatus, PaymentStatus$inboundSchema } from "./paymentstatus.js"; -import { PaymentType, PaymentType$inboundSchema } from "./paymenttype.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { PaymentType } from './paymenttype'; +import { + PaymentTypeFromJSON, + PaymentTypeFromJSONTyped, + PaymentTypeToJSON, + PaymentTypeToJSONTyped, +} from './paymenttype'; +import type { PaymentStatus } from './paymentstatus'; +import { + PaymentStatusFromJSON, + PaymentStatusFromJSONTyped, + PaymentStatusToJSON, + PaymentStatusToJSONTyped, +} from './paymentstatus'; + +/** + * + * @export + * @interface PaymentRef + */ +export interface PaymentRef { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof PaymentRef + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentRef + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof PaymentRef + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof PaymentRef + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity). + * @type {string} + * @memberof PaymentRef + */ + amount?: Decimal | number | null; + /** + * 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. + * @type {string} + * @memberof PaymentRef + */ + currency?: string; + /** + * + * @type {PaymentType} + * @memberof PaymentRef + */ + type?: PaymentType | null; + /** + * + * @type {PaymentStatus} + * @memberof PaymentRef + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof PaymentRef + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentRef + */ + dueDate?: string; +} + + + +/** + * Check if a given object implements the PaymentRef interface. + */ +export function instanceOfPaymentRef(value: object): value is PaymentRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function PaymentRefFromJSON(json: any): PaymentRef { + return PaymentRefFromJSONTyped(json, false); +} + +export function PaymentRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'type': json['type'] == null ? undefined : PaymentTypeFromJSON(json['type']), + 'status': json['status'] == null ? undefined : PaymentStatusFromJSON(json['status']), + 'paymentProvider': json['paymentProvider'] == null ? undefined : json['paymentProvider'], + 'dueDate': json['dueDate'] == null ? undefined : json['dueDate'], + }; +} + +export function PaymentRefToJSON(json: any): PaymentRef { + return PaymentRefToJSONTyped(json, false); +} + +export function PaymentRefToJSONTyped(value?: PaymentRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'createdDate': value['createdDate'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'amount': fromDecimal(value['amount']), + 'currency': value['currency'], + 'type': PaymentTypeToJSON(value['type']), + 'status': PaymentStatusToJSON(value['status']), + 'paymentProvider': value['paymentProvider'], + 'dueDate': value['dueDate'], + }; +} -export type PaymentRef = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Payment Amount (including gratuity). - */ - amount?: Decimal$ | number | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * Type of payment. - */ - type?: PaymentType | null | undefined; - /** - * Status of the payment. - */ - status?: PaymentStatus | undefined; - /** - * Service provider of the payment, if applicable. - */ - paymentProvider?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - dueDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; -}; -/** @internal */ -export const PaymentRef$inboundSchema: z.ZodType< - PaymentRef, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - amount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - currency: z.string().optional(), - type: z.nullable(PaymentType$inboundSchema).optional(), - status: PaymentStatus$inboundSchema.optional(), - paymentProvider: z.string().optional(), - dueDate: z.string().optional(), - createdDate: z.string().optional(), -}); +export interface CommerceOrderGetResponsePaymentRef { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof PaymentRef + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentRef + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof PaymentRef + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof PaymentRef + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity). + * @type {string} + * @memberof PaymentRef + */ + amount?: Decimal | number | null; + /** + * 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. + * @type {string} + * @memberof PaymentRef + */ + currency?: string; + /** + * + * @type {PaymentType} + * @memberof PaymentRef + */ + type?: PaymentType | null; + /** + * + * @type {PaymentStatus} + * @memberof PaymentRef + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof PaymentRef + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentRef + */ + dueDate?: string; +} + +export interface CommerceOrderPaymentRef { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof PaymentRef + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentRef + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof PaymentRef + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof PaymentRef + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity). + * @type {string} + * @memberof PaymentRef + */ + amount?: Decimal | number | null; + /** + * 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. + * @type {string} + * @memberof PaymentRef + */ + currency?: string; + /** + * + * @type {PaymentType} + * @memberof PaymentRef + */ + type?: PaymentType | null; + /** + * + * @type {PaymentStatus} + * @memberof PaymentRef + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof PaymentRef + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentRef + */ + dueDate?: string; +} -export function paymentRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PaymentRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PaymentRef' from JSON`, - ); +export interface GetCommerceOrderResponsePaymentRef { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof PaymentRef + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentRef + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof PaymentRef + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof PaymentRef + */ + sourceModifiedDate?: string; + /** + * Payment Amount (including gratuity). + * @type {string} + * @memberof PaymentRef + */ + amount?: Decimal | number | null; + /** + * 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. + * @type {string} + * @memberof PaymentRef + */ + currency?: string; + /** + * + * @type {PaymentType} + * @memberof PaymentRef + */ + type?: PaymentType | null; + /** + * + * @type {PaymentStatus} + * @memberof PaymentRef + */ + status?: PaymentStatus; + /** + * Service provider of the payment, if applicable. + * @type {string} + * @memberof PaymentRef + */ + paymentProvider?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PaymentRef + */ + dueDate?: string; } diff --git a/lending/src/sdk/models/shared/paymentstatus.ts b/lending/src/sdk/models/shared/paymentstatus.ts index 67a28dea0..040614597 100644 --- a/lending/src/sdk/models/shared/paymentstatus.ts +++ b/lending/src/sdk/models/shared/paymentstatus.ts @@ -1,27 +1,57 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Status of the payment. + * @export */ export const PaymentStatus = { - Pending: "Pending", - Authorized: "Authorized", - Paid: "Paid", - Failed: "Failed", - Cancelled: "Cancelled", - Unknown: "Unknown", + Pending: 'Pending', + Authorized: 'Authorized', + Paid: 'Paid', + Failed: 'Failed', + Cancelled: 'Cancelled', + Unknown: 'Unknown' } as const; -/** - * Status of the payment. - */ -export type PaymentStatus = ClosedEnum; +export type PaymentStatus = typeof PaymentStatus[keyof typeof PaymentStatus]; + + +export function instanceOfPaymentStatus(value: any): boolean { + for (const key in PaymentStatus) { + if (Object.prototype.hasOwnProperty.call(PaymentStatus, key)) { + if (PaymentStatus[key as keyof typeof PaymentStatus] === value) { + return true; + } + } + } + return false; +} + +export function PaymentStatusFromJSON(json: any): PaymentStatus { + return PaymentStatusFromJSONTyped(json, false); +} + +export function PaymentStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentStatus { + return json as PaymentStatus; +} + +export function PaymentStatusToJSON(value?: PaymentStatus | null): any { + return value as any; +} + +export function PaymentStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentStatus { + return value as PaymentStatus; +} -/** @internal */ -export const PaymentStatus$inboundSchema: z.ZodNativeEnum< - typeof PaymentStatus -> = z.nativeEnum(PaymentStatus); diff --git a/lending/src/sdk/models/shared/paymenttype.ts b/lending/src/sdk/models/shared/paymenttype.ts index 5ee478190..ae4b82f42 100644 --- a/lending/src/sdk/models/shared/paymenttype.ts +++ b/lending/src/sdk/models/shared/paymenttype.ts @@ -1,32 +1,63 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Type of payment. + * @export */ export const PaymentType = { - Cash: "Cash", - Card: "Card", - Invoice: "Invoice", - OnlineCard: "OnlineCard", - Swish: "Swish", - Vipps: "Vipps", - Mobile: "Mobile", - StoreCredit: "StoreCredit", - Paypal: "Paypal", - Custom: "Custom", - Prepaid: "Prepaid", - Unknown: "Unknown", + Cash: 'Cash', + Card: 'Card', + Invoice: 'Invoice', + OnlineCard: 'OnlineCard', + Swish: 'Swish', + Vipps: 'Vipps', + Mobile: 'Mobile', + StoreCredit: 'StoreCredit', + Paypal: 'Paypal', + Custom: 'Custom', + Prepaid: 'Prepaid', + Unknown: 'Unknown' } as const; -/** - * Type of payment. - */ -export type PaymentType = ClosedEnum; +export type PaymentType = typeof PaymentType[keyof typeof PaymentType]; + + +export function instanceOfPaymentType(value: any): boolean { + for (const key in PaymentType) { + if (Object.prototype.hasOwnProperty.call(PaymentType, key)) { + if (PaymentType[key as keyof typeof PaymentType] === value) { + return true; + } + } + } + return false; +} + +export function PaymentTypeFromJSON(json: any): PaymentType { + return PaymentTypeFromJSONTyped(json, false); +} + +export function PaymentTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentType { + return json as PaymentType; +} + +export function PaymentTypeToJSON(value?: PaymentType | null): any { + return value as any; +} + +export function PaymentTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentType { + return value as PaymentType; +} -/** @internal */ -export const PaymentType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(PaymentType); diff --git a/lending/src/sdk/models/shared/periodunit.ts b/lending/src/sdk/models/shared/periodunit.ts deleted file mode 100644 index 754bdf539..000000000 --- a/lending/src/sdk/models/shared/periodunit.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -export const PeriodUnit = { - Day: "Day", - Week: "Week", - Month: "Month", - Year: "Year", -} as const; -export type PeriodUnit = ClosedEnum; - -/** @internal */ -export const PeriodUnit$outboundSchema: z.ZodNativeEnum = z - .nativeEnum(PeriodUnit); diff --git a/lending/src/sdk/models/shared/phonenumber.ts b/lending/src/sdk/models/shared/phonenumber.ts index 29cf64055..1786aa75f 100644 --- a/lending/src/sdk/models/shared/phonenumber.ts +++ b/lending/src/sdk/models/shared/phonenumber.ts @@ -1,60 +1,359 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { Type } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface PhoneNumber + */ +export interface PhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + /** - * The type of phone number + * @export */ -export const Type = { - Primary: "Primary", - Landline: "Landline", - Mobile: "Mobile", - Fax: "Fax", - Unknown: "Unknown", +export const PhoneNumberTypeEnum = { + Primary: 'Primary', + Landline: 'Landline', + Mobile: 'Mobile', + Fax: 'Fax', + Unknown: 'Unknown' } as const; +export type PhoneNumberTypeEnum = typeof PhoneNumberTypeEnum[keyof typeof PhoneNumberTypeEnum]; + + /** - * The type of phone number + * Check if a given object implements the PhoneNumber interface. */ -export type Type = ClosedEnum; - -export type PhoneNumber = { - /** - * A phone number. - */ - number?: string | null | undefined; - /** - * The type of phone number - */ - type: Type; -}; - -/** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Type, -); - -/** @internal */ -export const PhoneNumber$inboundSchema: z.ZodType< - PhoneNumber, - z.ZodTypeDef, - unknown -> = z.object({ - number: z.nullable(z.string()).optional(), - type: Type$inboundSchema, -}); - -export function phoneNumberFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PhoneNumber$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PhoneNumber' from JSON`, - ); +export function instanceOfPhoneNumber(value: object): value is PhoneNumber { + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function PhoneNumberFromJSON(json: any): PhoneNumber { + return PhoneNumberFromJSONTyped(json, false); +} + +export function PhoneNumberFromJSONTyped(json: any, ignoreDiscriminator: boolean): PhoneNumber { + if (json == null) { + return json; + } + return { + + 'number': json['number'] == null ? undefined : json['number'], + 'type': json['type'], + }; +} + +export function PhoneNumberToJSON(json: any): PhoneNumber { + return PhoneNumberToJSONTyped(json, false); +} + +export function PhoneNumberToJSONTyped(value?: PhoneNumber | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'number': value['number'], + 'type': value['type'], + }; +} + + +export interface AccountingCompanyInfoPhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface AccountingCompanyInfoPhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface AccountingCompanyInformationPhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface AccountingCompanyInformationPhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface AccountingProfileGetResponsePhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface AccountingProfileGetResponsePhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface CommerceCompanyInfoPhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface CommerceCompanyInfoPhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface CommerceCompanyProfilePhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface CommerceCompanyProfilePhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface CommerceProfileGetResponsePhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface CommerceProfileGetResponsePhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface GetAccountingProfileResponsePhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface GetAccountingProfileResponsePhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface GetCommerceProfileResponsePhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface GetCommerceProfileResponsePhoneNumber { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface Phone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; +} + +export interface PhoneNumberPhone { + /** + * A phone number. + * @type {string} + * @memberof PhoneNumber + */ + number?: string | null; + /** + * The type of phone number + * @type {string} + * @memberof PhoneNumber + */ + type: Type; } diff --git a/lending/src/sdk/models/shared/productinventory.ts b/lending/src/sdk/models/shared/productinventory.ts index d3f8e9b73..c41ae05f5 100644 --- a/lending/src/sdk/models/shared/productinventory.ts +++ b/lending/src/sdk/models/shared/productinventory.ts @@ -1,45 +1,97 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ProductInventoryLocation } from './productinventorylocation'; import { - ProductInventoryLocation, - ProductInventoryLocation$inboundSchema, -} from "./productinventorylocation.js"; + ProductInventoryLocationFromJSON, + ProductInventoryLocationFromJSONTyped, + ProductInventoryLocationToJSON, + ProductInventoryLocationToJSONTyped, +} from './productinventorylocation'; /** * Information about the total inventory as well as the locations inventory is in. + * @export + * @interface ProductInventory + */ +export interface ProductInventory { + /** + * The total quantity of stock remaining across locations. + * @type {string} + * @memberof ProductInventory + */ + totalQuantity?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof ProductInventory + */ + locations?: Array; +} + +/** + * Check if a given object implements the ProductInventory interface. */ -export type ProductInventory = { - /** - * The total quantity of stock remaining across locations. - */ - totalQuantity?: Decimal$ | number | null | undefined; - locations?: Array | undefined; -}; - -/** @internal */ -export const ProductInventory$inboundSchema: z.ZodType< - ProductInventory, - z.ZodTypeDef, - unknown -> = z.object({ - totalQuantity: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - locations: z.array(ProductInventoryLocation$inboundSchema).optional(), -}); - -export function productInventoryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProductInventory$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProductInventory' from JSON`, - ); +export function instanceOfProductInventory(value: object): value is ProductInventory { + return true; +} + +export function ProductInventoryFromJSON(json: any): ProductInventory { + return ProductInventoryFromJSONTyped(json, false); +} + +export function ProductInventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductInventory { + if (json == null) { + return json; + } + return { + + 'totalQuantity': json['totalQuantity'] == null ? undefined : toDecimal(json['totalQuantity']), + 'locations': json['locations'] == null ? undefined : ((json['locations'] as Array).map(ProductInventoryLocationFromJSON)), + }; +} + +export function ProductInventoryToJSON(json: any): ProductInventory { + return ProductInventoryToJSONTyped(json, false); +} + +export function ProductInventoryToJSONTyped(value?: ProductInventory | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'totalQuantity': fromDecimal(value['totalQuantity']), + 'locations': value['locations'] == null ? undefined : ((value['locations'] as Array).map(ProductInventoryLocationToJSON)), + }; +} + + +export interface CommerceProductProductInventory { + /** + * The total quantity of stock remaining across locations. + * @type {string} + * @memberof ProductInventory + */ + totalQuantity?: Decimal | number | null; + /** + * + * @type {Array} + * @memberof ProductInventory + */ + locations?: Array; } diff --git a/lending/src/sdk/models/shared/productinventorylocation.ts b/lending/src/sdk/models/shared/productinventorylocation.ts index 18ed91b2c..162b76c89 100644 --- a/lending/src/sdk/models/shared/productinventorylocation.ts +++ b/lending/src/sdk/models/shared/productinventorylocation.ts @@ -1,41 +1,82 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { LocationRef, LocationRef$inboundSchema } from "./locationref.js"; - -export type ProductInventoryLocation = { - /** - * The quantity of stock remaining at location. - */ - quantity?: Decimal$ | number | undefined; - /** - * Reference to the geographic location where the order was placed. - */ - locationRef?: LocationRef | undefined; -}; - -/** @internal */ -export const ProductInventoryLocation$inboundSchema: z.ZodType< - ProductInventoryLocation, - z.ZodTypeDef, - unknown -> = z.object({ - quantity: z.number().transform(v => new Decimal$(v)).optional(), - locationRef: LocationRef$inboundSchema.optional(), -}); - -export function productInventoryLocationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProductInventoryLocation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProductInventoryLocation' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { LocationRef } from './locationref'; +import { + LocationRefFromJSON, + LocationRefFromJSONTyped, + LocationRefToJSON, + LocationRefToJSONTyped, +} from './locationref'; + +/** + * + * @export + * @interface ProductInventoryLocation + */ +export interface ProductInventoryLocation { + /** + * The quantity of stock remaining at location. + * @type {string} + * @memberof ProductInventoryLocation + */ + quantity?: Decimal | number; + /** + * + * @type {LocationRef} + * @memberof ProductInventoryLocation + */ + locationRef?: LocationRef; +} + +/** + * Check if a given object implements the ProductInventoryLocation interface. + */ +export function instanceOfProductInventoryLocation(value: object): value is ProductInventoryLocation { + return true; +} + +export function ProductInventoryLocationFromJSON(json: any): ProductInventoryLocation { + return ProductInventoryLocationFromJSONTyped(json, false); } + +export function ProductInventoryLocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductInventoryLocation { + if (json == null) { + return json; + } + return { + + 'quantity': json['quantity'] == null ? undefined : toDecimal(json['quantity']), + 'locationRef': json['locationRef'] == null ? undefined : LocationRefFromJSON(json['locationRef']), + }; +} + +export function ProductInventoryLocationToJSON(json: any): ProductInventoryLocation { + return ProductInventoryLocationToJSONTyped(json, false); +} + +export function ProductInventoryLocationToJSONTyped(value?: ProductInventoryLocation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'quantity': fromDecimal(value['quantity']), + 'locationRef': LocationRefToJSON(value['locationRef']), + }; +} + diff --git a/lending/src/sdk/models/shared/productprice.ts b/lending/src/sdk/models/shared/productprice.ts index 9c9ef4b94..e67e0891f 100644 --- a/lending/src/sdk/models/shared/productprice.ts +++ b/lending/src/sdk/models/shared/productprice.ts @@ -1,48 +1,80 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ProductPrice = { - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * The product variant's unit price. - */ - unitPrice?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const ProductPrice$inboundSchema: z.ZodType< - ProductPrice, - z.ZodTypeDef, - unknown -> = z.object({ - currency: z.string().optional(), - unitPrice: z.number().transform(v => new Decimal$(v)).optional(), -}); - -export function productPriceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProductPrice$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProductPrice' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface ProductPrice + */ +export interface ProductPrice { + /** + * 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. + * @type {string} + * @memberof ProductPrice + */ + currency?: string; + /** + * The product variant's unit price. + * @type {string} + * @memberof ProductPrice + */ + unitPrice?: Decimal | number; +} + +/** + * Check if a given object implements the ProductPrice interface. + */ +export function instanceOfProductPrice(value: object): value is ProductPrice { + return true; +} + +export function ProductPriceFromJSON(json: any): ProductPrice { + return ProductPriceFromJSONTyped(json, false); +} + +export function ProductPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductPrice { + if (json == null) { + return json; + } + return { + + 'currency': json['currency'] == null ? undefined : json['currency'], + 'unitPrice': json['unitPrice'] == null ? undefined : toDecimal(json['unitPrice']), + }; +} + +export function ProductPriceToJSON(json: any): ProductPrice { + return ProductPriceToJSONTyped(json, false); } + +export function ProductPriceToJSONTyped(value?: ProductPrice | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'currency': value['currency'], + 'unitPrice': fromDecimal(value['unitPrice']), + }; +} + diff --git a/lending/src/sdk/models/shared/productref.ts b/lending/src/sdk/models/shared/productref.ts index 7cf9435d0..7a079eedb 100644 --- a/lending/src/sdk/models/shared/productref.ts +++ b/lending/src/sdk/models/shared/productref.ts @@ -1,42 +1,89 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Reference that links the line item to the correct product details. + * @export + * @interface ProductRef */ -export type ProductRef = { - /** - * The unique identifier of the product being referenced. - */ - id: string; - /** - * Name of the product being referenced. - */ - name?: string | undefined; -}; - -/** @internal */ -export const ProductRef$inboundSchema: z.ZodType< - ProductRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.string().optional(), -}); - -export function productRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProductRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProductRef' from JSON`, - ); +export interface ProductRef { + /** + * The unique identifier of the product being referenced. + * @type {string} + * @memberof ProductRef + */ + id: string; + /** + * Name of the product being referenced. + * @type {string} + * @memberof ProductRef + */ + name?: string; +} + +/** + * Check if a given object implements the ProductRef interface. + */ +export function instanceOfProductRef(value: object): value is ProductRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function ProductRefFromJSON(json: any): ProductRef { + return ProductRefFromJSONTyped(json, false); +} + +export function ProductRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function ProductRefToJSON(json: any): ProductRef { + return ProductRefToJSONTyped(json, false); +} + +export function ProductRefToJSONTyped(value?: ProductRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface CommerceOrderProductRef { + /** + * The unique identifier of the product being referenced. + * @type {string} + * @memberof ProductRef + */ + id: string; + /** + * Name of the product being referenced. + * @type {string} + * @memberof ProductRef + */ + name?: string; } diff --git a/lending/src/sdk/models/shared/productvariant.ts b/lending/src/sdk/models/shared/productvariant.ts index 47d24c277..f58d8882c 100644 --- a/lending/src/sdk/models/shared/productvariant.ts +++ b/lending/src/sdk/models/shared/productvariant.ts @@ -1,126 +1,585 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ProductInventory } from './productinventory'; +import { + ProductInventoryFromJSON, + ProductInventoryFromJSONTyped, + ProductInventoryToJSON, + ProductInventoryToJSONTyped, +} from './productinventory'; +import type { ProductVariantStatus } from './productvariantstatus'; import { - ProductInventory, - ProductInventory$inboundSchema, -} from "./productinventory.js"; -import { ProductPrice, ProductPrice$inboundSchema } from "./productprice.js"; + ProductVariantStatusFromJSON, + ProductVariantStatusFromJSONTyped, + ProductVariantStatusToJSON, + ProductVariantStatusToJSONTyped, +} from './productvariantstatus'; +import type { ProductPrice } from './productprice'; import { - ProductVariantStatus, - ProductVariantStatus$inboundSchema, -} from "./productvariantstatus.js"; + ProductPriceFromJSON, + ProductPriceFromJSONTyped, + ProductPriceToJSON, + ProductPriceToJSONTyped, +} from './productprice'; /** * Represents a variation of a product available for sale, for example an item of clothing that may be available for sale in multiple sizes and colors. - * - * @remarks + * + * @export + * @interface ProductVariant */ -export type ProductVariant = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - /** - * A unique, persistent identifier for this record - */ - id: string; - /** - * Name of the product recorded in the commerce or point of sale platform. - */ - name?: string | undefined; - /** - * Whether sales taxes are enabled for this product variant. - */ - isTaxEnabled?: boolean | undefined; - /** - * SKU (stock keeping unit) of the variant, as defined by the merchant. - */ - sku?: string | undefined; - /** - * Unique product number of the variant. This might be a barcode, UPC, ISBN, etc. - */ - barcode?: string | undefined; - /** - * Unit of measure for the variant, such as `kg` or `meters`. - */ - unitOfMeasure?: string | undefined; - /** - * VAT rate for the product variant if sales taxes are enabled. - */ - vatPercentage?: Decimal$ | number | undefined; - /** - * Prices for the product variants in different currencies. - */ - prices?: Array | undefined; - /** - * Information about the total inventory as well as the locations inventory is in. - */ - inventory?: ProductInventory | undefined; - /** - * Indicates whether or not the product requires physical delivery. - */ - shippingRequired?: boolean | undefined; - /** - * The status of the product variant. - */ - status?: ProductVariantStatus | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - createdDate?: string | undefined; -}; +export interface ProductVariant { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof ProductVariant + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProductVariant + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof ProductVariant + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof ProductVariant + */ + sourceModifiedDate?: string; + /** + * Name of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof ProductVariant + */ + name?: string; + /** + * Whether sales taxes are enabled for this product variant. + * @type {boolean} + * @memberof ProductVariant + */ + isTaxEnabled?: boolean; + /** + * SKU (stock keeping unit) of the variant, as defined by the merchant. + * @type {string} + * @memberof ProductVariant + */ + sku?: string; + /** + * Unique product number of the variant. This might be a barcode, UPC, ISBN, etc. + * @type {string} + * @memberof ProductVariant + */ + barcode?: string; + /** + * Unit of measure for the variant, such as `kg` or `meters`. + * @type {string} + * @memberof ProductVariant + */ + unitOfMeasure?: string; + /** + * VAT rate for the product variant if sales taxes are enabled. + * @type {string} + * @memberof ProductVariant + */ + vatPercentage?: Decimal | number; + /** + * Prices for the product variants in different currencies. + * @type {Array} + * @memberof ProductVariant + */ + prices?: Array; + /** + * + * @type {ProductInventory} + * @memberof ProductVariant + */ + inventory?: ProductInventory; + /** + * Indicates whether or not the product requires physical delivery. + * @type {boolean} + * @memberof ProductVariant + */ + shippingRequired?: boolean; + /** + * + * @type {ProductVariantStatus} + * @memberof ProductVariant + */ + status?: ProductVariantStatus; +} + -/** @internal */ -export const ProductVariant$inboundSchema: z.ZodType< - ProductVariant, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string(), - name: z.string().optional(), - isTaxEnabled: z.boolean().optional(), - sku: z.string().optional(), - barcode: z.string().optional(), - unitOfMeasure: z.string().optional(), - vatPercentage: z.number().transform(v => new Decimal$(v)).optional(), - prices: z.array(ProductPrice$inboundSchema).optional(), - inventory: ProductInventory$inboundSchema.optional(), - shippingRequired: z.boolean().optional(), - status: ProductVariantStatus$inboundSchema.optional(), - createdDate: z.string().optional(), -}); -export function productVariantFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProductVariant$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProductVariant' from JSON`, - ); +/** + * Check if a given object implements the ProductVariant interface. + */ +export function instanceOfProductVariant(value: object): value is ProductVariant { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function ProductVariantFromJSON(json: any): ProductVariant { + return ProductVariantFromJSONTyped(json, false); +} + +export function ProductVariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductVariant { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'createdDate': json['createdDate'] == null ? undefined : json['createdDate'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'sourceModifiedDate': json['sourceModifiedDate'] == null ? undefined : json['sourceModifiedDate'], + 'name': json['name'] == null ? undefined : json['name'], + 'isTaxEnabled': json['isTaxEnabled'] == null ? undefined : json['isTaxEnabled'], + 'sku': json['sku'] == null ? undefined : json['sku'], + 'barcode': json['barcode'] == null ? undefined : json['barcode'], + 'unitOfMeasure': json['unitOfMeasure'] == null ? undefined : json['unitOfMeasure'], + 'vatPercentage': json['vatPercentage'] == null ? undefined : toDecimal(json['vatPercentage']), + 'prices': json['prices'] == null ? undefined : ((json['prices'] as Array).map(ProductPriceFromJSON)), + 'inventory': json['inventory'] == null ? undefined : ProductInventoryFromJSON(json['inventory']), + 'shippingRequired': json['shippingRequired'] == null ? undefined : json['shippingRequired'], + 'status': json['status'] == null ? undefined : ProductVariantStatusFromJSON(json['status']), + }; +} + +export function ProductVariantToJSON(json: any): ProductVariant { + return ProductVariantToJSONTyped(json, false); +} + +export function ProductVariantToJSONTyped(value?: ProductVariant | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'createdDate': value['createdDate'], + 'modifiedDate': value['modifiedDate'], + 'sourceModifiedDate': value['sourceModifiedDate'], + 'name': value['name'], + 'isTaxEnabled': value['isTaxEnabled'], + 'sku': value['sku'], + 'barcode': value['barcode'], + 'unitOfMeasure': value['unitOfMeasure'], + 'vatPercentage': fromDecimal(value['vatPercentage']), + 'prices': value['prices'] == null ? undefined : ((value['prices'] as Array).map(ProductPriceToJSON)), + 'inventory': ProductInventoryToJSON(value['inventory']), + 'shippingRequired': value['shippingRequired'], + 'status': ProductVariantStatusToJSON(value['status']), + }; +} + + +export interface CommerceProductGetResponseProductVariant { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof ProductVariant + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProductVariant + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof ProductVariant + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof ProductVariant + */ + sourceModifiedDate?: string; + /** + * Name of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof ProductVariant + */ + name?: string; + /** + * Whether sales taxes are enabled for this product variant. + * @type {boolean} + * @memberof ProductVariant + */ + isTaxEnabled?: boolean; + /** + * SKU (stock keeping unit) of the variant, as defined by the merchant. + * @type {string} + * @memberof ProductVariant + */ + sku?: string; + /** + * Unique product number of the variant. This might be a barcode, UPC, ISBN, etc. + * @type {string} + * @memberof ProductVariant + */ + barcode?: string; + /** + * Unit of measure for the variant, such as `kg` or `meters`. + * @type {string} + * @memberof ProductVariant + */ + unitOfMeasure?: string; + /** + * VAT rate for the product variant if sales taxes are enabled. + * @type {string} + * @memberof ProductVariant + */ + vatPercentage?: Decimal | number; + /** + * Prices for the product variants in different currencies. + * @type {Array} + * @memberof ProductVariant + */ + prices?: Array; + /** + * + * @type {ProductInventory} + * @memberof ProductVariant + */ + inventory?: ProductInventory; + /** + * Indicates whether or not the product requires physical delivery. + * @type {boolean} + * @memberof ProductVariant + */ + shippingRequired?: boolean; + /** + * + * @type {ProductVariantStatus} + * @memberof ProductVariant + */ + status?: ProductVariantStatus; +} + +export interface CommerceProductProductVariant { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof ProductVariant + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProductVariant + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof ProductVariant + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof ProductVariant + */ + sourceModifiedDate?: string; + /** + * Name of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof ProductVariant + */ + name?: string; + /** + * Whether sales taxes are enabled for this product variant. + * @type {boolean} + * @memberof ProductVariant + */ + isTaxEnabled?: boolean; + /** + * SKU (stock keeping unit) of the variant, as defined by the merchant. + * @type {string} + * @memberof ProductVariant + */ + sku?: string; + /** + * Unique product number of the variant. This might be a barcode, UPC, ISBN, etc. + * @type {string} + * @memberof ProductVariant + */ + barcode?: string; + /** + * Unit of measure for the variant, such as `kg` or `meters`. + * @type {string} + * @memberof ProductVariant + */ + unitOfMeasure?: string; + /** + * VAT rate for the product variant if sales taxes are enabled. + * @type {string} + * @memberof ProductVariant + */ + vatPercentage?: Decimal | number; + /** + * Prices for the product variants in different currencies. + * @type {Array} + * @memberof ProductVariant + */ + prices?: Array; + /** + * + * @type {ProductInventory} + * @memberof ProductVariant + */ + inventory?: ProductInventory; + /** + * Indicates whether or not the product requires physical delivery. + * @type {boolean} + * @memberof ProductVariant + */ + shippingRequired?: boolean; + /** + * + * @type {ProductVariantStatus} + * @memberof ProductVariant + */ + status?: ProductVariantStatus; +} + +export interface GetCommerceProductResponseProductVariant { + /** + * A unique, persistent identifier for this record + * @type {string} + * @memberof ProductVariant + */ + id: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProductVariant + */ + createdDate?: string; + /** + * The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + * + * Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + * + * This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof ProductVariant + */ + modifiedDate?: string; + /** + * The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + * + * It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + * - Pulling attachments + * - The accounting software does not provide modification dates for a data type + * - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + * - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + * + * In Codat's data model, dates and times are represented using the ISO 8601 standard. + * @type {string} + * @memberof ProductVariant + */ + sourceModifiedDate?: string; + /** + * Name of the product recorded in the commerce or point of sale platform. + * @type {string} + * @memberof ProductVariant + */ + name?: string; + /** + * Whether sales taxes are enabled for this product variant. + * @type {boolean} + * @memberof ProductVariant + */ + isTaxEnabled?: boolean; + /** + * SKU (stock keeping unit) of the variant, as defined by the merchant. + * @type {string} + * @memberof ProductVariant + */ + sku?: string; + /** + * Unique product number of the variant. This might be a barcode, UPC, ISBN, etc. + * @type {string} + * @memberof ProductVariant + */ + barcode?: string; + /** + * Unit of measure for the variant, such as `kg` or `meters`. + * @type {string} + * @memberof ProductVariant + */ + unitOfMeasure?: string; + /** + * VAT rate for the product variant if sales taxes are enabled. + * @type {string} + * @memberof ProductVariant + */ + vatPercentage?: Decimal | number; + /** + * Prices for the product variants in different currencies. + * @type {Array} + * @memberof ProductVariant + */ + prices?: Array; + /** + * + * @type {ProductInventory} + * @memberof ProductVariant + */ + inventory?: ProductInventory; + /** + * Indicates whether or not the product requires physical delivery. + * @type {boolean} + * @memberof ProductVariant + */ + shippingRequired?: boolean; + /** + * + * @type {ProductVariantStatus} + * @memberof ProductVariant + */ + status?: ProductVariantStatus; } diff --git a/lending/src/sdk/models/shared/productvariantref.ts b/lending/src/sdk/models/shared/productvariantref.ts index 0cb2dc04b..f9c26df5e 100644 --- a/lending/src/sdk/models/shared/productvariantref.ts +++ b/lending/src/sdk/models/shared/productvariantref.ts @@ -1,42 +1,89 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Reference that links the line item to the specific version of product that has been ordered. + * @export + * @interface ProductVariantRef */ -export type ProductVariantRef = { - /** - * The unique identifier of the product variant being referenced. - */ - id: string; - /** - * Name of the product variant being referenced. - */ - name?: string | undefined; -}; - -/** @internal */ -export const ProductVariantRef$inboundSchema: z.ZodType< - ProductVariantRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.string().optional(), -}); - -export function productVariantRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProductVariantRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProductVariantRef' from JSON`, - ); +export interface ProductVariantRef { + /** + * The unique identifier of the product variant being referenced. + * @type {string} + * @memberof ProductVariantRef + */ + id: string; + /** + * Name of the product variant being referenced. + * @type {string} + * @memberof ProductVariantRef + */ + name?: string; +} + +/** + * Check if a given object implements the ProductVariantRef interface. + */ +export function instanceOfProductVariantRef(value: object): value is ProductVariantRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function ProductVariantRefFromJSON(json: any): ProductVariantRef { + return ProductVariantRefFromJSONTyped(json, false); +} + +export function ProductVariantRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductVariantRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function ProductVariantRefToJSON(json: any): ProductVariantRef { + return ProductVariantRefToJSONTyped(json, false); +} + +export function ProductVariantRefToJSONTyped(value?: ProductVariantRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface CommerceOrderProductVariantRef { + /** + * The unique identifier of the product variant being referenced. + * @type {string} + * @memberof ProductVariantRef + */ + id: string; + /** + * Name of the product variant being referenced. + * @type {string} + * @memberof ProductVariantRef + */ + name?: string; } diff --git a/lending/src/sdk/models/shared/productvariantstatus.ts b/lending/src/sdk/models/shared/productvariantstatus.ts index 4dbcdb410..0626b2bfc 100644 --- a/lending/src/sdk/models/shared/productvariantstatus.ts +++ b/lending/src/sdk/models/shared/productvariantstatus.ts @@ -1,24 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The status of the product variant. + * @export */ export const ProductVariantStatus = { - Unknown: "Unknown", - Published: "Published", - Unpublished: "Unpublished", + Unknown: 'Unknown', + Published: 'Published', + Unpublished: 'Unpublished' } as const; -/** - * The status of the product variant. - */ -export type ProductVariantStatus = ClosedEnum; +export type ProductVariantStatus = typeof ProductVariantStatus[keyof typeof ProductVariantStatus]; + + +export function instanceOfProductVariantStatus(value: any): boolean { + for (const key in ProductVariantStatus) { + if (Object.prototype.hasOwnProperty.call(ProductVariantStatus, key)) { + if (ProductVariantStatus[key as keyof typeof ProductVariantStatus] === value) { + return true; + } + } + } + return false; +} + +export function ProductVariantStatusFromJSON(json: any): ProductVariantStatus { + return ProductVariantStatusFromJSONTyped(json, false); +} + +export function ProductVariantStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductVariantStatus { + return json as ProductVariantStatus; +} + +export function ProductVariantStatusToJSON(value?: ProductVariantStatus | null): any { + return value as any; +} + +export function ProductVariantStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): ProductVariantStatus { + return value as ProductVariantStatus; +} -/** @internal */ -export const ProductVariantStatus$inboundSchema: z.ZodNativeEnum< - typeof ProductVariantStatus -> = z.nativeEnum(ProductVariantStatus); diff --git a/lending/src/sdk/models/shared/profitandlossreport.ts b/lending/src/sdk/models/shared/profitandlossreport.ts index 721df3798..fc8e8d621 100644 --- a/lending/src/sdk/models/shared/profitandlossreport.ts +++ b/lending/src/sdk/models/shared/profitandlossreport.ts @@ -1,107 +1,515 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { ReportLine, ReportLine$inboundSchema } from "./reportline.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ReportLine } from './reportline'; +import { + ReportLineFromJSON, + ReportLineFromJSONTyped, + ReportLineToJSON, + ReportLineToJSONTyped, +} from './reportline'; -export type ProfitAndLossReport = { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - fromDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - toDate?: string | undefined; - income?: ReportLine | undefined; - costOfSales?: ReportLine | undefined; - /** - * Gross profit of the company in the given date range. - */ - grossProfit: Decimal$ | number; - expenses?: ReportLine | undefined; - /** - * Net operating profit of the company in the given date range. - */ - netOperatingProfit: Decimal$ | number; - otherExpenses?: ReportLine | undefined; - otherIncome?: ReportLine | undefined; - /** - * Net other income of the company in the given date range. - */ - netOtherIncome: Decimal$ | number; - /** - * Net profit of the company in the given date range. - */ - netProfit: Decimal$ | number; -}; +/** + * + * @export + * @interface ProfitAndLossReport + */ +export interface ProfitAndLossReport { + [key: string]: any | any; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProfitAndLossReport + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProfitAndLossReport + */ + toDate?: string; + /** + * ReportLine items for income in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + income?: ReportLine; + /** + * ReportLine items for cost of sales in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + costOfSales?: ReportLine; + /** + * Gross profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + grossProfit: Decimal | number; + /** + * ReportLine items for expenses in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + expenses?: ReportLine; + /** + * Net operating profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netOperatingProfit: Decimal | number; + /** + * ReportLine items for other expenses in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + otherExpenses?: ReportLine; + /** + * ReportLine items for other income in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + otherIncome?: ReportLine; + /** + * Net other income of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netOtherIncome: Decimal | number; + /** + * Net profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netProfit: Decimal | number; +} + +/** + * Check if a given object implements the ProfitAndLossReport interface. + */ +export function instanceOfProfitAndLossReport(value: object): value is ProfitAndLossReport { + if (!('grossProfit' in value) || value['grossProfit'] === undefined) return false; + if (!('netOperatingProfit' in value) || value['netOperatingProfit'] === undefined) return false; + if (!('netOtherIncome' in value) || value['netOtherIncome'] === undefined) return false; + if (!('netProfit' in value) || value['netProfit'] === undefined) return false; + return true; +} + +export function ProfitAndLossReportFromJSON(json: any): ProfitAndLossReport { + return ProfitAndLossReportFromJSONTyped(json, false); +} + +export function ProfitAndLossReportFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProfitAndLossReport { + if (json == null) { + return json; + } + return { + + ...json, + 'fromDate': json['fromDate'] == null ? undefined : json['fromDate'], + 'toDate': json['toDate'] == null ? undefined : json['toDate'], + 'income': json['income'] == null ? undefined : ReportLineFromJSON(json['income']), + 'costOfSales': json['costOfSales'] == null ? undefined : ReportLineFromJSON(json['costOfSales']), + 'grossProfit': json['grossProfit'], + 'expenses': json['expenses'] == null ? undefined : ReportLineFromJSON(json['expenses']), + 'netOperatingProfit': json['netOperatingProfit'], + 'otherExpenses': json['otherExpenses'] == null ? undefined : ReportLineFromJSON(json['otherExpenses']), + 'otherIncome': json['otherIncome'] == null ? undefined : ReportLineFromJSON(json['otherIncome']), + 'netOtherIncome': json['netOtherIncome'], + 'netProfit': json['netProfit'], + }; +} -/** @internal */ -export const ProfitAndLossReport$inboundSchema: z.ZodType< - ProfitAndLossReport, - z.ZodTypeDef, - unknown -> = z.object({ - fromDate: z.string().optional(), - toDate: z.string().optional(), - income: ReportLine$inboundSchema.optional(), - costOfSales: ReportLine$inboundSchema.optional(), - grossProfit: z.number().transform(v => new Decimal$(v)), - expenses: ReportLine$inboundSchema.optional(), - netOperatingProfit: z.number().transform(v => new Decimal$(v)), - otherExpenses: ReportLine$inboundSchema.optional(), - otherIncome: ReportLine$inboundSchema.optional(), - netOtherIncome: z.number().transform(v => new Decimal$(v)), - netProfit: z.number().transform(v => new Decimal$(v)), -}); +export function ProfitAndLossReportToJSON(json: any): ProfitAndLossReport { + return ProfitAndLossReportToJSONTyped(json, false); +} + +export function ProfitAndLossReportToJSONTyped(value?: ProfitAndLossReport | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'fromDate': value['fromDate'], + 'toDate': value['toDate'], + 'income': ReportLineToJSON(value['income']), + 'costOfSales': ReportLineToJSON(value['costOfSales']), + 'grossProfit': fromDecimal(value['grossProfit']), + 'expenses': ReportLineToJSON(value['expenses']), + 'netOperatingProfit': fromDecimal(value['netOperatingProfit']), + 'otherExpenses': ReportLineToJSON(value['otherExpenses']), + 'otherIncome': ReportLineToJSON(value['otherIncome']), + 'netOtherIncome': fromDecimal(value['netOtherIncome']), + 'netProfit': fromDecimal(value['netProfit']), + }; +} + + +export interface AccountingProfitAndLossGetResponseProfitAndLossReport { + [key: string]: any | any; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProfitAndLossReport + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProfitAndLossReport + */ + toDate?: string; + /** + * ReportLine items for income in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + income?: ReportLine; + /** + * ReportLine items for cost of sales in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + costOfSales?: ReportLine; + /** + * Gross profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + grossProfit: Decimal | number; + /** + * ReportLine items for expenses in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + expenses?: ReportLine; + /** + * Net operating profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netOperatingProfit: Decimal | number; + /** + * ReportLine items for other expenses in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + otherExpenses?: ReportLine; + /** + * ReportLine items for other income in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + otherIncome?: ReportLine; + /** + * Net other income of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netOtherIncome: Decimal | number; + /** + * Net profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netProfit: Decimal | number; +} + +export interface AccountingProfitAndLossReportProfitAndLossReport { + [key: string]: any | any; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProfitAndLossReport + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProfitAndLossReport + */ + toDate?: string; + /** + * ReportLine items for income in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + income?: ReportLine; + /** + * ReportLine items for cost of sales in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + costOfSales?: ReportLine; + /** + * Gross profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + grossProfit: Decimal | number; + /** + * ReportLine items for expenses in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + expenses?: ReportLine; + /** + * Net operating profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netOperatingProfit: Decimal | number; + /** + * ReportLine items for other expenses in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + otherExpenses?: ReportLine; + /** + * ReportLine items for other income in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + otherIncome?: ReportLine; + /** + * Net other income of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netOtherIncome: Decimal | number; + /** + * Net profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netProfit: Decimal | number; +} -export function profitAndLossReportFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProfitAndLossReport$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProfitAndLossReport' from JSON`, - ); +export interface GetAccountingProfitAndLossResponseProfitAndLossReport { + [key: string]: any | any; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProfitAndLossReport + */ + fromDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ProfitAndLossReport + */ + toDate?: string; + /** + * ReportLine items for income in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + income?: ReportLine; + /** + * ReportLine items for cost of sales in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + costOfSales?: ReportLine; + /** + * Gross profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + grossProfit: Decimal | number; + /** + * ReportLine items for expenses in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + expenses?: ReportLine; + /** + * Net operating profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netOperatingProfit: Decimal | number; + /** + * ReportLine items for other expenses in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + otherExpenses?: ReportLine; + /** + * ReportLine items for other income in the given date range. + * @type {ReportLine} + * @memberof ProfitAndLossReport + */ + otherIncome?: ReportLine; + /** + * Net other income of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netOtherIncome: Decimal | number; + /** + * Net profit of the company in the given date range. + * @type {string} + * @memberof ProfitAndLossReport + */ + netProfit: Decimal | number; } diff --git a/lending/src/sdk/models/shared/projectref.ts b/lending/src/sdk/models/shared/projectref.ts index b49d68fb5..3d37b0f83 100644 --- a/lending/src/sdk/models/shared/projectref.ts +++ b/lending/src/sdk/models/shared/projectref.ts @@ -1,39 +1,194 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ProjectRef = { - /** - * Unique identifier to the project reference. - */ - id: string; - /** - * The project's name. - */ - name?: string | null | undefined; -}; - -/** @internal */ -export const ProjectRef$inboundSchema: z.ZodType< - ProjectRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); - -export function projectRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProjectRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProjectRef' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface ProjectRef + */ +export interface ProjectRef { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; +} + +/** + * Check if a given object implements the ProjectRef interface. + */ +export function instanceOfProjectRef(value: object): value is ProjectRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function ProjectRefFromJSON(json: any): ProjectRef { + return ProjectRefFromJSONTyped(json, false); +} + +export function ProjectRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function ProjectRefToJSON(json: any): ProjectRef { + return ProjectRefToJSONTyped(json, false); +} + +export function ProjectRefToJSONTyped(value?: ProjectRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + + +export interface AccountingProjectReference { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; +} + +export interface AccountsPayableTrackingAccountingProjectReference { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; +} + +export interface AccountsPayableTrackingProjectRef { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; +} + +export interface AccountsReceivableTrackingAccountingProjectReference { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; +} + +export interface AccountsReceivableTrackingProjectRef { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; +} + +export interface ProjectRefAccountingProjectReference { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; +} + +export interface TrackingAccountingProjectReference { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; +} + +export interface TrackingProjectRef { + /** + * Unique identifier to the project reference. + * @type {string} + * @memberof ProjectRef + */ + id: string; + /** + * The project's name. + * @type {string} + * @memberof ProjectRef + */ + name?: string | null; } diff --git a/lending/src/sdk/models/shared/propertieaccounttype.ts b/lending/src/sdk/models/shared/propertieaccounttype.ts deleted file mode 100644 index f0b6e5f3f..000000000 --- a/lending/src/sdk/models/shared/propertieaccounttype.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -/** - * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. - */ -export const PropertieAccountType = { - Checking: "checking", - Savings: "savings", - Loan: "loan", - CreditCard: "creditCard", - PrepaidCard: "prepaidCard", -} as const; -/** - * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. - */ -export type PropertieAccountType = ClosedEnum; - -/** @internal */ -export const PropertieAccountType$outboundSchema: z.ZodNativeEnum< - typeof PropertieAccountType -> = z.nativeEnum(PropertieAccountType); diff --git a/lending/src/sdk/models/shared/propertiedatatype.ts b/lending/src/sdk/models/shared/propertiedatatype.ts deleted file mode 100644 index a71dac4dd..000000000 --- a/lending/src/sdk/models/shared/propertiedatatype.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -/** - * Available data types - */ -export const PropertieDataType = { - AccountTransactions: "accountTransactions", - BalanceSheet: "balanceSheet", - BankAccounts: "bankAccounts", - BankTransactions: "bankTransactions", - BillCreditNotes: "billCreditNotes", - BillPayments: "billPayments", - Bills: "bills", - CashFlowStatement: "cashFlowStatement", - ChartOfAccounts: "chartOfAccounts", - Company: "company", - CreditNotes: "creditNotes", - Customers: "customers", - DirectCosts: "directCosts", - DirectIncomes: "directIncomes", - Invoices: "invoices", - ItemReceipts: "itemReceipts", - Items: "items", - JournalEntries: "journalEntries", - Journals: "journals", - PaymentMethods: "paymentMethods", - Payments: "payments", - ProfitAndLoss: "profitAndLoss", - PurchaseOrders: "purchaseOrders", - SalesOrders: "salesOrders", - Suppliers: "suppliers", - TaxRates: "taxRates", - TrackingCategories: "trackingCategories", - Transfers: "transfers", - BankingAccountBalances: "banking-accountBalances", - BankingAccounts: "banking-accounts", - BankingTransactionCategories: "banking-transactionCategories", - BankingTransactions: "banking-transactions", - CommerceCompanyInfo: "commerce-companyInfo", - CommerceCustomers: "commerce-customers", - CommerceDisputes: "commerce-disputes", - CommerceLocations: "commerce-locations", - CommerceOrders: "commerce-orders", - CommercePaymentMethods: "commerce-paymentMethods", - CommercePayments: "commerce-payments", - CommerceProductCategories: "commerce-productCategories", - CommerceProducts: "commerce-products", - CommerceTaxComponents: "commerce-taxComponents", - CommerceTransactions: "commerce-transactions", -} as const; -/** - * Available data types - */ -export type PropertieDataType = ClosedEnum; - -/** @internal */ -export const PropertieDataType$inboundSchema: z.ZodNativeEnum< - typeof PropertieDataType -> = z.nativeEnum(PropertieDataType); diff --git a/lending/src/sdk/models/shared/propertieitemref.ts b/lending/src/sdk/models/shared/propertieitemref.ts deleted file mode 100644 index 1925bcfd9..000000000 --- a/lending/src/sdk/models/shared/propertieitemref.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Reference to the item the line is linked to. - */ -export type PropertieItemRef = { - /** - * Unique identifier for the item in the accounting software. - */ - id: string; - /** - * Name of the item in the accounting software. - */ - name?: string | null | undefined; -}; - -/** @internal */ -export const PropertieItemRef$inboundSchema: z.ZodType< - PropertieItemRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); -/** @internal */ -export type PropertieItemRef$Outbound = { - id: string; - name?: string | null | undefined; -}; - -/** @internal */ -export const PropertieItemRef$outboundSchema: z.ZodType< - PropertieItemRef$Outbound, - z.ZodTypeDef, - PropertieItemRef -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); - -export function propertieItemRefToJSON( - propertieItemRef: PropertieItemRef, -): string { - return JSON.stringify( - PropertieItemRef$outboundSchema.parse(propertieItemRef), - ); -} -export function propertieItemRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PropertieItemRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PropertieItemRef' from JSON`, - ); -} diff --git a/lending/src/sdk/models/shared/pulloperation.ts b/lending/src/sdk/models/shared/pulloperation.ts index 393750368..d0abfac68 100644 --- a/lending/src/sdk/models/shared/pulloperation.ts +++ b/lending/src/sdk/models/shared/pulloperation.ts @@ -1,168 +1,1229 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { DatasetStatus } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * The current status of the dataset. + * Information about a queued, in progress or completed pull operation. + * *Formally called `dataset`* + * @export + * @interface PullOperation */ -export const DatasetStatus = { - Initial: "Initial", - Queued: "Queued", - Fetching: "Fetching", - MapQueued: "MapQueued", - Mapping: "Mapping", - Complete: "Complete", - FetchError: "FetchError", - MapError: "MapError", - InternalError: "InternalError", - ProcessingQueued: "ProcessingQueued", - Processing: "Processing", - ProcessingError: "ProcessingError", - ValidationQueued: "ValidationQueued", - Validating: "Validating", - ValidationError: "ValidationError", - AuthError: "AuthError", - Cancelled: "Cancelled", - NotSupported: "NotSupported", - RateLimitError: "RateLimitError", - PermissionsError: "PermissionsError", - PrerequisiteNotMet: "PrerequisiteNotMet", -} as const; +export interface PullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + + /** - * The current status of the dataset. + * @export */ -export type DatasetStatus = ClosedEnum; +export const PullOperationStatusEnum = { + Initial: 'Initial', + Queued: 'Queued', + Fetching: 'Fetching', + MapQueued: 'MapQueued', + Mapping: 'Mapping', + Complete: 'Complete', + FetchError: 'FetchError', + MapError: 'MapError', + InternalError: 'InternalError', + ProcessingQueued: 'ProcessingQueued', + Processing: 'Processing', + ProcessingError: 'ProcessingError', + ValidationQueued: 'ValidationQueued', + Validating: 'Validating', + ValidationError: 'ValidationError', + AuthError: 'AuthError', + Cancelled: 'Cancelled', + NotSupported: 'NotSupported', + RateLimitError: 'RateLimitError', + PermissionsError: 'PermissionsError', + PrerequisiteNotMet: 'PrerequisiteNotMet' +} as const; +export type PullOperationStatusEnum = typeof PullOperationStatusEnum[keyof typeof PullOperationStatusEnum]; + /** - * Information about a queued, in progress or completed pull operation. - * - * @remarks - * *Formally called `dataset`* + * Check if a given object implements the PullOperation interface. */ -export type PullOperation = { - /** - * Unique identifier of the pull operation. - */ - id: string; - /** - * Unique identifier of the company associated to this pull operation. - */ - companyId: string; - /** - * Unique identifier of the connection associated to this pull operation. - */ - connectionId: string; - /** - * The data type you are requesting in a pull operation. - */ - dataType: string; - /** - * The current status of the dataset. - */ - status: DatasetStatus; - /** - * Additional information about the dataset status. - */ - statusDescription?: string | null | undefined; - /** - * A message about a transient or persistent error returned by Codat or the source platform. - */ - errorMessage?: string | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requested: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completed?: string | undefined; - /** - * An integer signifying the progress of the pull operation. - */ - progress: number; - /** - * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. - */ - isCompleted: boolean; - /** - * `True` if the pull operation entered an error state. - */ - isErrored: boolean; -}; - -/** @internal */ -export const DatasetStatus$inboundSchema: z.ZodNativeEnum< - typeof DatasetStatus -> = z.nativeEnum(DatasetStatus); - -/** @internal */ -export const PullOperation$inboundSchema: z.ZodType< - PullOperation, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - companyId: z.string(), - connectionId: z.string(), - dataType: z.string(), - status: DatasetStatus$inboundSchema, - statusDescription: z.nullable(z.string()).optional(), - errorMessage: z.nullable(z.string()).optional(), - requested: z.string(), - completed: z.string().optional(), - progress: z.number().int(), - isCompleted: z.boolean(), - isErrored: z.boolean(), -}); - -export function pullOperationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PullOperation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PullOperation' from JSON`, - ); +export function instanceOfPullOperation(value: object): value is PullOperation { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('connectionId' in value) || value['connectionId'] === undefined) return false; + if (!('dataType' in value) || value['dataType'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('requested' in value) || value['requested'] === undefined) return false; + if (!('progress' in value) || value['progress'] === undefined) return false; + if (!('isCompleted' in value) || value['isCompleted'] === undefined) return false; + if (!('isErrored' in value) || value['isErrored'] === undefined) return false; + return true; +} + +export function PullOperationFromJSON(json: any): PullOperation { + return PullOperationFromJSONTyped(json, false); +} + +export function PullOperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PullOperation { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'companyId': json['companyId'], + 'connectionId': json['connectionId'], + 'dataType': json['dataType'], + 'status': json['status'], + 'statusDescription': json['statusDescription'] == null ? undefined : json['statusDescription'], + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'requested': json['requested'], + 'completed': json['completed'] == null ? undefined : json['completed'], + 'progress': json['progress'], + 'isCompleted': json['isCompleted'], + 'isErrored': json['isErrored'], + }; +} + +export function PullOperationToJSON(json: any): PullOperation { + return PullOperationToJSONTyped(json, false); +} + +export function PullOperationToJSONTyped(value?: PullOperation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'companyId': value['companyId'], + 'connectionId': value['connectionId'], + 'dataType': value['dataType'], + 'status': value['status'], + 'statusDescription': value['statusDescription'], + 'errorMessage': value['errorMessage'], + 'requested': value['requested'], + 'completed': value['completed'], + 'progress': value['progress'], + 'isCompleted': value['isCompleted'], + 'isErrored': value['isErrored'], + }; +} + + +export interface BankStatementUploadSessionStartResponsePullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + +export interface DataTypeRefreshResponsePullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + +export interface GetPullOperationResponsePullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + +export interface ListPullOperationsResponsePullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + +export interface PullOperationGetResponsePullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + +export interface PullOperationsListResponsePullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + +export interface PullOperationsPullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + +export interface RefreshDataTypeResponsePullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; +} + +export interface StartBankStatementUploadSessionResponsePullOperation { + /** + * Unique identifier of the pull operation. + * @type {string} + * @memberof PullOperation + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + * @type {string} + * @memberof PullOperation + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + * @type {string} + * @memberof PullOperation + */ + dataType: string; + /** + * The current status of the dataset. + * @type {string} + * @memberof PullOperation + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + * @type {string} + * @memberof PullOperation + */ + statusDescription?: string | null; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + * @type {string} + * @memberof PullOperation + */ + errorMessage?: string | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + requested: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PullOperation + */ + completed?: string; + /** + * An integer signifying the progress of the pull operation. + * @type {number} + * @memberof PullOperation + */ + progress: number; + /** + * `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. + * @type {boolean} + * @memberof PullOperation + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + * @type {boolean} + * @memberof PullOperation + */ + isErrored: boolean; } diff --git a/lending/src/sdk/models/shared/pulloperations.ts b/lending/src/sdk/models/shared/pulloperations.ts index 475158a00..4673253db 100644 --- a/lending/src/sdk/models/shared/pulloperations.ts +++ b/lending/src/sdk/models/shared/pulloperations.ts @@ -1,55 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { Links, Links$inboundSchema } from "./links.js"; -import { PullOperation, PullOperation$inboundSchema } from "./pulloperation.js"; - -export type PullOperations = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const PullOperations$inboundSchema: z.ZodType< - PullOperations, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(PullOperation$inboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function pullOperationsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PullOperations$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PullOperations' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import type { PullOperation } from './pulloperation'; +import { + PullOperationFromJSON, + PullOperationFromJSONTyped, + PullOperationToJSON, + PullOperationToJSONTyped, +} from './pulloperation'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; + +/** + * + * @export + * @interface PullOperations + */ +export interface PullOperations { + /** + * Current page number. + * @type {number} + * @memberof PullOperations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PullOperations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PullOperations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PullOperations + */ + links: Links; + /** + * + * @type {Array} + * @memberof PullOperations + */ + results?: Array; +} + +/** + * Check if a given object implements the PullOperations interface. + */ +export function instanceOfPullOperations(value: object): value is PullOperations { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function PullOperationsFromJSON(json: any): PullOperations { + return PullOperationsFromJSONTyped(json, false); +} + +export function PullOperationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PullOperations { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(PullOperationFromJSON)), + }; +} + +export function PullOperationsToJSON(json: any): PullOperations { + return PullOperationsToJSONTyped(json, false); +} + +export function PullOperationsToJSONTyped(value?: PullOperations | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(PullOperationToJSON)), + }; +} + + +export interface ListPullOperationsResponsePullOperations { + /** + * Current page number. + * @type {number} + * @memberof PullOperations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PullOperations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PullOperations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PullOperations + */ + links: Links; + /** + * + * @type {Array} + * @memberof PullOperations + */ + results?: Array; +} + +export interface PullOperationsListResponsePullOperations { + /** + * Current page number. + * @type {number} + * @memberof PullOperations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PullOperations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PullOperations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PullOperations + */ + links: Links; + /** + * + * @type {Array} + * @memberof PullOperations + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/purchaseorderreference.ts b/lending/src/sdk/models/shared/purchaseorderreference.ts new file mode 100644 index 000000000..6c6eff491 --- /dev/null +++ b/lending/src/sdk/models/shared/purchaseorderreference.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface PurchaseOrderReference + */ +export interface PurchaseOrderReference { + [key: string]: any | any; + /** + * Identifier for the purchase order, unique for the company in the accounting software. + * @type {string} + * @memberof PurchaseOrderReference + */ + id?: string; + /** + * Friendly reference for the purchase order, commonly generated by the accounting software. + * @type {string} + * @memberof PurchaseOrderReference + */ + purchaseOrderNumber?: string | null; +} + +/** + * Check if a given object implements the PurchaseOrderReference interface. + */ +export function instanceOfPurchaseOrderReference(value: object): value is PurchaseOrderReference { + return true; +} + +export function PurchaseOrderReferenceFromJSON(json: any): PurchaseOrderReference { + return PurchaseOrderReferenceFromJSONTyped(json, false); +} + +export function PurchaseOrderReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PurchaseOrderReference { + if (json == null) { + return json; + } + return { + + ...json, + 'id': json['id'] == null ? undefined : json['id'], + 'purchaseOrderNumber': json['purchaseOrderNumber'] == null ? undefined : json['purchaseOrderNumber'], + }; +} + +export function PurchaseOrderReferenceToJSON(json: any): PurchaseOrderReference { + return PurchaseOrderReferenceToJSONTyped(json, false); +} + +export function PurchaseOrderReferenceToJSONTyped(value?: PurchaseOrderReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'id': value['id'], + 'purchaseOrderNumber': value['purchaseOrderNumber'], + }; +} + + +export interface AccountingBillGetResponsePurchaseOrderReference { + [key: string]: any | any; + /** + * Identifier for the purchase order, unique for the company in the accounting software. + * @type {string} + * @memberof PurchaseOrderReference + */ + id?: string; + /** + * Friendly reference for the purchase order, commonly generated by the accounting software. + * @type {string} + * @memberof PurchaseOrderReference + */ + purchaseOrderNumber?: string | null; +} + +export interface AccountingBillPurchaseOrderReference { + [key: string]: any | any; + /** + * Identifier for the purchase order, unique for the company in the accounting software. + * @type {string} + * @memberof PurchaseOrderReference + */ + id?: string; + /** + * Friendly reference for the purchase order, commonly generated by the accounting software. + * @type {string} + * @memberof PurchaseOrderReference + */ + purchaseOrderNumber?: string | null; +} + +export interface GetAccountingBillResponsePurchaseOrderReference { + [key: string]: any | any; + /** + * Identifier for the purchase order, unique for the company in the accounting software. + * @type {string} + * @memberof PurchaseOrderReference + */ + id?: string; + /** + * Friendly reference for the purchase order, commonly generated by the accounting software. + * @type {string} + * @memberof PurchaseOrderReference + */ + purchaseOrderNumber?: string | null; +} diff --git a/lending/src/sdk/models/shared/pushchangetype.ts b/lending/src/sdk/models/shared/pushchangetype.ts index 42040ea23..f1af77d4f 100644 --- a/lending/src/sdk/models/shared/pushchangetype.ts +++ b/lending/src/sdk/models/shared/pushchangetype.ts @@ -1,26 +1,56 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Type of change being applied to record in third party platform. + * @export */ export const PushChangeType = { - Unknown: "Unknown", - Created: "Created", - Modified: "Modified", - Deleted: "Deleted", - AttachmentUploaded: "AttachmentUploaded", + Unknown: 'Unknown', + Created: 'Created', + Modified: 'Modified', + Deleted: 'Deleted', + AttachmentUploaded: 'AttachmentUploaded' } as const; -/** - * Type of change being applied to record in third party platform. - */ -export type PushChangeType = ClosedEnum; +export type PushChangeType = typeof PushChangeType[keyof typeof PushChangeType]; + + +export function instanceOfPushChangeType(value: any): boolean { + for (const key in PushChangeType) { + if (Object.prototype.hasOwnProperty.call(PushChangeType, key)) { + if (PushChangeType[key as keyof typeof PushChangeType] === value) { + return true; + } + } + } + return false; +} + +export function PushChangeTypeFromJSON(json: any): PushChangeType { + return PushChangeTypeFromJSONTyped(json, false); +} + +export function PushChangeTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushChangeType { + return json as PushChangeType; +} + +export function PushChangeTypeToJSON(value?: PushChangeType | null): any { + return value as any; +} + +export function PushChangeTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): PushChangeType { + return value as PushChangeType; +} -/** @internal */ -export const PushChangeType$inboundSchema: z.ZodNativeEnum< - typeof PushChangeType -> = z.nativeEnum(PushChangeType); diff --git a/lending/src/sdk/models/shared/pushfieldvalidation.ts b/lending/src/sdk/models/shared/pushfieldvalidation.ts index 15fc3a0f5..ad048eb6a 100644 --- a/lending/src/sdk/models/shared/pushfieldvalidation.ts +++ b/lending/src/sdk/models/shared/pushfieldvalidation.ts @@ -1,44 +1,107 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PushFieldValidation = { - /** - * Field name that resulted in the validation issue. - */ - field?: string | undefined; - /** - * Details on the validation issue. - */ - details: string; - /** - * Unique reference identifier for the validation issue. - */ - ref?: string | null | undefined; -}; - -/** @internal */ -export const PushFieldValidation$inboundSchema: z.ZodType< - PushFieldValidation, - z.ZodTypeDef, - unknown -> = z.object({ - field: z.string().optional(), - details: z.string(), - ref: z.nullable(z.string()).optional(), -}); - -export function pushFieldValidationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushFieldValidation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushFieldValidation' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface PushFieldValidation + */ +export interface PushFieldValidation { + [key: string]: any | any; + /** + * Field name that resulted in the validation issue. + * @type {string} + * @memberof PushFieldValidation + */ + field?: string; + /** + * Details on the validation issue. + * @type {string} + * @memberof PushFieldValidation + */ + details: string; + /** + * Unique reference identifier for the validation issue. + * @type {string} + * @memberof PushFieldValidation + */ + ref?: string | null; +} + +/** + * Check if a given object implements the PushFieldValidation interface. + */ +export function instanceOfPushFieldValidation(value: object): value is PushFieldValidation { + if (!('details' in value) || value['details'] === undefined) return false; + return true; +} + +export function PushFieldValidationFromJSON(json: any): PushFieldValidation { + return PushFieldValidationFromJSONTyped(json, false); +} + +export function PushFieldValidationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushFieldValidation { + if (json == null) { + return json; + } + return { + + ...json, + 'field': json['field'] == null ? undefined : json['field'], + 'details': json['details'], + 'ref': json['ref'] == null ? undefined : json['ref'], + }; +} + +export function PushFieldValidationToJSON(json: any): PushFieldValidation { + return PushFieldValidationToJSONTyped(json, false); +} + +export function PushFieldValidationToJSONTyped(value?: PushFieldValidation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'field': value['field'], + 'details': value['details'], + 'ref': value['ref'], + }; +} + + +export interface PushOptionPushFieldValidation { + [key: string]: any | any; + /** + * Field name that resulted in the validation issue. + * @type {string} + * @memberof PushFieldValidation + */ + field?: string; + /** + * Details on the validation issue. + * @type {string} + * @memberof PushFieldValidation + */ + details: string; + /** + * Unique reference identifier for the validation issue. + * @type {string} + * @memberof PushFieldValidation + */ + ref?: string | null; } diff --git a/lending/src/sdk/models/shared/pushoperation.ts b/lending/src/sdk/models/shared/pushoperation.ts index b9563094c..145b31e80 100644 --- a/lending/src/sdk/models/shared/pushoperation.ts +++ b/lending/src/sdk/models/shared/pushoperation.ts @@ -1,145 +1,3483 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +import type { Validation } from './validation'; import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; + ValidationFromJSON, + ValidationFromJSONTyped, + ValidationToJSON, + ValidationToJSONTyped, +} from './validation'; +import type { PushOperationStatus } from './pushoperationstatus'; import { - PushOperationChange, - PushOperationChange$inboundSchema, -} from "./pushoperationchange.js"; + PushOperationStatusFromJSON, + PushOperationStatusFromJSONTyped, + PushOperationStatusToJSON, + PushOperationStatusToJSONTyped, +} from './pushoperationstatus'; +import type { PushOperationChange } from './pushoperationchange'; import { - PushOperationStatus, - PushOperationStatus$inboundSchema, -} from "./pushoperationstatus.js"; -import { Validation, Validation$inboundSchema } from "./validation.js"; - -export type PushOperation = { - /** - * Contains a single entry that communicates which record has changed and the manner in which it changed. - */ - changes?: Array | null | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId: string; - /** - * 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. - */ - pushOperationKey: string; - /** - * Unique identifier for a company's data connection. - */ - dataConnectionKey: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedOnUtc: string; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - completedOnUtc?: string | undefined; - /** - * Number of minutes the push operation must complete within before it times out. - */ - timeoutInMinutes?: number | null | undefined; - /** - * Number of seconds the push operation must complete within before it times out. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - timeoutInSeconds?: number | null | undefined; - /** - * The current status of the push operation. - */ - status: PushOperationStatus; - /** - * A message about the error. - */ - errorMessage?: string | null | undefined; - /** - * 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. - */ - validation?: Validation | undefined; - /** - * Push status code. - */ - statusCode: number; -}; - -/** @internal */ -export const PushOperation$inboundSchema: z.ZodType< - PushOperation, - z.ZodTypeDef, - unknown -> = z.object({ - changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), - dataType: PropertieDataType$inboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$inboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$inboundSchema.optional(), - statusCode: z.number().int(), -}); - -export function pushOperationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushOperation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushOperation' from JSON`, - ); + PushOperationChangeFromJSON, + PushOperationChangeFromJSONTyped, + PushOperationChangeToJSON, + PushOperationChangeToJSONTyped, +} from './pushoperationchange'; + +/** + * + * @export + * @interface PushOperation + */ +export interface PushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + + +/** + * @export + */ +export const PushOperationDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type PushOperationDataTypeEnum = typeof PushOperationDataTypeEnum[keyof typeof PushOperationDataTypeEnum]; + + +/** + * Check if a given object implements the PushOperation interface. + */ +export function instanceOfPushOperation(value: object): value is PushOperation { + if (!('companyId' in value) || value['companyId'] === undefined) return false; + if (!('pushOperationKey' in value) || value['pushOperationKey'] === undefined) return false; + if (!('dataConnectionKey' in value) || value['dataConnectionKey'] === undefined) return false; + if (!('requestedOnUtc' in value) || value['requestedOnUtc'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('statusCode' in value) || value['statusCode'] === undefined) return false; + return true; +} + +export function PushOperationFromJSON(json: any): PushOperation { + return PushOperationFromJSONTyped(json, false); +} + +export function PushOperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOperation { + if (json == null) { + return json; + } + return { + + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(PushOperationChangeFromJSON)), + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'companyId': json['companyId'], + 'pushOperationKey': json['pushOperationKey'], + 'dataConnectionKey': json['dataConnectionKey'], + 'requestedOnUtc': json['requestedOnUtc'], + 'completedOnUtc': json['completedOnUtc'] == null ? undefined : json['completedOnUtc'], + 'timeoutInMinutes': json['timeoutInMinutes'] == null ? undefined : json['timeoutInMinutes'], + 'timeoutInSeconds': json['timeoutInSeconds'] == null ? undefined : json['timeoutInSeconds'], + 'status': PushOperationStatusFromJSON(json['status']), + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + 'validation': json['validation'] == null ? undefined : ValidationFromJSON(json['validation']), + 'statusCode': json['statusCode'], + }; +} + +export function PushOperationToJSON(json: any): PushOperation { + return PushOperationToJSONTyped(json, false); +} + +export function PushOperationToJSONTyped(value?: PushOperation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(PushOperationChangeToJSON)), + 'dataType': value['dataType'], + 'companyId': value['companyId'], + 'pushOperationKey': value['pushOperationKey'], + 'dataConnectionKey': value['dataConnectionKey'], + 'requestedOnUtc': value['requestedOnUtc'], + 'completedOnUtc': value['completedOnUtc'], + 'timeoutInMinutes': value['timeoutInMinutes'], + 'timeoutInSeconds': value['timeoutInSeconds'], + 'status': PushOperationStatusToJSON(value['status']), + 'errorMessage': value['errorMessage'], + 'validation': ValidationToJSON(value['validation']), + 'statusCode': value['statusCode'], + }; +} + + +export interface AccountCreateResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface AccountingCreateAccountResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface AccountingCreateBankAccountResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface AccountingCreateBankTransactionsResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface AccountingCreateDirectCostResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface AccountingCreatePaymentResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface AccountingCreateSupplierResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface AccountingCreateTransferResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface AccountingCreateUpdateBankTransactionResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface BankAccountCreateResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface BankTransactionsCreateResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreateAccountResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreateBankAccountResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreateBankTransactionsResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreateDirectCostResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreateOperationGetResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreateOperationsListResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreatePaymentResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreateSupplierResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface CreateTransferResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface DirectCostCreateResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface GetCreateOperationResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface ListCreateOperationsResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface PaymentCreateResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface PushOperationsPushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface SupplierCreateResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; +} + +export interface TransferCreateResponsePushOperation { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + * @type {Array} + * @memberof PushOperation + */ + changes?: Array | null; + /** + * Available data types + * @type {string} + * @memberof PushOperation + */ + dataType?: PropertieDataType; + /** + * Unique identifier for your SMB in Codat. + * @type {string} + * @memberof PushOperation + */ + companyId: string; + /** + * 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. + * @type {string} + * @memberof PushOperation + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + * @type {string} + * @memberof PushOperation + */ + dataConnectionKey: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + requestedOnUtc: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof PushOperation + */ + completedOnUtc?: string; + /** + * Number of minutes the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + */ + timeoutInMinutes?: number | null; + /** + * Number of seconds the push operation must complete within before it times out. + * @type {number} + * @memberof PushOperation + * @deprecated + */ + timeoutInSeconds?: number | null; + /** + * + * @type {PushOperationStatus} + * @memberof PushOperation + */ + status: PushOperationStatus; + /** + * A message about the error. + * @type {string} + * @memberof PushOperation + */ + errorMessage?: string | null; + /** + * + * @type {Validation} + * @memberof PushOperation + */ + validation?: Validation; + /** + * Push status code. + * @type {number} + * @memberof PushOperation + */ + statusCode: number; } diff --git a/lending/src/sdk/models/shared/pushoperationchange.ts b/lending/src/sdk/models/shared/pushoperationchange.ts index 5d771700a..240e6e00b 100644 --- a/lending/src/sdk/models/shared/pushoperationchange.ts +++ b/lending/src/sdk/models/shared/pushoperationchange.ts @@ -1,49 +1,623 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { PushChangeType } from './pushchangetype'; import { - PushChangeType, - PushChangeType$inboundSchema, -} from "./pushchangetype.js"; + PushChangeTypeFromJSON, + PushChangeTypeFromJSONTyped, + PushChangeTypeToJSON, + PushChangeTypeToJSONTyped, +} from './pushchangetype'; +import type { PushOperationRef } from './pushoperationref'; import { - PushOperationRef, - PushOperationRef$inboundSchema, -} from "./pushoperationref.js"; - -export type PushOperationChange = { - /** - * Type of change being applied to record in third party platform. - */ - type?: PushChangeType | undefined; - recordRef?: PushOperationRef | undefined; - /** - * Unique identifier for the attachment created otherwise null. - */ - attachmentId?: string | null | undefined; -}; - -/** @internal */ -export const PushOperationChange$inboundSchema: z.ZodType< - PushOperationChange, - z.ZodTypeDef, - unknown -> = z.object({ - type: PushChangeType$inboundSchema.optional(), - recordRef: PushOperationRef$inboundSchema.optional(), - attachmentId: z.nullable(z.string()).optional(), -}); - -export function pushOperationChangeFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushOperationChange$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushOperationChange' from JSON`, - ); + PushOperationRefFromJSON, + PushOperationRefFromJSONTyped, + PushOperationRefToJSON, + PushOperationRefToJSONTyped, +} from './pushoperationref'; + +/** + * + * @export + * @interface PushOperationChange + */ +export interface PushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + + + +/** + * Check if a given object implements the PushOperationChange interface. + */ +export function instanceOfPushOperationChange(value: object): value is PushOperationChange { + return true; +} + +export function PushOperationChangeFromJSON(json: any): PushOperationChange { + return PushOperationChangeFromJSONTyped(json, false); +} + +export function PushOperationChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOperationChange { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : PushChangeTypeFromJSON(json['type']), + 'recordRef': json['recordRef'] == null ? undefined : PushOperationRefFromJSON(json['recordRef']), + 'attachmentId': json['attachmentId'] == null ? undefined : json['attachmentId'], + }; +} + +export function PushOperationChangeToJSON(json: any): PushOperationChange { + return PushOperationChangeToJSONTyped(json, false); +} + +export function PushOperationChangeToJSONTyped(value?: PushOperationChange | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': PushChangeTypeToJSON(value['type']), + 'recordRef': PushOperationRefToJSON(value['recordRef']), + 'attachmentId': value['attachmentId'], + }; +} + + +export interface AccountCreateResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface AccountingCreateAccountResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface AccountingCreateBankAccountResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface AccountingCreateBankTransactionsResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface AccountingCreateDirectCostResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface AccountingCreatePaymentResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface AccountingCreateSupplierResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface AccountingCreateTransferResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface AccountingCreateUpdateBankTransactionResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface BankAccountCreateResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface BankTransactionsCreateResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface CreateAccountResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface CreateBankAccountResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface CreateBankTransactionsResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface CreateDirectCostResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface CreateOperationGetResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface CreatePaymentResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface CreateSupplierResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface CreateTransferResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface DirectCostCreateResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface GetCreateOperationResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface PaymentCreateResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface PushOperationPushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface SupplierCreateResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; +} + +export interface TransferCreateResponsePushOperationChange { + /** + * + * @type {PushChangeType} + * @memberof PushOperationChange + */ + type?: PushChangeType; + /** + * + * @type {PushOperationRef} + * @memberof PushOperationChange + */ + recordRef?: PushOperationRef; + /** + * Unique identifier for the attachment created otherwise null. + * @type {string} + * @memberof PushOperationChange + */ + attachmentId?: string | null; } diff --git a/lending/src/sdk/models/shared/pushoperationref.ts b/lending/src/sdk/models/shared/pushoperationref.ts index 59aa76101..29611cbc1 100644 --- a/lending/src/sdk/models/shared/pushoperationref.ts +++ b/lending/src/sdk/models/shared/pushoperationref.ts @@ -1,43 +1,291 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - PropertieDataType, - PropertieDataType$inboundSchema, -} from "./propertiedatatype.js"; - -export type PushOperationRef = { - /** - * Unique identifier for a push operation. - */ - id?: string | undefined; - /** - * Available data types - */ - dataType?: PropertieDataType | undefined; -}; - -/** @internal */ -export const PushOperationRef$inboundSchema: z.ZodType< - PushOperationRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: PropertieDataType$inboundSchema.optional(), -}); - -export function pushOperationRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushOperationRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushOperationRef' from JSON`, - ); +import type { PropertieDataType } from '../_speakeasy_enums'; +import type { BalanceSheet } from './balancesheet'; +import type { BankingAccountBalances } from './bankingaccountbalances'; +import type { BankingAccounts } from './bankingaccounts'; +import type { BankingTransactionCategories } from './bankingtransactioncategories'; +import type { BankingTransactions } from './bankingtransactions'; +import type { CashFlowStatement } from './cashflowstatement'; +import type { CommerceCompanyInfo } from './commercecompanyinfo'; +import type { CommerceCustomers } from './commercecustomers'; +import type { CommerceDisputes } from './commercedisputes'; +import type { CommerceLocations } from './commercelocations'; +import type { CommerceOrders } from './commerceorders'; +import type { CommercePaymentMethods } from './commercepaymentmethods'; +import type { CommercePayments } from './commercepayments'; +import type { CommerceProductCategories } from './commerceproductcategories'; +import type { CommerceProducts } from './commerceproducts'; +import type { CommerceTransactions } from './commercetransactions'; +import type { Company } from './company'; +import type { Items } from './items'; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface PushOperationRef + */ +export interface PushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + + +/** + * @export + */ +export const PushOperationRefDataTypeEnum = { + AccountTransactions: 'accountTransactions', + BalanceSheet: 'balanceSheet', + BankAccounts: 'bankAccounts', + BankTransactions: 'bankTransactions', + BillCreditNotes: 'billCreditNotes', + BillPayments: 'billPayments', + Bills: 'bills', + CashFlowStatement: 'cashFlowStatement', + ChartOfAccounts: 'chartOfAccounts', + Company: 'company', + CreditNotes: 'creditNotes', + Customers: 'customers', + DirectCosts: 'directCosts', + DirectIncomes: 'directIncomes', + Invoices: 'invoices', + ItemReceipts: 'itemReceipts', + Items: 'items', + JournalEntries: 'journalEntries', + Journals: 'journals', + PaymentMethods: 'paymentMethods', + Payments: 'payments', + ProfitAndLoss: 'profitAndLoss', + PurchaseOrders: 'purchaseOrders', + SalesOrders: 'salesOrders', + Suppliers: 'suppliers', + TaxRates: 'taxRates', + TrackingCategories: 'trackingCategories', + Transfers: 'transfers', + BankingAccountBalances: 'banking-accountBalances', + BankingAccounts: 'banking-accounts', + BankingTransactionCategories: 'banking-transactionCategories', + BankingTransactions: 'banking-transactions', + CommerceCompanyInfo: 'commerce-companyInfo', + CommerceCustomers: 'commerce-customers', + CommerceDisputes: 'commerce-disputes', + CommerceLocations: 'commerce-locations', + CommerceOrders: 'commerce-orders', + CommercePaymentMethods: 'commerce-paymentMethods', + CommercePayments: 'commerce-payments', + CommerceProductCategories: 'commerce-productCategories', + CommerceProducts: 'commerce-products', + CommerceTaxComponents: 'commerce-taxComponents', + CommerceTransactions: 'commerce-transactions' +} as const; +export type PushOperationRefDataTypeEnum = typeof PushOperationRefDataTypeEnum[keyof typeof PushOperationRefDataTypeEnum]; + + +/** + * Check if a given object implements the PushOperationRef interface. + */ +export function instanceOfPushOperationRef(value: object): value is PushOperationRef { + return true; +} + +export function PushOperationRefFromJSON(json: any): PushOperationRef { + return PushOperationRefFromJSONTyped(json, false); +} + +export function PushOperationRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOperationRef { + if (json == null) { + return json; + } + return { + + ...json, + 'id': json['id'] == null ? undefined : json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} + +export function PushOperationRefToJSON(json: any): PushOperationRef { + return PushOperationRefToJSONTyped(json, false); +} + +export function PushOperationRefToJSONTyped(value?: PushOperationRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'id': value['id'], + 'dataType': value['dataType'], + }; +} + + +export interface AccountingCreateAccountResponsePushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + +export interface AccountingCreateBankAccountResponsePushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + +export interface AccountingCreateBankTransactionsResponsePushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + +export interface AccountingCreateDirectCostResponsePushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + +export interface AccountingCreatePaymentResponsePushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + +export interface AccountingCreateSupplierResponsePushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + +export interface AccountingCreateTransferResponsePushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + +export interface AccountingCreateUpdateBankTransactionResponsePushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; +} + +export interface PushOperationPushOperationRef { + [key: string]: any | any; + /** + * Unique identifier for a push operation. + * @type {string} + * @memberof PushOperationRef + */ + id?: string; + /** + * Available data types + * @type {string} + * @memberof PushOperationRef + */ + dataType?: PropertieDataType; } diff --git a/lending/src/sdk/models/shared/pushoperations.ts b/lending/src/sdk/models/shared/pushoperations.ts index 35c08c726..b7c82c3a0 100644 --- a/lending/src/sdk/models/shared/pushoperations.ts +++ b/lending/src/sdk/models/shared/pushoperations.ts @@ -1,55 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { Links, Links$inboundSchema } from "./links.js"; -import { PushOperation, PushOperation$inboundSchema } from "./pushoperation.js"; - -export type PushOperations = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const PushOperations$inboundSchema: z.ZodType< - PushOperations, - z.ZodTypeDef, - unknown -> = z.object({ - results: z.array(PushOperation$inboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_links": "links", - }); -}); - -export function pushOperationsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushOperations$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushOperations' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; +import { + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { PushOperation } from './pushoperation'; +import { + PushOperationFromJSON, + PushOperationFromJSONTyped, + PushOperationToJSON, + PushOperationToJSONTyped, +} from './pushoperation'; + +/** + * + * @export + * @interface PushOperations + */ +export interface PushOperations { + /** + * Current page number. + * @type {number} + * @memberof PushOperations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PushOperations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PushOperations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PushOperations + */ + links: Links; + /** + * + * @type {Array} + * @memberof PushOperations + */ + results?: Array; +} + +/** + * Check if a given object implements the PushOperations interface. + */ +export function instanceOfPushOperations(value: object): value is PushOperations { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function PushOperationsFromJSON(json: any): PushOperations { + return PushOperationsFromJSONTyped(json, false); +} + +export function PushOperationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOperations { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(PushOperationFromJSON)), + }; +} + +export function PushOperationsToJSON(json: any): PushOperations { + return PushOperationsToJSONTyped(json, false); +} + +export function PushOperationsToJSONTyped(value?: PushOperations | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(PushOperationToJSON)), + }; +} + + +export interface CreateOperationsListResponsePushOperations { + /** + * Current page number. + * @type {number} + * @memberof PushOperations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PushOperations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PushOperations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PushOperations + */ + links: Links; + /** + * + * @type {Array} + * @memberof PushOperations + */ + results?: Array; +} + +export interface ListCreateOperationsResponsePushOperations { + /** + * Current page number. + * @type {number} + * @memberof PushOperations + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof PushOperations + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof PushOperations + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof PushOperations + */ + links: Links; + /** + * + * @type {Array} + * @memberof PushOperations + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/pushoperationstatus.ts b/lending/src/sdk/models/shared/pushoperationstatus.ts index 133e3b65f..d151a1ba4 100644 --- a/lending/src/sdk/models/shared/pushoperationstatus.ts +++ b/lending/src/sdk/models/shared/pushoperationstatus.ts @@ -1,25 +1,55 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The current status of the push operation. + * @export */ export const PushOperationStatus = { - Pending: "Pending", - Failed: "Failed", - Success: "Success", - TimedOut: "TimedOut", + Pending: 'Pending', + Failed: 'Failed', + Success: 'Success', + TimedOut: 'TimedOut' } as const; -/** - * The current status of the push operation. - */ -export type PushOperationStatus = ClosedEnum; +export type PushOperationStatus = typeof PushOperationStatus[keyof typeof PushOperationStatus]; + + +export function instanceOfPushOperationStatus(value: any): boolean { + for (const key in PushOperationStatus) { + if (Object.prototype.hasOwnProperty.call(PushOperationStatus, key)) { + if (PushOperationStatus[key as keyof typeof PushOperationStatus] === value) { + return true; + } + } + } + return false; +} + +export function PushOperationStatusFromJSON(json: any): PushOperationStatus { + return PushOperationStatusFromJSONTyped(json, false); +} + +export function PushOperationStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOperationStatus { + return json as PushOperationStatus; +} + +export function PushOperationStatusToJSON(value?: PushOperationStatus | null): any { + return value as any; +} + +export function PushOperationStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): PushOperationStatus { + return value as PushOperationStatus; +} -/** @internal */ -export const PushOperationStatus$inboundSchema: z.ZodNativeEnum< - typeof PushOperationStatus -> = z.nativeEnum(PushOperationStatus); diff --git a/lending/src/sdk/models/shared/pushoption.ts b/lending/src/sdk/models/shared/pushoption.ts index af6a0a0a3..efc5d879d 100644 --- a/lending/src/sdk/models/shared/pushoption.ts +++ b/lending/src/sdk/models/shared/pushoption.ts @@ -1,71 +1,777 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { PushOptionType } from './pushoptiontype'; import { - PushOptionChoice, - PushOptionChoice$inboundSchema, -} from "./pushoptionchoice.js"; + PushOptionTypeFromJSON, + PushOptionTypeFromJSONTyped, + PushOptionTypeToJSON, + PushOptionTypeToJSONTyped, +} from './pushoptiontype'; +import type { PushOptionChoice } from './pushoptionchoice'; import { - PushOptionProperty, - PushOptionProperty$inboundSchema, -} from "./pushoptionproperty.js"; + PushOptionChoiceFromJSON, + PushOptionChoiceFromJSONTyped, + PushOptionChoiceToJSON, + PushOptionChoiceToJSONTyped, +} from './pushoptionchoice'; +import type { PushValidationInfo } from './pushvalidationinfo'; import { - PushOptionType, - PushOptionType$inboundSchema, -} from "./pushoptiontype.js"; + PushValidationInfoFromJSON, + PushValidationInfoFromJSONTyped, + PushValidationInfoToJSON, + PushValidationInfoToJSONTyped, +} from './pushvalidationinfo'; +import type { PushOptionProperty } from './pushoptionproperty'; import { - PushValidationInfo, - PushValidationInfo$inboundSchema, -} from "./pushvalidationinfo.js"; - -export type PushOption = { - /** - * The option type. - */ - type: PushOptionType; - /** - * The property's display name. - */ - displayName: string; - /** - * A description of the property. - */ - description?: string | undefined; - /** - * The property is required if `True`. - */ - required: boolean; - properties?: { [k: string]: PushOptionProperty } | null | undefined; - options?: Array | null | undefined; - validation?: PushValidationInfo | undefined; -}; - -/** @internal */ -export const PushOption$inboundSchema: z.ZodType< - PushOption, - z.ZodTypeDef, - unknown -> = z.object({ - type: PushOptionType$inboundSchema, - displayName: z.string(), - description: z.string().optional(), - required: z.boolean(), - properties: z.nullable(z.record(PushOptionProperty$inboundSchema)).optional(), - options: z.nullable(z.array(PushOptionChoice$inboundSchema)).optional(), - validation: PushValidationInfo$inboundSchema.optional(), -}); - -export function pushOptionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushOption$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushOption' from JSON`, - ); + PushOptionPropertyFromJSON, + PushOptionPropertyFromJSONTyped, + PushOptionPropertyToJSON, + PushOptionPropertyToJSONTyped, +} from './pushoptionproperty'; + +/** + * + * @export + * @interface PushOption + */ +export interface PushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + + + +/** + * Check if a given object implements the PushOption interface. + */ +export function instanceOfPushOption(value: object): value is PushOption { + if (!('type' in value) || value['type'] === undefined) return false; + if (!('displayName' in value) || value['displayName'] === undefined) return false; + if (!('required' in value) || value['required'] === undefined) return false; + return true; +} + +export function PushOptionFromJSON(json: any): PushOption { + return PushOptionFromJSONTyped(json, false); +} + +export function PushOptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOption { + if (json == null) { + return json; + } + return { + + 'type': PushOptionTypeFromJSON(json['type']), + 'displayName': json['displayName'], + 'description': json['description'] == null ? undefined : json['description'], + 'required': json['required'], + 'properties': json['properties'] == null ? undefined : (mapValues(json['properties'], PushOptionPropertyFromJSON)), + 'options': json['options'] == null ? undefined : ((json['options'] as Array).map(PushOptionChoiceFromJSON)), + 'validation': json['validation'] == null ? undefined : PushValidationInfoFromJSON(json['validation']), + }; +} + +export function PushOptionToJSON(json: any): PushOption { + return PushOptionToJSONTyped(json, false); +} + +export function PushOptionToJSONTyped(value?: PushOption | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': PushOptionTypeToJSON(value['type']), + 'displayName': value['displayName'], + 'description': value['description'], + 'required': value['required'], + 'properties': value['properties'] == null ? undefined : (mapValues(value['properties'], PushOptionPropertyToJSON)), + 'options': value['options'] == null ? undefined : ((value['options'] as Array).map(PushOptionChoiceToJSON)), + 'validation': PushValidationInfoToJSON(value['validation']), + }; +} + + +export interface CreateBankTransactionsModelGetResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface CreateChartOfAccountsModelGetResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface CreateDirectCostsModelGetResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface CreatePaymentModelGetResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface CreateTransfersModelGetResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface CreateUpdateBankAccountsModelGetResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface CreateUpdateSuppliersModelGetResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface GetCreateBankTransactionsModelResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface GetCreateChartOfAccountsModelResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface GetCreateDirectCostsModelResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface GetCreatePaymentModelResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface GetCreateTransfersModelResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface GetCreateUpdateBankAccountsModelResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; +} + +export interface GetCreateUpdateSuppliersModelResponsePushOption { + /** + * + * @type {PushOptionType} + * @memberof PushOption + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOption + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOption + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOption + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOption + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOption + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOption + */ + validation?: PushValidationInfo; } diff --git a/lending/src/sdk/models/shared/pushoptionchoice.ts b/lending/src/sdk/models/shared/pushoptionchoice.ts index 315b39f91..05b5d7577 100644 --- a/lending/src/sdk/models/shared/pushoptionchoice.ts +++ b/lending/src/sdk/models/shared/pushoptionchoice.ts @@ -1,58 +1,602 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { PushOptionType } from './pushoptiontype'; import { - PushOptionType, - PushOptionType$inboundSchema, -} from "./pushoptiontype.js"; - -export type PushOptionChoice = { - /** - * Allowed value for field. - */ - value?: string | undefined; - /** - * The option type. - */ - type?: PushOptionType | undefined; - /** - * The property's display name. - */ - displayName?: string | undefined; - /** - * A description of the property. - */ - description?: string | undefined; - /** - * The property is required if `True`. - */ - required?: boolean | undefined; -}; - -/** @internal */ -export const PushOptionChoice$inboundSchema: z.ZodType< - PushOptionChoice, - z.ZodTypeDef, - unknown -> = z.object({ - value: z.string().optional(), - type: PushOptionType$inboundSchema.optional(), - displayName: z.string().optional(), - description: z.string().optional(), - required: z.boolean().optional(), -}); - -export function pushOptionChoiceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushOptionChoice$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushOptionChoice' from JSON`, - ); + PushOptionTypeFromJSON, + PushOptionTypeFromJSONTyped, + PushOptionTypeToJSON, + PushOptionTypeToJSONTyped, +} from './pushoptiontype'; + +/** + * + * @export + * @interface PushOptionChoice + */ +export interface PushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + + + +/** + * Check if a given object implements the PushOptionChoice interface. + */ +export function instanceOfPushOptionChoice(value: object): value is PushOptionChoice { + return true; +} + +export function PushOptionChoiceFromJSON(json: any): PushOptionChoice { + return PushOptionChoiceFromJSONTyped(json, false); +} + +export function PushOptionChoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOptionChoice { + if (json == null) { + return json; + } + return { + + 'value': json['value'] == null ? undefined : json['value'], + 'type': json['type'] == null ? undefined : PushOptionTypeFromJSON(json['type']), + 'displayName': json['displayName'] == null ? undefined : json['displayName'], + 'description': json['description'] == null ? undefined : json['description'], + 'required': json['required'] == null ? undefined : json['required'], + }; +} + +export function PushOptionChoiceToJSON(json: any): PushOptionChoice { + return PushOptionChoiceToJSONTyped(json, false); +} + +export function PushOptionChoiceToJSONTyped(value?: PushOptionChoice | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'value': value['value'], + 'type': PushOptionTypeToJSON(value['type']), + 'displayName': value['displayName'], + 'description': value['description'], + 'required': value['required'], + }; +} + + +export interface CreateBankTransactionsModelGetResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface CreateChartOfAccountsModelGetResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface CreateDirectCostsModelGetResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface CreatePaymentModelGetResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface CreateTransfersModelGetResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface CreateUpdateBankAccountsModelGetResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface CreateUpdateSuppliersModelGetResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface GetCreateBankTransactionsModelResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface GetCreateChartOfAccountsModelResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface GetCreateDirectCostsModelResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface GetCreatePaymentModelResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface GetCreateTransfersModelResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface GetCreateUpdateBankAccountsModelResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface GetCreateUpdateSuppliersModelResponsePushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; +} + +export interface PushOptionPushOptionChoice { + /** + * Allowed value for field. + * @type {string} + * @memberof PushOptionChoice + */ + value?: string; + /** + * + * @type {PushOptionType} + * @memberof PushOptionChoice + */ + type?: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionChoice + */ + displayName?: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionChoice + */ + description?: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionChoice + */ + required?: boolean; } diff --git a/lending/src/sdk/models/shared/pushoptionproperty.ts b/lending/src/sdk/models/shared/pushoptionproperty.ts index 0100bc7b6..8a828850a 100644 --- a/lending/src/sdk/models/shared/pushoptionproperty.ts +++ b/lending/src/sdk/models/shared/pushoptionproperty.ts @@ -1,69 +1,141 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { PushOptionType } from './pushoptiontype'; import { - PushOptionChoice, - PushOptionChoice$inboundSchema, -} from "./pushoptionchoice.js"; + PushOptionTypeFromJSON, + PushOptionTypeFromJSONTyped, + PushOptionTypeToJSON, + PushOptionTypeToJSONTyped, +} from './pushoptiontype'; +import type { PushOptionChoice } from './pushoptionchoice'; import { - PushOptionType, - PushOptionType$inboundSchema, -} from "./pushoptiontype.js"; + PushOptionChoiceFromJSON, + PushOptionChoiceFromJSONTyped, + PushOptionChoiceToJSON, + PushOptionChoiceToJSONTyped, +} from './pushoptionchoice'; +import type { PushValidationInfo } from './pushvalidationinfo'; import { - PushValidationInfo, - PushValidationInfo$inboundSchema, -} from "./pushvalidationinfo.js"; + PushValidationInfoFromJSON, + PushValidationInfoFromJSONTyped, + PushValidationInfoToJSON, + PushValidationInfoToJSONTyped, +} from './pushvalidationinfo'; -export type PushOptionProperty = { - /** - * The option type. - */ - type: PushOptionType; - /** - * The property's display name. - */ - displayName: string; - /** - * A description of the property. - */ - description: string; - /** - * The property is required if `True`. - */ - required: boolean; - properties?: { [k: string]: PushOptionProperty } | null | undefined; - options?: Array | null | undefined; - validation?: PushValidationInfo | undefined; -}; +/** + * + * @export + * @interface PushOptionProperty + */ +export interface PushOptionProperty { + /** + * + * @type {PushOptionType} + * @memberof PushOptionProperty + */ + type: PushOptionType; + /** + * The property's display name. + * @type {string} + * @memberof PushOptionProperty + */ + displayName: string; + /** + * A description of the property. + * @type {string} + * @memberof PushOptionProperty + */ + description: string; + /** + * The property is required if `True`. + * @type {boolean} + * @memberof PushOptionProperty + */ + required: boolean; + /** + * + * @type {{ [key: string]: PushOptionProperty; }} + * @memberof PushOptionProperty + */ + properties?: { [key: string]: PushOptionProperty; } | null; + /** + * + * @type {Array} + * @memberof PushOptionProperty + */ + options?: Array | null; + /** + * + * @type {PushValidationInfo} + * @memberof PushOptionProperty + */ + validation?: PushValidationInfo; +} + + + +/** + * Check if a given object implements the PushOptionProperty interface. + */ +export function instanceOfPushOptionProperty(value: object): value is PushOptionProperty { + if (!('type' in value) || value['type'] === undefined) return false; + if (!('displayName' in value) || value['displayName'] === undefined) return false; + if (!('description' in value) || value['description'] === undefined) return false; + if (!('required' in value) || value['required'] === undefined) return false; + return true; +} -/** @internal */ -export const PushOptionProperty$inboundSchema: z.ZodType< - PushOptionProperty, - z.ZodTypeDef, - unknown -> = z.object({ - type: PushOptionType$inboundSchema, - displayName: z.string(), - description: z.string(), - required: z.boolean(), - properties: z.nullable( - z.record(z.lazy(() => PushOptionProperty$inboundSchema)), - ).optional(), - options: z.nullable(z.array(PushOptionChoice$inboundSchema)).optional(), - validation: PushValidationInfo$inboundSchema.optional(), -}); +export function PushOptionPropertyFromJSON(json: any): PushOptionProperty { + return PushOptionPropertyFromJSONTyped(json, false); +} + +export function PushOptionPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOptionProperty { + if (json == null) { + return json; + } + return { + + 'type': PushOptionTypeFromJSON(json['type']), + 'displayName': json['displayName'], + 'description': json['description'], + 'required': json['required'], + 'properties': json['properties'] == null ? undefined : (mapValues(json['properties'], PushOptionPropertyFromJSON)), + 'options': json['options'] == null ? undefined : ((json['options'] as Array).map(PushOptionChoiceFromJSON)), + 'validation': json['validation'] == null ? undefined : PushValidationInfoFromJSON(json['validation']), + }; +} -export function pushOptionPropertyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushOptionProperty$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushOptionProperty' from JSON`, - ); +export function PushOptionPropertyToJSON(json: any): PushOptionProperty { + return PushOptionPropertyToJSONTyped(json, false); } + +export function PushOptionPropertyToJSONTyped(value?: PushOptionProperty | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': PushOptionTypeToJSON(value['type']), + 'displayName': value['displayName'], + 'description': value['description'], + 'required': value['required'], + 'properties': value['properties'] == null ? undefined : (mapValues(value['properties'], PushOptionPropertyToJSON)), + 'options': value['options'] == null ? undefined : ((value['options'] as Array).map(PushOptionChoiceToJSON)), + 'validation': PushValidationInfoToJSON(value['validation']), + }; +} + diff --git a/lending/src/sdk/models/shared/pushoptiontype.ts b/lending/src/sdk/models/shared/pushoptiontype.ts index 298c02e2e..e2207dc3e 100644 --- a/lending/src/sdk/models/shared/pushoptiontype.ts +++ b/lending/src/sdk/models/shared/pushoptiontype.ts @@ -1,29 +1,59 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The option type. + * @export */ export const PushOptionType = { - Array: "Array", - Object: "Object", - String: "String", - Number: "Number", - Boolean: "Boolean", - DateTime: "DateTime", - File: "File", - MultiPart: "MultiPart", + Array: 'Array', + Object: 'Object', + String: 'String', + Number: 'Number', + Boolean: 'Boolean', + DateTime: 'DateTime', + File: 'File', + MultiPart: 'MultiPart' } as const; -/** - * The option type. - */ -export type PushOptionType = ClosedEnum; +export type PushOptionType = typeof PushOptionType[keyof typeof PushOptionType]; + + +export function instanceOfPushOptionType(value: any): boolean { + for (const key in PushOptionType) { + if (Object.prototype.hasOwnProperty.call(PushOptionType, key)) { + if (PushOptionType[key as keyof typeof PushOptionType] === value) { + return true; + } + } + } + return false; +} + +export function PushOptionTypeFromJSON(json: any): PushOptionType { + return PushOptionTypeFromJSONTyped(json, false); +} + +export function PushOptionTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushOptionType { + return json as PushOptionType; +} + +export function PushOptionTypeToJSON(value?: PushOptionType | null): any { + return value as any; +} + +export function PushOptionTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): PushOptionType { + return value as PushOptionType; +} -/** @internal */ -export const PushOptionType$inboundSchema: z.ZodNativeEnum< - typeof PushOptionType -> = z.nativeEnum(PushOptionType); diff --git a/lending/src/sdk/models/shared/pushvalidationinfo.ts b/lending/src/sdk/models/shared/pushvalidationinfo.ts index 3479adce1..1c24cff74 100644 --- a/lending/src/sdk/models/shared/pushvalidationinfo.ts +++ b/lending/src/sdk/models/shared/pushvalidationinfo.ts @@ -1,38 +1,324 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { PushFieldValidation } from './pushfieldvalidation'; import { - PushFieldValidation, - PushFieldValidation$inboundSchema, -} from "./pushfieldvalidation.js"; - -export type PushValidationInfo = { - warnings?: Array | null | undefined; - information?: Array | null | undefined; -}; - -/** @internal */ -export const PushValidationInfo$inboundSchema: z.ZodType< - PushValidationInfo, - z.ZodTypeDef, - unknown -> = z.object({ - warnings: z.nullable(z.array(PushFieldValidation$inboundSchema)).optional(), - information: z.nullable(z.array(PushFieldValidation$inboundSchema)) - .optional(), -}); - -export function pushValidationInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PushValidationInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PushValidationInfo' from JSON`, - ); + PushFieldValidationFromJSON, + PushFieldValidationFromJSONTyped, + PushFieldValidationToJSON, + PushFieldValidationToJSONTyped, +} from './pushfieldvalidation'; + +/** + * + * @export + * @interface PushValidationInfo + */ +export interface PushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +/** + * Check if a given object implements the PushValidationInfo interface. + */ +export function instanceOfPushValidationInfo(value: object): value is PushValidationInfo { + return true; +} + +export function PushValidationInfoFromJSON(json: any): PushValidationInfo { + return PushValidationInfoFromJSONTyped(json, false); +} + +export function PushValidationInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushValidationInfo { + if (json == null) { + return json; + } + return { + + ...json, + 'warnings': json['warnings'] == null ? undefined : ((json['warnings'] as Array).map(PushFieldValidationFromJSON)), + 'information': json['information'] == null ? undefined : ((json['information'] as Array).map(PushFieldValidationFromJSON)), + }; +} + +export function PushValidationInfoToJSON(json: any): PushValidationInfo { + return PushValidationInfoToJSONTyped(json, false); +} + +export function PushValidationInfoToJSONTyped(value?: PushValidationInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'warnings': value['warnings'] == null ? undefined : ((value['warnings'] as Array).map(PushFieldValidationToJSON)), + 'information': value['information'] == null ? undefined : ((value['information'] as Array).map(PushFieldValidationToJSON)), + }; +} + + +export interface CreateBankTransactionsModelGetResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface CreateChartOfAccountsModelGetResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface CreateDirectCostsModelGetResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface CreatePaymentModelGetResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface CreateTransfersModelGetResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface CreateUpdateBankAccountsModelGetResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface CreateUpdateSuppliersModelGetResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface GetCreateBankTransactionsModelResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface GetCreateChartOfAccountsModelResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface GetCreateDirectCostsModelResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface GetCreatePaymentModelResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface GetCreateTransfersModelResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface GetCreateUpdateBankAccountsModelResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface GetCreateUpdateSuppliersModelResponsePushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; +} + +export interface PushOptionPushValidationInfo { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + warnings?: Array | null; + /** + * + * @type {Array} + * @memberof PushValidationInfo + */ + information?: Array | null; } diff --git a/lending/src/sdk/models/shared/recordlinereference.ts b/lending/src/sdk/models/shared/recordlinereference.ts new file mode 100644 index 000000000..b52a80a2d --- /dev/null +++ b/lending/src/sdk/models/shared/recordlinereference.ts @@ -0,0 +1,158 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { BillLineItemDataType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +/** + * Links the current record line to the underlying record line that created it. + * + * For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. + * @export + * @interface RecordLineReference + */ +export interface RecordLineReference { + /** + * 'id' of the underlying record. + * @type {string} + * @memberof RecordLineReference + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof RecordLineReference + */ + dataType?: BillLineItemDataType; + /** + * Line number of the underlying record. + * @type {string} + * @memberof RecordLineReference + */ + lineNumber?: string; +} + + +/** + * @export + */ +export const RecordLineReferenceDataTypeEnum = { + PurchaseOrders: 'purchaseOrders', + Bills: 'bills' +} as const; +export type RecordLineReferenceDataTypeEnum = typeof RecordLineReferenceDataTypeEnum[keyof typeof RecordLineReferenceDataTypeEnum]; + + +/** + * Check if a given object implements the RecordLineReference interface. + */ +export function instanceOfRecordLineReference(value: object): value is RecordLineReference { + return true; +} + +export function RecordLineReferenceFromJSON(json: any): RecordLineReference { + return RecordLineReferenceFromJSONTyped(json, false); +} + +export function RecordLineReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecordLineReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + 'lineNumber': json['lineNumber'] == null ? undefined : json['lineNumber'], + }; +} + +export function RecordLineReferenceToJSON(json: any): RecordLineReference { + return RecordLineReferenceToJSONTyped(json, false); +} + +export function RecordLineReferenceToJSONTyped(value?: RecordLineReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataType': value['dataType'], + 'lineNumber': value['lineNumber'], + }; +} + + +export interface AccountingBillCreditNoteRecordLineReference { + /** + * 'id' of the underlying record. + * @type {string} + * @memberof RecordLineReference + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof RecordLineReference + */ + dataType?: BillLineItemDataType; + /** + * Line number of the underlying record. + * @type {string} + * @memberof RecordLineReference + */ + lineNumber?: string; +} + +export interface AccountingBillRecordLineReference { + /** + * 'id' of the underlying record. + * @type {string} + * @memberof RecordLineReference + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof RecordLineReference + */ + dataType?: BillLineItemDataType; + /** + * Line number of the underlying record. + * @type {string} + * @memberof RecordLineReference + */ + lineNumber?: string; +} + +export interface RecordLineRef { + /** + * 'id' of the underlying record. + * @type {string} + * @memberof RecordLineReference + */ + id?: string; + /** + * Allowed name of the 'dataType'. + * @type {string} + * @memberof RecordLineReference + */ + dataType?: BillLineItemDataType; + /** + * Line number of the underlying record. + * @type {string} + * @memberof RecordLineReference + */ + lineNumber?: string; +} diff --git a/lending/src/sdk/models/shared/reportbasis.ts b/lending/src/sdk/models/shared/reportbasis.ts index 36c371964..29243b9b6 100644 --- a/lending/src/sdk/models/shared/reportbasis.ts +++ b/lending/src/sdk/models/shared/reportbasis.ts @@ -1,23 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** - * The basis of a report. + * Accounting method used when aggregating the report data. In this case, `Cash`. + * @export */ export const ReportBasis = { - Unknown: "Unknown", - Accrual: "Accrual", - Cash: "Cash", + Unknown: 'Unknown', + Accrual: 'Accrual', + Cash: 'Cash' } as const; -/** - * The basis of a report. - */ -export type ReportBasis = ClosedEnum; +export type ReportBasis = typeof ReportBasis[keyof typeof ReportBasis]; + + +export function instanceOfReportBasis(value: any): boolean { + for (const key in ReportBasis) { + if (Object.prototype.hasOwnProperty.call(ReportBasis, key)) { + if (ReportBasis[key as keyof typeof ReportBasis] === value) { + return true; + } + } + } + return false; +} + +export function ReportBasisFromJSON(json: any): ReportBasis { + return ReportBasisFromJSONTyped(json, false); +} + +export function ReportBasisFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportBasis { + return json as ReportBasis; +} + +export function ReportBasisToJSON(value?: ReportBasis | null): any { + return value as any; +} + +export function ReportBasisToJSONTyped(value: any, ignoreDiscriminator: boolean): ReportBasis { + return value as ReportBasis; +} -/** @internal */ -export const ReportBasis$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(ReportBasis); diff --git a/lending/src/sdk/models/shared/reportcomponentmeasure.ts b/lending/src/sdk/models/shared/reportcomponentmeasure.ts index 92f996584..b4aa22fb6 100644 --- a/lending/src/sdk/models/shared/reportcomponentmeasure.ts +++ b/lending/src/sdk/models/shared/reportcomponentmeasure.ts @@ -1,45 +1,82 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ReportComponentMeasure = { - /** - * The measure's index. - */ - index?: number | undefined; - /** - * The measure's display name. - */ - measureDisplayName?: string | undefined; - /** - * The measure's value. - */ - value?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const ReportComponentMeasure$inboundSchema: z.ZodType< - ReportComponentMeasure, - z.ZodTypeDef, - unknown -> = z.object({ - index: z.number().int().optional(), - measureDisplayName: z.string().optional(), - value: z.number().transform(v => new Decimal$(v)).optional(), -}); - -export function reportComponentMeasureFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReportComponentMeasure$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReportComponentMeasure' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface ReportComponentMeasure + */ +export interface ReportComponentMeasure { + /** + * The measure's index. + * @type {number} + * @memberof ReportComponentMeasure + */ + index?: number; + /** + * The measure's display name. + * @type {string} + * @memberof ReportComponentMeasure + */ + measureDisplayName?: string; + /** + * The measure's value. + * @type {string} + * @memberof ReportComponentMeasure + */ + value?: Decimal | number; +} + +/** + * Check if a given object implements the ReportComponentMeasure interface. + */ +export function instanceOfReportComponentMeasure(value: object): value is ReportComponentMeasure { + return true; +} + +export function ReportComponentMeasureFromJSON(json: any): ReportComponentMeasure { + return ReportComponentMeasureFromJSONTyped(json, false); +} + +export function ReportComponentMeasureFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportComponentMeasure { + if (json == null) { + return json; + } + return { + + 'index': json['index'] == null ? undefined : json['index'], + 'measureDisplayName': json['measureDisplayName'] == null ? undefined : json['measureDisplayName'], + 'value': json['value'] == null ? undefined : toDecimal(json['value']), + }; +} + +export function ReportComponentMeasureToJSON(json: any): ReportComponentMeasure { + return ReportComponentMeasureToJSONTyped(json, false); } + +export function ReportComponentMeasureToJSONTyped(value?: ReportComponentMeasure | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'index': value['index'], + 'measureDisplayName': value['measureDisplayName'], + 'value': fromDecimal(value['value']), + }; +} + diff --git a/lending/src/sdk/models/shared/reportgenerationpayload.ts b/lending/src/sdk/models/shared/reportgenerationpayload.ts index ee953048d..1214012d2 100644 --- a/lending/src/sdk/models/shared/reportgenerationpayload.ts +++ b/lending/src/sdk/models/shared/reportgenerationpayload.ts @@ -1,64 +1,9 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - CompanyReference, - CompanyReference$inboundSchema, - CompanyReference$Outbound, - CompanyReference$outboundSchema, -} from "./companyreference.js"; +import type { CompanyReference } from './companyreference'; export type ReportGenerationPayload = { - /** - * Unique identifier of the report. - */ - id?: string | undefined; - referenceCompany?: CompanyReference | undefined; + id?: string; + referenceCompany?: CompanyReference; }; - -/** @internal */ -export const ReportGenerationPayload$inboundSchema: z.ZodType< - ReportGenerationPayload, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - referenceCompany: CompanyReference$inboundSchema.optional(), -}); -/** @internal */ -export type ReportGenerationPayload$Outbound = { - id?: string | undefined; - referenceCompany?: CompanyReference$Outbound | undefined; -}; - -/** @internal */ -export const ReportGenerationPayload$outboundSchema: z.ZodType< - ReportGenerationPayload$Outbound, - z.ZodTypeDef, - ReportGenerationPayload -> = z.object({ - id: z.string().optional(), - referenceCompany: CompanyReference$outboundSchema.optional(), -}); - -export function reportGenerationPayloadToJSON( - reportGenerationPayload: ReportGenerationPayload, -): string { - return JSON.stringify( - ReportGenerationPayload$outboundSchema.parse(reportGenerationPayload), - ); -} -export function reportGenerationPayloadFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReportGenerationPayload$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReportGenerationPayload' from JSON`, - ); -} diff --git a/lending/src/sdk/models/shared/reportinfo.ts b/lending/src/sdk/models/shared/reportinfo.ts index cc119b807..a5c3d5776 100644 --- a/lending/src/sdk/models/shared/reportinfo.ts +++ b/lending/src/sdk/models/shared/reportinfo.ts @@ -1,62 +1,339 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Report additional information, which is specific to Lending reports. + * @export + * @interface ReportInfo */ -export type ReportInfo = { - /** - * The number of the page queried. - */ - pageNumber?: number | undefined; - /** - * The number of transactions returned per page. - */ - pageSize?: number | undefined; - /** - * The total number of transactions available for a company for the period specified in the query string. - */ - totalResults?: number | undefined; - /** - * Name of the report. - */ - reportName?: string | undefined; - /** - * The name of the company being queried. - */ - companyName?: string | undefined; - /** - * Date the report was generated. - */ - generatedDate?: string | undefined; -}; - -/** @internal */ -export const ReportInfo$inboundSchema: z.ZodType< - ReportInfo, - z.ZodTypeDef, - unknown -> = z.object({ - pageNumber: z.number().int().optional(), - pageSize: z.number().int().optional(), - totalResults: z.number().int().optional(), - reportName: z.string().optional(), - companyName: z.string().optional(), - generatedDate: z.string().optional(), -}); - -export function reportInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReportInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReportInfo' from JSON`, - ); +export interface ReportInfo { + /** + * The number of the page queried. + * @type {number} + * @memberof ReportInfo + */ + pageNumber?: number; + /** + * The number of transactions returned per page. + * @type {number} + * @memberof ReportInfo + */ + pageSize?: number; + /** + * The total number of transactions available for a company for the period specified in the query string. + * @type {number} + * @memberof ReportInfo + */ + totalResults?: number; + /** + * Name of the report. + * @type {string} + * @memberof ReportInfo + */ + reportName?: string; + /** + * The name of the company being queried. + * @type {string} + * @memberof ReportInfo + */ + companyName?: string; + /** + * Date the report was generated. + * @type {string} + * @memberof ReportInfo + */ + generatedDate?: string; +} + +/** + * Check if a given object implements the ReportInfo interface. + */ +export function instanceOfReportInfo(value: object): value is ReportInfo { + return true; +} + +export function ReportInfoFromJSON(json: any): ReportInfo { + return ReportInfoFromJSONTyped(json, false); +} + +export function ReportInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportInfo { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'] == null ? undefined : json['pageNumber'], + 'pageSize': json['pageSize'] == null ? undefined : json['pageSize'], + 'totalResults': json['totalResults'] == null ? undefined : json['totalResults'], + 'reportName': json['reportName'] == null ? undefined : json['reportName'], + 'companyName': json['companyName'] == null ? undefined : json['companyName'], + 'generatedDate': json['generatedDate'] == null ? undefined : json['generatedDate'], + }; +} + +export function ReportInfoToJSON(json: any): ReportInfo { + return ReportInfoToJSONTyped(json, false); +} + +export function ReportInfoToJSONTyped(value?: ReportInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + 'reportName': value['reportName'], + 'companyName': value['companyName'], + 'generatedDate': value['generatedDate'], + }; +} + + +export interface CategorizedBankStatementGetResponseReportInfo { + /** + * The number of the page queried. + * @type {number} + * @memberof ReportInfo + */ + pageNumber?: number; + /** + * The number of transactions returned per page. + * @type {number} + * @memberof ReportInfo + */ + pageSize?: number; + /** + * The total number of transactions available for a company for the period specified in the query string. + * @type {number} + * @memberof ReportInfo + */ + totalResults?: number; + /** + * Name of the report. + * @type {string} + * @memberof ReportInfo + */ + reportName?: string; + /** + * The name of the company being queried. + * @type {string} + * @memberof ReportInfo + */ + companyName?: string; + /** + * Date the report was generated. + * @type {string} + * @memberof ReportInfo + */ + generatedDate?: string; +} + +export interface EnhancedCashFlowTransactionsReportInfo { + /** + * The number of the page queried. + * @type {number} + * @memberof ReportInfo + */ + pageNumber?: number; + /** + * The number of transactions returned per page. + * @type {number} + * @memberof ReportInfo + */ + pageSize?: number; + /** + * The total number of transactions available for a company for the period specified in the query string. + * @type {number} + * @memberof ReportInfo + */ + totalResults?: number; + /** + * Name of the report. + * @type {string} + * @memberof ReportInfo + */ + reportName?: string; + /** + * The name of the company being queried. + * @type {string} + * @memberof ReportInfo + */ + companyName?: string; + /** + * Date the report was generated. + * @type {string} + * @memberof ReportInfo + */ + generatedDate?: string; +} + +export interface EnhancedInvoicesReportReportInfo { + /** + * The number of the page queried. + * @type {number} + * @memberof ReportInfo + */ + pageNumber?: number; + /** + * The number of transactions returned per page. + * @type {number} + * @memberof ReportInfo + */ + pageSize?: number; + /** + * The total number of transactions available for a company for the period specified in the query string. + * @type {number} + * @memberof ReportInfo + */ + totalResults?: number; + /** + * Name of the report. + * @type {string} + * @memberof ReportInfo + */ + reportName?: string; + /** + * The name of the company being queried. + * @type {string} + * @memberof ReportInfo + */ + companyName?: string; + /** + * Date the report was generated. + * @type {string} + * @memberof ReportInfo + */ + generatedDate?: string; +} + +export interface GetCategorizedBankStatementResponseReportInfo { + /** + * The number of the page queried. + * @type {number} + * @memberof ReportInfo + */ + pageNumber?: number; + /** + * The number of transactions returned per page. + * @type {number} + * @memberof ReportInfo + */ + pageSize?: number; + /** + * The total number of transactions available for a company for the period specified in the query string. + * @type {number} + * @memberof ReportInfo + */ + totalResults?: number; + /** + * Name of the report. + * @type {string} + * @memberof ReportInfo + */ + reportName?: string; + /** + * The name of the company being queried. + * @type {string} + * @memberof ReportInfo + */ + companyName?: string; + /** + * Date the report was generated. + * @type {string} + * @memberof ReportInfo + */ + generatedDate?: string; +} + +export interface ListReconciledInvoicesResponseReportInfo { + /** + * The number of the page queried. + * @type {number} + * @memberof ReportInfo + */ + pageNumber?: number; + /** + * The number of transactions returned per page. + * @type {number} + * @memberof ReportInfo + */ + pageSize?: number; + /** + * The total number of transactions available for a company for the period specified in the query string. + * @type {number} + * @memberof ReportInfo + */ + totalResults?: number; + /** + * Name of the report. + * @type {string} + * @memberof ReportInfo + */ + reportName?: string; + /** + * The name of the company being queried. + * @type {string} + * @memberof ReportInfo + */ + companyName?: string; + /** + * Date the report was generated. + * @type {string} + * @memberof ReportInfo + */ + generatedDate?: string; +} + +export interface ReconciledInvoicesListResponseReportInfo { + /** + * The number of the page queried. + * @type {number} + * @memberof ReportInfo + */ + pageNumber?: number; + /** + * The number of transactions returned per page. + * @type {number} + * @memberof ReportInfo + */ + pageSize?: number; + /** + * The total number of transactions available for a company for the period specified in the query string. + * @type {number} + * @memberof ReportInfo + */ + totalResults?: number; + /** + * Name of the report. + * @type {string} + * @memberof ReportInfo + */ + reportName?: string; + /** + * The name of the company being queried. + * @type {string} + * @memberof ReportInfo + */ + companyName?: string; + /** + * Date the report was generated. + * @type {string} + * @memberof ReportInfo + */ + generatedDate?: string; } diff --git a/lending/src/sdk/models/shared/reportinput.ts b/lending/src/sdk/models/shared/reportinput.ts index 3c383715d..c78cb7d64 100644 --- a/lending/src/sdk/models/shared/reportinput.ts +++ b/lending/src/sdk/models/shared/reportinput.ts @@ -1,23 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Accounting method used to prepare the cash flow statement. + * @export */ export const ReportInput = { - Unknown: "Unknown", - Indirect: "Indirect", - Direct: "Direct", + Unknown: 'Unknown', + Indirect: 'Indirect', + Direct: 'Direct' } as const; -/** - * Accounting method used to prepare the cash flow statement. - */ -export type ReportInput = ClosedEnum; +export type ReportInput = typeof ReportInput[keyof typeof ReportInput]; + + +export function instanceOfReportInput(value: any): boolean { + for (const key in ReportInput) { + if (Object.prototype.hasOwnProperty.call(ReportInput, key)) { + if (ReportInput[key as keyof typeof ReportInput] === value) { + return true; + } + } + } + return false; +} + +export function ReportInputFromJSON(json: any): ReportInput { + return ReportInputFromJSONTyped(json, false); +} + +export function ReportInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportInput { + return json as ReportInput; +} + +export function ReportInputToJSON(value?: ReportInput | null): any { + return value as any; +} + +export function ReportInputToJSONTyped(value: any, ignoreDiscriminator: boolean): ReportInput { + return value as ReportInput; +} -/** @internal */ -export const ReportInput$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(ReportInput); diff --git a/lending/src/sdk/models/shared/reportitem.ts b/lending/src/sdk/models/shared/reportitem.ts new file mode 100644 index 000000000..eb5637e78 --- /dev/null +++ b/lending/src/sdk/models/shared/reportitem.ts @@ -0,0 +1,430 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { EnhancedReportAccountCategory } from './enhancedreportaccountcategory'; +import { + EnhancedReportAccountCategoryFromJSON, + EnhancedReportAccountCategoryFromJSONTyped, + EnhancedReportAccountCategoryToJSON, + EnhancedReportAccountCategoryToJSONTyped, +} from './enhancedreportaccountcategory'; + +/** + * + * @export + * @interface ReportItem + */ +export interface ReportItem { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItem + */ + date?: string; + /** + * Balance of the account as reported on the profit and loss or Balance sheet. + * @type {string} + * @memberof ReportItem + */ + balance?: Decimal | number; + /** + * Name of the account. + * @type {string} + * @memberof ReportItem + */ + accountName?: string; + /** + * The unique account ID. + * @type {string} + * @memberof ReportItem + */ + accountId?: string; + /** + * + * @type {EnhancedReportAccountCategory} + * @memberof ReportItem + */ + accountCategory?: EnhancedReportAccountCategory; +} + +/** + * Check if a given object implements the ReportItem interface. + */ +export function instanceOfReportItem(value: object): value is ReportItem { + return true; +} + +export function ReportItemFromJSON(json: any): ReportItem { + return ReportItemFromJSONTyped(json, false); +} + +export function ReportItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportItem { + if (json == null) { + return json; + } + return { + + 'date': json['date'] == null ? undefined : json['date'], + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'accountId': json['accountId'] == null ? undefined : json['accountId'], + 'accountCategory': json['accountCategory'] == null ? undefined : EnhancedReportAccountCategoryFromJSON(json['accountCategory']), + }; +} + +export function ReportItemToJSON(json: any): ReportItem { + return ReportItemToJSONTyped(json, false); +} + +export function ReportItemToJSONTyped(value?: ReportItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'date': value['date'], + 'balance': fromDecimal(value['balance']), + 'accountName': value['accountName'], + 'accountId': value['accountId'], + 'accountCategory': EnhancedReportAccountCategoryToJSON(value['accountCategory']), + }; +} + + +export interface CategorizedBalanceSheetStatementGetResponseReportItem { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItem + */ + date?: string; + /** + * Balance of the account as reported on the profit and loss or Balance sheet. + * @type {string} + * @memberof ReportItem + */ + balance?: Decimal | number; + /** + * Name of the account. + * @type {string} + * @memberof ReportItem + */ + accountName?: string; + /** + * The unique account ID. + * @type {string} + * @memberof ReportItem + */ + accountId?: string; + /** + * + * @type {EnhancedReportAccountCategory} + * @memberof ReportItem + */ + accountCategory?: EnhancedReportAccountCategory; +} + +export interface CategorizedProfitAndLossStatementGetResponseReportItem { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItem + */ + date?: string; + /** + * Balance of the account as reported on the profit and loss or Balance sheet. + * @type {string} + * @memberof ReportItem + */ + balance?: Decimal | number; + /** + * Name of the account. + * @type {string} + * @memberof ReportItem + */ + accountName?: string; + /** + * The unique account ID. + * @type {string} + * @memberof ReportItem + */ + accountId?: string; + /** + * + * @type {EnhancedReportAccountCategory} + * @memberof ReportItem + */ + accountCategory?: EnhancedReportAccountCategory; +} + +export interface EnhancedFinancialReportReportItem { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItem + */ + date?: string; + /** + * Balance of the account as reported on the profit and loss or Balance sheet. + * @type {string} + * @memberof ReportItem + */ + balance?: Decimal | number; + /** + * Name of the account. + * @type {string} + * @memberof ReportItem + */ + accountName?: string; + /** + * The unique account ID. + * @type {string} + * @memberof ReportItem + */ + accountId?: string; + /** + * + * @type {EnhancedReportAccountCategory} + * @memberof ReportItem + */ + accountCategory?: EnhancedReportAccountCategory; +} + +export interface EnhancedReportReportItem { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItem + */ + date?: string; + /** + * Balance of the account as reported on the profit and loss or Balance sheet. + * @type {string} + * @memberof ReportItem + */ + balance?: Decimal | number; + /** + * Name of the account. + * @type {string} + * @memberof ReportItem + */ + accountName?: string; + /** + * The unique account ID. + * @type {string} + * @memberof ReportItem + */ + accountId?: string; + /** + * + * @type {EnhancedReportAccountCategory} + * @memberof ReportItem + */ + accountCategory?: EnhancedReportAccountCategory; +} + +export interface GetCategorizedBalanceSheetStatementResponseReportItem { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItem + */ + date?: string; + /** + * Balance of the account as reported on the profit and loss or Balance sheet. + * @type {string} + * @memberof ReportItem + */ + balance?: Decimal | number; + /** + * Name of the account. + * @type {string} + * @memberof ReportItem + */ + accountName?: string; + /** + * The unique account ID. + * @type {string} + * @memberof ReportItem + */ + accountId?: string; + /** + * + * @type {EnhancedReportAccountCategory} + * @memberof ReportItem + */ + accountCategory?: EnhancedReportAccountCategory; +} + +export interface GetCategorizedProfitAndLossStatementResponseReportItem { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItem + */ + date?: string; + /** + * Balance of the account as reported on the profit and loss or Balance sheet. + * @type {string} + * @memberof ReportItem + */ + balance?: Decimal | number; + /** + * Name of the account. + * @type {string} + * @memberof ReportItem + */ + accountName?: string; + /** + * The unique account ID. + * @type {string} + * @memberof ReportItem + */ + accountId?: string; + /** + * + * @type {EnhancedReportAccountCategory} + * @memberof ReportItem + */ + accountCategory?: EnhancedReportAccountCategory; +} diff --git a/lending/src/sdk/models/shared/reportitems.ts b/lending/src/sdk/models/shared/reportitems.ts index df7ba8424..3e2750ecd 100644 --- a/lending/src/sdk/models/shared/reportitems.ts +++ b/lending/src/sdk/models/shared/reportitems.ts @@ -1,94 +1,324 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { LoanTransactionType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ItemRef } from './itemref'; +import { + ItemRefFromJSON, + ItemRefFromJSONTyped, + ItemRefToJSON, + ItemRefToJSONTyped, +} from './itemref'; +import type { LoanRef } from './loanref'; +import { + LoanRefFromJSON, + LoanRefFromJSONTyped, + LoanRefToJSON, + LoanRefToJSONTyped, +} from './loanref'; + +/** + * + * @export + * @interface ReportItems */ +export interface ReportItems { + /** + * Contains object that contains all the Loan transactions for that integration type. + * @type {LoanRef} + * @memberof ReportItems + */ + loanRef?: LoanRef; + /** + * Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. + * @type {ItemRef} + * @memberof ReportItems + */ + itemRef?: ItemRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItems + */ + date?: string; + /** + * The loan transaction amount. + * @type {string} + * @memberof ReportItems + */ + amount?: Decimal | number; + /** + * The type of loan transaction. + * @type {string} + * @memberof ReportItems + */ + loanTransactionType?: LoanTransactionType; + /** + * The name of lender providing the loan. + * @type {string} + * @memberof ReportItems + */ + lender?: string; +} -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { ItemRef, ItemRef$inboundSchema } from "./itemref.js"; -import { LoanRef, LoanRef$inboundSchema } from "./loanref.js"; /** - * The type of loan transaction. + * @export */ -export const LoanTransactionType = { - Investment: "Investment", - Repayment: "Repayment", - Interest: "Interest", - AccuredInterest: "AccuredInterest", +export const ReportItemsLoanTransactionTypeEnum = { + Investment: 'Investment', + Repayment: 'Repayment', + Interest: 'Interest', + AccuredInterest: 'AccuredInterest' } as const; +export type ReportItemsLoanTransactionTypeEnum = typeof ReportItemsLoanTransactionTypeEnum[keyof typeof ReportItemsLoanTransactionTypeEnum]; + + /** - * The type of loan transaction. + * Check if a given object implements the ReportItems interface. */ -export type LoanTransactionType = ClosedEnum; +export function instanceOfReportItems(value: object): value is ReportItems { + return true; +} + +export function ReportItemsFromJSON(json: any): ReportItems { + return ReportItemsFromJSONTyped(json, false); +} + +export function ReportItemsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportItems { + if (json == null) { + return json; + } + return { + + 'loanRef': json['loanRef'] == null ? undefined : LoanRefFromJSON(json['loanRef']), + 'itemRef': json['itemRef'] == null ? undefined : ItemRefFromJSON(json['itemRef']), + 'date': json['date'] == null ? undefined : json['date'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + 'loanTransactionType': json['loanTransactionType'] == null ? undefined : json['loanTransactionType'], + 'lender': json['lender'] == null ? undefined : json['lender'], + }; +} + +export function ReportItemsToJSON(json: any): ReportItems { + return ReportItemsToJSONTyped(json, false); +} -export type ReportItems = { - loanRef?: LoanRef | undefined; - itemRef?: ItemRef | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - date?: string | undefined; - /** - * The loan transaction amount. - */ - amount?: Decimal$ | number | undefined; - /** - * The type of loan transaction. - */ - loanTransactionType?: LoanTransactionType | undefined; - /** - * The name of lender providing the loan. - */ - lender?: string | undefined; -}; +export function ReportItemsToJSONTyped(value?: ReportItems | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'loanRef': LoanRefToJSON(value['loanRef']), + 'itemRef': ItemRefToJSON(value['itemRef']), + 'date': value['date'], + 'amount': fromDecimal(value['amount']), + 'loanTransactionType': value['loanTransactionType'], + 'lender': value['lender'], + }; +} -/** @internal */ -export const LoanTransactionType$inboundSchema: z.ZodNativeEnum< - typeof LoanTransactionType -> = z.nativeEnum(LoanTransactionType); -/** @internal */ -export const ReportItems$inboundSchema: z.ZodType< - ReportItems, - z.ZodTypeDef, - unknown -> = z.object({ - loanRef: LoanRef$inboundSchema.optional(), - itemRef: ItemRef$inboundSchema.optional(), - date: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), - loanTransactionType: LoanTransactionType$inboundSchema.optional(), - lender: z.string().optional(), -}); +export interface ListLoanTransactionsResponseReportItems { + /** + * Contains object that contains all the Loan transactions for that integration type. + * @type {LoanRef} + * @memberof ReportItems + */ + loanRef?: LoanRef; + /** + * Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. + * @type {ItemRef} + * @memberof ReportItems + */ + itemRef?: ItemRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItems + */ + date?: string; + /** + * The loan transaction amount. + * @type {string} + * @memberof ReportItems + */ + amount?: Decimal | number; + /** + * The type of loan transaction. + * @type {string} + * @memberof ReportItems + */ + loanTransactionType?: LoanTransactionType; + /** + * The name of lender providing the loan. + * @type {string} + * @memberof ReportItems + */ + lender?: string; +} + +export interface LoanTransactionsListResponseReportItems { + /** + * Contains object that contains all the Loan transactions for that integration type. + * @type {LoanRef} + * @memberof ReportItems + */ + loanRef?: LoanRef; + /** + * Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. + * @type {ItemRef} + * @memberof ReportItems + */ + itemRef?: ItemRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItems + */ + date?: string; + /** + * The loan transaction amount. + * @type {string} + * @memberof ReportItems + */ + amount?: Decimal | number; + /** + * The type of loan transaction. + * @type {string} + * @memberof ReportItems + */ + loanTransactionType?: LoanTransactionType; + /** + * The name of lender providing the loan. + * @type {string} + * @memberof ReportItems + */ + lender?: string; +} -export function reportItemsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReportItems$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReportItems' from JSON`, - ); +export interface LoanTransactionsReportItems { + /** + * Contains object that contains all the Loan transactions for that integration type. + * @type {LoanRef} + * @memberof ReportItems + */ + loanRef?: LoanRef; + /** + * Contains object of reporting properties. The loan ref will reference a different object depending on the integration type. + * @type {ItemRef} + * @memberof ReportItems + */ + itemRef?: ItemRef; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportItems + */ + date?: string; + /** + * The loan transaction amount. + * @type {string} + * @memberof ReportItems + */ + amount?: Decimal | number; + /** + * The type of loan transaction. + * @type {string} + * @memberof ReportItems + */ + loanTransactionType?: LoanTransactionType; + /** + * The name of lender providing the loan. + * @type {string} + * @memberof ReportItems + */ + lender?: string; } diff --git a/lending/src/sdk/models/shared/reportline.ts b/lending/src/sdk/models/shared/reportline.ts index 870117a0d..5b5c98370 100644 --- a/lending/src/sdk/models/shared/reportline.ts +++ b/lending/src/sdk/models/shared/reportline.ts @@ -1,50 +1,334 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ReportLine = { - /** - * Identifier for the account, unique for the company in the accounting software. - */ - accountId?: string | null | undefined; - /** - * Name of the report line item. - */ - name?: string | null | undefined; - /** - * Numerical value of the line item. - */ - value: Decimal$ | number; - /** - * An array of ReportLine items. - */ - items?: Array | null | undefined; -}; - -/** @internal */ -export const ReportLine$inboundSchema: z.ZodType< - ReportLine, - z.ZodTypeDef, - unknown -> = z.object({ - accountId: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - value: z.number().transform(v => new Decimal$(v)), - items: z.nullable(z.array(z.lazy(() => ReportLine$inboundSchema))).optional(), -}); - -export function reportLineFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReportLine$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReportLine' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface ReportLine + */ +export interface ReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +/** + * Check if a given object implements the ReportLine interface. + */ +export function instanceOfReportLine(value: object): value is ReportLine { + if (!('value' in value) || value['value'] === undefined) return false; + return true; +} + +export function ReportLineFromJSON(json: any): ReportLine { + return ReportLineFromJSONTyped(json, false); +} + +export function ReportLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportLine { + if (json == null) { + return json; + } + return { + + 'accountId': json['accountId'] == null ? undefined : json['accountId'], + 'name': json['name'] == null ? undefined : json['name'], + 'value': json['value'], + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ReportLineFromJSON)), + }; +} + +export function ReportLineToJSON(json: any): ReportLine { + return ReportLineToJSONTyped(json, false); +} + +export function ReportLineToJSONTyped(value?: ReportLine | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'accountId': value['accountId'], + 'name': value['name'], + 'value': fromDecimal(value['value']), + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ReportLineToJSON)), + }; +} + + +export interface AccountingBalanceSheetAccountingReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +export interface AccountingBalanceSheetReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +export interface AccountingCashFlowStatementAccountingReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +export interface AccountingCashFlowStatementReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +export interface AccountingProfitAndLossReportAccountingReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +export interface AccountingProfitAndLossReportReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +export interface AccountingReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +export interface AccountingReportLineReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; +} + +export interface ReportLineAccountingReportLine { + /** + * Identifier for the account, unique for the company in the accounting software. + * @type {string} + * @memberof ReportLine + */ + accountId?: string | null; + /** + * Name of the report line item. + * @type {string} + * @memberof ReportLine + */ + name?: string | null; + /** + * Numerical value of the line item. + * @type {string} + * @memberof ReportLine + */ + value: Decimal | number; + /** + * An array of ReportLine items. + * @type {Array} + * @memberof ReportLine + */ + items?: Array | null; } diff --git a/lending/src/sdk/models/shared/reportoperation.ts b/lending/src/sdk/models/shared/reportoperation.ts index 4fb71a091..218e373df 100644 --- a/lending/src/sdk/models/shared/reportoperation.ts +++ b/lending/src/sdk/models/shared/reportoperation.ts @@ -1,135 +1,1215 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +/* tslint:disable */ +/* eslint-disable */ /** - * The status of the report generation. + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -export const ReportOperationStatus = { - InProgress: "InProgress", - Complete: "Complete", - Error: "Error", -} as const; + +import type { ReportOperationStatus } from '../_speakeasy_enums'; +import type { ReportOperationType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * The status of the report generation. + * Information about report generation. + * @export + * @interface ReportOperation */ -export type ReportOperationStatus = ClosedEnum; +export interface ReportOperation { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + /** - * The name of the generated report. + * @export */ -export const ReportOperationType = { - CategorizedBankStatement: "categorizedBankStatement", - CreditModel: "creditModel", - SpendAnalysis: "spendAnalysis", +export const ReportOperationStatusEnum = { + InProgress: 'InProgress', + Complete: 'Complete', + Error: 'Error' } as const; +export type ReportOperationStatusEnum = typeof ReportOperationStatusEnum[keyof typeof ReportOperationStatusEnum]; + /** - * The name of the generated report. + * @export */ -export type ReportOperationType = ClosedEnum; +export const ReportOperationTypeEnum = { + CategorizedBankStatement: 'categorizedBankStatement', + CreditModel: 'creditModel', + SpendAnalysis: 'spendAnalysis' +} as const; +export type ReportOperationTypeEnum = typeof ReportOperationTypeEnum[keyof typeof ReportOperationTypeEnum]; + /** - * Information about report generation. + * Check if a given object implements the ReportOperation interface. */ -export type ReportOperation = { - /** - * Unique identifier of the report - */ - id?: string | undefined; - /** - * The status of the report generation. - */ - status?: ReportOperationStatus | undefined; - /** - * The name of the generated report. - */ - type?: ReportOperationType | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - requestedDate?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - updatedDate?: string | undefined; - /** - * A short message describing any errors that occurred while generating the report. - */ - errorMessage?: string | null | undefined; -}; - -/** @internal */ -export const ReportOperationStatus$inboundSchema: z.ZodNativeEnum< - typeof ReportOperationStatus -> = z.nativeEnum(ReportOperationStatus); - -/** @internal */ -export const ReportOperationType$inboundSchema: z.ZodNativeEnum< - typeof ReportOperationType -> = z.nativeEnum(ReportOperationType); - -/** @internal */ -export const ReportOperation$inboundSchema: z.ZodType< - ReportOperation, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - status: ReportOperationStatus$inboundSchema.optional(), - type: ReportOperationType$inboundSchema.optional(), - requestedDate: z.string().optional(), - updatedDate: z.string().optional(), - errorMessage: z.nullable(z.string()).optional(), -}); - -export function reportOperationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReportOperation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReportOperation' from JSON`, - ); +export function instanceOfReportOperation(value: object): value is ReportOperation { + return true; +} + +export function ReportOperationFromJSON(json: any): ReportOperation { + return ReportOperationFromJSONTyped(json, false); +} + +export function ReportOperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportOperation { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'status': json['status'] == null ? undefined : json['status'], + 'type': json['type'] == null ? undefined : json['type'], + 'requestedDate': json['requestedDate'] == null ? undefined : json['requestedDate'], + 'updatedDate': json['updatedDate'] == null ? undefined : json['updatedDate'], + 'errorMessage': json['errorMessage'] == null ? undefined : json['errorMessage'], + }; +} + +export function ReportOperationToJSON(json: any): ReportOperation { + return ReportOperationToJSONTyped(json, false); +} + +export function ReportOperationToJSONTyped(value?: ReportOperation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'status': value['status'], + 'type': value['type'], + 'requestedDate': value['requestedDate'], + 'updatedDate': value['updatedDate'], + 'errorMessage': value['errorMessage'], + }; +} + + +export interface GenerateReportResponseReport { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface GenerateReportResponseReportOperation { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface GetReportStatusResponseReport { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface GetReportStatusResponseReportOperation { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ListReportsResponseReport { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ListReportsResponseReportOperation { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface Report { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ReportGenerateResponseReport { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ReportGenerateResponseReportOperation { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ReportOperationReport { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ReportStatusGetResponseReport { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ReportStatusGetResponseReportOperation { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ReportsListResponseReport { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; +} + +export interface ReportsListResponseReportOperation { + /** + * Unique identifier of the report + * @type {string} + * @memberof ReportOperation + */ + id?: string; + /** + * The status of the report generation. + * @type {string} + * @memberof ReportOperation + */ + status?: ReportOperationStatus; + /** + * The name of the generated report. + * @type {string} + * @memberof ReportOperation + */ + type?: ReportOperationType; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + requestedDate?: string; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof ReportOperation + */ + updatedDate?: string; + /** + * A short message describing any errors that occurred while generating the report. + * @type {string} + * @memberof ReportOperation + */ + errorMessage?: string | null; } diff --git a/lending/src/sdk/models/shared/reports.ts b/lending/src/sdk/models/shared/reports.ts index 256c40193..23a2357e4 100644 --- a/lending/src/sdk/models/shared/reports.ts +++ b/lending/src/sdk/models/shared/reports.ts @@ -1,55 +1,182 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { Links, Links$inboundSchema } from "./links.js"; +import { mapValues } from '../../../runtime'; +import type { Links } from './links'; import { - ReportOperation, - ReportOperation$inboundSchema, -} from "./reportoperation.js"; - -export type Reports = { - results?: Array | undefined; - /** - * Current page number. - */ - pageNumber: number; - /** - * Number of items to return in results array. - */ - pageSize: number; - /** - * Total number of items. - */ - totalResults: number; - links: Links; -}; - -/** @internal */ -export const Reports$inboundSchema: z.ZodType = - z.object({ - results: z.array(ReportOperation$inboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - _links: Links$inboundSchema, - }).transform((v) => { - return remap$(v, { - "_links": "links", - }); - }); - -export function reportsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Reports$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Reports' from JSON`, - ); + LinksFromJSON, + LinksFromJSONTyped, + LinksToJSON, + LinksToJSONTyped, +} from './links'; +import type { ReportOperation } from './reportoperation'; +import { + ReportOperationFromJSON, + ReportOperationFromJSONTyped, + ReportOperationToJSON, + ReportOperationToJSONTyped, +} from './reportoperation'; + +/** + * + * @export + * @interface Reports + */ +export interface Reports { + /** + * Current page number. + * @type {number} + * @memberof Reports + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Reports + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Reports + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Reports + */ + links: Links; + /** + * + * @type {Array} + * @memberof Reports + */ + results?: Array; +} + +/** + * Check if a given object implements the Reports interface. + */ +export function instanceOfReports(value: object): value is Reports { + if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; + if (!('pageSize' in value) || value['pageSize'] === undefined) return false; + if (!('totalResults' in value) || value['totalResults'] === undefined) return false; + if (!('links' in value) || value['links'] === undefined) return false; + return true; +} + +export function ReportsFromJSON(json: any): Reports { + return ReportsFromJSONTyped(json, false); +} + +export function ReportsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Reports { + if (json == null) { + return json; + } + return { + + 'pageNumber': json['pageNumber'], + 'pageSize': json['pageSize'], + 'totalResults': json['totalResults'], + 'links': LinksFromJSON(json['_links']), + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(ReportOperationFromJSON)), + }; +} + +export function ReportsToJSON(json: any): Reports { + return ReportsToJSONTyped(json, false); +} + +export function ReportsToJSONTyped(value?: Reports | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pageNumber': value['pageNumber'], + 'pageSize': value['pageSize'], + 'totalResults': value['totalResults'], + '_links': LinksToJSON(value['links']), + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(ReportOperationToJSON)), + }; +} + + +export interface ListReportsResponseReports { + /** + * Current page number. + * @type {number} + * @memberof Reports + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Reports + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Reports + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Reports + */ + links: Links; + /** + * + * @type {Array} + * @memberof Reports + */ + results?: Array; +} + +export interface ReportsListResponseReports { + /** + * Current page number. + * @type {number} + * @memberof Reports + */ + pageNumber: number; + /** + * Number of items to return in results array. + * @type {number} + * @memberof Reports + */ + pageSize: number; + /** + * Total number of items. + * @type {number} + * @memberof Reports + */ + totalResults: number; + /** + * + * @type {Links} + * @memberof Reports + */ + links: Links; + /** + * + * @type {Array} + * @memberof Reports + */ + results?: Array; } diff --git a/lending/src/sdk/models/shared/reportsourcereference.ts b/lending/src/sdk/models/shared/reportsourcereference.ts new file mode 100644 index 000000000..3b9c2feee --- /dev/null +++ b/lending/src/sdk/models/shared/reportsourcereference.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +/** + * A source reference containing the `sourceType` object "Banking". + * @export + * @interface ReportSourceReference + */ +export interface ReportSourceReference { + /** + * The data source type. + * @type {string} + * @memberof ReportSourceReference + */ + sourceType?: string; +} + +/** + * Check if a given object implements the ReportSourceReference interface. + */ +export function instanceOfReportSourceReference(value: object): value is ReportSourceReference { + return true; +} + +export function ReportSourceReferenceFromJSON(json: any): ReportSourceReference { + return ReportSourceReferenceFromJSONTyped(json, false); +} + +export function ReportSourceReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportSourceReference { + if (json == null) { + return json; + } + return { + + 'sourceType': json['sourceType'] == null ? undefined : json['sourceType'], + }; +} + +export function ReportSourceReferenceToJSON(json: any): ReportSourceReference { + return ReportSourceReferenceToJSONTyped(json, false); +} + +export function ReportSourceReferenceToJSONTyped(value?: ReportSourceReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'sourceType': value['sourceType'], + }; +} + + +export interface CashFlowTransactionReportSourceReference { + /** + * The data source type. + * @type {string} + * @memberof ReportSourceReference + */ + sourceType?: string; +} + +export interface CategorizedBankStatementAccountsReportSourceReference { + /** + * The data source type. + * @type {string} + * @memberof ReportSourceReference + */ + sourceType?: string; +} + +export interface CategorizedBankStatementTransactionsReportSourceReference { + /** + * The data source type. + * @type {string} + * @memberof ReportSourceReference + */ + sourceType?: string; +} diff --git a/lending/src/sdk/models/shared/reporttype.ts b/lending/src/sdk/models/shared/reporttype.ts deleted file mode 100644 index f5c7e4adb..000000000 --- a/lending/src/sdk/models/shared/reporttype.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -export const ReportType = { - CategorizedBankStatement: "categorizedBankStatement", - CreditModel: "creditModel", -} as const; -export type ReportType = ClosedEnum; - -/** @internal */ -export const ReportType$outboundSchema: z.ZodNativeEnum = z - .nativeEnum(ReportType); diff --git a/lending/src/sdk/models/shared/routinginfo.ts b/lending/src/sdk/models/shared/routinginfo.ts index a3875893f..8b1570210 100644 --- a/lending/src/sdk/models/shared/routinginfo.ts +++ b/lending/src/sdk/models/shared/routinginfo.ts @@ -1,93 +1,156 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { RoutingInfoType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * The type of routing number. + * Routing information for the bank. This does not include account number. + * @export + * @interface RoutingInfo */ -export const RoutingInfoType = { - Rtn: "rtn", - Aba: "aba", - Swift: "swift", - Bsb: "bsb", - Iban: "iban", - Nz2: "nz2", - Trno: "trno", - Sortcode: "sortcode", - Blz: "blz", - Ifsc: "ifsc", - Bankcode: "bankcode", - Apca: "apca", - Clabe: "clabe", -} as const; +export interface RoutingInfo { + /** + * The numeric identifier of the routing number + * @type {string} + * @memberof RoutingInfo + */ + bankCode?: string | null; + /** + * The type of routing number. + * @type {string} + * @memberof RoutingInfo + */ + type?: RoutingInfoType | null; +} + + /** - * The type of routing number. + * @export */ -export type RoutingInfoType = ClosedEnum; +export const RoutingInfoTypeEnum = { + Rtn: 'rtn', + Aba: 'aba', + Swift: 'swift', + Bsb: 'bsb', + Iban: 'iban', + Nz2: 'nz2', + Trno: 'trno', + Sortcode: 'sortcode', + Blz: 'blz', + Ifsc: 'ifsc', + Bankcode: 'bankcode', + Apca: 'apca', + Clabe: 'clabe' +} as const; +export type RoutingInfoTypeEnum = typeof RoutingInfoTypeEnum[keyof typeof RoutingInfoTypeEnum]; + /** - * Routing information for the bank. This does not include account number. + * Check if a given object implements the RoutingInfo interface. */ -export type RoutingInfo = { - /** - * The numeric identifier of the routing number - */ - bankCode?: string | null | undefined; - /** - * The type of routing number. - */ - type?: RoutingInfoType | null | undefined; -}; +export function instanceOfRoutingInfo(value: object): value is RoutingInfo { + return true; +} -/** @internal */ -export const RoutingInfoType$inboundSchema: z.ZodNativeEnum< - typeof RoutingInfoType -> = z.nativeEnum(RoutingInfoType); -/** @internal */ -export const RoutingInfoType$outboundSchema: z.ZodNativeEnum< - typeof RoutingInfoType -> = RoutingInfoType$inboundSchema; +export function RoutingInfoFromJSON(json: any): RoutingInfo { + return RoutingInfoFromJSONTyped(json, false); +} -/** @internal */ -export const RoutingInfo$inboundSchema: z.ZodType< - RoutingInfo, - z.ZodTypeDef, - unknown -> = z.object({ - bankCode: z.nullable(z.string()).optional(), - type: z.nullable(RoutingInfoType$inboundSchema.default("bankcode")), -}); -/** @internal */ -export type RoutingInfo$Outbound = { - bankCode?: string | null | undefined; - type: string | null; -}; +export function RoutingInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoutingInfo { + if (json == null) { + return json; + } + return { + + 'bankCode': json['bankCode'] == null ? undefined : json['bankCode'], + 'type': json['type'] == null ? undefined : json['type'], + }; +} + +export function RoutingInfoToJSON(json: any): RoutingInfo { + return RoutingInfoToJSONTyped(json, false); +} + +export function RoutingInfoToJSONTyped(value?: RoutingInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'bankCode': value['bankCode'], + 'type': value['type'], + }; +} -/** @internal */ -export const RoutingInfo$outboundSchema: z.ZodType< - RoutingInfo$Outbound, - z.ZodTypeDef, - RoutingInfo -> = z.object({ - bankCode: z.nullable(z.string()).optional(), - type: z.nullable(RoutingInfoType$outboundSchema.default("bankcode")), -}); -export function routingInfoToJSON(routingInfo: RoutingInfo): string { - return JSON.stringify(RoutingInfo$outboundSchema.parse(routingInfo)); +export interface CreateSourceAccountRequestBodyRoutingInfo { + /** + * The numeric identifier of the routing number + * @type {string} + * @memberof RoutingInfo + */ + bankCode?: string | null; + /** + * The type of routing number. + * @type {string} + * @memberof RoutingInfo + */ + type?: RoutingInfoType | null; } -export function routingInfoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RoutingInfo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RoutingInfo' from JSON`, - ); + +export interface CreateSourceAccountResponseRoutingInfo { + /** + * The numeric identifier of the routing number + * @type {string} + * @memberof RoutingInfo + */ + bankCode?: string | null; + /** + * The type of routing number. + * @type {string} + * @memberof RoutingInfo + */ + type?: RoutingInfoType | null; +} + +export interface SourceAccountCreateResponseRoutingInfo { + /** + * The numeric identifier of the routing number + * @type {string} + * @memberof RoutingInfo + */ + bankCode?: string | null; + /** + * The type of routing number. + * @type {string} + * @memberof RoutingInfo + */ + type?: RoutingInfoType | null; +} + +export interface SourceAccountV2RoutingInfo { + /** + * The numeric identifier of the routing number + * @type {string} + * @memberof RoutingInfo + */ + bankCode?: string | null; + /** + * The type of routing number. + * @type {string} + * @memberof RoutingInfo + */ + type?: RoutingInfoType | null; } diff --git a/lending/src/sdk/models/shared/salesorderreference.ts b/lending/src/sdk/models/shared/salesorderreference.ts new file mode 100644 index 000000000..bee711b70 --- /dev/null +++ b/lending/src/sdk/models/shared/salesorderreference.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { AccountingInvoiceDataType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface SalesOrderReference + */ +export interface SalesOrderReference { + /** + * Unique identifier to a record in `dataType`. + * @type {string} + * @memberof SalesOrderReference + */ + id?: string; + /** + * The underlying data type associated to the reference `id`. + * @type {string} + * @memberof SalesOrderReference + */ + dataType?: AccountingInvoiceDataType; +} + + +/** + * @export + */ +export const SalesOrderReferenceDataTypeEnum = { + SalesOrders: 'salesOrders' +} as const; +export type SalesOrderReferenceDataTypeEnum = typeof SalesOrderReferenceDataTypeEnum[keyof typeof SalesOrderReferenceDataTypeEnum]; + + +/** + * Check if a given object implements the SalesOrderReference interface. + */ +export function instanceOfSalesOrderReference(value: object): value is SalesOrderReference { + return true; +} + +export function SalesOrderReferenceFromJSON(json: any): SalesOrderReference { + return SalesOrderReferenceFromJSONTyped(json, false); +} + +export function SalesOrderReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SalesOrderReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} + +export function SalesOrderReferenceToJSON(json: any): SalesOrderReference { + return SalesOrderReferenceToJSONTyped(json, false); +} + +export function SalesOrderReferenceToJSONTyped(value?: SalesOrderReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'dataType': value['dataType'], + }; +} + + +export interface AccountingInvoiceGetResponseSalesOrderReference { + /** + * Unique identifier to a record in `dataType`. + * @type {string} + * @memberof SalesOrderReference + */ + id?: string; + /** + * The underlying data type associated to the reference `id`. + * @type {string} + * @memberof SalesOrderReference + */ + dataType?: AccountingInvoiceDataType; +} + +export interface AccountingInvoiceSalesOrderReference { + /** + * Unique identifier to a record in `dataType`. + * @type {string} + * @memberof SalesOrderReference + */ + id?: string; + /** + * The underlying data type associated to the reference `id`. + * @type {string} + * @memberof SalesOrderReference + */ + dataType?: AccountingInvoiceDataType; +} + +export interface GetAccountingInvoiceResponseSalesOrderReference { + /** + * Unique identifier to a record in `dataType`. + * @type {string} + * @memberof SalesOrderReference + */ + id?: string; + /** + * The underlying data type associated to the reference `id`. + * @type {string} + * @memberof SalesOrderReference + */ + dataType?: AccountingInvoiceDataType; +} diff --git a/lending/src/sdk/models/shared/schema.ts b/lending/src/sdk/models/shared/schema.ts index 9103ba73b..569dbded2 100644 --- a/lending/src/sdk/models/shared/schema.ts +++ b/lending/src/sdk/models/shared/schema.ts @@ -1,89 +1,11 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ReportGenerationPayload, - ReportGenerationPayload$inboundSchema, - ReportGenerationPayload$Outbound, - ReportGenerationPayload$outboundSchema, -} from "./reportgenerationpayload.js"; +import type { ReportGenerationPayload } from './reportgenerationpayload'; export type Schema = { - /** - * Unique identifier of the event. - */ - id?: string | undefined; - /** - * The type of event. - */ - eventType?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - generatedDate?: string | undefined; - payload?: ReportGenerationPayload | undefined; + id?: string; + eventType?: string; + generatedDate?: string; + payload?: ReportGenerationPayload; }; - -/** @internal */ -export const Schema$inboundSchema: z.ZodType = z - .object({ - id: z.string().optional(), - eventType: z.string().optional(), - generatedDate: z.string().optional(), - payload: ReportGenerationPayload$inboundSchema.optional(), - }); -/** @internal */ -export type Schema$Outbound = { - id?: string | undefined; - eventType?: string | undefined; - generatedDate?: string | undefined; - payload?: ReportGenerationPayload$Outbound | undefined; -}; - -/** @internal */ -export const Schema$outboundSchema: z.ZodType< - Schema$Outbound, - z.ZodTypeDef, - Schema -> = z.object({ - id: z.string().optional(), - eventType: z.string().optional(), - generatedDate: z.string().optional(), - payload: ReportGenerationPayload$outboundSchema.optional(), -}); - -export function schemaToJSON(schema: Schema): string { - return JSON.stringify(Schema$outboundSchema.parse(schema)); -} -export function schemaFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Schema$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Schema' from JSON`, - ); -} diff --git a/lending/src/sdk/models/shared/security.ts b/lending/src/sdk/models/shared/security.ts deleted file mode 100644 index 675eaa582..000000000 --- a/lending/src/sdk/models/shared/security.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { remap as remap$ } from "../../../lib/primitives.js"; - -export type Security = { - authHeader: string; -}; - -/** @internal */ -export type Security$Outbound = { - auth_header: string; -}; - -/** @internal */ -export const Security$outboundSchema: z.ZodType< - Security$Outbound, - z.ZodTypeDef, - Security -> = z.object({ - authHeader: z.string(), -}).transform((v) => { - return remap$(v, { - authHeader: "auth_header", - }); -}); - -export function securityToJSON(security: Security): string { - return JSON.stringify(Security$outboundSchema.parse(security)); -} diff --git a/lending/src/sdk/models/shared/servicecharge.ts b/lending/src/sdk/models/shared/servicecharge.ts index 959d82bb5..b0879f3ec 100644 --- a/lending/src/sdk/models/shared/servicecharge.ts +++ b/lending/src/sdk/models/shared/servicecharge.ts @@ -1,73 +1,266 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { ServiceChargeType } from './servicechargetype'; import { - ServiceChargeType, - ServiceChargeType$inboundSchema, -} from "./servicechargetype.js"; + ServiceChargeTypeFromJSON, + ServiceChargeTypeFromJSONTyped, + ServiceChargeTypeToJSON, + ServiceChargeTypeToJSONTyped, +} from './servicechargetype'; +import type { TaxComponentAllocation } from './taxcomponentallocation'; import { - TaxComponentAllocation, - TaxComponentAllocation$inboundSchema, -} from "./taxcomponentallocation.js"; + TaxComponentAllocationFromJSON, + TaxComponentAllocationFromJSONTyped, + TaxComponentAllocationToJSON, + TaxComponentAllocationToJSONTyped, +} from './taxcomponentallocation'; + +/** + * + * @export + * @interface ServiceCharge + */ +export interface ServiceCharge { + /** + * Service charges for this order. + * @type {string} + * @memberof ServiceCharge + */ + description?: string; + /** + * Total amount of the service charge, including tax. + * @type {string} + * @memberof ServiceCharge + */ + totalAmount?: Decimal | number; + /** + * Percentage rate (from 0 to 100) of any tax applied to the service charge. + * @type {string} + * @memberof ServiceCharge + */ + taxPercentage?: Decimal | number; + /** + * Amount of the service charge that is tax. + * @type {string} + * @memberof ServiceCharge + */ + taxAmount?: Decimal | number; + /** + * Taxes breakdown as applied to service charges. + * @type {Array} + * @memberof ServiceCharge + */ + taxes?: Array; + /** + * The number of times the charge is charged. + * @type {number} + * @memberof ServiceCharge + */ + quantity?: number; + /** + * + * @type {ServiceChargeType} + * @memberof ServiceCharge + */ + type?: ServiceChargeType; +} + + + +/** + * Check if a given object implements the ServiceCharge interface. + */ +export function instanceOfServiceCharge(value: object): value is ServiceCharge { + return true; +} + +export function ServiceChargeFromJSON(json: any): ServiceCharge { + return ServiceChargeFromJSONTyped(json, false); +} + +export function ServiceChargeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceCharge { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'totalAmount': json['totalAmount'] == null ? undefined : toDecimal(json['totalAmount']), + 'taxPercentage': json['taxPercentage'] == null ? undefined : toDecimal(json['taxPercentage']), + 'taxAmount': json['taxAmount'] == null ? undefined : toDecimal(json['taxAmount']), + 'taxes': json['taxes'] == null ? undefined : ((json['taxes'] as Array).map(TaxComponentAllocationFromJSON)), + 'quantity': json['quantity'] == null ? undefined : json['quantity'], + 'type': json['type'] == null ? undefined : ServiceChargeTypeFromJSON(json['type']), + }; +} + +export function ServiceChargeToJSON(json: any): ServiceCharge { + return ServiceChargeToJSONTyped(json, false); +} + +export function ServiceChargeToJSONTyped(value?: ServiceCharge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'description': value['description'], + 'totalAmount': fromDecimal(value['totalAmount']), + 'taxPercentage': fromDecimal(value['taxPercentage']), + 'taxAmount': fromDecimal(value['taxAmount']), + 'taxes': value['taxes'] == null ? undefined : ((value['taxes'] as Array).map(TaxComponentAllocationToJSON)), + 'quantity': value['quantity'], + 'type': ServiceChargeTypeToJSON(value['type']), + }; +} -export type ServiceCharge = { - /** - * Service charges for this order. - */ - description?: string | undefined; - /** - * Total amount of the service charge, including tax. - */ - totalAmount?: Decimal$ | number | undefined; - /** - * Percentage rate (from 0 to 100) of any tax applied to the service charge. - */ - taxPercentage?: Decimal$ | number | undefined; - /** - * Amount of the service charge that is tax. - */ - taxAmount?: Decimal$ | number | undefined; - /** - * Taxes breakdown as applied to service charges. - */ - taxes?: Array | undefined; - /** - * The number of times the charge is charged. - */ - quantity?: number | undefined; - /** - * The type of the service charge. - */ - type?: ServiceChargeType | undefined; -}; -/** @internal */ -export const ServiceCharge$inboundSchema: z.ZodType< - ServiceCharge, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.string().optional(), - totalAmount: z.number().transform(v => new Decimal$(v)).optional(), - taxPercentage: z.number().transform(v => new Decimal$(v)).optional(), - taxAmount: z.number().transform(v => new Decimal$(v)).optional(), - taxes: z.array(TaxComponentAllocation$inboundSchema).optional(), - quantity: z.number().int().optional(), - type: ServiceChargeType$inboundSchema.optional(), -}); +export interface CommerceOrderGetResponseServiceCharge { + /** + * Service charges for this order. + * @type {string} + * @memberof ServiceCharge + */ + description?: string; + /** + * Total amount of the service charge, including tax. + * @type {string} + * @memberof ServiceCharge + */ + totalAmount?: Decimal | number; + /** + * Percentage rate (from 0 to 100) of any tax applied to the service charge. + * @type {string} + * @memberof ServiceCharge + */ + taxPercentage?: Decimal | number; + /** + * Amount of the service charge that is tax. + * @type {string} + * @memberof ServiceCharge + */ + taxAmount?: Decimal | number; + /** + * Taxes breakdown as applied to service charges. + * @type {Array} + * @memberof ServiceCharge + */ + taxes?: Array; + /** + * The number of times the charge is charged. + * @type {number} + * @memberof ServiceCharge + */ + quantity?: number; + /** + * + * @type {ServiceChargeType} + * @memberof ServiceCharge + */ + type?: ServiceChargeType; +} + +export interface CommerceOrderServiceCharge { + /** + * Service charges for this order. + * @type {string} + * @memberof ServiceCharge + */ + description?: string; + /** + * Total amount of the service charge, including tax. + * @type {string} + * @memberof ServiceCharge + */ + totalAmount?: Decimal | number; + /** + * Percentage rate (from 0 to 100) of any tax applied to the service charge. + * @type {string} + * @memberof ServiceCharge + */ + taxPercentage?: Decimal | number; + /** + * Amount of the service charge that is tax. + * @type {string} + * @memberof ServiceCharge + */ + taxAmount?: Decimal | number; + /** + * Taxes breakdown as applied to service charges. + * @type {Array} + * @memberof ServiceCharge + */ + taxes?: Array; + /** + * The number of times the charge is charged. + * @type {number} + * @memberof ServiceCharge + */ + quantity?: number; + /** + * + * @type {ServiceChargeType} + * @memberof ServiceCharge + */ + type?: ServiceChargeType; +} -export function serviceChargeFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ServiceCharge$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ServiceCharge' from JSON`, - ); +export interface GetCommerceOrderResponseServiceCharge { + /** + * Service charges for this order. + * @type {string} + * @memberof ServiceCharge + */ + description?: string; + /** + * Total amount of the service charge, including tax. + * @type {string} + * @memberof ServiceCharge + */ + totalAmount?: Decimal | number; + /** + * Percentage rate (from 0 to 100) of any tax applied to the service charge. + * @type {string} + * @memberof ServiceCharge + */ + taxPercentage?: Decimal | number; + /** + * Amount of the service charge that is tax. + * @type {string} + * @memberof ServiceCharge + */ + taxAmount?: Decimal | number; + /** + * Taxes breakdown as applied to service charges. + * @type {Array} + * @memberof ServiceCharge + */ + taxes?: Array; + /** + * The number of times the charge is charged. + * @type {number} + * @memberof ServiceCharge + */ + quantity?: number; + /** + * + * @type {ServiceChargeType} + * @memberof ServiceCharge + */ + type?: ServiceChargeType; } diff --git a/lending/src/sdk/models/shared/servicechargetype.ts b/lending/src/sdk/models/shared/servicechargetype.ts index 1fb280c5c..9b1d732f5 100644 --- a/lending/src/sdk/models/shared/servicechargetype.ts +++ b/lending/src/sdk/models/shared/servicechargetype.ts @@ -1,25 +1,55 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The type of the service charge. + * @export */ export const ServiceChargeType = { - Generic: "Generic", - Shipping: "Shipping", - Overpayment: "Overpayment", - Unknown: "Unknown", + Generic: 'Generic', + Shipping: 'Shipping', + Overpayment: 'Overpayment', + Unknown: 'Unknown' } as const; -/** - * The type of the service charge. - */ -export type ServiceChargeType = ClosedEnum; +export type ServiceChargeType = typeof ServiceChargeType[keyof typeof ServiceChargeType]; + + +export function instanceOfServiceChargeType(value: any): boolean { + for (const key in ServiceChargeType) { + if (Object.prototype.hasOwnProperty.call(ServiceChargeType, key)) { + if (ServiceChargeType[key as keyof typeof ServiceChargeType] === value) { + return true; + } + } + } + return false; +} + +export function ServiceChargeTypeFromJSON(json: any): ServiceChargeType { + return ServiceChargeTypeFromJSONTyped(json, false); +} + +export function ServiceChargeTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceChargeType { + return json as ServiceChargeType; +} + +export function ServiceChargeTypeToJSON(value?: ServiceChargeType | null): any { + return value as any; +} + +export function ServiceChargeTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ServiceChargeType { + return value as ServiceChargeType; +} -/** @internal */ -export const ServiceChargeType$inboundSchema: z.ZodNativeEnum< - typeof ServiceChargeType -> = z.nativeEnum(ServiceChargeType); diff --git a/lending/src/sdk/models/shared/sourceaccount.ts b/lending/src/sdk/models/shared/sourceaccount.ts index 48fc133e7..f7ee8f0e7 100644 --- a/lending/src/sdk/models/shared/sourceaccount.ts +++ b/lending/src/sdk/models/shared/sourceaccount.ts @@ -1,148 +1,941 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { SourceAccountStatus } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; /** - * Status of the source account. + * The target bank account in a supported accounting software for ingestion into a bank feed. + * @export + * @interface SourceAccount */ -export const SourceAccountStatus = { - Pending: "pending", - Connected: "connected", - Connecting: "connecting", - Disconnected: "disconnected", - Unknown: "unknown", -} as const; +export interface SourceAccount { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccount + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccount + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccount + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccount + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccount + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccount + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccount + */ + status?: SourceAccountStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + feedStartDate?: string; +} + + /** - * Status of the source account. + * @export */ -export type SourceAccountStatus = ClosedEnum; +export const SourceAccountStatusEnum = { + Pending: 'pending', + Connected: 'connected', + Connecting: 'connecting', + Disconnected: 'disconnected', + Unknown: 'unknown' +} as const; +export type SourceAccountStatusEnum = typeof SourceAccountStatusEnum[keyof typeof SourceAccountStatusEnum]; + /** - * The target bank account in a supported accounting software for ingestion into a bank feed. + * Check if a given object implements the SourceAccount interface. */ -export type SourceAccount = { - /** - * Unique ID for the bank account. - */ - id: string; - /** - * The bank account name. - */ - accountName?: string | null | undefined; - /** - * The type of bank account e.g. Credit. - */ - accountType?: string | null | undefined; - /** - * The account number. - */ - accountNumber?: string | null | undefined; - /** - * The sort code. - */ - sortCode?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * The latest balance for the bank account. - */ - balance?: Decimal$ | number | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - modifiedDate?: string | undefined; - /** - * Status of the source account. - */ - status?: SourceAccountStatus | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - feedStartDate?: string | undefined; -}; - -/** @internal */ -export const SourceAccountStatus$inboundSchema: z.ZodNativeEnum< - typeof SourceAccountStatus -> = z.nativeEnum(SourceAccountStatus); - -/** @internal */ -export const SourceAccount$inboundSchema: z.ZodType< - SourceAccount, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - accountName: z.nullable(z.string()).optional(), - accountType: z.nullable(z.string()).optional(), - accountNumber: z.nullable(z.string()).optional(), - sortCode: z.nullable(z.string()).optional(), - currency: z.string().optional(), - balance: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - modifiedDate: z.string().optional(), - status: z.nullable(SourceAccountStatus$inboundSchema).optional(), - feedStartDate: z.string().optional(), -}); - -export function sourceAccountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SourceAccount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SourceAccount' from JSON`, - ); +export function instanceOfSourceAccount(value: object): value is SourceAccount { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function SourceAccountFromJSON(json: any): SourceAccount { + return SourceAccountFromJSONTyped(json, false); +} + +export function SourceAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceAccount { + if (json == null) { + return json; + } + return { + + ...json, + 'id': json['id'], + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'accountType': json['accountType'] == null ? undefined : json['accountType'], + 'accountNumber': json['accountNumber'] == null ? undefined : json['accountNumber'], + 'sortCode': json['sortCode'] == null ? undefined : json['sortCode'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'status': json['status'] == null ? undefined : json['status'], + 'feedStartDate': json['feedStartDate'] == null ? undefined : json['feedStartDate'], + }; +} + +export function SourceAccountToJSON(json: any): SourceAccount { + return SourceAccountToJSONTyped(json, false); +} + +export function SourceAccountToJSONTyped(value?: SourceAccount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'id': value['id'], + 'accountName': value['accountName'], + 'accountType': value['accountType'], + 'accountNumber': value['accountNumber'], + 'sortCode': value['sortCode'], + 'currency': value['currency'], + 'balance': fromDecimal(value['balance']), + 'modifiedDate': value['modifiedDate'], + 'status': value['status'], + 'feedStartDate': value['feedStartDate'], + }; +} + + +export interface CreateSourceAccountRequestBodySourceAccountV1 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccount + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccount + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccount + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccount + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccount + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccount + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccount + */ + status?: SourceAccountStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + feedStartDate?: string; +} + +export interface CreateSourceAccountResponseSourceAccount { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccount + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccount + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccount + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccount + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccount + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccount + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccount + */ + status?: SourceAccountStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + feedStartDate?: string; +} + +export interface CreateSourceAccountResponseSourceAccountV1 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccount + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccount + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccount + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccount + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccount + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccount + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccount + */ + status?: SourceAccountStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + feedStartDate?: string; +} + +export interface SourceAccountCreateResponseSourceAccount { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccount + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccount + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccount + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccount + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccount + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccount + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccount + */ + status?: SourceAccountStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + feedStartDate?: string; +} + +export interface SourceAccountCreateResponseSourceAccountV1 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccount + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccount + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccount + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccount + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccount + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccount + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccount + */ + status?: SourceAccountStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + feedStartDate?: string; +} + +export interface SourceAccountSourceAccountV1 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccount + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccount + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccount + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccount + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccount + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccount + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccount + */ + status?: SourceAccountStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + feedStartDate?: string; +} + +export interface SourceAccountV1 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccount + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccount + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccount + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccount + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccount + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccount + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccount + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccount + */ + status?: SourceAccountStatus | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccount + */ + feedStartDate?: string; } diff --git a/lending/src/sdk/models/shared/sourceaccountprototype.ts b/lending/src/sdk/models/shared/sourceaccountprototype.ts index 02e7f4042..385fe0826 100644 --- a/lending/src/sdk/models/shared/sourceaccountprototype.ts +++ b/lending/src/sdk/models/shared/sourceaccountprototype.ts @@ -1,107 +1,222 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface SourceAccountPrototype + */ +export interface SourceAccountPrototype { + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccountPrototype + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccountPrototype + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccountPrototype + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccountPrototype + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccountPrototype + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccountPrototype + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccountPrototype + */ + modifiedDate?: string; +} + +/** + * Check if a given object implements the SourceAccountPrototype interface. + */ +export function instanceOfSourceAccountPrototype(value: object): value is SourceAccountPrototype { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function SourceAccountPrototypeFromJSON(json: any): SourceAccountPrototype { + return SourceAccountPrototypeFromJSONTyped(json, false); +} + +export function SourceAccountPrototypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceAccountPrototype { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'accountName': json['accountName'] == null ? undefined : json['accountName'], + 'accountType': json['accountType'] == null ? undefined : json['accountType'], + 'accountNumber': json['accountNumber'] == null ? undefined : json['accountNumber'], + 'sortCode': json['sortCode'] == null ? undefined : json['sortCode'], + 'currency': json['currency'] == null ? undefined : json['currency'], + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + }; +} -export type SourceAccountPrototype = { - /** - * Unique ID for the bank account. - */ - id: string; - /** - * The bank account name. - */ - accountName?: string | null | undefined; - /** - * The type of bank account e.g. Credit. - */ - accountType?: string | null | undefined; - /** - * The account number. - */ - accountNumber?: string | null | undefined; - /** - * The sort code. - */ - sortCode?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * The latest balance for the bank account. - */ - balance?: Decimal$ | number | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - modifiedDate?: string | undefined; -}; +export function SourceAccountPrototypeToJSON(json: any): SourceAccountPrototype { + return SourceAccountPrototypeToJSONTyped(json, false); +} + +export function SourceAccountPrototypeToJSONTyped(value?: SourceAccountPrototype | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -/** @internal */ -export type SourceAccountPrototype$Outbound = { - id: string; - accountName?: string | null | undefined; - accountType?: string | null | undefined; - accountNumber?: string | null | undefined; - sortCode?: string | null | undefined; - currency?: string | undefined; - balance?: number | null | undefined; - modifiedDate?: string | undefined; -}; + return { + + 'id': value['id'], + 'accountName': value['accountName'], + 'accountType': value['accountType'], + 'accountNumber': value['accountNumber'], + 'sortCode': value['sortCode'], + 'currency': value['currency'], + 'balance': fromDecimal(value['balance']), + 'modifiedDate': value['modifiedDate'], + }; +} -/** @internal */ -export const SourceAccountPrototype$outboundSchema: z.ZodType< - SourceAccountPrototype$Outbound, - z.ZodTypeDef, - SourceAccountPrototype -> = z.object({ - id: z.string(), - accountName: z.nullable(z.string()).optional(), - accountType: z.nullable(z.string()).optional(), - accountNumber: z.nullable(z.string()).optional(), - sortCode: z.nullable(z.string()).optional(), - currency: z.string().optional(), - balance: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - modifiedDate: z.string().optional(), -}); -export function sourceAccountPrototypeToJSON( - sourceAccountPrototype: SourceAccountPrototype, -): string { - return JSON.stringify( - SourceAccountPrototype$outboundSchema.parse(sourceAccountPrototype), - ); +export interface CreateSourceAccountRequestBodySourceAccountPrototype { + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccountPrototype + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccountPrototype + */ + accountName?: string | null; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccountPrototype + */ + accountType?: string | null; + /** + * The account number. + * @type {string} + * @memberof SourceAccountPrototype + */ + accountNumber?: string | null; + /** + * The sort code. + * @type {string} + * @memberof SourceAccountPrototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccountPrototype + */ + currency?: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccountPrototype + */ + balance?: Decimal | number | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccountPrototype + */ + modifiedDate?: string; } diff --git a/lending/src/sdk/models/shared/sourceaccountv2.ts b/lending/src/sdk/models/shared/sourceaccountv2.ts index db44341ad..53711d93e 100644 --- a/lending/src/sdk/models/shared/sourceaccountv2.ts +++ b/lending/src/sdk/models/shared/sourceaccountv2.ts @@ -1,166 +1,542 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { AccountInfo, AccountInfo$inboundSchema } from "./accountinfo.js"; -import { RoutingInfo, RoutingInfo$inboundSchema } from "./routinginfo.js"; +import type { SourceAccountV2AccountType } from '../_speakeasy_enums'; +import type { SourceAccountV2Status } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountInfo } from './accountinfo'; +import { + AccountInfoFromJSON, + AccountInfoFromJSONTyped, + AccountInfoToJSON, + AccountInfoToJSONTyped, +} from './accountinfo'; +import type { RoutingInfo } from './routinginfo'; +import { + RoutingInfoFromJSON, + RoutingInfoFromJSONTyped, + RoutingInfoToJSON, + RoutingInfoToJSONTyped, +} from './routinginfo'; /** - * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. - */ -export const SourceAccountV2AccountType = { - Checking: "checking", - Savings: "savings", - Loan: "loan", - CreditCard: "creditCard", - PrepaidCard: "prepaidCard", -} as const; -/** - * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. + * The target bank account in a supported accounting software for ingestion into a bank feed. + * @export + * @interface SourceAccountV2 */ -export type SourceAccountV2AccountType = ClosedEnum< - typeof SourceAccountV2AccountType ->; +export interface SourceAccountV2 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccountV2 + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccountV2 + */ + accountName: string; + /** + * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. + * @type {string} + * @memberof SourceAccountV2 + */ + accountType: SourceAccountV2AccountType; + /** + * The account number. + * @type {string} + * @memberof SourceAccountV2 + */ + accountNumber: string; + /** + * The sort code. + * @type {string} + * @memberof SourceAccountV2 + */ + sortCode?: string | null; + /** + * + * @type {RoutingInfo} + * @memberof SourceAccountV2 + */ + routingInfo?: RoutingInfo; + /** + * 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. + * @type {string} + * @memberof SourceAccountV2 + */ + currency: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccountV2 + */ + balance: Decimal | number; + /** + * + * @type {AccountInfo} + * @memberof SourceAccountV2 + */ + accountInfo?: AccountInfo | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccountV2 + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccountV2 + */ + status?: SourceAccountV2Status | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof SourceAccountV2 + */ + feedStartDate?: string | null; +} + /** - * Status of the source account. + * @export */ -export const SourceAccountV2Status = { - Pending: "pending", - Connected: "connected", - Connecting: "connecting", - Disconnected: "disconnected", - Unknown: "unknown", +export const SourceAccountV2AccountTypeEnum = { + Checking: 'checking', + Savings: 'savings', + Loan: 'loan', + CreditCard: 'creditCard', + PrepaidCard: 'prepaidCard' } as const; +export type SourceAccountV2AccountTypeEnum = typeof SourceAccountV2AccountTypeEnum[keyof typeof SourceAccountV2AccountTypeEnum]; + /** - * Status of the source account. + * @export */ -export type SourceAccountV2Status = ClosedEnum; +export const SourceAccountV2StatusEnum = { + Pending: 'pending', + Connected: 'connected', + Connecting: 'connecting', + Disconnected: 'disconnected', + Unknown: 'unknown' +} as const; +export type SourceAccountV2StatusEnum = typeof SourceAccountV2StatusEnum[keyof typeof SourceAccountV2StatusEnum]; + /** - * The target bank account in a supported accounting software for ingestion into a bank feed. + * Check if a given object implements the SourceAccountV2 interface. */ -export type SourceAccountV2 = { - /** - * Unique ID for the bank account. - */ - id: string; - /** - * The bank account name. - */ - accountName: string; - /** - * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. - */ - accountType: SourceAccountV2AccountType; - /** - * The account number. - */ - accountNumber: string; - /** - * The sort code. - */ - sortCode?: string | null | undefined; - /** - * Routing information for the bank. This does not include account number. - */ - routingInfo?: RoutingInfo | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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: string; - /** - * The latest balance for the bank account. - */ - balance: Decimal$ | number; - accountInfo?: AccountInfo | null | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - modifiedDate?: string | undefined; - /** - * Status of the source account. - */ - status?: SourceAccountV2Status | null | undefined; - /** - * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: - * - * @remarks - * ``` - * 2020-10-08 - * ``` - */ - feedStartDate?: string | null | undefined; -}; - -/** @internal */ -export const SourceAccountV2AccountType$inboundSchema: z.ZodNativeEnum< - typeof SourceAccountV2AccountType -> = z.nativeEnum(SourceAccountV2AccountType); - -/** @internal */ -export const SourceAccountV2Status$inboundSchema: z.ZodNativeEnum< - typeof SourceAccountV2Status -> = z.nativeEnum(SourceAccountV2Status); - -/** @internal */ -export const SourceAccountV2$inboundSchema: z.ZodType< - SourceAccountV2, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - accountName: z.string(), - accountType: SourceAccountV2AccountType$inboundSchema, - accountNumber: z.string(), - sortCode: z.nullable(z.string()).optional(), - routingInfo: RoutingInfo$inboundSchema.optional(), - currency: z.string(), - balance: z.number().transform(v => new Decimal$(v)), - accountInfo: z.nullable(AccountInfo$inboundSchema).optional(), - modifiedDate: z.string().optional(), - status: z.nullable(SourceAccountV2Status$inboundSchema).optional(), - feedStartDate: z.nullable(z.string()).optional(), -}); - -export function sourceAccountV2FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SourceAccountV2$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SourceAccountV2' from JSON`, - ); +export function instanceOfSourceAccountV2(value: object): value is SourceAccountV2 { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('accountName' in value) || value['accountName'] === undefined) return false; + if (!('accountType' in value) || value['accountType'] === undefined) return false; + if (!('accountNumber' in value) || value['accountNumber'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + if (!('balance' in value) || value['balance'] === undefined) return false; + return true; +} + +export function SourceAccountV2FromJSON(json: any): SourceAccountV2 { + return SourceAccountV2FromJSONTyped(json, false); +} + +export function SourceAccountV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceAccountV2 { + if (json == null) { + return json; + } + return { + + ...json, + 'id': json['id'], + 'accountName': json['accountName'], + 'accountType': json['accountType'], + 'accountNumber': json['accountNumber'], + 'sortCode': json['sortCode'] == null ? undefined : json['sortCode'], + 'routingInfo': json['routingInfo'] == null ? undefined : RoutingInfoFromJSON(json['routingInfo']), + 'currency': json['currency'], + 'balance': json['balance'], + 'accountInfo': json['accountInfo'] == null ? undefined : AccountInfoFromJSON(json['accountInfo']), + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'status': json['status'] == null ? undefined : json['status'], + 'feedStartDate': json['feedStartDate'] == null ? undefined : json['feedStartDate'], + }; +} + +export function SourceAccountV2ToJSON(json: any): SourceAccountV2 { + return SourceAccountV2ToJSONTyped(json, false); +} + +export function SourceAccountV2ToJSONTyped(value?: SourceAccountV2 | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'id': value['id'], + 'accountName': value['accountName'], + 'accountType': value['accountType'], + 'accountNumber': value['accountNumber'], + 'sortCode': value['sortCode'], + 'routingInfo': RoutingInfoToJSON(value['routingInfo']), + 'currency': value['currency'], + 'balance': fromDecimal(value['balance']), + 'accountInfo': AccountInfoToJSON(value['accountInfo']), + 'modifiedDate': value['modifiedDate'], + 'status': value['status'], + 'feedStartDate': value['feedStartDate'], + }; +} + + +export interface CreateSourceAccountRequestBodySourceAccountV2 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccountV2 + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccountV2 + */ + accountName: string; + /** + * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. + * @type {string} + * @memberof SourceAccountV2 + */ + accountType: SourceAccountV2AccountType; + /** + * The account number. + * @type {string} + * @memberof SourceAccountV2 + */ + accountNumber: string; + /** + * The sort code. + * @type {string} + * @memberof SourceAccountV2 + */ + sortCode?: string | null; + /** + * + * @type {RoutingInfo} + * @memberof SourceAccountV2 + */ + routingInfo?: RoutingInfo; + /** + * 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. + * @type {string} + * @memberof SourceAccountV2 + */ + currency: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccountV2 + */ + balance: Decimal | number; + /** + * + * @type {AccountInfo} + * @memberof SourceAccountV2 + */ + accountInfo?: AccountInfo | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccountV2 + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccountV2 + */ + status?: SourceAccountV2Status | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof SourceAccountV2 + */ + feedStartDate?: string | null; +} + +export interface CreateSourceAccountResponseSourceAccountV2 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccountV2 + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccountV2 + */ + accountName: string; + /** + * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. + * @type {string} + * @memberof SourceAccountV2 + */ + accountType: SourceAccountV2AccountType; + /** + * The account number. + * @type {string} + * @memberof SourceAccountV2 + */ + accountNumber: string; + /** + * The sort code. + * @type {string} + * @memberof SourceAccountV2 + */ + sortCode?: string | null; + /** + * + * @type {RoutingInfo} + * @memberof SourceAccountV2 + */ + routingInfo?: RoutingInfo; + /** + * 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. + * @type {string} + * @memberof SourceAccountV2 + */ + currency: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccountV2 + */ + balance: Decimal | number; + /** + * + * @type {AccountInfo} + * @memberof SourceAccountV2 + */ + accountInfo?: AccountInfo | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccountV2 + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccountV2 + */ + status?: SourceAccountV2Status | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof SourceAccountV2 + */ + feedStartDate?: string | null; +} + +export interface SourceAccountCreateResponseSourceAccountV2 { + [key: string]: any | any; + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccountV2 + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccountV2 + */ + accountName: string; + /** + * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. + * @type {string} + * @memberof SourceAccountV2 + */ + accountType: SourceAccountV2AccountType; + /** + * The account number. + * @type {string} + * @memberof SourceAccountV2 + */ + accountNumber: string; + /** + * The sort code. + * @type {string} + * @memberof SourceAccountV2 + */ + sortCode?: string | null; + /** + * + * @type {RoutingInfo} + * @memberof SourceAccountV2 + */ + routingInfo?: RoutingInfo; + /** + * 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. + * @type {string} + * @memberof SourceAccountV2 + */ + currency: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccountV2 + */ + balance: Decimal | number; + /** + * + * @type {AccountInfo} + * @memberof SourceAccountV2 + */ + accountInfo?: AccountInfo | null; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccountV2 + */ + modifiedDate?: string; + /** + * Status of the source account. + * @type {string} + * @memberof SourceAccountV2 + */ + status?: SourceAccountV2Status | null; + /** + * In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: + * ``` + * 2020-10-08 + * ``` + * @type {string} + * @memberof SourceAccountV2 + */ + feedStartDate?: string | null; } diff --git a/lending/src/sdk/models/shared/sourceaccountv2prototype.ts b/lending/src/sdk/models/shared/sourceaccountv2prototype.ts index 29b0efdc2..32ae517fc 100644 --- a/lending/src/sdk/models/shared/sourceaccountv2prototype.ts +++ b/lending/src/sdk/models/shared/sourceaccountv2prototype.ts @@ -1,128 +1,271 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; +import type { PropertieAccountType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountInfo } from './accountinfo'; import { - AccountInfo, - AccountInfo$Outbound, - AccountInfo$outboundSchema, -} from "./accountinfo.js"; + AccountInfoFromJSON, + AccountInfoFromJSONTyped, + AccountInfoToJSON, + AccountInfoToJSONTyped, +} from './accountinfo'; +import type { RoutingInfo } from './routinginfo'; import { - PropertieAccountType, - PropertieAccountType$outboundSchema, -} from "./propertieaccounttype.js"; -import { - RoutingInfo, - RoutingInfo$Outbound, - RoutingInfo$outboundSchema, -} from "./routinginfo.js"; + RoutingInfoFromJSON, + RoutingInfoFromJSONTyped, + RoutingInfoToJSON, + RoutingInfoToJSONTyped, +} from './routinginfo'; + +/** + * + * @export + * @interface SourceAccountV2Prototype + */ +export interface SourceAccountV2Prototype { + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + accountName: string; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + accountType: PropertieAccountType; + /** + * The account number. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + accountNumber: string; + /** + * + * @type {RoutingInfo} + * @memberof SourceAccountV2Prototype + */ + routingInfo?: RoutingInfo; + /** + * The sort code. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + currency: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + balance: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + modifiedDate?: string; + /** + * + * @type {AccountInfo} + * @memberof SourceAccountV2Prototype + */ + accountInfo?: AccountInfo | null; +} + +/** + * Check if a given object implements the SourceAccountV2Prototype interface. + */ +export function instanceOfSourceAccountV2Prototype(value: object): value is SourceAccountV2Prototype { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('accountName' in value) || value['accountName'] === undefined) return false; + if (!('accountType' in value) || value['accountType'] === undefined) return false; + if (!('accountNumber' in value) || value['accountNumber'] === undefined) return false; + if (!('currency' in value) || value['currency'] === undefined) return false; + if (!('balance' in value) || value['balance'] === undefined) return false; + return true; +} -export type SourceAccountV2Prototype = { - /** - * Unique ID for the bank account. - */ - id: string; - /** - * The bank account name. - */ - accountName: string; - /** - * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. - */ - accountType: PropertieAccountType; - /** - * The account number. - */ - accountNumber: string; - /** - * Routing information for the bank. This does not include account number. - */ - routingInfo?: RoutingInfo | undefined; - /** - * The sort code. - */ - sortCode?: string | null | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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: string; - /** - * The latest balance for the bank account. - */ - balance: Decimal$ | number; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - modifiedDate?: string | undefined; - accountInfo?: AccountInfo | null | undefined; -}; +export function SourceAccountV2PrototypeFromJSON(json: any): SourceAccountV2Prototype { + return SourceAccountV2PrototypeFromJSONTyped(json, false); +} + +export function SourceAccountV2PrototypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceAccountV2Prototype { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'accountName': json['accountName'], + 'accountType': json['accountType'], + 'accountNumber': json['accountNumber'], + 'routingInfo': json['routingInfo'] == null ? undefined : RoutingInfoFromJSON(json['routingInfo']), + 'sortCode': json['sortCode'] == null ? undefined : json['sortCode'], + 'currency': json['currency'], + 'balance': json['balance'], + 'modifiedDate': json['modifiedDate'] == null ? undefined : json['modifiedDate'], + 'accountInfo': json['accountInfo'] == null ? undefined : AccountInfoFromJSON(json['accountInfo']), + }; +} -/** @internal */ -export type SourceAccountV2Prototype$Outbound = { - id: string; - accountName: string; - accountType: string; - accountNumber: string; - routingInfo?: RoutingInfo$Outbound | undefined; - sortCode?: string | null | undefined; - currency: string; - balance: number; - modifiedDate?: string | undefined; - accountInfo?: AccountInfo$Outbound | null | undefined; -}; +export function SourceAccountV2PrototypeToJSON(json: any): SourceAccountV2Prototype { + return SourceAccountV2PrototypeToJSONTyped(json, false); +} + +export function SourceAccountV2PrototypeToJSONTyped(value?: SourceAccountV2Prototype | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'accountName': value['accountName'], + 'accountType': value['accountType'], + 'accountNumber': value['accountNumber'], + 'routingInfo': RoutingInfoToJSON(value['routingInfo']), + 'sortCode': value['sortCode'], + 'currency': value['currency'], + 'balance': fromDecimal(value['balance']), + 'modifiedDate': value['modifiedDate'], + 'accountInfo': AccountInfoToJSON(value['accountInfo']), + }; +} -/** @internal */ -export const SourceAccountV2Prototype$outboundSchema: z.ZodType< - SourceAccountV2Prototype$Outbound, - z.ZodTypeDef, - SourceAccountV2Prototype -> = z.object({ - id: z.string(), - accountName: z.string(), - accountType: PropertieAccountType$outboundSchema, - accountNumber: z.string(), - routingInfo: RoutingInfo$outboundSchema.optional(), - sortCode: z.nullable(z.string()).optional(), - currency: z.string(), - balance: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - modifiedDate: z.string().optional(), - accountInfo: z.nullable(AccountInfo$outboundSchema).optional(), -}); -export function sourceAccountV2PrototypeToJSON( - sourceAccountV2Prototype: SourceAccountV2Prototype, -): string { - return JSON.stringify( - SourceAccountV2Prototype$outboundSchema.parse(sourceAccountV2Prototype), - ); +export interface CreateSourceAccountRequestBodySourceAccountV2Prototype { + /** + * Unique ID for the bank account. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + id: string; + /** + * The bank account name. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + accountName: string; + /** + * The type of bank account e.g. Credit. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + accountType: string; + /** + * The account number. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + accountNumber: string; + /** + * + * @type {RoutingInfo} + * @memberof SourceAccountV2Prototype + */ + routingInfo?: RoutingInfo; + /** + * The sort code. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + sortCode?: string | null; + /** + * 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. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + currency: string; + /** + * The latest balance for the bank account. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + balance: Decimal | number; + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00: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. + * @type {string} + * @memberof SourceAccountV2Prototype + */ + modifiedDate?: string; + /** + * + * @type {AccountInfo} + * @memberof SourceAccountV2Prototype + */ + accountInfo?: AccountInfo | null; } diff --git a/lending/src/sdk/models/shared/sourceref.ts b/lending/src/sdk/models/shared/sourceref.ts index 304ee9233..10146dc1e 100644 --- a/lending/src/sdk/models/shared/sourceref.ts +++ b/lending/src/sdk/models/shared/sourceref.ts @@ -1,37 +1,92 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * A source reference containing the `sourceType` object "Banking". + * @export + * @interface SourceRef + */ +export interface SourceRef { + /** + * The data source type. + * @type {string} + * @memberof SourceRef + */ + sourceType?: string; +} + +/** + * Check if a given object implements the SourceRef interface. */ -export type SourceRef = { - /** - * The data source type. - */ - sourceType?: string | undefined; -}; - -/** @internal */ -export const SourceRef$inboundSchema: z.ZodType< - SourceRef, - z.ZodTypeDef, - unknown -> = z.object({ - sourceType: z.string().optional(), -}); - -export function sourceRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SourceRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SourceRef' from JSON`, - ); +export function instanceOfSourceRef(value: object): value is SourceRef { + return true; +} + +export function SourceRefFromJSON(json: any): SourceRef { + return SourceRefFromJSONTyped(json, false); +} + +export function SourceRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceRef { + if (json == null) { + return json; + } + return { + + 'sourceType': json['sourceType'] == null ? undefined : json['sourceType'], + }; +} + +export function SourceRefToJSON(json: any): SourceRef { + return SourceRefToJSONTyped(json, false); +} + +export function SourceRefToJSONTyped(value?: SourceRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'sourceType': value['sourceType'], + }; +} + + +export interface CashFlowTransactionSourceRef { + /** + * The data source type. + * @type {string} + * @memberof SourceRef + */ + sourceType?: string; +} + +export interface CategorizedBankStatementAccountsSourceRef { + /** + * The data source type. + * @type {string} + * @memberof SourceRef + */ + sourceType?: string; +} + +export interface CategorizedBankStatementTransactionsSourceRef { + /** + * The data source type. + * @type {string} + * @memberof SourceRef + */ + sourceType?: string; } diff --git a/lending/src/sdk/models/shared/startuploadsessionrequest.ts b/lending/src/sdk/models/shared/startuploadsessionrequest.ts index 75d80b992..4a5ab6fec 100644 --- a/lending/src/sdk/models/shared/startuploadsessionrequest.ts +++ b/lending/src/sdk/models/shared/startuploadsessionrequest.ts @@ -1,54 +1,123 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; +import type { StartUploadSessionRequestDataType } from '../_speakeasy_enums'; +import type { Accounts } from './accounts'; +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface StartUploadSessionRequest + */ +export interface StartUploadSessionRequest { + /** + * A key for a Codat data type. + * @type {string} + * @memberof StartUploadSessionRequest + */ + dataType?: StartUploadSessionRequestDataType; +} + /** - * A key for a Codat data type. + * @export */ -export const StartUploadSessionRequestDataType = { - BankingAccounts: "banking-accounts", - BankingTransactions: "banking-transactions", +export const StartUploadSessionRequestDataTypeEnum = { + Accounts: 'banking-accounts', + Transactions: 'banking-transactions' } as const; +export type StartUploadSessionRequestDataTypeEnum = typeof StartUploadSessionRequestDataTypeEnum[keyof typeof StartUploadSessionRequestDataTypeEnum]; + + /** - * A key for a Codat data type. + * Check if a given object implements the StartUploadSessionRequest interface. */ -export type StartUploadSessionRequestDataType = ClosedEnum< - typeof StartUploadSessionRequestDataType ->; - -export type StartUploadSessionRequest = { - /** - * A key for a Codat data type. - */ - dataType?: StartUploadSessionRequestDataType | undefined; -}; - -/** @internal */ -export const StartUploadSessionRequestDataType$outboundSchema: z.ZodNativeEnum< - typeof StartUploadSessionRequestDataType -> = z.nativeEnum(StartUploadSessionRequestDataType); - -/** @internal */ -export type StartUploadSessionRequest$Outbound = { - dataType?: string | undefined; -}; - -/** @internal */ -export const StartUploadSessionRequest$outboundSchema: z.ZodType< - StartUploadSessionRequest$Outbound, - z.ZodTypeDef, - StartUploadSessionRequest -> = z.object({ - dataType: StartUploadSessionRequestDataType$outboundSchema.optional(), -}); - -export function startUploadSessionRequestToJSON( - startUploadSessionRequest: StartUploadSessionRequest, -): string { - return JSON.stringify( - StartUploadSessionRequest$outboundSchema.parse(startUploadSessionRequest), - ); +export function instanceOfStartUploadSessionRequest(value: object): value is StartUploadSessionRequest { + return true; +} + +export function StartUploadSessionRequestFromJSON(json: any): StartUploadSessionRequest { + return StartUploadSessionRequestFromJSONTyped(json, false); +} + +export function StartUploadSessionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StartUploadSessionRequest { + if (json == null) { + return json; + } + return { + + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} + +export function StartUploadSessionRequestToJSON(json: any): StartUploadSessionRequest { + return StartUploadSessionRequestToJSONTyped(json, false); +} + +export function StartUploadSessionRequestToJSONTyped(value?: StartUploadSessionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'dataType': value['dataType'], + }; +} + + +export interface BankStatementUploadSessionStartRequestBody { + /** + * A key for a Codat data type. + * @type {string} + * @memberof StartUploadSessionRequest + */ + dataType?: StartUploadSessionRequestDataType; +} + +export interface StartBankStatementUploadSessionRequestBody { + /** + * A key for a Codat data type. + * @type {string} + * @memberof StartUploadSessionRequest + */ + dataType?: StartUploadSessionRequestDataType; +} + +export interface StartBankStatementUploadSessionStartUploadSessionRequest { + /** + * A key for a Codat data type. + * @type {string} + * @memberof StartUploadSessionRequest + */ + dataType?: StartUploadSessionRequestDataType; +} + +export interface StartUploadSessionRequestUploadSessionStartRequest { + /** + * A key for a Codat data type. + * @type {string} + * @memberof StartUploadSessionRequest + */ + dataType?: StartUploadSessionRequestDataType; +} + +export interface UploadSessionStartRequest { + /** + * A key for a Codat data type. + * @type {string} + * @memberof StartUploadSessionRequest + */ + dataType?: StartUploadSessionRequestDataType; } diff --git a/lending/src/sdk/models/shared/status.ts b/lending/src/sdk/models/shared/status.ts index 7b458b0a8..58605133b 100644 --- a/lending/src/sdk/models/shared/status.ts +++ b/lending/src/sdk/models/shared/status.ts @@ -1,41 +1,72 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The current status of the dataset. + * @export */ export const Status = { - Initial: "Initial", - Queued: "Queued", - Fetching: "Fetching", - MapQueued: "MapQueued", - Mapping: "Mapping", - Complete: "Complete", - FetchError: "FetchError", - MapError: "MapError", - InternalError: "InternalError", - ProcessingQueued: "ProcessingQueued", - Processing: "Processing", - ProcessingError: "ProcessingError", - ValidationQueued: "ValidationQueued", - Validating: "Validating", - ValidationError: "ValidationError", - AuthError: "AuthError", - Cancelled: "Cancelled", - NotSupported: "NotSupported", - RateLimitError: "RateLimitError", - PermissionsError: "PermissionsError", - PrerequisiteNotMet: "PrerequisiteNotMet", + Initial: 'Initial', + Queued: 'Queued', + Fetching: 'Fetching', + MapQueued: 'MapQueued', + Mapping: 'Mapping', + Complete: 'Complete', + FetchError: 'FetchError', + MapError: 'MapError', + InternalError: 'InternalError', + ProcessingQueued: 'ProcessingQueued', + Processing: 'Processing', + ProcessingError: 'ProcessingError', + ValidationQueued: 'ValidationQueued', + Validating: 'Validating', + ValidationError: 'ValidationError', + AuthError: 'AuthError', + Cancelled: 'Cancelled', + NotSupported: 'NotSupported', + RateLimitError: 'RateLimitError', + PermissionsError: 'PermissionsError', + PrerequisiteNotMet: 'PrerequisiteNotMet' } as const; -/** - * The current status of the dataset. - */ -export type Status = ClosedEnum; +export type Status = typeof Status[keyof typeof Status]; + + +export function instanceOfStatus(value: any): boolean { + for (const key in Status) { + if (Object.prototype.hasOwnProperty.call(Status, key)) { + if (Status[key as keyof typeof Status] === value) { + return true; + } + } + } + return false; +} + +export function StatusFromJSON(json: any): Status { + return StatusFromJSONTyped(json, false); +} + +export function StatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): Status { + return json as Status; +} + +export function StatusToJSON(value?: Status | null): any { + return value as any; +} + +export function StatusToJSONTyped(value: any, ignoreDiscriminator: boolean): Status { + return value as Status; +} -/** @internal */ -export const Status$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Status); diff --git a/lending/src/sdk/models/shared/supplementaldata.ts b/lending/src/sdk/models/shared/supplementaldata.ts index bdea4887c..0e7e41ec6 100644 --- a/lending/src/sdk/models/shared/supplementaldata.ts +++ b/lending/src/sdk/models/shared/supplementaldata.ts @@ -1,58 +1,922 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +/* tslint:disable */ +/* eslint-disable */ /** - * Supplemental data is additional data you can include in our standard data types. + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | * - * @remarks + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +/** + * 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 software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. + * @export + * @interface SupplementalData + */ +export interface SupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +/** + * Check if a given object implements the SupplementalData interface. */ -export type SupplementalData = { - content?: { [k: string]: { [k: string]: any } } | null | undefined; -}; - -/** @internal */ -export const SupplementalData$inboundSchema: z.ZodType< - SupplementalData, - z.ZodTypeDef, - unknown -> = z.object({ - content: z.nullable(z.record(z.record(z.any()))).optional(), -}); -/** @internal */ -export type SupplementalData$Outbound = { - content?: { [k: string]: { [k: string]: any } } | null | undefined; -}; - -/** @internal */ -export const SupplementalData$outboundSchema: z.ZodType< - SupplementalData$Outbound, - z.ZodTypeDef, - SupplementalData -> = z.object({ - content: z.nullable(z.record(z.record(z.any()))).optional(), -}); - -export function supplementalDataToJSON( - supplementalData: SupplementalData, -): string { - return JSON.stringify( - SupplementalData$outboundSchema.parse(supplementalData), - ); -} -export function supplementalDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SupplementalData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SupplementalData' from JSON`, - ); +export function instanceOfSupplementalData(value: object): value is SupplementalData { + return true; +} + +export function SupplementalDataFromJSON(json: any): SupplementalData { + return SupplementalDataFromJSONTyped(json, false); +} + +export function SupplementalDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupplementalData { + if (json == null) { + return json; + } + return { + + 'content': json['content'] == null ? undefined : json['content'], + }; +} + +export function SupplementalDataToJSON(json: any): SupplementalData { + return SupplementalDataToJSONTyped(json, false); +} + +export function SupplementalDataToJSONTyped(value?: SupplementalData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'content': value['content'], + }; +} + + +export interface AccountCreateResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingAccountGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingAccountSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingAccountsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBankAccountGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBankAccountSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBankAccountsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillCreditNoteGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillCreditNoteSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillCreditNotesSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillPaymentGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillPaymentSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillPaymentsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingBillsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCompanyInfoSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCompanyInformationSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreateAccountResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreateBankAccountResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreateDirectCostResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreatePaymentResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreateSupplierResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreateTransferResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreditNoteGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreditNoteSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCreditNotesSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCustomerGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCustomerSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingCustomersSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingDirectCostGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingDirectCostSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingDirectCostsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingDirectIncomeGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingDirectIncomeSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingDirectIncomesSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingInvoiceGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingInvoiceSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingInvoicesSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingJournalEntriesSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingJournalEntryGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingJournalEntrySupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingPaymentGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingPaymentSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingPaymentsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingProfileGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingSupplierGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingSupplierSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingSuppliersSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingTransferGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingTransferSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface AccountingTransfersSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface BankAccountCreateResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceOrderGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceOrderSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceOrdersSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommercePaymentGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommercePaymentSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommercePaymentsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceProductGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceProductSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceProductsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceTransactionGetResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceTransactionSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CommerceTransactionsSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CreateAccountResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CreateBankAccountResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CreateDirectCostResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CreatePaymentResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CreateSupplierResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface CreateTransferResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface DirectCostCreateResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingAccountResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingBankAccountResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingBillCreditNoteResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingBillPaymentResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingBillResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingCreditNoteResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingCustomerResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingDirectCostResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingDirectIncomeResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingInvoiceResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingJournalEntryResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingPaymentResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingProfileResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingSupplierResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetAccountingTransferResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetCommerceOrderResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetCommercePaymentResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetCommerceProductResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface GetCommerceTransactionResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface PaymentCreateResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface SupplierCreateResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface SuppliersSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; +} + +export interface TransferCreateResponseSupplementalData { + /** + * + * @type {{ [key: string]: { [key: string]: any; }; }} + * @memberof SupplementalData + */ + content?: { [key: string]: { [key: string]: any; }; } | null; } diff --git a/lending/src/sdk/models/shared/supplierref.ts b/lending/src/sdk/models/shared/supplierref.ts index 009a61f65..ad95febb7 100644 --- a/lending/src/sdk/models/shared/supplierref.ts +++ b/lending/src/sdk/models/shared/supplierref.ts @@ -1,42 +1,254 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Reference to the supplier the record relates to. + * @export + * @interface SupplierRef + */ +export interface SupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +/** + * Check if a given object implements the SupplierRef interface. */ -export type SupplierRef = { - /** - * The supplier's unique ID - */ - id: string; - /** - * The supplier's name - */ - supplierName?: string | null | undefined; -}; - -/** @internal */ -export const SupplierRef$inboundSchema: z.ZodType< - SupplierRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - supplierName: z.nullable(z.string()).optional(), -}); - -export function supplierRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SupplierRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SupplierRef' from JSON`, - ); +export function instanceOfSupplierRef(value: object): value is SupplierRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function SupplierRefFromJSON(json: any): SupplierRef { + return SupplierRefFromJSONTyped(json, false); +} + +export function SupplierRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupplierRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'supplierName': json['supplierName'] == null ? undefined : json['supplierName'], + }; +} + +export function SupplierRefToJSON(json: any): SupplierRef { + return SupplierRefToJSONTyped(json, false); +} + +export function SupplierRefToJSONTyped(value?: SupplierRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'supplierName': value['supplierName'], + }; +} + + +export interface AccountingBillCreditNoteGetResponseSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface AccountingBillCreditNoteSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface AccountingBillCreditNotesSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface AccountingBillGetResponseSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface AccountingBillPaymentGetResponseSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface AccountingBillPaymentSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface AccountingBillPaymentsSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface AccountingBillSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface AccountingBillsSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface GetAccountingBillCreditNoteResponseSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface GetAccountingBillPaymentResponseSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; +} + +export interface GetAccountingBillResponseSupplierRef { + /** + * The supplier's unique ID + * @type {string} + * @memberof SupplierRef + */ + id: string; + /** + * The supplier's name + * @type {string} + * @memberof SupplierRef + */ + supplierName?: string | null; } diff --git a/lending/src/sdk/models/shared/supplierstatus.ts b/lending/src/sdk/models/shared/supplierstatus.ts index 21b6220e1..52c55ded0 100644 --- a/lending/src/sdk/models/shared/supplierstatus.ts +++ b/lending/src/sdk/models/shared/supplierstatus.ts @@ -1,28 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Status of the supplier. + * @export */ export const SupplierStatus = { - Unknown: "Unknown", - Active: "Active", - Archived: "Archived", + Unknown: 'Unknown', + Active: 'Active', + Archived: 'Archived' } as const; -/** - * Status of the supplier. - */ -export type SupplierStatus = ClosedEnum; - -/** @internal */ -export const SupplierStatus$inboundSchema: z.ZodNativeEnum< - typeof SupplierStatus -> = z.nativeEnum(SupplierStatus); -/** @internal */ -export const SupplierStatus$outboundSchema: z.ZodNativeEnum< - typeof SupplierStatus -> = SupplierStatus$inboundSchema; +export type SupplierStatus = typeof SupplierStatus[keyof typeof SupplierStatus]; + + +export function instanceOfSupplierStatus(value: any): boolean { + for (const key in SupplierStatus) { + if (Object.prototype.hasOwnProperty.call(SupplierStatus, key)) { + if (SupplierStatus[key as keyof typeof SupplierStatus] === value) { + return true; + } + } + } + return false; +} + +export function SupplierStatusFromJSON(json: any): SupplierStatus { + return SupplierStatusFromJSONTyped(json, false); +} + +export function SupplierStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupplierStatus { + return json as SupplierStatus; +} + +export function SupplierStatusToJSON(value?: SupplierStatus | null): any { + return value as any; +} + +export function SupplierStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): SupplierStatus { + return value as SupplierStatus; +} + diff --git a/lending/src/sdk/models/shared/targetaccountoption.ts b/lending/src/sdk/models/shared/targetaccountoption.ts index 4a5824cc9..6f582b2a7 100644 --- a/lending/src/sdk/models/shared/targetaccountoption.ts +++ b/lending/src/sdk/models/shared/targetaccountoption.ts @@ -1,55 +1,131 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TargetAccountOption = { - /** - * Id of the target account. - */ - id?: string | undefined; - /** - * Name of the target account. - */ - name?: string | null | undefined; - /** - * The balance of the account. - */ - balance?: Decimal$ | number | null | undefined; - /** - * The sort code of the account. - */ - sortCode?: string | null | undefined; - /** - * The account number of the account. - */ - accountNumber?: string | null | undefined; -}; - -/** @internal */ -export const TargetAccountOption$inboundSchema: z.ZodType< - TargetAccountOption, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.nullable(z.string()).optional(), - balance: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - sortCode: z.nullable(z.string()).optional(), - accountNumber: z.nullable(z.string()).optional(), -}); - -export function targetAccountOptionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TargetAccountOption$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TargetAccountOption' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface TargetAccountOption + */ +export interface TargetAccountOption { + /** + * Id of the target account. + * @type {string} + * @memberof TargetAccountOption + */ + id?: string; + /** + * Name of the target account. + * @type {string} + * @memberof TargetAccountOption + */ + name?: string | null; + /** + * The balance of the account. + * @type {string} + * @memberof TargetAccountOption + */ + balance?: Decimal | number | null; + /** + * The sort code of the account. + * @type {string} + * @memberof TargetAccountOption + */ + sortCode?: string | null; + /** + * The account number of the account. + * @type {string} + * @memberof TargetAccountOption + */ + accountNumber?: string | null; +} + +/** + * Check if a given object implements the TargetAccountOption interface. + */ +export function instanceOfTargetAccountOption(value: object): value is TargetAccountOption { + return true; +} + +export function TargetAccountOptionFromJSON(json: any): TargetAccountOption { + return TargetAccountOptionFromJSONTyped(json, false); +} + +export function TargetAccountOptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TargetAccountOption { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'balance': json['balance'] == null ? undefined : toDecimal(json['balance']), + 'sortCode': json['sortCode'] == null ? undefined : json['sortCode'], + 'accountNumber': json['accountNumber'] == null ? undefined : json['accountNumber'], + }; +} + +export function TargetAccountOptionToJSON(json: any): TargetAccountOption { + return TargetAccountOptionToJSONTyped(json, false); +} + +export function TargetAccountOptionToJSONTyped(value?: TargetAccountOption | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'balance': fromDecimal(value['balance']), + 'sortCode': value['sortCode'], + 'accountNumber': value['accountNumber'], + }; +} + + +export interface BankFeedMappingTargetAccountOption { + /** + * Id of the target account. + * @type {string} + * @memberof TargetAccountOption + */ + id?: string; + /** + * Name of the target account. + * @type {string} + * @memberof TargetAccountOption + */ + name?: string | null; + /** + * The balance of the account. + * @type {string} + * @memberof TargetAccountOption + */ + balance?: Decimal | number | null; + /** + * The sort code of the account. + * @type {string} + * @memberof TargetAccountOption + */ + sortCode?: string | null; + /** + * The account number of the account. + * @type {string} + * @memberof TargetAccountOption + */ + accountNumber?: string | null; } diff --git a/lending/src/sdk/models/shared/taxcomponentallocation.ts b/lending/src/sdk/models/shared/taxcomponentallocation.ts index b789d8dc6..a1de18377 100644 --- a/lending/src/sdk/models/shared/taxcomponentallocation.ts +++ b/lending/src/sdk/models/shared/taxcomponentallocation.ts @@ -1,44 +1,82 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { TaxComponentRef } from './taxcomponentref'; import { - TaxComponentRef, - TaxComponentRef$inboundSchema, -} from "./taxcomponentref.js"; - -export type TaxComponentAllocation = { - /** - * Taxes rates reference object depending on the rates being available on source commerce software. - */ - taxComponentRef?: TaxComponentRef | undefined; - /** - * Tax amount on order line sale as available from source commerce software. - */ - rate?: Decimal$ | number | null | undefined; -}; - -/** @internal */ -export const TaxComponentAllocation$inboundSchema: z.ZodType< - TaxComponentAllocation, - z.ZodTypeDef, - unknown -> = z.object({ - taxComponentRef: TaxComponentRef$inboundSchema.optional(), - rate: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), -}); - -export function taxComponentAllocationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TaxComponentAllocation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TaxComponentAllocation' from JSON`, - ); + TaxComponentRefFromJSON, + TaxComponentRefFromJSONTyped, + TaxComponentRefToJSON, + TaxComponentRefToJSONTyped, +} from './taxcomponentref'; + +/** + * + * @export + * @interface TaxComponentAllocation + */ +export interface TaxComponentAllocation { + /** + * + * @type {TaxComponentRef} + * @memberof TaxComponentAllocation + */ + taxComponentRef?: TaxComponentRef; + /** + * Tax amount on order line sale as available from source commerce software. + * @type {string} + * @memberof TaxComponentAllocation + */ + rate?: Decimal | number | null; +} + +/** + * Check if a given object implements the TaxComponentAllocation interface. + */ +export function instanceOfTaxComponentAllocation(value: object): value is TaxComponentAllocation { + return true; +} + +export function TaxComponentAllocationFromJSON(json: any): TaxComponentAllocation { + return TaxComponentAllocationFromJSONTyped(json, false); } + +export function TaxComponentAllocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaxComponentAllocation { + if (json == null) { + return json; + } + return { + + 'taxComponentRef': json['taxComponentRef'] == null ? undefined : TaxComponentRefFromJSON(json['taxComponentRef']), + 'rate': json['rate'] == null ? undefined : toDecimal(json['rate']), + }; +} + +export function TaxComponentAllocationToJSON(json: any): TaxComponentAllocation { + return TaxComponentAllocationToJSONTyped(json, false); +} + +export function TaxComponentAllocationToJSONTyped(value?: TaxComponentAllocation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'taxComponentRef': TaxComponentRefToJSON(value['taxComponentRef']), + 'rate': fromDecimal(value['rate']), + }; +} + diff --git a/lending/src/sdk/models/shared/taxcomponentref.ts b/lending/src/sdk/models/shared/taxcomponentref.ts index cb11028f8..cc808b0dc 100644 --- a/lending/src/sdk/models/shared/taxcomponentref.ts +++ b/lending/src/sdk/models/shared/taxcomponentref.ts @@ -1,42 +1,75 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * Taxes rates reference object depending on the rates being available on source commerce software. + * @export + * @interface TaxComponentRef + */ +export interface TaxComponentRef { + /** + * The unique identitifer of the tax component being referenced. + * @type {string} + * @memberof TaxComponentRef + */ + id: string; + /** + * Name of the tax component being referenced. + * @type {string} + * @memberof TaxComponentRef + */ + name: string; +} + +/** + * Check if a given object implements the TaxComponentRef interface. */ -export type TaxComponentRef = { - /** - * The unique identitifer of the tax component being referenced. - */ - id: string; - /** - * Name of the tax component being referenced. - */ - name: string; -}; - -/** @internal */ -export const TaxComponentRef$inboundSchema: z.ZodType< - TaxComponentRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.string(), -}); - -export function taxComponentRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TaxComponentRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TaxComponentRef' from JSON`, - ); +export function instanceOfTaxComponentRef(value: object): value is TaxComponentRef { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function TaxComponentRefFromJSON(json: any): TaxComponentRef { + return TaxComponentRefFromJSONTyped(json, false); } + +export function TaxComponentRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaxComponentRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'], + }; +} + +export function TaxComponentRefToJSON(json: any): TaxComponentRef { + return TaxComponentRefToJSONTyped(json, false); +} + +export function TaxComponentRefToJSONTyped(value?: TaxComponentRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + diff --git a/lending/src/sdk/models/shared/taxrateref.ts b/lending/src/sdk/models/shared/taxrateref.ts index c9d085754..dfd4f6194 100644 --- a/lending/src/sdk/models/shared/taxrateref.ts +++ b/lending/src/sdk/models/shared/taxrateref.ts @@ -1,81 +1,196 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; /** * 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. - * - * @remarks - * + * * Found on: - * + * * - Bill line items * - Bill Credit Note line items * - Credit Note line items * - Direct incomes line items * - Invoice line items * - Items + * @export + * @interface TaxRateRef */ -export type TaxRateRef = { - /** - * Unique identifier for the tax rate in the accounting software. - */ - id?: string | undefined; - /** - * Name of the tax rate in the accounting software. - */ - name?: string | undefined; - /** - * Applicable tax rate. - */ - effectiveTaxRate?: Decimal$ | number | undefined; -}; +export interface TaxRateRef { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateRef + */ + effectiveTaxRate?: Decimal | number; +} -/** @internal */ -export const TaxRateRef$inboundSchema: z.ZodType< - TaxRateRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - effectiveTaxRate: z.number().transform(v => new Decimal$(v)).optional(), -}); -/** @internal */ -export type TaxRateRef$Outbound = { - id?: string | undefined; - name?: string | undefined; - effectiveTaxRate?: number | undefined; -}; +/** + * Check if a given object implements the TaxRateRef interface. + */ +export function instanceOfTaxRateRef(value: object): value is TaxRateRef { + return true; +} -/** @internal */ -export const TaxRateRef$outboundSchema: z.ZodType< - TaxRateRef$Outbound, - z.ZodTypeDef, - TaxRateRef -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - effectiveTaxRate: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), -}); +export function TaxRateRefFromJSON(json: any): TaxRateRef { + return TaxRateRefFromJSONTyped(json, false); +} + +export function TaxRateRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaxRateRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'effectiveTaxRate': json['effectiveTaxRate'] == null ? undefined : toDecimal(json['effectiveTaxRate']), + }; +} -export function taxRateRefToJSON(taxRateRef: TaxRateRef): string { - return JSON.stringify(TaxRateRef$outboundSchema.parse(taxRateRef)); +export function TaxRateRefToJSON(json: any): TaxRateRef { + return TaxRateRefToJSONTyped(json, false); } -export function taxRateRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TaxRateRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TaxRateRef' from JSON`, - ); + +export function TaxRateRefToJSONTyped(value?: TaxRateRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'effectiveTaxRate': fromDecimal(value['effectiveTaxRate']), + }; +} + + +export interface AccountingBillTaxRateRef { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateRef + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingCreditNoteTaxRateRef { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateRef + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingDirectCostTaxRateRef { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateRef + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingDirectIncomeTaxRateRef { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateRef + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingInvoiceTaxRateRef { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateRef + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateRef + */ + effectiveTaxRate?: Decimal | number; } diff --git a/lending/src/sdk/models/shared/taxratereference.ts b/lending/src/sdk/models/shared/taxratereference.ts new file mode 100644 index 000000000..fb2edfab9 --- /dev/null +++ b/lending/src/sdk/models/shared/taxratereference.ts @@ -0,0 +1,217 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * 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 + * @export + * @interface TaxRateReference + */ +export interface TaxRateReference { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateReference + */ + effectiveTaxRate?: Decimal | number; +} + +/** + * Check if a given object implements the TaxRateReference interface. + */ +export function instanceOfTaxRateReference(value: object): value is TaxRateReference { + return true; +} + +export function TaxRateReferenceFromJSON(json: any): TaxRateReference { + return TaxRateReferenceFromJSONTyped(json, false); +} + +export function TaxRateReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaxRateReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'effectiveTaxRate': json['effectiveTaxRate'] == null ? undefined : toDecimal(json['effectiveTaxRate']), + }; +} + +export function TaxRateReferenceToJSON(json: any): TaxRateReference { + return TaxRateReferenceToJSONTyped(json, false); +} + +export function TaxRateReferenceToJSONTyped(value?: TaxRateReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'effectiveTaxRate': fromDecimal(value['effectiveTaxRate']), + }; +} + + +export interface AccountingBillCreditNoteTaxRateReference { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateReference + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingBillTaxRateReference { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateReference + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingCreditNoteTaxRateReference { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateReference + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingDirectCostTaxRateReference { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateReference + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingDirectIncomeTaxRateReference { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateReference + */ + effectiveTaxRate?: Decimal | number; +} + +export interface AccountingInvoiceTaxRateReference { + /** + * Unique identifier for the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + id?: string; + /** + * Name of the tax rate in the accounting software. + * @type {string} + * @memberof TaxRateReference + */ + name?: string; + /** + * Applicable tax rate. + * @type {string} + * @memberof TaxRateReference + */ + effectiveTaxRate?: Decimal | number; +} diff --git a/lending/src/sdk/models/shared/tracking.ts b/lending/src/sdk/models/shared/tracking.ts index 0e65a045e..946154e4a 100644 --- a/lending/src/sdk/models/shared/tracking.ts +++ b/lending/src/sdk/models/shared/tracking.ts @@ -1,70 +1,204 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { AccountingRecordRef } from './accountingrecordref'; import { - AccountingRecordRef, - AccountingRecordRef$inboundSchema, - AccountingRecordRef$Outbound, - AccountingRecordRef$outboundSchema, -} from "./accountingrecordref.js"; + AccountingRecordRefFromJSON, + AccountingRecordRefFromJSONTyped, + AccountingRecordRefToJSON, + AccountingRecordRefToJSONTyped, +} from './accountingrecordref'; +import type { TrackingRecordRef } from './trackingrecordref'; import { - TrackingRecordRef, - TrackingRecordRef$inboundSchema, - TrackingRecordRef$Outbound, - TrackingRecordRef$outboundSchema, -} from "./trackingrecordref.js"; - -export type Tracking = { - recordRefs: Array; - /** - * Links the current record to the underlying record or data type that created it. - * - * @remarks - * - * 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. - */ - invoiceTo?: AccountingRecordRef | undefined; -}; - -/** @internal */ -export const Tracking$inboundSchema: z.ZodType< - Tracking, - z.ZodTypeDef, - unknown -> = z.object({ - recordRefs: z.array(TrackingRecordRef$inboundSchema), - invoiceTo: AccountingRecordRef$inboundSchema.optional(), -}); -/** @internal */ -export type Tracking$Outbound = { - recordRefs: Array; - invoiceTo?: AccountingRecordRef$Outbound | undefined; -}; - -/** @internal */ -export const Tracking$outboundSchema: z.ZodType< - Tracking$Outbound, - z.ZodTypeDef, - Tracking -> = z.object({ - recordRefs: z.array(TrackingRecordRef$outboundSchema), - invoiceTo: AccountingRecordRef$outboundSchema.optional(), -}); - -export function trackingToJSON(tracking: Tracking): string { - return JSON.stringify(Tracking$outboundSchema.parse(tracking)); + TrackingRecordRefFromJSON, + TrackingRecordRefFromJSONTyped, + TrackingRecordRefToJSON, + TrackingRecordRefToJSONTyped, +} from './trackingrecordref'; + +/** + * + * @export + * @interface Tracking + */ +export interface Tracking { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof Tracking + */ + recordRefs: Array; + /** + * + * @type {AccountingRecordRef} + * @memberof Tracking + */ + invoiceTo?: AccountingRecordRef; +} + +/** + * Check if a given object implements the Tracking interface. + */ +export function instanceOfTracking(value: object): value is Tracking { + if (!('recordRefs' in value) || value['recordRefs'] === undefined) return false; + return true; +} + +export function TrackingFromJSON(json: any): Tracking { + return TrackingFromJSONTyped(json, false); +} + +export function TrackingFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tracking { + if (json == null) { + return json; + } + return { + + ...json, + 'recordRefs': ((json['recordRefs'] as Array).map(TrackingRecordRefFromJSON)), + 'invoiceTo': json['invoiceTo'] == null ? undefined : AccountingRecordRefFromJSON(json['invoiceTo']), + }; +} + +export function TrackingToJSON(json: any): Tracking { + return TrackingToJSONTyped(json, false); +} + +export function TrackingToJSONTyped(value?: Tracking | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'recordRefs': ((value['recordRefs'] as Array).map(TrackingRecordRefToJSON)), + 'invoiceTo': AccountingRecordRefToJSON(value['invoiceTo']), + }; } -export function trackingFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Tracking$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Tracking' from JSON`, - ); + + +export interface AccountingBillCreditNoteTracking { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof Tracking + */ + recordRefs: Array; + /** + * + * @type {AccountingRecordRef} + * @memberof Tracking + */ + invoiceTo?: AccountingRecordRef; +} + +export interface AccountingBillTracking { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof Tracking + */ + recordRefs: Array; + /** + * + * @type {AccountingRecordRef} + * @memberof Tracking + */ + invoiceTo?: AccountingRecordRef; +} + +export interface AccountingCreditNoteTracking { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof Tracking + */ + recordRefs: Array; + /** + * + * @type {AccountingRecordRef} + * @memberof Tracking + */ + invoiceTo?: AccountingRecordRef; +} + +export interface AccountingDirectCostTracking { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof Tracking + */ + recordRefs: Array; + /** + * + * @type {AccountingRecordRef} + * @memberof Tracking + */ + invoiceTo?: AccountingRecordRef; +} + +export interface AccountingInvoiceTracking { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof Tracking + */ + recordRefs: Array; + /** + * + * @type {AccountingRecordRef} + * @memberof Tracking + */ + invoiceTo?: AccountingRecordRef; +} + +export interface AccountsPayableTrackingTracking { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof Tracking + */ + recordRefs: Array; + /** + * + * @type {AccountingRecordRef} + * @memberof Tracking + */ + invoiceTo?: AccountingRecordRef; +} + +export interface AccountsReceivableTrackingTracking { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof Tracking + */ + recordRefs: Array; + /** + * + * @type {AccountingRecordRef} + * @memberof Tracking + */ + invoiceTo?: AccountingRecordRef; } diff --git a/lending/src/sdk/models/shared/trackingcategoryref.ts b/lending/src/sdk/models/shared/trackingcategoryref.ts index 380e7c173..8b5c091a9 100644 --- a/lending/src/sdk/models/shared/trackingcategoryref.ts +++ b/lending/src/sdk/models/shared/trackingcategoryref.ts @@ -1,66 +1,179 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * References a category against which the item is tracked. - * - * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + * @export + * @interface TrackingCategoryRef */ -export type TrackingCategoryRef = { - /** - * Unique identifier to the tracking category. - */ - id: string; - /** - * Name of tracking category. - */ - name?: string | null | undefined; -}; +export interface TrackingCategoryRef { + /** + * Unique identifier to the tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + id: string; + /** + * Name of tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + name?: string | null; +} -/** @internal */ -export const TrackingCategoryRef$inboundSchema: z.ZodType< - TrackingCategoryRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); -/** @internal */ -export type TrackingCategoryRef$Outbound = { - id: string; - name?: string | null | undefined; -}; +/** + * Check if a given object implements the TrackingCategoryRef interface. + */ +export function instanceOfTrackingCategoryRef(value: object): value is TrackingCategoryRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function TrackingCategoryRefFromJSON(json: any): TrackingCategoryRef { + return TrackingCategoryRefFromJSONTyped(json, false); +} + +export function TrackingCategoryRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackingCategoryRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function TrackingCategoryRefToJSON(json: any): TrackingCategoryRef { + return TrackingCategoryRefToJSONTyped(json, false); +} -/** @internal */ -export const TrackingCategoryRef$outboundSchema: z.ZodType< - TrackingCategoryRef$Outbound, - z.ZodTypeDef, - TrackingCategoryRef -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); +export function TrackingCategoryRefToJSONTyped(value?: TrackingCategoryRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function trackingCategoryRefToJSON( - trackingCategoryRef: TrackingCategoryRef, -): string { - return JSON.stringify( - TrackingCategoryRef$outboundSchema.parse(trackingCategoryRef), - ); + return { + + 'id': value['id'], + 'name': value['name'], + }; } -export function trackingCategoryRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TrackingCategoryRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TrackingCategoryRef' from JSON`, - ); + + +export interface AccountingCreateTransferResponseTrackingCategoryRef { + /** + * Unique identifier to the tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + id: string; + /** + * Name of tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + name?: string | null; +} + +export interface AccountingTransferGetResponseTrackingCategoryRef { + /** + * Unique identifier to the tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + id: string; + /** + * Name of tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + name?: string | null; +} + +export interface AccountingTransferTrackingCategoryRef { + /** + * Unique identifier to the tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + id: string; + /** + * Name of tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + name?: string | null; +} + +export interface AccountsPayableTrackingTrackingCategoryRef { + /** + * Unique identifier to the tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + id: string; + /** + * Name of tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + name?: string | null; +} + +export interface AccountsReceivableTrackingTrackingCategoryRef { + /** + * Unique identifier to the tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + id: string; + /** + * Name of tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + name?: string | null; +} + +export interface GetAccountingTransferResponseTrackingCategoryRef { + /** + * Unique identifier to the tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + id: string; + /** + * Name of tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + name?: string | null; +} + +export interface TrackingTrackingCategoryRef { + /** + * Unique identifier to the tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + id: string; + /** + * Name of tracking category. + * @type {string} + * @memberof TrackingCategoryRef + */ + name?: string | null; } diff --git a/lending/src/sdk/models/shared/trackingrecordref.ts b/lending/src/sdk/models/shared/trackingrecordref.ts index c7fc421ae..e87a36e75 100644 --- a/lending/src/sdk/models/shared/trackingrecordref.ts +++ b/lending/src/sdk/models/shared/trackingrecordref.ts @@ -1,89 +1,101 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { TrackingRecordRefDataType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * Name of underlying data type. + * Links to the customer or tracking category. + * @export + * @interface TrackingRecordRef */ -export const TrackingRecordRefDataType = { - Customers: "customers", - Suppliers: "suppliers", - TrackingCategories: "trackingCategories", -} as const; +export interface TrackingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof TrackingRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof TrackingRecordRef + */ + dataType?: TrackingRecordRefDataType; +} + + /** - * Name of underlying data type. + * @export */ -export type TrackingRecordRefDataType = ClosedEnum< - typeof TrackingRecordRefDataType ->; +export const TrackingRecordRefDataTypeEnum = { + Customers: 'customers', + Suppliers: 'suppliers', + TrackingCategories: 'trackingCategories' +} as const; +export type TrackingRecordRefDataTypeEnum = typeof TrackingRecordRefDataTypeEnum[keyof typeof TrackingRecordRefDataTypeEnum]; + /** - * Links to the customer or tracking category. + * Check if a given object implements the TrackingRecordRef interface. */ -export type TrackingRecordRef = { - /** - * 'id' of the underlying record or data type. - */ - id?: string | undefined; - /** - * Name of underlying data type. - */ - dataType?: TrackingRecordRefDataType | undefined; -}; +export function instanceOfTrackingRecordRef(value: object): value is TrackingRecordRef { + return true; +} + +export function TrackingRecordRefFromJSON(json: any): TrackingRecordRef { + return TrackingRecordRefFromJSONTyped(json, false); +} -/** @internal */ -export const TrackingRecordRefDataType$inboundSchema: z.ZodNativeEnum< - typeof TrackingRecordRefDataType -> = z.nativeEnum(TrackingRecordRefDataType); -/** @internal */ -export const TrackingRecordRefDataType$outboundSchema: z.ZodNativeEnum< - typeof TrackingRecordRefDataType -> = TrackingRecordRefDataType$inboundSchema; +export function TrackingRecordRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackingRecordRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'dataType': json['dataType'] == null ? undefined : json['dataType'], + }; +} -/** @internal */ -export const TrackingRecordRef$inboundSchema: z.ZodType< - TrackingRecordRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: TrackingRecordRefDataType$inboundSchema.optional(), -}); -/** @internal */ -export type TrackingRecordRef$Outbound = { - id?: string | undefined; - dataType?: string | undefined; -}; +export function TrackingRecordRefToJSON(json: any): TrackingRecordRef { + return TrackingRecordRefToJSONTyped(json, false); +} -/** @internal */ -export const TrackingRecordRef$outboundSchema: z.ZodType< - TrackingRecordRef$Outbound, - z.ZodTypeDef, - TrackingRecordRef -> = z.object({ - id: z.string().optional(), - dataType: TrackingRecordRefDataType$outboundSchema.optional(), -}); +export function TrackingRecordRefToJSONTyped(value?: TrackingRecordRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } -export function trackingRecordRefToJSON( - trackingRecordRef: TrackingRecordRef, -): string { - return JSON.stringify( - TrackingRecordRef$outboundSchema.parse(trackingRecordRef), - ); + return { + + 'id': value['id'], + 'dataType': value['dataType'], + }; } -export function trackingRecordRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TrackingRecordRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TrackingRecordRef' from JSON`, - ); + + +export interface JournalLineTrackingTrackingRecordRef { + /** + * 'id' of the underlying record or data type. + * @type {string} + * @memberof TrackingRecordRef + */ + id?: string; + /** + * Name of underlying data type. + * @type {string} + * @memberof TrackingRecordRef + */ + dataType?: TrackingRecordRefDataType; } diff --git a/lending/src/sdk/models/shared/transactioncategory.ts b/lending/src/sdk/models/shared/transactioncategory.ts index 448e00508..77c8869b2 100644 --- a/lending/src/sdk/models/shared/transactioncategory.ts +++ b/lending/src/sdk/models/shared/transactioncategory.ts @@ -1,45 +1,124 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TransactionCategory = { - /** - * Returns the aggregate confidence of the suggested category for the transaction. The value is between 0 and 100. - */ - confidence?: Decimal$ | number | undefined; - /** - * An ordered array of category level confidences where each element is the confidence of the corresponding item in the `levels` array. - */ - confidences?: Array | undefined; - /** - * The suggested category is an ordered array of category levels where each element (or level) is a subcategory of the previous element (or level). - */ - levels?: Array | undefined; -}; - -/** @internal */ -export const TransactionCategory$inboundSchema: z.ZodType< - TransactionCategory, - z.ZodTypeDef, - unknown -> = z.object({ - confidence: z.number().transform(v => new Decimal$(v)).optional(), - confidences: z.array(z.number().transform(v => new Decimal$(v))).optional(), - levels: z.array(z.string()).optional(), -}); - -export function transactionCategoryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TransactionCategory$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TransactionCategory' from JSON`, - ); +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface TransactionCategory + */ +export interface TransactionCategory { + /** + * Returns the aggregate confidence of the suggested category for the transaction. The value is between 0 and 100. + * @type {string} + * @memberof TransactionCategory + */ + confidence?: Decimal | number; + /** + * An ordered array of category level confidences where each element is the confidence of the corresponding item in the `levels` array. + * @type {Array} + * @memberof TransactionCategory + */ + confidences?: Array; + /** + * The suggested category is an ordered array of category levels where each element (or level) is a subcategory of the previous element (or level). + * @type {Array} + * @memberof TransactionCategory + */ + levels?: Array; +} + +/** + * Check if a given object implements the TransactionCategory interface. + */ +export function instanceOfTransactionCategory(value: object): value is TransactionCategory { + return true; +} + +export function TransactionCategoryFromJSON(json: any): TransactionCategory { + return TransactionCategoryFromJSONTyped(json, false); +} + +export function TransactionCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionCategory { + if (json == null) { + return json; + } + return { + + 'confidence': json['confidence'] == null ? undefined : toDecimal(json['confidence']), + 'confidences': json['confidences'] == null ? undefined : toDecimal(json['confidences']), + 'levels': json['levels'] == null ? undefined : json['levels'], + }; +} + +export function TransactionCategoryToJSON(json: any): TransactionCategory { + return TransactionCategoryToJSONTyped(json, false); +} + +export function TransactionCategoryToJSONTyped(value?: TransactionCategory | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'confidence': fromDecimal(value['confidence']), + 'confidences': fromDecimal(value['confidences']), + 'levels': value['levels'], + }; +} + + +export interface CashFlowTransactionTransactionCategory { + /** + * Returns the aggregate confidence of the suggested category for the transaction. The value is between 0 and 100. + * @type {string} + * @memberof TransactionCategory + */ + confidence?: Decimal | number; + /** + * An ordered array of category level confidences where each element is the confidence of the corresponding item in the `levels` array. + * @type {Array} + * @memberof TransactionCategory + */ + confidences?: Array; + /** + * The suggested category is an ordered array of category levels where each element (or level) is a subcategory of the previous element (or level). + * @type {Array} + * @memberof TransactionCategory + */ + levels?: Array; +} + +export interface CategorizedBankStatementTransactionsTransactionCategory { + /** + * Returns the aggregate confidence of the suggested category for the transaction. The value is between 0 and 100. + * @type {string} + * @memberof TransactionCategory + */ + confidence?: Decimal | number; + /** + * An ordered array of category level confidences where each element is the confidence of the corresponding item in the `levels` array. + * @type {Array} + * @memberof TransactionCategory + */ + confidences?: Array; + /** + * The suggested category is an ordered array of category levels where each element (or level) is a subcategory of the previous element (or level). + * @type {Array} + * @memberof TransactionCategory + */ + levels?: Array; } diff --git a/lending/src/sdk/models/shared/transactioncategoryref.ts b/lending/src/sdk/models/shared/transactioncategoryref.ts index 05ad88bb7..0902d736f 100644 --- a/lending/src/sdk/models/shared/transactioncategoryref.ts +++ b/lending/src/sdk/models/shared/transactioncategoryref.ts @@ -1,64 +1,149 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import { mapValues } from '../../../runtime'; /** * An object of bank transaction category reference data. + * @export + * @interface TransactionCategoryRef + */ +export interface TransactionCategoryRef { + /** + * The unique category reference id for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + id: string; + /** + * The category name reference for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + name?: string | null; +} + +/** + * Check if a given object implements the TransactionCategoryRef interface. */ -export type TransactionCategoryRef = { - /** - * The unique category reference id for the bank transaction. - */ - id: string; - /** - * The category name reference for the bank transaction. - */ - name?: string | null | undefined; -}; +export function instanceOfTransactionCategoryRef(value: object): value is TransactionCategoryRef { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function TransactionCategoryRefFromJSON(json: any): TransactionCategoryRef { + return TransactionCategoryRefFromJSONTyped(json, false); +} + +export function TransactionCategoryRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionCategoryRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function TransactionCategoryRefToJSON(json: any): TransactionCategoryRef { + return TransactionCategoryRefToJSONTyped(json, false); +} + +export function TransactionCategoryRefToJSONTyped(value?: TransactionCategoryRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} -/** @internal */ -export const TransactionCategoryRef$inboundSchema: z.ZodType< - TransactionCategoryRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); -/** @internal */ -export type TransactionCategoryRef$Outbound = { - id: string; - name?: string | null | undefined; -}; -/** @internal */ -export const TransactionCategoryRef$outboundSchema: z.ZodType< - TransactionCategoryRef$Outbound, - z.ZodTypeDef, - TransactionCategoryRef -> = z.object({ - id: z.string(), - name: z.nullable(z.string()).optional(), -}); +export interface BankingTransactionGetResponseTransactionCategoryRef { + /** + * The unique category reference id for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + id: string; + /** + * The category name reference for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + name?: string | null; +} -export function transactionCategoryRefToJSON( - transactionCategoryRef: TransactionCategoryRef, -): string { - return JSON.stringify( - TransactionCategoryRef$outboundSchema.parse(transactionCategoryRef), - ); +export interface BankingTransactionTransactionCategoryRef { + /** + * The unique category reference id for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + id: string; + /** + * The category name reference for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + name?: string | null; } -export function transactionCategoryRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TransactionCategoryRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TransactionCategoryRef' from JSON`, - ); + +export interface BankingTransactionsTransactionCategoryRef { + /** + * The unique category reference id for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + id: string; + /** + * The category name reference for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + name?: string | null; +} + +export interface GetBankingTransactionResponseTransactionCategoryRef { + /** + * The unique category reference id for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + id: string; + /** + * The category name reference for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + name?: string | null; +} + +export interface UploadBankStatementDataRequestBodyTransactionCategoryRef { + /** + * The unique category reference id for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + id: string; + /** + * The category name reference for the bank transaction. + * @type {string} + * @memberof TransactionCategoryRef + */ + name?: string | null; } diff --git a/lending/src/sdk/models/shared/transactioncategorystatus.ts b/lending/src/sdk/models/shared/transactioncategorystatus.ts index 4f0a68107..307ce5c49 100644 --- a/lending/src/sdk/models/shared/transactioncategorystatus.ts +++ b/lending/src/sdk/models/shared/transactioncategorystatus.ts @@ -1,26 +1,54 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The status of the transaction category. + * @export */ export const TransactionCategoryStatus = { - Unknown: "Unknown", - Active: "Active", - Archived: "Archived", + Unknown: 'Unknown', + Active: 'Active', + Archived: 'Archived' } as const; -/** - * The status of the transaction category. - */ -export type TransactionCategoryStatus = ClosedEnum< - typeof TransactionCategoryStatus ->; - -/** @internal */ -export const TransactionCategoryStatus$inboundSchema: z.ZodNativeEnum< - typeof TransactionCategoryStatus -> = z.nativeEnum(TransactionCategoryStatus); +export type TransactionCategoryStatus = typeof TransactionCategoryStatus[keyof typeof TransactionCategoryStatus]; + + +export function instanceOfTransactionCategoryStatus(value: any): boolean { + for (const key in TransactionCategoryStatus) { + if (Object.prototype.hasOwnProperty.call(TransactionCategoryStatus, key)) { + if (TransactionCategoryStatus[key as keyof typeof TransactionCategoryStatus] === value) { + return true; + } + } + } + return false; +} + +export function TransactionCategoryStatusFromJSON(json: any): TransactionCategoryStatus { + return TransactionCategoryStatusFromJSONTyped(json, false); +} + +export function TransactionCategoryStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionCategoryStatus { + return json as TransactionCategoryStatus; +} + +export function TransactionCategoryStatusToJSON(value?: TransactionCategoryStatus | null): any { + return value as any; +} + +export function TransactionCategoryStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): TransactionCategoryStatus { + return value as TransactionCategoryStatus; +} + diff --git a/lending/src/sdk/models/shared/transactioncode.ts b/lending/src/sdk/models/shared/transactioncode.ts index a07c47376..d839aea43 100644 --- a/lending/src/sdk/models/shared/transactioncode.ts +++ b/lending/src/sdk/models/shared/transactioncode.ts @@ -1,40 +1,68 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ + +import type { Payment } from './payment'; +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * Code to identify the underlying transaction. + * @export */ export const TransactionCode = { - Unknown: "Unknown", - Fee: "Fee", - Payment: "Payment", - Cash: "Cash", - Transfer: "Transfer", - Interest: "Interest", - Cashback: "Cashback", - Cheque: "Cheque", - DirectDebit: "DirectDebit", - Purchase: "Purchase", - StandingOrder: "StandingOrder", - Adjustment: "Adjustment", - Credit: "Credit", - Other: "Other", - NotSupported: "NotSupported", + Unknown: 'Unknown', + Fee: 'Fee', + Payment: 'Payment', + Cash: 'Cash', + Transfer: 'Transfer', + Interest: 'Interest', + Cashback: 'Cashback', + Cheque: 'Cheque', + DirectDebit: 'DirectDebit', + Purchase: 'Purchase', + StandingOrder: 'StandingOrder', + Adjustment: 'Adjustment', + Credit: 'Credit', + Other: 'Other', + NotSupported: 'NotSupported' } as const; -/** - * Code to identify the underlying transaction. - */ -export type TransactionCode = ClosedEnum; - -/** @internal */ -export const TransactionCode$inboundSchema: z.ZodNativeEnum< - typeof TransactionCode -> = z.nativeEnum(TransactionCode); -/** @internal */ -export const TransactionCode$outboundSchema: z.ZodNativeEnum< - typeof TransactionCode -> = TransactionCode$inboundSchema; +export type TransactionCode = typeof TransactionCode[keyof typeof TransactionCode]; + + +export function instanceOfTransactionCode(value: any): boolean { + for (const key in TransactionCode) { + if (Object.prototype.hasOwnProperty.call(TransactionCode, key)) { + if (TransactionCode[key as keyof typeof TransactionCode] === value) { + return true; + } + } + } + return false; +} + +export function TransactionCodeFromJSON(json: any): TransactionCode { + return TransactionCodeFromJSONTyped(json, false); +} + +export function TransactionCodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionCode { + return json as TransactionCode; +} + +export function TransactionCodeToJSON(value?: TransactionCode | null): any { + return value as any; +} + +export function TransactionCodeToJSONTyped(value: any, ignoreDiscriminator: boolean): TransactionCode { + return value as TransactionCode; +} + diff --git a/lending/src/sdk/models/shared/transactionsourceref.ts b/lending/src/sdk/models/shared/transactionsourceref.ts index a9677befb..89ba6a661 100644 --- a/lending/src/sdk/models/shared/transactionsourceref.ts +++ b/lending/src/sdk/models/shared/transactionsourceref.ts @@ -1,43 +1,190 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { TransactionSourceType } from './transactionsourcetype'; import { - TransactionSourceType, - TransactionSourceType$inboundSchema, -} from "./transactionsourcetype.js"; - -export type TransactionSourceRef = { - /** - * The unique identitifer of the record being referenced - */ - id: string; - /** - * The type of source the transaction arose. - */ - type: TransactionSourceType; -}; - -/** @internal */ -export const TransactionSourceRef$inboundSchema: z.ZodType< - TransactionSourceRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - type: TransactionSourceType$inboundSchema, -}); - -export function transactionSourceRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TransactionSourceRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TransactionSourceRef' from JSON`, - ); + TransactionSourceTypeFromJSON, + TransactionSourceTypeFromJSONTyped, + TransactionSourceTypeToJSON, + TransactionSourceTypeToJSONTyped, +} from './transactionsourcetype'; + +/** + * + * @export + * @interface TransactionSourceRef + */ +export interface TransactionSourceRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof TransactionSourceRef + */ + id: string; + /** + * + * @type {TransactionSourceType} + * @memberof TransactionSourceRef + */ + type: TransactionSourceType; +} + + + +/** + * Check if a given object implements the TransactionSourceRef interface. + */ +export function instanceOfTransactionSourceRef(value: object): value is TransactionSourceRef { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function TransactionSourceRefFromJSON(json: any): TransactionSourceRef { + return TransactionSourceRefFromJSONTyped(json, false); +} + +export function TransactionSourceRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionSourceRef { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'type': TransactionSourceTypeFromJSON(json['type']), + }; +} + +export function TransactionSourceRefToJSON(json: any): TransactionSourceRef { + return TransactionSourceRefToJSONTyped(json, false); +} + +export function TransactionSourceRefToJSONTyped(value?: TransactionSourceRef | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'type': TransactionSourceTypeToJSON(value['type']), + }; +} + + +export interface CommerceDisputeGetResponseTransactionSourceRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof TransactionSourceRef + */ + id: string; + /** + * + * @type {TransactionSourceType} + * @memberof TransactionSourceRef + */ + type: TransactionSourceType; +} + +export interface CommerceDisputeTransactionSourceRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof TransactionSourceRef + */ + id: string; + /** + * + * @type {TransactionSourceType} + * @memberof TransactionSourceRef + */ + type: TransactionSourceType; +} + +export interface CommerceTransactionGetResponseTransactionSourceRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof TransactionSourceRef + */ + id: string; + /** + * + * @type {TransactionSourceType} + * @memberof TransactionSourceRef + */ + type: TransactionSourceType; +} + +export interface CommerceTransactionTransactionSourceRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof TransactionSourceRef + */ + id: string; + /** + * + * @type {TransactionSourceType} + * @memberof TransactionSourceRef + */ + type: TransactionSourceType; +} + +export interface CommerceTransactionsTransactionSourceRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof TransactionSourceRef + */ + id: string; + /** + * + * @type {TransactionSourceType} + * @memberof TransactionSourceRef + */ + type: TransactionSourceType; +} + +export interface GetCommerceDisputeResponseTransactionSourceRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof TransactionSourceRef + */ + id: string; + /** + * + * @type {TransactionSourceType} + * @memberof TransactionSourceRef + */ + type: TransactionSourceType; +} + +export interface GetCommerceTransactionResponseTransactionSourceRef { + /** + * The unique identitifer of the record being referenced + * @type {string} + * @memberof TransactionSourceRef + */ + id: string; + /** + * + * @type {TransactionSourceType} + * @memberof TransactionSourceRef + */ + type: TransactionSourceType; } diff --git a/lending/src/sdk/models/shared/transactionsourcetype.ts b/lending/src/sdk/models/shared/transactionsourcetype.ts index 8956b4a99..dd85b208e 100644 --- a/lending/src/sdk/models/shared/transactionsourcetype.ts +++ b/lending/src/sdk/models/shared/transactionsourcetype.ts @@ -1,26 +1,59 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ + +import type { Payment } from './payment'; +import type { ServiceCharge } from './servicecharge'; +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** * The type of source the transaction arose. + * @export */ export const TransactionSourceType = { - Fee: "Fee", - Order: "Order", - Payment: "Payment", - ServiceCharge: "ServiceCharge", - Unknown: "Unknown", + Fee: 'Fee', + Order: 'Order', + Payment: 'Payment', + ServiceCharge: 'ServiceCharge', + Unknown: 'Unknown' } as const; -/** - * The type of source the transaction arose. - */ -export type TransactionSourceType = ClosedEnum; +export type TransactionSourceType = typeof TransactionSourceType[keyof typeof TransactionSourceType]; + + +export function instanceOfTransactionSourceType(value: any): boolean { + for (const key in TransactionSourceType) { + if (Object.prototype.hasOwnProperty.call(TransactionSourceType, key)) { + if (TransactionSourceType[key as keyof typeof TransactionSourceType] === value) { + return true; + } + } + } + return false; +} + +export function TransactionSourceTypeFromJSON(json: any): TransactionSourceType { + return TransactionSourceTypeFromJSONTyped(json, false); +} + +export function TransactionSourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionSourceType { + return json as TransactionSourceType; +} + +export function TransactionSourceTypeToJSON(value?: TransactionSourceType | null): any { + return value as any; +} + +export function TransactionSourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): TransactionSourceType { + return value as TransactionSourceType; +} -/** @internal */ -export const TransactionSourceType$inboundSchema: z.ZodNativeEnum< - typeof TransactionSourceType -> = z.nativeEnum(TransactionSourceType); diff --git a/lending/src/sdk/models/shared/transactiontype.ts b/lending/src/sdk/models/shared/transactiontype.ts index 8e30c8e5d..1328c9596 100644 --- a/lending/src/sdk/models/shared/transactiontype.ts +++ b/lending/src/sdk/models/shared/transactiontype.ts @@ -1,49 +1,69 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ + +import type { Payment } from './payment'; +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; /** - * The type of the platform transaction: - * - * @remarks - * - `Unknown` - * - `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account. - * - `Payment` — Credit and debit card payments. - * - `PaymentFee` — Payment provider's fee on each card payment. - * - `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller. - * - `Payout` — Transfer of funds from the seller's merchant account to their bank account. - * - `Refund` — Refunds to a customer's credit or debit card. - * - `Transfer` — Secure transfer of funds to the seller's bank account. + * The type of the platform transaction: + * - `Unknown` + * - `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account. + * - `Payment` — Credit and debit card payments. + * - `PaymentFee` — Payment provider's fee on each card payment. + * - `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller. + * - `Payout` — Transfer of funds from the seller's merchant account to their bank account. + * - `Refund` — Refunds to a customer's credit or debit card. + * - `Transfer` — Secure transfer of funds to the seller's bank account. + * @export */ export const TransactionType = { - Payment: "Payment", - Refund: "Refund", - Payout: "Payout", - FailedPayout: "FailedPayout", - Transfer: "Transfer", - PaymentFee: "PaymentFee", - PaymentFeeRefund: "PaymentFeeRefund", - Unknown: "Unknown", + Payment: 'Payment', + Refund: 'Refund', + Payout: 'Payout', + FailedPayout: 'FailedPayout', + Transfer: 'Transfer', + PaymentFee: 'PaymentFee', + PaymentFeeRefund: 'PaymentFeeRefund', + Unknown: 'Unknown' } as const; -/** - * The type of the platform transaction: - * - * @remarks - * - `Unknown` - * - `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account. - * - `Payment` — Credit and debit card payments. - * - `PaymentFee` — Payment provider's fee on each card payment. - * - `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller. - * - `Payout` — Transfer of funds from the seller's merchant account to their bank account. - * - `Refund` — Refunds to a customer's credit or debit card. - * - `Transfer` — Secure transfer of funds to the seller's bank account. - */ -export type TransactionType = ClosedEnum; +export type TransactionType = typeof TransactionType[keyof typeof TransactionType]; + + +export function instanceOfTransactionType(value: any): boolean { + for (const key in TransactionType) { + if (Object.prototype.hasOwnProperty.call(TransactionType, key)) { + if (TransactionType[key as keyof typeof TransactionType] === value) { + return true; + } + } + } + return false; +} + +export function TransactionTypeFromJSON(json: any): TransactionType { + return TransactionTypeFromJSONTyped(json, false); +} + +export function TransactionTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionType { + return json as TransactionType; +} + +export function TransactionTypeToJSON(value?: TransactionType | null): any { + return value as any; +} + +export function TransactionTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): TransactionType { + return value as TransactionType; +} -/** @internal */ -export const TransactionType$inboundSchema: z.ZodNativeEnum< - typeof TransactionType -> = z.nativeEnum(TransactionType); diff --git a/lending/src/sdk/models/shared/transferaccount.ts b/lending/src/sdk/models/shared/transferaccount.ts index 5f288efe9..541443cc8 100644 --- a/lending/src/sdk/models/shared/transferaccount.ts +++ b/lending/src/sdk/models/shared/transferaccount.ts @@ -1,90 +1,285 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +import type { AccountingRecordRef } from './accountingrecordref'; import { - AccountingRecordRef, - AccountingRecordRef$inboundSchema, - AccountingRecordRef$Outbound, - AccountingRecordRef$outboundSchema, -} from "./accountingrecordref.js"; + AccountingRecordRefFromJSON, + AccountingRecordRefFromJSONTyped, + AccountingRecordRefToJSON, + AccountingRecordRefToJSONTyped, +} from './accountingrecordref'; /** * Account details of the account sending or receiving the transfer. + * @export + * @interface TransferAccount */ -export type TransferAccount = { - /** - * Links the current record to the underlying record or data type that created it. - * - * @remarks - * - * 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. - */ - accountRef?: AccountingRecordRef | undefined; - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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?: string | undefined; - /** - * The amount transferred between accounts. - */ - amount?: Decimal$ | number | undefined; -}; - -/** @internal */ -export const TransferAccount$inboundSchema: z.ZodType< - TransferAccount, - z.ZodTypeDef, - unknown -> = z.object({ - accountRef: AccountingRecordRef$inboundSchema.optional(), - currency: z.string().optional(), - amount: z.number().transform(v => new Decimal$(v)).optional(), -}); -/** @internal */ -export type TransferAccount$Outbound = { - accountRef?: AccountingRecordRef$Outbound | undefined; - currency?: string | undefined; - amount?: number | undefined; -}; - -/** @internal */ -export const TransferAccount$outboundSchema: z.ZodType< - TransferAccount$Outbound, - z.ZodTypeDef, - TransferAccount -> = z.object({ - accountRef: AccountingRecordRef$outboundSchema.optional(), - currency: z.string().optional(), - amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), -}); - -export function transferAccountToJSON( - transferAccount: TransferAccount, -): string { - return JSON.stringify(TransferAccount$outboundSchema.parse(transferAccount)); +export interface TransferAccount { + /** + * The account that the transfer is moving from or to. + * @type {AccountingRecordRef} + * @memberof TransferAccount + */ + accountRef?: AccountingRecordRef; + /** + * 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. + * @type {string} + * @memberof TransferAccount + */ + currency?: string; + /** + * The amount transferred between accounts. + * @type {string} + * @memberof TransferAccount + */ + amount?: Decimal | number; +} + +/** + * Check if a given object implements the TransferAccount interface. + */ +export function instanceOfTransferAccount(value: object): value is TransferAccount { + return true; +} + +export function TransferAccountFromJSON(json: any): TransferAccount { + return TransferAccountFromJSONTyped(json, false); +} + +export function TransferAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransferAccount { + if (json == null) { + return json; + } + return { + + 'accountRef': json['accountRef'] == null ? undefined : AccountingRecordRefFromJSON(json['accountRef']), + 'currency': json['currency'] == null ? undefined : json['currency'], + 'amount': json['amount'] == null ? undefined : toDecimal(json['amount']), + }; +} + +export function TransferAccountToJSON(json: any): TransferAccount { + return TransferAccountToJSONTyped(json, false); +} + +export function TransferAccountToJSONTyped(value?: TransferAccount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'accountRef': AccountingRecordRefToJSON(value['accountRef']), + 'currency': value['currency'], + 'amount': fromDecimal(value['amount']), + }; } -export function transferAccountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TransferAccount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TransferAccount' from JSON`, - ); + + +export interface AccountingCreateTransferResponseTransferAccount { + /** + * The account that the transfer is moving from or to. + * @type {AccountingRecordRef} + * @memberof TransferAccount + */ + accountRef?: AccountingRecordRef; + /** + * 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. + * @type {string} + * @memberof TransferAccount + */ + currency?: string; + /** + * The amount transferred between accounts. + * @type {string} + * @memberof TransferAccount + */ + amount?: Decimal | number; +} + +export interface AccountingTransferGetResponseTransferAccount { + /** + * The account that the transfer is moving from or to. + * @type {AccountingRecordRef} + * @memberof TransferAccount + */ + accountRef?: AccountingRecordRef; + /** + * 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. + * @type {string} + * @memberof TransferAccount + */ + currency?: string; + /** + * The amount transferred between accounts. + * @type {string} + * @memberof TransferAccount + */ + amount?: Decimal | number; +} + +export interface AccountingTransferTransferAccount { + /** + * The account that the transfer is moving from or to. + * @type {AccountingRecordRef} + * @memberof TransferAccount + */ + accountRef?: AccountingRecordRef; + /** + * 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. + * @type {string} + * @memberof TransferAccount + */ + currency?: string; + /** + * The amount transferred between accounts. + * @type {string} + * @memberof TransferAccount + */ + amount?: Decimal | number; +} + +export interface AccountingTransfersTransferAccount { + /** + * The account that the transfer is moving from or to. + * @type {AccountingRecordRef} + * @memberof TransferAccount + */ + accountRef?: AccountingRecordRef; + /** + * 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. + * @type {string} + * @memberof TransferAccount + */ + currency?: string; + /** + * The amount transferred between accounts. + * @type {string} + * @memberof TransferAccount + */ + amount?: Decimal | number; +} + +export interface CreateTransferResponseTransferAccount { + /** + * The account that the transfer is moving from or to. + * @type {AccountingRecordRef} + * @memberof TransferAccount + */ + accountRef?: AccountingRecordRef; + /** + * 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. + * @type {string} + * @memberof TransferAccount + */ + currency?: string; + /** + * The amount transferred between accounts. + * @type {string} + * @memberof TransferAccount + */ + amount?: Decimal | number; +} + +export interface GetAccountingTransferResponseTransferAccount { + /** + * The account that the transfer is moving from or to. + * @type {AccountingRecordRef} + * @memberof TransferAccount + */ + accountRef?: AccountingRecordRef; + /** + * 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. + * @type {string} + * @memberof TransferAccount + */ + currency?: string; + /** + * The amount transferred between accounts. + * @type {string} + * @memberof TransferAccount + */ + amount?: Decimal | number; +} + +export interface TransferCreateResponseTransferAccount { + /** + * The account that the transfer is moving from or to. + * @type {AccountingRecordRef} + * @memberof TransferAccount + */ + accountRef?: AccountingRecordRef; + /** + * 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. + * @type {string} + * @memberof TransferAccount + */ + currency?: string; + /** + * The amount transferred between accounts. + * @type {string} + * @memberof TransferAccount + */ + amount?: Decimal | number; } diff --git a/lending/src/sdk/models/shared/validation.ts b/lending/src/sdk/models/shared/validation.ts index 3a6a92030..381082869 100644 --- a/lending/src/sdk/models/shared/validation.ts +++ b/lending/src/sdk/models/shared/validation.ts @@ -1,40 +1,471 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { mapValues } from '../../../runtime'; +import type { ValidationItem } from './validationitem'; import { - ValidationItem, - ValidationItem$inboundSchema, -} from "./validationitem.js"; + ValidationItemFromJSON, + ValidationItemFromJSONTyped, + ValidationItemToJSON, + ValidationItemToJSONTyped, +} from './validationitem'; /** * 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. + * @export + * @interface Validation + */ +export interface Validation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +/** + * Check if a given object implements the Validation interface. */ -export type Validation = { - errors?: Array | null | undefined; - warnings?: Array | null | undefined; -}; - -/** @internal */ -export const Validation$inboundSchema: z.ZodType< - Validation, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.nullable(z.array(ValidationItem$inboundSchema)).optional(), - warnings: z.nullable(z.array(ValidationItem$inboundSchema)).optional(), -}); - -export function validationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Validation$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Validation' from JSON`, - ); +export function instanceOfValidation(value: object): value is Validation { + return true; +} + +export function ValidationFromJSON(json: any): Validation { + return ValidationFromJSONTyped(json, false); +} + +export function ValidationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Validation { + if (json == null) { + return json; + } + return { + + 'errors': json['errors'] == null ? undefined : ((json['errors'] as Array).map(ValidationItemFromJSON)), + 'warnings': json['warnings'] == null ? undefined : ((json['warnings'] as Array).map(ValidationItemFromJSON)), + }; +} + +export function ValidationToJSON(json: any): Validation { + return ValidationToJSONTyped(json, false); +} + +export function ValidationToJSONTyped(value?: Validation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'errors': value['errors'] == null ? undefined : ((value['errors'] as Array).map(ValidationItemToJSON)), + 'warnings': value['warnings'] == null ? undefined : ((value['warnings'] as Array).map(ValidationItemToJSON)), + }; +} + + +export interface AccountCreateResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface AccountingCreateAccountResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface AccountingCreateBankAccountResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface AccountingCreateBankTransactionsResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface AccountingCreateDirectCostResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface AccountingCreatePaymentResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface AccountingCreateSupplierResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface AccountingCreateTransferResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface AccountingCreateUpdateBankTransactionResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface BankAccountCreateResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface BankTransactionsCreateResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface CreateAccountResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface CreateBankAccountResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface CreateBankTransactionsResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface CreateDirectCostResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface CreateOperationGetResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface CreatePaymentResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface CreateSupplierResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface CreateTransferResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface DirectCostCreateResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface GetCreateOperationResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface PaymentCreateResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface PushOperationValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface PushOperationsValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface SupplierCreateResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; +} + +export interface TransferCreateResponseValidation { + /** + * + * @type {Array} + * @memberof Validation + */ + errors?: Array | null; + /** + * + * @type {Array} + * @memberof Validation + */ + warnings?: Array | null; } diff --git a/lending/src/sdk/models/shared/validationitem.ts b/lending/src/sdk/models/shared/validationitem.ts index ca354aa0b..ab76c6c0b 100644 --- a/lending/src/sdk/models/shared/validationitem.ts +++ b/lending/src/sdk/models/shared/validationitem.ts @@ -1,44 +1,282 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ValidationItem = { - /** - * Unique identifier for a validation item. - */ - itemId?: string | null | undefined; - /** - * A message outlining validation item's issue. - */ - message?: string | null | undefined; - /** - * Name of validator. - */ - validatorName?: string | null | undefined; -}; - -/** @internal */ -export const ValidationItem$inboundSchema: z.ZodType< - ValidationItem, - z.ZodTypeDef, - unknown -> = z.object({ - itemId: z.nullable(z.string()).optional(), - message: z.nullable(z.string()).optional(), - validatorName: z.nullable(z.string()).optional(), -}); - -export function validationItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ValidationItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ValidationItem' from JSON`, - ); +import { mapValues } from '../../../runtime'; +/** + * + * @export + * @interface ValidationItem + */ +export interface ValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +/** + * Check if a given object implements the ValidationItem interface. + */ +export function instanceOfValidationItem(value: object): value is ValidationItem { + return true; +} + +export function ValidationItemFromJSON(json: any): ValidationItem { + return ValidationItemFromJSONTyped(json, false); +} + +export function ValidationItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationItem { + if (json == null) { + return json; + } + return { + + ...json, + 'itemId': json['itemId'] == null ? undefined : json['itemId'], + 'message': json['message'] == null ? undefined : json['message'], + 'validatorName': json['validatorName'] == null ? undefined : json['validatorName'], + }; +} + +export function ValidationItemToJSON(json: any): ValidationItem { + return ValidationItemToJSONTyped(json, false); +} + +export function ValidationItemToJSONTyped(value?: ValidationItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'itemId': value['itemId'], + 'message': value['message'], + 'validatorName': value['validatorName'], + }; +} + + +export interface AccountingCreateAccountResponseValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +export interface AccountingCreateBankAccountResponseValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +export interface AccountingCreateBankTransactionsResponseValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +export interface AccountingCreateDirectCostResponseValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +export interface AccountingCreatePaymentResponseValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +export interface AccountingCreateSupplierResponseValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +export interface AccountingCreateTransferResponseValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +export interface AccountingCreateUpdateBankTransactionResponseValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; +} + +export interface PushOperationValidationItem { + [key: string]: any | any; + /** + * Unique identifier for a validation item. + * @type {string} + * @memberof ValidationItem + */ + itemId?: string | null; + /** + * A message outlining validation item's issue. + * @type {string} + * @memberof ValidationItem + */ + message?: string | null; + /** + * Name of validator. + * @type {string} + * @memberof ValidationItem + */ + validatorName?: string | null; } diff --git a/lending/src/sdk/models/shared/validdatatypelinks.ts b/lending/src/sdk/models/shared/validdatatypelinks.ts new file mode 100644 index 000000000..8a0f840ae --- /dev/null +++ b/lending/src/sdk/models/shared/validdatatypelinks.ts @@ -0,0 +1,172 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +/** + * When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. + * + * For example, `validDatatypeLinks` might indicate the following references: + * + * - Which tax rates are valid to use on the line item of a bill. + * - Which items can be used when creating an invoice. + * + * You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. + * + * ## `validDatatypeLinks` example + * + * The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. + * + * ```json validDatatypeLinks for an account + * { + * "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", + * "nominalCode": "090", + * "name": "Business Bank Account", + * #... + * "validDatatypeLinks": [ + * { + * "property": "Id", + * "links": [ + * "Payment.AccountRef.Id", + * "BillPayment.AccountRef.Id", + * "DirectIncome.LineItems.AccountRef.Id", + * "DirectCost.LineItems.AccountRef.Id" + * ] + * } + * ] + * } + * ``` + * + * + * + * ## Support for `validDatatypeLinks` + * + * Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. + * + * If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + * @export + * @interface ValidDataTypeLinks + */ +export interface ValidDataTypeLinks { + /** + * The property from the account that can be linked. + * @type {string} + * @memberof ValidDataTypeLinks + */ + property?: string | null; + /** + * Supported `dataTypes` that the record can be linked to. + * @type {Array} + * @memberof ValidDataTypeLinks + */ + links?: Array | null; +} + +/** + * Check if a given object implements the ValidDataTypeLinks interface. + */ +export function instanceOfValidDataTypeLinks(value: object): value is ValidDataTypeLinks { + return true; +} + +export function ValidDataTypeLinksFromJSON(json: any): ValidDataTypeLinks { + return ValidDataTypeLinksFromJSONTyped(json, false); +} + +export function ValidDataTypeLinksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidDataTypeLinks { + if (json == null) { + return json; + } + return { + + 'property': json['property'] == null ? undefined : json['property'], + 'links': json['links'] == null ? undefined : json['links'], + }; +} + +export function ValidDataTypeLinksToJSON(json: any): ValidDataTypeLinks { + return ValidDataTypeLinksToJSONTyped(json, false); +} + +export function ValidDataTypeLinksToJSONTyped(value?: ValidDataTypeLinks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'property': value['property'], + 'links': value['links'], + }; +} + + +export interface AccountingAccountGetResponseValidDataTypeLinks { + /** + * The property from the account that can be linked. + * @type {string} + * @memberof ValidDataTypeLinks + */ + property?: string | null; + /** + * Supported `dataTypes` that the record can be linked to. + * @type {Array} + * @memberof ValidDataTypeLinks + */ + links?: Array | null; +} + +export interface AccountingAccountValidDataTypeLinks { + /** + * The property from the account that can be linked. + * @type {string} + * @memberof ValidDataTypeLinks + */ + property?: string | null; + /** + * Supported `dataTypes` that the record can be linked to. + * @type {Array} + * @memberof ValidDataTypeLinks + */ + links?: Array | null; +} + +export interface AccountingCreateAccountResponseValidDataTypeLinks { + /** + * The property from the account that can be linked. + * @type {string} + * @memberof ValidDataTypeLinks + */ + property?: string | null; + /** + * Supported `dataTypes` that the record can be linked to. + * @type {Array} + * @memberof ValidDataTypeLinks + */ + links?: Array | null; +} + +export interface GetAccountingAccountResponseValidDataTypeLinks { + /** + * The property from the account that can be linked. + * @type {string} + * @memberof ValidDataTypeLinks + */ + property?: string | null; + /** + * Supported `dataTypes` that the record can be linked to. + * @type {Array} + * @memberof ValidDataTypeLinks + */ + links?: Array | null; +} diff --git a/lending/src/sdk/models/shared/weblink.ts b/lending/src/sdk/models/shared/weblink.ts index 67004ecfc..9cd3950e9 100644 --- a/lending/src/sdk/models/shared/weblink.ts +++ b/lending/src/sdk/models/shared/weblink.ts @@ -1,57 +1,356 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - +import type { WebLinkType } from '../_speakeasy_enums'; +import { mapValues } from '../../../runtime'; /** - * The type of the weblink. + * Weblink associated with the company. + * @export + * @interface WebLink */ -export const WebLinkType = { - Website: "Website", - Social: "Social", - Unknown: "Unknown", -} as const; +export interface WebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + + /** - * The type of the weblink. + * @export */ -export type WebLinkType = ClosedEnum; +export const WebLinkTypeEnum = { + Website: 'Website', + Social: 'Social', + Unknown: 'Unknown' +} as const; +export type WebLinkTypeEnum = typeof WebLinkTypeEnum[keyof typeof WebLinkTypeEnum]; + /** - * Weblink associated with the company. + * Check if a given object implements the WebLink interface. */ -export type WebLink = { - /** - * The type of the weblink. - */ - type?: WebLinkType | undefined; - /** - * The full URL for the weblink. - */ - url?: string | undefined; -}; - -/** @internal */ -export const WebLinkType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(WebLinkType); - -/** @internal */ -export const WebLink$inboundSchema: z.ZodType = - z.object({ - type: WebLinkType$inboundSchema.optional(), - url: z.string().optional(), - }); - -export function webLinkFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => WebLink$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'WebLink' from JSON`, - ); +export function instanceOfWebLink(value: object): value is WebLink { + return true; +} + +export function WebLinkFromJSON(json: any): WebLink { + return WebLinkFromJSONTyped(json, false); +} + +export function WebLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebLink { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'url': json['url'] == null ? undefined : json['url'], + }; +} + +export function WebLinkToJSON(json: any): WebLink { + return WebLinkToJSONTyped(json, false); +} + +export function WebLinkToJSONTyped(value?: WebLink | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': value['type'], + 'url': value['url'], + }; +} + + +export interface AccountingCompanyInfoWebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface AccountingCompanyInfoWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface AccountingCompanyInformationWebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface AccountingCompanyInformationWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface AccountingProfileGetResponseWebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface AccountingProfileGetResponseWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface CommerceCompanyInfoWebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface CommerceCompanyInfoWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface CommerceCompanyProfileWebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface CommerceCompanyProfileWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface CommerceProfileGetResponseWebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface CommerceProfileGetResponseWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface GetAccountingProfileResponseWebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface GetAccountingProfileResponseWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface GetCommerceProfileResponseWebLink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface GetCommerceProfileResponseWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface WebLinkWeblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; +} + +export interface Weblink { + /** + * The type of the weblink. + * @type {string} + * @memberof WebLink + */ + type?: WebLinkType; + /** + * The full URL for the weblink. + * @type {string} + * @memberof WebLink + */ + url?: string; } diff --git a/lending/src/sdk/models/shared/withholdingtax.ts b/lending/src/sdk/models/shared/withholdingtax.ts new file mode 100644 index 000000000..df1d034bc --- /dev/null +++ b/lending/src/sdk/models/shared/withholdingtax.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Lending + * Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers\' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently. The Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers. [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas) ## Endpoints | Endpoints | Description | | :- |:- | | Companies | Create and manage your SMB users\' companies. | | Connections | Create new and manage existing data connections for a company. | | Bank statements | Retrieve banking data from linked bank accounts. | | Sales | Retrieve standardized sales data from a linked commerce software. | | Financial statements | Financial data and reports from a linked accounting software. | | Liabilities | Debt and other liabilities. | | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. | | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. | | Transactions | Data from a linked accounting software representing transactions. | | Company info | View company information fetched from the source platform. | | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. | | Excel reports | Download reports in Excel format. | | Manage data | Control how data is retrieved from an integration. | | File upload | Endpoints to manage uploaded files. | | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: support@codat.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../../../runtime'; +import { Decimal, toDecimal, fromDecimal } from '../../../runtime'; +/** + * + * @export + * @interface WithholdingTax + */ +export interface WithholdingTax { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof WithholdingTax + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof WithholdingTax + */ + amount: Decimal | number; +} + +/** + * Check if a given object implements the WithholdingTax interface. + */ +export function instanceOfWithholdingTax(value: object): value is WithholdingTax { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('amount' in value) || value['amount'] === undefined) return false; + return true; +} + +export function WithholdingTaxFromJSON(json: any): WithholdingTax { + return WithholdingTaxFromJSONTyped(json, false); +} + +export function WithholdingTaxFromJSONTyped(json: any, ignoreDiscriminator: boolean): WithholdingTax { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'amount': json['amount'], + }; +} + +export function WithholdingTaxToJSON(json: any): WithholdingTax { + return WithholdingTaxToJSONTyped(json, false); +} + +export function WithholdingTaxToJSONTyped(value?: WithholdingTax | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'amount': fromDecimal(value['amount']), + }; +} + + +export interface AccountingBillGetResponseWithholdingTax { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof WithholdingTax + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof WithholdingTax + */ + amount: Decimal | number; +} + +export interface AccountingBillWithholdingTax { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof WithholdingTax + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof WithholdingTax + */ + amount: Decimal | number; +} + +export interface GetAccountingBillResponseWithholdingTax { + /** + * Name assigned to withheld tax. + * @type {string} + * @memberof WithholdingTax + */ + name: string; + /** + * Amount of tax withheld. + * @type {string} + * @memberof WithholdingTax + */ + amount: Decimal | number; +} diff --git a/lending/src/sdk/models/shared/zero.ts b/lending/src/sdk/models/shared/zero.ts deleted file mode 100644 index 5df0ced22..000000000 --- a/lending/src/sdk/models/shared/zero.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Allowed name of the 'dataType'. - */ -export const ZeroDataType = { - PurchaseOrders: "purchaseOrders", - Bills: "bills", -} as const; -/** - * Allowed name of the 'dataType'. - */ -export type ZeroDataType = ClosedEnum; - -/** - * Links the current record line to the underlying record line that created it. - * - * @remarks - * - * For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. - */ -export type Zero = { - /** - * 'id' of the underlying record. - */ - id?: string | undefined; - /** - * Allowed name of the 'dataType'. - */ - dataType?: ZeroDataType | undefined; - /** - * Line number of the underlying record. - */ - lineNumber?: string | undefined; -}; - -/** @internal */ -export const ZeroDataType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ZeroDataType); - -/** @internal */ -export const Zero$inboundSchema: z.ZodType = z - .object({ - id: z.string().optional(), - dataType: ZeroDataType$inboundSchema.optional(), - lineNumber: z.string().optional(), - }); - -export function zeroFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Zero$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Zero' from JSON`, - ); -} diff --git a/lending/src/sdk/models/webhooks/ReportsCreditModelGenerateSuccessfulReportGenerationWebhook.ts b/lending/src/sdk/models/webhooks/ReportsCreditModelGenerateSuccessfulReportGenerationWebhook.ts new file mode 100644 index 000000000..0fb8519ca --- /dev/null +++ b/lending/src/sdk/models/webhooks/ReportsCreditModelGenerateSuccessfulReportGenerationWebhook.ts @@ -0,0 +1,11 @@ +/* tslint:disable */ +/* eslint-disable */ + +import type { ReportGenerationPayload } from '../shared/reportgenerationpayload'; + +export type ReportsCreditModelGenerateSuccessfulReportGenerationWebhook = { + id?: string; + eventType?: string; + generatedDate?: string; + payload?: ReportGenerationPayload; +}; diff --git a/lending/src/sdk/models/webhooks/index.ts b/lending/src/sdk/models/webhooks/index.ts index 984c859cf..b51d44a22 100644 --- a/lending/src/sdk/models/webhooks/index.ts +++ b/lending/src/sdk/models/webhooks/index.ts @@ -1,5 +1,3 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -export * from "./reportscreditmodelgeneratesuccessful.js"; +/* tslint:disable */ +/* eslint-disable */ +export * from './ReportsCreditModelGenerateSuccessfulReportGenerationWebhook'; diff --git a/lending/src/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.ts b/lending/src/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.ts deleted file mode 100644 index a743e1be8..000000000 --- a/lending/src/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import * as shared from "../shared/index.js"; - -export type ReportsCreditModelGenerateSuccessfulReportGenerationWebhook = { - /** - * Unique identifier of the event. - */ - id?: string | undefined; - /** - * The type of event. - */ - eventType?: string | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00: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. - */ - generatedDate?: string | undefined; - payload?: shared.ReportGenerationPayload | undefined; -}; - -/** @internal */ -export const ReportsCreditModelGenerateSuccessfulReportGenerationWebhook$inboundSchema: - z.ZodType< - ReportsCreditModelGenerateSuccessfulReportGenerationWebhook, - z.ZodTypeDef, - unknown - > = z.object({ - id: z.string().optional(), - eventType: z.string().optional(), - generatedDate: z.string().optional(), - payload: shared.ReportGenerationPayload$inboundSchema.optional(), - }); -/** @internal */ -export type ReportsCreditModelGenerateSuccessfulReportGenerationWebhook$Outbound = - { - id?: string | undefined; - eventType?: string | undefined; - generatedDate?: string | undefined; - payload?: shared.ReportGenerationPayload$Outbound | undefined; - }; - -/** @internal */ -export const ReportsCreditModelGenerateSuccessfulReportGenerationWebhook$outboundSchema: - z.ZodType< - ReportsCreditModelGenerateSuccessfulReportGenerationWebhook$Outbound, - z.ZodTypeDef, - ReportsCreditModelGenerateSuccessfulReportGenerationWebhook - > = z.object({ - id: z.string().optional(), - eventType: z.string().optional(), - generatedDate: z.string().optional(), - payload: shared.ReportGenerationPayload$outboundSchema.optional(), - }); - -export function reportsCreditModelGenerateSuccessfulReportGenerationWebhookToJSON( - reportsCreditModelGenerateSuccessfulReportGenerationWebhook: - ReportsCreditModelGenerateSuccessfulReportGenerationWebhook, -): string { - return JSON.stringify( - ReportsCreditModelGenerateSuccessfulReportGenerationWebhook$outboundSchema - .parse(reportsCreditModelGenerateSuccessfulReportGenerationWebhook), - ); -} -export function reportsCreditModelGenerateSuccessfulReportGenerationWebhookFromJSON( - jsonString: string, -): SafeParseResult< - ReportsCreditModelGenerateSuccessfulReportGenerationWebhook, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - ReportsCreditModelGenerateSuccessfulReportGenerationWebhook$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'ReportsCreditModelGenerateSuccessfulReportGenerationWebhook' from JSON`, - ); -} diff --git a/lending/src/sdk/orders.ts b/lending/src/sdk/orders.ts index ad0a21a17..86f640011 100644 --- a/lending/src/sdk/orders.ts +++ b/lending/src/sdk/orders.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesOrdersGet } from "../funcs/salesOrdersGet.js"; -import { salesOrdersList } from "../funcs/salesOrdersList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Orders extends ClientSDK { - /** - * List orders - * - * @remarks - * The *List orders* endpoint returns a list of [orders](https://docs.codat.io/lending-api#/schemas/Order) for a given company's connection. - * - * [Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommerceOrdersRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesOrdersList( - this, - request, - options, - )); - } - - /** - * Get order - * - * @remarks - * The *Get order* endpoint returns a single order for a given orderId. - * - * [Orders](https://docs.codat.io/lending-api#/schemas/Order) contain the transaction details for all products sold by the company. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommerceOrderRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesOrdersGet( - this, - request, - options, - )); - } -} +export { Orders } from "../apis/Orders"; diff --git a/lending/src/sdk/paymentmethods.ts b/lending/src/sdk/paymentmethods.ts index 56e47f8d2..369bacac3 100644 --- a/lending/src/sdk/paymentmethods.ts +++ b/lending/src/sdk/paymentmethods.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesPaymentMethodsGet } from "../funcs/salesPaymentMethodsGet.js"; -import { salesPaymentMethodsList } from "../funcs/salesPaymentMethodsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class PaymentMethods extends ClientSDK { - /** - * List payment methods - * - * @remarks - * The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) for a given company's connection. - * - * [Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommercePaymentMethodsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesPaymentMethodsList( - this, - request, - options, - )); - } - - /** - * Get payment method - * - * @remarks - * The *Get payment method* endpoint returns a single payment method for a given paymentMethodId. - * - * [Payment methods](https://docs.codat.io/lending-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommercePaymentMethodRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesPaymentMethodsGet( - this, - request, - options, - )); - } -} +export { PaymentMethods } from "../apis/PaymentMethods"; diff --git a/lending/src/sdk/payments.ts b/lending/src/sdk/payments.ts index 45db99675..9b567096a 100644 --- a/lending/src/sdk/payments.ts +++ b/lending/src/sdk/payments.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsReceivablePaymentsGet } from "../funcs/accountsReceivablePaymentsGet.js"; -import { accountsReceivablePaymentsList } from "../funcs/accountsReceivablePaymentsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Payments extends ClientSDK { - /** - * List payments - * - * @remarks - * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/lending-api#/schemas/Payment) for a given company's connection. - * - * [Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingPaymentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivablePaymentsList( - this, - request, - options, - )); - } - - /** - * Get payment - * - * @remarks - * The *Get payment* endpoint returns a single payment for a given paymentId. - * - * [Payments](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingPaymentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsReceivablePaymentsGet( - this, - request, - options, - )); - } -} +export { Payments } from "../apis/Payments"; diff --git a/lending/src/sdk/productcategories.ts b/lending/src/sdk/productcategories.ts index e46094b81..3938e5230 100644 --- a/lending/src/sdk/productcategories.ts +++ b/lending/src/sdk/productcategories.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesProductCategoriesGet } from "../funcs/salesProductCategoriesGet.js"; -import { salesProductCategoriesList } from "../funcs/salesProductCategoriesList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class ProductCategories extends ClientSDK { - /** - * List product categories - * - * @remarks - * The *List product categories* endpoint returns a list of [product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) for a given company's connection. - * - * [Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommerceProductCategoriesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesProductCategoriesList( - this, - request, - options, - )); - } - - /** - * Get product category - * - * @remarks - * The *Get product* endpoint returns a single product for a given productId. - * - * [Product categories](https://docs.codat.io/lending-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommerceProductCategoryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesProductCategoriesGet( - this, - request, - options, - )); - } -} +export { ProductCategories } from "../apis/ProductCategories"; diff --git a/lending/src/sdk/products.ts b/lending/src/sdk/products.ts index 52a3ef5ee..483fc4120 100644 --- a/lending/src/sdk/products.ts +++ b/lending/src/sdk/products.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesProductsGet } from "../funcs/salesProductsGet.js"; -import { salesProductsList } from "../funcs/salesProductsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Products extends ClientSDK { - /** - * List products - * - * @remarks - * The *List products* endpoint returns a list of [products](https://docs.codat.io/lending-api#/schemas/Product) for a given company's connection. - * - * [Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company's inventory that are available for sale. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListCommerceProductsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesProductsList( - this, - request, - options, - )); - } - - /** - * Get product - * - * @remarks - * The *Get product* endpoint returns a single product for a given productId. - * - * [Products](https://docs.codat.io/lending-api#/schemas/Product) are items in the company's inventory that are available for sale. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetCommerceProductRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesProductsGet( - this, - request, - options, - )); - } -} +export { Products } from "../apis/Products"; diff --git a/lending/src/sdk/profitandloss.ts b/lending/src/sdk/profitandloss.ts index c53b8b551..c8c4e5a4b 100644 --- a/lending/src/sdk/profitandloss.ts +++ b/lending/src/sdk/profitandloss.ts @@ -1,48 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { financialStatementsProfitAndLossGet } from "../funcs/financialStatementsProfitAndLossGet.js"; -import { financialStatementsProfitAndLossGetCategorizedAccounts } from "../funcs/financialStatementsProfitAndLossGetCategorizedAccounts.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class ProfitAndLoss extends ClientSDK { - /** - * Get categorized profit and loss statement - * - * @remarks - * The *Get categorized profit and loss statement* endpoint returns a list of categorized accounts that appear on a company’s Profit and Loss statement. It also includes a balance as of the financial statement date. - * - * Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/features/financial-statements-overview#recategorizing-accounts) to a more suitable one. - */ - async getCategorizedAccounts( - request: operations.GetCategorizedProfitAndLossStatementRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(financialStatementsProfitAndLossGetCategorizedAccounts( - this, - request, - options, - )); - } - - /** - * Get profit and loss - * - * @remarks - * Gets the latest profit and loss for a company. - */ - async get( - request: operations.GetAccountingProfitAndLossRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(financialStatementsProfitAndLossGet( - this, - request, - options, - )); - } -} +export { ProfitAndLoss } from "../apis/ProfitAndLoss"; diff --git a/lending/src/sdk/pulloperations.ts b/lending/src/sdk/pulloperations.ts index cb2345f86..510eae9e4 100644 --- a/lending/src/sdk/pulloperations.ts +++ b/lending/src/sdk/pulloperations.ts @@ -1,46 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { manageDataPullOperationsGet } from "../funcs/manageDataPullOperationsGet.js"; -import { manageDataPullOperationsList } from "../funcs/manageDataPullOperationsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class PullOperations extends ClientSDK { - /** - * List pull operations - * - * @remarks - * Gets the pull operation history (datasets) for a given company. - */ - async list( - request: operations.ListPullOperationsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(manageDataPullOperationsList( - this, - request, - options, - )); - } - - /** - * Get pull operation - * - * @remarks - * Retrieve information about a single dataset or pull operation. - */ - async get( - request: operations.GetPullOperationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(manageDataPullOperationsGet( - this, - request, - options, - )); - } -} +export { PullOperations } from "../apis/PullOperations"; diff --git a/lending/src/sdk/refresh.ts b/lending/src/sdk/refresh.ts index b8a946a76..056ef001c 100644 --- a/lending/src/sdk/refresh.ts +++ b/lending/src/sdk/refresh.ts @@ -1,52 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { manageDataRefreshAllDataTypes } from "../funcs/manageDataRefreshAllDataTypes.js"; -import { manageDataRefreshDataType } from "../funcs/manageDataRefreshDataType.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Refresh extends ClientSDK { - /** - * Refresh all data - * - * @remarks - * Refreshes all data types with `fetch on first link` set to `true` for a given company. - * - * This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - * - * [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. - */ - async allDataTypes( - request: operations.RefreshAllDataTypesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(manageDataRefreshAllDataTypes( - this, - request, - options, - )); - } - - /** - * Refresh data type - * - * @remarks - * Refreshes a given data type for a given company. - * - * This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - */ - async dataType( - request: operations.RefreshDataTypeRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(manageDataRefreshDataType( - this, - request, - options, - )); - } -} +export { Refresh } from "../apis/Refresh"; diff --git a/lending/src/sdk/reports.ts b/lending/src/sdk/reports.ts index 5dc08cba6..aa935bde5 100644 --- a/lending/src/sdk/reports.ts +++ b/lending/src/sdk/reports.ts @@ -1,87 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { salesReportsGetOrders } from "../funcs/salesReportsGetOrders.js"; -import { salesReportsGetRefunds } from "../funcs/salesReportsGetRefunds.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Reports extends ClientSDK { - /** - * Get orders report - * - * @remarks - * The *Get orders report* endpoint returns the number of orders, total value, and average order value for a specific company's commerce connection over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the order metrics. - * - * #### Response structure - * - * The Orders report's dimensions and measures are: - * - * | Index | Dimensions | - * |---------------|----------------| - * | `index` = 0 | Period | - * | `index` = 1 | Order metrics | - * - * | Index | Measures | - * |---------------|------------| - * | `index` = 0 | Count | - * | `index` = 1 | Value | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ - async getOrders( - request: operations.GetCommerceOrdersReportRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesReportsGetOrders( - this, - request, - options, - )); - } - - /** - * Get refunds report - * - * @remarks - * The *Get refunds report* endpoint returns the number and total value of refunds and the refund rate for a specific company's commerce connection over one or more periods of time. - * - * This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company. - * - * [Learn more](https://docs.codat.io/lending/features/sales-overview#metrics) about the formulas used to calculate the refunds metrics. - * - * #### Response structure - * - * The Refunds report's dimensions and measures are: - * - * | Index | Dimensions | - * |----------------|----------------| - * | `index` = 0 | Period | - * | `index` = 1 | Refund metrics | - * - * | Index | Measures | - * |----------------|------------| - * | `index` = 0 | Count | - * | `index` = 1 | Value | - * | `index` = 2 | Percentage | - * - * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination. - */ - async getRefunds( - request: operations.GetCommerceRefundsReportRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(salesReportsGetRefunds( - this, - request, - options, - )); - } -} +export { Reports } from "../apis/SalesReports"; diff --git a/lending/src/sdk/sales.ts b/lending/src/sdk/sales.ts index 580294c1e..2b7be0b8a 100644 --- a/lending/src/sdk/sales.ts +++ b/lending/src/sdk/sales.ts @@ -1,75 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ClientSDK } from "../lib/sdks.js"; -import { CodatLendingCustomers } from "./codatlendingcustomers.js"; -import { CodatLendingPayments } from "./codatlendingpayments.js"; -import { CodatLendingSalesTransactions } from "./codatlendingsalestransactions.js"; -import { Disputes } from "./disputes.js"; -import { Locations } from "./locations.js"; -import { Metrics } from "./metrics.js"; -import { Orders } from "./orders.js"; -import { PaymentMethods } from "./paymentmethods.js"; -import { ProductCategories } from "./productcategories.js"; -import { Products } from "./products.js"; -import { Reports } from "./reports.js"; - -export class Sales extends ClientSDK { - private _metrics?: Metrics; - get metrics(): Metrics { - return (this._metrics ??= new Metrics(this._options)); - } - - private _reports?: Reports; - get reports(): Reports { - return (this._reports ??= new Reports(this._options)); - } - - private _customers?: CodatLendingCustomers; - get customers(): CodatLendingCustomers { - return (this._customers ??= new CodatLendingCustomers(this._options)); - } - - private _disputes?: Disputes; - get disputes(): Disputes { - return (this._disputes ??= new Disputes(this._options)); - } - - private _locations?: Locations; - get locations(): Locations { - return (this._locations ??= new Locations(this._options)); - } - - private _orders?: Orders; - get orders(): Orders { - return (this._orders ??= new Orders(this._options)); - } - - private _paymentMethods?: PaymentMethods; - get paymentMethods(): PaymentMethods { - return (this._paymentMethods ??= new PaymentMethods(this._options)); - } - - private _payments?: CodatLendingPayments; - get payments(): CodatLendingPayments { - return (this._payments ??= new CodatLendingPayments(this._options)); - } - - private _productCategories?: ProductCategories; - get productCategories(): ProductCategories { - return (this._productCategories ??= new ProductCategories(this._options)); - } - - private _products?: Products; - get products(): Products { - return (this._products ??= new Products(this._options)); - } - - private _transactions?: CodatLendingSalesTransactions; - get transactions(): CodatLendingSalesTransactions { - return (this._transactions ??= new CodatLendingSalesTransactions( - this._options, - )); - } -} +export { Sales } from "../sdk"; diff --git a/lending/src/sdk/sdk.ts b/lending/src/sdk/sdk.ts index 7e0025f00..aac59d827 100644 --- a/lending/src/sdk/sdk.ts +++ b/lending/src/sdk/sdk.ts @@ -1,143 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { validateWebhook } from "../funcs/validateWebhook.js"; -import { ClientSDK } from "../lib/sdks.js"; -import { AccountingBankData } from "./accountingbankdata.js"; -import { AccountsPayable } from "./accountspayable.js"; -import { AccountsReceivable } from "./accountsreceivable.js"; -import { Banking } from "./banking.js"; -import { BankStatements } from "./bankstatements.js"; -import { Companies } from "./companies.js"; -import { CompanyInfo } from "./companyinfo.js"; -import { Connections } from "./connections.js"; -import { DataIntegrity } from "./dataintegrity.js"; -import { ExcelReports } from "./excelreports.js"; -import { FileUpload } from "./fileupload.js"; -import { FinancialStatements } from "./financialstatements.js"; -import { Liabilities } from "./liabilities.js"; -import { LoanWriteback } from "./loanwriteback.js"; -import { ManageData } from "./managedata.js"; -import { ManageReports } from "./managereports.js"; -import * as shared from "./models/shared/index.js"; -import * as webhooks from "./models/webhooks/index.js"; -import { Sales } from "./sales.js"; -import { Transactions } from "./transactions.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class CodatLending extends ClientSDK { - private _companies?: Companies; - get companies(): Companies { - return (this._companies ??= new Companies(this._options)); - } - - private _connections?: Connections; - get connections(): Connections { - return (this._connections ??= new Connections(this._options)); - } - - private _manageData?: ManageData; - get manageData(): ManageData { - return (this._manageData ??= new ManageData(this._options)); - } - - private _dataIntegrity?: DataIntegrity; - get dataIntegrity(): DataIntegrity { - return (this._dataIntegrity ??= new DataIntegrity(this._options)); - } - - private _financialStatements?: FinancialStatements; - get financialStatements(): FinancialStatements { - return (this._financialStatements ??= new FinancialStatements( - this._options, - )); - } - - private _banking?: Banking; - get banking(): Banking { - return (this._banking ??= new Banking(this._options)); - } - - private _accountsReceivable?: AccountsReceivable; - get accountsReceivable(): AccountsReceivable { - return (this._accountsReceivable ??= new AccountsReceivable(this._options)); - } - - private _liabilities?: Liabilities; - get liabilities(): Liabilities { - return (this._liabilities ??= new Liabilities(this._options)); - } - - private _sales?: Sales; - get sales(): Sales { - return (this._sales ??= new Sales(this._options)); - } - - private _excelReports?: ExcelReports; - get excelReports(): ExcelReports { - return (this._excelReports ??= new ExcelReports(this._options)); - } - - private _transactions?: Transactions; - get transactions(): Transactions { - return (this._transactions ??= new Transactions(this._options)); - } - - private _accountsPayable?: AccountsPayable; - get accountsPayable(): AccountsPayable { - return (this._accountsPayable ??= new AccountsPayable(this._options)); - } - - private _companyInfo?: CompanyInfo; - get companyInfo(): CompanyInfo { - return (this._companyInfo ??= new CompanyInfo(this._options)); - } - - private _accountingBankData?: AccountingBankData; - get accountingBankData(): AccountingBankData { - return (this._accountingBankData ??= new AccountingBankData(this._options)); - } - - private _fileUpload?: FileUpload; - get fileUpload(): FileUpload { - return (this._fileUpload ??= new FileUpload(this._options)); - } - - private _loanWriteback?: LoanWriteback; - get loanWriteback(): LoanWriteback { - return (this._loanWriteback ??= new LoanWriteback(this._options)); - } - - private _bankStatements?: BankStatements; - get bankStatements(): BankStatements { - return (this._bankStatements ??= new BankStatements(this._options)); - } - - private _manageReports?: ManageReports; - get manageReports(): ManageReports { - return (this._manageReports ??= new ManageReports(this._options)); - } - - async validateWebhook({ - request, - }: { - request: { - body: string; - headers: Record | Headers; - url: string; - method: string; - } | Request; - }): Promise< - | shared.AccountCategoriesUpdatedWebhook - | undefined - | shared.ClientRateLimitWebhook - | shared.Schema - | webhooks.ReportsCreditModelGenerateSuccessfulReportGenerationWebhook - > { - return unwrapAsync(validateWebhook( - this, - { request }, - )); - } -} +export * from "../sdk"; diff --git a/lending/src/sdk/sourceaccounts.ts b/lending/src/sdk/sourceaccounts.ts index 15cc09811..881c38183 100644 --- a/lending/src/sdk/sourceaccounts.ts +++ b/lending/src/sdk/sourceaccounts.ts @@ -1,102 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { loanWritebackSourceAccountsCreate } from "../funcs/loanWritebackSourceAccountsCreate.js"; -import { loanWritebackSourceAccountsCreateMapping } from "../funcs/loanWritebackSourceAccountsCreateMapping.js"; -import { loanWritebackSourceAccountsListMappings } from "../funcs/loanWritebackSourceAccountsListMappings.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class SourceAccounts extends ClientSDK { - /** - * Create source account - * - * @remarks - * The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software. - * - * > ### Versioning - * > If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. - */ - async create( - request: operations.CreateSourceAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackSourceAccountsCreate( - this, - request, - options, - )); - } - - /** - * List bank feed account mappings - * - * @remarks - * The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts. - * - * A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). - * - * > **For custom builds only** - * > - * > Only use this endpoint if you are building your own account management UI. - */ - async listMappings( - request: operations.GetBankAccountMappingRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(loanWritebackSourceAccountsListMappings( - this, - request, - options, - )); - } - - /** - * Create bank feed account mapping - * - * @remarks - * The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account). - * - * A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). - * - * To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint. - * - * > **For custom builds only** - * > - * > Only use this endpoint if you are building your own account management UI. - * - * #### Account mapping variability - * - * The method of mapping the source account to the target account varies depending on the accounting software your company uses. - * - * #### Mapping options: - * - * 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. - * 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping. - * 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. - * - * ### Integration-specific behavior - * - * | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | - * | --------------------- | ----------- | ---------------- | --------------------------- | - * | Xero | ✅ | ✅ | | - * | FreeAgent | ✅ | ✅ | | - * | Oracle NetSuite | ✅ | ✅ | | - * | Exact Online (NL) | ✅ | ✅ | | - * | QuickBooks Online | | | ✅ | - * | Sage | | | ✅ | - */ - async createMapping( - request: operations.CreateBankAccountMappingRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(loanWritebackSourceAccountsCreateMapping( - this, - request, - options, - )); - } -} +export { SourceAccounts } from "../apis/SourceAccounts"; diff --git a/lending/src/sdk/suppliers.ts b/lending/src/sdk/suppliers.ts index e0793a14e..0b038af81 100644 --- a/lending/src/sdk/suppliers.ts +++ b/lending/src/sdk/suppliers.ts @@ -1,114 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { accountsPayableSuppliersDownloadAttachment } from "../funcs/accountsPayableSuppliersDownloadAttachment.js"; -import { accountsPayableSuppliersGet } from "../funcs/accountsPayableSuppliersGet.js"; -import { accountsPayableSuppliersGetAttachment } from "../funcs/accountsPayableSuppliersGetAttachment.js"; -import { accountsPayableSuppliersList } from "../funcs/accountsPayableSuppliersList.js"; -import { accountsPayableSuppliersListAttachments } from "../funcs/accountsPayableSuppliersListAttachments.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Suppliers extends ClientSDK { - /** - * List suppliers - * - * @remarks - * The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) for a given company's connection. - * - * [Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingSuppliersRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableSuppliersList( - this, - request, - options, - )); - } - - /** - * Get supplier - * - * @remarks - * The *Get supplier* endpoint returns a single supplier for a given supplierId. - * - * [Suppliers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingSupplierRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableSuppliersGet( - this, - request, - options, - )); - } - - /** - * List supplier attachments - * - * @remarks - * The *List supplier attachments* endpoint returns a list of attachments available to download for given `supplierId`. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - */ - async listAttachments( - request: operations.ListAccountingSupplierAttachmentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableSuppliersListAttachments( - this, - request, - options, - )); - } - - /** - * Get supplier attachment - * - * @remarks - * The *Get supplier attachment* endpoint returns a specific attachment for a given `supplierId` and `attachmentId`. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - */ - async getAttachment( - request: operations.GetAccountingSupplierAttachmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountsPayableSuppliersGetAttachment( - this, - request, - options, - )); - } - - /** - * Download supplier attachment - * - * @remarks - * The *Download supplier attachment* endpoint downloads a specific attachment for a given `supplierId` and `attachmentId`. - * - * [Suppliers](https://docs.codat.io/lending-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - */ - async downloadAttachment( - request: operations.DownloadAccountingSupplierAttachmentRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(accountsPayableSuppliersDownloadAttachment( - this, - request, - options, - )); - } -} +export { Suppliers } from "../apis/Suppliers"; diff --git a/lending/src/sdk/transactioncategories.ts b/lending/src/sdk/transactioncategories.ts index fcc1a7f1d..676aa47f4 100644 --- a/lending/src/sdk/transactioncategories.ts +++ b/lending/src/sdk/transactioncategories.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { bankingTransactionCategoriesGet } from "../funcs/bankingTransactionCategoriesGet.js"; -import { bankingTransactionCategoriesList } from "../funcs/bankingTransactionCategoriesList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class TransactionCategories extends ClientSDK { - /** - * List transaction categories - * - * @remarks - * The *List transaction categories* endpoint returns a list of [transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) for a given company's connection. - * - * [Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListBankingTransactionCategoriesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankingTransactionCategoriesList( - this, - request, - options, - )); - } - - /** - * Get transaction category - * - * @remarks - * The *Get transaction category* endpoint returns a single transaction category for a given transactionCategoryId. - * - * [Transaction categories](https://docs.codat.io/lending-api#/schemas/TransactionCategory) are associated with a transaction to provide greater contextual meaning to transaction activity. - * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetBankingTransactionCategoryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankingTransactionCategoriesGet( - this, - request, - options, - )); - } -} +export { TransactionCategories } from "../apis/TransactionCategories"; diff --git a/lending/src/sdk/transactions.ts b/lending/src/sdk/transactions.ts index 13166956c..c7469ef93 100644 --- a/lending/src/sdk/transactions.ts +++ b/lending/src/sdk/transactions.ts @@ -1,39 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ClientSDK } from "../lib/sdks.js"; -import { AccountTransactions } from "./accounttransactions.js"; -import { DirectCosts } from "./directcosts.js"; -import { JournalEntries } from "./journalentries.js"; -import { Journals } from "./journals.js"; -import { Transfers } from "./transfers.js"; - -export class Transactions extends ClientSDK { - private _accountTransactions?: AccountTransactions; - get accountTransactions(): AccountTransactions { - return (this._accountTransactions ??= new AccountTransactions( - this._options, - )); - } - - private _directCosts?: DirectCosts; - get directCosts(): DirectCosts { - return (this._directCosts ??= new DirectCosts(this._options)); - } - - private _journalEntries?: JournalEntries; - get journalEntries(): JournalEntries { - return (this._journalEntries ??= new JournalEntries(this._options)); - } - - private _journals?: Journals; - get journals(): Journals { - return (this._journals ??= new Journals(this._options)); - } - - private _transfers?: Transfers; - get transfers(): Transfers { - return (this._transfers ??= new Transfers(this._options)); - } -} +export { Transactions } from "../sdk"; diff --git a/lending/src/sdk/transfers.ts b/lending/src/sdk/transfers.ts index 2382ff02b..8bfb560c4 100644 --- a/lending/src/sdk/transfers.ts +++ b/lending/src/sdk/transfers.ts @@ -1,54 +1 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { transactionsTransfersGet } from "../funcs/transactionsTransfersGet.js"; -import { transactionsTransfersList } from "../funcs/transactionsTransfersList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Transfers extends ClientSDK { - /** - * List transfers - * - * @remarks - * The *List transfers* endpoint returns a list of [transfers](https://docs.codat.io/lending-api#/schemas/Transfer) for a given company's connection. - * - * [Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async list( - request: operations.ListAccountingTransfersRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsTransfersList( - this, - request, - options, - )); - } - - /** - * Get transfer - * - * @remarks - * The *Get transfer* endpoint returns a single transfer for a given transferId. - * - * [Transfers](https://docs.codat.io/lending-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/lending-api#/operations/refresh-company-data). - */ - async get( - request: operations.GetAccountingTransferRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(transactionsTransfersGet( - this, - request, - options, - )); - } -} +export { Transfers } from "../apis/TransactionsTransfers"; diff --git a/lending/src/sdk/types/async.ts b/lending/src/sdk/types/async.ts index 689dba5de..208661e87 100644 --- a/lending/src/sdk/types/async.ts +++ b/lending/src/sdk/types/async.ts @@ -1,68 +1,51 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ export type APICall = - | { - status: "complete"; - request: Request; - response: Response; - } - | { - status: "request-error"; - request: Request; - response?: undefined; - } - | { - status: "invalid"; - request?: undefined; - response?: undefined; - }; + | { status: "complete"; request: Request; response: Response } + | { status: "request-error"; request: Request; response?: undefined } + | { status: "invalid"; request?: undefined; response?: undefined }; -export class APIPromise implements Promise { - readonly #promise: Promise<[T, APICall]>; - readonly #unwrapped: Promise; +export class APIPromise { + private readonly inner: Promise; - readonly [Symbol.toStringTag] = "APIPromise"; + constructor(inner: Promise) { + this.inner = inner; + } - constructor(p: [T, APICall] | Promise<[T, APICall]>) { - this.#promise = p instanceof Promise ? p : Promise.resolve(p); - this.#unwrapped = - p instanceof Promise - ? this.#promise.then(([value]) => value) - : Promise.resolve(p[0]); - } + then( + onfulfilled?: ((value: T) => R1 | PromiseLike) | null, + onrejected?: ((reason: unknown) => R2 | PromiseLike) | null, + ): Promise { + return this.inner.then(onfulfilled, onrejected); + } - then( - onfulfilled?: - | ((value: T) => TResult1 | PromiseLike) - | null - | undefined, - onrejected?: - | ((reason: any) => TResult2 | PromiseLike) - | null - | undefined, - ): Promise { - return this.#promise.then( - onfulfilled ? ([value]) => onfulfilled(value) : void 0, - onrejected, - ); - } + catch(onrejected?: ((reason: unknown) => R | PromiseLike) | null): Promise { + return this.inner.catch(onrejected); + } - catch( - onrejected?: - | ((reason: any) => TResult | PromiseLike) - | null - | undefined, - ): Promise { - return this.#unwrapped.catch(onrejected); - } + finally(onfinally?: (() => void) | null): Promise { + return this.inner.then( + (value) => { + if (onfinally) { + onfinally(); + } + return value; + }, + (reason) => { + if (onfinally) { + onfinally(); + } + throw reason; + }, + ); + } - finally(onfinally?: (() => void) | null | undefined): Promise { - return this.#unwrapped.finally(onfinally); - } + $inspect(): Promise { + return this.inner; + } - $inspect(): Promise<[T, APICall]> { - return this.#promise; - } + get [Symbol.toStringTag](): string { + return "APIPromise"; + } } diff --git a/lending/src/sdk/types/blobs.ts b/lending/src/sdk/types/blobs.ts deleted file mode 100644 index cce2892d4..000000000 --- a/lending/src/sdk/types/blobs.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export const blobLikeSchema: z.ZodType = z.custom< - Blob ->(isBlobLike, { - message: "expected a Blob, File or Blob-like object", - fatal: true, -}); - -export function isBlobLike(val: unknown): val is Blob { - if (val instanceof Blob) { - return true; - } - - if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { - return false; - } - - const name = val[Symbol.toStringTag]; - if (typeof name !== "string") { - return false; - } - if (name !== "Blob" && name !== "File") { - return false; - } - - return "stream" in val && typeof val.stream === "function"; -} diff --git a/lending/src/sdk/types/constdatetime.ts b/lending/src/sdk/types/constdatetime.ts deleted file mode 100644 index fe62144ea..000000000 --- a/lending/src/sdk/types/constdatetime.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; - -export function constDateTime( - val: string, -): z.ZodType { - return z.custom((v) => { - return ( - typeof v === "string" && new Date(v).getTime() === new Date(val).getTime() - ); - }, `Value must be equivalent to ${val}`); -} diff --git a/lending/src/sdk/types/decimal.ts b/lending/src/sdk/types/decimal.ts index a7895d555..5dcba30f5 100644 --- a/lending/src/sdk/types/decimal.ts +++ b/lending/src/sdk/types/decimal.ts @@ -1,5 +1,3 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - +/* tslint:disable */ +/* eslint-disable */ export * from "decimal.js"; diff --git a/lending/src/sdk/types/enums.ts b/lending/src/sdk/types/enums.ts deleted file mode 100644 index aba0ffd2a..000000000 --- a/lending/src/sdk/types/enums.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { Unrecognized, unrecognized } from "./unrecognized.js"; - -export type ClosedEnum>> = - T[keyof T]; -export type OpenEnum>> = - | T[keyof T] - | Unrecognized; - -export function inboundSchema>( - enumObj: T, -): z.ZodType, z.ZodTypeDef, unknown> { - const options = Object.values(enumObj); - return z.union([ - ...options.map(x => z.literal(x)), - z.string().transform(x => unrecognized(x)), - ] as any); -} - -export function inboundSchemaInt>( - enumObj: T, -): z.ZodType, z.ZodTypeDef, unknown> { - // For numeric enums, Object.values returns both numbers and string keys - const options = Object.values(enumObj).filter(v => typeof v === "number"); - return z.union([ - ...options.map(x => z.literal(x)), - z.number().int().transform(x => unrecognized(x)), - ] as any); -} - -export function outboundSchema>( - _: T, -): z.ZodType> { - return z.string() as any; -} - -export function outboundSchemaInt>( - _: T, -): z.ZodType> { - return z.number().int() as any; -} diff --git a/lending/src/sdk/types/fp.ts b/lending/src/sdk/types/fp.ts index ccbe51eac..84eb7e4f3 100644 --- a/lending/src/sdk/types/fp.ts +++ b/lending/src/sdk/types/fp.ts @@ -1,50 +1,25 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -/** - * A monad that captures the result of a function call or an error if it was not - * successful. Railway programming, enabled by this type, can be a nicer - * alternative to traditional exception throwing because it allows functions to - * declare all _known_ errors with static types and then check for them - * exhaustively in application code. Thrown exception have a type of `unknown` - * and break out of regular control flow of programs making them harder to - * inspect and more verbose work with due to try-catch blocks. - */ -export type Result = - | { ok: true; value: T; error?: never } - | { ok: false; value?: never; error: E }; +export type Result = + | { ok: true; value: T; error?: never } + | { ok: false; value?: never; error: E }; -export function OK(value: V): Result { - return { ok: true, value }; +export function OK(value: T): Result { + return { ok: true, value }; } export function ERR(error: E): Result { - return { ok: false, error }; + return { ok: false, error }; } -/** - * unwrap is a convenience function for extracting a value from a result or - * throwing if there was an error. - */ export function unwrap(r: Result): T { - if (!r.ok) { + if (r.ok) { + return r.value; + } throw r.error; - } - return r.value; } -/** - * unwrapAsync is a convenience function for resolving a value from a Promise - * of a result or rejecting if an error occurred. - */ -export async function unwrapAsync( - pr: Promise>, -): Promise { - const r = await pr; - if (!r.ok) { - throw r.error; - } - - return r.value; +export async function unwrapAsync(pr: Promise>): Promise { + return unwrap(await pr); } diff --git a/lending/src/sdk/types/index.ts b/lending/src/sdk/types/index.ts index 19a7bd013..43093a397 100644 --- a/lending/src/sdk/types/index.ts +++ b/lending/src/sdk/types/index.ts @@ -1,13 +1,8 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ -export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export { Decimal } from "./decimal.js"; -export type { ClosedEnum, OpenEnum } from "./enums.js"; -export type { Result } from "./fp.js"; -export type { PageIterator, Paginator } from "./operations.js"; -export { createPageIterator } from "./operations.js"; -export { RFCDate } from "./rfcdate.js"; -export * from "./unrecognized.js"; -export type { WebhookRecipient } from "./webhooks.js"; +export * from './rfcdate'; +export * from './async'; +export * from './decimal'; +export * from './fp'; +export * from './operations'; diff --git a/lending/src/sdk/types/operations.ts b/lending/src/sdk/types/operations.ts index beb81e10f..b6d42c45c 100644 --- a/lending/src/sdk/types/operations.ts +++ b/lending/src/sdk/types/operations.ts @@ -1,6 +1,5 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ +/* tslint:disable */ +/* eslint-disable */ import { Result } from "./fp.js"; @@ -101,5 +100,3 @@ function unwrapPaginator( }); }; } - -export const URL_OVERRIDE = Symbol("URL_OVERRIDE"); diff --git a/lending/src/sdk/types/rfcdate.ts b/lending/src/sdk/types/rfcdate.ts index c79b3f53a..03939e51e 100644 --- a/lending/src/sdk/types/rfcdate.ts +++ b/lending/src/sdk/types/rfcdate.ts @@ -1,54 +1,22 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -const dateRE = /^\d{4}-\d{2}-\d{2}$/; +/* tslint:disable */ +/* eslint-disable */ export class RFCDate { - private serialized: string; - - /** - * Creates a new RFCDate instance using today's date. - */ - static today(): RFCDate { - return new RFCDate(new Date()); - } + private date: string; - /** - * Creates a new RFCDate instance using the provided input. - * If a string is used then in must be in the format YYYY-MM-DD. - * - * @param date A Date object or a date string in YYYY-MM-DD format - * @example - * new RFCDate("2022-01-01") - * @example - * new RFCDate(new Date()) - */ - constructor(date: Date | string) { - if (typeof date === "string" && !dateRE.test(date)) { - throw new RangeError( - "RFCDate: date strings must be in the format YYYY-MM-DD: " + date, - ); + constructor(date: Date | string) { + this.date = date instanceof Date ? date.toISOString().slice(0, 10) : date; } - const value = new Date(date); - if (isNaN(+value)) { - throw new RangeError("RFCDate: invalid date provided: " + date); + static today(): RFCDate { + return new RFCDate(new Date()); } - this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length); - if (!dateRE.test(this.serialized)) { - throw new TypeError( - `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`, - ); + toJSON(): string { + return this.date; } - } - toJSON(): string { - return this.toString(); - } - - toString(): string { - return this.serialized; - } + toString(): string { + return this.date; + } } diff --git a/lending/src/sdk/types/streams.ts b/lending/src/sdk/types/streams.ts deleted file mode 100644 index a0163e7a9..000000000 --- a/lending/src/sdk/types/streams.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -export function isReadableStream( - val: unknown, -): val is ReadableStream { - if (typeof val !== "object" || val === null) { - return false; - } - - // Check for the presence of methods specific to ReadableStream - const stream = val as ReadableStream; - - // ReadableStream has methods like getReader, cancel, and tee - return ( - typeof stream.getReader === "function" && - typeof stream.cancel === "function" && - typeof stream.tee === "function" - ); -} diff --git a/lending/src/sdk/types/unrecognized.ts b/lending/src/sdk/types/unrecognized.ts deleted file mode 100644 index b7a2a13f3..000000000 --- a/lending/src/sdk/types/unrecognized.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -declare const __brand: unique symbol; -export type Unrecognized = T & { [__brand]: "unrecognized" }; - -function unrecognized(value: T): Unrecognized { - globalCount++; - return value as Unrecognized; -} - -let globalCount = 0; -let refCount = 0; -export function startCountingUnrecognized() { - refCount++; - const start = globalCount; - return { - /** - * Ends counting and returns the delta. - * @param delta - If provided, only this amount is added to the parent counter - * (used for nested unions where we only want to record the winning option's count). - * If not provided, records all counts since start(). - */ - end: (delta?: number) => { - const count = globalCount - start; - // Reset globalCount back to start, then add only the specified delta - globalCount = start + (delta ?? count); - if (--refCount === 0) globalCount = 0; - return count; - }, - }; -} - -export { unrecognized }; diff --git a/lending/src/sdk/types/webhooks.ts b/lending/src/sdk/types/webhooks.ts deleted file mode 100644 index 9510d20c0..000000000 --- a/lending/src/sdk/types/webhooks.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -export type WebhookRecipient = { - url: string; -}; diff --git a/lending/tsconfig.esm.json b/lending/tsconfig.esm.json new file mode 100644 index 000000000..b98a6d38d --- /dev/null +++ b/lending/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "include": ["src"], + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/lending/tsconfig.json b/lending/tsconfig.json index 76110f883..ffd54239f 100644 --- a/lending/tsconfig.json +++ b/lending/tsconfig.json @@ -1,41 +1,17 @@ { + "include": ["src"], "compilerOptions": { - "incremental": false, - "target": "ES2020", - "lib": ["ES2022", "DOM", "DOM.Iterable"], - "jsx": "react-jsx", - - "module": "Node16", - "moduleResolution": "Node16", - - "allowJs": true, - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "rootDir": "src", - "outDir": ".", - - - // https://github.com/tsconfig/bases/blob/a1bf7c0fa2e094b068ca3e1448ca2ece4157977e/bases/strictest.json - "strict": true, - "allowUnusedLabels": false, - "allowUnreachableCode": false, - "exactOptionalPropertyTypes": true, - "useUnknownInCatchVariables": true, - "noFallthroughCasesInSwitch": true, - "noImplicitOverride": true, - "noImplicitReturns": true, - "noPropertyAccessFromIndexSignature": true, - "noUncheckedIndexedAccess": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "isolatedModules": true, - "checkJs": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true + "target": "es2018", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "dist", + "typeRoots": [ + "node_modules/@types" + ] }, - "include": ["src"], - "exclude": ["node_modules", "src/__tests__"] + "exclude": [ + "dist", + "node_modules" + ] }